-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
239 lines (190 loc) · 10.8 KB
/
index.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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!DOCTYPE html>
<?php
ob_start();
session_start();
?>
<?
// error_reporting(E_ALL);
// ini_set("display_errors", 1);
?>
<html>
<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="style.css">
<title>
Covid-19 Health Center
</title>
</head>
<body>
<div class="col-12">
<img class="head-img" src="img/title14.jpg">
</div>
<div class="row justify-content-center login-card">
<div class="col-8 mt-5">
<div class="card">
<h3 class="card-header bg-main text-white"><center>Primary Health Center</center><small><strong><center>(Covid-19 block)</center></small></strong></h3>
<div class="card-body">
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" href="#patient" role="tab" data-toggle="tab">
Studnet
</a>
</li>
<li class="nav-item">
<a class="nav-link " href="#admin" role="tab" data-toggle="tab">
Administration
</a>
</li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane fade show active" id="patient">
<form class="mt-5 padding-16" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<div class="form-group row">
<label for="roll" class="col-md-2 col-form-label ">Roll no.<span style="color: red">*</span></label>
<div class="col-md-4">
<input type="text" class="form-control" id="roll" name="roll" placeholder="Roll number" required>
</div>
<label for="fname" class="col-md-2 col-form-label ">Full Name<span style="color: red">*</span></label>
<div class="col-md-4">
<input type="fname" class="form-control" id="fname" name="fname" placeholder="Full Name" required>
</div>
</div>
<div class="form-group row">
<label for="prog" class="col-md-2 col-form-label ">Programme</label>
<div class="col-md-4">
<select class="form-control" id="prog" name="prog">
<option value="B.Tech">B.Tech</option>
<option value="B.Des" >B.Des</option>
<option value="M.Tech">M.Tech</option>
<option value="B.Des">M.Des</option>
</select>
</div>
<label for="prog" class="col-md-2 col-form-label ">Branch</label>
<div class="col-md-4">
<select class="form-control" id="branch" name="branch">
<option value="CSE">CSE</option>
<option value="ECE">ECE</option>
<option value="MECH">MECH</option>
<option value="Design">Design</option>
</select>
</div>
</div>
<div class="form-group row mt-5">
<h4><strong>Personal Details</strong></h4>
</div>
<div class="form-group row">
<label for="age" class="col-md-2 col-form-label ">Age</label>
<div class="col-md-4">
<input type="text" class="form-control" id="age" name="age" placeholder="Age">
</div>
<label for="gender" class="col-md-2 col-form-label ">Gender</label>
<div class="col-md-4">
<select class="form-control" id="gender" name="gender">
<option value="male">Male</option>
<option value="female">Female</option>
<option value="Other">Other</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="wght" class="col-md-2 col-form-label ">Weight</label>
<div class="col-md-4">
<input type="text" class="form-control" id="wght" name="wght" placeholder="Weight(kg)">
</div>
<label for="hght" class="col-md-2 col-form-label ">Height</label>
<div class="col-md-4">
<input type="text" class="form-control" id="hght" name="hght" placeholder="Height(cm)">
</div>
</div>
<div class="form-group row">
<label for="H-R" class="col-md-2 col-form-label ">Hall no. and Room no.</label>
<div class="col-md-4">
<textarea class="form-control" id="H-R" name="H-R" rows="2" placeholder="Hall-n, Room-X123"></textarea>
</div>
<label for="pno" class="col-md-2 col-form-label ">Phone no.</label>
<div class="col-md-4">
<input type="text" class="form-control" id="pno" name="pno" placeholder="Phone number">
</div>
</div>
<div class="form-group row justify-content-center">
<div class="col-8 offset-5 mt-3">
<button type="submit" class="btn btn-primary" value="submit" name="submit">
Check for an appointment
</button>
</div>
</div>
</form>
<!-- This block will be activated only when "Check for an appointment" button is pressed. -->
<?php
if(isset($_POST['submit']))
{
include 'patient_form.php';
}
?>
</div>
<div role="tabpanel" class="tab-pane fade" id="admin">
<form class="mt-5 form-signin" role=" form " action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<h4 class="form-signin-heading">
</h4>
<div class="form-group row">
<label for="userid" class="offset-md-3 col-md-2 col-form-label ">User ID</label>
<div class="col-md-4">
<input type="text" class="form-control" id="userid" name="userid" placeholder="User ID" required autofocus>
</div>
</div>
<div class="form-group row">
<label for="pass" class="offset-md-3 col-md-2 col-form-label ">Password</label>
<div class="col-md-4">
<input type="password" class="form-control" id="pass" name="pass" placeholder="Password" required>
</div>
</div>
<!-- This block will be activated only when "Login" button is pressed. -->
<?php
#------------------ checking user-id and password -----------------
if(isset($_POST['login'])){
if($_POST['userid']&& $_POST['pass']){
if($_POST['userid']=="pdpmiiitdmj"&&$_POST['pass']==12345){
header('Location: main.php');
}
else echo '<h4 style="color: red; font-size: 0.9em; text-align: center;">Wrong credential(s)</h4>';
}
else {
echo"enter both userID AND password<br>";
}
}
?>
<div class="form-group row">
<div class="offset-md-5 col-md-10">
<button type="submit" class="btn btn-primary" name="login" value="login" >
Login
</button>
</div>
</div>
</form>
</div>
</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>
<!--build:js/main.js-->
<script src="node_modules/jquery/dist/jquery.slim.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<!--endbuild-->
</body>
</html>