-
Notifications
You must be signed in to change notification settings - Fork 0
/
cont.php
82 lines (70 loc) · 2.43 KB
/
cont.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
<?php
session_start();
include "pdo/connection.php";
$sql = "SELECT * from czone";
$result = mysqli_query($conn, $sql);
?>
<!DOCTYPE html>
<html>
<head>
<title>Containment Zones</title>
<link rel="stylesheet" href="pdo/style.css">
<?php include 'pdo/headers.php'; ?>
</head>
<body id="view">
<div class="container">
<div class="container h-100" id="login">
<img src="pdo/pic.png" alt="Assam Police Logo"><br>
<p id="login"></p>
<script src="pdo/script.js"></script>
</div>
<br>
<h1>List of Containment Zones</h1><br>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead class="thead-dark">
<th>Containment Zone-ID</th>
<th>Name</th>
<th>Location</th>
<th>Number of Patients</th>
<th>Municipality ID</th>
<th>No of Hospitals</th>
<th>Remarks</th>
<th>Action</th>
</thead>
<?php
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_array($result)) {
?>
<tr>
<td><?php echo $row["cz_id"]; ?> </td>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["locn"]; ?></td>
<td><?php echo $row["no_patients"]; ?></td>
<td><?php echo $row["munic_id"]; ?></td>
<td><?php echo $row["no_hsp"]; ?></td>
<td><?php echo $row["remarks"]; ?></td>
<td><a href="editcz.php?cz_id=<?php echo $row['cz_id']; ?>"> Edit</a> /
<a href="delcz.php?cz_id=<?php echo $row['cz_id']; ?>" onclick="return checkdelete()"> Delete</a></td>
</tr>
<?php
}
}
?>
</table>
</div>
<br>
<p><a href="addcz.php">
<h3>Add Data</h3>
</a><br>
<a href="index.php">
<h3>Done</h3>
</a></p>
</div>
</body>
<script>
function checkdelete() {
return confirm("Are you sure you want to delete this data?");
}
</script>
</html>