forked from Jayraj-R/PHC-Administration-Covid-19
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.php
200 lines (166 loc) · 8.37 KB
/
main.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
<DOCTYPE html>
<html>
<head>
<head>
<!-- Required meta tags always come first -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="node_modules/bootstrap-social/bootstrap-social.css">
<link rel="stylesheet" href="styles-main.css">
<title>
Health Center Administration
</title>
</head>
</head>
<body>
<div class="col-12">
<img class="head-img" src="img/title14.jpg">
</div>
<div class="container-fluid ml-3">
<div class="row justify-content-between">
<!-- Side Navigation panel -->
<div class="col-md-2 bg-main padding-0">
<div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
<a class="nav-link active bg-main text-white" id="patient-tab" data-toggle="pill" href="#patient" role="tab" aria-controls="patient" aria-selected="true">Patients</a>
<a class="nav-link bg-main text-white" id="allot-bed-tab" data-toggle="pill" href="#allot-bed" role="tab" aria-controls="allot-bed" aria-selected="false">Allot-deallot bed</a>
<a class="nav-link bg-main text-white" id="current-bed-tab" data-toggle="pill" href="#current-bed" role="tab" aria-controls="current-bed" aria-selected="false">Currently allotted bed</a>
<a class="nav-link bg-main text-white" id="positive-tab" data-toggle="pill" href="#positive" role="tab" aria-controls="positive" aria-selected="true">Covid-19 positive patients</a>
<a class="nav-link bg-main text-white" id="doctor-tab" data-toggle="pill" href="#doctor" role="tab" aria-controls="doctor" aria-selected="false">Doctors</a>
<a class="nav-link bg-main text-white ml-5" data-toggle="pill" role="tab" aria-selected="false"> <a class="links" style="text-decoration: none;" onMouseOver="this.style.color='white'" onMouseOut="this.style.color='#007aff'" href="reset_time.php"> Reset time</a><a style="text-decoration: none;" onMouseOver="this.style.color='white'" onMouseOut="this.style.color='#007aff'" href="logout.php"> Logout</a>
<a class="nav-link bg-main text-white ml-5" data-toggle="pill" role="tab" aria-selected="false"> <a class="links" style="text-decoration: none;" onMouseOver="this.style.color='white'" onMouseOut="this.style.color='#007aff'" href="index.php" target="_blank"> Fill a form</a>
</div>
</div>
<!-- Actual content block(s) -->
<div class="col-md-10 content">
<div class="tab-content bg-white" id="v-pills-tabContent">
<!-- Patient tab -->
<div class="tab-pane fade show active " id="patient" role="tabpanel" aria-labelledby="patient-tab">
<div class="row mt-3 justify-content-center">
<div class="col-8">
<!-- search query form -->
<form role=" form " action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<div class="form-group row justify-content-start">
<label for="searchby" class="col-2 col-form-label "><strong>Search by</strong></label>
<div class="col-3">
<select class="form-control" name="searchby">
<option name="ALL" value="ALL">ALL</option>
<option name="ROLL" value="ROLL">Roll no.</option>
<option name="NAME" value="NAME">Name</option>
<option name="DATE" value="DATE">Date</option>
<option name="TIME" value="TIME">Time slot</option>
<option name="BRANCH" value="BRANCH">Branch</option>
<option name="PROG" value="PROG">Programme</option>
<option name="BATCH" value="BATCH">Batch</option>
</select>
</div>
<label for="search" class="col-2 col-form-label "><strong>Search for</strong></label>
<div class="col-3">
<input type="text" class="form-control" id="search" name="search">
</div>
<div class="col-2">
<button type="submit" class="btn btn-primary" name="patient-btn" value="patient-btn" >
<strong>Search</strong>
</button>
</div>
</div>
</form>
</div>
</div>
<!-- This block is only activated when "Search" button is pressed. -->
<?php
if(isset($_POST['patient-btn'])){
include 'view_patient.php';
}
?>
</div>
<!-- Patient complete -->
<!-- Allot-deallot tab -->
<div class="tab-pane fade" id="allot-bed" role="tabpanel" aria-labelledby="allot-bed-tab">
<div class="row mt-5">
<div class="col-8">
<form role=" form " action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<div class="form-group row justify-content-around">
<input type="text" class="col-md-3 form-control" id="roll" name="roll" placeholder="Roll number" required>
</div>
<div class="form-group mt-5 row justify-content-around">
<button type="submit" class="col-2 btn btn-success" name="bed-allot-btn" value="bed-allot--btn" >
<strong>Allot</strong>
</button>
<button type="submit" class="col-2 btn btn-danger" name="bed-deallot-btn" value="bed-deallot-btn" >
<strong>Deallot</strong>
</button>
</div>
<div class="row justify-content-center">
<!-- This block is only activated when "Allot" button is pressed. -->
<?php
if(isset($_POST['bed-allot-btn'])){
include 'allot_bed.php';
}
?>
<!-- This block is only activated when "Deallot" button is pressed. -->
<?php
if(isset($_POST['bed-deallot-btn'])){
include 'deallot_bed.php';
}
?>
</div>
</div>
<div class="col-3">
<!-- Showing the number of bed currently available -->
<div class="card">
<h4 class="card-header bg-main text-white">Total Bed Available</h4>
<div class="card-body">
<?php
echo '<div class="d-none">';
$conn=mysql_connect('localhost','root','');
$db=mysql_select_db('dbms_pr');
echo '</div>';
$qry="SELECT * FROM BED WHERE VACANCY=1";
$result=mysql_query($qry);
$num=mysql_num_rows($result);
echo "<center>".$num."/5</center>";
?>
</div>
</div>
</div>
</div>
</div>
<!--Allot-Deallot complete -->
<!-- View current bed tab -->
<div class="tab-pane fade" id="current-bed" role="tabpanel" aria-labelledby="current-bed-tab">
<?php
include 'view_bed.php';
?>
</div>
<!-- View doctor tab -->
<div class="tab-pane fade" id="doctor" role="tabpanel" aria-labelledby="doctor-tab">
<?php
include 'doc.php';
?>
</div>
<!-- All covid patient till date tab -->
<div class="tab-pane fade" id="positive" role="tabpanel" aria-labelledby="positive-tab">
<?php
include 'covid_pos.php';
?>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="row justify-content-center">
<div class="col-auto">
<p>© Copyright 2020 IIITDM-Jabalpur | <a href="web-team.php">Web Team</a></p>
</div>
</div>
</div>
</footer>
<script src="node_modules/jquery/dist/jquery.slim.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
</body>
</html>