-
Notifications
You must be signed in to change notification settings - Fork 0
/
doctor-page.php
217 lines (212 loc) · 8.82 KB
/
doctor-page.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?php
require 'includes/common.php';
if(!isset($_SESSION['id'])){
header('location: index.php');}
if($_SESSION['role']==1){
header('location: admin-page.php');}
if($_SESSION['role']==3){
header('location: patient-page.php');}
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="author" content="">
<!-- FOR NORMAL BOOTSTRAP -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<!--FOR FONT AWESOME ICONS AND FONTS-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!--FOR BOOTSTRAP FORMS-->
<link rel="canonical" href="https://getbootstrap.com/docs/3.4/examples/signin/">
<link href="https://getbootstrap.com/docs/3.4/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://getbootstrap.com/docs/3.4/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<script src="https://getbootstrap.com/docs/3.4/assets/js/ie-emulation-modes-warning.js"></script>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Dosis:wght@500&display=swap" rel="stylesheet">
<title></title>
<link rel="stylesheet" href="CSS/style.css">
<link rel="stylesheet" href="CSS/login.css">
<style media="screen">
.hov a:hover {
text-decoration: none;
}
header{
background: white;
height: 23vh;
}
header li a{
color: black;
}
header li a:hover{
color: black
}
nav{
padding-top: 1.5rem;
}
.heading{
font-family: 'Dosis', sans-serif;
font-size: 6rem;
}
.heading span{
color: #8bcdcd;
}
.style{
text-align: left;
}
.data{
text-align: left;
}
</style>
</head>
<body style="background-color: white; padding-bottom: 0; padding-top: 0;">
<header>
<div class="menu-toggle" id="hamburger">
<i class="fas fa-bars"></i>
</div>
<div class="overlay"></div>
<div class="container hov">
<nav>
<h1 class="brand"><a href="index.php" style="color: black"><span>M</span>ed<span>D</span>oc</a></h1>
<ul>
<li><a href="doctor-page.php">Dashboard</a></li>
<li><a href="doctor-page.php">Appointment Requests</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Settings<b class="caret"></b></a>
<ul class="dropdown-menu">
<li> <a href="doctor-profile.php">My Profile</a></li>
<li> <a href="#" style="color: black">Change Password</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <img src="Images/user.png" alt=""> <b class="caret"></b></a>
<ul class="dropdown-menu">
<li> <a href="includes/logout.php" style="color: black">Log Out</a></li>
</ul>
</li>
</ul>
</nav>
</div>
</header>
<div class="container text-left">
<div class="row">
<div class="col-sm-5">
<img src="Images/Human-heart.jpg" height=600px width=300px;>
</div>
<div class="col-sm-7">
<img src="Images/anatomy.jpg" height=300px width=500px style="margin-left: -100px">
<br><br>
<h1 class="heading"><span style="color: #8bcdcd">S</span>cience has everything to <span style="color: #8bcdcd">S</span>ay about what is possible</h1>
</div>
</div>
</div>
<br><br><br>
<section id="appointments">
<div class="container">
<div class="row text-center">
<br><br><br><br><br>
<h1 class="heading"><span>A</span>ppointment <span>R</span>equestes</h1>
</div>
<div class="row">
<br><br><br><br>
<table class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Gender</th>
<th>Age</th>
<th>Symptoms</th>
<th>Contact Number</th>
<th>Message From Patient</th>
<th>Appointment Date and Time</th>
<th>Appointment Status</th>
</tr>
</thead>
<tbody>
<?php
$id=$_SESSION['id'];
$hospital_db=$_SESSION['hospital'];
$conn=new mysqli($servername,$serverusername,$serverpassword,$hospital_db);
$query="SELECT * FROM appointment_requests WHERE doctor_id=$id;";
$query_result=mysqli_query($conn,$query);
$query_rows=mysqli_num_rows($query_result);
while($query_rows--){
$row=mysqli_fetch_array($query_result);
$id=$row['patient_id'];
$query="SELECT name,gender,contact FROM patients WHERE id=$id;";
$query_result2=mysqli_query($con,$query);
$row2=mysqli_fetch_array($query_result2);
?>
<tr>
<td><?php echo $row2['name']; ?></td>
<td><?php echo $row2['gender']; ?></td>
<td><?php echo $row['age']; ?></td>
<td><?php echo $row['symptoms']; ?></td>
<td><?php echo $row2['contact']; ?></td>
<td><?php echo $row['message']; ?></td>
<td><?php echo $row['datetime_of_appointment']; ?></td>
<td><?php if($row['status']=='pending'){ ?>
<form action="scripts/approve_request.php" method="POST">
<input type="text" value="<?php echo $row['id'] ?>" name="request_id" style="display:none;">
<button type="submit" class="btn btn-success">Approve</button>
</form>
<form method="post" action="scripts/decline_request.php">
<input type="text" value="<?php echo $row['id'] ?>" name="request_id" style="display:none;">
<button type="submit" class="btn btn-danger">Decline</button><?php } else echo $row['status']; ?></td>
</form>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</section>
<br><br><br><br>
<div class="container text-justify">
<p style="font-size: 20px;">We provide the a wide range of medical services, so every person could have the opportunity to receive qualitative medical help.This is a Software Requirements Specification (SRS) for the Hospital Management System. It
describes the functions, goals and tasks that the system can perform. This is used to describe the scope of the project and to plan for the system’s design and implementation.</p>
</div><br><br>
<section id="footer">
<img src="Images/footer-img.png" class="footer-img">
<div class="title-text">
<p>CONTACT</p>
</div>
<div class="social-links">
<i class="fa fa-facebook"></i>
<i class="fa fa-twitter"></i>
<i class="fa fa-youtube-play"></i>
<i class="fa fa-linkedin"></i>
<p>copyright MedDoc 2020</p>
</div>
</section>
<script>
/*Nav Bar js*/
var open = document.getElementById('hamburger');
var changeIcon = true;
open.addEventListener("click", function() {
var overlay = document.querySelector('.overlay');
var nav = document.querySelector('nav');
var icon = document.querySelector('.menu-toggle i');
overlay.classList.toggle("menu-open");
nav.classList.toggle("menu-open");
if (changeIcon) {
icon.classList.remove("fa-bars");
icon.classList.add("fa-times");
changeIcon = false;
} else {
icon.classList.remove("fa-times");
icon.classList.add("fa-bars");
changeIcon = true;
}
});
</script>
</body>
</html>