Merge branch 'master' of http://121.4.94.30:3000/mrlan/LRR into ProjectHomePage
commit
0f347d6dce
|
@ -0,0 +1,2 @@
|
|||
.vscode
|
||||
|
602
Admin.php
602
Admin.php
|
@ -1,367 +1,323 @@
|
|||
<?php
|
||||
include 'NoDirectPhpAcess.php';
|
||||
include 'NoDirectPhpAcess.php';
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
$page="admin";
|
||||
$page = "admin";
|
||||
include 'Header.php';
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($_SESSION['user_type'] != "Lecturer") {
|
||||
$_SESSION["info_login"]="You must log in first.";
|
||||
echo $_SESSION["info_login"];
|
||||
header("Location: index.php");
|
||||
$_SESSION["info_login"] = "You must log in first.";
|
||||
echo $_SESSION["info_login"];
|
||||
header("Location: index.php");
|
||||
}
|
||||
?>
|
||||
|
||||
<style>
|
||||
.col-md-4{
|
||||
border-right: 1px solid skyblue;
|
||||
}
|
||||
.col-md-4 {
|
||||
border-right: 1px solid skyblue;
|
||||
}
|
||||
</style>
|
||||
|
||||
<br>
|
||||
<div style="width: 80%;margin: auto;"> <h2> Administration Panel </h2> </div>
|
||||
|
||||
<hr>
|
||||
<div style="width: 80%;margin: auto;">
|
||||
<h2> Administration Panel </h2>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<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>
|
||||
<hr>
|
||||
Lab Privacy Mode: (STUDENT VERIFICATION)
|
||||
<hr>
|
||||
-->
|
||||
<div class="col-md-6">
|
||||
<h4> User Account Management </h4><hr>
|
||||
|
||||
<b>Lecturer / TA Accounts </b><br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="col-md-6">
|
||||
<h4> User Account Management </h4>
|
||||
<hr>
|
||||
|
||||
<b>Lecturer / TA Accounts </b><br>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#home">Create New Account</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#home">Create New Account</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#menu2">Batch Create New Student Accounts</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#menu2">Batch Create New Student Accounts</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#menu1">Existing Accounts</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#menu1">Existing Accounts</a>
|
||||
</li>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
</ul>
|
||||
|
||||
<div id="home" class="container tab-pane active"><br>
|
||||
|
||||
<b>Create Lecturer/TA Accounts </b>
|
||||
<form method="post" action="Script.php">
|
||||
<input type="hidden" name="frm_createlecturrer" value="true" required=""/>
|
||||
Full_Name
|
||||
<input type="text" name="fullname" placeholder="Full Name" class="form-control" required="">
|
||||
Email
|
||||
<input type="text" name="email" placeholder="Email / Student Number" class="form-control" required="">
|
||||
|
||||
Passport_Number / ID (Used as Intial Password)
|
||||
<input type="text" class="form-control" name="passport" placeholder="Passport No./ID" required="">
|
||||
<br> User Type :
|
||||
<input type="radio" name="type" value="Lecturer" required=""> Lecturer
|
||||
<input type="radio" name="type" value="TA" required=""> T/A
|
||||
<input type="submit" class="btn btn-primary" value="Create"><br>
|
||||
<?php
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
|
||||
error_reporting(E_ALL);
|
||||
if(isset($_SESSION['info_Admin_Users'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">'.$_SESSION['info_Admin_Users'].'</div>';
|
||||
$_SESSION['info_Admin_Users']=null;
|
||||
}
|
||||
if(isset($_SESSION['info_Admin_Users'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">'.$_SESSION['info_Admin_Users'].'</div>';
|
||||
$_SESSION['info_Admin_Users']=null;
|
||||
}
|
||||
<div id="home" class="container tab-pane active"><br>
|
||||
|
||||
?>
|
||||
<b>Create Lecturer/TA Accounts </b>
|
||||
<form method="post" action="Script.php">
|
||||
<input type="hidden" name="frm_createlecturrer" value="true" required="" />
|
||||
Full_Name
|
||||
<input type="text" name="fullname" placeholder="Full Name" class="form-control" required="">
|
||||
Email
|
||||
<input type="text" name="email" placeholder="Email / Student Number" class="form-control" required="">
|
||||
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
Passport_Number / ID (Used as Intial Password)
|
||||
<input type="text" class="form-control" name="passport" placeholder="Passport No./ID" required="">
|
||||
<br> User Type :
|
||||
<input type="radio" name="type" value="Lecturer" required=""> Lecturer
|
||||
<input type="radio" name="type" value="TA" required=""> T/A
|
||||
<input type="submit" class="btn btn-primary" value="Create"><br>
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
if (isset($_SESSION['info_Admin_Users'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_Admin_Users'] . '</div>';
|
||||
$_SESSION['info_Admin_Users'] = null;
|
||||
}
|
||||
if (isset($_SESSION['info_Admin_Users'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_Admin_Users'] . '</div>';
|
||||
$_SESSION['info_Admin_Users'] = null;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="menu1" class="container tab-pane fade"><br>
|
||||
|
||||
<table class="table-bordered" style="font-size: 10pt;">
|
||||
<tr style="font-size:10pt;">
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Passport / ID </th>
|
||||
<th>Reset Password </th>
|
||||
<th>Block/Activate </th>
|
||||
</tr>
|
||||
<?php
|
||||
</form>
|
||||
|
||||
$result = mysqli_query($con,
|
||||
"SELECT * FROM Users_Table WHERE UserType in ('Lecturer','TA')");
|
||||
while($row = mysqli_fetch_assoc($result)) {
|
||||
$pass=$row['Passport_Number'];
|
||||
$btn="<button class='btn-primary' onclick=\"updatePass(".$row['User_ID'].",'$pass')\">Reset</button>";
|
||||
if($row['Status']=="Active")
|
||||
{ $newstatus="Blocked";
|
||||
$btnBlock="<button class='btn-danger' onclick=\"blockUser(".$row['User_ID'].",'$newstatus')\">Block</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>";
|
||||
}
|
||||
?></table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- code contributed by Xu Xiaopeng (https://github.com/xxp1999) -->
|
||||
|
||||
<div id="menu2" class="container tab-pane fade" style="margin-top:10px" >
|
||||
<b>Separate two student numbers with a space.</b><br>
|
||||
<form action="batch_insert.php" method="post">
|
||||
<p>
|
||||
<textarea cols="80" rows="16" name="users" required=""></textarea>
|
||||
</p>
|
||||
<input type="submit" class="btn btn-primary" value="Register Students"><br>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#menua"> Course Portal </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#menub">Existing Courses</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
<div id="menua" class="container tab-pane active"><br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<b>Create new Portal </b>
|
||||
|
||||
|
||||
|
||||
<form method="post" action="Script.php">
|
||||
<input type="hidden" name="frm_createCourse" value="true" required=""/>
|
||||
Course Name
|
||||
<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="">
|
||||
|
||||
URL (Leave blank to use Course Name)
|
||||
<input type="text" name="url" placeholder="Choose Custom URL " 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="">
|
||||
|
||||
Assign Lecturer
|
||||
<br>
|
||||
|
||||
<select name="lecturer" class="form-control">
|
||||
<?php
|
||||
$result = mysqli_query($con,"SELECT * FROM Users_Table WHERE UserType='Lecturer'");
|
||||
if(mysqli_num_rows($result)==0)
|
||||
{} else { while($row = mysqli_fetch_assoc($result)) {
|
||||
$id=$row['User_ID'];
|
||||
$name=$row['Full_Name'];
|
||||
echo "<option value='$id'> $name </option>";
|
||||
}}?>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Assigned T/A <br>
|
||||
<select name="ta" class="form-control">
|
||||
<?php
|
||||
$result = mysqli_query($con,"SELECT * FROM Users_Table WHERE UserType='TA'");
|
||||
if(mysqli_num_rows($result)==0)
|
||||
{} else { while($row = mysqli_fetch_assoc($result)) {
|
||||
$id=$row['User_ID'];
|
||||
$name=$row['Full_Name'];
|
||||
echo "<option value='$id'> $name </option>";
|
||||
}}?>
|
||||
|
||||
</select>
|
||||
|
||||
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
|
||||
|
||||
error_reporting(E_ALL);
|
||||
if(isset($_SESSION['info_Admin_Courses'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">'.$_SESSION['info_Admin_Courses'].'</div>';
|
||||
$_SESSION['info_Admin_Courses']=null;
|
||||
}
|
||||
if(isset($_SESSION['info_Admin_Courses'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">'.$_SESSION['info_Admin_Courses'].'</div>';
|
||||
$_SESSION['info_Admin_Courses']=null;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="menub" class="container tab-pane fade"><br>
|
||||
|
||||
|
||||
|
||||
<b> Existing Course Portals </b>
|
||||
<hr>
|
||||
<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>
|
||||
<?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");
|
||||
if(mysqli_num_rows($result)==0)
|
||||
{} 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'];
|
||||
$c_id=$row['Course_ID'];
|
||||
|
||||
|
||||
|
||||
$resultTA = mysqli_query($con,"SELECT `Course_ID`, `TA`,users_table.Full_Name as TA_NAME FROM `course_ta`
|
||||
INNER JOIN users_table on users_table.User_ID=course_ta.TA
|
||||
where course_ta.Course_ID=$c_id");
|
||||
|
||||
$ta="";
|
||||
while($rowTA = mysqli_fetch_assoc($resultTA)) {
|
||||
$ta=$ta." - ".$rowTA['TA_NAME'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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=''>";
|
||||
|
||||
|
||||
|
||||
$resultx = mysqli_query($con,"SELECT * FROM Users_Table WHERE UserType='TA'");
|
||||
if(mysqli_num_rows($resultx)==0)
|
||||
{} else { while($row = mysqli_fetch_assoc($resultx)) {
|
||||
$id=$row['User_ID'];
|
||||
$name=$row['Full_Name'];
|
||||
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>
|
||||
";
|
||||
|
||||
|
||||
|
||||
}}?>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="menu1" class="container tab-pane fade"><br>
|
||||
|
||||
<table class="table-bordered" style="font-size: 10pt;">
|
||||
<tr style="font-size:10pt;">
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Passport / ID </th>
|
||||
<th>Reset Password </th>
|
||||
<th>Block/Activate </th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
$result = mysqli_query(
|
||||
$con,
|
||||
"SELECT * FROM Users_Table WHERE UserType in ('Lecturer','TA')"
|
||||
);
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
$pass = $row['Passport_Number'];
|
||||
$btn = "<button class='btn-primary' onclick=\"updatePass(" . $row['User_ID'] . ",'$pass')\">Reset</button>";
|
||||
if ($row['Status'] == "Active") {
|
||||
$newstatus = "Blocked";
|
||||
$btnBlock = "<button class='btn-danger' onclick=\"blockUser(" . $row['User_ID'] . ",'$newstatus')\">Block</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>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- code contributed by Xu Xiaopeng (https://github.com/xxp1999) -->
|
||||
|
||||
<div id="menu2" class="container tab-pane fade" style="margin-top:10px">
|
||||
<b>Separate two student numbers with a space.</b><br>
|
||||
<form action="batch_insert.php" method="post">
|
||||
<p>
|
||||
<textarea cols="80" rows="16" name="users" required=""></textarea>
|
||||
</p>
|
||||
<input type="submit" class="btn btn-primary" value="Register Students"><br>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="container">
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#menua"> Course Portal </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#menub">Existing Courses</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
<div id="menua" class="container tab-pane active"><br>
|
||||
|
||||
<hr>
|
||||
<b>Create new Portal </b>
|
||||
|
||||
<form method="post" action="Script.php">
|
||||
<input type="hidden" name="frm_createCourse" value="true" required="" />
|
||||
Course Name
|
||||
<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="">
|
||||
|
||||
URL (Leave blank to use Course Name)
|
||||
<input type="text" name="url" placeholder="Choose Custom URL " 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="">
|
||||
|
||||
Assign Lecturer
|
||||
<br>
|
||||
|
||||
<select name="lecturer" class="form-control">
|
||||
<?php
|
||||
$result = mysqli_query($con, "SELECT * FROM Users_Table WHERE UserType='Lecturer'");
|
||||
if (mysqli_num_rows($result) == 0) {
|
||||
} else {
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
$id = $row['User_ID'];
|
||||
$name = $row['Full_Name'];
|
||||
echo "<option value='$id'> $name </option>";
|
||||
}
|
||||
} ?>
|
||||
|
||||
</select>
|
||||
|
||||
Assigned T/A <br>
|
||||
<select name="ta" class="form-control">
|
||||
<?php
|
||||
$result = mysqli_query($con, "SELECT * FROM Users_Table WHERE UserType='TA'");
|
||||
if (mysqli_num_rows($result) == 0) {
|
||||
} else {
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
$id = $row['User_ID'];
|
||||
$name = $row['Full_Name'];
|
||||
echo "<option value='$id'> $name </option>";
|
||||
}
|
||||
} ?>
|
||||
|
||||
</select>
|
||||
|
||||
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
|
||||
|
||||
error_reporting(E_ALL);
|
||||
if (isset($_SESSION['info_Admin_Courses'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_Admin_Courses'] . '</div>';
|
||||
$_SESSION['info_Admin_Courses'] = null;
|
||||
}
|
||||
if (isset($_SESSION['info_Admin_Courses'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_Admin_Courses'] . '</div>';
|
||||
$_SESSION['info_Admin_Courses'] = null;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="menub" class="container tab-pane fade"><br>
|
||||
|
||||
<b> Existing Course Portals </b>
|
||||
<hr>
|
||||
<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>
|
||||
<?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");
|
||||
if (mysqli_num_rows($result) == 0) {
|
||||
} 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'];
|
||||
$c_id = $row['Course_ID'];
|
||||
|
||||
$resultTA = mysqli_query($con, "SELECT `Course_ID`, `TA`,users_table.Full_Name as TA_NAME FROM `course_ta`
|
||||
INNER JOIN users_table on users_table.User_ID=course_ta.TA
|
||||
where course_ta.Course_ID=$c_id");
|
||||
|
||||
$ta = "";
|
||||
while ($rowTA = mysqli_fetch_assoc($resultTA)) {
|
||||
$ta = $ta . " - " . $rowTA['TA_NAME'];
|
||||
}
|
||||
|
||||
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=''>";
|
||||
|
||||
$resultx = mysqli_query($con, "SELECT * FROM Users_Table WHERE UserType='TA'");
|
||||
if (mysqli_num_rows($resultx) == 0) {
|
||||
} else {
|
||||
while ($row = mysqli_fetch_assoc($resultx)) {
|
||||
$id = $row['User_ID'];
|
||||
$name = $row['Full_Name'];
|
||||
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>
|
||||
";
|
||||
}
|
||||
} ?>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function updatePass(id,pass)
|
||||
{
|
||||
if(!confirm('Are you to Reset User Password'))
|
||||
{
|
||||
return;
|
||||
function updatePass(id, pass) {
|
||||
if (!confirm('Are you to Reset User Password')) {
|
||||
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)
|
||||
{
|
||||
if(!confirm('Are you to change User Status'))
|
||||
{
|
||||
return;
|
||||
function blockUser(id, status) {
|
||||
if (!confirm('Are you to change User Status')) {
|
||||
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>
|
1100
Course.php
1100
Course.php
File diff suppressed because it is too large
Load Diff
|
@ -181,9 +181,9 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
|
|||
|
||||
<?php
|
||||
if ($Type == "Individual") {
|
||||
echo "Submission Type <input type='radio' name='type' value='Individual' checked /> Invidual <input type='radio' name='type' value='Group' /> Group";
|
||||
echo "Submission Type <input type='radio' name='type' value='Individual' checked /> Individual <input type='radio' name='type' value='Group' /> Group";
|
||||
} else {
|
||||
echo "Submission Type <input type='radio' name='type' value='Individual' /> Invidual <input type='radio' name='type' value='Group' checked> Group";
|
||||
echo "Submission Type <input type='radio' name='type' value='Individual' /> Individual <input type='radio' name='type' value='Group' checked> Group";
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -238,7 +238,7 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
|
|||
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
|
||||
Submission Type <input type='radio' name='type' value='Individual' required=''> Individual
|
||||
|
||||
<input type='radio' name='type' value='Group' required=''> Group
|
||||
<hr>
|
||||
|
|
23
Footer.php
23
Footer.php
|
@ -1,23 +1,4 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
266
Header.php
266
Header.php
|
@ -13,155 +13,159 @@ if (mysqli_connect_errno()) {
|
|||
|
||||
?>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<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>
|
||||
<script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script>
|
||||
<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>
|
||||
<script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
</button>
|
||||
<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>
|
||||
<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>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarColor02">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
|
||||
<li class="nav-item active">
|
||||
<!-- <a class='nav-link' href='~\..\Visitors.php'> <i class='fa fa-globe'></i> Visitor Portal <span class='sr-only'>(current)</span></a> -->
|
||||
</li>
|
||||
<?php
|
||||
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>";
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="form-inline my-2 my-lg-0" style="color:#fff;">
|
||||
Welcome <b> <?php echo $_SESSION['user_fullname']; ?> </b>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarColor02">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
|
||||
<li class="nav-item active">
|
||||
<!-- <a class='nav-link' href='~\..\Visitors.php'> <i class='fa fa-globe'></i> Visitor Portal <span class='sr-only'>(current)</span></a> -->
|
||||
</li>
|
||||
<?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'] .") ";
|
||||
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>";
|
||||
?>
|
||||
|
||||
<?php
|
||||
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>";
|
||||
}
|
||||
?>
|
||||
|
||||
<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
|
||||
</li>
|
||||
</ul>
|
||||
<form class="form-inline my-2 my-lg-0" style="color:#fff;">
|
||||
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
|
||||
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>";
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
.nav-item{
|
||||
border-color:#00ff66;
|
||||
}
|
||||
.nav-tabs{
|
||||
border-color:#00ff66;
|
||||
}
|
||||
|
||||
|
||||
.btn-default{
|
||||
border: 2px solid #00ff66;
|
||||
width: 100%;
|
||||
text-align:left;
|
||||
margin:3px auto;
|
||||
font-weight:bold;
|
||||
font-size:13pt;
|
||||
}
|
||||
|
||||
.table-bordered{
|
||||
padding:5px !important;
|
||||
}
|
||||
|
||||
.alert{
|
||||
font-weight: bold;
|
||||
}
|
||||
h1,h2,h3,h4{color:#03407B;}
|
||||
a {
|
||||
color: #03407B;
|
||||
}
|
||||
?>
|
||||
|
||||
.break-word {
|
||||
word-wrap: break-word;
|
||||
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* 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;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.ui-widget-content.ui-dialog
|
||||
{
|
||||
border: 2px solid #03488B;
|
||||
|
||||
}
|
||||
.ui-dialog > .ui-widget-header {background: #03488B; color:white}
|
||||
|
||||
.ui-button{ background: #03488B; color:white }
|
||||
<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>
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function updatePass(id)
|
||||
{
|
||||
|
||||
var pass = prompt("Enter your new password : ", "Enter a strong password");
|
||||
|
||||
if(!confirm('Are you sure you want to reset your password?'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
window.location.href="\Script.php\?action=passchange&uid="+id+"&pass="+pass;
|
||||
<style>
|
||||
.nav-item {
|
||||
border-color: #00ff66;
|
||||
}
|
||||
|
||||
function blockUser(id,status)
|
||||
{
|
||||
if(!confirm('Are you sure you want to change user status?'))
|
||||
{
|
||||
return;
|
||||
|
||||
.nav-tabs {
|
||||
border-color: #00ff66;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
border: 2px solid #00ff66;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
margin: 3px auto;
|
||||
font-weight: bold;
|
||||
font-size: 13pt;
|
||||
}
|
||||
|
||||
.table-bordered {
|
||||
padding: 5px !important;
|
||||
}
|
||||
|
||||
.alert {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
color: #03407B;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #03407B;
|
||||
}
|
||||
|
||||
.break-word {
|
||||
word-wrap: break-word;
|
||||
white-space: -moz-pre-wrap !important;
|
||||
/* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap;
|
||||
/* Opera 4-6 */
|
||||
white-space: -o-pre-wrap;
|
||||
/* 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;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.ui-widget-content.ui-dialog {
|
||||
border: 2px solid #03488B;
|
||||
|
||||
}
|
||||
|
||||
.ui-dialog>.ui-widget-header {
|
||||
background: #03488B;
|
||||
color: white
|
||||
}
|
||||
|
||||
.ui-button {
|
||||
background: #03488B;
|
||||
color: white
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function updatePass(id) {
|
||||
|
||||
var pass = prompt("Enter your new password : ", "Enter a strong password");
|
||||
|
||||
if (!confirm('Are you sure you want to reset your password?')) {
|
||||
return;
|
||||
}
|
||||
window.location.href="\Script.php\?action=statuschange&uid="+id+"&status="+status;
|
||||
}
|
||||
</script>
|
||||
|
||||
window.location.href = "\Script.php\?action=passchange&uid=" + id + "&pass=" + pass;
|
||||
}
|
||||
|
||||
function blockUser(id, 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>
|
|
@ -1,5 +0,0 @@
|
|||
* Student Registration Process is now simplified, Student Passport/ID checking process skipped as there is nowhere find that information currently. The system now checks Student Passport / National ID from users’ tables instead of verifying from school database.
|
||||
|
||||
|
||||
|
||||
*
|
1195
Script.php
1195
Script.php
File diff suppressed because it is too large
Load Diff
|
@ -89,7 +89,7 @@
|
|||
<br>
|
||||
|
||||
<b>1. Install Web server </b> <br>
|
||||
You need web server to run this web application. you can use any webserver that can run PHP Scripts. some good web servers include APACHE web server , XAMPP and easy PHP Server.
|
||||
You need web server to run this web application. you can use any webserver that can run PHP Scripts. Some good web servers include APACHE web server, XAMPP and easy PHP Server.
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -101,7 +101,7 @@
|
|||
|
||||
<br>
|
||||
|
||||
<b>4. Install Database Management tool </b> to easily manage MYSQL databases. PhpMyAdmin is good example.
|
||||
<b>4. Install Database Management tool </b> to easily manage MYSQL databases. PhpMyAdmin is a good example.
|
||||
|
||||
|
||||
<br>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
||||
|
21
logout.php
21
logout.php
|
@ -2,9 +2,9 @@
|
|||
|
||||
// Destory sessions & redirect to index
|
||||
|
||||
session_destroy();
|
||||
session_unset();
|
||||
// Start a new session
|
||||
session_destroy();
|
||||
session_unset();
|
||||
// Start a new session
|
||||
session_start();
|
||||
|
||||
// Generate a new session ID
|
||||
|
@ -12,11 +12,12 @@ session_regenerate_id(true);
|
|||
|
||||
// Then finally, make sure you pick up the new session ID
|
||||
$session_id = session_id();
|
||||
|
||||
|
||||
unset( $_SESSION['user_id']);
|
||||
unset( $_SESSION['user_email']);
|
||||
unset( $_SESSION['user_type']);
|
||||
unset( $_SESSION['user_student_id']);
|
||||
unset( $_SESSION['user_fullname']);
|
||||
|
||||
unset($_SESSION['user_id']);
|
||||
unset($_SESSION['user_email']);
|
||||
unset($_SESSION['user_type']);
|
||||
unset($_SESSION['user_student_id']);
|
||||
unset($_SESSION['user_fullname']);
|
||||
header("Location: index.php");
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue