-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdetails-1.php
141 lines (114 loc) · 4.05 KB
/
details-1.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
<?php
require_once "DBConnect.php";
include 'login.php';
$message = NULL;
if (isset($_POST['SubmitBtn'])) {
$cnic = $_POST['cnic'];
$dob = $_POST['dob'];
$report = $db->getDetails($cnic, $dob);
if ($report) {
} else {
echo '<script>alert("No record found!")</script>';
}
}
$title = "Report";
include 'layout/header1.php'
?>
<style>
.mB {
background-color: #02AEAE;
}
.hBtn:hover {
background-color: #018282;
}
.mC {
color: #02AEAE;
}
.vertical-center {
padding-left: 40vw;
}
</style>
<!-- <nav class="navbar navbar-expand-lg navbar-dark mB">
<div class="container-fluid">
<img class="img-fluid " src="assets/IVAC logo.png" width="80px">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="register.php">Register a Person</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="details-1.php">Get Vaccination Report</a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">Log Out</a>
</li>
</ul>
</div>
</div>
</nav> -->
<?php include "./layout/empNavbar.php" ?>
<div class="container" style="margin-top:5%;">
<h1 style="text-align:center" class="mC">Enter Your Details</h1>
<hr>
<?php if (isset($message)) : ?>
<div class="alert-danger"><?= $message; ?></div>
<?php endif; ?>
<form role="form" method="post" action="details-1.php">
<div class="container details row">
<div class="col-lg-6 col-sm-12">
<label for="mobile"><b>CNIC</b></label>
<input type="text" class="form-control" placeholder="17301*********" name="cnic" required>
</div>
<div class="col-lg-6 col-sm-12">
<label for="dob"><b>Enter Date of Birth </b></label>
<input type="date" class="form-control" placeholder="mm/dd/yyyy" name="dob" required>
</div>
</div>
<div class="row justify-content-center pt-5">
<div class="col-md-1">
<button type="submit" name="SubmitBtn" class="btn text-white fs-5 mB hBtn">Submit</button>
</div>
</div>
</form>
</div>
<!-- if result has been fetched succesffully -->
<?php if (isset($report)) : ?>
<div class="container" style="margin-top:5% ;overflow-x:auto;">
<table class="table table-condensed">
<tr style="background-color:#D3D3D3">
<th>ID</th>
<th>Name</th>
<th>Gender</th>
<th>CNIC</th>
<th>Center</th>
<th>Date of Schedule</th>
<th>Status</th>
<th>Vaccine</th>
<th>Total Doses</th>
<th>Done Doses</th>
<tr>
<?php foreach ($report as $d) : ?>
<tr class="<?php
?>">
<td>COV<?= $d['ID']; ?></td>
<td><a href="reports.php?id=<?= $d['ID']; ?>"><?= $d['fname'] . " " . $d['mname'] . " " . $d['lname']; ?></a></td>
<td><?= $d['sex']; ?></td>
<td><?= $d['cnic']; ?></td>
<td><?= $d['name']; ?></td>
<td><?= $d['dov']; ?></td>
<td><?= $d['status']; ?></td>
<td><?= $d['vaccine']; ?></td>
<td><?= $d['doses']; ?></td>
<td><?= $d['doneDoses']; ?></td>
</tr>
<?php endforeach; ?>
</table>
</div>
<?php endif; ?>
<?php include 'loginmodel.php' ?>
<?php
include 'layout/footer2.php'
?>