-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathleaderboard.php
183 lines (126 loc) · 3.99 KB
/
leaderboard.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>PLUTO</title>
<!-- CSS -->
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="assets/css/font-awesome.min.css" rel="stylesheet" media="screen">
<link href="assets/css/simple-line-icons.css" rel="stylesheet" media="screen">
<link href="assets/css/animate.css" rel="stylesheet">
<!-- Custom styles CSS -->
<link href="assets/css/style.css" rel="stylesheet" media="screen">
<script src="assets/js/modernizr.custom.js"></script>
<style>
.signup
{
border: 1px solid #000;
text-align: center;
font-family: Helveica, sans-serif;
font-size: 13px;
border-radius: 8px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px ;
}
.login
{
display:inline-block;
border: 1px solid #000;
width:620px;
margin-top: 10px;
margin-right: 35px; text-align: center;
font-family: Helveica, sans-serif;
font-size: 13px;
border-radius: 8px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px ;
}
</style>
</head>
<body bgcolor="red">
<div id="preloader" style="background-color:#ffffcc;">
<div id="status" style="background-color:#ffffcc;"></div>
</div>
<header class="header">
<nav class="navbar navbar-custom" role="navigation">
<div class="container" style="background-color:#ccccff;">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#custom-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home.php">Pluto</a>
</div>
<div class="collapse navbar-collapse" id="custom-collapse" style="background-color:#ffffcc;">
<ul class="nav navbar-nav navbar-right">
<li><a href="home.php">HOME</a></li>
<li><a href="#lb">Leaderboard</a></li>
<li><a href="logout.php">logout</a></li>
</ul>
</form>
</div>
<ul class="nav navbar-nav navbar-right">
<h4><li><?php
echo "WELL DONE!";
?>
</li>
</h4>
</ul>
</div>
</nav>
</header>
<section id="lb" style="padding:10px; background-color:#ffffcc; ">
<div style="background-color:#ffffcc;">
<h2>LEADERBOARD :
<br>
<br>
<table border="10" align="center">
<tr><td>Username </td><td>Name </td><td>Score </td></tr></table>
<br>
<?php
session_start();
$m=new MongoClient();
$db=$m->pluto;
$colluser=$db->user;
$cursor = $colluser->find();
$cursor->sort(array('score'=>-1));
$cursor->limit(10);
$i=1;
while ($cursor->hasNext()) : $document = $cursor->getNext();
?>
<table border="5" align="center">
<tr>
<td><?php echo $i;?></td>
<td><?php echo $document['username'] ; ?></td>
<td><?php echo $document['name'];?></td>
<td><?php echo $document['score'];?></td>
</tr></table>
<?php
echo "<hr/>";
$i++;
endwhile;
?>
</h2>
</div>
</section>
<div class="scroll-up" >
<a href="#home"><i class="fa fa-angle-up"></i></a>
</div>
<script src="assets/js/jquery-1.11.1.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/jquery.parallax-1.1.3.js"></script>
<script src="assets/js/imagesloaded.pkgd.js"></script>
<script src="assets/js/jquery.sticky.js"></script>
<script src="assets/js/smoothscroll.js"></script>
<script src="assets/js/wow.min.js"></script>
<script src="assets/js/jquery.easypiechart.js"></script>
<script src="assets/js/waypoints.min.js"></script>
<script src="assets/js/jquery.cbpQTRotator.js"></script>
<script src="assets/js/custom.js"></script>
</body>
</html>