91 lines
2.9 KiB
PHP
91 lines
2.9 KiB
PHP
<?php
|
|
$page='Home';
|
|
require 'Header.php';
|
|
session_start();
|
|
?>
|
|
|
|
<?php
|
|
// if the user has already logged in, then clicking the LRRS icon should not display the login page (i.e., index.php).
|
|
if (isset($_SESSION["user_fullname"])) {
|
|
echo '<div class="alert alert-info"> You\'ve already logged in.</div>';
|
|
header("Location: Courses.php");
|
|
exit();
|
|
}
|
|
?>
|
|
|
|
<br><br><br>
|
|
|
|
<div class="row" style="width:85%;margin:auto;">
|
|
<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>
|
|
</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>
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|