-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
109 lines (88 loc) · 3.23 KB
/
index.php
File metadata and controls
109 lines (88 loc) · 3.23 KB
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
<?php
ob_start();
session_start();
$a = "default";
$a = $_SESSION['flag'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="css/login.css" />
<link type="text/css" rel="stylesheet" href="css/bootstrap.css" />
<script src="js/bootstrap.min.js"> </script>
<script src="js/bootstrap.js"></script>
<title>Network Console Panel</title>
</head>
<?php
if($a == "not_root")
{echo '
<body background="bg.jpg" >
<div class="container">
<form class="form-signin" role="form" action="login.php" method="post">
<h2 class="form-signin-heading">Sign in</h2>
<input type="text" name="name" class="form-control " placeholder="User Name" required autofocus>
<input type="password" name="password" class="form-control" placeholder="Password" required>
<div>
<input class="btn btn-lg btn-primary btn-block" type="submit" value="Sign In">
<br>
<center><label class="alert alert-danger" align="center">Permission Denied!!</label>
</div>
</form>
</div>
</body>
</html>
';
}
else if($a == "wrong_input")
{echo '
<body background="bg.jpg" >
<div class="container">
<form class="form-signin" role="form" action="login.php" method="post">
<h2 class="form-signin-heading">Sign in</h2>
<input type="text" name="name" class="form-control " placeholder="User Name" required autofocus>
<input type="password" name="password" class="form-control" placeholder="Password" required>
<div><input class="btn btn-lg btn-primary btn-block" type="submit" value="Sign In">
<br>
<center><label class="alert alert-danger" align="center">User Name and Password do not match!!</label></div>
</div>
</form>
</body>
</html>
';
}
else if($a=="default")
{
echo '
<body background="bg.jpg" >
<div class="container">
<form class="form-signin" role="form" action="login.php" method="post">
<h2 class="form-signin-heading">Sign in</h2>
<input type="text" name="name" class="form-control " placeholder="User Name" required autofocus>
<input type="password" name="password" class="form-control" placeholder="Password" required>
<input class="btn btn-lg btn-primary btn-block" type="submit" value="Sign In">
<br>
<center><label class="alert alert-danger" align="center">Please login first!!</label></div>
</form>
</div>
</body>
</html>
';
}
else
{echo '
<body background="bg.jpg">
<div class="container">
<form class="form-signin" role="form" action="login.php" method="post">
<h2 class="form-signin-heading">Sign in</h2>
<input type="text" name="name" class="form-control " placeholder="User Name" required autofocus>
<input type="password" name="password" class="form-control" placeholder="Password" required>
<div><input class="btn btn-lg btn-primary btn-block" type="submit" value="Sign In">
</div>
</form>
</body>
</html>
';
}
session_destroy();
?>