[Refactoring] Particularly make the SQL statement that shows new assigmments in Coruse.php less messy.
parent
25a1431ba8
commit
ada55d3394
|
@ -1,3 +1,8 @@
|
|||
<?php
|
||||
include 'NoDirectPhpAcess.php';
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
$page="admin";
|
||||
include 'Header.php';
|
||||
|
@ -32,7 +37,7 @@ if ($_SESSION['user_type'] != "Lecturer") {
|
|||
<hr>
|
||||
-->
|
||||
<div class="col-md-6">
|
||||
<h4> User account Management </h4><hr>
|
||||
<h4> User Account Management </h4><hr>
|
||||
|
||||
<b>Lecturer / TA Accounts </b><br>
|
||||
|
||||
|
|
394
Course.php
394
Course.php
|
@ -1,56 +1,72 @@
|
|||
<?php
|
||||
include 'NoDirectPhpAcess.php';
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
$page='Courses+';
|
||||
include 'Header.php';
|
||||
$student_id=$_SESSION["user_student_id"];
|
||||
$group_id=$_SESSION["user_group_id"];
|
||||
$c_date= date("Y-m-d H:i");
|
||||
$student_id = $_SESSION["user_student_id"];
|
||||
$group_id = $_SESSION["user_group_id"];
|
||||
$c_date = date("Y-m-d H:i");
|
||||
|
||||
if(!empty($_GET["url"]))
|
||||
{
|
||||
$course_url=$_GET["url"];
|
||||
|
||||
if(!empty($_GET["url"]))
|
||||
{
|
||||
$course_url = $_GET["url"];
|
||||
$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 URL='$course_url' ");
|
||||
|
||||
if(mysqli_num_rows($result)==0)
|
||||
{echo "should not be here";} else {
|
||||
if(mysqli_num_rows($result)==0) {
|
||||
|
||||
echo "No course matching the given course URL: ".$course_url;
|
||||
|
||||
} 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'];
|
||||
$course_id=$row['Course_ID'];
|
||||
$id2=$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'];
|
||||
$course_id = $row['Course_ID'];
|
||||
// also get teaching assistant names(if any)
|
||||
$ta_result = mysqli_query($con, "SELECT Full_Name FROM users_table where User_ID in (select TA from course_ta where Course_ID='$course_id');");
|
||||
if (mysqli_num_rows($ta_result) == 0) {
|
||||
echo " <div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='~\..\Courses.php?course=$url'>
|
||||
Courses > $name ($code) > Lab Reports
|
||||
<br> <span style='font-size:8pt'>Faculty: $faculty | Year: $academic | Lecturer: $lecturer </span>
|
||||
|
||||
|
||||
</a></div>
|
||||
";
|
||||
|
||||
}}
|
||||
Courses > $name ($code) > Lab Reports <br> <span style='font-size:8pt'>Faculty: $faculty | Year: $academic | Lecturer: $lecturer </span>
|
||||
</a></div> ";
|
||||
} else {
|
||||
$ta_name = "";
|
||||
while ($row = mysqli_fetch_assoc($ta_result)) {
|
||||
$ta_name = $ta_name.$row['Full_Name']." ";
|
||||
}
|
||||
$ta_name = trim ($ta_name);
|
||||
echo " <div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='~\..\Courses.php?course=$url'>
|
||||
Courses > $name ($code) > Lab Reports <br> <span style='font-size:8pt'>Faculty: $faculty | Year: $academic | Lecturer: $lecturer | Teaching Assistant: $ta_name </span>
|
||||
</a></div> ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="row" style='margin-left:20px;float:left'>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
if (isset($_SESSION['info_ReMarking'])) {
|
||||
if (isset($_SESSION['info_ReMarking'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert" style="float:left;">' . $_SESSION['info_ReMarking'] . '</div>';
|
||||
$_SESSION['info_ReMarking']=null;
|
||||
}
|
||||
|
||||
if (isset($_SESSION['info_courses'])) {
|
||||
if (isset($_SESSION['info_courses'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert" style="float:left;">' . $_SESSION['info_courses'] . '</div>';
|
||||
$_SESSION['info_courses']=null;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -58,77 +74,74 @@ include 'Header.php';
|
|||
|
||||
<?php
|
||||
|
||||
if( $_SESSION['user_type']=="Student")
|
||||
{
|
||||
if( $_SESSION['user_type'] == "Student")
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
<hr>
|
||||
|
||||
<div class="row" style="width:95%;margin:auto; text-align:left;">
|
||||
<div class="row" style="width:95%;margin:auto; text-align:left;">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="col-md-9">
|
||||
|
||||
<!-- Nav tabs -->
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#menu1">New Lab Reports</a>
|
||||
<a class="nav-link active" data-toggle="tab" href="#menu1">New</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#menu2">Missed Lab Reports </a>
|
||||
<a class="nav-link" data-toggle="tab" href="#menu2">Missed</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#menu3">Submitted Lab Reports</a>
|
||||
<a class="nav-link" data-toggle="tab" href="#menu3">Submitted</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#menu4">Marked Submissions</a>
|
||||
<a class="nav-link" data-toggle="tab" href="#menu4">Marked</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div id="menu1" class="container tab-pane active"><br>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
// Get groups of this students
|
||||
$sql="SELECT course_group_members_table.Course_Group_id
|
||||
FROM course_group_members_table inner join
|
||||
course_groups_table on course_group_members_table.Course_Group_id = course_groups_table.Course_Group_id
|
||||
WHERE course_group_members_table.Student_ID=$student_id and course_groups_table.Course_id=$course_id";
|
||||
$sql="SELECT course_group_members_table.Course_Group_id FROM course_group_members_table INNER JOIN course_groups_table ON course_group_members_table.Course_Group_id = course_groups_table.Course_Group_id WHERE course_group_members_table.Student_ID=$student_id and course_groups_table.Course_id=$course_id";
|
||||
|
||||
|
||||
$resultx1 = mysqli_query($con,$sql);
|
||||
|
||||
while($row = mysqli_fetch_assoc($resultx1)) {$_SESSION['group_id']=$row['Course_Group_id'];}
|
||||
|
||||
$group_id=$_SESSION['group_id'];
|
||||
|
||||
if($group_id==""){$group_id=-1;}
|
||||
|
||||
$var="SELECT Type,Lab_Report_ID,Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, lab_reports_table.Title, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4`
|
||||
FROM `lab_reports_table` WHERE Course_ID=$course_id "
|
||||
. ""
|
||||
. "and (Deadline > '$c_date' or Lab_Report_ID in (SELECT `Lab_Report_ID` FROM `extended_deadlines_table`"
|
||||
. " WHERE Lab_Report_ID in (select Lab_Report_ID from lab_reports_table where Course_ID=$course_id) and Student_ID=$student_id and Extended_Deadline_Date > '$c_date') ) "
|
||||
. ""
|
||||
. ""
|
||||
. ""
|
||||
. ""
|
||||
. "and Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions"
|
||||
. " where (Student_id=$student_id or Course_Group_id=$group_id) and Course_ID=$course_id)"
|
||||
. ""
|
||||
. " ORDER by Lab_Report_ID DESC";
|
||||
|
||||
$result1 = mysqli_query($con,$var);
|
||||
|
||||
if(mysqli_num_rows($result1)==0)
|
||||
$resultx1 = mysqli_query($con, $sql);
|
||||
while($row = mysqli_fetch_assoc($resultx1))
|
||||
{
|
||||
echo "No Active assignments for this course so far.";
|
||||
} else { while($row = mysqli_fetch_assoc($result1)) {
|
||||
$_SESSION['group_id'] = $row['Course_Group_id'];
|
||||
}
|
||||
|
||||
$group_id = $_SESSION['group_id'];
|
||||
|
||||
if($group_id == "")
|
||||
{
|
||||
$group_id = 0; // no group. If the student has a group, the group number should be greater than 0.
|
||||
}
|
||||
|
||||
// Show the assignment iff the following conditions are met: (1)
|
||||
// Before the deadline (2) Before the students' extended deadline (if any)
|
||||
// (3) none of the student's group members have already submitted
|
||||
// the assignment.
|
||||
|
||||
$var = "SELECT Type, Lab_Report_ID, Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, lab_reports_table.Title, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4`".
|
||||
" FROM `lab_reports_table`".
|
||||
" WHERE Course_ID=$course_id".
|
||||
" AND (Deadline > '$c_date' OR Lab_Report_ID IN (SELECT `Lab_Report_ID` FROM `extended_deadlines_table` WHERE Student_ID=$student_id AND Extended_Deadline_Date > '$c_date' AND Lab_Report_ID IN (SELECT Lab_Report_ID FROM lab_reports_table WHERE Course_ID=$course_id)))".
|
||||
" AND Lab_Report_ID NOT IN (SELECT Lab_Report_ID FROM lab_report_submissions WHERE Course_Group_id IN (SELECT Course_Group_id FROM course_group_members_table WHERE Student_ID=$student_id))".
|
||||
" ORDER BY Lab_Report_ID DESC";
|
||||
|
||||
$result1 = mysqli_query($con, $var);
|
||||
|
||||
if(mysqli_num_rows($result1)==0)
|
||||
{
|
||||
echo "No active assignments for this course so far.";
|
||||
} else {
|
||||
|
||||
while($row = mysqli_fetch_assoc($result1)) {
|
||||
$title=$row['Title'];
|
||||
$type=$row['Type'];
|
||||
$Marks=$row['Marks'];
|
||||
|
@ -141,7 +154,7 @@ if(mysqli_num_rows($result1)==0)
|
|||
$att4=$row['Attachment_link_4'];
|
||||
$labid=$row['Lab_Report_ID'];
|
||||
|
||||
$full_link="<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";
|
||||
$full_link = "<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";
|
||||
|
||||
if($att2!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att2'>$att2</a>";
|
||||
|
@ -164,8 +177,11 @@ if(mysqli_num_rows($result1)==0)
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="menu2" class="container tab-pane"><br>
|
||||
<?php
|
||||
<?php
|
||||
$group_id=$_SESSION['group_id'];
|
||||
$result = mysqli_query($con,"SELECT Lab_Report_ID,Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, lab_reports_table.Title, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4`
|
||||
FROM `lab_reports_table`
|
||||
|
@ -188,11 +204,12 @@ Lab_Report_ID not in
|
|||
|
||||
|
||||
|
||||
if(mysqli_num_rows($result)==0)
|
||||
if(mysqli_num_rows($result)==0)
|
||||
{
|
||||
echo "You Missed no Lab reports in this course";
|
||||
echo "You missed no lab reports in this course.";
|
||||
|
||||
} else { while($row = mysqli_fetch_assoc($result)) {
|
||||
} else {
|
||||
while($row = mysqli_fetch_assoc($result)) {
|
||||
$title=$row['Title'];
|
||||
$marks=$row['Marks'];
|
||||
$ins=$row['Instructions'];
|
||||
|
@ -233,23 +250,27 @@ if(mysqli_num_rows($result)==0)
|
|||
|
||||
</div>
|
||||
<div id="menu3" class="container tab-pane"><br>
|
||||
<?php
|
||||
<?php
|
||||
|
||||
|
||||
$group_id = $_SESSION['group_id'];
|
||||
if($group_id==""){$group_id=-1;} // This fixes "Submitted report not shown" http://118.25.96.118/bugzilla/show_bug.cgi?id=176
|
||||
$group_id = $_SESSION['group_id'];
|
||||
if($group_id==""){$group_id=-1;} // This fixes "Submitted report not shown" http://118.25.96.118/bugzilla/show_bug.cgi?id=176
|
||||
|
||||
|
||||
$resultx = mysqli_query($con,"SELECT Lab_Report_ID,Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, lab_reports_table.Title, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4`
|
||||
$sql_stmt = "SELECT Lab_Report_ID, Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, lab_reports_table.Title, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4`
|
||||
FROM `lab_reports_table`
|
||||
WHERE Lab_Report_ID in (select Lab_Report_ID from lab_report_submissions"
|
||||
. " where Status='Pending' and (Student_id=$student_id or Course_Group_id=$group_id) and Course_ID=$course_id) ORDER by Lab_Report_ID DESC";
|
||||
|
||||
where Lab_Report_ID in (select Lab_Report_ID from lab_report_submissions"
|
||||
. " where Status='Pending' and (Student_id=$student_id or Course_Group_id=$group_id) and Course_ID=$course_id) ORDER by Lab_Report_ID DESC");
|
||||
if(mysqli_num_rows($resultx)==0)
|
||||
$resultx = mysqli_query($con, $sql_stmt);
|
||||
|
||||
|
||||
if(mysqli_num_rows($resultx)==0)
|
||||
{
|
||||
echo "You have no lab report submissions in this course.";
|
||||
|
||||
} else { while($row = mysqli_fetch_assoc($resultx)) {
|
||||
} else {
|
||||
while($row = mysqli_fetch_assoc($resultx)) {
|
||||
$lab_repo_id=$row['Lab_Report_ID'];
|
||||
$title=$row['Title'];
|
||||
$marks=$row['Marks'];
|
||||
|
@ -260,17 +281,13 @@ if(mysqli_num_rows($resultx)==0)
|
|||
$att2=$row['Attachment_link_2'];
|
||||
$att3=$row['Attachment_link_3'];
|
||||
$att4=$row['Attachment_link_4'];
|
||||
$id=$row['Lab_Report_ID'];
|
||||
|
||||
$id = $row['Lab_Report_ID'];
|
||||
if( $c_date < $deadline)
|
||||
{
|
||||
$submittedx="<a href='~\..\SubmitLab.php?id=$id' class='btn-sm btn-default'><i class='fa fa-check-circle'></i> Re-Submit </a>";
|
||||
}
|
||||
else {
|
||||
|
||||
$submittedx="<a href='~\..\SubmitLab.php?id=$id&url=$url' class='btn-sm btn-default'><i class='fa fa-check-circle'></i> Re-Submit </a>";
|
||||
}
|
||||
|
||||
$full_link="<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";
|
||||
$full_link = "<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";
|
||||
|
||||
if($att2!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att2'>$att2</a>";
|
||||
|
@ -282,15 +299,14 @@ if(mysqli_num_rows($resultx)==0)
|
|||
if($att4!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att4'>$att4</a>";
|
||||
}
|
||||
;
|
||||
|
||||
echo " <k href='#'> <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
|
||||
$title <br> <span style='font-size:8pt'> $ins</span>
|
||||
<br> <span style='font-size:8pt'>Posted : $posted Deadline : $deadline ($marks Marks) $submittedx <span class='btn-sm btn-success' style='margin-left:50px;'><i class='fa fa-Edit-circle'></i> Submitted </span><br> Assignment Attachments : $full_link
|
||||
<br> Submission Files :";
|
||||
<br> <span style='font-size:8pt'>Posted : $posted Deadline : $deadline ($marks Marks) $submittedx <span class='btn-sm btn-success' style='margin-left:50px;'><i class='fa fa-Edit-circle'></i> Submitted </span>
|
||||
<br> Submitted files: ";
|
||||
|
||||
|
||||
$Sub_result = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
|
||||
$Sub_result = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
|
||||
lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`,
|
||||
`Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,
|
||||
`Title`,users_table.Full_Name,course_group_members_table.Student_ID
|
||||
|
@ -298,29 +314,34 @@ FROM `lab_report_submissions`
|
|||
Left JOIN users_table on users_table.Student_ID=lab_report_submissions.Student_id
|
||||
left JOIN course_group_members_table on course_group_members_table.Course_Group_id=lab_report_submissions.Course_Group_id
|
||||
where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$student_id')");
|
||||
// or lab_report_submissions.Course_Group_id='$group_id'
|
||||
|
||||
if(mysqli_num_rows($Sub_result)==0)
|
||||
if(mysqli_num_rows($Sub_result) == 0)
|
||||
{
|
||||
echo "No Attachments found.";
|
||||
|
||||
} else { while($row = mysqli_fetch_assoc($Sub_result)) {
|
||||
} else {
|
||||
while($row = mysqli_fetch_assoc($Sub_result)) {
|
||||
$at1=$row['Attachment1'];
|
||||
$at2=$row['Attachment2'];
|
||||
$at3=$row['Attachment3'];
|
||||
$at4=$row['Attachment4'];
|
||||
|
||||
$full_link="<a href='~\..\Lab_Report_Submisions\\$at1'>$at1</a>";
|
||||
$base_at1 = basename($at1);
|
||||
$base_at2 = basename($at2);
|
||||
$base_at3 = basename($at3);
|
||||
$base_at4 = basename($at4);
|
||||
|
||||
$full_link = "<a href='~\..\Download.php?file=$at1&attachment=1'>$base_at1</a>"; // prevent students from directly accessing their classmates' submissions
|
||||
|
||||
if($at2!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$at2'>$at2</a>";
|
||||
$full_link= $full_link." | <a href='~\..\Download.php?file=$at2&attachment=2'>$base_at2</a>";
|
||||
}
|
||||
if($at3!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$at3'>$at3</a>";
|
||||
$full_link= $full_link." | <a href='~\..\Download.php?file=$at3&attachment=3'>$base_at3</a>";
|
||||
}
|
||||
|
||||
if($at4!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$at4'>$at4</a>";
|
||||
$full_link= $full_link." | <a href='~\..\Download.php?file=$at4&attachment=4'>$base_at4</a>";
|
||||
}
|
||||
|
||||
echo $full_link;
|
||||
|
@ -346,22 +367,22 @@ if(mysqli_num_rows($Sub_result)==0)
|
|||
|
||||
|
||||
|
||||
<?php
|
||||
$sqli=mysqli_query($con, "SELECT * from course_groups_table WHERE Course_Group_id=$group_id and Course_id=$course_id");
|
||||
while($row = mysqli_fetch_assoc($sqli))
|
||||
{ $Group_Leader=$row['Group_Leader'];
|
||||
<?php
|
||||
$sqli=mysqli_query($con, "SELECT * from course_groups_table WHERE Course_Group_id=$group_id and Course_id=$course_id");
|
||||
while($row = mysqli_fetch_assoc($sqli))
|
||||
{ $Group_Leader=$row['Group_Leader'];
|
||||
$Group_Member=$row['Group_Member'];
|
||||
$Group_Member2=$row['Group_Member2'];
|
||||
$Group_Member3=$row['Group_Member3'];
|
||||
$Group_Member4=$row['Group_Member4'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div id="menu4" class="container tab-pane"><br>
|
||||
<?php
|
||||
$resultx = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_reports_table.`Lab_Report_ID`, `Student_id`, "
|
||||
<?php
|
||||
$resultx = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_reports_table.`Lab_Report_ID`, `Student_id`, "
|
||||
. "`Course_Group_id`, `Notes`, lab_report_submissions.`Marks`,
|
||||
lab_report_submissions.Remarking_Reason,
|
||||
`Status`, lab_reports_table.Title Lab_Title,lab_reports_table.Marks Original_marks FROM `lab_report_submissions` "
|
||||
|
@ -382,9 +403,9 @@ $resultx = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_re
|
|||
|
||||
|
||||
|
||||
if(mysqli_num_rows($resultx)==0)
|
||||
if(mysqli_num_rows($resultx)==0)
|
||||
{
|
||||
echo "You have No Marked submissions in this course";
|
||||
echo "You have no marked submissions in this course";
|
||||
|
||||
} else { while($row = mysqli_fetch_assoc($resultx)) {
|
||||
$title=$row['Lab_Title'];
|
||||
|
@ -469,64 +490,14 @@ if(mysqli_num_rows($resultx)==0)
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3">
|
||||
<h3>Class Groups</h3>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
$resultx1 = mysqli_query($con,"SELECT `Course_Group_id` FROM `course_groups_table` WHERE Course_id=$course_id");
|
||||
while($row = mysqli_fetch_assoc($resultx1)) {$count_groups=$row['Course_Group_id'];}
|
||||
|
||||
|
@ -538,14 +509,14 @@ if(mysqli_num_rows($resultx)==0)
|
|||
|
||||
|
||||
<hr>
|
||||
<?php
|
||||
<?php
|
||||
|
||||
$result = mysqli_query($con," SELECT `ID`, course_group_members_table.Course_Group_id, `Student_ID`,
|
||||
`Status`,course_groups_table.Group_Name,course_groups_table.Course_id
|
||||
FROM `course_group_members_table` INNER JOIN course_groups_table on
|
||||
course_groups_table.Course_Group_id=course_group_members_table.Course_Group_id WHERE Student_id=$student_id and course_groups_table.Course_id=$course_id");
|
||||
|
||||
if(mysqli_num_rows($result)==0)
|
||||
if(mysqli_num_rows($result)==0)
|
||||
{
|
||||
echo "You have no Group in this Course";
|
||||
} else { while($row = mysqli_fetch_assoc($result)) {
|
||||
|
@ -594,64 +565,17 @@ where course_group_members_table.Course_Group_id=$id");
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
include 'Footer.php';
|
||||
?>
|
||||
}
|
||||
include 'Footer.php';
|
||||
?>
|
||||
|
||||
|
||||
<script src="./css/jquery-1.11.1.min.js"></script>
|
||||
|
@ -659,7 +583,8 @@ where course_group_members_table.Course_Group_id=$id");
|
|||
<link rel="stylesheet" href="./css/jquery-ui.css" />
|
||||
|
||||
<script>
|
||||
function CreateGroup() {
|
||||
|
||||
function CreateGroup() {
|
||||
|
||||
|
||||
try
|
||||
|
@ -685,13 +610,13 @@ where course_group_members_table.Course_Group_id=$id");
|
|||
}
|
||||
});
|
||||
|
||||
}catch(e){ alert(e); }
|
||||
} catch(e){ alert(e); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function invite(id) {
|
||||
function invite(id) {
|
||||
|
||||
|
||||
try
|
||||
|
@ -717,7 +642,7 @@ where course_group_members_table.Course_Group_id=$id");
|
|||
}
|
||||
});
|
||||
|
||||
}catch(e){ alert(e); }
|
||||
} catch(e){ alert(e); }
|
||||
}
|
||||
|
||||
|
||||
|
@ -727,8 +652,7 @@ where course_group_members_table.Course_Group_id=$id");
|
|||
|
||||
|
||||
|
||||
function accept(id,val) {
|
||||
|
||||
function accept(id,val) {
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -755,7 +679,7 @@ where course_group_members_table.Course_Group_id=$id");
|
|||
}
|
||||
});
|
||||
|
||||
}catch(e){ alert(e); }
|
||||
} catch(e){ alert(e); }
|
||||
}
|
||||
|
||||
|
||||
|
@ -763,10 +687,10 @@ where course_group_members_table.Course_Group_id=$id");
|
|||
function remarking(data)
|
||||
{
|
||||
|
||||
var details=prompt("Please enter Remarking Reason","");
|
||||
var details = prompt("Please enter your remarking reasons","");
|
||||
|
||||
window.location.href=data+"&details="+details;
|
||||
window.location.href = data+"&details="+details;
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
|
384
Courses.php
384
Courses.php
|
@ -1,38 +1,34 @@
|
|||
<?php
|
||||
include 'NoDirectPhpAcess.php';
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
$page='Courses';
|
||||
include 'Header.php';
|
||||
|
||||
$user_d=$_SESSION['user_id'];
|
||||
$user_d = $_SESSION['user_id'];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA")
|
||||
{
|
||||
if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA")
|
||||
{
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- FOR LECTURER-->
|
||||
<!-- FOR LECTURER-->
|
||||
|
||||
|
||||
<div class="row" style="width:80%;margin:auto; text-align:left;">
|
||||
<div class="row" style="width:80%;margin:auto; text-align:left;">
|
||||
|
||||
|
||||
<script src="./css/jquery-1.11.1.min.js"></script>
|
||||
<script src="./css/jquery-ui.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/jquery-ui.css" />
|
||||
<script src="./css/jquery-1.11.1.min.js"></script>
|
||||
<script src="./css/jquery-ui.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/jquery-ui.css" />
|
||||
|
||||
|
||||
<script>
|
||||
<script>
|
||||
|
||||
|
||||
function extend_deadline(id) {
|
||||
|
@ -66,15 +62,15 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
|
|||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}catch(e){ alert(e); }
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<?php
|
||||
<?php
|
||||
if(!empty($_GET["course"]))
|
||||
{
|
||||
$course_url=$_GET["course"];
|
||||
|
@ -105,7 +101,7 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
|
|||
echo "<div class='col-md-5'>";
|
||||
}
|
||||
|
||||
// ------------------------------Editing Lab Assignment by Lecturer ------------------------------------
|
||||
// ------------------------------Editing Lab Assignment by Lecturer ------------------------------------
|
||||
|
||||
|
||||
if($_GET['act']=="edit"){
|
||||
|
@ -157,51 +153,51 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
|
|||
<input type='hidden' name='course_id' value='<?php echo "$id" ?>' required=''/>
|
||||
<input type='hidden' name='url' value='<?php echo ".$course_url." ?>' required=''/>
|
||||
|
||||
Dealine Date/Time
|
||||
<div class='row'>
|
||||
<div class='col-md-7'><input type='date' id='date' name='deadlinedate' placeholder='' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Date : ""; ?>"> </div>
|
||||
<div class='col-md-5'> <input type='text' id='time' class='form-control' name='deadlinetime' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Time : ""; ?>"> </div>
|
||||
</div>
|
||||
Dealine Date/Time
|
||||
<div class='row'>
|
||||
<div class='col-md-7'><input type='date' id='date' name='deadlinedate' placeholder='' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Date : ""; ?>"> </div>
|
||||
<div class='col-md-5'> <input type='text' id='time' class='form-control' name='deadlinetime' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Time : ""; ?>"> </div>
|
||||
</div>
|
||||
|
||||
Title
|
||||
<input type='text' name='title' placeholder='Ttle' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Title : ""; ?>">
|
||||
Instructions
|
||||
<textarea name='instructions' placeholder='Assignment Instructions' class='form-control' required='' ><?php echo isset($_GET['act']) && $_GET['act']=='edit' ? $Instructions : ''; ?></textarea>
|
||||
Marks
|
||||
<input type='text' name='marks' placeholder='Marks' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Marks : ""; ?>">
|
||||
Attachment 1
|
||||
<input type='file' name='attachment1' placeholder='Attachment 1' class='form-control'>
|
||||
Title
|
||||
<input type='text' name='title' placeholder='Ttle' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Title : ""; ?>">
|
||||
Instructions
|
||||
<textarea name='instructions' placeholder='Assignment Instructions' class='form-control' required='' ><?php echo isset($_GET['act']) && $_GET['act']=='edit' ? $Instructions : ''; ?></textarea>
|
||||
Marks
|
||||
<input type='text' name='marks' placeholder='Marks' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Marks : ""; ?>">
|
||||
Attachment 1
|
||||
<input type='file' name='attachment1' placeholder='Attachment 1' class='form-control'>
|
||||
|
||||
Attachment 2
|
||||
<input type='file' name='attachment2' placeholder='Attachment 1' class='form-control'>
|
||||
Attachment 2
|
||||
<input type='file' name='attachment2' placeholder='Attachment 1' class='form-control'>
|
||||
|
||||
Attachment 3
|
||||
<input type='file' name='attachment3' placeholder='Attachment 1' class='form-control' >
|
||||
Attachment 3
|
||||
<input type='file' name='attachment3' placeholder='Attachment 1' class='form-control' >
|
||||
|
||||
|
||||
Attachment 4
|
||||
<input type='file' name='attachment4' placeholder='Attachment 4' class='form-control' >
|
||||
<br>
|
||||
Attachment 4
|
||||
<input type='file' name='attachment4' placeholder='Attachment 4' class='form-control' >
|
||||
<br>
|
||||
|
||||
<?php
|
||||
if ($Type == "Individual") {
|
||||
if ($Type == "Individual") {
|
||||
echo "Submission Type <input type='radio' name='type' value='Individual' checked /> Invidual <input type='radio' name='type' value='Group' /> Group";
|
||||
} else {
|
||||
} else {
|
||||
echo "Submission Type <input type='radio' name='type' value='Individual' /> Invidual <input type='radio' name='type' value='Group' checked> Group";
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<hr>
|
||||
<input type='submit' class='btn btn-primary' value='Post Lab Assignment'><br>
|
||||
</form><br><br><br><br>
|
||||
<hr>
|
||||
<input type='submit' class='btn btn-primary' value='Post Lab Assignment'><br>
|
||||
</form><br><br><br><br>
|
||||
<?php
|
||||
}}else{
|
||||
|
||||
// ------------------------------Posting New Lab Assignment------------------------------------
|
||||
// ------------------------------Posting New Lab Assignment------------------------------------
|
||||
|
||||
// Mysql to split 1 string into 2 similar to the tsrstr in php
|
||||
// SELECT SUBSTRING_INDEX(Deadline, ' ', 1) as Date, SUBSTRING_INDEX(Deadline, ' ', -1) as Time from lab_reports_table
|
||||
// Mysql to split 1 string into 2 similar to the tsrstr in php
|
||||
// SELECT SUBSTRING_INDEX(Deadline, ' ', 1) as Date, SUBSTRING_INDEX(Deadline, ' ', -1) as Time from lab_reports_table
|
||||
|
||||
if( $_SESSION['user_type']=="Lecturer"){
|
||||
|
||||
|
@ -210,7 +206,7 @@ if ($Type == "Individual") {
|
|||
<h3> Post new Lab Assignment </a></h3>
|
||||
|
||||
<form method='post' enctype='multipart/form-data' action='Script.php'>
|
||||
<?php
|
||||
<?php
|
||||
$_SESSION['url']=$url;
|
||||
?>
|
||||
<input type='hidden' name='frm_uploadlab' value='true' required=''/>
|
||||
|
@ -220,37 +216,37 @@ if ($Type == "Individual") {
|
|||
Dealine Date/Time
|
||||
<div class='row'>
|
||||
<div class='col-md-7'><input type='date' id='date' name='deadlinedate' placeholder='' class='form-control' required='' value=""> </div>
|
||||
<div class='col-md-5'> <input type='time' class='form-control' name='deadlinetime' value=""> </div>
|
||||
</div>
|
||||
<div class='col-md-5'> <input type='time' class='form-control' name='deadlinetime' value=""> </div>
|
||||
</div>
|
||||
|
||||
Title
|
||||
<input type='text' name='title' placeholder='Ttle' class='form-control' required='' value="">
|
||||
Title
|
||||
<input type='text' name='title' placeholder='Ttle' class='form-control' required='' value="">
|
||||
Instructions
|
||||
<textarea name='instructions' placeholder='Assignment Instructions' class='form-control' required='' value=""></textarea>
|
||||
Marks
|
||||
<input type='text' name='marks' placeholder='Marks' class='form-control' required='' value="">
|
||||
<textarea name='instructions' placeholder='Assignment Instructions' class='form-control' required='' value=""></textarea>
|
||||
Marks
|
||||
<input type='text' name='marks' placeholder='Marks' class='form-control' required='' value="">
|
||||
Attachment 1
|
||||
<input type='file' name='attachment1' placeholder='Attachment 1' class='form-control'>
|
||||
<input type='file' name='attachment1' placeholder='Attachment 1' class='form-control'>
|
||||
|
||||
Attachment 2
|
||||
<input type='file' name='attachment2' placeholder='Attachment 1' class='form-control'>
|
||||
<input type='file' name='attachment2' placeholder='Attachment 1' class='form-control'>
|
||||
|
||||
Attachment 3
|
||||
<input type='file' name='attachment3' placeholder='Attachment 1' class='form-control' >
|
||||
<input type='file' name='attachment3' placeholder='Attachment 1' class='form-control' >
|
||||
|
||||
|
||||
Attachment 4
|
||||
<input type='file' name='attachment4' placeholder='Attachment 4' class='form-control' >
|
||||
<br>
|
||||
Submission Type <input type='radio' name='type' value='Individual' required=''> Invidual
|
||||
<input type='file' name='attachment4' placeholder='Attachment 4' class='form-control' >
|
||||
<br>
|
||||
Submission Type <input type='radio' name='type' value='Individual' required=''> Invidual
|
||||
|
||||
<input type='radio' name='type' value='Group' required=''> Group
|
||||
<hr>
|
||||
<input type='radio' name='type' value='Group' required=''> Group
|
||||
<hr>
|
||||
<input type='submit' class='btn btn-primary' value='Post Lab Assignment'><br>
|
||||
</form><br><br><br><br>
|
||||
<?php
|
||||
</form><br><br><br><br>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
echo "</div>";
|
||||
|
@ -262,14 +258,14 @@ Submission Type <input type='radio' name='type' value='Individual' required=''>
|
|||
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_Updated'] . '</div>';
|
||||
$_SESSION['info_Updated'] = null;
|
||||
}
|
||||
if (isset($_SESSION['info_courses'])) {
|
||||
if (isset($_SESSION['info_courses'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_courses'] . '</div>';
|
||||
$_SESSION['info_courses'] = null;
|
||||
}
|
||||
if (isset($_SESSION['info_courses'])) {
|
||||
}
|
||||
if (isset($_SESSION['info_courses'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_courses'] . '</div>';
|
||||
$_SESSION['info_courses']=null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -280,7 +276,7 @@ if (isset($_SESSION['info_courses'])) {
|
|||
|
||||
if( $_SESSION['user_type']=="TA")
|
||||
{
|
||||
echo "<b style='color:orange'>* Only Lecturers can Post new Lab report Assignments </b><br>";
|
||||
echo "<b style='color:gray'>*Only Lecturer can post a new lab report assignment</b><br>";
|
||||
}
|
||||
if(mysqli_num_rows($result)==0)
|
||||
{
|
||||
|
@ -372,49 +368,9 @@ WHERE Course_ID=$course_id");
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-8">
|
||||
|
||||
<?php
|
||||
<?php
|
||||
$user_name=$_SESSION['user_fullname'];
|
||||
|
||||
echo " <div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='~\..\Courses.php?course=$url'>
|
||||
|
@ -476,7 +432,7 @@ where course_ta.Course_ID=$id");
|
|||
|
||||
|
||||
<?php
|
||||
$lecturer_id= $_SESSION['user_id'];
|
||||
$lecturer_id= $_SESSION['user_id'];
|
||||
$result = mysqli_query($con,"SELECT course_students_table.ID,users_table.Full_Name, 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 course_students_table on course_students_table.Course_ID=courses_table.Course_ID
|
||||
INNER JOIN users_table on users_table.Student_ID=course_students_table.Student_ID
|
||||
|
@ -511,7 +467,7 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'"
|
|||
|
||||
|
||||
|
||||
<?php
|
||||
<?php
|
||||
if( $_SESSION['user_type']=="TA")
|
||||
{
|
||||
echo "<center>Only Lecturers can Post new Lab report Assignments</center>";
|
||||
|
@ -520,171 +476,83 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'"
|
|||
|
||||
<b>Create new Course Portal </b>
|
||||
|
||||
<form method="post" action="Script.php">
|
||||
<form method="post" action="Script.php">
|
||||
<input type="hidden" name="frm_createCourse" value="true" required=""/>
|
||||
<input type="hidden" name="l" value="l" required=""/>
|
||||
Course Name
|
||||
<input type="text" name="name" placeholder="Course Name" class="form-control" required="">
|
||||
<input type="text" name="name" placeholder="Course Name" class="form-control" required="">
|
||||
|
||||
Course Code
|
||||
<input type="text" name="code" placeholder="Course Code" class="form-control" required="">
|
||||
<input type="text" name="code" placeholder="Course Code" class="form-control" required="">
|
||||
|
||||
URL (Leave blank to use Course Code & Year)
|
||||
<input type="text" name="url" placeholder="Choose Custom URL " class="form-control">
|
||||
URL (Leave blank to use Course Code & Year)
|
||||
<input type="text" name="url" placeholder="Choose Custom URL " class="form-control">
|
||||
|
||||
Academic Year
|
||||
<input type="text" name="academic" placeholder="Academic Year" class="form-control" required="">
|
||||
Academic Year
|
||||
<input type="text" name="academic" placeholder="Academic Year" class="form-control" required="">
|
||||
|
||||
Faculty <br>
|
||||
<input type="text" name="faculty" placeholder="Faculty" class="form-control" required="">
|
||||
<input type="text" name="faculty" placeholder="Faculty" class="form-control" required="">
|
||||
|
||||
|
||||
<input type="hidden" name="lecturer" value="<?php echo $_SESSION['user_id']; ?>">
|
||||
<input type="hidden" name="lecturer" value="<?php echo $_SESSION['user_id']; ?>">
|
||||
|
||||
|
||||
Verify Joining Students
|
||||
<input type="radio" name="verify" value="1"> Yes
|
||||
<input type="radio" name="verify" value="0" checked=""> No
|
||||
Verify Joining Students
|
||||
<input type="radio" name="verify" value="1"> Yes
|
||||
<input type="radio" name="verify" value="0" checked=""> No
|
||||
|
||||
<br>
|
||||
<input type="submit" class="btn btn-primary" value="Create Portal"><br>
|
||||
|
||||
</form>
|
||||
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- END LECTURER -->
|
||||
<!-- END LECTURER -->
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
if( $_SESSION['user_type']=="Student")
|
||||
{
|
||||
if( $_SESSION['user_type']=="Student")
|
||||
{
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--STUDENT CODE-->
|
||||
<div class="row" style="width:80%;margin:auto; text-align:left;">
|
||||
<!--STUDENT CODE-->
|
||||
<div class="row" style="width:80%;margin:auto; text-align:left;">
|
||||
<div class="col-md-6">
|
||||
<br> Course Portal > Students <br>
|
||||
<?php
|
||||
<?php
|
||||
|
||||
error_reporting(0);
|
||||
if (isset($_SESSION['info_Courses_student'])) {
|
||||
if (isset($_SESSION['info_Courses_student'])) {
|
||||
echo '<hr><span class="alert alert-success" role="alert">' . $_SESSION['info_Courses_student'] . '</span>';
|
||||
$_SESSION['info_Courses_student'] = null;
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
<br><br>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row" style="width:80%;margin:auto; text-align:left;">
|
||||
<div class="row" style="width:80%;margin:auto; text-align:left;">
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
error_reporting(0);
|
||||
$student_id= $_SESSION['user_student_id'];
|
||||
if(!empty($_GET["search"]) || !empty($_GET["faculty"]))
|
||||
error_reporting(0);
|
||||
$student_id= $_SESSION['user_student_id'];
|
||||
if(!empty($_GET["search"]) || !empty($_GET["faculty"]))
|
||||
{
|
||||
$search=$_GET["search"];
|
||||
$faculty=$_GET["faculty"];
|
||||
|
@ -710,9 +578,11 @@ if(!empty($_GET["search"]) || !empty($_GET["faculty"]))
|
|||
|
||||
if(mysqli_num_rows($result)==0)
|
||||
{
|
||||
echo "No results found for your Search <hr>";
|
||||
echo "No results found for your Search <hr>";
|
||||
|
||||
} else { while($row = mysqli_fetch_assoc($result)) {
|
||||
} else {
|
||||
|
||||
while($row = mysqli_fetch_assoc($result)) {
|
||||
$name=$row['Course_Name'];
|
||||
$code=$row['Course_Code'];
|
||||
$faculty=$row['Faculty'];
|
||||
|
@ -721,34 +591,21 @@ echo "No results found for your Search <hr>";
|
|||
$url=$row['URL'];
|
||||
$id=$row['Course_ID'];
|
||||
$v=$row['Verify_New_Members'];
|
||||
$msg2="Join this Course";
|
||||
$msg2="Join Course";
|
||||
if($v>0)
|
||||
{
|
||||
$msg="<i class='fa fa-exclamation-circle'></i> Lecturer Verification required";
|
||||
$msg="<i class='fa fa-exclamation-circle'></i> Lecturer verification required";
|
||||
$msg2="Send Joining Request";
|
||||
}
|
||||
|
||||
echo "<div class='btn btn-default' style='word-wrap:break-word'>
|
||||
($code) - $name <br>($url) <br> <a href='~\..\Script.php?JoinCourse=y&id=$id&std=$student_id&joining=$v' class='btn-sm btn-success' onclick=return confirm(\"are you sure to join this course?\")' > $msg2 </a>
|
||||
<br> <span style='font-size:8pt'>Faculty : $faculty Year : $academic Lecturer :$lecturer </span><br>$msg</div>
|
||||
[$code] $name <br>($url) <br> <a href='~\..\Script.php?JoinCourse=y&id=$id&std=$student_id&joining=$v' class='btn-sm btn-success' onclick=return confirm(\"Are you sure to join this course?\")' > $msg2 </a>
|
||||
<br> <span style='font-size:10pt'>Faculty: $faculty | Year: $academic | Lecturer: $lecturer </span><br>$msg</div>
|
||||
";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<h4> My Courses </h4>";
|
||||
$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
|
||||
|
@ -761,7 +618,8 @@ INNER JOIN course_students_table on course_students_table.Course_ID=courses_tabl
|
|||
if(mysqli_num_rows($result)==0)
|
||||
{
|
||||
echo "<i class='fa fa-exclamation-circle'></i> You are not Enrolled in any Course";
|
||||
} else { while($row = mysqli_fetch_assoc($result)) {
|
||||
} else {
|
||||
while($row = mysqli_fetch_assoc($result)) {
|
||||
$name=$row['Course_Name'];
|
||||
$code=$row['Course_Code'];
|
||||
$faculty=$row['Faculty'];
|
||||
|
@ -785,10 +643,6 @@ INNER JOIN course_students_table on course_students_table.Course_ID=courses_tabl
|
|||
<br> <span style='font-size:8pt'>Faculty : $faculty Year : $academic Lecturer :$lecturer </span></div>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -837,7 +691,7 @@ List courses by faculty
|
|||
echo "<option value=''> Search by faculty </option> <option value='$fname'> $fname </option>";
|
||||
}}
|
||||
|
||||
echo "</select></div></div>
|
||||
echo "</select></div></div>
|
||||
|
||||
</div>
|
||||
<div class='col-md-1'> <br>
|
||||
|
@ -907,9 +761,9 @@ echo "</select></div></div>
|
|||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
@ -917,13 +771,13 @@ echo "</select></div></div>
|
|||
|
||||
|
||||
|
||||
<style>
|
||||
<style>
|
||||
|
||||
.form-control{
|
||||
.form-control{
|
||||
padding-top: 1px;
|
||||
padding-bottom:1px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
session_start();
|
||||
|
||||
// Allow legal person to download files instead of using direct URL access
|
||||
// Adapted from https://www.runoob.com/w3cnote/php-download-file.html
|
||||
|
||||
|
||||
// 修改这一行设置你的文件下载目录
|
||||
$file = "./../../lrr_submission".$_GET['file'];
|
||||
$filename = basename($file);
|
||||
|
||||
// 判断文件是否存在
|
||||
if(!file_exists($file)) die("File does not exist.");
|
||||
|
||||
// 文件类型,作为头部发送给浏览器
|
||||
$type = filetype($file);
|
||||
|
||||
// 获取时间和日期
|
||||
$today = date("F j, Y, g:i a");
|
||||
$time = time();
|
||||
|
||||
if ( (isset($_SESSION["user_student_id"]) && strpos($file, $_SESSION["user_student_id"])) || $_SESSION['user_type'] == "Lecturer" || $_SESSION['user_type'] == "TA") {
|
||||
// 发送文件头部
|
||||
header("Content-type: $type");
|
||||
header("Content-Disposition: attachment;filename=$filename");
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
header('Pragma: no-cache');
|
||||
header('Expires: 0');
|
||||
// 发送文件内容
|
||||
set_time_limit(0);
|
||||
readfile($file);
|
||||
} else {
|
||||
echo "Nothing to download. Contact lanhui _at_ zjnu.edu.cn if you think otherwise.";
|
||||
}
|
||||
|
||||
?>
|
55
Header.php
55
Header.php
|
@ -1,53 +1,37 @@
|
|||
<?php
|
||||
session_start();
|
||||
|
||||
error_reporting(0);
|
||||
date_default_timezone_set('Asia/Shanghai');
|
||||
date_default_timezone_set('Asia/Shanghai');
|
||||
|
||||
$con = mysqli_connect("localhost","username","password","lrr");
|
||||
|
||||
$con=mysqli_connect("localhost","username","password","lrr");
|
||||
// Check connection
|
||||
if (mysqli_connect_errno())
|
||||
{
|
||||
// Check database connection
|
||||
if (mysqli_connect_errno()) {
|
||||
echo "Failed to connect to MySQL: " . mysqli_connect_error();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<header>
|
||||
|
||||
<header>
|
||||
|
||||
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="./font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<script src="./css/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="./css/bootsrap.min.js" type="text/javascript"></script>
|
||||
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<?php
|
||||
$curDateTime = date("Y-m-d H:i");
|
||||
include 'connect.php';
|
||||
|
||||
?>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" style="padding-left:150px;padding-right:150px;margin:auto;">
|
||||
<a class="navbar-brand" href="~\..\index.php"> <img src="logo.png" style="width:30px;heigh:30px;"> LRRS</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
@ -66,20 +50,18 @@ else
|
|||
{
|
||||
|
||||
echo " <a class='nav-link' href='~\..\Courses.php'><i class='fa fa-book'></i> Courses <span class='sr-only'>(current)</span></a>";
|
||||
|
||||
|
||||
?>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<form class="form-inline my-2 my-lg-0" style="color:#fff;">
|
||||
Welcome <b> <?php echo $_SESSION['user_fullname'];
|
||||
?> </b>
|
||||
Welcome <b> <?php echo $_SESSION['user_fullname']; ?> </b>
|
||||
|
||||
<?php
|
||||
$c_date= date("Y-m-d H:i");
|
||||
if (isset( $_SESSION['user_student_id']))
|
||||
echo "(". $_SESSION['user_type'] . " - " . $_SESSION['user_student_id'] .") ";
|
||||
else
|
||||
echo "(". $_SESSION['user_type'] .") ";
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
@ -88,10 +70,8 @@ if ($_SESSION['user_type'] == "Lecturer") {
|
|||
}
|
||||
?>
|
||||
|
||||
|
||||
<i class="fa fa-user" style="color:#fff;"> </i>
|
||||
<a href="#" style='color:#fff !important' onclick="updatePass(<?php echo $_SESSION['user_id'];?>)">Update password</a>
|
||||
|
||||
<i class="fa fa-lock" style="color:#fff;"> </i> <a style='color:#fff !important' href="~\..\logout.php">Logout </a>
|
||||
|
||||
<?php
|
||||
|
@ -156,20 +136,17 @@ if ($_SESSION['user_type'] == "Lecturer") {
|
|||
|
||||
.ui-button{ background: #03488B; color:white }
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<script>
|
||||
function updatePass(id)
|
||||
{
|
||||
|
||||
var pass= prompt("Enter your new password : ", "...");
|
||||
var pass = prompt("Enter your new password : ", "Enter a strong password");
|
||||
|
||||
if(!confirm('Are you sure to reset your password?'))
|
||||
if(!confirm('Are you sure you want to reset your password?'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -179,10 +156,10 @@ if ($_SESSION['user_type'] == "Lecturer") {
|
|||
|
||||
function blockUser(id,status)
|
||||
{
|
||||
if(!confirm('Are you to change User Status'))
|
||||
if(!confirm('Are you sure you want to change user status?'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
window.location.href="\Script.php\?action=statuschange&uid="+id+"&status="+status;
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
// https://stackoverflow.com/questions/33999475/prevent-direct-url-access-to-php-file
|
||||
if (!isset($_SERVER['HTTP_REFERER']) ) {
|
||||
/* choose the appropriate page to redirect users */
|
||||
die( header( 'location: index.php' ) );
|
||||
}
|
||||
?>
|
938
Script.php
938
Script.php
File diff suppressed because it is too large
Load Diff
256
Submissions.php
256
Submissions.php
|
@ -1,40 +1,40 @@
|
|||
<?php
|
||||
include 'NoDirectPhpAcess.php';
|
||||
?>
|
||||
|
||||
<?php
|
||||
$page='Courses+';
|
||||
include 'Header.php';
|
||||
$student_id=$_SESSION["user_student_id"];
|
||||
$group_id=$_SESSION["user_group_id"];
|
||||
$c_date= date("Y-m-d H:i");
|
||||
$student_id = $_SESSION["user_student_id"];
|
||||
$group_id = $_SESSION["user_group_id"];
|
||||
$c_date = date("Y-m-d H:i");
|
||||
|
||||
if(!empty($_GET["id"]))
|
||||
{
|
||||
$id=$_GET["id"];
|
||||
$course_id=$id;
|
||||
}
|
||||
if(!empty($_GET["header"]))
|
||||
{
|
||||
$header=$_GET["header"];
|
||||
}
|
||||
if(!empty($_GET["id"]))
|
||||
{
|
||||
$id = $_GET["id"];
|
||||
$course_id = $id;
|
||||
}
|
||||
|
||||
if(!empty($_GET["total"]))
|
||||
{
|
||||
$total=$_GET["total"];
|
||||
} else
|
||||
{
|
||||
$total=0;
|
||||
}
|
||||
if(!empty($_GET["header"]))
|
||||
{
|
||||
$header = $_GET["header"];
|
||||
}
|
||||
|
||||
if(!empty($_GET["total"]))
|
||||
{
|
||||
$total = $_GET["total"];
|
||||
} else
|
||||
{
|
||||
$total = 0;
|
||||
}
|
||||
|
||||
|
||||
$resultx1 = mysqli_query($con,"SELECT `Lab_Report_ID`,Title, `Course_ID`, `Posted_Date`, `Deadline`, `Marks`, `Type` FROM `lab_reports_table` WHERE Lab_Report_ID=$id");
|
||||
while($row = mysqli_fetch_assoc($resultx1)) {
|
||||
|
||||
$Report_Type=$row['Type'];
|
||||
$c_id=$row['Course_ID'];
|
||||
$Report_Title=$row['Title'];
|
||||
|
||||
|
||||
|
||||
}
|
||||
$resultx1 = mysqli_query($con,"SELECT `Lab_Report_ID`,Title, `Course_ID`, `Posted_Date`, `Deadline`, `Marks`, `Type` FROM `lab_reports_table` WHERE Lab_Report_ID=$id");
|
||||
while($row = mysqli_fetch_assoc($resultx1)) {
|
||||
$Report_Type = $row['Type'];
|
||||
$c_id = $row['Course_ID'];
|
||||
$Report_Title = $row['Title'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -52,31 +52,31 @@ echo "<div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF
|
|||
|
||||
|
||||
|
||||
<!-- Lecture CODE-->
|
||||
<!-- Lecturer CODE-->
|
||||
<?php
|
||||
|
||||
if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA")
|
||||
if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA")
|
||||
{
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
error_reporting(0);
|
||||
error_reporting(0);
|
||||
|
||||
if(isset($_SESSION['info_Marking'])) {
|
||||
if(isset($_SESSION['info_Marking'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">'.$_SESSION['info_Marking'].'</div>';
|
||||
$_SESSION['info_Marking']=null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$resultx1 = mysqli_query($con,"Select Count(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id");
|
||||
$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'");
|
||||
|
@ -89,7 +89,7 @@ $resultx1 = mysqli_query($con,"Select Count(*) as cnt from lab_report_submission
|
|||
if(mysqli_num_rows($resultx4)==0){$count_remark=0;} else { while($row = mysqli_fetch_assoc($resultx4)) {$count_remark =$row['cnt'];}}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
<b>Lab Report Submissions (<?php echo $count_subs;?>)</b>
|
||||
<!-- Nav tabs -->
|
||||
|
@ -113,11 +113,11 @@ $resultx1 = mysqli_query($con,"Select Count(*) as cnt from lab_report_submission
|
|||
<div class="tab-content">
|
||||
<div id="menu1" class="container tab-pane active"><br>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
|
||||
if($Report_Type=="Group")
|
||||
{
|
||||
if($Report_Type=="Group")
|
||||
{
|
||||
$result1 = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
|
||||
lab_report_submissions.Course_Group_id, `Attachment1`,
|
||||
`Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,
|
||||
|
@ -125,7 +125,7 @@ if($Report_Type=="Group")
|
|||
FROM `lab_report_submissions`
|
||||
left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id
|
||||
where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Submission_Date desc");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result1 = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
|
||||
|
@ -143,14 +143,14 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Sub
|
|||
|
||||
|
||||
|
||||
if(mysqli_num_rows($result1)==0)
|
||||
if(mysqli_num_rows($result1)==0)
|
||||
{
|
||||
echo "No Un-Marked Submissions for this Lab Report.";
|
||||
|
||||
} else { while($row = mysqli_fetch_assoc($result1)) {
|
||||
} else {
|
||||
while($row = mysqli_fetch_assoc($result1)) {
|
||||
$title=$row['Title'];
|
||||
$Marks=$row['Marks'];
|
||||
//$ins=$row['Notes'];
|
||||
$posted=$row['Submission_Date'];
|
||||
$deadline=$row['Deadline'];
|
||||
$att1=$row['Attachment1'];
|
||||
|
@ -173,24 +173,32 @@ if(mysqli_num_rows($result1)==0)
|
|||
$submitted_by="<i>(GROUP)</i> $groupname" ;
|
||||
}
|
||||
|
||||
$full_link="<a href='~\..\Lab_Report_Submisions\\$att1'>$att1</a>";
|
||||
$base_att1 = basename($att1);
|
||||
$base_att2 = basename($att2);
|
||||
$base_att3 = basename($att3);
|
||||
$base_att4 = basename($att4);
|
||||
|
||||
$full_link = "<a href='~\..\Download.php?file=$att1&attachment=1'>$base_att1</a>"; // prevent students from directly accessing their classmates' submissions
|
||||
|
||||
if($att2!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att2'>$att2</a>";
|
||||
$full_link= $full_link." | <a href='~\..\Download.php?file=$att2&attachment=2'>$base_att2</a>";
|
||||
}
|
||||
if($att3!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att3'>$att3</a>";
|
||||
$full_link= $full_link." | <a href='~\..\Download.php?file=$att3&attachment=3'>$base_att3</a>";
|
||||
}
|
||||
|
||||
if($att4!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$att4'>$att4</a>";
|
||||
$full_link= $full_link." | <a href='~\..\Download.php?file=$att4&attachment=4'>$base_att4</a>";
|
||||
}
|
||||
|
||||
|
||||
echo " <k href='#'> <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
|
||||
$title <br> by : <b> $submitted_by </b>
|
||||
<br> <span style='font-size:8pt'>Submitted : $posted <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'> Mark Submission</button><br> Attachments : $full_link </span>
|
||||
$title <br> by: <b> $submitted_by </b>
|
||||
<br> <span style='font-size:8pt'>Submitted at $posted <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'> Mark Submission</button><br> Attachments : $full_link </span>
|
||||
</div></k>";
|
||||
|
||||
}}
|
||||
}
|
||||
}
|
||||
echo "";
|
||||
?>
|
||||
|
||||
|
@ -201,11 +209,11 @@ if(mysqli_num_rows($result1)==0)
|
|||
|
||||
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
|
||||
if($Report_Type=="Group")
|
||||
{
|
||||
if($Report_Type=="Group")
|
||||
{
|
||||
$result = mysqli_query($con,"SELECT `Submission_ID`,Visibility, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
|
||||
lab_report_submissions.Course_Group_id, `Attachment1`,
|
||||
`Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,
|
||||
|
@ -213,7 +221,7 @@ if($Report_Type=="Group")
|
|||
FROM `lab_report_submissions`
|
||||
left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id
|
||||
where Lab_Report_ID=$id and lab_report_submissions.Status='Marked'");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = mysqli_query($con,"SELECT `Submission_ID`,Visibility, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
|
||||
|
@ -297,10 +305,10 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Marked' Order by lab
|
|||
|
||||
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
if($Report_Type=="Group")
|
||||
{
|
||||
{
|
||||
$resulty = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
|
||||
lab_report_submissions.Course_Group_id, `Attachment1`,
|
||||
`Notes`, `Attachment2`, `Attachment3`, `Attachment4`, lab_report_submissions.Marks, lab_report_submissions.Status,
|
||||
|
@ -309,9 +317,9 @@ FROM `lab_report_submissions`
|
|||
|
||||
left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id
|
||||
where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'");
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
$resulty = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
|
||||
lab_report_submissions.Remarking_Reason,
|
||||
lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`,
|
||||
|
@ -321,7 +329,7 @@ FROM `lab_report_submissions`
|
|||
Left JOIN users_table on users_table.Student_ID=lab_report_submissions.Student_id
|
||||
left JOIN course_group_members_table on course_group_members_table.Course_Group_id=lab_report_submissions.Course_Group_id
|
||||
where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'");
|
||||
}
|
||||
}
|
||||
|
||||
if(mysqli_num_rows($resulty)==0)
|
||||
{
|
||||
|
@ -399,7 +407,7 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'");
|
|||
|
||||
|
||||
<hr>
|
||||
<?php
|
||||
<?php
|
||||
|
||||
|
||||
$result = mysqli_query($con," SELECT `Course_Group_id`, `Group_Name`, `Group_Leader`, `Course_id`,users_table.Full_Name
|
||||
|
@ -407,7 +415,7 @@ FROM `course_groups_table`
|
|||
INNER JOIN users_table on users_table.Student_ID=course_groups_table.Group_Leader
|
||||
WHERE Course_id=$c_id");
|
||||
|
||||
if(mysqli_num_rows($result)==0)
|
||||
if(mysqli_num_rows($result)==0)
|
||||
{
|
||||
echo "You have no Group in this Course";
|
||||
} else { while($row = mysqli_fetch_assoc($result)) {
|
||||
|
@ -452,116 +460,25 @@ where course_group_members_table.Course_Group_id=$id");
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
include 'Footer.php';
|
||||
?>
|
||||
include 'Footer.php';
|
||||
?>
|
||||
|
||||
|
||||
<script src="./css/jquery-1.11.1.min.js"></script>
|
||||
|
||||
<script src="./css/jquery-ui.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="./css/jquery-ui.css" />
|
||||
|
||||
|
||||
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
|
||||
|
||||
<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css" />
|
||||
<script>
|
||||
|
||||
|
||||
function mark(id,title,marks) {
|
||||
|
||||
|
||||
|
@ -587,15 +504,16 @@ where course_group_members_table.Course_Group_id=$id");
|
|||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}catch(e){ alert(e); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function updatev(id) {
|
||||
function updatev(id)
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
|
@ -620,10 +538,10 @@ Update Visibility<br><select name="status"> <option> Public </option><option>Pri
|
|||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}catch(e){ alert(e); }
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
||||
|
|
138
SubmitLab.php
138
SubmitLab.php
|
@ -1,50 +1,54 @@
|
|||
<?php
|
||||
include 'NoDirectPhpAcess.php';
|
||||
?>
|
||||
|
||||
<?php
|
||||
$page='Submit LAB+';
|
||||
include 'Header.php';
|
||||
?>
|
||||
|
||||
<div class='row' style='width:80%;margin:auto;'>
|
||||
|
||||
|
||||
<?php
|
||||
$c_date= date("Y-m-d H:i");
|
||||
|
||||
$student_id=$_SESSION["user_student_id"];
|
||||
$c_date = date("Y-m-d H:i");
|
||||
$student_id = $_SESSION["user_student_id"];
|
||||
|
||||
if(!empty($_GET["id"]))
|
||||
{
|
||||
$id = $_GET["id"];
|
||||
$url = $_GET["url"];
|
||||
|
||||
$student_id=$_SESSION["user_student_id"];
|
||||
|
||||
if(!empty($_GET["id"]))
|
||||
$result1 = mysqli_query($con," SELECT `Type`, `Lab_Report_ID`, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4` FROM `lab_reports_table` WHERE Lab_Report_ID=$id and Deadline > '$c_date' ORDER by Lab_Report_ID DESC");
|
||||
if(mysqli_num_rows($result1) == 0)
|
||||
{
|
||||
$id=$_GET["id"];
|
||||
$url=$_GET["url"];
|
||||
echo "No active assignments for this course so far.";
|
||||
|
||||
$result1 = mysqli_query($con," SELECT Type, `Lab_Report_ID`, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, "
|
||||
. "`Attachment_link_4` FROM `lab_reports_table` WHERE Lab_Report_ID=$id and deadline > '$c_date' ORDER by Lab_Report_ID DESC");
|
||||
if(mysqli_num_rows($result1)==0)
|
||||
{
|
||||
echo "No Active assignments for this course so far.";
|
||||
} else {
|
||||
|
||||
} else { while($row = mysqli_fetch_assoc($result1)) {
|
||||
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'];
|
||||
$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'];
|
||||
|
||||
$type=$row['Type'];
|
||||
|
||||
//----------------------------------Giving both Group Admin and Group Members same priviledges to submit assignment--------------------------------------
|
||||
//----------------------------------Giving both the Group Admin and Group Members same priviledges to submit assignment--------------------------------------
|
||||
if($type=="Group"){
|
||||
$resultx1 = mysqli_query($con,"SELECT Course_Group_id FROM `course_groups_table` WHERE (Course_id=$Course_ID) and ((Group_Member=$student_id ) or (Group_Member2=$student_id ) or (Group_Member3=$student_id ) or (Group_Member4=$student_id ) or(Group_Leader=$student_id))");
|
||||
$resultx1 = mysqli_query($con,"SELECT Course_Group_id FROM `course_groups_table` WHERE (Course_id=$Course_ID) and ((Group_Member=$student_id ) or (Group_Member2=$student_id ) or (Group_Member3=$student_id ) or (Group_Member4=$student_id ) or (Group_Leader=$student_id))");
|
||||
while($row = mysqli_fetch_assoc($resultx1)) {
|
||||
$_SESSION["Group_ID"]=$row['Course_Group_id'];}
|
||||
$_SESSION["Group_ID"] = $row['Course_Group_id'];
|
||||
}
|
||||
|
||||
if($_SESSION["Group_ID"]<1)
|
||||
if($_SESSION["Group_ID"] < 1)
|
||||
{
|
||||
echo" <center><h3> This Lab report can only be submitted by Group Admin </h3> </center> ";
|
||||
return;
|
||||
|
@ -52,60 +56,39 @@ if(mysqli_num_rows($result1)==0)
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$full_link="<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";
|
||||
|
||||
if($att2!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att2'>$att2</a>";
|
||||
$full_link = $full_link."| <a href='~\..\Lab_Report_Assignments\\$att2'>$att2</a>";
|
||||
}
|
||||
if($att3!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att3'>$att3</a>";
|
||||
$full_link = $full_link."| <a href='~\..\Lab_Report_Assignments\\$att3'>$att3</a>";
|
||||
}
|
||||
|
||||
if($att4!=""){
|
||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att4'>$att4</a>";
|
||||
$full_link = $full_link."| <a href='~\..\Lab_Report_Assignments\\$att4'>$att4</a>";
|
||||
}
|
||||
|
||||
|
||||
echo " <div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='~\..\Courses.php?course=$url'>
|
||||
Courses > $url > Submlit Lab Report > $title
|
||||
<br>
|
||||
</a></div>
|
||||
";
|
||||
|
||||
// echo " <k href='#'> <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;width:100%;'>
|
||||
// $title <br> <span style='font-size:8pt'> $ins</span>
|
||||
// <br> <span style='font-size:8pt'>Posted : $posted Deadline : $deadline <br> Attachments : $full_link </span>
|
||||
//</div></k>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}}
|
||||
|
||||
|
||||
}
|
||||
$Group_ID=$_SESSION["Group_ID"];
|
||||
}
|
||||
}
|
||||
|
||||
$Group_ID = $_SESSION["Group_ID"];
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="width:80%;margin:auto;">
|
||||
|
||||
<h3> Submit Lab Report Assignment </h3>
|
||||
|
@ -115,43 +98,38 @@ if(mysqli_num_rows($result1)==0)
|
|||
<div class="col-md-6">
|
||||
|
||||
|
||||
|
||||
<form method='post' enctype='multipart/form-data' action='Script.php'>
|
||||
<form method='post' enctype='multipart/form-data' action='Script.php'>
|
||||
<input type='hidden' name='frm_submitlab' value='true' required=''/>
|
||||
<input type='hidden' name='lab_id' value='<?php echo $id; ?>' required=''/>
|
||||
<input type='hidden' name='student_id' value='<?php echo $student_id; ?>' required=''/>
|
||||
|
||||
<input type='hidden' name='group_id' value='<?php echo $Group_ID; ?>' required=''/>
|
||||
<input type='hidden' name='url' value='<?php echo $url; ?>' required=''/>
|
||||
|
||||
Title
|
||||
<input type='text' name='title' placeholder='Ttle' class='form-control' required=''>
|
||||
|
||||
|
||||
Title
|
||||
<input type='text' name='title' placeholder='Ttle' class='form-control' required=''>
|
||||
Attachment 1
|
||||
<input type='file' name='attachment1' placeholder='Attachment 1' class='form-control' required=''>
|
||||
<input type='file' name='attachment1' placeholder='Attachment 1' class='form-control' required=''>
|
||||
|
||||
Attachment 2
|
||||
<input type='file' name='attachment2' placeholder='Attachment 1' class='form-control'>
|
||||
<input type='file' name='attachment2' placeholder='Attachment 2' class='form-control'>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
Attachment 3
|
||||
<input type='file' name='attachment3' placeholder='Attachment 1' class='form-control' >
|
||||
|
||||
<input type='file' name='attachment3' placeholder='Attachment 3' class='form-control' >
|
||||
|
||||
Attachment 4
|
||||
<input type='file' name='attachment4' placeholder='Attachment 4' class='form-control' >
|
||||
<br>
|
||||
<input type='file' name='attachment4' placeholder='Attachment 4' class='form-control' >
|
||||
<br>
|
||||
|
||||
<input type='submit' class='btn btn-primary' value='Submit Lab Assignment'><br>
|
||||
</form>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
115
index.php
115
index.php
|
@ -1,16 +1,15 @@
|
|||
|
||||
|
||||
|
||||
<?php
|
||||
$page='Home';
|
||||
include 'Header.php';
|
||||
|
||||
session_start();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
// if the user has already logged in, then clicking the LRRS icon should not display the login page (i.e., index.php).
|
||||
if (isset($_SESSION["user_fullname"])) {
|
||||
header("Location: Courses.php");
|
||||
}
|
||||
?>
|
||||
|
||||
<br><br><br>
|
||||
<div class="row" style="width:80%;margin:auto;">
|
||||
|
@ -18,120 +17,113 @@ session_start();
|
|||
<div class="col-md-4">
|
||||
<br><br>
|
||||
<img src="logo_text.png" style="width">
|
||||
<h1> Lab Report Repository System </h1>
|
||||
<h1> Lab Report Repository </h1>
|
||||
<br><br>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4 list-group">
|
||||
<div class="col-md-4 list-group">
|
||||
|
||||
<br>
|
||||
|
||||
<h4 class="list-group-item active"> Sign in </h4>
|
||||
<div class="list-group-item">
|
||||
<h4 class="list-group-item active"> Sign in </h4>
|
||||
<div class="list-group-item">
|
||||
|
||||
<div class="panel-body">
|
||||
<form method="post" action="Script.php" name="frm_login">
|
||||
|
||||
|
||||
<form method="post" action="Script.php" name="frm_login">
|
||||
<input type="hidden" name="frm_login" value="true"/>
|
||||
Student ID / Email
|
||||
<input type="text" name="user" placeholder="Email / Student Number" class="form-control" required="required" />
|
||||
Student ID / Email
|
||||
<input type="text" name="user" placeholder="Email / Student Number" class="form-control" required="required" />
|
||||
|
||||
Password
|
||||
<input type="password" class="form-control" name="password" placeholder="password" required="required" />
|
||||
<input type="password" class="form-control" name="password" placeholder="password" required="required" />
|
||||
<br>
|
||||
<input type="submit" class="btn btn-primary" value="Login"><br> <a href="recover_password.php" style="font-weight:normal;color:orange">Reset my password</a>
|
||||
<input type="submit" class="btn btn-primary" value="Login"><br> <a href="recover_password.php" style="font-weight:normal;color:gray">Reset my password</a>
|
||||
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
<?php
|
||||
|
||||
if(isset($_SESSION['info_login'])) {
|
||||
error_reporting(E_ALL);
|
||||
|
||||
if(isset($_SESSION['info_login'])) {
|
||||
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_login'].'</div>';
|
||||
$_SESSION['info_login']=null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// wrong pass
|
||||
if(isset($_SESSION['wrong_pass'])) {
|
||||
// wrong pass
|
||||
if(isset($_SESSION['wrong_pass'])) {
|
||||
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['wrong_pass'].'</div>';
|
||||
$_SESSION['wrong_pass']=null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(isset($_SESSION['infoChangePassword'])) {
|
||||
if(isset($_SESSION['infoChangePassword'])) {
|
||||
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['infoChangePassword'].'</div>';
|
||||
$_SESSION['infoChangePassword']=null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</form>
|
||||
?>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 list-group">
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<h4 class="list-group-item active"> Student sign up </h4>
|
||||
<div class="list-group-item">
|
||||
<h4 class="list-group-item active"> Sign up </h4>
|
||||
<div class="list-group-item">
|
||||
|
||||
<form method="post" action="Script.php" name="frm_signup_1">
|
||||
<form method="post" action="Script.php" name="frm_signup_1">
|
||||
<input type="hidden" name="frm_signup_1" value="true"/>
|
||||
|
||||
Student ID
|
||||
<input type="text" name="student_id" placeholder="Entre your Student ID" class="form-control" required="">
|
||||
<input type="text" name="student_id" placeholder="Entre your Student ID" class="form-control" required="">
|
||||
|
||||
Your Passport / National ID
|
||||
Your Passport / National ID
|
||||
<input type="text" class="form-control" name="passport" placeholder="(Optional)">
|
||||
<br>
|
||||
<input type="submit" name="frm_signup_1" class="btn btn-primary" value="Next"> <br> Click Next to set up password
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
if(isset($_SESSION['info_signup1'])) {
|
||||
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
if(isset($_SESSION['info_signup1'])) {
|
||||
echo '<div class="alert alert-danger" role="alert">'.$_SESSION['info_signup1'].'</div>';
|
||||
$_SESSION['info_signup1']=null;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
<div style="" id="footer">
|
||||
LRRS was originally developed as a <a href="http://lanlab.org/course/2018f/se/homepage.html" style="color:white;">software engineering course project</a> by Mohamed Nor and Elmahdi Houzi. Please submit your suggestions or bug reports to lanhui _at_ zjnu.edu.cn. Last updated on 18/04/2020 by Ashly. <a href="./homepage" style="color:white;">More information ...</a>
|
||||
</div>
|
||||
LRRS was originally developed as a <a href="http://lanlab.org/course/2018f/se/homepage.html" style="color:white;">software engineering course project</a> by Mohamed Nor and Elmahdi Houzi. Please submit your suggestions or bug reports to lanhui _at_ zjnu.edu.cn. Last updated on 18/04/2020 by Ashly. <a href="./homepage" style="color:white;">More information ...</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</body>
|
||||
|
||||
<style>
|
||||
#footer{
|
||||
position:fixed;
|
||||
bottom:0;
|
||||
left:0;
|
||||
position:fixed;
|
||||
bottom:0;
|
||||
left:0;
|
||||
background-color:#03417C;
|
||||
color:#FFF;
|
||||
text-align:center;
|
||||
|
@ -139,4 +131,3 @@ width:100%;
|
|||
}
|
||||
</style>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
<?php
|
||||
include 'NoDirectPhpAcess.php';
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
|
|
27
signup.php
27
signup.php
|
@ -1,28 +1,25 @@
|
|||
<?php
|
||||
include 'NoDirectPhpAcess.php';
|
||||
?>
|
||||
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
<?php
|
||||
include 'Header.php';
|
||||
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 list-group" style="margin:auto;">
|
||||
<div class="col-md-4 list-group" style="margin:auto;">
|
||||
|
||||
<br>
|
||||
|
||||
<h4 class="list-group-item active"> Sign Up </h4>
|
||||
<div class="list-group-item">
|
||||
<h4 class="list-group-item active"> Please fill in each field below </h4>
|
||||
<div class="list-group-item">
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
|
||||
<form method="post" action="Script.php" >
|
||||
<form method="post" action="Script.php" >
|
||||
<input type="hidden" name="frm_signup_2" value="true"/>
|
||||
Full Name
|
||||
<input type="text" name="fullname" placeholder="Your Full Name" class="form-control" value="<?php echo $_SESSION['user_fullname']; ?>" required="required"/>
|
||||
|
@ -30,7 +27,7 @@ include 'Header.php';
|
|||
Email
|
||||
<input type="text" name="email" placeholder="Email" class="form-control" value="<?php echo $_SESSION['user_email']; ?>" required="required" />
|
||||
|
||||
Password
|
||||
Password (<i>must include uppercase and lowercase letters, digits and special characters</i>)
|
||||
<input type="password" class="form-control" name="password" placeholder="password" required="required" />
|
||||
|
||||
Confirm Password
|
||||
|
@ -38,22 +35,16 @@ include 'Header.php';
|
|||
<br>
|
||||
<input type="submit" class="btn btn-primary" value="Sign up">
|
||||
<?php
|
||||
|
||||
|
||||
error_reporting(E_ALL);
|
||||
if(isset($_SESSION['info_signup2'])) {
|
||||
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_signup2'].'</div>';
|
||||
$_SESSION['info_signup2'] = null;
|
||||
}
|
||||
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue