Upgrade to Bootstrap 5. TODO: nav tab does not work in Admin.php.
parent
7d28f987d2
commit
9c529e0022
189
Admin.php
189
Admin.php
|
@ -15,54 +15,37 @@ if ($_SESSION['user_type'] != "Lecturer" && $_SESSION['user_type'] != "Admin") {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div style="width: 80%;margin: auto;">
|
<div>
|
||||||
<h2> Administration panel </h2>
|
<h2> Administration panel </h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<div class="row" style="width: 80%;margin: auto;">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
<!-- <?php
|
|
||||||
if ($_SESSION['user_type'] == "Lecturer") {
|
|
||||||
|
|
||||||
echo " <h4> TA Account Management </h4> <hr> " ;
|
|
||||||
echo "<b>TA Accounts </b><br>" ;
|
|
||||||
}
|
|
||||||
else if($_SESSION['user_type'] == "Admin"){
|
|
||||||
echo " <h4> Lecturer Account Management </h4>
|
|
||||||
<hr> ";
|
|
||||||
echo "<b>Lecturer Accounts </b><br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
?> -->
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
<!-- Nav tabs -->
|
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
|
||||||
|
|
||||||
|
<!-- Nav tabs -->
|
||||||
|
<ul class="nav nav-tabs">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" data-toggle="tab" href="#home">Create TA account</a>
|
<a class="nav-link active" id="home" href="#home">Create TA account</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="tab" href="#menu1" id="batch_tab">Batch create student accounts</a>
|
<a class="nav-link" href="#menu1" id="batch_tab">Batch create student accounts</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="tab" href="#menu2" id="existing_accounts_tab">Existing accounts</a>
|
<a class="nav-link" href="#menu2" id="existing_accounts_tab">Existing accounts</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!-- Tab panes -->
|
<!-- Tab panes -->
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|
||||||
<div id="home" class="container tab-pane active"><br>
|
<div id="home" class="tab-pane active"><br>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($_SESSION['user_type'] == "Lecturer") {
|
if ($_SESSION['user_type'] == "Lecturer") {
|
||||||
|
@ -125,7 +108,7 @@ if ($_SESSION['user_type'] != "Lecturer" && $_SESSION['user_type'] != "Admin") {
|
||||||
|
|
||||||
|
|
||||||
<!-- code contributed by Xu Xiaopeng (https://github.com/xxp1999) -->
|
<!-- code contributed by Xu Xiaopeng (https://github.com/xxp1999) -->
|
||||||
<div id="menu1" class="container tab-pane fade" style="margin-top:10px">
|
<div id="menu1" class="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" id="batch_form">
|
<form action="batch_insert.php" method="post" id="batch_form">
|
||||||
<p>
|
<p>
|
||||||
|
@ -136,7 +119,7 @@ if ($_SESSION['user_type'] != "Lecturer" && $_SESSION['user_type'] != "Admin") {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="menu2" class="container tab-pane fade"><br>
|
<div id="menu2" class="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;">
|
||||||
|
@ -179,83 +162,79 @@ if ($_SESSION['user_type'] != "Lecturer" && $_SESSION['user_type'] != "Admin") {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" href="#menu3" id="existing_courses">Existing courses</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="menu3" class="container tab-pane active"><br>
|
||||||
|
|
||||||
|
<b> Past courses </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
|
||||||
|
$user_id = $_SESSION['user_id'];
|
||||||
|
$result = mysqli_query($con, "SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`, `TA_User_ID`, `Course_Code`, `Full_Name` FROM courses_table INNER JOIN users_table ON users_table.User_ID=courses_table.Lecturer_User_ID WHERE User_ID=$user_id ORDER BY Academic_Year DESC;");
|
||||||
|
if (mysqli_num_rows($result) == 0) {
|
||||||
|
} else {
|
||||||
|
$counter = 0;
|
||||||
|
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'];
|
||||||
|
$counter += 1;
|
||||||
|
|
||||||
|
$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' id='drop_menu_form_$counter'> <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' id='assign_btn_$counter'></form> </td></tr>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
} ?>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link active" data-toggle="tab" href="#menu3" id="existing_courses">Existing courses</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="menu3" class="container tab-pane active"><br>
|
|
||||||
|
|
||||||
<b> Past courses </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
|
|
||||||
$user_id = $_SESSION['user_id'];
|
|
||||||
$result = mysqli_query($con, "SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`, `TA_User_ID`, `Course_Code`, `Full_Name` FROM courses_table INNER JOIN users_table ON users_table.User_ID=courses_table.Lecturer_User_ID WHERE User_ID=$user_id ORDER BY Academic_Year DESC;");
|
|
||||||
if (mysqli_num_rows($result) == 0) {
|
|
||||||
} else {
|
|
||||||
$counter = 0;
|
|
||||||
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'];
|
|
||||||
$counter += 1;
|
|
||||||
|
|
||||||
$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' id='drop_menu_form_$counter'> <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' id='assign_btn_$counter'></form> </td></tr>
|
|
||||||
";
|
|
||||||
}
|
|
||||||
} ?>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -21,8 +21,6 @@ if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA")
|
||||||
|
|
||||||
|
|
||||||
<div class="row" style="width:80%;margin:auto; text-align:left;">
|
<div class="row" style="width:80%;margin:auto; text-align:left;">
|
||||||
|
|
||||||
|
|
||||||
<script src="./css/jquery-1.11.1.min.js"></script>
|
<script src="./css/jquery-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" />
|
||||||
|
@ -473,7 +471,7 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'"
|
||||||
<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><br>
|
||||||
<input type="submit" class="btn btn-primary" value="Create"><br>
|
<input type="submit" class="btn btn-primary" value="Create"><br>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
42
Header.php
42
Header.php
|
@ -14,12 +14,13 @@ if (mysqli_connect_errno()) {
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html>
|
<html lang="en-US">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>Lab Report Repository</title>
|
<title>Lab Report Repository</title>
|
||||||
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
<link href=" https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.0.1/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" />
|
||||||
<!-- *this css file can be used across all the websites
|
<!-- *this css file can be used across all the websites
|
||||||
and any new css class can be added there.
|
and any new css class can be added there.
|
||||||
|
@ -28,7 +29,8 @@ if (mysqli_connect_errno()) {
|
||||||
-->
|
-->
|
||||||
<link href = "./css/main.css" rel="stylesheet" type="text/css" />
|
<link href = "./css/main.css" rel="stylesheet" type="text/css" />
|
||||||
<script src="./css/jquery.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="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.0.1/js/bootstrap.min.js"></script>
|
||||||
|
<script src=">https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.0.1/js/bootstrap.bundle.min.js"></script>
|
||||||
<script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script>
|
<script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,20 +115,6 @@ if (mysqli_connect_errno()) {
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.txt1 {
|
|
||||||
font-family: Poppins-Regular;
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.txt2 {
|
|
||||||
font-family: Poppins-Regular;
|
|
||||||
font-size: 19px;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: #2471A3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-control{
|
.form-control{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom:1px;
|
padding-bottom:1px;
|
||||||
|
@ -142,8 +130,8 @@ if (mysqli_connect_errno()) {
|
||||||
|
|
||||||
<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" style="padding-left:150px;padding-right:150px;margin:auto;">
|
||||||
<a class="navbar-brand" href="~\..\index.php"> <img src="logo.png" style="width:30px;height:30px;"> LRR </a>
|
<a class="navbar-brand" href="~\..\index.php"> <img src="logo.png" style="width:30px;height:30px;" alt="LRR Logo"> 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>
|
||||||
</button>
|
</button>
|
||||||
|
@ -159,7 +147,7 @@ if (mysqli_connect_errno()) {
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<form class="form-inline my-2 my-lg-0" style="color:#fff;">
|
<form class="form-inline my-2 my-lg-0">
|
||||||
Welcome
|
Welcome
|
||||||
<b> <?php echo $_SESSION['user_fullname']; ?> </b>
|
<b> <?php echo $_SESSION['user_fullname']; ?> </b>
|
||||||
|
|
||||||
|
@ -174,18 +162,18 @@ if (mysqli_connect_errno()) {
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($_SESSION['user_type'] == "Lecturer") { // Show Admin link
|
if ($_SESSION['user_type'] == "Lecturer") { // Show Admin link
|
||||||
echo " <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i>";
|
echo " <i class=\"fa fa-cog\"> </i>";
|
||||||
echo " <a style='color:#fff !important' href=\"~\..\Admin.php\" id=\"admin_tab\">Admin</a>";
|
echo " <a href=\"~\..\Admin.php\" id=\"admin_tab\">Admin</a>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-user" style="color:#fff;"> </i>
|
<i class="fa fa-user"> </i>
|
||||||
<a href="#" style='color:#fff !important' onclick="updatePass(<?php echo $_SESSION['user_id']; ?>)">Update password</a>
|
<a href="#" onclick="updatePass(<?php echo $_SESSION['user_id']; ?>)">Update password</a>
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-lock" style="color:#fff;"> </i>
|
<i class="fa fa-lock"> </i>
|
||||||
<a style='color:#fff !important' href="~\..\logout.php">Logout </a>
|
<a href="~\..\logout.php">Logout </a>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
} // Confusing. What is this for?
|
} // Confusing. What is this for?
|
||||||
|
|
110
index.php
110
index.php
|
@ -15,72 +15,62 @@ if (isset($_SESSION["user_fullname"])) {
|
||||||
|
|
||||||
<br><br><br>
|
<br><br><br>
|
||||||
|
|
||||||
<div class="row" style="width:85%;margin:auto;">
|
<div class="container">
|
||||||
<div class="col-md-4">
|
|
||||||
<br><br>
|
|
||||||
<img src="logo.png" style="width:40%; position:relative; right:-95px; top:1px;">
|
|
||||||
<br><br>
|
|
||||||
<div style="width:20%; position:relative; right:-90px; font-family: Poppins-Regular;">
|
|
||||||
<h1>Lab Report Repository</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style = "position:relative; left:240px; top:-2px;">
|
|
||||||
<h4 class="list-group-item active" style="font-weight:normal;font-family: Poppins-Regular;"> Sign in </h4>
|
|
||||||
<div class="list-group-item">
|
|
||||||
|
|
||||||
<div class="panel-body">
|
|
||||||
|
|
||||||
<form method="post" action="Script.php" name="frm_login">
|
|
||||||
<input type="hidden" name="frm_login" value="true"/>
|
|
||||||
Account name
|
|
||||||
<input type="text" name="user" placeholder="Student Number / Email address" class="form-control" required="required" id="user_name" />
|
|
||||||
<br>
|
|
||||||
Password
|
|
||||||
<input type="password" class="form-control" name="password" placeholder="password" required="required" id="user_password" />
|
|
||||||
<div class="text-left">
|
|
||||||
<br><input type="submit" class="btn-primary" value="Login" id="login_btn">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-left">
|
|
||||||
<span class="txt1">Don't have an account yet?</span>
|
|
||||||
<a class="txt2" href="signup.php" style="font-weight:normal" id="signup_link">Sign Up</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-left">
|
|
||||||
<span class="txt1">Forget your password?</span>
|
|
||||||
<a class="txt2" href="recover_password.php" style="font-weight:normal">Reset my password</a>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
error_reporting(E_ALL);
|
|
||||||
|
|
||||||
if(isset($_SESSION['info_login'])) {
|
|
||||||
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_login'].'</div>';
|
|
||||||
$_SESSION['info_login'] = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// wrong pass
|
|
||||||
if(isset($_SESSION['wrong_pass'])) {
|
|
||||||
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['wrong_pass'].'</div>';
|
|
||||||
$_SESSION['wrong_pass'] = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(isset($_SESSION['infoChangePassword'])) {
|
|
||||||
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['infoChangePassword'].'</div>';
|
|
||||||
$_SESSION['infoChangePassword'] = null;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<img src="logo.png" style="width:32%; position:relative; right:-95px; top:1px;" alt="LRR Logo">
|
||||||
|
<br><br>
|
||||||
|
<div style="width:32%; position:relative; right:-90px; font-family: Poppins-Regular;">
|
||||||
|
<h1>Lab Report Repository</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
|
<form method="post" action="Script.php" name="frm_login">
|
||||||
|
<input type="hidden" name="frm_login" value="true"/>
|
||||||
|
<label for="user_name" class="form-label">Account name</label>
|
||||||
|
<input type="text" name="user" placeholder="Student Number / Email address" class="form-control" required="required" id="user_name" />
|
||||||
|
<br>
|
||||||
|
<label for="user_password" class="form-label">Password</label>
|
||||||
|
<input type="password" class="form-control" name="password" placeholder="password" required="required" id="user_password" />
|
||||||
|
<br>
|
||||||
|
<button type="submit" class="btn btn-primary" id="login_btn">Sign in</button>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<label class="form-text">Don't have an account yet?</label> <a href="signup.php" id="signup_link">Sign up</a>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<label class="form-text">Forget your password?</label> <a href="recover_password.php">Recover</a>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
|
if(isset($_SESSION['info_login'])) {
|
||||||
|
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_login'].'</div>';
|
||||||
|
$_SESSION['info_login'] = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// wrong pass
|
||||||
|
if(isset($_SESSION['wrong_pass'])) {
|
||||||
|
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['wrong_pass'].'</div>';
|
||||||
|
$_SESSION['wrong_pass'] = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(isset($_SESSION['infoChangePassword'])) {
|
||||||
|
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['infoChangePassword'].'</div>';
|
||||||
|
$_SESSION['infoChangePassword'] = null;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
LRR was originally developed as a <a href="http://lanlab.org/course/2018f/se/homepage.html" style="color:white;">software engineering course project</a> by Mohamed Nor and Elmahdi Houzi. Please submit your suggestions or bug reports to Mr Lan. <a href="./homepage" style="color:white;">More information ...</a>
|
LRR was originally developed as a <a href="http://lanlab.org/course/2018f/se/homepage.html" style="color:white;">software engineering course project</a> by Mohamed Nor and Elmahdi Houzi. Please submit your suggestions or bug reports to Mr Lan. <a href="./homepage" style="color:white;">More information ...</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,37 +7,26 @@ include 'Header.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="container">
|
||||||
|
<div class="row justify-content-md-center">
|
||||||
<div class="col-md-4 list-group" style="margin:auto;">
|
<div class="col-md-auto">
|
||||||
|
<form method="post" action="Script.php">
|
||||||
<br>
|
<input type="hidden" name="frm_recover_password" value="true"/>
|
||||||
|
Student number <input type="text" name="sno" placeholder="Enter your student number" class="form-control" required="required" value="<?php echo htmlspecialchars($_SESSION['student_number']); ?>">
|
||||||
<h4 class="list-group-item active"> Recover password </h4>
|
<br/>
|
||||||
<div class="list-group-item">
|
Email <input type="text" name="email" placeholder="Enter your email address" class="form-control" required="required" value="<?php echo htmlspecialchars($_SESSION['user_email']); ?>">
|
||||||
|
<br/>
|
||||||
<div class="panel-body">
|
<button type="submit" class="btn btn-primary">Recover</button>
|
||||||
<form method="post" action="Script.php">
|
</form>
|
||||||
<input type="hidden" name="frm_recover_password" value="true"/>
|
|
||||||
Student number <input type="text" name="sno" placeholder="Enter your student number" class="form-control" required="required" value="<?php echo htmlspecialchars($_SESSION['student_number']); ?>">
|
|
||||||
<br/>
|
|
||||||
Email <input type="text" name="email" placeholder="Enter your email address" class="form-control" required="required" value="<?php echo htmlspecialchars($_SESSION['user_email']); ?>">
|
|
||||||
<br/>
|
|
||||||
<input type="submit" class="btn-primary" value="Recover">
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
if(isset($_SESSION['info_recover_password'])) {
|
|
||||||
echo '<hr><div class="alert alert-danger" role="alert">'.htmlspecialchars($_SESSION['info_recover_password']).'</div>';
|
|
||||||
$_SESSION['info_recover_password'] = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if(isset($_SESSION['info_recover_password'])) {
|
||||||
|
echo '<hr><div class="alert alert-danger" role="alert">'.htmlspecialchars($_SESSION['info_recover_password']).'</div>';
|
||||||
|
$_SESSION['info_recover_password'] = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
58
signup.php
58
signup.php
|
@ -6,45 +6,39 @@ include 'NoDirectPhpAcess.php';
|
||||||
include 'Header.php';
|
include 'Header.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="container">
|
||||||
|
|
||||||
<div class="col-md-4 list-group" style="margin:auto;">
|
<div class="row justify-content-md-center">
|
||||||
|
<div class="col-md-auto">
|
||||||
|
|
||||||
<br>
|
<form method="post" action="Script.php" id="signup_form">
|
||||||
|
|
||||||
<h4 class="list-group-item active"> Please fill in each field below </h4>
|
<input type="hidden" name="form_signup" value="true" />
|
||||||
<div class="list-group-item">
|
Full Name
|
||||||
|
<input type="text" name="fullname" placeholder="Your full name" class="form-control" value="<?php echo $_SESSION['user_fullname']; ?>" required="required" id="full_name"/>
|
||||||
|
|
||||||
<div class="panel-body">
|
Student ID
|
||||||
|
<input type="text" name="user_student_id" placeholder="Entre your student ID" class="form-control" value="<?php echo $_SESSION['user_student_id']; ?>" required="required" id="student_id">
|
||||||
|
|
||||||
<form method="post" action="Script.php" id="signup_form">
|
Email
|
||||||
<input type="hidden" name="form_signup" value="true" />
|
<input type="text" name="email" placeholder="Email" class="form-control" value="<?php echo $_SESSION['user_email']; ?>" required="required" id="email" />
|
||||||
Full Name
|
|
||||||
<input type="text" name="fullname" placeholder="Your full name" class="form-control" value="<?php echo $_SESSION['user_fullname']; ?>" required="required" id="full_name"/>
|
|
||||||
|
|
||||||
Student ID
|
Password <label class="form-text">must include uppercase and lowercase letters, digits and special characters</label>
|
||||||
<input type="text" name="user_student_id" placeholder="Entre your student ID" class="form-control" value="<?php echo $_SESSION['user_student_id']; ?>" required="required" id="student_id">
|
<input type="password" class="form-control" name="password" placeholder="Enter password" required="required" id="password1" />
|
||||||
|
|
||||||
Email
|
Confirm Password
|
||||||
<input type="text" name="email" placeholder="Email" class="form-control" value="<?php echo $_SESSION['user_email']; ?>" required="required" id="email" />
|
<input type="password" class="form-control" name="confirmpassword" placeholder="Confirm password" required="required" id="password2" />
|
||||||
|
<br>
|
||||||
|
<button type="submit" class="btn btn-primary" id="signup_btn">Sign up</button>
|
||||||
|
<?php
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
if (isset($_SESSION['info_signup'])) {
|
||||||
|
echo '<hr><div class="alert alert-danger" role="alert">' . $_SESSION['info_signup'] . '</div>';
|
||||||
|
$_SESSION['info_signup'] = null;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
Password (<i>must include uppercase and lowercase letters, digits and special characters</i>)
|
</form>
|
||||||
<input type="password" class="form-control" name="password" placeholder="Enter password" required="required" id="password1" />
|
</div>
|
||||||
|
|
||||||
Confirm Password
|
|
||||||
<input type="password" class="form-control" name="confirmpassword" placeholder="Confirm password" required="required" id="password2" />
|
|
||||||
<br>
|
|
||||||
<input type="submit" class="btn-primary" value="Sign up" id="signup_btn">
|
|
||||||
<?php
|
|
||||||
error_reporting(E_ALL);
|
|
||||||
if (isset($_SESSION['info_signup'])) {
|
|
||||||
echo '<hr><div class="alert alert-danger" role="alert">' . $_SESSION['info_signup'] . '</div>';
|
|
||||||
$_SESSION['info_signup'] = null;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue