-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcitations.php
119 lines (112 loc) · 4.17 KB
/
citations.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
<!doctype html>
<?php
require_once("php_includes/base.inc.php");
if(!hasPerm("officer")){
redirect("/index.php");
die();
}
$stmt = $pdo->prepare("SELECT * FROM `traffic` WHERE `RealDate` > NOW() - INTERVAL 24 HOUR ORDER BY `id` DESC");
$stmt->execute();
$traffic = $stmt->fetchAll();
$acnt = count($traffic);
$cminfo = getInfo("cminfo");
$cminfo = json_decode($cminfo['data'], true);
?>
<html lang="en-US">
<head>
<!-- Meta -->
<meta charset="UTF-8">
<title><?php echo $cminfo['pda']; ?> - Recent Citations</title>
<meta name="description" content="<?php echo $cminfo['pdn']; ?> - Recent Citations">
<meta name="author" content="Cole, Scott Harm (Retired)">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicons -->
<link rel="shortcut icon" href="img/favicons/favicon.png">
<link rel="apple-touch-icon" href="img/favicons/icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/favicons/72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/favicons/114x114.png">
<!-- CSS -->
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Raleway:300|Muli:300" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/idangerous.swiper.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/ticker.css">
<!-- Scripts -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</head>
<body>
<div id="overlay"></div>
<div id="top">
<a href="#" id="sidebar-button"></a>
<header id="logo">
<img src="img/logo.png" alt="Logo">
</header>
</div>
<div id="main-wrapper">
<?php require_once("boloTicker.php"); ?>
<div id="content">
<div class="container-fluid">
<div id="heading" class="row">
<div class="col-12">
<header>
<h1>Recent Citations - Last 24 Hours</h1>
</header>
</div>
</div>
<div class="row">
<div class="col-12">
<article class="inner">
<div class="row">
<div class="col-12">
<h4>Retrieved <?php echo $acnt; ?> Citations</h4>
</div>
</div>
<center>
<table style="text-align: center">
<tbody>
<tr>
<th>Time Entered</th>
<th>Date</th>
<th>Name</th>
<th>Offense</th>
<th>Ticket Price</th>
<th>Officer</th>
<th>Additional Information</th>
</tr>
<?php
$acnt = count($traffic);
for($i = 0; $i < $acnt; $i++) {
$civ = getCiv($traffic[$i]['civid'], U_ID);
$traf = $civ['name'];
$aoffi = getUser($traffic[$i]['copid'], U_ID);
if($traffic[$i]['ticket'] == 0) $ticket = "N/A (Warning only)"; else $ticket = "$".number_format($traffic[$i]['ticket']);
if(empty($traffic[$i]['notes'])) $traffic[$i]['notes'] = "N/A";
echo "<tr><td>".antiXSS($traffic[$i]['realdate'])."</td><td>".antiXSS($traffic[$i]['date'])."</td><td>$traf</td><td>".titleFormat(antiXSS($traffic[$i]['reason']))."</td><td>".antiXSS($ticket)."</td><td>$aoffi[display]</td><td>".$traffic[$i]['notes']."</td></tr>";
}
?>
</tbody>
</table>
</center>
</article>
</div>
</div>
</div>
</div>
<?php require_once("sidebar.php"); ?>
<footer>
<p class="copyright">© Copyright 2017 <a href="http://coltonbrister.com" target="_blank">Colton Brister</a></p>
</footer>
</div>
</div>
<!-- JavaScripts -->
<script type='text/javascript' src='js/jquery.min.js'></script>
<script type='text/javascript' src='js/bootstrap.min.js'></script>
<script type='text/javascript' src='js/swiper/idangerous.swiper.min.js'></script>
<script type='text/javascript' src='js/masonry/masonry.pkgd.min.js'></script>
<script type='text/javascript' src='js/isotope/jquery.isotope.min.js'></script>
<script type='text/javascript' src='js/custom.js'></script>
</body>
</html>