From 83edf3fbde2f961beb5c2f3e6b6920e6bb74d966 Mon Sep 17 00:00:00 2001 From: WhizzkidMc Date: Tue, 29 Dec 2020 01:50:59 +0800 Subject: [PATCH 1/4] trim function added to eliminate the leading space --- Courses.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Courses.php b/Courses.php index 182edaa..f5c15b2 100644 --- a/Courses.php +++ b/Courses.php @@ -554,7 +554,9 @@ function extend_deadline(id) { $student_id= $_SESSION['user_student_id']; if(!empty($_GET["search"]) || !empty($_GET["faculty"])) { - $search=$_GET["search"]; + $search=trim($_GET["search"]); + //trim is use to remove whitespace/leading space before or after a string// + //http://118.25.96.118/bugzilla/show_bug.cgi?id=59// $faculty=$_GET["faculty"]; From b2b50039057584cac8832f491383c352a6dbfc30 Mon Sep 17 00:00:00 2001 From: WhizzkidMc Date: Tue, 29 Dec 2020 11:52:51 +0800 Subject: [PATCH 2/4] trim --- Courses.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Courses.php b/Courses.php index f5c15b2..4b98a44 100644 --- a/Courses.php +++ b/Courses.php @@ -554,9 +554,8 @@ function extend_deadline(id) { $student_id= $_SESSION['user_student_id']; if(!empty($_GET["search"]) || !empty($_GET["faculty"])) { - $search=trim($_GET["search"]); - //trim is use to remove whitespace/leading space before or after a string// - //http://118.25.96.118/bugzilla/show_bug.cgi?id=59// + //use trim to remove whitespaces// + $search=trim($_GET["search"]); $faculty=$_GET["faculty"]; From bd3e1ca2ab2bb028d31786ca67f70fb67350039f Mon Sep 17 00:00:00 2001 From: WhizzkidMc Date: Tue, 29 Dec 2020 11:52:51 +0800 Subject: [PATCH 3/4] trim --- Courses.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Courses.php b/Courses.php index f5c15b2..4b98a44 100644 --- a/Courses.php +++ b/Courses.php @@ -554,9 +554,8 @@ function extend_deadline(id) { $student_id= $_SESSION['user_student_id']; if(!empty($_GET["search"]) || !empty($_GET["faculty"])) { - $search=trim($_GET["search"]); - //trim is use to remove whitespace/leading space before or after a string// - //http://118.25.96.118/bugzilla/show_bug.cgi?id=59// + //use trim to remove whitespaces// + $search=trim($_GET["search"]); $faculty=$_GET["faculty"]; From 11cb889922681750aec51e8354a63d43c43ebfc7 Mon Sep 17 00:00:00 2001 From: WhizzkidMc Date: Wed, 26 May 2021 15:58:48 +0800 Subject: [PATCH 4/4] // seconds reading --- Script.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Script.php b/Script.php index b00e8d5..c1f57cb 100644 --- a/Script.php +++ b/Script.php @@ -427,7 +427,7 @@ function mkdirs($path) $deadline = $deadlinedate." ".$deadlinetime; - $date = date("Y-m-d H:i"); + $date = date("Y-m-d H:i:s"); @@ -550,7 +550,7 @@ function checksize($file) $url = mysqli_real_escape_string($con, $_POST["url"]); $deadline = $deadlinedate." ".$deadlinetime; - $date = date("Y-m-d H:i"); + $date = date("Y-m-d H:i:s"); // GET UPLOADED FILES $labName = mysqli_query($con,"SELECT * FROM `lab_reports_table` WHERE Lab_Report_ID=$lab_id"); @@ -742,7 +742,7 @@ function checksize($file) echo " Marks could not be greater than total"; return; } - $date= date("Y-m-d H:i"); + $date= date("Y-m-d H:i:s"); $feedback="
@$date : ".$feedback; $sql="UPDATE `lab_report_submissions` SET `Marks`='$marks',`Status`='$status',"