2020-03-16 15:23:14 +08:00
|
|
|
<?php
|
2021-11-16 22:20:40 +08:00
|
|
|
$page='Home';
|
|
|
|
require 'Header.php';
|
|
|
|
session_start();
|
2020-03-16 15:23:14 +08:00
|
|
|
?>
|
|
|
|
|
2020-10-02 17:02:20 +08:00
|
|
|
<?php
|
2021-01-29 17:25:59 +08:00
|
|
|
// if the user has already logged in, then clicking the LRRS icon should not display the login page (i.e., index.php).
|
2020-10-02 17:02:20 +08:00
|
|
|
if (isset($_SESSION["user_fullname"])) {
|
|
|
|
header("Location: Courses.php");
|
|
|
|
}
|
|
|
|
?>
|
2021-11-16 22:20:40 +08:00
|
|
|
<div class="album py-5 bg-white">
|
|
|
|
<div class="container bg-white">
|
2020-03-16 15:23:14 +08:00
|
|
|
|
2021-11-16 22:20:40 +08:00
|
|
|
<div class="row align-items-center">
|
2020-03-16 15:23:14 +08:00
|
|
|
|
2021-11-16 22:20:40 +08:00
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="mb-6 box-shadow">
|
|
|
|
<img class="mx-auto d-block" src="logo.png" />
|
|
|
|
<div class="card-body">
|
|
|
|
<h1 style="font-family: Poppins-Regular;">Lab Report Repository</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-16 15:23:14 +08:00
|
|
|
|
2021-11-16 22:20:40 +08:00
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="card mb-6 box-shadow">
|
|
|
|
<div class="card-header bg-primary" >
|
|
|
|
<h4 class="list-group-item active" style="font-weight:normal;font-family: Poppins-Regular;"> Sign in </h4>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<form method="post" action="Script.php" name="frm_login">
|
|
|
|
<input type="hidden" name="frm_login" value="true"/>
|
|
|
|
Student ID / Instructor Email
|
|
|
|
<input type="text" name="user" placeholder="Email / Student Number" class="form-control" required="required" />
|
|
|
|
<br>
|
|
|
|
Password
|
|
|
|
<input type="password" class="form-control" name="password" placeholder="password" required="required" />
|
|
|
|
<div class="text-center">
|
|
|
|
<br><input type="submit" class="btn btn-primary my-2" value="Login">
|
|
|
|
</div>
|
|
|
|
<br> <a href="recover_password.php">Reset my password</a>
|
|
|
|
<div class="text-center">
|
|
|
|
<br><span class="txt1">Don't have an account?</span>
|
|
|
|
<a class="txt2" href="signup.php" >Sign Up</a>
|
|
|
|
</div>
|
2020-03-16 15:23:14 +08:00
|
|
|
|
2021-11-16 22:20:40 +08:00
|
|
|
<?php
|
2020-03-16 15:23:14 +08:00
|
|
|
|
2021-11-16 22:20:40 +08:00
|
|
|
error_reporting(E_ALL);
|
2020-03-16 15:23:14 +08:00
|
|
|
|
2021-11-16 22:20:40 +08:00
|
|
|
if(isset($_SESSION['info_login'])) {
|
|
|
|
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_login'].'</div>';
|
|
|
|
$_SESSION['info_login']=null;
|
|
|
|
}
|
2020-03-16 15:23:14 +08:00
|
|
|
|
|
|
|
|
2021-11-16 22:20:40 +08:00
|
|
|
// wrong pass
|
|
|
|
if(isset($_SESSION['wrong_pass'])) {
|
|
|
|
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['wrong_pass'].'</div>';
|
|
|
|
$_SESSION['wrong_pass']=null;
|
|
|
|
}
|
2020-03-16 15:23:14 +08:00
|
|
|
|
|
|
|
|
2021-11-16 22:20:40 +08:00
|
|
|
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>
|
2020-12-25 21:30:34 +08:00
|
|
|
|
2021-11-16 22:20:40 +08:00
|
|
|
<?php
|
|
|
|
require 'Footer.php';
|
|
|
|
?>
|
|
|
|
|
|
|
|
</body>
|
2020-12-25 21:30:34 +08:00
|
|
|
|
2021-01-29 17:25:59 +08:00
|
|
|
|
2020-03-16 15:23:14 +08:00
|
|
|
</html>
|