-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathindex.php
90 lines (75 loc) · 2.47 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
<?php
session_start();
$email_address= !empty($_SESSION['email'])?$_SESSION['email']:'';
if(!empty($email_address))
{
header("location:dashboard.php");
}
include('config/database.php');
include('scripts/admin-login.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Admin Panel</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--bootstrap4 library linked-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<!--custom style-->
<style type="text/css">
.registration-form{
background: #f7f7f7;
padding: 20px;
margin: 100px 0px;
}
.err-msg{
color:red;
}
.registration-form form{
border: 1px solid #e8e8e8;
padding: 10px;
background: #f3f3f3;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-sm-4">
</div>
<div class="col-sm-4">
<!--====registration form====-->
<div class="registration-form">
<h4 class="text-center">Admin Panel</h4>
<p class="text-success text-center"><?php echo $call_login; ?></p>
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
<!--// Email//-->
<div class="form-group">
<label>Email:</label>
<input type="text" class="form-control" placeholder="Enter Email" name="email" value="<?php echo $set_email; ?>">
<p class="err-msg">
<?php if($emailErr!=1){ echo $emailErr; } ?>
</p>
</div>
<!--//Password//-->
<div class="form-group">
<label>Password:</label>
<input type="password" class="form-control" placeholder="Enter Password" name="password">
<p class="err-msg">
<?php if($passErr!=1){ echo $passErr; } ?>
</p>
</div>
<button type="submit" class="btn btn-secondary" name="login">Login</button>
</form>
</div>
</div>
<div class="col-sm-4">
</div>
</div>
</div>
</body>
</html>