forked from mrlan/LRR
index.php: make the code look cleaner.
parent
69355029a8
commit
56c249390e
80
index.php
80
index.php
|
@ -1,16 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
$page='Home';
|
$page='Home';
|
||||||
include 'Header.php';
|
require 'Header.php';
|
||||||
session_start();
|
session_start();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// if the user has already logged in, then clicking the LRRS icon should not display the login page (i.e., index.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"])) {
|
if (isset($_SESSION["user_fullname"])) {
|
||||||
header("Location: Courses.php");
|
header("Location: Courses.php");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<br><br><br>
|
||||||
<br><br><br>
|
<br><br><br>
|
||||||
<div class="row" style="width:80%;margin:auto;">
|
<div class="row" style="width:80%;margin:auto;">
|
||||||
|
|
||||||
|
@ -27,6 +28,7 @@ if (isset($_SESSION["user_fullname"])) {
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h4 class="list-group-item active"> Sign in </h4>
|
<h4 class="list-group-item active"> Sign in </h4>
|
||||||
|
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
@ -49,20 +51,20 @@ if (isset($_SESSION["user_fullname"])) {
|
||||||
|
|
||||||
if(isset($_SESSION['info_login'])) {
|
if(isset($_SESSION['info_login'])) {
|
||||||
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_login'].'</div>';
|
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_login'].'</div>';
|
||||||
$_SESSION['info_login']=null;
|
$_SESSION['info_login'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// wrong pass
|
// wrong password
|
||||||
if(isset($_SESSION['wrong_pass'])) {
|
if(isset($_SESSION['wrong_pass'])) {
|
||||||
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['wrong_pass'].'</div>';
|
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['wrong_pass'].'</div>';
|
||||||
$_SESSION['wrong_pass']=null;
|
$_SESSION['wrong_pass'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(isset($_SESSION['infoChangePassword'])) {
|
if(isset($_SESSION['infoChangePassword'])) {
|
||||||
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['infoChangePassword'].'</div>';
|
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['infoChangePassword'].'</div>';
|
||||||
$_SESSION['infoChangePassword']=null;
|
$_SESSION['infoChangePassword'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,26 +72,27 @@ if (isset($_SESSION["user_fullname"])) {
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-4 list-group">
|
<div class="col-md-4 list-group">
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<h4 class="list-group-item active"> Sign up </h4>
|
<h4 class="list-group-item active"> Sign up </h4>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item" style="height:235px">
|
||||||
|
|
||||||
<form method="post" action="Script.php" name="frm_signup_1">
|
<form method="post" action="Script.php" name="frm_signup_1">
|
||||||
<input type="hidden" name="frm_signup_1" value="true"/>
|
<input type="hidden" name="frm_signup_1" value="true"/>
|
||||||
|
|
||||||
Student ID
|
Student ID
|
||||||
<input type="text" name="student_id" placeholder="Entre your Student ID" class="form-control" required="">
|
<input type="text" name="student_id" placeholder="Entre your student ID" class="form-control" required="">
|
||||||
|
|
||||||
Your Passport / National ID
|
|
||||||
<input type="text" class="form-control" name="passport" placeholder="(Optional)">
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<div class="btnsignup" style="padding-top:58px">
|
||||||
<input type="submit" name="frm_signup_1" class="btn btn-primary" value="Next"> <br> Click Next to set up password
|
<input type="submit" name="frm_signup_1" class="btn btn-primary" value="Next"> <br> Click Next to set up password
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,7 +101,7 @@ if (isset($_SESSION["user_fullname"])) {
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
if(isset($_SESSION['info_signup1'])) {
|
if(isset($_SESSION['info_signup1'])) {
|
||||||
echo '<div class="alert alert-danger" role="alert">'.$_SESSION['info_signup1'].'</div>';
|
echo '<div class="alert alert-danger" role="alert">'.$_SESSION['info_signup1'].'</div>';
|
||||||
$_SESSION['info_signup1']=null;
|
$_SESSION['info_signup1'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -106,28 +109,31 @@ if (isset($_SESSION["user_fullname"])) {
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div style="" id="footer">
|
|
||||||
LRRS 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 lanhui _at_ zjnu.edu.cn. Last updated on 18/04/2020 by Ashly. <a href="./homepage" style="color:white;">More information ...</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style="" id="footer">
|
||||||
|
LRRS 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 lanhui _at_ zjnu.edu.cn.
|
||||||
|
Last updated on 18/04/2020 by Ashly. <a href="./homepage" style="color:white;">More information ...</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
#footer{
|
#footer {
|
||||||
position:fixed;
|
position:fixed;
|
||||||
bottom:0;
|
bottom:0;
|
||||||
left:0;
|
left:0;
|
||||||
background-color:#03417C;
|
background-color:#03417C;
|
||||||
color:#FFF;
|
color:#e0e0e0;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue