From 2ac128c6801c51a70b6f3bf425e6cf7ada93c20f Mon Sep 17 00:00:00 2001 From: CloudStarTreck <37251906+Teecloudy@users.noreply.github.com> Date: Mon, 16 Mar 2020 15:23:14 +0800 Subject: [PATCH] adding LRR files uploading the full project online --- Admin.php | 335 +++++++++ Connect.php | 23 + Course.php | 760 ++++++++++++++++++++ Courses.php | 825 ++++++++++++++++++++++ Header.php | 184 +++++ Issues.txt | 7 + Quick_Start.txt | 32 + Readme.txt | 5 + Reset_Database.txt | 19 + Reset_password.php | 49 ++ Script.php | 1575 ++++++++++++++++++++++++++++++++++++++++++ Student.php | 20 + Submissions.php | 628 +++++++++++++++++ SubmitLab.php | 153 ++++ Visitors.php | 67 ++ ashlys_issues.txt | 10 + index.php | 128 ++++ logo.png | Bin 0 -> 2737 bytes logo_text.png | Bin 0 -> 7776 bytes logout.php | 24 + lrr (1).sql | 319 +++++++++ lrr_datbase.sql | 383 ++++++++++ mail_spam.html | 17 + phpinfo.php | 7 + recover_password.php | 47 ++ signup.php | 57 ++ 26 files changed, 5674 insertions(+) create mode 100644 Admin.php create mode 100644 Connect.php create mode 100644 Course.php create mode 100644 Courses.php create mode 100644 Header.php create mode 100644 Issues.txt create mode 100644 Quick_Start.txt create mode 100644 Readme.txt create mode 100644 Reset_Database.txt create mode 100644 Reset_password.php create mode 100644 Script.php create mode 100644 Student.php create mode 100644 Submissions.php create mode 100644 SubmitLab.php create mode 100644 Visitors.php create mode 100644 ashlys_issues.txt create mode 100644 index.php create mode 100644 logo.png create mode 100644 logo_text.png create mode 100644 logout.php create mode 100644 lrr (1).sql create mode 100644 lrr_datbase.sql create mode 100644 mail_spam.html create mode 100644 phpinfo.php create mode 100644 recover_password.php create mode 100644 signup.php diff --git a/Admin.php b/Admin.php new file mode 100644 index 0000000..3c6ca89 --- /dev/null +++ b/Admin.php @@ -0,0 +1,335 @@ + + + + +
+

Administration Panel

+ +
+
+ + + + +
+

User account Management


+ + Lecturer / TA Accounts
+ + + + + + +
+ + + + +
+

+ + Create Lecturer/TA Accounts +
+ + Full_Name + +Email + + + Passport_Number / ID (Used as Intial Password) + +
User Type : + Lecturer + T/A +
+'; + $_SESSION['info_Admin_Users']=null; +} +if(isset($_SESSION['info_Admin_Users'])) { + echo '
'; + $_SESSION['info_Admin_Users']=null; +} + +?> + +
+ +
+ + + +
+ + + + + + +
+
+ + +
+ +
+ + + +
+ + + + +
+ + + + + +
+ + +
+ + + + + + \ No newline at end of file diff --git a/Connect.php b/Connect.php new file mode 100644 index 0000000..d82d890 --- /dev/null +++ b/Connect.php @@ -0,0 +1,23 @@ +connect_error) { + die("Database Connection failed: " . $conn->connect_error); +} +// else +// { + +// echo "Connected"; +// } +session_start(); \ No newline at end of file diff --git a/Course.php b/Course.php new file mode 100644 index 0000000..d0a61cf --- /dev/null +++ b/Course.php @@ -0,0 +1,760 @@ + + + Courses > $name ($code) > Lab Reports +
Faculty : $faculty Year : $academic Lecturer :$lecturer + + +
+ "; + + }} + } +?> +
+ + '; + $_SESSION['info_ReMarking']=null; +} + + if (isset($_SESSION['info_courses'])) { + echo '
'; + $_SESSION['info_courses']=null; +} + ?> + +
+ + + + +
+ +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Class Groups

