-
Notifications
You must be signed in to change notification settings - Fork 0
/
manage_records.php
172 lines (133 loc) · 6.54 KB
/
manage_records.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
<!doctype html>
<html>
<head>
<?php
include('adminsession.php');
include('admin_manage_record.php');
?>
<title>Manage Record-City Without Crime</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/admin_record.css"/>
<link rel="stylesheet" href="css/w3.css"/>
<script>
function clearform()
{
document.getElementById("CriminalID").value=""; //don't forget to set the textbox id
document.getElementById("CriminalName").value="";
document.getElementById("gender").value="";
document.getElementById("height").value="";
document.getElementById("weight").value="";
document.getElementById("PStationId").value="";
document.getElementById("level").value="";
document.getElementById("status").value="";
document.getElementById("gender").value="";
}
</script>
</head>
<body style="background-image:url('images/1.jpg');">
<header>
<?php echo "<h1>".$login_session." Admin</h1>"; ?><br />
<a href="logout.php" title="logout">logout</a>
</header>
<ul>
<li><a href="admin.php">Complaints</a></li>
<li><a href="admin_add_station.php">Police Station</a></li>
<li><a href="report_to_station.php">Reports</a></li>
<li><a class="active">Manage Records</a></li>
<li><a href="emergency.php">Emergency</a></li>
</ul>
<div class="main-content">
<form class="form-register" method="post" action="#" enctype="multipart/form-data">
<div class="form-register-with-email">
<div class="form-white-background">
<div class="form-title-row">
<h1>Manage Criminal Records</h1>
</div>
<?php if(!empty($msg)) { ?>
<p class="w3-green"><?php echo $msg; ?></p>
<?php } ?>
<?php if(!empty($error_msg)) { ?>
<p class="w3-red"><?php echo $error_msg; ?></p>
<?php } ?>
<div class="form-row">
<label>
<span>Criminal ID</span>
<input type="text" name="CriminalID" id="CriminalID" required="true" value="<?php if(isset($row[0])){ echo $row[0]; } ?>" />
<button type="submit" name="find" style="position: relative;">Find</button>
</label>
</div>
<div class="form-row">
<label>
<span>Criminal Name</span>
<input type="text" name="CriminalName" id="CriminalName" value="<?php if(isset($row[1])){ echo $row[1]; } ?>" />
</label>
</div>
<div class="form-row">
<label>
<span>Gender</span>
<select name="gender">
<option>Select gender</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="other">Others</option>
</select>
<input id="gender" readonly value="<?php if(isset($row[2])){ echo $row[2]; } ?>" />
</label>
</div>
<div class="form-row">
<label>
<span>Height</span>
<input type="number" name="height" placeholder="In inches" id="height" value="<?php if(isset($row[3])){ echo $row[3]; } ?>" />
</label>
</div>
<div class="form-row">
<label>
<span>Weight</span>
<input type="number" name="weight" placeholder="In Kg" id="weight" value="<?php if(isset($row[4])){ echo $row[4]; } ?>" />
</label>
</div>
<div class="form-row">
<label>
<span>PStation ID</span>
<input type="text" name="PStationID" id="PStationId" value="<?php if(isset($row[5])){ echo $row[5]; } ?>" />
</label>
</div>
<div class="form-row">
<label>
<span>Crime Level</span>
<input type="text" name="crimelevel" id="level" value="<?php if(isset($row[6])){ echo $row[6]; } ?>" />
</label>
</div>
<div class="form-row">
<label>
<span>Status</span>
<input type="text" name="status" id="status" value="<?php if(isset($row[7])){ echo $row[7]; } ?>" />
</label>
</div>
<div class="form-row">
<div id="picture" class="form-row w3-center"><?php if(isset($row[8])){ echo '<img height="200" width="200" src="data:image;base64,'.$row[8].' ">';} ?></div>
<label>
<span>Picture</span>
<input type="file" name="image" value="browse"/>
</label>
</div>
<div class="form-row w3-center">
<button type="submit" name="add">Add</button>
<button type="submit" name="update">Update</button>
<button type="submit" name="delete">Delete</button>
<button type="submit" name="updatepic">Update Picture</button>
<input type="submit" value="Clear" onClick="clearform();"/>
</div>
</div>
</div>
</form>
</div>
</section>
<footer>
<div class="footer">
©All right resrved to CWC.
</div>
</footer>
</div>
</body>
</html>