-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
398 lines (314 loc) · 13.2 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<?php
require_once 'php/dbConnect.php';
session_start();
if(isset($_SESSION['ADMIN_LOGIN'])){
header('location:admin/admin_dashboard_home.php');
}
if(isset($_SESSION['POLICE_LOGIN'])){
header('location:police/police_dashboard_home.php');
}
if(isset($_SESSION['DRIVER_LOGIN'])){
header('location:driver/driver_dashboard_dashboard_home.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Home Page</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/homepage_css.css">
<script src="https://kit.fontawesome.com/a81368914c.js"></script>
<!-- Google Fonts Links-->
<link href="https://fonts.googleapis.com/css?family=Poppins:600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
<link href="https://fonts.googleapis.com/css2?family=Baloo+Tamma+2:wght@700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Antic&display=swap" rel="stylesheet">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<link href="http://fonts.googleapis.com/css?family=Cookie" rel="stylesheet" type="text/css">
</head>
<body>
<div class="page-wrapper">
<header>
<h3 class="logo-header"><a href="index.php"> Driver-Police Control System</a></h3>
<nav class="nav-container">
<ul class="navbar_links">
<li><a href="index.php">Home</a></li>
<li><a href="driver/driver_login.php">Driver</a></li>
<li><a href="police/police_login.php">Police</a></li>
<li><a href="admin/admin_login.php">Admin</a></li>
</ul>
</nav>
<a class="contact-btn" href="contact_page.php"><button>Contact</button></a>
</header>
<div class="con">
<div class="cont">
<p>Welcome <span class="typed-text"></span><span class="cursor"> </span></p>
</div>
</div>
<section class="login-section">
<div class ="buton-area">
<br>
<br>
<br>
<br>
<br>
<h1><p> Driver Login Support:</p></h1>
<h2> Already Registered As Driver</h2>
<div class="buttons">
<a href="driver/driver_login.php"><button>Click Here</button></a>
<br>
<h2> Not Register yet? </h2>
<a href="driver/driver_registration.php"><button>Register</button></a>
</div>
</div>
<script>
const typedTextSpan = document.querySelector(".typed-text");
const cursorSpan = document.querySelector(".cursor");
const textArray = ["To Driver Police Inter Active System!", "To Driver Police Inter Active System!", "To Driver Police Inter Active System!", "To Driver Police Inter Active System!"];
const typingDelay = 200;
const erasingDelay = 100;
const newTextDelay = 2000; // Delay between current and next text
let textArrayIndex = 0;
let charIndex = 0;
function type() {
if (charIndex < textArray[textArrayIndex].length) {
if(!cursorSpan.classList.contains("typing")) cursorSpan.classList.add("typing");
typedTextSpan.textContent += textArray[textArrayIndex].charAt(charIndex);
charIndex++;
setTimeout(type, typingDelay);
}
else {
cursorSpan.classList.remove("typing");
setTimeout(erase, newTextDelay);
}
}
function erase() {
if (charIndex > 0) {
if(!cursorSpan.classList.contains("typing")) cursorSpan.classList.add("typing");
typedTextSpan.textContent = textArray[textArrayIndex].substring(0, charIndex-1);
charIndex--;
setTimeout(erase, erasingDelay);
}
else {
cursorSpan.classList.remove("typing");
textArrayIndex++;
if(textArrayIndex>=textArray.length) textArrayIndex=0;
setTimeout(type, typingDelay + 1100);
}
}
document.addEventListener("DOMContentLoaded", function() { // On DOM Load initiate the effect
if(textArray.length) setTimeout(type, newTextDelay + 250);
});
</script>
</div>
<script>
const inputs = document.querySelectorAll(".input");
function addcl(){
let parent = this.parentNode.parentNode;
parent.classList.add("focus");
}
function remcl(){
let parent = this.parentNode.parentNode;
if(this.value == ""){
parent.classList.remove("focus");
}
}
inputs.forEach(input => {
input.addEventListener("focus", addcl);
input.addEventListener("blur", remcl);
});
</script>
</section>
</div>
<!------------------------------Ranking Table/Showing top -10 Driver based on their points------------->
<div>
<table class="content-table">
<thead>
<tr>
<th>#Rank</th>
<th>Name</th>
<th>Driver Id</th>
<th>Current Point</th>
<th>No of Cases</th>
</tr>
</thead>
<tbody>
<?php
//Joining two table Based on Email to retrieve data
//query to show data in rank table
$query="SELECT DISTINCT `Email`,`Driver_Id`,`First_Name`,`Last_Name`,`Point`,`Issue_Date_Time`,`No_Of_Cases`,caseissue.`Driver_Email_Fk`,ROW_NUMBER() OVER (PARTITION BY `Point` ORDER BY `Point`DESC) AS `Rank` FROM (`account` INNER JOIN `driver` ON `Email`=`Driver_Email_Fk`) JOIN `caseissue` ON driver.`Driver_Email_Fk`=caseissue.`Driver_Email_Fk` GROUP BY caseissue.`Driver_Email_Fk` ORDER BY `No_Of_Cases` ASC,`Issue_Date_Time` ASC LIMIT 10";
$resultQuery=mysqli_query($dbConnect,$query);
while($rowValues=mysqli_fetch_assoc($resultQuery)){
?>
<tr>
<td><?= $rowValues['Rank']?></td>
<td><?=ucwords( $rowValues['First_Name'] . ' '. $rowValues['Last_Name'])?></td>
<td><?= ucwords($rowValues['Driver_Id'])?></td>
<td><?= $rowValues['Point']?>/15</td>
<td><?= $rowValues['No_Of_Cases']?></td>
</tr>
<?php
}
?>
</tbody>
<thead>
<tr>
<th>#Rank</th>
<th>Name</th>
<th>Driver Id</th>
<th>Current Point</th>
<th>No of Cases</th>
</tr>
</thead>
</table>
</div>
<br><br>
<div id ="cent">
<div class="container">
<div class="s-box">
<div class="imgBx">
<img src="img/AdminS.jpg">
</div>
<div class="content">
<h3>About Admin Policy</h3>
<p>Admin should Respact his work and rules regulations. Admin should not do any illegal activities contray especially cyber crime.
Admin's job is to monitor and help the other types of users in such help and guide them to what the need. Admin needs to collaborate with police to maintain proper process.Management of office equipment.
Maintaining a clean and enjoyable working environment. Handling external or internal communication or management system.<br>
Thank you for reading.
</p>
</div>
</div>
<div class="s-box">
<div class="imgBx">
<img src="img/PoliceS.jfif">
</div>
<div class="content">
<h3>About Police Policy</h3>
<p>Police should Respact his work and rules regulations. POlice should not do any illegal activities.Police officers are tasked with maintaining order and keeping their communities safe. The term police officer covers a wide variety of roles, including behind the scenes work like handwriting analysis and officer training. Attending a recruitment event in your local area can help you learn more about all the potential paths.
Police officers can work for the city, county, state, or federal government.<br>
Thank you for reading.
</div>
</div>
<div class="s-box">
<div class="imgBx">
<img src="img/DriverS.jpg">
</div>
<div class="content">
<h3>About Driver Policy</h3>
<p>Driver should Respact his work and rules regulations. Driver should not do any illegal activities.Driving for work involves a risk not only for drivers, but also for fellow workers and members of the public, such as pedestrians and other road users. As an employer or self-employed person, you must, by law, manage the risks that may arise when you or your employees drive for work.<br>
Thank you for reading</p>
</div>
</div>
</div>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br><br>
<br>
<br>
<br>
<br>
<br>
<br>
<div id="clock">
<div id="time">
<div><span id="hour">00</span><span>Hours</span></div>
<div><span id="minutes">00</span><span>Minutes</span></div>
<div><span id="seconds">00</span><span>Seconds</span></div>
<div><span id="ampm">AM</span></div>
</div>
</div>
<script type="text/javascript">
function clock(){
var hours = document.getElementById('hour');
var Minutes = document.getElementById('minutes');
var seconds = document.getElementById('seconds');
var ampm = document.getElementById('ampm');
var h = new Date().getHours();
var m = new Date().getMinutes();
var s = new Date().getSeconds();
var am = "AM";
if(h > 12){
h = h - 12;
var am = "PM"
}
h = (h < 10) ? "0" + h : h
m = (m < 10) ? "0" + m : m
s = (s < 10) ? "0" + s : s
hours.innerHTML = h;
minutes.innerHTML = m;
seconds.innerHTML = s;
ampm.innerHTML = am;
}
var interval = setInterval(clock, 1000);
</script>
<br>
<br>
<br>
<div class="middle">
<a class="btn" href="#">
<i class="fab fa-facebook-f"></i>
</a>
<a class="btn" href="#">
<i class="fab fa-twitter"></i>
</a>
<a class="btn" href="#">
<i class="fab fa-google"></i>
</a>
<a class="btn" href="#">
<i class="fab fa-instagram"></i>
</a>
<a class="btn" href="#">
<i class="fab fa-youtube"></i>
</a>
</div>
<br/>
<br>
<footer class="footer-distributed">
<div class="footer-left">
<img src="">
<h3><span>Driver Police Inter Active System</span></h3>
<p class="footer-company-name">© ODPIAS Pvt. Ltd.</p>
</div>
<div class="footer-center">
<div>
<i class="fa fa-map-marker"></i>
<p><span>
Dhaka,Bangladesh.
</span>
</p>
</div>
<div>
<i class="fa fa-phone"></i>
<p>+91 22-27782183</p>
</div>
<div>
<i class="fa fa-envelope"></i>
<p><a href="mailto:support@eduonix.com">DriverPolice@gmail.com</a></p>
</div>
</div>
<div class="footer-right">
<p class="footer-company-about">
<span>About the company</span>
We offer Police Driver Traffic Organizing System.</p>
</div>
</footer>
</body>
</html>