diff --git a/Courses.php b/Courses.php index 7b2c81f..3746312 100644 --- a/Courses.php +++ b/Courses.php @@ -127,8 +127,19 @@ function extend_deadline(id) { $type = $_POST["type"]; $Deadline = $deadlinedate." ".$deadlinetime; $date = date("Y-m-d H:i"); + $targetfile=""; + $targetfile2=""; + $targetfile3=""; + $targetfile4=""; + if($_FILES['attachment1']['name']!=""){ $targetfile = "/".$title."/".$_FILES['attachment1']['name']; } + if($_FILES['attachment2']['name']!=""){ $targetfile2 = "/".$title."/".$_FILES['attachment2']['name']; } + if($_FILES['attachment3']['name']!=""){ $targetfile3 = "/".$title."/".$_FILES['attachment3']['name']; } + if($_FILES['attachment4']['name']!=""){ $targetfile4 = "/".$title."/".$_FILES['attachment4']['name']; } + - $sql = "UPDATE `lab_reports_table` SET `Deadline` = ('" . $Deadline . "'), `Instructions` = ('" . $instructions . "'), `Title` = ('" . $title . "'), `Marks` = ('" . $marks . "'), `Type` = ('" . $type . "') WHERE `lab_reports_table`.`Lab_Report_ID` = '$getid'"; + $sql = "UPDATE `lab_reports_table` SET `Deadline` = ('" . $Deadline . "'), `Instructions` = ('" . $instructions . "'), `Title` = ('" . $title . "'), + `Attachment_link_1` = ('" . $targetfile . "'), `Attachment_link_2` = ('" . $targetfile2 . "'), `Attachment_link_3` = ('" . $targetfile3 . "'), + `Attachment_link_4` = ('" . $targetfile4 . "'), `Marks` = ('" . $marks . "'), `Type` = ('" . $type . "') WHERE `lab_reports_table`.`Lab_Report_ID` = '$getid'"; if ($con->query($sql) === TRUE) { $_SESSION["info_Updated"]="Assignment information updated successfully."; @@ -148,7 +159,7 @@ function extend_deadline(id) { echo "

Editing Lab Assignment

"; ?> -
+ @@ -166,17 +177,20 @@ function extend_deadline(id) { Marks "> Attachment 1 - + "> Attachment 2 - + "> + Attachment 3 - + "> + Attachment 4 - + "> +
Search Results for Course Code $search
"; + echo "

Search Results for Code : $search


"; $result = mysqli_query($con,"SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`," . " `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members` " . " , users_table.Full_Name FROM `courses_table` INNER JOIN users_table" - . " ON users_table.User_ID=courses_table.Lecturer_User_ID where Course_Code like '%{$search}%' and courses_table.Course_ID not in (select course_id from course_students_table where Student_ID=$student_id)"); + . " ON users_table.User_ID=courses_table.Lecturer_User_ID where Course_Code='$search' and courses_table.Course_ID not in (select course_id from course_students_table where Student_ID=$student_id)"); } - else { echo "

Find Courses under faculty $faculty

";