-
Notifications
You must be signed in to change notification settings - Fork 0
/
head_view_police_station.php
93 lines (78 loc) · 3.07 KB
/
head_view_police_station.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
<!DOCTYPE html>
<html>
<head>
<?php
session_start();
if(!isset($_SESSION['x']))
header("location:headlogin.php");
$conn=mysqli_connect("localhost","root","","crime_portal");
if(!$conn)
{
die("could not connect".mysqli_error());
}
mysqli_select_db("crime_portal",$conn);
$query="select i_id,i_name,location from police_station";
$result=mysqli_query($conn,$query);
?>
<title>Head View Police Station</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home.php"><b>Crime Portal</b></a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="official_login.php">Official Login</a></li>
<li><a href="headlogin.php">Head Login</a></li>
<li class="active"><a href="head_view_police_station.php">HQ Home</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="headHome.php">View Complaints</a></li>
<li class="active" ><a href="head_view_police_station.php">Police Station</a></li>
<li><a href="h_logout.php">Logout   <i class="fa fa-sign-out" aria-hidden="true"></i></a></li>
</ul>
</div>
</div>
</nav>
<div style="margin-top: 10%;margin-left: 45%">
<a href="police_station_add.php" class="btn btn-primary">Add Police Station</a>
</div>
<div style="padding:50px;">
<table class="table table-bordered">
<thead class="thead-dark" style="background-color: black; color: white;">
<tr>
<th scope="col">Incharge Id</th>
<th scope="col">Incharge Name</th>
<th scope="col">Location of Police Station</th>
</tr>
</thead>
<?php
while($rows=mysqli_fetch_assoc($result)){
?>
<tbody style="background-color: white; color: black;">
<tr>
<td><?php echo $rows['i_id']; ?></td>
<td><?php echo $rows['i_name']; ?></td>
<td><?php echo $rows['location']; ?></td>
</tr>
</tbody>
<?php
}
?>
</table>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>