-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathleaderBoard.html
189 lines (176 loc) · 5.83 KB
/
leaderBoard.html
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
<!DOCTYPE html>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-120953638-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-120953638-2');
</script>
<title>Chota Pandit : Leaderboard</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name='description' content='Chota Pandit is a game inspired from the movie Bhool Bhulaiyaa.Chota Pandit sees Monjhulika and starts acting differently.As a temporary solution, Dr. Aditya Shrivastav asks him to stay away from water.Will Chota Pandit succeed in his mission? Play the game now'>
<meta name="keywords" content="Chota Pandit, Bhool Bhulaiyaa, Akshay Kumar, Johnny Lever, Chota Pandit Game, Paani Game">
<link rel="icon" href="icons/icon-152x152.png" type="image/x-icon">
<meta property="og:title" content="Chota Pandit Game">
<meta property="og:type" content="article">
<meta property="og:url" content="https://chotapandit.com">
<meta property="og:image" content="/assets/chota_pandit.png">
<meta property="og:site_name" content="Chota_Pandit">
<meta property="og:description" content="Chota Pandit.Bas Paani se bachna hai.">
<meta name="robots" content="index, follow" />
</head>
<body onload="init()">
<!-- NAVBAR -->
<div class="navbar-fixed">
<nav>
<div class="nav-wrapper black">
<a href="#!" class="brand-logo">Chota Pandit</a>
<ul class="right hide-on-med-and-down">
<li><a href="/index.html">Home</a></li>
<li><a href="/about.html">About</a></li>
</ul>
</div>
</nav>
</div>
<h3 style="text-align: center;">Leaderboard</h3>
<div class="row">
<div class="col s1 m3"></div>
<div class="col s10 m6">
<div class="row">
<div class="col s12 m12">
<div class="card red darken-1">
<div style="text-align: center;"class="card-content white-text">
<h6>Need your feedback people.To leave a feedback / join the team, mail <a href="mailto:[email protected]" class="black white-text">here</a></h6>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col s1 m3"></div>
<div class="col s10 m6">
<div class="row">
<div class="col s12 m12">
<div class="card green darken-1">
<div style="text-align: center;"class="card-content white-text">
<span class="card-title">Current High Score</span>
<h4><p id="current"></p></h4>
</div>
</div>
</div>
</div>
<h4 style="text-align: center;">Globl Top 10</h4>
<table class="centered" >
<thead>
<tr>
<th>Rank</th>
<th>Name</th>
<th>Score</th>
</tr>
</thead>
<tbody id="demo">
</tbody>
</table>
<h4 style="text-align: center;">Last 10 Games</h4>
<table class="centered" >
<thead>
<tr>
<th>Name</th>
<th>Score</th>
</tr>
</thead>
<tbody id="demo2">
</tbody>
</table></div>
<div class="col s1 m3"></div>
</div>
<div class="row">
<div class="col s1 m3"></div>
<div class="col s10 m6">
<div id="disqus_thread"></div>
</div>
<div class="col s1 m3"></div>
</div>
<script>
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://chotapandit-com.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<script>
function op(arr) {
var out = "";
var i;
for(i = 0; i < arr.length; i++) {
out += '<tr><td>'+(i+1)+'</td><td>'+arr[i].name + '</td><td> ' +
arr[i].score +'</td></tr>';
}
document.getElementById("demo").innerHTML = out;
}
function op2(arr) {
var out = "";
var i;
for(i = 0; i < arr.length; i++) {
out += '<tr><td>'+arr[i].name + '</td><td> ' +
arr[i].score +'</td></tr>';
}
document.getElementById("demo2").innerHTML = out;
}
function opHS(arr) {
var out = "";
var i;
for(i = 0; i < arr.length; i++) {
out += arr[i].name + ' - ' +
arr[i].score;
}
document.getElementById("current").innerHTML = out;
}
function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var myArr = JSON.parse(this.responseText);
op(myArr);
}
};
xhttp.open("GET", "https://chotapandit.online/readScore.php", true);
xhttp.send();
}
function loadDoc2() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var myArr = JSON.parse(this.responseText);
op2(myArr);
}
};
xhttp.open("GET", "https://chotapandit.online/recent.php", true);
xhttp.send();
}
function getHS(){
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var myArr = JSON.parse(this.responseText);
opHS(myArr);
}
};
xhttp.open("GET", "https://chotapandit.online/highScore.php", true);
xhttp.send();
}
function init(){
loadDoc();
getHS();
loadDoc2();
}
</script>
</body>
</html>