Upgrade to Bootstrap 5. TODO: nav tab does not work in Admin.php.
parent
7d28f987d2
commit
9c529e0022
45
Admin.php
45
Admin.php
|
@ -15,54 +15,37 @@ if ($_SESSION['user_type'] != "Lecturer" && $_SESSION['user_type'] != "Admin") {
|
|||
}
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<br>
|
||||
<div style="width: 80%;margin: auto;">
|
||||
<div>
|
||||
<h2> Administration panel </h2>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="row" style="width: 80%;margin: auto;">
|
||||
<div class="row">
|
||||
|
||||
<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">
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<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 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 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>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
|
||||
<div id="home" class="container tab-pane active"><br>
|
||||
<div id="home" class="tab-pane active"><br>
|
||||
|
||||
<?php
|
||||
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) -->
|
||||
<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>
|
||||
<form action="batch_insert.php" method="post" id="batch_form">
|
||||
<p>
|
||||
|
@ -136,7 +119,7 @@ if ($_SESSION['user_type'] != "Lecturer" && $_SESSION['user_type'] != "Admin") {
|
|||
</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;">
|
||||
<tr style="font-size:10pt;">
|
||||
|
@ -179,24 +162,19 @@ if ($_SESSION['user_type'] != "Lecturer" && $_SESSION['user_type'] != "Admin") {
|
|||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</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>
|
||||
<a class="nav-link active" href="#menu3" id="existing_courses">Existing courses</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="menu3" class="container tab-pane active"><br>
|
||||
|
||||
|
@ -257,6 +235,7 @@ if ($_SESSION['user_type'] != "Lecturer" && $_SESSION['user_type'] != "Admin") {
|
|||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function updatePass(id, pass) {
|
||||
|
|
|
@ -21,8 +21,6 @@ if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA")
|
|||
|
||||
|
||||
<div class="row" style="width:80%;margin:auto; text-align:left;">
|
||||
|
||||
|
||||
<script src="./css/jquery-1.11.1.min.js"></script>
|
||||
<script src="./css/jquery-ui.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/jquery-ui.css" />
|
||||
|
@ -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="0" checked=""> No
|
||||
|
||||
<br>
|
||||
<br><br>
|
||||
<input type="submit" class="btn btn-primary" value="Create"><br>
|
||||
|
||||
</form>
|
||||
|
|
42
Header.php
42
Header.php
|
@ -14,12 +14,13 @@ if (mysqli_connect_errno()) {
|
|||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<html lang="en-US">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<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" />
|
||||
<!-- *this css file can be used across all the websites
|
||||
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" />
|
||||
<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>
|
||||
|
||||
|
||||
|
@ -113,20 +115,6 @@ if (mysqli_connect_errno()) {
|
|||
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{
|
||||
padding-top: 1px;
|
||||
padding-bottom:1px;
|
||||
|
@ -142,8 +130,8 @@ if (mysqli_connect_errno()) {
|
|||
|
||||
<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;height:30px;"> LRR </a>
|
||||
<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;" 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">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
@ -159,7 +147,7 @@ if (mysqli_connect_errno()) {
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<form class="form-inline my-2 my-lg-0" style="color:#fff;">
|
||||
<form class="form-inline my-2 my-lg-0">
|
||||
Welcome
|
||||
<b> <?php echo $_SESSION['user_fullname']; ?> </b>
|
||||
|
||||
|
@ -174,18 +162,18 @@ if (mysqli_connect_errno()) {
|
|||
|
||||
<?php
|
||||
if ($_SESSION['user_type'] == "Lecturer") { // Show Admin link
|
||||
echo " <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i>";
|
||||
echo " <a style='color:#fff !important' href=\"~\..\Admin.php\" id=\"admin_tab\">Admin</a>";
|
||||
echo " <i class=\"fa fa-cog\"> </i>";
|
||||
echo " <a href=\"~\..\Admin.php\" id=\"admin_tab\">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-user"> </i>
|
||||
<a href="#" 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"> </i>
|
||||
<a href="~\..\logout.php">Logout </a>
|
||||
|
||||
<?php
|
||||
} // Confusing. What is this for?
|
||||
|
|
44
index.php
44
index.php
|
@ -15,42 +15,35 @@ if (isset($_SESSION["user_fullname"])) {
|
|||
|
||||
<br><br><br>
|
||||
|
||||
<div class="row" style="width:85%;margin:auto;">
|
||||
<div class="col-md-4">
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<img src="logo.png" style="width:32%; position:relative; right:-95px; top:1px;" alt="LRR Logo">
|
||||
<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;">
|
||||
<div style="width:32%; 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">
|
||||
|
||||
<div class="col">
|
||||
<form method="post" action="Script.php" name="frm_login">
|
||||
<input type="hidden" name="frm_login" value="true"/>
|
||||
Account name
|
||||
<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>
|
||||
Password
|
||||
<label for="user_password" class="form-label">Password</label>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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);
|
||||
|
@ -74,12 +67,9 @@ if (isset($_SESSION["user_fullname"])) {
|
|||
}
|
||||
?>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<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>
|
||||
|
|
|
@ -7,25 +7,19 @@ include 'Header.php';
|
|||
?>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 list-group" style="margin:auto;">
|
||||
|
||||
<br>
|
||||
|
||||
<h4 class="list-group-item active"> Recover password </h4>
|
||||
<div class="list-group-item">
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="container">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-md-auto">
|
||||
<form method="post" action="Script.php">
|
||||
<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">
|
||||
<button type="submit" class="btn btn-primary">Recover</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
if(isset($_SESSION['info_recover_password'])) {
|
||||
|
@ -34,10 +28,5 @@ include 'Header.php';
|
|||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
20
signup.php
20
signup.php
|
@ -6,18 +6,13 @@ include 'NoDirectPhpAcess.php';
|
|||
include 'Header.php';
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="container">
|
||||
|
||||
<div class="col-md-4 list-group" style="margin:auto;">
|
||||
|
||||
<br>
|
||||
|
||||
<h4 class="list-group-item active"> Please fill in each field below </h4>
|
||||
<div class="list-group-item">
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-md-auto">
|
||||
|
||||
<form method="post" action="Script.php" id="signup_form">
|
||||
|
||||
<input type="hidden" name="form_signup" value="true" />
|
||||
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"/>
|
||||
|
@ -28,13 +23,13 @@ include 'Header.php';
|
|||
Email
|
||||
<input type="text" name="email" placeholder="Email" class="form-control" value="<?php echo $_SESSION['user_email']; ?>" required="required" id="email" />
|
||||
|
||||
Password (<i>must include uppercase and lowercase letters, digits and special characters</i>)
|
||||
Password <label class="form-text">must include uppercase and lowercase letters, digits and special characters</label>
|
||||
<input type="password" class="form-control" name="password" placeholder="Enter password" required="required" id="password1" />
|
||||
|
||||
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">
|
||||
<button type="submit" class="btn btn-primary" id="signup_btn">Sign up</button>
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
if (isset($_SESSION['info_signup'])) {
|
||||
|
@ -42,9 +37,8 @@ include 'Header.php';
|
|||
$_SESSION['info_signup'] = null;
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue