forked from lanlab-org/LRR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
133 lines (93 loc) · 3.36 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
$page='Home';
include '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"])) {
header("Location: Courses.php");
}
?>
<br><br><br>
<div class="row" style="width:80%;margin:auto;">
<div class="col-md-4">
<br><br>
<img src="logo_text.png" style="width">
<h1> Lab Report Repository </h1>
<br><br>
</div>
<div class="col-md-4 list-group">
<br>
<h4 class="list-group-item active"> 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"/>
Student ID / Email
<input type="text" name="user" placeholder="Email / Student Number" class="form-control" required="required" />
Password
<input type="password" class="form-control" name="password" placeholder="password" required="required" />
<br>
<input type="submit" class="btn btn-primary" value="Login"><br> <a href="recover_password.php" style="font-weight:normal;color:gray">Reset my password</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 class="col-md-4 list-group">
<br>
<h4 class="list-group-item active"> Sign up </h4>
<div class="list-group-item">
<form method="post" action="Script.php" name="frm_signup_1">
<input type="hidden" name="frm_signup_1" value="true"/>
Student ID
<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>
<input type="submit" name="frm_signup_1" class="btn btn-primary" value="Next"> <br> Click Next to set up password
<?php
error_reporting(E_ALL);
if(isset($_SESSION['info_signup1'])) {
echo '<div class="alert alert-danger" role="alert">'.$_SESSION['info_signup1'].'</div>';
$_SESSION['info_signup1']=null;
}
?>
</div>
</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>
</body>
<style>
#footer{
position:fixed;
bottom:0;
left:0;
background-color:#03417C;
color:#FFF;
text-align:center;
width:100%;
}
</style>
</html>