-
Notifications
You must be signed in to change notification settings - Fork 13
/
login.php
129 lines (97 loc) · 3.3 KB
/
login.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
<!DOCTYPE HTML>
<html>
<head>
<title>IVORY Framework</title>
<link rel="stylesheet" type="text/css" href="css/ivory.css" media="all">
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<!-- For Date picker only -->
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<!-- For Date picker only -->
<style>
.content{width: 100%; height: auto; background-color: #EBEAE8; padding: 30px 12px;}
.note {
background-color: #ffffff;
padding: 10px 0;
color: #333333;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2);
}
button:active { background-color: fuchsia; }
</style>
<script type="text/javascript">
function noBack()
{
window.history.forward();
}
noBack();
window.onload = noBack;
window.onpageshow = function (evt)
{
if (evt.persisted) noBack();
}
window.onunload = function ()
{
void (0);
}
</script>
</head>
<body>
<form name="f1" method="POST" action="" >
<div class="row">
<h1 class="text-center">ADMIN LOGIN</h1>
</div>
<div class="content">
<div class="row space-bot">
<div align= "center" width="50%" height="50%">
<form id="frm" method="POST">
<lable><b>UERNAME</b></lable> <input type="text" name= "usrnm" id="usrnm" value=""/>
</br></br></br>
<lable><b>PASSWORD</b></lable> <input type="password" name= "passwd" id="passwd" value=""/>
</br></br></br></br>
<button type="submit" class ="magenta" name= "submit" >LOGIN</button>
</form>
<?php
//header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
//header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
if(isset($_POST['submit']))
{
$Username = $_POST['usrnm'];
$Password = $_POST['passwd'];
if (!(empty($Username) || empty($Password)))
{
echo "$Useranme";
echo "$Password";
if(($Username=="admin")&&($Password=="admin"))
{
$_SESSION['user'] = $Username;
header("Location:LoginViewController.php");
}
else
{
echo "<script>alert('INVALID USERNAME AND PASSWORD')</script>";
}
}
else
{
echo "<script>alert('You must enter both values.')</script>";
}
}
?>
</div>
</div>
</div>
</body>
</html>