-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
100 lines (86 loc) · 3.6 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
<?php
include 'logic.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/996973c893.js" crossorigin="anonymous"></script>
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Baloo+Thambi+2:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<!-- My Stylesheet -->
<link rel="stylesheet" href="style.css">
<title>Covid-19 Tracker</title>
</head>
<body>
<div class="container-fluid bg-light p-5 text-center my-3">
<h1 class="">Covid-19 Tracker</h1>
<h5 class="text-muted">An opensource project to keep track of all the COVID-19 cases around the world.</h5>
</div>
<div class="container my-5">
<div class="row text-center">
<div class="col-4 text-warning">
<h5>Confirmed</h5>
<?php echo $total_confirmed;?>
</div>
<div class="col-4 text-success">
<h5>Recovered</h5>
<?php echo $total_recovered;?>
</div>
<div class="col-4 text-danger">
<h5>Deceased</h5>
<?php echo $total_deaths;?>
</div>
</div>
</div>
<div class="container bg-light p-3 my-5 text-center">
<h5 class="text-info">"Prevention is the Cure."</h5>
<p class="text-muted">Stay Indoors Stay Safe.</p>
</div>
<div class="container-fluid">
<div class="table-responsive">
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">Countries</th>
<th scope="col">Confirmed</th>
<th scope="col">Recovered</th>
<th scope="col">Deceased</th>
</tr>
</thead>
<tbody>
<?php
foreach($data as $key => $value){
$increase = $value[$days_count]['confirmed'] - $value[$days_count_prev]['confirmed'];
?>
<tr>
<th scope="row"><?php echo $key?></th>
<td>
<?php echo $value[$days_count]['confirmed'];?>
<?php if($increase != 0){ ?>
<small class="text-danger pl-3"><i class="fas fa-arrow-up"></i><?php echo $increase;?></small>
<?php } ?>
</td>
<td><?php echo $value[$days_count]['recovered'];?></td>
<td><?php echo $value[$days_count]['deaths'];?></td>
</tr>
<?php }?>
</tbody>
</table>
</div>
</div>
<footer class="footer mt-auto py-3 bg-light">
<div class="container text-center">
<span class="text-muted">Copyright ©2020, <a href="" target="_blank">SWDA</a></span>
</div>
</footer>
</body>
</html>