-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprisoner_out.php
66 lines (64 loc) · 2.42 KB
/
prisoner_out.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
<?php
require "./header.php";
if(isset($_SESSION['userUidOfficer'])){
if(isset($_GET['error'])){
if($_GET['error']=="emptyfields"){
echo'<h2 class="mt-6 text-center text-3xl leading-9 font-extrabold text-red-600">
Empty fields!!
</h2>';
}elseif($_GET['error']=="sqlerror"){
echo'<h2 class="mt-6 text-center text-3xl leading-9 font-extrabold text-red-600">
sql database connection error!!
</h2>';
}elseif($_GET['error']=="success"){
echo'<h2 class="mt-6 text-center text-3xl leading-9 font-extrabold text-green-600">
Prisoner removed successfully!!
</h2>';
}
}
echo'
<form action="includes/prisoner_out.inc.php" method="post" >
<div class="flex flex-col h-screen">
<section class="text-gray-700 body-font relative flex-grow">
<div class="container px-5 my-5 mx-auto">
<div class="flex flex-col text-center w-full mb-12">
<h1
class="sm:text-3xl text-2xl font-medium title-font mb-4 text-gray-900"
>
Prisoner Status Update
</h1>
<p class="lg:w-2/3 mx-auto leading-relaxed text-base">
The Officer Can Update The Status of the Prisoner to IN/OUT!
</p>
</div>
</div>
<div class="container px-5 my-5 mx-auto md:flex md:justify-center mb-6">
<form class="w-full max-w-sm md:items-center">
<div class="md:flex md:items-center mb-6">
<div class="md:w-1/3">
<label class="block text-gray-700 font-bold md:text-right mb-1 md:mb-0 pr-4" for="inline-full-name">
PrisonerID
</label>
</div>
<div class="md:w-2/3">
<input class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:outline-none focus:border-indigo-500" id="inline-full-name" type="text" placeholder="Prisoner ID" name="prisoner_id">
</div>
</div>
</form>
</div>
<div class="p-2 w-full">
<button
name="prisoner_out_status" class="flex mx-auto text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg"
>
Submit
</button>
</div>
</section>
</form>
';}else{
header("Location: ./failure.php");
exit();
}
require "./footer.php";
?>
</div>