-
Notifications
You must be signed in to change notification settings - Fork 0
/
indiacoronalive.php
129 lines (97 loc) · 3.68 KB
/
indiacoronalive.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
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<?php include 'link/links.php'; ?>
<?php include 'css/style.php'; ?>
</head>
<body onload="fetch()">
<nav class="navbar navbar-expand-lg nav_style p-3 navbar-dark">
<a class="navbar-brand pl-3 count_style" href="#"><img src="images/logo.png"><b> Apex COVID-19 Tracker</b></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="index.php"><b>Home</b> <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="worldcoronalive.php"><b>world Corona LIVE</b></a>
</li>
<li class="nav-item">
<a class="nav-link" href="daywise.php"><b>daywise LIVE</b></a>
</li>
</ul>
</div>
</nav>
<!--*********************** corona latest india updates ***********************-->
<section class ="corona_update container-fluid">
<div class="my-5">
<h3 class="text-uppercase text-center"><b>covid-19 updates of india</b></h3>
</div>
<div class = "table-responsive">
<table class=" table table-bordered table-striped text-center" id="tbval">
<tr>
<th class="text-uppercase ">States</th>
<th class="text-uppercase ">Confirmed</th>
<th class="text-uppercase ">Active</th>
<th class="text-uppercase ">Recovered</th>
<th class="text-uppercase ">Death</th>
<th class="text-uppercase ">Last Updated Time</th>
</tr>
<?php
$data = file_get_contents('https://api.covid19india.org/data.json');
$coronalive = json_decode($data, true);
// echo "<pre>";
// print_r($coronalive);
// echo "</pre>";
$statescount = count($coronalive['statewise']);
$i=0;
while($i < $statescount){
?>
<tr>
<td> <?php echo $coronalive['statewise'][$i]['state'] ?> </td>
<td> <?php echo $coronalive['statewise'][$i]['confirmed'] ?> </td>
<td> <?php echo $coronalive['statewise'][$i]['active'] ?> </td>
<td> <?php echo $coronalive['statewise'][$i]['recovered'] ?> </td>
<td> <?php echo $coronalive['statewise'][$i]['deaths'] ?> </td>
<td> <?php echo $coronalive['statewise'][$i]['lastupdatedtime'] ?> </td>
</tr>
<?php
$i++;
}
?>
</table>
</div>
</section>
<!-- ******************* top icon ****************** -->
<div class="container scrolltop float-right pr-5">
<i class=" fa fa-arrow-up" onclick="topFunction()" id= "myBtn"></i>
</div>
<!-- ******************* footer ****************** -->
<footer class="mt-5">
<div class="footer_style text-white text-center container-fluid">
< <p>All rights reserve by Yash Chandane and team. copyright by Yash Chandane and team</p>
</div>
</footer>
<script type="text/javascript">
//Get the button:
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 > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}
</script>
</body>
</html>