Hui-CodeIndentation #16
|
@ -0,0 +1,2 @@
|
||||||
|
.vscode
|
||||||
|
|
302
Admin.php
302
Admin.php
|
@ -1,35 +1,34 @@
|
||||||
<?php
|
<?php
|
||||||
include 'NoDirectPhpAcess.php';
|
include 'NoDirectPhpAcess.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$page="admin";
|
$page = "admin";
|
||||||
include 'Header.php';
|
include 'Header.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($_SESSION['user_type'] != "Lecturer") {
|
if ($_SESSION['user_type'] != "Lecturer") {
|
||||||
$_SESSION["info_login"]="You must log in first.";
|
$_SESSION["info_login"] = "You must log in first.";
|
||||||
echo $_SESSION["info_login"];
|
echo $_SESSION["info_login"];
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.col-md-4{
|
.col-md-4 {
|
||||||
border-right: 1px solid skyblue;
|
border-right: 1px solid skyblue;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div style="width: 80%;margin: auto;"> <h2> Administration Panel </h2> </div>
|
<div style="width: 80%;margin: auto;">
|
||||||
|
<h2> Administration Panel </h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<div class="row" style="width: 80%;margin: auto;">
|
<div class="row" style="width: 80%;margin: auto;">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--<h4>General system Settings</h4><hr>
|
<!--<h4>General system Settings</h4><hr>
|
||||||
<a href="" class="btn btn-lg btn-primary">View System Log </a>
|
<a href="" class="btn btn-lg btn-primary">View System Log </a>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -37,19 +36,13 @@ if ($_SESSION['user_type'] != "Lecturer") {
|
||||||
<hr>
|
<hr>
|
||||||
-->
|
-->
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h4> User Account Management </h4><hr>
|
<h4> User Account Management </h4>
|
||||||
|
<hr>
|
||||||
|
|
||||||
<b>Lecturer / TA Accounts </b><br>
|
<b>Lecturer / TA Accounts </b><br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
|
|
||||||
|
@ -74,44 +67,41 @@ if ($_SESSION['user_type'] != "Lecturer") {
|
||||||
|
|
||||||
<b>Create Lecturer/TA Accounts </b>
|
<b>Create Lecturer/TA Accounts </b>
|
||||||
<form method="post" action="Script.php">
|
<form method="post" action="Script.php">
|
||||||
<input type="hidden" name="frm_createlecturrer" value="true" required=""/>
|
<input type="hidden" name="frm_createlecturrer" value="true" required="" />
|
||||||
Full_Name
|
Full_Name
|
||||||
<input type="text" name="fullname" placeholder="Full Name" class="form-control" required="">
|
<input type="text" name="fullname" placeholder="Full Name" class="form-control" required="">
|
||||||
Email
|
Email
|
||||||
<input type="text" name="email" placeholder="Email / Student Number" class="form-control" required="">
|
<input type="text" name="email" placeholder="Email / Student Number" class="form-control" required="">
|
||||||
|
|
||||||
Passport_Number / ID (Used as Intial Password)
|
Passport_Number / ID (Used as Intial Password)
|
||||||
<input type="text" class="form-control" name="passport" placeholder="Passport No./ID" required="">
|
<input type="text" class="form-control" name="passport" placeholder="Passport No./ID" required="">
|
||||||
<br> User Type :
|
<br> User Type :
|
||||||
<input type="radio" name="type" value="Lecturer" required=""> Lecturer
|
<input type="radio" name="type" value="Lecturer" required=""> Lecturer
|
||||||
<input type="radio" name="type" value="TA" required=""> T/A
|
<input type="radio" name="type" value="TA" required=""> T/A
|
||||||
<input type="submit" class="btn btn-primary" value="Create"><br>
|
<input type="submit" class="btn btn-primary" value="Create"><br>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
if(isset($_SESSION['info_Admin_Users'])) {
|
if (isset($_SESSION['info_Admin_Users'])) {
|
||||||
echo '<hr><div class="alert alert-info" role="alert">'.$_SESSION['info_Admin_Users'].'</div>';
|
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_Admin_Users'] . '</div>';
|
||||||
$_SESSION['info_Admin_Users']=null;
|
$_SESSION['info_Admin_Users'] = null;
|
||||||
}
|
}
|
||||||
if(isset($_SESSION['info_Admin_Users'])) {
|
if (isset($_SESSION['info_Admin_Users'])) {
|
||||||
echo '<hr><div class="alert alert-info" role="alert">'.$_SESSION['info_Admin_Users'].'</div>';
|
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_Admin_Users'] . '</div>';
|
||||||
$_SESSION['info_Admin_Users']=null;
|
$_SESSION['info_Admin_Users'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="menu1" class="container tab-pane fade"><br>
|
<div id="menu1" class="container tab-pane fade"><br>
|
||||||
|
|
||||||
<table class="table-bordered" style="font-size: 10pt;">
|
<table class="table-bordered" style="font-size: 10pt;">
|
||||||
<tr style="font-size:10pt;">
|
<tr style="font-size:10pt;">
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
|
@ -120,32 +110,33 @@ if(isset($_SESSION['info_Admin_Users'])) {
|
||||||
<th>Reset Password </th>
|
<th>Reset Password </th>
|
||||||
<th>Block/Activate </th>
|
<th>Block/Activate </th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$result = mysqli_query($con,
|
$result = mysqli_query(
|
||||||
"SELECT * FROM Users_Table WHERE UserType in ('Lecturer','TA')");
|
$con,
|
||||||
while($row = mysqli_fetch_assoc($result)) {
|
"SELECT * FROM Users_Table WHERE UserType in ('Lecturer','TA')"
|
||||||
$pass=$row['Passport_Number'];
|
);
|
||||||
$btn="<button class='btn-primary' onclick=\"updatePass(".$row['User_ID'].",'$pass')\">Reset</button>";
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
if($row['Status']=="Active")
|
$pass = $row['Passport_Number'];
|
||||||
{ $newstatus="Blocked";
|
$btn = "<button class='btn-primary' onclick=\"updatePass(" . $row['User_ID'] . ",'$pass')\">Reset</button>";
|
||||||
$btnBlock="<button class='btn-danger' onclick=\"blockUser(".$row['User_ID'].",'$newstatus')\">Block</button>";
|
if ($row['Status'] == "Active") {
|
||||||
}else{
|
$newstatus = "Blocked";
|
||||||
$newstatus="Active";
|
$btnBlock = "<button class='btn-danger' onclick=\"blockUser(" . $row['User_ID'] . ",'$newstatus')\">Block</button>";
|
||||||
$btnBlock="<button class='btn-success' onclick=\"blockUser(".$row['User_ID'].",'$newstatus')\">Activate</button>";
|
} else {
|
||||||
|
$newstatus = "Active";
|
||||||
|
$btnBlock = "<button class='btn-success' onclick=\"blockUser(" . $row['User_ID'] . ",'$newstatus')\">Activate</button>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<tr><td>".$row['User_ID']."</td><td>".$row['Full_Name']."</td><td>".$row['Email']."</td> <td>".$row['Passport_Number']."</td><td>$btn</td><td>$btnBlock</td></tr>";
|
echo "<tr><td>" . $row['User_ID'] . "</td><td>" . $row['Full_Name'] . "</td><td>" . $row['Email'] . "</td> <td>" . $row['Passport_Number'] . "</td><td>$btn</td><td>$btnBlock</td></tr>";
|
||||||
}
|
}
|
||||||
?></table>
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- code contributed by Xu Xiaopeng (https://github.com/xxp1999) -->
|
<!-- code contributed by Xu Xiaopeng (https://github.com/xxp1999) -->
|
||||||
|
|
||||||
<div id="menu2" class="container tab-pane fade" style="margin-top:10px" >
|
<div id="menu2" class="container tab-pane fade" style="margin-top:10px">
|
||||||
<b>Separate two student numbers with a space.</b><br>
|
<b>Separate two student numbers with a space.</b><br>
|
||||||
<form action="batch_insert.php" method="post">
|
<form action="batch_insert.php" method="post">
|
||||||
<p>
|
<p>
|
||||||
|
@ -155,17 +146,13 @@ if(isset($_SESSION['info_Admin_Users'])) {
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
|
@ -182,155 +169,133 @@ if(isset($_SESSION['info_Admin_Users'])) {
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div id="menua" class="container tab-pane active"><br>
|
<div id="menua" class="container tab-pane active"><br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<b>Create new Portal </b>
|
<b>Create new 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="frm_createCourse" value="true" required="" />
|
||||||
Course Name
|
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
|
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 Name)
|
URL (Leave blank to use Course Name)
|
||||||
<input type="text" name="url" placeholder="Choose Custom URL " class="form-control" required="">
|
<input type="text" name="url" placeholder="Choose Custom URL " class="form-control" required="">
|
||||||
|
|
||||||
Academic Year
|
Academic Year
|
||||||
<input type="text" name="academic" placeholder="Academic Year" class="form-control" required="">
|
<input type="text" name="academic" placeholder="Academic Year" class="form-control" required="">
|
||||||
|
|
||||||
Faculty <br>
|
Faculty <br>
|
||||||
<input type="text" name="faculty" placeholder="Faculty" class="form-control" required="">
|
<input type="text" name="faculty" placeholder="Faculty" class="form-control" required="">
|
||||||
|
|
||||||
Assign Lecturer
|
Assign Lecturer
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<select name="lecturer" class="form-control">
|
<select name="lecturer" class="form-control">
|
||||||
<?php
|
<?php
|
||||||
$result = mysqli_query($con,"SELECT * FROM Users_Table WHERE UserType='Lecturer'");
|
$result = mysqli_query($con, "SELECT * FROM Users_Table WHERE UserType='Lecturer'");
|
||||||
if(mysqli_num_rows($result)==0)
|
if (mysqli_num_rows($result) == 0) {
|
||||||
{} else { while($row = mysqli_fetch_assoc($result)) {
|
} else {
|
||||||
$id=$row['User_ID'];
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
$name=$row['Full_Name'];
|
$id = $row['User_ID'];
|
||||||
|
$name = $row['Full_Name'];
|
||||||
echo "<option value='$id'> $name </option>";
|
echo "<option value='$id'> $name </option>";
|
||||||
}}?>
|
}
|
||||||
|
} ?>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
Assigned T/A <br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Assigned T/A <br>
|
|
||||||
<select name="ta" class="form-control">
|
<select name="ta" class="form-control">
|
||||||
<?php
|
<?php
|
||||||
$result = mysqli_query($con,"SELECT * FROM Users_Table WHERE UserType='TA'");
|
$result = mysqli_query($con, "SELECT * FROM Users_Table WHERE UserType='TA'");
|
||||||
if(mysqli_num_rows($result)==0)
|
if (mysqli_num_rows($result) == 0) {
|
||||||
{} else { while($row = mysqli_fetch_assoc($result)) {
|
} else {
|
||||||
$id=$row['User_ID'];
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
$name=$row['Full_Name'];
|
$id = $row['User_ID'];
|
||||||
|
$name = $row['Full_Name'];
|
||||||
echo "<option value='$id'> $name </option>";
|
echo "<option value='$id'> $name </option>";
|
||||||
}}?>
|
}
|
||||||
|
} ?>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
Verify Joining Students
|
Verify Joining Students
|
||||||
<input type="radio" name="verify" value="1"> Yes
|
<input type="radio" name="verify" value="1"> Yes
|
||||||
<input type="radio" name="verify" value="0" checked=""> No
|
<input type="radio" name="verify" value="0" checked=""> No
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<input type="submit" class="btn btn-primary" value="Create Portal"><br>
|
<input type="submit" class="btn btn-primary" value="Create Portal"><br>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
if(isset($_SESSION['info_Admin_Courses'])) {
|
if (isset($_SESSION['info_Admin_Courses'])) {
|
||||||
echo '<hr><div class="alert alert-info" role="alert">'.$_SESSION['info_Admin_Courses'].'</div>';
|
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_Admin_Courses'] . '</div>';
|
||||||
$_SESSION['info_Admin_Courses']=null;
|
$_SESSION['info_Admin_Courses'] = null;
|
||||||
}
|
}
|
||||||
if(isset($_SESSION['info_Admin_Courses'])) {
|
if (isset($_SESSION['info_Admin_Courses'])) {
|
||||||
echo '<hr><div class="alert alert-info" role="alert">'.$_SESSION['info_Admin_Courses'].'</div>';
|
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_Admin_Courses'] . '</div>';
|
||||||
$_SESSION['info_Admin_Courses']=null;
|
$_SESSION['info_Admin_Courses'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="menub" class="container tab-pane fade"><br>
|
<div id="menub" class="container tab-pane fade"><br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<b> Existing Course Portals </b>
|
<b> Existing Course Portals </b>
|
||||||
<hr>
|
<hr>
|
||||||
<table class="table-bordered" style="font-size: 10pt;">
|
<table class="table-bordered" style="font-size: 10pt;">
|
||||||
<tr> <th>Course Name </th> <th> Faculty </th> <th>Lecturer </th> <th>TAs</th> <th>Assign new TA </th> </tr>
|
<tr>
|
||||||
|
<th>Course Name </th>
|
||||||
|
<th> Faculty </th>
|
||||||
|
<th>Lecturer </th>
|
||||||
|
<th>TAs</th>
|
||||||
|
<th>Assign new TA </th>
|
||||||
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$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");
|
$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)
|
if (mysqli_num_rows($result) == 0) {
|
||||||
{} else { while($row = mysqli_fetch_assoc($result)) {
|
} else {
|
||||||
$name=$row['Course_Name'];
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
$code=$row['Course_Code'];
|
$name = $row['Course_Name'];
|
||||||
$faculty=$row['Faculty'];
|
$code = $row['Course_Code'];
|
||||||
$lecturer=$row['Full_Name'];
|
$faculty = $row['Faculty'];
|
||||||
$academic=$row['Academic_Year'];
|
$lecturer = $row['Full_Name'];
|
||||||
$c_id=$row['Course_ID'];
|
$academic = $row['Academic_Year'];
|
||||||
|
$c_id = $row['Course_ID'];
|
||||||
|
|
||||||
|
$resultTA = mysqli_query($con, "SELECT `Course_ID`, `TA`,users_table.Full_Name as TA_NAME FROM `course_ta`
|
||||||
|
|
||||||
$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
|
INNER JOIN users_table on users_table.User_ID=course_ta.TA
|
||||||
where course_ta.Course_ID=$c_id");
|
where course_ta.Course_ID=$c_id");
|
||||||
|
|
||||||
$ta="";
|
$ta = "";
|
||||||
while($rowTA = mysqli_fetch_assoc($resultTA)) {
|
while ($rowTA = mysqli_fetch_assoc($resultTA)) {
|
||||||
$ta=$ta." - ".$rowTA['TA_NAME'];
|
$ta = $ta . " - " . $rowTA['TA_NAME'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo"
|
|
||||||
<tr> <td>$code - $name</td> <td>$faculty </td> <td>$lecturer</td><td>$ta</td> <td><form method='get' action='Script.php'> <select name='ta' class=''>";
|
<tr> <td>$code - $name</td> <td>$faculty </td> <td>$lecturer</td><td>$ta</td> <td><form method='get' action='Script.php'> <select name='ta' class=''>";
|
||||||
|
|
||||||
|
$resultx = mysqli_query($con, "SELECT * FROM Users_Table WHERE UserType='TA'");
|
||||||
|
if (mysqli_num_rows($resultx) == 0) {
|
||||||
$resultx = mysqli_query($con,"SELECT * FROM Users_Table WHERE UserType='TA'");
|
} else {
|
||||||
if(mysqli_num_rows($resultx)==0)
|
while ($row = mysqli_fetch_assoc($resultx)) {
|
||||||
{} else { while($row = mysqli_fetch_assoc($resultx)) {
|
$id = $row['User_ID'];
|
||||||
$id=$row['User_ID'];
|
$name = $row['Full_Name'];
|
||||||
$name=$row['Full_Name'];
|
|
||||||
echo "<option value='$id'> $name </option>";
|
echo "<option value='$id'> $name </option>";
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "</select> <input type='hidden' name='assignTA' value='true'> <input type='hidden' name='id' value='$c_id'> <input type='submit' value='assign'></form> </td></tr>
|
||||||
echo "</select> <input type='hidden' name='assignTA' value='true'> <input type='hidden' name='id' value='$c_id'> <input type='submit' value='assign'></form> </td></tr>
|
|
||||||
";
|
";
|
||||||
|
}
|
||||||
|
} ?>
|
||||||
|
|
||||||
}}?>
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -338,30 +303,21 @@ echo "</select> <input type='hidden' name='assignTA' value='true'> <input type=
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function updatePass(id,pass)
|
function updatePass(id, pass) {
|
||||||
{
|
if (!confirm('Are you to Reset User Password')) {
|
||||||
if(!confirm('Are you to Reset User Password'))
|
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.location.href="\Script.php\?action=passchange&uid="+id+"&pass="+pass;
|
window.location.href = "\Script.php\?action=passchange&uid=" + id + "&pass=" + pass;
|
||||||
}
|
}
|
||||||
|
|
||||||
function blockUser(id,status)
|
function blockUser(id, status) {
|
||||||
{
|
if (!confirm('Are you to change User Status')) {
|
||||||
if(!confirm('Are you to change User Status'))
|
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.location.href="\Script.php\?action=statuschange&uid="+id+"&status="+status;
|
window.location.href = "\Script.php\?action=statuschange&uid=" + id + "&status=" + status;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
610
Course.php
610
Course.php
|
@ -2,29 +2,25 @@
|
||||||
include 'NoDirectPhpAcess.php';
|
include 'NoDirectPhpAcess.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$page='Courses+';
|
$page = 'Courses+';
|
||||||
include 'Header.php';
|
include 'Header.php';
|
||||||
$student_id = $_SESSION["user_student_id"];
|
$student_id = $_SESSION["user_student_id"];
|
||||||
$group_id = $_SESSION["user_group_id"];
|
$group_id = $_SESSION["user_group_id"];
|
||||||
$c_date = date("Y-m-d H:i");
|
$c_date = date("Y-m-d H:i");
|
||||||
|
|
||||||
|
if (!empty($_GET["url"])) {
|
||||||
if(!empty($_GET["url"]))
|
|
||||||
{
|
|
||||||
$course_url = $_GET["url"];
|
$course_url = $_GET["url"];
|
||||||
$result = mysqli_query($con,"SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `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` "
|
. " `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members` "
|
||||||
. " , users_table.Full_Name FROM `courses_table` INNER JOIN users_table"
|
. " , 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' ");
|
. " ON users_table.User_ID=courses_table.Lecturer_User_ID where URL='$course_url' ");
|
||||||
|
|
||||||
if(mysqli_num_rows($result)==0) {
|
if (mysqli_num_rows($result) == 0) {
|
||||||
|
|
||||||
echo "No course matching the given course URL: ".$course_url;
|
|
||||||
|
|
||||||
|
echo "No course matching the given course URL: " . $course_url;
|
||||||
} else {
|
} else {
|
||||||
while($row = mysqli_fetch_assoc($result)) {
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
$name = $row['Course_Name'];
|
$name = $row['Course_Name'];
|
||||||
$code = $row['Course_Code'];
|
$code = $row['Course_Code'];
|
||||||
$faculty = $row['Faculty'];
|
$faculty = $row['Faculty'];
|
||||||
|
@ -41,9 +37,9 @@ if(!empty($_GET["url"]))
|
||||||
} else {
|
} else {
|
||||||
$ta_name = "";
|
$ta_name = "";
|
||||||
while ($row = mysqli_fetch_assoc($ta_result)) {
|
while ($row = mysqli_fetch_assoc($ta_result)) {
|
||||||
$ta_name = $ta_name.$row['Full_Name']." ";
|
$ta_name = $ta_name . $row['Full_Name'] . " ";
|
||||||
}
|
}
|
||||||
$ta_name = trim ($ta_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'>
|
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>
|
Courses > $name ($code) > Lab Reports <br> <span style='font-size:8pt'>Faculty: $faculty | Year: $academic | Lecturer: $lecturer | Teaching Assistant: $ta_name </span>
|
||||||
</a></div> ";
|
</a></div> ";
|
||||||
|
@ -55,29 +51,26 @@ if(!empty($_GET["url"]))
|
||||||
|
|
||||||
<div class="row" style='margin-left:20px;float:left'>
|
<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>';
|
echo '<hr><div class="alert alert-info" role="alert" style="float:left;">' . $_SESSION['info_ReMarking'] . '</div>';
|
||||||
$_SESSION['info_ReMarking']=null;
|
$_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>';
|
echo '<hr><div class="alert alert-info" role="alert" style="float:left;">' . $_SESSION['info_courses'] . '</div>';
|
||||||
$_SESSION['info_courses']=null;
|
$_SESSION['info_courses'] = null;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if( $_SESSION['user_type'] == "Student")
|
if ($_SESSION['user_type'] == "Student") {
|
||||||
{
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="row" style="width:95%;margin:auto; text-align:left;">
|
<div class="row" style="width:95%;margin:auto; text-align:left;">
|
||||||
|
@ -102,10 +95,11 @@ if( $_SESSION['user_type'] == "Student")
|
||||||
|
|
||||||
<!----------Delete Course Button----------->
|
<!----------Delete Course Button----------->
|
||||||
<li>
|
<li>
|
||||||
<html>
|
<html>
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="modal fade" id="delcourse">
|
<body>
|
||||||
|
|
||||||
|
<div class="modal fade" id="delcourse">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
@ -120,7 +114,7 @@ if( $_SESSION['user_type'] == "Student")
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<form method="POST" action="">
|
<form method="POST" action="">
|
||||||
<button type="button" class="btn action-button blue" data-dismiss="modal">Cancel</button>
|
<button type="button" class="btn action-button blue" data-dismiss="modal">Cancel</button>
|
||||||
<input type="submit" name="submit" class="btn action-button red" value="Delete"/>
|
<input type="submit" name="submit" class="btn action-button red" value="Delete" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -134,77 +128,69 @@ if( $_SESSION['user_type'] == "Student")
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Connect to MySQL database
|
// Connect to MySQL database
|
||||||
$con = mysqli_connect("localhost", $mysql_username, $mysql_password, "lrr");
|
$con = mysqli_connect("localhost", $mysql_username, $mysql_password, "lrr");
|
||||||
|
|
||||||
// Check connection
|
// Check connection
|
||||||
if (mysqli_connect_errno())
|
if (mysqli_connect_errno()) {
|
||||||
{
|
|
||||||
echo "Failed to connect to MySQL: " . mysqli_connect_error();
|
echo "Failed to connect to MySQL: " . mysqli_connect_error();
|
||||||
}
|
}
|
||||||
if(isset($_POST['submit'])){
|
if (isset($_POST['submit'])) {
|
||||||
header("Location: Courses.php");
|
header("Location: Courses.php");
|
||||||
$result = mysqli_query($con, "DELETE FROM course_students_table WHERE Course_ID='$course_id'");
|
$result = mysqli_query($con, "DELETE FROM course_students_table WHERE Course_ID='$course_id'");
|
||||||
|
}
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
|
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||||
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||||
crossorigin="anonymous"></script>
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
|
|
||||||
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
|
|
||||||
crossorigin="anonymous"></script>
|
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
|
|
||||||
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
|
|
||||||
crossorigin="anonymous"></script>
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
/*--------------------[ Delete Course Button ]*/
|
/*--------------------[ Delete Course Button ]*/
|
||||||
.action-button {
|
.action-button {
|
||||||
font-family: 'Pacifico', cursive;
|
font-family: 'Pacifico', cursive;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.red {
|
|
||||||
|
.red {
|
||||||
background-color: #E74C3C;
|
background-color: #E74C3C;
|
||||||
border-bottom: 5px solid #BD3E31;
|
border-bottom: 5px solid #BD3E31;
|
||||||
text-shadow: 0px -2px #BD3E31;
|
text-shadow: 0px -2px #BD3E31;
|
||||||
}
|
}
|
||||||
.blue {
|
|
||||||
|
.blue {
|
||||||
background-color: #4d4dff;
|
background-color: #4d4dff;
|
||||||
border-bottom: 5px solid #4d4dff;
|
border-bottom: 5px solid #4d4dff;
|
||||||
text-shadow: 0px -2px #4d4dff;
|
text-shadow: 0px -2px #4d4dff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
|
||||||
</li>
|
</html>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div id="menu1" class="container tab-pane active"><br>
|
<div id="menu1" class="container tab-pane active"><br>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Get groups of this students
|
// 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);
|
$resultx1 = mysqli_query($con, $sql);
|
||||||
while($row = mysqli_fetch_assoc($resultx1))
|
while ($row = mysqli_fetch_assoc($resultx1)) {
|
||||||
{
|
|
||||||
$_SESSION['group_id'] = $row['Course_Group_id'];
|
$_SESSION['group_id'] = $row['Course_Group_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$group_id = $_SESSION['group_id'];
|
$group_id = $_SESSION['group_id'];
|
||||||
|
|
||||||
if($group_id == "")
|
if ($group_id == "") {
|
||||||
{
|
|
||||||
$group_id = 0; // no group. If the student has a group, the group number should be greater than 0.
|
$group_id = 0; // no group. If the student has a group, the group number should be greater than 0.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,65 +199,63 @@ if(isset($_POST['submit'])){
|
||||||
// (3) none of the student's group members have already submitted
|
// (3) none of the student's group members have already submitted
|
||||||
// the assignment.
|
// 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`".
|
$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`".
|
" FROM `lab_reports_table`" .
|
||||||
" WHERE Course_ID=$course_id".
|
" 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 (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))".
|
" 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";
|
" ORDER BY Lab_Report_ID DESC";
|
||||||
|
|
||||||
$result1 = mysqli_query($con, $var);
|
$result1 = mysqli_query($con, $var);
|
||||||
|
|
||||||
if(mysqli_num_rows($result1)==0)
|
if (mysqli_num_rows($result1) == 0) {
|
||||||
{
|
|
||||||
echo "No active assignments for this course so far.";
|
echo "No active assignments for this course so far.";
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
while($row = mysqli_fetch_assoc($result1)) {
|
while ($row = mysqli_fetch_assoc($result1)) {
|
||||||
$title=$row['Title'];
|
$title = $row['Title'];
|
||||||
$type=$row['Type'];
|
$type = $row['Type'];
|
||||||
$Marks=$row['Marks'];
|
$Marks = $row['Marks'];
|
||||||
$ins=$row['Instructions'];
|
$ins = $row['Instructions'];
|
||||||
$posted=$row['Posted_Date'];
|
$posted = $row['Posted_Date'];
|
||||||
$deadline=$row['Deadline'];
|
$deadline = $row['Deadline'];
|
||||||
$att1=$row['Attachment_link_1'];
|
$att1 = $row['Attachment_link_1'];
|
||||||
$att2=$row['Attachment_link_2'];
|
$att2 = $row['Attachment_link_2'];
|
||||||
$att3=$row['Attachment_link_3'];
|
$att3 = $row['Attachment_link_3'];
|
||||||
$att4=$row['Attachment_link_4'];
|
$att4 = $row['Attachment_link_4'];
|
||||||
$labid=$row['Lab_Report_ID'];
|
$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!=""){
|
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!=""){
|
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!=""){
|
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 " <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;'>
|
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 ($type) <br> <span style='font-size:8pt'> $ins</span>
|
$title ($type) <br> <span style='font-size:8pt'> $ins</span>
|
||||||
<br> <span style='font-size:8pt'>Posted : $posted Deadline : $deadline ($Marks Marks) <a href='~\..\SubmitLab.php?id=$labid&url=$url' class='btn-sm btn-info' style='margin-left:50px;'> Submit Lab Report</a><br> Attachments : $full_link </span>
|
<br> <span style='font-size:8pt'>Posted : $posted Deadline : $deadline ($Marks Marks) <a href='~\..\SubmitLab.php?id=$labid&url=$url' class='btn-sm btn-info' style='margin-left:50px;'> Submit Lab Report</a><br> Attachments : $full_link </span>
|
||||||
</div></k>";
|
</div></k>";
|
||||||
|
}
|
||||||
}}
|
}
|
||||||
echo "";
|
echo "";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="menu2" class="container tab-pane"><br>
|
<div id="menu2" class="container tab-pane"><br>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$group_id=$_SESSION['group_id'];
|
$group_id = $_SESSION['group_id'];
|
||||||
if($group_id == ""){$group_id = -1;} // Individual assignment does not require the student to have a group id. Therefore, the group is an empty string. To make the following SQL statement work properly, initialize the group id to -1.
|
if ($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`
|
$group_id = -1;
|
||||||
|
} // Individual assignment does not require the student to have a group id. Therefore, the group is an empty string. To make the following SQL statement work properly, initialize the group id to -1.
|
||||||
|
$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`
|
FROM `lab_reports_table`
|
||||||
WHERE
|
WHERE
|
||||||
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 and Deadline < '$c_date'"
|
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 and Deadline < '$c_date'"
|
||||||
|
@ -283,61 +267,51 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St
|
||||||
. ""
|
. ""
|
||||||
. "ORDER by Lab_Report_ID DESC");
|
. "ORDER by Lab_Report_ID DESC");
|
||||||
|
|
||||||
|
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 {
|
} else {
|
||||||
while($row = mysqli_fetch_assoc($result)) {
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
$title=$row['Title'];
|
$title = $row['Title'];
|
||||||
$marks=$row['Marks'];
|
$marks = $row['Marks'];
|
||||||
$ins=$row['Instructions'];
|
$ins = $row['Instructions'];
|
||||||
$posted=$row['Posted_Date'];
|
$posted = $row['Posted_Date'];
|
||||||
$deadline=$row['Deadline'];
|
$deadline = $row['Deadline'];
|
||||||
$att1=$row['Attachment_link_1'];
|
$att1 = $row['Attachment_link_1'];
|
||||||
$att2=$row['Attachment_link_2'];
|
$att2 = $row['Attachment_link_2'];
|
||||||
$att3=$row['Attachment_link_3'];
|
$att3 = $row['Attachment_link_3'];
|
||||||
$att4=$row['Attachment_link_4'];
|
$att4 = $row['Attachment_link_4'];
|
||||||
$id=$row['Lab_Report_ID'];
|
$id = $row['Lab_Report_ID'];
|
||||||
|
|
||||||
|
$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="<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";
|
|
||||||
|
|
||||||
if($att2!=""){
|
|
||||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att2'>$att2</a>";
|
|
||||||
}
|
}
|
||||||
if($att3!=""){
|
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!=""){
|
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='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'><span class='btn-sm btn-warning' style='margin-left:0px;'>MISSED</span> $title ($marks Marks) <br> <span style='font-size:8pt'> $ins</span>
|
echo "<div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'><span class='btn-sm btn-warning' style='margin-left:0px;'>MISSED</span> $title ($marks Marks) <br> <span style='font-size:8pt'> $ins</span>
|
||||||
<br> <span style='font-size:8pt'>Posted: $posted<br> Deadline: $deadline <br> Attachments : $full_link </span>
|
<br> <span style='font-size:8pt'>Posted: $posted<br> Deadline: $deadline <br> Attachments : $full_link </span>
|
||||||
</div>";
|
</div>";
|
||||||
|
}
|
||||||
}}
|
}
|
||||||
echo "";
|
echo "";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="menu3" class="container tab-pane"><br>
|
<div id="menu3" class="container tab-pane"><br>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
$group_id = $_SESSION['group_id'];
|
$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
|
if ($group_id == "") {
|
||||||
|
$group_id = -1;
|
||||||
|
} // This fixes "Submitted report not shown" http://118.25.96.118/bugzilla/show_bug.cgi?id=176
|
||||||
|
|
||||||
$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`
|
$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`
|
FROM `lab_reports_table`
|
||||||
|
@ -346,40 +320,36 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St
|
||||||
|
|
||||||
$resultx = mysqli_query($con, $sql_stmt);
|
$resultx = mysqli_query($con, $sql_stmt);
|
||||||
|
|
||||||
|
if (mysqli_num_rows($resultx) == 0) {
|
||||||
if(mysqli_num_rows($resultx)==0)
|
|
||||||
{
|
|
||||||
echo "You have no lab report submissions in this course.";
|
echo "You have no lab report submissions in this course.";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
while($row = mysqli_fetch_assoc($resultx)) {
|
while ($row = mysqli_fetch_assoc($resultx)) {
|
||||||
$lab_repo_id=$row['Lab_Report_ID'];
|
$lab_repo_id = $row['Lab_Report_ID'];
|
||||||
$title=$row['Title'];
|
$title = $row['Title'];
|
||||||
$marks=$row['Marks'];
|
$marks = $row['Marks'];
|
||||||
$ins=$row['Instructions'];
|
$ins = $row['Instructions'];
|
||||||
$posted=$row['Posted_Date'];
|
$posted = $row['Posted_Date'];
|
||||||
$deadline=$row['Deadline'];
|
$deadline = $row['Deadline'];
|
||||||
$att1=$row['Attachment_link_1'];
|
$att1 = $row['Attachment_link_1'];
|
||||||
$att2=$row['Attachment_link_2'];
|
$att2 = $row['Attachment_link_2'];
|
||||||
$att3=$row['Attachment_link_3'];
|
$att3 = $row['Attachment_link_3'];
|
||||||
$att4=$row['Attachment_link_4'];
|
$att4 = $row['Attachment_link_4'];
|
||||||
$id = $row['Lab_Report_ID'];
|
$id = $row['Lab_Report_ID'];
|
||||||
if( $c_date < $deadline)
|
if ($c_date < $deadline) {
|
||||||
{
|
$submittedx = "<a href='~\..\SubmitLab.php?id=$id&url=$url' class='btn-sm btn-default'><i class='fa fa-check-circle'></i> Re-Submit </a>";
|
||||||
$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!=""){
|
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!=""){
|
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!=""){
|
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 " <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;'>
|
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;'>
|
||||||
|
@ -387,8 +357,7 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St
|
||||||
<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> <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: ";
|
<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`,
|
lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`,
|
||||||
`Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,
|
`Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,
|
||||||
`Title`,users_table.Full_Name,course_group_members_table.Student_ID
|
`Title`,users_table.Full_Name,course_group_members_table.Student_ID
|
||||||
|
@ -397,16 +366,14 @@ Left JOIN users_table on users_table.Student_ID=lab_report_submissions.Student_
|
||||||
left JOIN course_group_members_table on course_group_members_table.Course_Group_id=lab_report_submissions.Course_Group_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')");
|
where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$student_id')");
|
||||||
|
|
||||||
if(mysqli_num_rows($Sub_result) == 0)
|
if (mysqli_num_rows($Sub_result) == 0) {
|
||||||
{
|
|
||||||
echo "No Attachments found.";
|
echo "No Attachments found.";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
while($row = mysqli_fetch_assoc($Sub_result)) {
|
while ($row = mysqli_fetch_assoc($Sub_result)) {
|
||||||
$at1=$row['Attachment1'];
|
$at1 = $row['Attachment1'];
|
||||||
$at2=$row['Attachment2'];
|
$at2 = $row['Attachment2'];
|
||||||
$at3=$row['Attachment3'];
|
$at3 = $row['Attachment3'];
|
||||||
$at4=$row['Attachment4'];
|
$at4 = $row['Attachment4'];
|
||||||
|
|
||||||
$base_at1 = basename($at1);
|
$base_at1 = basename($at1);
|
||||||
$base_at2 = basename($at2);
|
$base_at2 = basename($at2);
|
||||||
|
@ -415,56 +382,43 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
|
|
||||||
$full_link = "<a href='~\..\Download.php?file=$at1&attachment=1'>$base_at1</a>"; // prevent students from directly accessing their classmates' submissions
|
$full_link = "<a href='~\..\Download.php?file=$at1&attachment=1'>$base_at1</a>"; // prevent students from directly accessing their classmates' submissions
|
||||||
|
|
||||||
if($at2!=""){
|
if ($at2 != "") {
|
||||||
$full_link= $full_link." | <a href='~\..\Download.php?file=$at2&attachment=2'>$base_at2</a>";
|
$full_link = $full_link . " | <a href='~\..\Download.php?file=$at2&attachment=2'>$base_at2</a>";
|
||||||
}
|
}
|
||||||
if($at3!=""){
|
if ($at3 != "") {
|
||||||
$full_link= $full_link." | <a href='~\..\Download.php?file=$at3&attachment=3'>$base_at3</a>";
|
$full_link = $full_link . " | <a href='~\..\Download.php?file=$at3&attachment=3'>$base_at3</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($at4!=""){
|
if ($at4 != "") {
|
||||||
$full_link= $full_link." | <a href='~\..\Download.php?file=$at4&attachment=4'>$base_at4</a>";
|
$full_link = $full_link . " | <a href='~\..\Download.php?file=$at4&attachment=4'>$base_at4</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $full_link;
|
echo $full_link;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "</span></div></k>";
|
echo "</span></div></k>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}}
|
|
||||||
echo "";
|
echo "";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?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)) {
|
||||||
<?php
|
$Group_Leader = $row['Group_Leader'];
|
||||||
$sqli=mysqli_query($con, "SELECT * from course_groups_table WHERE Course_Group_id=$group_id and Course_id=$course_id");
|
$Group_Member = $row['Group_Member'];
|
||||||
while($row = mysqli_fetch_assoc($sqli))
|
$Group_Member2 = $row['Group_Member2'];
|
||||||
{ $Group_Leader=$row['Group_Leader'];
|
$Group_Member3 = $row['Group_Member3'];
|
||||||
$Group_Member=$row['Group_Member'];
|
$Group_Member4 = $row['Group_Member4'];
|
||||||
$Group_Member2=$row['Group_Member2'];
|
|
||||||
$Group_Member3=$row['Group_Member3'];
|
|
||||||
$Group_Member4=$row['Group_Member4'];
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="menu4" class="container tab-pane"><br>
|
<div id="menu4" class="container tab-pane"><br>
|
||||||
<?php
|
<?php
|
||||||
$resultx = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_reports_table.`Lab_Report_ID`, `Student_id`, "
|
$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`,
|
. "`Course_Group_id`, `Notes`, lab_report_submissions.`Marks`,
|
||||||
lab_report_submissions.Remarking_Reason,
|
lab_report_submissions.Remarking_Reason,
|
||||||
`Status`, lab_reports_table.Title Lab_Title,lab_reports_table.Marks Original_marks FROM `lab_report_submissions` "
|
`Status`, lab_reports_table.Title Lab_Title,lab_reports_table.Marks Original_marks FROM `lab_report_submissions` "
|
||||||
|
@ -482,47 +436,37 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
. " lab_reports_table.Lab_Report_ID in (select Lab_Report_ID from lab_report_submissions"
|
. " lab_reports_table.Lab_Report_ID in (select Lab_Report_ID from lab_report_submissions"
|
||||||
. " where (Status='Marked' or Status='Remarking') and (Student_id=$student_id or Course_Group_id=$group_id) and Course_ID=$course_id) ORDER by Submission_ID DESC");
|
. " where (Status='Marked' or Status='Remarking') and (Student_id=$student_id or Course_Group_id=$group_id) and Course_ID=$course_id) ORDER by Submission_ID DESC");
|
||||||
|
|
||||||
|
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 {
|
||||||
} else { while($row = mysqli_fetch_assoc($resultx)) {
|
while ($row = mysqli_fetch_assoc($resultx)) {
|
||||||
$title=$row['Lab_Title'];
|
$title = $row['Lab_Title'];
|
||||||
$marks=$row['Marks'];
|
$marks = $row['Marks'];
|
||||||
$Originalmarks=$row['Original_marks'];
|
$Originalmarks = $row['Original_marks'];
|
||||||
$ins=$row['Instructions'];
|
$ins = $row['Instructions'];
|
||||||
$posted=$row['Posted_Date'];
|
$posted = $row['Posted_Date'];
|
||||||
$deadline=$row['Deadline'];
|
$deadline = $row['Deadline'];
|
||||||
$att1=$row['Attachment_link_1'];
|
$att1 = $row['Attachment_link_1'];
|
||||||
$att2=$row['Attachment_link_2'];
|
$att2 = $row['Attachment_link_2'];
|
||||||
$att3=$row['Attachment_link_3'];
|
$att3 = $row['Attachment_link_3'];
|
||||||
$att4=$row['Attachment_link_4'];
|
$att4 = $row['Attachment_link_4'];
|
||||||
$id=$row['Lab_Report_ID'];
|
$id = $row['Lab_Report_ID'];
|
||||||
$Submission_ID=$row['Submission_ID'];
|
$Submission_ID = $row['Submission_ID'];
|
||||||
$notes=$row['Notes'];
|
$notes = $row['Notes'];
|
||||||
$status= $row['Status'];
|
$status = $row['Status'];
|
||||||
$remarking_reason=$row['Remarking_Reason'];
|
$remarking_reason = $row['Remarking_Reason'];
|
||||||
if($status=='Marked')
|
if ($status == 'Marked') {
|
||||||
{
|
$rm_data = "\Script.php?remarking=yes&id=$Submission_ID&url=$url&status=Remarking";
|
||||||
$rm_data="\Script.php?remarking=yes&id=$Submission_ID&url=$url&status=Remarking";
|
$remarking = "<button onclick='remarking(\"$rm_data\")' class='btn-sm btn-success'> Request Remarking </button>";
|
||||||
$remarking="<button onclick='remarking(\"$rm_data\")' class='btn-sm btn-success'> Request Remarking </button>";
|
|
||||||
}
|
}
|
||||||
if($status=='Remarking')
|
if ($status == 'Remarking') {
|
||||||
{
|
$remarking = "<span style='color:orange'><i class='fa fa-info-circle'></i> Remarking Request sent </span> <br> Remarking Reason:<i>$remarking_reason </i> <br>";
|
||||||
$remarking="<span style='color:orange'><i class='fa fa-info-circle'></i> Remarking Request sent </span> <br> Remarking Reason:<i>$remarking_reason </i> <br>";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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;'>
|
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 <b> ($marks Marks out of $Originalmarks)</b><br><small> Lecturer Feedback : $notes </small> $remarking <br> Submission files :";
|
$title <b> ($marks Marks out of $Originalmarks)</b><br><small> Lecturer Feedback : $notes </small> $remarking <br> Submission 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`,
|
lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`,
|
||||||
`Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,
|
`Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,
|
||||||
`Title`,users_table.Full_Name,course_group_members_table.Student_ID
|
`Title`,users_table.Full_Name,course_group_members_table.Student_ID
|
||||||
|
@ -531,45 +475,36 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
left JOIN course_group_members_table on course_group_members_table.Course_Group_id=lab_report_submissions.Course_Group_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.Student_id='$student_id'");
|
where Lab_Report_ID=$id and lab_report_submissions.Student_id='$student_id'");
|
||||||
|
|
||||||
if(mysqli_num_rows($Sub_result)==0)
|
if (mysqli_num_rows($Sub_result) == 0) {
|
||||||
{
|
|
||||||
echo "No Attachments found.";
|
echo "No Attachments found.";
|
||||||
|
} else {
|
||||||
|
while ($row = mysqli_fetch_assoc($Sub_result)) {
|
||||||
|
$at1 = $row['Attachment1'];
|
||||||
|
$at2 = $row['Attachment2'];
|
||||||
|
$at3 = $row['Attachment3'];
|
||||||
|
$at4 = $row['Attachment4'];
|
||||||
|
|
||||||
} else { while($row = mysqli_fetch_assoc($Sub_result)) {
|
$full_link = "<a href='~\..\Lab_Report_Submisions\\$at1'>$at1</a>";
|
||||||
$at1=$row['Attachment1'];
|
|
||||||
$at2=$row['Attachment2'];
|
|
||||||
$at3=$row['Attachment3'];
|
|
||||||
$at4=$row['Attachment4'];
|
|
||||||
|
|
||||||
$full_link="<a href='~\..\Lab_Report_Submisions\\$at1'>$at1</a>";
|
if ($at2 != "") {
|
||||||
|
$full_link = $full_link . "| <a href='~\..\Lab_Report_Submisions\\$at2'>$at2</a>";
|
||||||
if($at2!=""){
|
|
||||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$at2'>$at2</a>";
|
|
||||||
}
|
}
|
||||||
if($at3!=""){
|
if ($at3 != "") {
|
||||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$at3'>$at3</a>";
|
$full_link = $full_link . "| <a href='~\..\Lab_Report_Submisions\\$at3'>$at3</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($at4!=""){
|
if ($at4 != "") {
|
||||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Submisions\\$at4'>$at4</a>";
|
$full_link = $full_link . "| <a href='~\..\Lab_Report_Submisions\\$at4'>$at4</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $full_link;
|
echo $full_link;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}}
|
|
||||||
echo "</div></k>";
|
echo "</div></k>";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -579,200 +514,161 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<h3>Class Groups</h3>
|
<h3>Class Groups</h3>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$resultx1 = mysqli_query($con,"SELECT `Course_Group_id` FROM `course_groups_table` WHERE Course_id=$course_id");
|
$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'];}
|
while ($row = mysqli_fetch_assoc($resultx1)) {
|
||||||
|
$count_groups = $row['Course_Group_id'];
|
||||||
|
}
|
||||||
|
|
||||||
echo " <button onclick='CreateGroup()' class='btn btn-primary'> Create Group</button>";
|
echo " <button onclick='CreateGroup()' class='btn btn-primary'> Create Group</button>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$result = mysqli_query($con," SELECT `ID`, course_group_members_table.Course_Group_id, `Student_ID`,
|
$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
|
`Status`,course_groups_table.Group_Name,course_groups_table.Course_id
|
||||||
FROM `course_group_members_table` INNER JOIN course_groups_table on
|
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");
|
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";
|
echo "You have no Group in this Course";
|
||||||
} else { while($row = mysqli_fetch_assoc($result)) {
|
} else {
|
||||||
$name=$row['Group_Name'];
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
$id=$row['Course_Group_id'];
|
$name = $row['Group_Name'];
|
||||||
$status=$row['Status'];
|
$id = $row['Course_Group_id'];
|
||||||
|
$status = $row['Status'];
|
||||||
|
|
||||||
|
$extra = " - <a href='#' class='' onclick='invite($id)'> Invite Others</a></small>";
|
||||||
|
|
||||||
$extra=" - <a href='#' class='' onclick='invite($id)'> Invite Others</a></small>";
|
if ($status == "Invited") {
|
||||||
|
$extra2 = " <a href='#' class='' onclick='accept($id,1)'>Accept</a></small>";
|
||||||
if($status=="Invited")
|
$extra3 = " <a href='#' class='' onclick='accept($id,0)'>Decline</a></small>";
|
||||||
{
|
|
||||||
$extra2=" <a href='#' class='' onclick='accept($id,1)'>Accept</a></small>";
|
|
||||||
$extra3=" <a href='#' class='' onclick='accept($id,0)'>Decline</a></small>";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
echo "<div class='btn-default'><small> $name ($status) $extra $extra2 $extra3</small></div>";
|
echo "<div class='btn-default'><small> $name ($status) $extra $extra2 $extra3</small></div>";
|
||||||
|
|
||||||
$rs2=mysqli_query($con,"SELECT `ID`, `Course_Group_id`, course_group_members_table.Student_ID,
|
$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`
|
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
|
INNER JOIN users_table on users_table.Student_ID=course_group_members_table.Student_ID
|
||||||
where course_group_members_table.Course_Group_id=$id");
|
where course_group_members_table.Course_Group_id=$id");
|
||||||
|
|
||||||
while($row = mysqli_fetch_assoc($rs2)) {
|
while ($row = mysqli_fetch_assoc($rs2)) {
|
||||||
$name=$row['Full_Name'];
|
$name = $row['Full_Name'];
|
||||||
$id=$row['Course_Group_id'];
|
$id = $row['Course_Group_id'];
|
||||||
$status=$row['Status'];
|
$status = $row['Status'];
|
||||||
$Student_ID=$row['Student_ID'];
|
$Student_ID = $row['Student_ID'];
|
||||||
|
|
||||||
|
|
||||||
echo "<li><small> $name-$Student_ID ($status)</small></li>";
|
echo "<li><small> $name-$Student_ID ($status)</small></li>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
include 'Footer.php';
|
include 'Footer.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<script src="./css/jquery-1.11.1.min.js"></script>
|
<script src="./css/jquery-1.11.1.min.js"></script>
|
||||||
<script src="./css/jquery-ui.min.js"></script>
|
<script src="./css/jquery-ui.min.js"></script>
|
||||||
<link rel="stylesheet" href="./css/jquery-ui.css" />
|
<link rel="stylesheet" href="./css/jquery-ui.css" />
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
function CreateGroup() {
|
||||||
|
|
||||||
function CreateGroup() {
|
try {
|
||||||
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="creategroup" value="true">\n\
|
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="creategroup" value="true">\n\
|
||||||
<input type="hidden" name="student_id" value="<?php echo $student_id; ?>" > Group Name <input type="text" name="name">\n\
|
<input type="hidden" name="student_id" value="<?php echo $student_id; ?>" > Group Name <input type="text" name="name">\n\
|
||||||
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="id" value="<?php echo $course_id; ?>"> </form>').dialog({
|
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="id" value="<?php echo $course_id; ?>"> </form>').dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
title:'Create Group',
|
title: 'Create Group',
|
||||||
buttons: {
|
buttons: {
|
||||||
'Create Group': function () {
|
'Create Group': function() {
|
||||||
$('#frm').submit();
|
$('#frm').submit();
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
},
|
},
|
||||||
'X': function () {
|
'X': function() {
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch(e){ alert(e); }
|
} catch (e) {
|
||||||
}
|
alert(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function invite(id) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
function invite(id) {
|
|
||||||
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="groupinvite" value="true">\n\
|
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="groupinvite" value="true">\n\
|
||||||
<input type="hidden" name="groupid" value="'+id+'" > Enter Student_ID to Invite <input type="text" name="student_id">\n\
|
<input type="hidden" name="groupid" value="' + id + '" > Enter Student_ID to Invite <input type="text" name="student_id">\n\
|
||||||
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="courseid" value="<?php echo $course_id; ?>"> </form>').dialog({
|
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="courseid" value="<?php echo $course_id; ?>"> </form>').dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
title:'Invite Students to Group',
|
title: 'Invite Students to Group',
|
||||||
buttons: {
|
buttons: {
|
||||||
'Invite': function () {
|
'Invite': function() {
|
||||||
$('#frm').submit();
|
$('#frm').submit();
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
},
|
},
|
||||||
'X': function () {
|
'X': function() {
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch(e){ alert(e); }
|
} catch (e) {
|
||||||
}
|
alert(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function accept(id, val) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function accept(id,val) {
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="acceptinvite" value="true">\n\
|
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="acceptinvite" value="true">\n\
|
||||||
<input type="hidden" name="groupid" value="'+id+'" > \n\ <input type="hidden" name="action" value="'+val+'" > \n\
|
<input type="hidden" name="groupid" value="' + id + '" > \n\ <input type="hidden" name="action" value="' + val + '" > \n\
|
||||||
\n\
|
\n\
|
||||||
<input type="hidden" name="student_id" value="<?php echo $student_id; ?>" > \n\
|
<input type="hidden" name="student_id" value="<?php echo $student_id; ?>" > \n\
|
||||||
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="courseid" value="<?php echo $course_id; ?>"> </form>').dialog({
|
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="courseid" value="<?php echo $course_id; ?>"> </form>').dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
title:'Respond to Group Invite',
|
title: 'Respond to Group Invite',
|
||||||
buttons: {
|
buttons: {
|
||||||
'Confirm': function () {
|
'Confirm': function() {
|
||||||
$('#frm').submit();
|
$('#frm').submit();
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
},
|
},
|
||||||
'X': function () {
|
'X': function() {
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch(e){ alert(e); }
|
} catch (e) {
|
||||||
}
|
alert(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function remarking(data) {
|
||||||
|
|
||||||
|
var details = prompt("Please enter your remarking reasons", "");
|
||||||
|
|
||||||
function remarking(data)
|
window.location.href = data + "&details=" + details;
|
||||||
{
|
}
|
||||||
|
|
||||||
var details = prompt("Please enter your remarking reasons","");
|
|
||||||
|
|
||||||
window.location.href = data+"&details="+details;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
21
Footer.php
21
Footer.php
|
@ -1,23 +1,4 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br><br><br><br><br><br><br><br><br>
|
<br><br><br><br><br><br><br><br><br>
|
||||||
<div style="background-color:;width:100%di">
|
<div style="background-color:white;width:100%di">
|
||||||
|
|
||||||
</div>
|
</div>
|
140
Header.php
140
Header.php
|
@ -13,28 +13,25 @@ if (mysqli_connect_errno()) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
|
<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="./font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="./css/bootstrap.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>
|
|
||||||
<script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script>
|
|
||||||
|
|
||||||
|
<script src="./css/jquery.min.js" type="text/javascript"></script>
|
||||||
|
<script src="./css/bootsrap.min.js" type="text/javascript"></script>
|
||||||
|
<script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" style="padding-left:150px;padding-right:150px;margin:auto;">
|
<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;"> LRR </a>
|
<a class="navbar-brand" href="~\..\index.php"> <img src="logo.png" style="width:30px;heigh:30px;"> LRR </a>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
@ -48,8 +45,7 @@ if (mysqli_connect_errno()) {
|
||||||
<!-- <a class='nav-link' href='~\..\Visitors.php'> <i class='fa fa-globe'></i> Visitor Portal <span class='sr-only'>(current)</span></a> -->
|
<!-- <a class='nav-link' href='~\..\Visitors.php'> <i class='fa fa-globe'></i> Visitor Portal <span class='sr-only'>(current)</span></a> -->
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
if(isset($_SESSION["user_fullname"]))
|
if (isset($_SESSION["user_fullname"])) {
|
||||||
{
|
|
||||||
|
|
||||||
echo " <a class='nav-link' href='~\..\Courses.php'><i class='fa fa-book'></i> Courses <span class='sr-only'>(current)</span></a>";
|
echo " <a class='nav-link' href='~\..\Courses.php'><i class='fa fa-book'></i> Courses <span class='sr-only'>(current)</span></a>";
|
||||||
?>
|
?>
|
||||||
|
@ -59,21 +55,21 @@ if (mysqli_connect_errno()) {
|
||||||
Welcome <b> <?php echo $_SESSION['user_fullname']; ?> </b>
|
Welcome <b> <?php echo $_SESSION['user_fullname']; ?> </b>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$c_date= date("Y-m-d H:i");
|
$c_date = date("Y-m-d H:i");
|
||||||
if (isset( $_SESSION['user_student_id']))
|
if (isset($_SESSION['user_student_id']))
|
||||||
echo "(". $_SESSION['user_type'] . " - " . $_SESSION['user_student_id'] .") ";
|
echo "(" . $_SESSION['user_type'] . " - " . $_SESSION['user_student_id'] . ") ";
|
||||||
else
|
else
|
||||||
echo "(". $_SESSION['user_type'] .") ";
|
echo "(" . $_SESSION['user_type'] . ") ";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($_SESSION['user_type'] == "Lecturer") {
|
if ($_SESSION['user_type'] == "Lecturer") {
|
||||||
echo " <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i> <a style='color:#fff !important' href=\"~\..\Admin.php\">Admin </a>";
|
echo " <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i> <a style='color:#fff !important' href=\"~\..\Admin.php\">Admin </a>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<i class="fa fa-user" style="color:#fff;"> </i>
|
<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>
|
<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>
|
<i class="fa fa-lock" style="color:#fff;"> </i> <a style='color:#fff !important' href="~\..\logout.php">Logout </a>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -81,87 +77,95 @@ if ($_SESSION['user_type'] == "Lecturer") {
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.nav-item{
|
.nav-item {
|
||||||
border-color:#00ff66;
|
border-color: #00ff66;
|
||||||
}
|
|
||||||
.nav-tabs{
|
|
||||||
border-color:#00ff66;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-tabs {
|
||||||
|
border-color: #00ff66;
|
||||||
|
}
|
||||||
|
|
||||||
.btn-default{
|
.btn-default {
|
||||||
border: 2px solid #00ff66;
|
border: 2px solid #00ff66;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align:left;
|
text-align: left;
|
||||||
margin:3px auto;
|
margin: 3px auto;
|
||||||
font-weight:bold;
|
font-weight: bold;
|
||||||
font-size:13pt;
|
font-size: 13pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-bordered{
|
.table-bordered {
|
||||||
padding:5px !important;
|
padding: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert{
|
.alert {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
h1,h2,h3,h4{color:#03407B;}
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4 {
|
||||||
|
color: #03407B;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #03407B;
|
color: #03407B;
|
||||||
}
|
}
|
||||||
|
|
||||||
.break-word {
|
.break-word {
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
|
white-space: -moz-pre-wrap !important;
|
||||||
white-space: -pre-wrap; /* Opera 4-6 */
|
/* Mozilla, since 1999 */
|
||||||
white-space: -o-pre-wrap; /* Opera 7 */
|
white-space: -pre-wrap;
|
||||||
white-space: pre-wrap; /* css-3 */
|
/* Opera 4-6 */
|
||||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
white-space: -o-pre-wrap;
|
||||||
white-space: -webkit-pre-wrap; /* Newer versions of Chrome/Safari*/
|
/* Opera 7 */
|
||||||
|
white-space: pre-wrap;
|
||||||
|
/* css-3 */
|
||||||
|
word-wrap: break-word;
|
||||||
|
/* Internet Explorer 5.5+ */
|
||||||
|
white-space: -webkit-pre-wrap;
|
||||||
|
/* Newer versions of Chrome/Safari*/
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-widget-content.ui-dialog {
|
||||||
|
|
||||||
.ui-widget-content.ui-dialog
|
|
||||||
{
|
|
||||||
border: 2px solid #03488B;
|
border: 2px solid #03488B;
|
||||||
|
|
||||||
}
|
}
|
||||||
.ui-dialog > .ui-widget-header {background: #03488B; color:white}
|
|
||||||
|
|
||||||
.ui-button{ background: #03488B; color:white }
|
.ui-dialog>.ui-widget-header {
|
||||||
|
background: #03488B;
|
||||||
|
color: white
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-button {
|
||||||
|
background: #03488B;
|
||||||
|
color: white
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function updatePass(id) {
|
||||||
<script>
|
|
||||||
function updatePass(id)
|
|
||||||
{
|
|
||||||
|
|
||||||
var pass = prompt("Enter your new password : ", "Enter a strong password");
|
var pass = prompt("Enter your new password : ", "Enter a strong password");
|
||||||
|
|
||||||
if(!confirm('Are you sure you want to reset your password?'))
|
if (!confirm('Are you sure you want to reset your password?')) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.location.href="\Script.php\?action=passchange&uid="+id+"&pass="+pass;
|
window.location.href = "\Script.php\?action=passchange&uid=" + id + "&pass=" + pass;
|
||||||
}
|
}
|
||||||
|
|
||||||
function blockUser(id,status)
|
function blockUser(id, status) {
|
||||||
{
|
if (!confirm('Are you sure you want to change user status?')) {
|
||||||
if(!confirm('Are you sure you want to change user status?'))
|
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.location.href="\Script.php\?action=statuschange&uid="+id+"&status="+status;
|
window.location.href = "\Script.php\?action=statuschange&uid=" + id + "&status=" + status;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
867
Script.php
867
Script.php
File diff suppressed because it is too large
Load Diff
|
@ -1,134 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html class="no-js" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
||||||
<title>LRRS Home Page</title>
|
|
||||||
<meta name="description" content="">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Place favicon.ico in the root directory -->
|
|
||||||
<link rel="stylesheet" href="style.css">
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body style="padding-left:80px;padding-right:80px;">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="wrapAll clearfix">
|
|
||||||
<div class="sidebar">
|
|
||||||
<div class="logo">
|
|
||||||
<a href="http://118.25.96.118/nor"><img src='logo_text.png' alt="LRR Logo"></a>
|
|
||||||
</div>
|
|
||||||
<div class="navigation">
|
|
||||||
<ul>
|
|
||||||
<li><a href="index.html">Home</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<h3>About LRRS</h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="Overview.html">» <b>Overview</b></a></li>
|
|
||||||
<li><a href="quickstart.html">Quick Start</a></li>
|
|
||||||
<li><a href="features.html">Features</a></li>
|
|
||||||
<li><a href="screenshots.html">Screenshots</a></li>
|
|
||||||
<li><a href="DevelopmentPlan.html">Development Plan</a></li>
|
|
||||||
</ul>
|
|
||||||
<h3>Getting LRRS</h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="sourcecode.html">Source Download</a></li>
|
|
||||||
<li><a href="installation.html">Installation Guide</a></li>
|
|
||||||
<li><a href="license.html">License</a></li>
|
|
||||||
</ul>
|
|
||||||
<h3>Community</h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="mailing.html">Mailing Lists</a></li>
|
|
||||||
<li><a href="issues.html">Report Issues</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<h3>About us</h3>
|
|
||||||
<ul>
|
|
||||||
|
|
||||||
<li><a href="contact.html">Contact us</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="mainsection">
|
|
||||||
<div class="headerLinks">
|
|
||||||
This page was last edited on 14 December 2019 by Hui
|
|
||||||
</div>
|
|
||||||
<div class="tabs clearfix">
|
|
||||||
<div class="tabsLeft">
|
|
||||||
<ul>
|
|
||||||
<ul>
|
|
||||||
<li class="menubox"><a href="index.html" class="menubox" >Home</a></li>
|
|
||||||
<li ><a href="overview.html" class="active">Overview</a></li>
|
|
||||||
<li ><a href="features.html" class="menubox">Features</a></li>
|
|
||||||
<li><a href="screenshots.html" class="menubox">Screenshots</a></li>
|
|
||||||
<li><a href="sourcecode.html" class="menubox">Source Code</a></li>
|
|
||||||
<li><a href="issues.html" class="menubox">Issues</a></li>
|
|
||||||
<li ><a href="contact.html" class="menubox">Contact us</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="article">
|
|
||||||
<h2>Overview</h2>
|
|
||||||
|
|
||||||
|
|
||||||
LRRS is an open-source lab report management software for college students.
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
|
||||||
The lab report repository system is developing for general purpose and used to replace old
|
|
||||||
paperwork and email based systems . This system increases the efficiency of lab report
|
|
||||||
submission and result reporting for both lecturers and students.
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
|
|
||||||
The Project was developed at ZJNU by Mohamed nor and El-mahdi houzi.
|
|
||||||
|
|
||||||
The project was tested by some undergraduates classes at ZJNU.
|
|
||||||
<br> The system is developed using client/server architecture and its compatible with both Linux and Microsoft Windows Operating Systems. The system was developed using PHP Scripting language and MySQL as database management system.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br> The LRRS project have seen incredible improvements since it's development earlier 2019.
|
|
||||||
The software includes a lot of features that simplify assignment submission and grading.
|
|
||||||
|
|
||||||
|
|
||||||
we invite you to participate in the development of LRRS.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For helpful hints about how to get the most out of this project, see <a href="quickstart.html"> Quick Start</a>.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="pagefooter">
|
|
||||||
<div class="footerlinks">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
19
logout.php
19
logout.php
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
// Destory sessions & redirect to index
|
// Destory sessions & redirect to index
|
||||||
|
|
||||||
session_destroy();
|
session_destroy();
|
||||||
session_unset();
|
session_unset();
|
||||||
// Start a new session
|
// Start a new session
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
// Generate a new session ID
|
// Generate a new session ID
|
||||||
|
@ -13,10 +13,11 @@ session_regenerate_id(true);
|
||||||
// Then finally, make sure you pick up the new session ID
|
// Then finally, make sure you pick up the new session ID
|
||||||
$session_id = session_id();
|
$session_id = session_id();
|
||||||
|
|
||||||
|
unset($_SESSION['user_id']);
|
||||||
unset( $_SESSION['user_id']);
|
unset($_SESSION['user_email']);
|
||||||
unset( $_SESSION['user_email']);
|
unset($_SESSION['user_type']);
|
||||||
unset( $_SESSION['user_type']);
|
unset($_SESSION['user_student_id']);
|
||||||
unset( $_SESSION['user_student_id']);
|
unset($_SESSION['user_fullname']);
|
||||||
unset( $_SESSION['user_fullname']);
|
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
Loading…
Reference in New Issue