This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
110 lines (106 loc) · 2.85 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
<?php
session_start();
if( isset( $_SESSION['auth']) && $_SESSION['auth'] == "OK" ) {
if( isset( $_SESSION['student'] ) ) {
header( "Location:user/" );
} else if( isset( $_SESSION['admin'] ) ) {
header( "Location:admin/" );
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Feedback : Home</title>
<link rel="stylesheet" href="css/spacelab.min.css" type="text/css" />
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<style>
body {
padding-top:70px;
padding-bottom:30px;
}
.error {
color:#f00 !important;
}
</style>
</head>
<body onload="document.getElementById('user').focus();">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="/">Feedback</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active">
<a href="/">
<span class="glyphicon glyphicon-home"></span>
Home
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="jumbotron">
<h2><span class="glyphicon glyphicon-home"></span> Malabar Institute of Technology <small>Anjarakandy</small></h2>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-4"> </div>
<div class="col-md-4">
<div class="jumbotron">
<form role="form" action="login.php" method="POST" onSubmit="validate();">
<div class="form-group">
<label for="user">Username</label>
<input type="text" name="user" id="user" placeholder="Username" class="form-control" />
</div>
<div class="form-group">
<label for="pass">Password</label>
<input type="password" name="pass" id="pass" placeholder="Password" class="form-control" />
</div>
<?php
if( isset( $_SESSION['error'] ) ) {
?>
<div class="form-group">
<label class="error">
<?php
echo $_SESSION['error'];
unset( $_SESSION['error'] );
?>
</label>
</div>
<?php
}
?>
<button class="btn btn-success" style="width:100%;">Login</button>
</form>
</div>
</div>
<div class="col-md-4"> </div>
</div>
</div>
<div class="navbar navbar-default navbar-fixed-bottom" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="/">
<span class="glyphicon glyphicon-copyright-mark"></span> Feedback.me
</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="mailto:[email protected]">
<span class="glyphicon glyphicon-user"></span>
Webmaster
</a>
</li>
</ul>
</div>
</div>
</div>
</body>
</html>