From 593ac0219a20e54af0ecd8856446e40def81dff0 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Sun, 3 Sep 2023 20:42:15 +0800 Subject: [PATCH] Submissions.php: replace frm with form --- Admin.php | 2 +- Courses.php | 12 ++++++------ Script.php | 14 +++++++------- SubmitLab.php | 2 +- index.php | 4 ++-- recover_password.php | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Admin.php b/Admin.php index 9fd3f00..6accee9 100644 --- a/Admin.php +++ b/Admin.php @@ -66,7 +66,7 @@ if ($_SESSION['user_type'] != "Lecturer" && $_SESSION['user_type'] != "Admin") { ?>
- + Full name
Email diff --git a/Courses.php b/Courses.php index fcea06e..3fc6121 100644 --- a/Courses.php +++ b/Courses.php @@ -110,7 +110,7 @@ include 'Header.php'; $_SESSION['Type'] = $row1['Type']; } - if(isset($_POST['frm_uploadlab'])){ + if(isset($_POST['form_uploadlab'])){ $deadlinedate = trim(mysqli_real_escape_string($con, $_POST["deadlinedate"])); // remove spaces $deadlinetime = trim(mysqli_real_escape_string($con, $_POST["deadlinetime"])); // remove spaces $instructions = mysqli_real_escape_string($con, $_POST["instructions"]); @@ -130,7 +130,7 @@ include 'Header.php'; } } - if(isset($_POST['frm_deletelab'])) { + if(isset($_POST['form_deletelab'])) { $sql = "DELETE FROM lab_reports_table WHERE Lab_Report_ID='$getid'"; if ($con->query($sql) === TRUE) { $_SESSION["info_Updated"]="Assignment deleted successfully."; @@ -152,7 +152,7 @@ include 'Header.php'; echo "

Editing assignment information

"; ?> - + @@ -195,7 +195,7 @@ include 'Header.php';




- +
@@ -217,7 +217,7 @@ include 'Header.php'; - + @@ -470,7 +470,7 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'" Create a new course
- + Course name diff --git a/Script.php b/Script.php index ab88509..4074d5e 100644 --- a/Script.php +++ b/Script.php @@ -126,7 +126,7 @@ if (!empty($_POST["form_signup"])) { // ################################ LOGIN ##################################### -if (!empty($_POST["frm_login"])) { +if (!empty($_POST["form_login"])) { $user = mysqli_real_escape_string($con, $_POST["user"]); // user could be a 12-digit student number or an email address $is_student_number = 0; @@ -187,7 +187,7 @@ if (!empty($_POST["frm_login"])) { // ################################ Recover Password ##################################### -if (!empty($_POST["frm_recover_password"])) { +if (!empty($_POST["form_recover_password"])) { $student_id = mysqli_real_escape_string($con, $_POST["sno"]); $email = mysqli_real_escape_string($con, $_POST["email"]); @@ -220,7 +220,7 @@ if (!empty($_POST["frm_recover_password"])) { // ################################ RESET Password ##################################### -if (!empty($_POST["frm_reset_password"])) { +if (!empty($_POST["form_reset_password"])) { $password = mysqli_real_escape_string($con, $_POST["password"]); $token = mysqli_real_escape_string($con, $_POST["token"]); $email = mysqli_real_escape_string($con, $_POST["email"]); @@ -264,7 +264,7 @@ if (!empty($_POST["frm_reset_password"])) { } // ############################### CREATE Lecturer/TA USER ################################## -if (!empty($_POST["frm_createlecturrer"])) { +if (!empty($_POST["form_createlecturrer"])) { $email = mysqli_real_escape_string($con, $_POST["email"]); $fullname = mysqli_real_escape_string($con, $_POST["fullname"]); $type = mysqli_real_escape_string($con, $_POST["type"]); @@ -340,7 +340,7 @@ function mkdirs($path) } // ############################### #Post Assignment ################################## -if (!empty($_POST["frm_uploadlab"])) { +if (!empty($_POST["form_uploadlab"])) { $course_id = mysqli_real_escape_string($con, $_POST["course_id"]); $deadlinedate = $_POST["deadlinedate"]; @@ -452,7 +452,7 @@ function checksize($file) } // ############################### Submit Assignment ################################## -if (!empty($_POST["frm_submitlab"])) { +if (!empty($_POST["form_submitlab"])) { $lab_id = mysqli_real_escape_string($con, $_POST["lab_id"]); $student_id = $_POST["student_id"]; @@ -999,7 +999,7 @@ if (!empty($_GET["action"])) { } // ############################### CREATE STUDENT USER ################################## -if (!empty($_POST["frm_createCourse"])) { +if (!empty($_POST["form_createCourse"])) { $name = mysqli_real_escape_string($con, $_POST["name"]); $academic = mysqli_real_escape_string($con, $_POST["academic"]); $lecturer = mysqli_real_escape_string($con, $_POST["lecturer"]); diff --git a/SubmitLab.php b/SubmitLab.php index 9874c05..21cb5d5 100644 --- a/SubmitLab.php +++ b/SubmitLab.php @@ -98,7 +98,7 @@ include 'Header.php'; - + diff --git a/index.php b/index.php index 2a8077b..6aaf75a 100644 --- a/index.php +++ b/index.php @@ -26,9 +26,9 @@ if (isset($_SESSION["user_fullname"])) {
- + Sign in - +
diff --git a/recover_password.php b/recover_password.php index 8baa97d..7eb2656 100644 --- a/recover_password.php +++ b/recover_password.php @@ -14,7 +14,7 @@ include 'Header.php';
Recover password - + Student number
Email