-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
409 lines (325 loc) · 14.3 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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>COVID-19 Tracker</title>
<?php include 'link/links.php'; ?>
<?php include 'css/style.php'; ?>
<?php include 'dbcon.php'; ?>
<?php include 'logic/logic.php'; ?>
</head>
<body onload="fetch()">
<nav class="navbar navbar-expand-lg nav_style p-3">
<a class="navbar-brand pl-5" href="#"><span class="corona_title"><img class="img-fluid" src="img/blue2.png" alt="corona" width="30"></span> COVID-19</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto pr-5 text-capitalize">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#about-id">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#state-id">State</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#symptoms-id">Symptoms</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#prevention-id">Prevention</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#emergency-id">Contract</a>
</li>
</ul>
</div>
</nav>
<div class="main_header">
<div class="row w-100 h-100">
<div class="col-lg-5 col-md-5 col-12 order-lg-1 order-2">
<div class="leftside w-100 h-100 d-flex justify-content-center align-items-center">
<img class="img-fluid" src="img/family-covid.jpg" alt="Keep Safe" width="450" height="450">
</div>
</div>
<div class="col-lg-7 col-md-5 col-7 order-lg-2 order-1">
<div class="rightside w-100 h-100 d-flex justify-content-center align-items-center">
<h1 class="slogan">Let's Stay Safe and Fight Together Against Cor<span class="corona_rot"><img class="img-fluid" src="img/red-v.png" alt="Corona" width="50"></span>na Virus</h1>
</div>
</div>
</div>
</div>
<!-- ***************** CORONA WORLD STATE ******************* -->
<section class="corona_update container-fluid" id="state-id">
<div>
<h1 class="text-uppercase text-center"> <u>COVID-19 WORLD STATE</u> </h1>
</div>
<div>
<div>
<div class="w-100 h-100 d-flex justify-content-center">
<img class="img-fluid" src="img/rate-bar.gif" alt="Bar" width="150" height="280">
</div>
</div>
</div>
<div class="table-responsive">
<table class="table table-bordered table-striped text-center" id="tbval">
<thead class="thead-dark">
<tr>
<th scope="col">Countries</th>
<th scope="col">TotalConfirmed</th>
<th scope="col">TotalRecovered</th>
<th scope="col">TotalDeaths</th>
<th scope="col">NewConfirmed</th>
<th scope="col">NewRecovered</th>
<th scope="col">NewDeaths</th>
</tr>
</thead>
</table>
</div>
</section>
<!-- ***************** ABOUT SECTION *********************** -->
<div class="container-fluid pt-5 pb-5" id="about-id">
<div class="section_header text-center mb-5 mt-4">
<h1><u>ABOUT COVID-19</u> </h1>
</div>
<div class="row pt-5">
<div class="col-lg-5 col-md-6 col-12 ml-5">
<img src="img/corona.gif" alt="Covid Photo" class="img-fluid">
</div>
<div class="col-lg-6 col-md-6 col-12">
<h2>What is COVID-19 (Corona Virus)?</h2>
<p>Coronavirus disease (COVID-19) is an infectious disease caused by a newly discovered coronavirus.</p>
<p>Most people infected with the COVID-19 virus will experience mild to moderate respiratory illness and recover without requiring special treatment. Older people, and those with underlying medical problems like cardiovascular disease, diabetes, chronic respiratory disease, and cancer are more likely to develop serious illness.</p>
</div>
</div>
</div>
<!-- ***************** SYMPTOMS *********************** -->
<div class="container-fluid symptoms pt-5 pb-5" id="symptoms-id">
<div class="section_header text-center mb-5 mt-4">
<h1><u>SYMPTOMS</u> </h1>
</div>
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-4 col-12 mt-2">
<figure class="text-center">
<img src="img/cough.png" alt="Cough" class="img-fluid" width="120" height="120">
<figcaption>Cough</figcaption>
</figure>
</div>
<div class="col-lg-4 col-md-4 col-12 mt-2">
<figure class="text-center">
<img src="img/nose.png" alt="Nose" class="img-fluid" width="120" height="120">
<figcaption>Runny Nose</figcaption>
</figure>
</div>
<div class="col-lg-4 col-md-4 col-12 mt-2">
<figure class="text-center">
<img src="img/fever.png" alt="Fever" class="img-fluid" width="120" height="120">
<figcaption>Fever</figcaption>
</figure>
</div>
<div class="col-lg-4 col-md-4 col-12 mt-4">
<figure class="text-center">
<img src="img/cold.png" alt="Cold" class="img-fluid" width="120" height="120">
<figcaption>Cold</figcaption>
</figure>
</div>
<div class="col-lg-4 col-md-4 col-12 mt-4">
<figure class="text-center">
<img src="img/tired.png" alt="Tired" class="img-fluid" width="120" height="120">
<figcaption>Tiredness</figcaption>
</figure>
</div>
<div class="col-lg-4 col-md-4 col-12 mt-4">
<figure class="text-center">
<img src="img/breath.png" alt="Breath" class="img-fluid" width="120" height="120">
<figcaption>Difficulty Breathing</figcaption>
</figure>
</div>
</div>
</div>
<!-- ***************** PREVENTION *********************** -->
<div class="container-fluid pt-5 pb-5" id="prevention-id">
<div class="section_header text-center mb-5 mt-4">
<h1><u>PREVENTION</u> </h1>
</div>
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-4 col-12 mt-2">
<div class="row">
<div class="col-lg-4 col-md-4 col-12">
<figure class="text-center">
<img src="img/wash.png" alt="Wash Hand" class="img-fluid" width="90" height="90">
</figure>
</div>
<div class="col-lg-8 col-md-8 col-12">
<p>Wash your hands regularly for 20 seconds, with soap and water or alcohol-based hand rub</p>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-12 mt-2">
<div class="row">
<div class="col-lg-4 col-md-4 col-12">
<figure class="text-center">
<img src="img/mask.png" alt="Mask" class="img-fluid" width="90" height="90">
</figure>
</div>
<div class="col-lg-8 col-md-8 col-12">
<p>Cover your nose and mouth with a disposable tissue or fiexed elbow when you coughor sneeze</p>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-12 mt-2">
<div class="row">
<div class="col-lg-4 col-md-4 col-12">
<figure class="text-center">
<img src="img/distance.png" alt="Maintain Distance" class="img-fluid" width="90" height="90">
</figure>
</div>
<div class="col-lg-8 col-md-8 col-12">
<p>Avoid close contract (1 meter or 3 feet) with people who are unwell</p>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-12 mt-5">
<div class="row">
<div class="col-lg-4 col-md-4 col-12">
<figure class="text-center">
<img src="img/home.png" alt="Stay Home" class="img-fluid" width="90" height="90">
</figure>
</div>
<div class="col-lg-8 col-md-8 col-12">
<p>Stay home and self-isolate from others in the household if you feel unwell</p>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-12 mt-5">
<div class="row">
<div class="col-lg-4 col-md-4 col-12">
<figure class="text-center">
<img src="img/positive.png" alt="Stay Positive" class="img-fluid" width="90" height="90">
</figure>
</div>
<div class="col-lg-8 col-md-8 col-12">
<p>Stay informed by watching news and follow the recommended practices</p>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-12 mt-5">
<div class="row">
<div class="col-lg-4 col-md-4 col-12">
<figure class="text-center">
<img src="img/medical.png" alt="Medical Care" class="img-fluid" width="90" height="90">
</figure>
</div>
<div class="col-lg-8 col-md-8 col-12">
<p>If you have fever,cough and difficulty breathing, seek medical care early</p>
</div>
</div>
</div>
</div>
</div>
<!-- ***************** CONTRACT US OR EMERGENCY *********************** -->
<div class="container-fluid pt-5 pb-5" id="emergency-id">
<div class="section_header text-center mb-5 mt-4">
<h1><u>CONTRACT US/EMERGENCY</u> </h1>
<blockquote class="text-center text-muted">"If you notice that you have such symptoms, you can contract here for an emergency"</blockquote>
<div class="container">
<div class="row">
<div class="col-lg-8 offset-lg-2 col-12">
<form class="text-left mt-5" action="" method="POST">
<div class="form-group">
<label>Username</label>
<input type="text" class="form-control" name="username" placeholder="enter your name" required autocomplete="off">
</div>
<div class="form-group">
<label>Email address</label>
<input type="email" class="form-control" name="email" placeholder="[email protected]" required autocomplete="off">
</div>
<div class="form-group">
<label>Mobile Number</label>
<input type="number" class="form-control" name="number" placeholder="+088 017.." required autocomplete="off">
</div>
<div class="form-group">
<label>Select Symptoms</label><br>
<div class="custom-control custom-checkbox custom-control-inline text-capitalize">
<input type="checkbox" class="custom-control-input" id="customcheckbox1" name="coronasym[]" value="cold">
<label class="custom-control-label" for="customcheckbox1">Cold</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline text-capitalize">
<input type="checkbox" class="custom-control-input" id="customcheckbox2" name="coronasym[]" value="fever">
<label class="custom-control-label" for="customcheckbox2">Fever</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline text-capitalize">
<input type="checkbox" class="custom-control-input" id="customcheckbox3" name="coronasym[]" value="breath">
<label class="custom-control-label" for="customcheckbox3">Difficulty in Breath</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline text-capitalize">
<input type="checkbox" class="custom-control-input" id="customcheckbox4" name="coronasym[]" value="tired">
<label class="custom-control-label" for="customcheckbox4">Feeling Weak</label>
</div>
</div>
<div class="form-group">
<label >Describe Briefly</label>
<textarea class="form-control" name="description" id="exampleFormControlTextarea1" rows="3"></textarea>
</div>
<button type="submit" class="btn btn-primary" name="submit">Submit</button>
</form>
</div>
</div>
</div>
</div>
<!-- ***************** TOP CURSOR *********************** -->
<div class="container scrolltop float-right pr-5">
<i class="fa fa-arrow-up" onclick="topFunction()" id="myBtn"></i>
</div>
<!-- ***************** FOOTER *********************** -->
<!-- ***************** TOP ARROW SCRIPT ************* -->
<script type="text/javascript">
mybutton = document.getElementById("myBtn");
//When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction(){
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100){
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user click on the button, scroll to the top of the page
function topFunction(){
document.body.scrollTop = 0; //For Safari
document.documentElement.scrollTop = 0; //For Chrome, Firefox, IE and Opear
}
function fetch(){
$.get("https://api.covid19api.com/summary",
function(data){
//console.log(data['Countries'].length);
var tbval = document.getElementById('tbval');
for(var i=1; i<(data['Countries'].length); i++){
var x = tbval.insertRow();
x.insertCell(0);
tbval.rows[i].cells[0].innerHTML = data['Countries'][i-1]['Country'];
x.insertCell(1);
tbval.rows[i].cells[1].innerHTML = data['Countries'][i-1]['TotalConfirmed'];
x.insertCell(2);
tbval.rows[i].cells[2].innerHTML = data['Countries'][i-1]['TotalRecovered'];
x.insertCell(3);
tbval.rows[i].cells[3].innerHTML = data['Countries'][i-1]['TotalDeaths'];
x.insertCell(4);
tbval.rows[i].cells[4].innerHTML = data['Countries'][i-1]['NewConfirmed'];
x.insertCell(5);
tbval.rows[i].cells[5].innerHTML = data['Countries'][i-1]['NewRecovered'];
x.insertCell(6);
tbval.rows[i].cells[6].innerHTML = data['Countries'][i-1]['NewDeaths'];
}
}
)
}
</script>
</body>
</html>