Institute of Bankers of The Gambia Portal

Academic Year
Academic Year Setup
0) { ?>
$sql = oci_parse($conn, "select * from term_calendar where s_id = $sid and status = 'ACCEPTED' "); oci_execute($sql); if (oci_fetch_all($sql, $a) > 0) { $sql = oci_parse($conn, "select * from term_calendar where s_id = $sid and status = 'ACCEPTED' "); oci_execute($sql); while ($r = oci_fetch_array($sql)) { $end_dt = $r['END_DT']; $term = $r['TERM']; } if (date('Y-m-d') == $end_dt) { echo "TERM HAS ENDED!!!!!!"; } else { $currentDate = date("Y-m-d"); $currentDateTime = new DateTime($currentDate); $targetDateTime = new DateTime($end_dt); ///Calculate the difference in days $interval = $currentDateTime->diff($targetDateTime); // $numberOfDays = $interval->days; echo "$interval->days Days Left To The End Of $term"; } } /* $stu = $_SESSION['STUD_ID']; $sql = oci_parse($conn, "select * from class_student where stud_id = '$stu' "); oci_execute($sql); while ($a = oci_fetch_array($sql)) { $subs = $a['SUB_CODE']; $class = $a['CLASS']; } if (isset($_POST['ele_sub'])) { $ele = $_POST['ele_sub']; $sql = oci_parse($conn, "select * from subject where subject = '$ele' "); oci_execute($sql); while ($r = oci_fetch_array($sql)) { $sub_code = $r['SUB_CODE']; } $check_numofsub = oci_parse($conn, "select * from student_subject where stud_id = '$stu' "); oci_execute($check_numofsub); if (oci_fetch_all($check_numofsub, $a) <= 9) { $check_dup = oci_parse($conn, "select * from student_subject where stud_id = '$stu' and sub_code = '$sub_code' "); oci_execute($check_dup); if (oci_fetch_all($check_dup, $b) == 0) { $sql = oci_parse($conn, "insert into student_subject (stud_id,sub_code,class,s_id) values ('$stu','$sub_code','$class',$sid) "); if (oci_execute($sql)) { $sql = oci_parse($conn, "select * from student_subject where stud_id = '$stu' "); oci_execute($sql); if (oci_fetch_all($sql, $a) == 9) { $sql = oci_parse($conn, "UPDATE STUDENT SET STATUS = 'ENROLLED' where STUD_ID = '$stu' "); oci_execute($sql); ?>