-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
manhunt.php
191 lines (178 loc) · 7.23 KB
/
manhunt.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
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<title>LSPD PANEL</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/all.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
</head>
<?php
session_start();
if (isset($_SESSION['id'])) {
echo '
<body>
<div class="navbar navbar-inverse set-radius-zero" >
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">
<img src="https://i.imgur.com/BQoTEoz.png" width=180 height=70/>
</a>
</div>
<div class="right-div">
<a href="logout.php" class="btn btn-danger pull-right"><i class="fas fa-sign-out-alt"></i> Log out</a>
</div>
<div class="right-div">
<a class="btn btn-success pull-right"><i class="fa fa-user"></i> User: ' . $_SESSION['pseudo'] . '</a>
</div>
</div>
</div>
<!-- LOGO HEADER END-->
<section class="menu-section">
<div class="container">
<div class="row ">
<div class="col-md-12">
<div class="navbar-collapse collapse ">
<ul id="menu-top" class="nav navbar-nav navbar-right">
<li>
<a href="index.php"> Home</a>
</li>
<li>
<a>|</a>
</li>
<li>
<a href="catalog.php"> Catalog of Punishments</a>
</li>
<li>
<a>|</a>
</li>
<li>
<a href="manhunt.php"> Manhunts</a>
</li>
<li>
<a>|</a>
</li>
<li>
<a href="records.php"> Criminal Records</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- MENU SECTION END-->
<div class="content-wrapper">
<div class="container">
<div class="row pad-botm">
<div class="col-md-12">
<h4 class="header-line">Manhunt / Arrest Warrants</h4>
</div>
</div>
<form method="get" action="add_manhunt.php">
<button type="submit" class="btn btn-success"><i class="fa fa-plus"></i> Add Entry</button>
</form>
<br>
<div class="row">
<div class="col-md-12">
<!-- Advanced Tables -->
<div class="panel panel-default">
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id="dataTables-example">
<thead>
<tr>
<th>Name</th>
<th>Crime</th>
<th>Sanction to be imposed</th>
<th>
Actions
</th>
</tr>
</thead>
<tbody>
';
include("config.php");
// Get contents of the lspd table
$reponse = $bdd->query('SELECT * FROM manhunt');
// Display each entry one by one
while ($data = $reponse->fetch()) {
?>
</td>
<td>
<?php
echo $data['name'];
?>
</td>
<td class="center">
<?php
echo $data['crime'];
?>
</td>
<td class="center">
<?php
echo $data['sanction'];
?>
</td>
<form action='delete_entry_manhunt
.php' method='post'>
<?php
echo '<td>
<button type="submit" name="deleteItem" class="btn btn-danger" value="' . $data['id'] . '"><i class="fa fa-trash"></i> Delete</button>
</td>';
?>
</form>
</tr>
<?php
}
$reponse->closeCursor(); // Complete query
echo '
</tbody>
</table>
</div>
</div>
</div>
<!--End Advanced Tables -->
</div>
</div>
<!-- /. ROW -->
</div>
<!-- /. ROW -->
</div>
<!-- /. ROW -->
<!-- End Hover Rows -->
</div>
<div class="col-md-6">
<!-- Context Classes -->
<!-- end Context Classes -->
</div>
</div>
<!-- /. ROW -->
</div> </div> <!-- CONTENT-WRAPPER SECTION END--> <section class="footer-section">
<div class="container">
<div class="row">
<div class="col-md-12">
Coded by : RootK1d | Based on : Davendrix
</div>
</div>
</div> </section> <!-- FOOTER SECTION END--> <!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING TIME --> <!-- CORE JQUERY --> <script src="assets/js/jquery-1.10.2.js"></script> <!-- BOOTSTRAP SCRIPTS --> <script src="assets/js/bootstrap.js"></script> <!-- DATATABLE SCRIPTS --> <script src="assets/js/dataTables/jquery.dataTables.js"></script> <script src="assets/js/dataTables/dataTables.bootstrap.js"></script> <!-- CUSTOM SCRIPTS --> <script src="assets/js/custom.js"></script> </body>';
} else {
header("Location: login.php");
}
?>
</html>