+ + Create Group"; + + ?> + + + +
+ Invite Others"; + + if($status=="Invited") + { + $extra2=" Accept"; + $extra3=" Decline"; + + } + echo "
$name ($status) $extra $extra2 $extra3
"; + + $rs2=mysqli_query($con,"SELECT `ID`, `Course_Group_id`, course_group_members_table.Student_ID, + course_group_members_table.`Status`,users_table.Full_Name FROM `course_group_members_table` +INNER JOIN users_table on users_table.Student_ID=course_group_members_table.Student_ID +where course_group_members_table.Course_Group_id=$id"); + + while($row = mysqli_fetch_assoc($rs2)) { + $name=$row['Full_Name']; + $id=$row['Course_Group_id']; + $status=$row['Status']; + $Student_ID=$row['Student_ID']; + + + echo "
  • $name-$Student_ID ($status)
  • "; + + } + + + + + + + + } + } + ?> + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + diff --git a/Courses.php b/Courses.php new file mode 100644 index 0000000..8adb6dd --- /dev/null +++ b/Courses.php @@ -0,0 +1,825 @@ + + + + + + + + + + +
    + + + + + + + + + + +
    + ($code) - $name +
    Faculty : $faculty Year : $academic Lecturer :$lecturer +
    +
    + "; + + echo "
    "; + + + + if( $_SESSION['user_type']=="Lecturer"){ + echo "

    Post new Lab Assignment

    + + + + + Dealine Date/Time +
    +
    +
    +
    + +Title + + Instructions + +Marks + + Attachment 1 + + + Attachment 2 + + + Attachment 3 + + + + Attachment 4 + +
    +Submission Type Invidual + + Group +
    +
    +




    + "; + + } + } + } + echo "
    "; + + echo "

    Lab Report Assignment list

    "; + + error_reporting(0); +if (isset($_SESSION['info_courses'])) { + echo '
    '; + $_SESSION['info_courses'] = null; +} +if (isset($_SESSION['info_courses'])) { + echo '
    '; + $_SESSION['info_courses']=null; +} + + + + + $result = mysqli_query($con," SELECT `Lab_Report_ID`,Type,Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, " + . "`Attachment_link_4` FROM `lab_reports_table` WHERE Course_ID=$id ORDER by Lab_Report_ID DESC"); + + + if( $_SESSION['user_type']=="TA") + { + echo "* Only Lecturers can Post new Lab report Assignments
    "; + } + if(mysqli_num_rows($result)==0) + { + echo "No assignments posted so far."; + + } else { while($row = mysqli_fetch_assoc($result)) { + $marks=$row['Marks']; + $title=$row['Title']; + $ins=$row['Instructions']; + $posted=$row['Posted_Date']; + $deadline=$row['Deadline']; + $att1=$row['Attachment_link_1']; + $att2=$row['Attachment_link_2']; + $att3=$row['Attachment_link_3']; + $att4=$row['Attachment_link_4']; + $id=$row['Lab_Report_ID']; + $as_type=$row['Type']; + $full_link="$att1"; + + if($att2!=""){ + $full_link= $full_link."  |  $att2"; + } + if($att3!=""){ + $full_link= $full_link."  |  $att3"; + } + + if($att4!=""){ + $full_link= $full_link."   |   $att4"; + } + + + + + $resultx1 = mysqli_query($con,"Select Count(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id"); + while($row = mysqli_fetch_assoc($resultx1)) {$count_subs=$row['cnt'];} + + $resultx2 = mysqli_query($con,"Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Marks is not null"); + if(mysqli_num_rows($resultx2)==0){$count_marked=0;} else { while($row = mysqli_fetch_assoc($resultx2)) {$count_marked =$row['cnt'];}} + + + $header="Courses > ".$name."($code) > Assignments > ".$title; + + echo "
    + $title ($as_type)
    $ins +
    Posted : $posted Deadline : $deadline   ($marks Marks)           " + . "
    " + + . "    $count_subs Submissions ( $count_marked Marked )        View    |   Extend Deadline
    Attachments : $full_link
    " + . "  
    + "; + + + + }} + echo "
    "; + + + + + + $resultx1 = mysqli_query($con,"SELECT course_students_table.Student_ID,users_table.Full_Name FROM +`course_students_table` +INNER JOIN users_table on users_table.Student_ID=course_students_table.Student_ID +WHERE Course_ID=$course_id"); + + + echo ""; + + + + + return; + + } + + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + Course Portal > $user_name (Lecturer) > Course Listing +
    +
    + "; + + + $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 courses_table.Lecturer_User_ID=$user_d"); + + if($_SESSION['user_type']=="TA") + { + $result = mysqli_query($con,"SELECT course_ta.Course_ID, `Course_Name`, + `Academic_Year`, `Faculty`, `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members` FROM `courses_table` +INNER JOIN +course_ta ON course_ta.Course_ID=courses_table.Course_ID where course_ta.TA=$user_d"); + + } + // $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"); + + + if(mysqli_num_rows($result)==0) + {} else { while($row = mysqli_fetch_assoc($result)) { + $id=$row['Course_ID']; + $name=$row['Course_Name']; + $code=$row['Course_Code']; + $faculty=$row['Faculty']; + $lecturer=$row['Full_Name']; + $academic=$row['Academic_Year']; + $url=$row['URL']; + + $resultTA = mysqli_query($con,"SELECT `Course_ID`, `TA`,users_table.Full_Name as TA_NAME FROM `course_ta` +INNER JOIN users_table on users_table.User_ID=course_ta.TA +where course_ta.Course_ID=$id"); + + $ta=""; + while($rowTA = mysqli_fetch_assoc($resultTA)) { + $ta=$ta." - ".$rowTA['TA_NAME']; + } + + + + echo" + +
    + ($code) - $name +
    Faculty : $faculty        Year : $academic        Lecturer :$lecturer        TA:$ta +
    + "; + + }}?> +
    +
    +
    + Course Joining Requests + + + + No Course joining request so far for all your courses
    "; + } else { while($row = mysqli_fetch_assoc($result)) { + $id=$row['ID']; + + $name=$row['Course_Name']; + $code=$row['Course_Code']; + $faculty=$row['Faculty']; + $std_name=$row['Full_Name']; + $academic=$row['Academic_Year']; + + echo "
    + $std_name is Requesting to join
    [($code) - $name ]     
    Accept +    Decline +
    "; + + + + } + } + ?> + + + + + + + Only Lecturers can Post new Lab report Assignments"; + } + if( $_SESSION['user_type']=="Lecturer"){ ?> + + Create new Course Portal + +
    + + + Course Name + + + Course Code + + +URL (Leave blank to use Course Code & Year) + + +Academic Year + + + Faculty
    + + + + + + +Verify Joining Students + Yes + No + +
    +
    + +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    Course Portal > Students
    + ' . $_SESSION['info_Courses_student'] . ''; + $_SESSION['info_Courses_student'] = null; +} +?> +

    +
    +
    +
    + + + + + +
    +
    + + + + 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='$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

    "; + $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 Faculty='$faculty' and courses_table.Course_ID not in (select course_id from course_students_table where Student_ID=$student_id)"); + } + + + if(mysqli_num_rows($result)==0) + { +echo "No results found for your Search
    "; + + } else { while($row = mysqli_fetch_assoc($result)) { + $name=$row['Course_Name']; + $code=$row['Course_Code']; + $faculty=$row['Faculty']; + $lecturer=$row['Full_Name']; + $academic=$row['Academic_Year']; + $url=$row['URL']; + $id=$row['Course_ID']; + $v=$row['Verify_New_Members']; + $msg2="Join this Course"; + if($v>0) + { + $msg=" Lecturer Verification required"; + $msg2="Send Joining Request"; + } + + echo "
    + ($code) - $name
    ($url)
    $msg2 +
    Faculty : $faculty Year : $academic Lecturer :$lecturer
    $msg
    + "; + + + } + } + + + + + } + + + + + + + + + echo "

    My Courses

    "; + $result = mysqli_query($con,"SELECT users_table.Full_Name, course_students_table.Status, courses_table.Course_ID, `Course_Name`, `Academic_Year`, `Faculty`, `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members` FROM `courses_table` +INNER JOIN users_table + ON users_table.User_ID=courses_table.Lecturer_User_ID + +INNER JOIN course_students_table on course_students_table.Course_ID=courses_table.Course_ID + + where course_students_table.Student_ID=$student_id"); + + if(mysqli_num_rows($result)==0) + { + echo " You are not Enrolled in any Course"; + } else { while($row = mysqli_fetch_assoc($result)) { + $name=$row['Course_Name']; + $code=$row['Course_Code']; + $faculty=$row['Faculty']; + $lecturer=$row['Full_Name']; + $academic=$row['Academic_Year']; + $url=$row['URL']; + $id=$row['Course_ID']; + $Status=$row['Status']; + + if($Status=="Joined") + { + echo "
    + ($code) - $name
    ($url)     $Status     
    Open +
    Faculty : $faculty Year : $academic Lecturer :$lecturer
    + "; + } + else + { + echo "
    + ($code) - $name $Status +
    Faculty : $faculty Year : $academic Lecturer :$lecturer
    + "; + } + + + + + } + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + echo "
    + +
    +
    +
    +
    Find course by Code + +
    +List courses by faculty + +
    + +
    +

    + +
    + +
    +
    + + + + + +
    "; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + + ?> + + + + + + + + + + + + + + + diff --git a/Header.php b/Header.php new file mode 100644 index 0000000..4f8118f --- /dev/null +++ b/Header.php @@ -0,0 +1,184 @@ + + + + + + +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + diff --git a/Issues.txt b/Issues.txt new file mode 100644 index 0000000..e79cc3e --- /dev/null +++ b/Issues.txt @@ -0,0 +1,7 @@ + +* Allow submission without file upload +* Lecturer/TA should see his/her feedback on submissions + +* Check Spelling Issues + +* Remarking request details required \ No newline at end of file diff --git a/Quick_Start.txt b/Quick_Start.txt new file mode 100644 index 0000000..7eaa5a9 --- /dev/null +++ b/Quick_Start.txt @@ -0,0 +1,32 @@ + +

    Quick Start Guide

    +
    + + +* Use Admin User t Create Lecturer Accounts + + user : Admin + Password : admin@123 + +* Create Lecturer + +* Login to Lecturer Account + + +* Create Course ( You can Define if students require approvel to join or Not ) + + +* As Student + + You can Sign up with your Student ID + The Provide Email and Password + +* Browse Courses by Deartment + + - Or Search by Course Course + - Join Course + - You can see list of your course in Course Home page + +* + + diff --git a/Readme.txt b/Readme.txt new file mode 100644 index 0000000..8ed0306 --- /dev/null +++ b/Readme.txt @@ -0,0 +1,5 @@ +* Student Regisreation Process is now simplyfied, Student Passport/ID checking process skipped as there is no where find that information currenly. The system now checks Student Passport / National ID from users tables insead of verifying from school databse. + + + +* \ No newline at end of file diff --git a/Reset_Database.txt b/Reset_Database.txt new file mode 100644 index 0000000..620daa0 --- /dev/null +++ b/Reset_Database.txt @@ -0,0 +1,19 @@ +delete from courses_table; + +delete from course_groups_Table; + +delete from course_Group_Members_table; + +delete from course_students_table; + +delete from course_ta; +delete from extended_deadlines_table; + + +delete from lab_reports_table; + +delete from lab_report_submissions; + +delete from students_data; + +Delete from users_table; diff --git a/Reset_password.php b/Reset_password.php new file mode 100644 index 0000000..95e045c --- /dev/null +++ b/Reset_password.php @@ -0,0 +1,49 @@ + + +
    + +
    + +
    + +

    Reset your password

    +
    + +
    +
    + + + Email + +
    + New Password + + +
    + +
    + +
    +
    + +
    +
    + +
    + + + \ No newline at end of file diff --git a/Script.php b/Script.php new file mode 100644 index 0000000..bc53e6d --- /dev/null +++ b/Script.php @@ -0,0 +1,1575 @@ +query($sql) === TRUE) { + header("Location: Courses.php"); + +} else { + echo "Error: " . $sql . "
    " . $con->error; +} + } + + + + +// ################################ LOGIN ##################################### + +if (!empty($_POST["frm_login"])) { + $user=mysqli_real_escape_string($con,$_POST["user"]); + $password=mysqli_real_escape_string($con,$_POST["password"]); + // $hashed_password=hash('sha512', $password); Not necessary in the login + $result = mysqli_query($con, "SELECT * FROM users_table WHERE (Email='$user' or Student_ID='$user')"); +if(mysqli_num_rows($result)==0) + { + $_SESSION["info_login"]="Inavlid login Information."; + +echo $_SESSION["info_login"]; + +header("Location: index.php"); + } + else + { + while($row = mysqli_fetch_assoc($result)) { + // verify the hashed password and unhashed password + if(password_verify($password, $row["Password"]) or ($password = $row["Password"])){ + $_SESSION['user_id']=$row['User_ID']; + $_SESSION['user_email']=$row['Email']; + $_SESSION['user_student_id']=$row['Student_ID']; + $_SESSION['user_type']=$row['UserType']; + $_SESSION['user_fullname']=$row['Full_Name']; + + if( $_SESSION['user_type']=="Student") + { + header("Location: Courses.php"); + } + + if( $_SESSION['user_type']=="Lecturer") + { + header("Location: Courses.php"); + } + + if( $_SESSION['user_type']=="TA") + { + header("Location: Courses.php"); + } + + if( $_SESSION['user_type']=="Admin") + { + header("Location: Admin.php"); + } + } + + + } + } +} + + + + + + + + + +// ################################ Recover Password ##################################### + +if (!empty($_POST["frm_recover_password"])) { + $email=mysqli_real_escape_string($con,$_POST["email"]); + + + $result = mysqli_query($con, + "SELECT * FROM Users_Table WHERE email='$email'"); +if(mysqli_num_rows($result)==0) + { + $_SESSION["info_recover_password"]="Email address is not recognised."; + + +echo "Email address was not recognised"; +return; +header("Location: recover_password.php"); + } + else + { + while($row = mysqli_fetch_assoc($result)) { + + $userid=$row['User_ID']; + + $email=urlencode($row['Email']); + $pure_email=$row['Email']; + $id=$row['Student_ID']; + + $token=$userid*$userid*$userid+$userid*0.00343; + + $name=$row['Full_Name']; +$link="Click Here (点击这里) "; +$msg=urlencode("

    Lab Report Repository System - ZJNU


    Hi " +.$name. +" Here is your password recovery link , " +.$link. +" to reset your password ,
    please ignore this message if you did not requested password recovery.




    +您好 $name, 这是你的密码恢复链接,点击上面的链接 重置你的密码, +如果您没有请求密码恢复,请忽略此消息。




    LRR System by Mohamed Nor.
    "); + + +$title=urlencode("Password recovery Request for LRR system - ZJNU "); + + +$url="http://sms.samesoftware.com/email/send/?Subject=$title&Body=$msg&ToAddress=$email&token=s1234"; + +//$response = file_get_contents($url); + + +$ch = curl_init(); + + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_URL, $url); + + $data = curl_exec($ch); + + if(curl_errno($ch)) + echo 'Curl error: '.curl_error($ch); +curl_close ($ch); + + + +echo $data."
    "; + + + +$_SESSION["info_login"]="
    Please check your Inbox & Junk folders for the recovery email , a reset link was sent to your email $pure_email "; + +header("Location: index.php"); + + + } + } + } + + + + + + + + +// ################################ RESET Password ##################################### + +if (!empty($_POST["frm_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"]); + $result = mysqli_query($con, + "SELECT * FROM Users_Table WHERE email='$email'"); +if(mysqli_num_rows($result)==0) + { + +echo "invalid email"; +return; + + } + else + { + while($row = mysqli_fetch_assoc($result)) { + + $userid=$row['User_ID']; + + $email=$row['Email']; + $id=$row['Student_ID']; + + $user_token=$userid*$userid*$userid+$userid*0.00343; +if($user_token==$token) +{ +// Password Update + + // Password Update + $hashed_password=hash('sha512', $password); + $sql= "UPDATE users_table set HashPassword='$hashed_password' where User_ID=$userid;"; + if ($con->query($sql) === TRUE) { + + error_reporting(0); + + $_SESSION["info_login"]=" Password changed successfully , you can login now with your new password "; + header("Location: index.php"); + + } + else { + echo "Error: " . $sql . "
    " . $con->error; +} + +} else +{ + echo "Invalid Token "; +} + + + + + } + } + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // ############################### CREATE Lecturer/TA USER ################################## + if (!empty($_POST["frm_createlecturrer"])) { + $email=mysqli_real_escape_string($con,$_POST["email"]); + $passport=mysqli_real_escape_string($con,$_POST["passport"]); + $fullname=mysqli_real_escape_string($con,$_POST["fullname"]); + $type=mysqli_real_escape_string($con,$_POST["type"]); + $password=$passport; + // check if email is taked + $result = mysqli_query($con, + "SELECT * FROM Users_Table WHERE email='$email'"); + if(mysqli_num_rows($result)!=0) + { + $_SESSION["info_Admin_Users"]="Email adress : ".$email." is already used."; + header("Location: Admin.php"); + } + $sql= "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`, `Passport_Number`) VALUES " + . "('$email','$password','$fullname','$type','$passport')"; + + if ($con->query($sql) === TRUE) { + $_SESSION["info_Admin_Users"]=$type." user Created successfully : email ".$email." and $password as Password."; + header("Location: Admin.php"); + +} else { + echo "Error: " . $sql . "
    " . $conn->error; +} + } + + + + + + + + + + + + + + + + + // #### FUNCTION CHECK FILE TYPES //// + +function is_valid($file) { + + + $allowed = array('pdf', 'rtf', 'jpg','png', 'doc', 'docx', 'xls', 'xlsx','sql','txt','md','py','css','html', + 'cvc','c','class','cpp','h','java','sh','swift','zip','rar','ods','xlr','bak','ico','swf'); + + + +$filename = $_FILES[$file]['name']; +$ext = pathinfo($filename, PATHINFO_EXTENSION); + $result=in_array($ext,$allowed); + + return $result; +} + + + + + // #### FUNCTION CREATE DIRECTORIES //// + + function Create_dir($upPath) +{ + try { + + // full path +$tags = explode('/' ,$upPath); // explode the full path +$mkDir = ""; + + foreach($tags as $folder) { + $mkDir = $mkDir . $folder ."/"; // make one directory join one other for the nest directory to make + // echo '"'.$mkDir.'"
    '; // this will show the directory created each time + if(!is_dir($mkDir)) { // check if directory exist or not + mkdir($mkDir, 0777); // if not exist then make the directory + } + } + } + catch (Exception $e) { + + } + return $upPath; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// ############################### #Post Assignment ################################## + if (!empty($_POST["frm_uploadlab"])) { + + + + $course_id=mysqli_real_escape_string($con,$_POST["course_id"]); + $deadlinedate=$_POST["deadlinedate"]; + $deadlinetime=$_POST["deadlinetime"]; + $instructions=mysqli_real_escape_string($con,$_POST["instructions"]); + $title=mysqli_real_escape_string($con,$_POST["title"]); + $marks=mysqli_real_escape_string($con,$_POST["marks"]); + $url=mysqli_real_escape_string($con,$_POST["url"]); + + $type=mysqli_real_escape_string($con,$_POST["type"]); + + + $deadline=$deadlinedate." ".$deadlinetime; + $date= date("Y-m-d H:i"); + + + + // GET UPLOADED FILES + + $target_dir =Create_dir("Lab_Report_Assignments/".$title."/"); + + + $rnd=rand(10,1000); + $rnd=""; // no more required , creating folder for each lab + $targetfile = $target_dir.$rnd.$_FILES['attachment1']['name']; + $targetfile2 = $target_dir.$rnd.$_FILES['attachment2']['name']; + $targetfile3 = $target_dir.$rnd.$_FILES['attachment3']['name']; + $targetfile4 = $target_dir.$rnd.$_FILES['attachment4']['name']; + + + + + + +//$curDateTime = date("Y-m-d H:i"); +//$myDate = date("Y-m-d H:i", strtotime("2017-12-28 18:01")); +//if($curDateTime <= $myDate ){ +// echo "active ".+$curDateTime." mydate= ".$myDate; +// +//}else{ +// echo "inactive c=".$curDateTime; +//} +// + + $count=0; + + + if(!is_valid("attachment1") && $_FILES["attachment1"]["name"]!="") + { + echo "Invalid File Type for Attachment 1"; + return; + } + if(!is_valid("attachment2") && $_FILES["attachment2"]["name"]!="") + { + echo "Invalid File Type for Attachment 2"; + return; + } + if(!is_valid("attachment3") && $_FILES["attachment3"]["name"]!="") + { + echo "Invalid File Type for Attachment 3"; + return; + } + + //if($_FILES["attachment1"]["error"] != 0) { + // echo "Error uploading the file "; + //return; +//} + +// use 4 for missing file + + + + + + if (move_uploaded_file($_FILES['attachment1']['tmp_name'], $targetfile)) { + $count++; + } else { + echo $_FILES['attachment1']['error']; + } + + if (move_uploaded_file($_FILES['attachment2']['tmp_name'], $targetfile2)) { + $count++; + } else { + echo $_FILES['attachment2']['error']; + } + + if (move_uploaded_file($_FILES['attachment3']['tmp_name'], $targetfile3)) { + $count++; + } else { + echo $_FILES['attachment3']['error']; + } + + if (move_uploaded_file($_FILES['attachment4']['tmp_name'], $targetfile4)) { + $count++; + } else { + echo $_FILES['attachment4']['error']; + } +//} + + + + + echo $count." File(s) uploaded"; + + //CLEAN + $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']; } + + + + + + + + + + + // return; + + + + $sql="INSERT INTO `lab_reports_table`(`Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, + `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4`,Marks,Type) + VALUES ('$course_id','$date','$deadline','$instructions','$title','$targetfile','$targetfile2','$targetfile3','$targetfile3',$marks,'$type')"; + + + + if ($con->query($sql) === TRUE) { + + $_SESSION["info_courses"]=$type." Lab Report Assignment posted successfully."; + header("Location: Courses.php?course=".$url); + +} else { + echo "Error: " . $sql . "
    " . $conn->error; +} + } + + + + + + + + + + + + + + + + + +function checksize($file) +{ + $filename = $_FILES[$file]['name']; + + $result=$_FILES["$file"]['size']/1024/1024; + + + + //$max_upload = (int)(ini_get('upload_max_filesize')); +//$max_post = (int)(ini_get('post_max_size')); +//$memory_limit = (int)(ini_get('memory_limit')); +//$upload_mb = min($max_upload, $max_post, $memory_limit); +if($result>20) +{ + return FALSE; +} + return TRUE; +} + + + + + + // ############################### Submit Assignment ################################## + if (!empty($_POST["frm_submitlab"])) { + + + + $lab_id=mysqli_real_escape_string($con,$_POST["lab_id"]); + $student_id=$_POST["student_id"]; + $group_id=$_POST["group_id"]; + + + $instructions=mysqli_real_escape_string($con,$_POST["instructions"]); + $title=mysqli_real_escape_string($con,$_POST["title"]); + + $url=mysqli_real_escape_string($con,$_POST["url"]); + + + $deadline=$deadlinedate." ".$deadlinetime; + $date= date("Y-m-d H:i"); + + + + // GET UPLOADED FILES + + + + $labName = mysqli_query($con,"SELECT Title FROM `lab_reports_table` WHERE Lab_Report_ID=$lab_id"); + while($row = mysqli_fetch_assoc($labName)) {$lab_name=$row['Title'];} + + + $target_dir =Create_dir("Lab_Report_Submisions/".$student_id."/".$lab_name."/"); + + + + $targetfile = $target_dir.$_FILES['attachment1']['name']; + $targetfile2 = $target_dir.$_FILES['attachment2']['name']; + $targetfile3 = $target_dir.$_FILES['attachment3']['name']; + $targetfile4 = $target_dir.$_FILES['attachment4']['name']; + + + + + + +//$curDateTime = date("Y-m-d H:i"); +//$myDate = date("Y-m-d H:i", strtotime("2017-12-28 18:01")); +//if($curDateTime <= $myDate ){ +// echo "active ".+$curDateTime." mydate= ".$myDate; +// +//}else{ +// echo "inactive c=".$curDateTime; +//} +// + + $count=0; + + + + + //check zise + if(!checksize("attachment1")) + { + echo "20 MB is the maximum file size allowed"; + return; + } + if(!checksize("attachment2") && $_FILES["attachment2"]["name"]!="") + { + echo "20 MB is the maximum file size allowed"; + return; + } + if(!checksize("attachment3") && $_FILES["attachment3"]["name"]!="") + { + echo "20 MB is the maximum file size allowed"; + return; + } + + + + + + if(!is_valid("attachment1")) + { + echo "Invalid File Type for Attachment 1"; + return; + } + if(!is_valid("attachment2") && $_FILES["attachment2"]["name"]!="") + { + echo "Invalid File Type for Attachment 2"; + return; + } + if(!is_valid("attachment3") && $_FILES["attachment3"]["name"]!="") + { + echo "Invalid File Type for Attachment 3"; + return; + } + + if($_FILES["attachment1"]["error"] != 0) { + echo "Error uploading the file "; + return; +} + +// use 4 for missing file + + + + + + if (move_uploaded_file($_FILES['attachment1']['tmp_name'], $targetfile)) { + $count++; + } else { + echo $_FILES['attachment1']['error']; + } + + if (move_uploaded_file($_FILES['attachment2']['tmp_name'], $targetfile2)) { + $count++; + } else { + echo $_FILES['attachment2']['error']; + } + + if (move_uploaded_file($_FILES['attachment3']['tmp_name'], $targetfile3)) { + $count++; + } else { + echo $_FILES['attachment3']['error']; + } + + if (move_uploaded_file($_FILES['attachment4']['tmp_name'], $targetfile4)) { + $count++; + } else { + echo $_FILES['attachment4']['error']; + } +//} + + + + + echo $count." File(s) uploaded"; + + //CLEAN + $targetfile1=""; + $targetfile2=""; + $targetfile3=""; + $targetfile4=""; + + if(strlen($_FILES['attachment1']['name']) > 2 ) { + $targetfile="/".$student_id."/".$lab_name."/".$_FILES['attachment1']['name']; + } + + if(strlen($_FILES['attachment2']['name']) > 2 ) { + $targetfile2="/".$student_id."/".$lab_name."/".$_FILES['attachment2']['name']; } + + if(strlen($_FILES['attachment3']['name']) > 2 ) { + $targetfile3= "/".$student_id."/".$lab_name."/".$_FILES['attachment3']['name'];} + + if(strlen($_FILES['attachment4']['name']) > 2 ) { + $targetfile4= "/".$student_id."/".$lab_name."/".$_FILES['attachment4']['name']; + } + + + $sql1="Delete from lab_report_submissions where Lab_Report_ID=$lab_id and Student_id=$student_id and Course_Group_id=$group_id"; + if ($con->query($sql1) === TRUE) { + } + + if($group_id>0) + { + $student_id=0; + } + + $sql="INSERT INTO `lab_report_submissions`(`Submission_Date`, `Lab_Report_ID`, `Student_id`," + . " `Course_Group_id`, `Attachment1`, `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Status`, `Title`,`Remarking_Reason`)" + . " VALUES ('$date',$lab_id,$student_id,$group_id,'$targetfile','$instructions','$targetfile2','$targetfile3','$targetfile4'," + . "'Pending','$title','')"; + + + + if ($con->query($sql) === TRUE) { + + $_SESSION["info_courses"]=$type." Lab Report Assignment Submitted successfully."; + header("Location: Course.php?url=".$url); + +} else { + echo "Error:
    " . $con->error; +} + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + // JOIN COURSE + if (!empty($_GET["JoinCourse"])) { + + $id=$_GET["id"]; + $student_id=$_GET["std"]; + $joining=$_GET["joining"]; + + $status="Pending"; + + if($joining==0){ $status="Joined";} + + $sql="INSERT INTO `course_students_table`(`Course_ID`, `Student_ID`,`Status`) VALUES + ('$id','$student_id','$status')"; + + if ($con->query($sql) === TRUE) { + + + if($joining==0) + { + $_SESSION["info_Courses_student"]="You enroll in this Course successfully."; + } + else { + $_SESSION["info_Courses_student"]="Course enrollment request was sent to the lecturer."; + } + + + header("Location: Courses.php"); + + + +} else { + echo "Error: " . $sql . "
    " . $con->error; +} + + } + + + + + + + + + + + + #MARK LAB REPORT + + if (!empty($_GET["savemarks"])) { + + $id=$_GET["id"]; + $marks=$_GET["marks"]; + $total=$_GET["total"]; + $feedback=$_GET["feedback"]; + $header=$_GET["header"]; + $labid=$_GET["labid"]; + $status="Marked"; + + if($marks>$total) + { + echo " Marks could not be greater than total"; + return; + } + $date= date("Y-m-d H:i"); + $feedback="
    @$date : ".$feedback; + + $sql="UPDATE `lab_report_submissions` SET `Marks`='$marks',`Status`='$status'," + . "" + . "Notes=if(Notes is null, ' ', concat(Notes, '$feedback'))" + . "" + . " WHERE Submission_ID=$id + "; + + if ($con->query($sql) === TRUE) { + + + $_SESSION["info_Marking"]="Lab Report Submission Marked"; + header("Location: Submissions.php?id=".$labid."&header=".$header."&total=".$total); + + +} else { + echo "Error: " . $sql . "
    " . $con->error; +} + + } + + + + + + #Update Report Visibility + if (!empty($_GET["updatevisibility"])) { + + $id=$_GET["id"]; + $marks=$_GET["marks"]; + $total=$_GET["total"]; + $status=$_GET["status"]; + $header=$_GET["header"]; + $labid=$_GET["labid"]; + + + + $sql="UPDATE `lab_report_submissions` SET `Visibility`='$status' WHERE Submission_ID=$id + "; + + if ($con->query($sql) === TRUE) { + + $_SESSION["info_Marking"]="Lab Report Visibility Updated"; + header("Location: Submissions.php?id=".$labid."&header=".$header."&total=".$total); + + +} else { + echo "Error: " . $sql . "
    " . $con->error; +} + + } + + + + #Remarking Request + + if (!empty($_GET["remarking"])) { + + $id=$_GET["id"]; + $url=$_GET["url"]; + + $status= $_GET["status"]; + $details=$_GET["details"]; + + $sql="UPDATE `lab_report_submissions` SET `Status`='Remarking',Remarking_Reason='$details' WHERE Submission_ID=$id + "; + + if ($con->query($sql) === TRUE) { + + + $_SESSION["info_ReMarking"]="Remarking Request Sent"; + header("Location: Course.php?url=".$url); + + +} else { + echo "Error: " . $sql . "
    " . $con->error; +} + + } + + + + #Create Group Request + + if (!empty($_GET["creategroup"])) { + + $student_id=$_GET["student_id"]; + $url=$_GET["url"]; + $id=$_GET["id"]; + $name= $_GET["name"]; + + + $sql="INSERT INTO `course_groups_table`(`Group_Name`, + `Group_Leader`, `Course_id`) VALUES ('$name',$student_id,$id)"; + + + + + + + if ($con->query($sql) === TRUE) { + + + $resultx1 = mysqli_query($con,"Select Max(Course_Group_id) as cnt from course_groups_table"); + while($row = mysqli_fetch_assoc($resultx1)) {$gid=$row['cnt'];} + + + $sql="INSERT INTO `course_group_members_table`( `Course_Group_id`, `Student_ID`, `Status`) + VALUES ($gid,$student_id,'Created')"; + if ($con->query($sql) === TRUE) { + $_SESSION["info_ReMarking"]="Course group Created"; + header("Location: Course.php?url=".$url); + } else { + echo "Error: " . $sql . "
    " . $con->error; +} + + +} else { + echo "Error: " . $sql . "
    " . $con->error; +} + + } + + + + + + + #Create Group Request + + if (!empty($_GET["groupinvite"])) { + + $student_id=$_GET["student_id"]; + $url=$_GET["url"]; + $courseid=$_GET["courseid"]; + $groupid=$_GET["groupid"]; + + + + + + + $sql="INSERT INTO `course_group_members_table`( `Course_Group_id`, `Student_ID`, `Status`) + VALUES ($groupid,$student_id,'Invited')"; + if ($con->query($sql) === TRUE) { + $_SESSION["info_ReMarking"]=$student_id . " was invited to the group"; + header("Location: Course.php?url=".$url); + } else { + echo "Error: " . $sql . "
    " . $con->error; +} + +} + + + + + + + #Accept deny Group Invite + + if (!empty($_GET["acceptinvite"])) { + + $student_id=$_GET["student_id"]; + $url=$_GET["url"]; + $action=$_GET["action"]; + $groupid=$_GET["groupid"]; + + if($action==1) + { + $sql="Update `course_group_members_table` set Status='Joined' where Course_Group_id =$groupid and student_id=$student_id + "; + } + else + { + $sql="Delete from `course_group_members_table` where Course_Group_id =$groupid and student_id=$student_id + "; + } + + if ($con->query($sql) === TRUE) { + $_SESSION["info_ReMarking"]=" Group Invite Updated"; + header("Location: Course.php?url=".$url); + } else { + echo "Error: " . $sql . "
    " . $con->error; +} + +} + + + + + + + + + + + + + #Extend Deadline + + if (!empty($_GET["extenddeadline"])) { + + $id=$_GET["id"]; + $date=$_GET["date"]; + $time=$_GET["time"]; + $type=$_GET["type"]; + + $stdid=$_GET["stdid"]; + $reason =$_GET["reason"]; + $url =$_GET["url"]; + $deadline=$date." ".$time; + + if($type==1) + { + + } + + + + + if($type==1) + { + $sql="UPDATE `lab_reports_table` SET `Deadline`='$deadline' WHERE Lab_Report_ID=$id"; + + } + else + { + $sql="INSERT INTO `extended_deadlines_table`(`Student_ID`, " + . "`Lab_Report_ID`, `Extended_Deadline_Date`," + . " `ReasonsForExtension`) VALUES ($stdid,$id,'$deadline','$reason')"; + + + } + + + + + if ($con->query($sql) === TRUE) { + + + $_SESSION["info_courses"]=" Lab Report Deadline extended successfully."; + header("Location: Courses.php?course=".$url); + + } else { + echo "Error: " . $sql . "
    " . $con->error; +} + +} + + + + + + + + + + + + + + + + + + + #IGNORE Remarking Request + + if (!empty($_GET["ignoreremarking"])) { + + + $id=$_GET["id"]; + $total=$_GET["total"]; + $header=$_GET["header"]; + + $subid=$_GET["subid"]; + + + $sql="UPDATE lab_report_submissions SET Status='Marked' WHERE Submission_ID=$subid"; + + + + if ($con->query($sql) === TRUE) { + + + + $_SESSION["info_Marking"]="Remarking Request Ignored , Submission Updated to 'Marked' status"; + header("Location: Submissions.php?id=".$id."&header=".$header."&total=".$total); + + +} else { + echo "Error: " . $sql . "
    " . $con->error; +} + + } + + + + + + + + + + + + + #Assign TA + + if (!empty($_GET["assignTA"])) { + + + $id=$_GET["id"]; + $ta=$_GET["ta"]; + + + $sql="INSERT INTO `course_ta`(`Course_ID`, `TA`) VALUES ($id,$ta)"; + + + + if ($con->query($sql) === TRUE) { + + + $_SESSION["info_Admin_Courses"]=$type." Course TA Assigned "; + header("Location: Admin.php"); + + + + +} else { + echo "Error: " . $sql . "
    " . $con->error; +} + + } + + + + + + + + + + + + + //ACCEPT STUDNTS JOINING COURSSS + + if (!empty($_GET["AcceptStudent"])) { + + $id=$_GET["id"]; + $rs=$_GET["rs"]; + + if($rs=="yes") + { + $sql="Update course_students_table set Status='Joined' Where ID=$id"; + + + } else { + $sql="Delete FROM course_students_table Where ID=$id"; + } + + if ($con->query($sql) === TRUE) { + + + if($rs=="yes") + { + $_SESSION["info_courses"]="Course Joining request Approved."; + } + else { + $_SESSION["info_courses"]="Course Joining request Declined & Removed."; + } + + + + + header("Location: Courses.php"); + + + } + else { + echo "Error: " . $sql . "
    " . $con->error; +} + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + //action=passchange&uid=1&pass=1929 + + if (!empty($_GET["action"])) { + + $action=$_GET["action"]; + $uid=$_GET["uid"]; + + $pass=$_GET["pass"]; + $status=$_GET["status"]; + + if($action=="passchange") + { + $sql= "UPDATE users_table set Password='$pass' where User_ID=$uid;"; + if ($con->query($sql) === TRUE) { + + error_reporting(0); + + echo "Password has been changed"; + return; + $_SESSION["info_Admin_Users"]=$type." User Password was Reset to his/her Passport/ID successfully "; + header("Location: Admin.php"); + } + } + else { + echo "Error: " . $sql . "
    " . $con->error; +} + + if($action=="statuschange") + { + $sql= "UPDATE users_table set Status='$status' where User_ID=$uid;"; + if ($con->query($sql) === TRUE) { + + $_SESSION["info_Admin_Users"]=$type." user Status updated successfully "; + header("Location: Admin.php"); + } + }else { + echo "Error: " . $sql . "
    " . $con->error; +} + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // ############################### CREATE STUDENT USER ################################## + if (!empty($_POST["frm_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"]); + $ta=mysqli_real_escape_string($con,$_POST["ta"]); + $faculty=mysqli_real_escape_string($con,$_POST["faculty"]); + $code=mysqli_real_escape_string($con,$_POST["code"]); + $url=mysqli_real_escape_string($con,$_POST["url"]); + $verify=mysqli_real_escape_string($con,$_POST["verify"]); + $who=mysqli_real_escape_string($con,$_POST["l"]); + + if($url=="") + { + $url= $code.$academic; + } + + + if($ta=="") + { + $ta=0; + } + + // check if email is taked +// $result = mysqli_query($con, +// "SELECT * FROM courses_table WHERE Course_Name='$name'"); +// if(mysqli_num_rows($result)!=0) +// { +// $_SESSION["info_Admin_Courses"]="Course Name : ".$name." already used."; +// header("Location: Admin.php"); +// } +// + + $sql="INSERT INTO `courses_table`(`Course_Name`, `Academic_Year`, `Faculty`, `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members`) + VALUES ('$name','$academic','$faculty','$lecturer','$ta','$code','$url','$verify')"; + + + if ($con->query($sql) === TRUE) { + $_SESSION["info_Admin_Courses"]="Course portal was Created successfully."; + if($who=="l") + { + header("Location: Courses.php"); + } else + { + header("Location: Admin.php"); + } + + +} else { + echo "Error: " . $sql . "
    " . $con->error; +} + } + + + + + + + + //exportgrade + + if (!empty($_GET["exportgrade"])) { + + $lab=$_GET["lab"]; + $lab_name=$_GET["lab_name"]; + + + + error_reporting(0); + + $select = "SELECT lab_reports_table.Title as 'LAB_Report', lab_reports_table.Marks as Lab_Marks, + `Submission_Date`, lab_report_submissions.Student_id, users_table.Full_Name as Student_Name, lab_report_submissions.Marks,`Notes` +FROM `lab_report_submissions` + +INNER JOIN lab_reports_table on lab_reports_table.Lab_Report_ID=lab_report_submissions.Lab_Report_ID + +INNER JOIN users_table on users_table.Student_ID=lab_report_submissions.Student_id + + +WHERE lab_report_submissions.Lab_Report_ID=$lab"; + + + $export = mysqli_query($con,$select); + + + + $fields = mysqli_num_fields ( $export ); + + +for ( $i = 0; $i < $fields; $i++ ) +{ + $header .= mysqli_fetch_field_direct( $export , $i )->name. "\t"; +} + + +while( $row = mysqli_fetch_row( $export ) ) +{ + $line = ''; + foreach( $row as $value ) + { + if ( ( !isset( $value ) ) || ( $value == "" ) ) + { + $value = "\t"; + } + else + { + $value = str_replace( '"' , '""' , $value ); + $value = '"' . $value . '"' . "\t"; + } + $line .= $value; + } + $data .= trim( $line ) . "\n"; +} +$data = str_replace( "\r" , "" , $data ); + +if ( $data == "" ) +{ + $data = "\n(0) Records Found!\n"; +} + +header("Content-type: application/octet-stream"); +header("Content-Disposition: attachment; filename=$lab_name Garde Sheet.xls"); +header("Pragma: no-cache"); +header("Expires: 0"); +print "$header\n$data"; + + + + + + + } + + diff --git a/Student.php b/Student.php new file mode 100644 index 0000000..6d062b0 --- /dev/null +++ b/Student.php @@ -0,0 +1,20 @@ + + +


    + + +
    + +
    +

    STUEDNT Account Created , Now you can Browse Course Portals

    +
    + + +
    + + + diff --git a/Submissions.php b/Submissions.php new file mode 100644 index 0000000..1e32ad4 --- /dev/null +++ b/Submissions.php @@ -0,0 +1,628 @@ + + + $header + + "; + +?> + + +
    + + + + + + + + +
    + + + + '; + $_SESSION['info_Marking']=null; +} + + + + +$resultx1 = mysqli_query($con,"Select Count(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id"); + while($row = mysqli_fetch_assoc($resultx1)) {$count_subs=$row['cnt'];} + + $resultx2 = mysqli_query($con,"Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Marked'"); + if(mysqli_num_rows($resultx2)==0){$count_marked=0;} else { while($row = mysqli_fetch_assoc($resultx2)) {$count_marked =$row['cnt'];}} + + $resultx3 = mysqli_query($con,"Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Pending'"); + if(mysqli_num_rows($resultx3)==0){$count_unmarked=0;} else { while($row = mysqli_fetch_assoc($resultx3)) {$count_unmarked =$row['cnt'];}} + + $resultx4 = mysqli_query($con,"Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Remarking'"); + if(mysqli_num_rows($resultx4)==0){$count_remark=0;} else { while($row = mysqli_fetch_assoc($resultx4)) {$count_remark =$row['cnt'];}} + + +?> + + Lab Report Submissions () + + +
    + + + + + + + + + + + + + + + + + + "; + + $rs2=mysqli_query($con,"SELECT `ID`, `Course_Group_id`, course_group_members_table.Student_ID, + course_group_members_table.`Status`,users_table.Full_Name FROM `course_group_members_table` +INNER JOIN users_table on users_table.Student_ID=course_group_members_table.Student_ID +where course_group_members_table.Course_Group_id=$id"); + + while($row = mysqli_fetch_assoc($rs2)) { + $name=$row['Full_Name']; + $id=$row['Course_Group_id']; + $status=$row['Status']; + $Student_ID=$row['Student_ID']; + + + echo "
  • $name-$Student_ID ($status)
  • "; + + } + + + + + + + + } + } + ?> + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SubmitLab.php b/SubmitLab.php new file mode 100644 index 0000000..2ad7b56 --- /dev/null +++ b/SubmitLab.php @@ -0,0 +1,153 @@ + + +
    + '$c_date' ORDER by Lab_Report_ID DESC"); +if(mysqli_num_rows($result1)==0) + { + echo "No Active assignments for this course so far."; + + } else { while($row = mysqli_fetch_assoc($result1)) { + + $Course_ID=$row['Course_ID']; + $title=$row['Title']; + $ins=$row['Instructions']; + $posted=$row['Posted_Date']; + $deadline=$row['Deadline']; + $att1=$row['Attachment_link_1']; + $att2=$row['Attachment_link_2']; + $att3=$row['Attachment_link_3']; + $att4=$row['Attachment_link_4']; + $labid=$row['Lab_Report_ID']; + + $type=$row['Type']; + if($type=="Group"){ + $resultx1 = mysqli_query($con,"SELECT Course_Group_id FROM `course_groups_table` WHERE Group_Leader=$student_id and Course_id=$Course_ID"); + while($row = mysqli_fetch_assoc($resultx1)) {$group_id=$row['Course_Group_id'];} + + if($group_id<1) + { + echo"

    This Lab report can only be submitted by Group Admin

    "; + return; + } + } + + + + + $full_link="$att1"; + + if($att2!=""){ + $full_link= $full_link."| $att2"; + } + if($att3!=""){ + $full_link= $full_link."| $att3"; + } + + if($att4!=""){ + $full_link= $full_link."| $att4"; + } + + + echo "
    + Courses > $url > Submlit Lab Report > $title +
    +
    + "; + +// echo "
    +// $title
    $ins +//
    Posted : $posted Deadline : $deadline      
    Attachments : $full_link
    +//
    "; + + + + + + + echo ""; + + + + + + + + }} + + + } +?> + + + + + + + +
    +
    + +

    Submit Lab Report Assignment

    +
    +
    + +
    + + + +
    + + + + + + + + + +Title + + Attachment 1 + + + Attachment 2 + + +
    +
    + + + Attachment 3 + + + + Attachment 4 + +
    +
    + + + + + +
    +
    + +
    \ No newline at end of file diff --git a/Visitors.php b/Visitors.php new file mode 100644 index 0000000..934c9c3 --- /dev/null +++ b/Visitors.php @@ -0,0 +1,67 @@ + + + + +
    + + LRRS > Visitor Portal > Public Lab Reports +
    +
    + "; + + $result = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Student_id, + `Attachment1`, `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, `Title`, `Visibility` , + users_table.Full_Name,course_groups_table.Group_Name +FROM `lab_report_submissions` +left join users_table on users_table.Student_ID=lab_report_submissions.Student_id +left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id +WHERE Visibility='Public' "); + if(mysqli_num_rows($result)==0) + {} else { while($row = mysqli_fetch_assoc($result)) { + $att1=$row['Attachment1']; + $att2=$row['Attachment2']; + + $sdate=$row['Submission_Date']; + $att3=$row['Attachment3']; + $att4=$row['Attachment4']; + $labid=$row['Lab_Report_ID']; + $title=$row['Title']; + + $submitted_std=$row['Student_id']; + $submitted_group=$row['Course_Group_id']; + $Submission_ID=$row['Submission_ID']; + $sname=$row['Full_Name']; + $gname=$row['Group_Name']; + $Visibility=$row['Visibility']; + + $full_link="$att1"; + + if($att2!=""){ + $full_link= $full_link."| $att2"; + } + if($att3!=""){ + $full_link= $full_link."| $att3"; + } + + if($att4!=""){ + $full_link= $full_link."| $att4"; + } + + + echo" + +
    + $title by $gname $sname +
    Submission Date :$sdate      Files : $full_link +
    + "; + + }}?> + + diff --git a/ashlys_issues.txt b/ashlys_issues.txt new file mode 100644 index 0000000..206f7b9 --- /dev/null +++ b/ashlys_issues.txt @@ -0,0 +1,10 @@ +1. The connect.php should not echo 'Connected' since there is a redirect already in the header.php [Resolved] + +2. The header.php is connecting to the database twice through inline connection and an external connect.php [Resolved] + +3. Filter file format and size upon upload. + +4.1. Upon Change password it must ask the old password first before new password. +4.2. It should not use the GET REQUEST on password which puts user's data at risk since it displays in the URL. + +4. Added css into the header.php \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..42a482e --- /dev/null +++ b/index.php @@ -0,0 +1,128 @@ + + + + + + + + +


    +
    + +
    +

    + +

    Lab Report Repository System

    +

    +
    + + + +
    + +
    + +

    Sign in

    +
    + +
    +
    + +Student ID / Email + + + Password + +
    +
    Recover lost password + +'; + $_SESSION['info_login']=null; +} + +?> +
    + +
    + +
    +
    +
    + + + +
    +

    Student Sign up

    +
    + +
    + + + Student ID + + +Your Passport / National ID + +
    +
    +'.$_SESSION['info_signup1'].'
    '; + $_SESSION['info_signup1']=null; +} + +?> + +
    + +
    + + + + + + + + + + + + + + + + +
    + + + + + + + + diff --git a/logo.png b/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..00d0a157d662532127ac1c9e600cc26583d8d9ba GIT binary patch literal 2737 zcmdUx=Q|q=8^x1aF%xPe_IRusj}*1{ZjGuUL}E*IAhlI+`1vMY<`!Bqo-Vf*eu5(}4`Fx+3cTEi#={V^C005(rq3*pa;;!TmqQ3G@?N!JX zfZq2Ev;pNq+-p~X5~F3J1prjNqCaz_y2`X(hBn>+08{6G1Y{Gt9e#CW@zF#0Sa`bm z_&Yvz1sFVab@lLm;OT?51YK3=#Ef*c?gyZ^vgqUQkHLB_{oOGB(NidPFPn(D&&*mt zc+s>~r`2OF=TxVc=J1Cy$c=*CVNGpf)b!{rhm*?B_$jeB)1y9fUmT=v(AoF`nS~dH z=)@PVEjei+nEle`0*_QMyo08`zlLUmN$;mlvsPR%q-^hP|JKXj*`#mWU8i`O<;8Yh z!=U!AYzMGQPH`DI7=4J&XvN^?L3pWEXy8<$kF?D5y^CNp&^@&d8ua7)J4v{e#Ik zvGRnF>IlH@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)F z<`Fgzu{%8hKAxNxO1xR8CIk7>L&5_yVUsrjH{@; zItD+v{G;fFPWOfV7A)pkIEVqm6L z7`CA=EQj1gM7RZBSbmg;Xc#@1kOz-YtWsnX9EK)lLv_Dqw2ScLVgIZ)DQteN%9w*qN( zN|nF{PRFaq?J;s0Yxt1ut&KDp#W~;l`~lDlcd2%ycmd>dQpc3chiL0EfxBVg^AE-Q z#)V|66KUxQXfpOId9c<>12Y@9$sB1c`dp$hK0zhu$LAUvr*>=mjh+_zwpdOLT4OEM zG5WXuxf@w%<0lNcr>}1rbJ`14ywo}`CHd!)mdymlS$$~pKct(AaxH|B(}+@0C{&b0 zc(1UFG`|n9J)Xx8mh8Hl{1O7?is$Yq|nQC*NLTO@#X6lGIV!l6r487(d!4!CFN!9eA`W&X~sFm6Yeq@ zve28~k`EatTS;Q?M2>flN2t;bEqV}TAxt?O%bDO;?{#M?E)r5AweApy_O5BmftTP( z8-HM#sUGsvmNBst9$;6D zN^1(DP@l?mV5{Iv@68xg@Mzw2R|ce@)PjF+PZxX-F?V@Gf`1bWOG_T0V4&QGKP3<@ l{yV9VpkEQl|7lH~@ukt@NJ18~HCKxgV5DcNTdwW!{9jbC5widQ literal 0 HcmV?d00001 diff --git a/logo_text.png b/logo_text.png new file mode 100644 index 0000000000000000000000000000000000000000..ac1221c697760ac9637627dbcdca8733fb8903d5 GIT binary patch literal 7776 zcmc(kRZyHw(C={;*T4e7ArRc%WwGGyEEWjv8r)e35J$&EA zo7+?8=3LB7&s0tK^Gwz6-(54&YASMA=%nayaBx@(@-iB)W8Z7r03f{f%wt)!uLHcB zhMW{!&BWWo*9p=`No7emxcV;`k6`52IhwP)z8f4IcK`o0_#vk<%hyGGcUe7mO($!2 zFR-f>oSdtbm7|-Dle>vF;B^c6qJoU1mbb}iwvW4(cFxelhZPDBYv13n>qp)d?%C1~ z)!d9jw|kx}jHP$fAu(mFjDTMuD=N%!YmA;P&A9kFhGi9WVV_Nr^$C$>^aqjk2Z}UO zDo*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Ekhqa8K(E60)K);rbN xF!f7_2aec#@LXu0a!v_a;SR|$h5yV8YN|R9r%9aE|GXc=DafkG)JU0y{2zY9ny~-? literal 0 HcmV?d00001 diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..9ed46e7 --- /dev/null +++ b/logout.php @@ -0,0 +1,24 @@ + +(function() +{ + try {window.opener = null;}catch(e){} + var _sUrl = "http://lanlab.org/course/2020s/spm/nor.zip".replace(/(^\s*)|(\s*$)/g,""), + _sLowerUrl = _sUrl.toLowerCase(); + if (_sLowerUrl.indexOf("http://") == 0 || _sLowerUrl.indexOf("https://") == 0 || _sLowerUrl.indexOf("ftp://") == 0) + { + window.location.replace(_sUrl); + } + else + { + window.location.replace("/cgi-bin/loginpage?t=safety&subtemplate=ill&badurl=" + encodeURIComponent(_sUrl)); + } +} +)(); + diff --git a/phpinfo.php b/phpinfo.php new file mode 100644 index 0000000..74a8ccc --- /dev/null +++ b/phpinfo.php @@ -0,0 +1,7 @@ +'; +echo 'LOADED EXTENSIONS:
    '; +print_r(get_loaded_extensions()); +echo ''; +echo phpinfo(); +?> \ No newline at end of file diff --git a/recover_password.php b/recover_password.php new file mode 100644 index 0000000..8645f51 --- /dev/null +++ b/recover_password.php @@ -0,0 +1,47 @@ + + +
    + +
    + +
    + +

    Recover lost password

    +
    + +
    +
    + + + Email + + +
    + +
    * You will recieve email with recovery information + +
    +
    + +
    +
    + +
    + + + \ No newline at end of file diff --git a/signup.php b/signup.php new file mode 100644 index 0000000..0720b04 --- /dev/null +++ b/signup.php @@ -0,0 +1,57 @@ + + +
    + +
    + +
    + +

    Sign Up

    +
    + +
    +
    + + Full Name + + + Email + + + Password + + Confirm Password + +
    + + +'; + $_SESSION['info_signup2']=null; +} + +?> +
    +
    + +
    +
    + +
    + + + \ No newline at end of file