-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
156 lines (109 loc) · 4.88 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" integrity="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="assets/styles/styles.css">
<title>Falcontrac</title>
<?php
if (isset($_POST['submit'])) {
header("Location: routes/monitor.php");
if (isset($_POST['rr'])) {
$check = $_POST['rr'];
if ($check == "Admin") {
/* include 'classes/user.php';
$un = $_POST['userName'];
$pas = $_POST['password'];
$test = new admin();
$test->login($un, $pas);
if ($test->loggedIn == true) {
//setup session
//redirect user
header("Location: routes/monitor.php");
} else {
echo '<script type="text/javascript">
alert("Your Email or Password is Incorrect");
</script>';
} */
} else {
if ($check == "custommer") {
/* include 'classes/user.php';
$un = $_POST['userName'];
$pas = $_POST['password'];
$test = new customer();
$test->login($un, $pas);
if ($test->loggedIn == true) {
//setup session
//redirect user
header("Location: routes/monitor.php");
} else {
echo '<script type="text/javascript">
alert("Your Email or Password is Incorrect");
</script>';
} */
}
}
}
}
?>
</head>
<body>
<!-- navbar start -->
<div class="container py-4">
<div class="d-flex justify-content-between">
<div class="logo">
<img src="assets/images/logo.png" alt="">
</div>
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="#">test</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">test</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">test</a>
</li>
</ul>
</div>
<!-- navbar end -->
<!-- login form start -->
<div class="d-flex justify-content-center pt-5">
<!-- --------------------------------------------formm------------------------------------- -->
<form class="bg-light p-5 rounded shadow w-75" method="POST">
<h1 class="text-center login-text">Login</h1>
<br>
<input type="radio" selected name="rr" value="Admin">
<label for="Admin">Admin</label>
<input type="radio" name="rr" value="custommer">
<label for="custommer">Custommer</label><br>
<div class="mb-3">
<div class="input-group flex-nowrap">
<span class="input-group-text" id="addon-wrapping">@</span>
<input type="text" class="form-control" placeholder="Username" name="userName" id="userName">
</div>
</div>
<div class="mb-3">
<div class="input-group flex-nowrap">
<span class="input-group-text" id="addon-wrapping">***</span>
<input type="password" class="form-control" placeholder="password" name="password" id="password">
</div>
<div id="emailHelp" class="form-text">We'll never share your password with anyone else.</div>
<div class="text-center m-1">
</div>
</div>
<div class="mb-3 forget-password">
<p data-bs-toggle="modal" data-bs-target="#exampleModal">Forgot your passwoed ?</p>
</div>
<button type="submit" name="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
<!-- login form end -->
<!-- login form end --->
<!-- resetmodal -->
</body>
</html>