-
Notifications
You must be signed in to change notification settings - Fork 13
/
admin dashboard.php
200 lines (170 loc) · 7.03 KB
/
admin dashboard.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
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>RRV Hospitals</title>
<meta name="keywords" content="RRV Hospitals">
<meta name="description" content="Developed By Rishi Raj G">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/style.css">
<style>
.upload {
margin-top: 50px;
padding: 40px;
background-color: rgba(29, 117, 224);
-webkit-border-radius: 5px;
-o-border-radius: 5px;
-moz-border-radius: 5px;
}
.upload input[type="text"] {
width: 300px;
border: 1px solid grey;
border-radius: 5px;
}
.main {
padding: 30px;
color: white;
background-color: rgba(0, 0, 0, 0.5);
-webkit-border-radius: 15px;
-o-border-radius: 15px;
-moz-border-radius: 15px;
}
h1 {
font-size: xx-large;
}
h2 {
font-size: x-large;
padding-left: 15px;
}
.upload h1 {
color: red;
font-size: xx-large;
margin-bottom: 30px;
}
.container {
margin-bottom: 30px;
}
</style>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
$(document).ready(function() {
$("#nav-placeholder").load("nav.html");
});
</script>
</head>
<body>
<img src="assets/images/logo.png" class="logo">
<div id="nav-placeholder"></div>
<?php
if (!isset($_SESSION["name"])) {
echo "<script>window.location='../#/# as doctor.html'</script>";
}
?>
<div class="container-fluid" style="padding: 30px 20px 0px 40px;">
<div class="row">
<div class="col-md-10">
<?php
echo "<h3>Welcome ";
echo $_SESSION["name"];
?>
</div>
<div class="col-md-2">
<form method="POST"><button value="Log Out" name="logout" class="btn btn-danger">Log
Out</button></form>
<?php
if (isset($_POST['logout'])) {
session_destroy();
echo "<script>window.location='index.html'</script>";
}
?>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="main">
<h1 style="color:orange;">Today's Appointments:</h1>
<?php
require "conn.php";
$today=date("Y-m-d");
$doctor=$_GET['rishi'];
$sql="select * from appointment where doctorname='$doctor' and date='$today' ";
$result=$conn->query($sql);
if ($result->num_rows>0) {
while ($row=$result->fetch_assoc()) {
echo"<h2>Name:".$row["username"]." , Time Slot:".$row["time"]." , Date:".$row["date"];
"<br><br></h2>";
}
} else {
echo"<h2>There Are No Appointments Today!</h2>";
}
?>
</div>
<div class="main">
<h1 style="color:orange;">Mild Problem Patients</h1>
<?php
$today=date("Y-m-d");
$sql="select * from appointment where doctorname= '$doctor' and disease='mild' and date='$today' ";
$result=$conn->query($sql);
if ($result->num_rows>0) {
while ($row=$result->fetch_assoc()) {
echo"<h2>Name:".$row["username"];
"<br><br></h2>";
}
} else {
echo"<h2>There Are No Mild Problem Patients Today</h2>";
}
?>
<h1 style="color:orange;">Serious Problem Patients</h1>
<?php
$today=date("Y-m-d");
$sql="select * from appointment where doctorname= '$doctor' and disease='serious' and date='$today' ";
$result=$conn->query($sql);
if ($result->num_rows>0) {
while ($row=$result->fetch_assoc()) {
echo"<h2>Name:".$row["username"];
"<br><br></h2>";
}
} else {
echo"<h2>There Are No Serious Problem Patients Today</h2>";
}
?>
<h1 style="color:orange;">Emergency Problem Patients</h1>
<?php
$today=date("Y-m-d");
$sql="select * from appointment where doctorname= '$doctor' and disease='emergency' and date='$today' ";
$result=$conn->query($sql);
if ($result->num_rows>0) {
while ($row=$result->fetch_assoc()) {
echo"<h2>Name:".$row["username"];
"<br><br></h2>";
}
} else {
echo"<h2>There Are No Emergency Problem Patients Today</h2>";
session_destroy();
?>
</div>
</div>
<div class="upload col-md-4">
<h1>Upload Prescription:</h1>
<form method="post" action="prescription.php" enctype="multipart/form-data">
<P style="font-size:x-large;">
Username:
<input type="text" name="username" placeholder="Enter"><br><br>
Prescription:
</p>
<input type="file" name="prescription" value="Upload Prescription"><br><br>
<center><input type="submit" value="Upload" name="upload"></center>
</form>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</body>
</html>