-
Notifications
You must be signed in to change notification settings - Fork 0
/
PatientReservationDetails.php
137 lines (110 loc) · 3.94 KB
/
PatientReservationDetails.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
<?php
include('config.php');
if (!array_key_exists("searchalertmsg",$_SESSION)) {
$_SESSION['searchalertmsg'] = '';
}
$currentdate = date("Y/m/d")
?>
<?php
$patientUsername = $_SESSION['username'];
$query = "SELECT title, firstname, lastname, email,contactno, address,dob, gender, bloodgroup, healthissue FROM basicdetailpatient WHERE username='$patientUsername'";
$result = $mysqli->query($query);
$resultSet = mysqli_fetch_assoc($result);
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Patient Profile</title>
<style type="text/css">
</style>
</head>
<body>
<!--main navigation bar !-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="collapse navbar-collapse" id="navbarColor02">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="Home.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">Log Out</a>
</li>
</ul>
</div>
</nav>
<!--Patient navigation bar !-->
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="PatientProfile.php">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href=#>Reservation Details</a>
</li>
<li class="nav-item">
<a class="nav-link " data-toggle="tab" href="AboutDoctors.php">About Doctors</a>
</li>
<li class="nav-item">
<a class="nav-link " data-toggle="tab" href="SearchForDoctors.php">Search for Doctor</a>
</li>
<li class="nav-item">
<a class="nav-link" href="MakeReservation.php">Make a Reservation</a>
</li>
</ul>
<?php
echo "<br>";
echo '<b>'.'Username : '.'</b>' . $_SESSION['username'];
echo "<br>";
?>
<?php echo "<br>";?>
<?php
$query1 = "SELECT * FROM patientreservationdetails WHERE patientUsername = '$patientUsername'";
$result1 = $mysqli->query($query1);
if($result1 and mysqli_num_rows($result1)>0){
$table = '<table align = center>';
$table .= '<tr> <th>Res. ID</th> <th>Doctor Name</th> <th>Date</th> <th>Time</th> <th>Channel NO</th> <th>Complete Reservation</th> <th>Res Payment(Rs/=)</th> <th>Pha Payment(Rs/=)</th> <th>Other Details</th> </tr>' ;
while($record = mysqli_fetch_assoc($result1)){
$stime = date("g:i A", $record['appointmentFrom']);
$etime = date("g:i A", $record['appointmentTo']);
if ($record['completeReservation']==0) {
$complete = "No";
}else{
$complete = "Yes";
}
$table .= '<tr>';
$table .= '<td>'. $record['ReservationID'] .'</td>';
$table .= '<td>'. $record['doctorName'] .'</td>';
$table .= '<td>'. date("F j, Y ", $record['appointmentFrom']) .'</td>';
$table .= '<td>'. $stime.' - '.$etime .'</td>';
$table .= '<td>'. $record['chanelNo'] .'</td>';
$table .= '<td>'. $complete .'</td>';
$table .= '<td>'. $record['resPayment'] .'</td>';
$table .= '<td>'. $record['phaPayment'] .'</td>';
if ($complete == "Yes") {
$table .= '<td>'. '<a class="btn btn-outline-secondary" href="PatientOtherDetails.php?resid='.$record['ReservationID'].'">Other Details</a>' .'</td>';
}else{
$table .= '<td>'. 'Not Complete Yet' .'</td>';
}
$table .= '</tr>';
}
$table .= '<table>';
?>
<style type="text/css">
table{border-collapse: collapse; align-content: center;align-self: center;}
th {
background-color: lightblue;
color: white;
}
td, th {border : 1px solid black; padding: 10px;}
</style>
<?php echo $table;
}else{ ?>
<div class="jumbotron" align="center">
<h1 class="display-3">Yoy Have NO Reservations yet</h1>
</div>
<?php
}
?>
</body>
</html>