-
Notifications
You must be signed in to change notification settings - Fork 0
/
loginadmin.php
127 lines (104 loc) · 3.13 KB
/
loginadmin.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
<?php
require_once 'dbconfig.php';
if(isset($_POST['login'])) {
$un = $_POST['username'];
$pwd = $_POST['password'];
if($un=="") {
$errMSG = "Please Enter Valid User Name";
}
else if($pwd=="") {
$errMSG = "Please Enter Valid Password";
}
else if($un=="" && $pwd=="") {
$errMSG = "Please Enter Valid User Name & Password";
}
else if($un=="billing" && $pwd=="billing") {
$errMSG = "please login as an admin ";
}
else {
if($un=="admin" && $pwd=="1234") {
header("Location: choice.php"); /* Redirect browser */
exit();
}
else {
$errMSG = "Invalid User Credentials";
}
}
}
if(isset($_POST['clear'])) {
header("Location: login.php"); /* Redirect browser */
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Contact - Dolphin Template</title>
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
<div id="background">
<div id="page">
<div id="header">
<div id="logo">
<a href="index.html"><img src="images/metrologo.png" alt="LOGO" height="112" width="250"></a>
</div>
<div id="navigation">
<ul>
<li>
<a href="index.html">Home</a>
</li>
<li class="selected">
<a href="loginadmin.php">Admin Login</a>
</li>
<li>
<a href="loginbilling.php">Billing Login</a>
</li>
<li>
<a href="loginmanager.php">manager</a>
</li>
</ul>
</div>
</div>
<div id="contents">
<div class="body">
<h1 style="margin-left: 150px">Sign In As Admin</h1>
<form method="post" style="float: left; color: black; height: 200px; width: 400px;border: 1px solid #5a4535;padding: 19px 19px 6px;margin-left: 150px;">
<?php
if(isset($errMSG)){
?>
<div class="alert alert-danger">
<span class="glyphicon glyphicon-info-sign"></span> <strong><?php echo $errMSG; ?></strong>
</div>
<?php
}
?>
<table style="border-collapse: collapse;margin-left:60px">
<tr style="height: 50px;">
<td>User Name:</td>
<td><input type="text" value="" name="username" class="txtfield"></td>
</tr>
<tr style="height: 50px;">
<td>Password:</td>
<td><input type="password" value="" name="password" class="txtfield"></td>
</tr>
<tr style="height: 50px;">
<td colspan=2>
<input type="submit" name="login" value="Log in" style="background: url(images/bg-navigation.png) no-repeat;height: 36px;width: 120px;border: 0;padding: 0;margin: 0;color:white;">
<input type="submit" name="clear" value="Clear" style="background: url(images/bg-navigation.png) no-repeat;height: 36px;width: 120px;border: 0;padding: 0;margin: 0;color:white;">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<div id="footer">
<p>
© 2020 by Product Sales Management System. All Rights Reserved
</p>
</div>
</div>
</body>
</html>