-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck-appointment.php
164 lines (123 loc) · 5.74 KB
/
check-appointment.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
<?php
session_start();
//error_reporting(0);
include('doctor/includes/dbconnection.php');
?>
<!doctype html>
<html lang="en">
<head>
<title>Doctor Appointment Management System || Home Page</title>
<!-- CSS FILES -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-icons.css" rel="stylesheet">
<link href="css/owl.carousel.min.css" rel="stylesheet">
<link href="css/owl.theme.default.min.css" rel="stylesheet">
<link href="css/templatemo-medic-care.css" rel="stylesheet">
<script>
function getdoctors(val) {
alert(val);
$.ajax({
type: "POST",
url: "get_doctors.php",
data:'sp_id='+val,
success: function(data){
$("#doctorlist").html(data);
}
});
}
</script>
</head>
<body id="top">
<main>
<?php include_once('includes/header.php');?>
<section class="section-padding" id="booking">
<div class="container">
<div class="row">
<div class="col-lg-12 col-12 mx-auto">
<div class="booking-form">
<h2 class="text-center mb-lg-3 mb-2">Search Appointment History by Appointment Number/Name/Mobile No</h2>
<form role="form" method="post">
<div class="row">
<div class="col-lg-6 col-12">
<input id="searchdata" type="text" name="searchdata" required="true" class="form-control" placeholder="Appointment No./Name/Mobile No.">
</div>
<div class="col-lg-3 col-md-4 col-6 mx-auto">
<button type="submit" class="form-control" name="search" id="submit-button">Check</button>
</div>
</div>
</form>
</div>
<?php
if(isset($_POST['search']))
{
$sdata=$_POST['searchdata'];
?>
<h4 align="center">Result against "<?php echo $sdata;?>" keyword </h4>
<div class="widget-body">
<div class="table-responsive">
<table class="table table-bordered table-hover js-basic-example dataTable table-custom">
<thead>
<tr>
<th>S.No</th>
<th>Appointment Number</th>
<th>Patient Name</th>
<th>Mobile Number</th>
<th>Email</th>
<th>Status</th>
<th>Remark</th>
</tr>
</thead>
<tbody>
<?php
$sql="SELECT * from tblappointment where AppointmentNumber like '$sdata%' || Name like '$sdata%' || MobileNumber like '$sdata%'";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $row)
{ ?>
<tr>
<td><?php echo htmlentities($cnt);?></td>
<td><?php echo htmlentities($row->AppointmentNumber);?></td>
<td><?php echo htmlentities($row->Name);?></td>
<td><?php echo htmlentities($row->MobileNumber);?></td>
<td><?php echo htmlentities($row->Email);?></td>
<?php if($row->Status==""){ ?>
<td><?php echo "Not Updated Yet"; ?></td>
<?php } else { ?> <td><?php echo htmlentities($row->Status);?>
</td>
<?php } ?>
<?php if($row->Remark==""){ ?>
<td><?php echo "Not Updated Yet"; ?></td>
<?php } else { ?> <td><?php echo htmlentities($row->Remark);?>
</td>
<?php } ?>
</tr>
</tbody>
<?php
$cnt=$cnt+1;
} } else { ?>
<tr>
<td colspan="8"> No record found against this search</td>
</tr>
<?php } }?>
</table>
</div>
</div>
</div>
</section>
</main>
<?php include_once('includes/footer.php');?>
<!-- JAVASCRIPT FILES -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/scrollspy.min.js"></script>
<script src="js/custom.js"></script>
</body>
</html>