forked from Momenzi/UltimateRPG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
toplista.php
238 lines (221 loc) · 11.6 KB
/
toplista.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
<!DOCTYPE html>
<html lang="ba-BA">
<head>
<meta charset="UTF-8" />
<title>Ultimate - Top lista</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" href="images/favicon.png">
<link href="css/animate.css" rel="stylesheet">
<link href="css/reset.css" rel="stylesheet">
<link href="fonts/sf/style.css" rel="stylesheet">
<link href="css/iziModal.css" rel="stylesheet">
<link href="css/owl.carousel.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/responsive.css" rel="stylesheet">
</head>
<body>
<div class="burger-menu">
<i class="close-menu"><img src="images/svg/close.svg" alt=""></i>
<ul>
<li><a href="index.php">Pocetna</a></li>
<li><a href="start.php">Kako zapoceti igru</a></li>
<li><a href="toplista.php">Top lista</a></li>
<li><a href="http://ultimate-rpg.com/forum/index.php?/forum/25-u-donacije/">Doniraj</a></li>
<li><a href="http://ultimate-rpg.com/forum">Forum</a></li>
</ul>
</div>
<section class="overflowing profileh100">
<div class="fluid-width">
<i class="fly-object art-top"><img src="images/art-top.png" alt=""></i>
</div>
<div class="header mini">
<div class="topline">
<div class="fluid-width">
<div class="logo-wrap">
<img src="images/logo.png" alt="">
<span class="logo-bage">SA:MP</span>
</div>
<div class="menu-wrap">
<i class="close-menu"><img src="images/svg/close.svg" alt=""></i>
<ul>
<li><a href="index.php">Pocetna</a></li>
<li><a href="start.php">Kako zapoceti igru</a></li>
<li><a href="toplista.php">Top lista</a></li>
<li><a href="http://ultimate-rpg.com/forum/index.php?/forum/25-u-donacije/">Doniraj</a></li>
<li><a href="http://ultimate-rpg.com/forum">Forum</a></li>
<li><a href="http://discord.ultimate-rpg.com" target="_blank"><img src="images/discord.png"></a></li>
</ul>
</div>
<div class="buttons-topline">
<a href="#" class="purple-href" data-izimodal-open="#loginModal"><img src="images/user.png" alt=""></a>
<a href="#" class="purple-href burger-click clear forMobile"><img src="images/svg/burger.svg" alt=""></a>
</div>
</div>
</div>
</div>
<div class="breadcumbs">
<ul>
<li><a href="http://ultimate-rpg.com">Pocetna</a></li>
<li>Top lista</li>
</ul>
</div>
<div class="news-content-in">
<div class="main-width">
<i class="fly-object easy-fly"><img src="images/art-easy-fly.png" alt=""></i>
<div class="news-in">
<div class="news-item">
<div class="news-preview"><img src="images/rulesimg.jpg" alt=""></div>
<div class="news-info">
<p class="news-title">TOP LISTA</p>
<br />
<div class="news-text mb40 all">
<strong>Novac<br></strong>
<?php
$conn = mysqli_connect("localhost", "username", "password", "database");
if ($conn->connect_error)
{
die("Connection failed: ".$conn->connect_error);
}
$sql = "SELECT p_name, money, xBRacun FROM users ORDER BY money + xBRacun DESC LIMIT 10";
$result = $conn->query($sql);
if($result-> num_rows > 0) {
$counter = 1;
while($row = $result->fetch_assoc()) {
$total = $row['money'] + $row['xBRacun'];
echo
"<td>[</td>".$counter."<td>] </td>".$row["p_name"]. ' | <strong><font color="#12b500">$</font></strong>' .number_format($total).'<br>';
$counter++;
}
echo "</table>";
}
else
{
echo "0 results";
}
$conn->close();
?>
<strong><br>Zlato<br></strong>
<?php
$conn = mysqli_connect("localhost", "username", "password", "database");
if ($conn->connect_error)
{
die("Connection failed: ".$conn->connect_error);
}
$sql = "SELECT p_name, xZlato FROM users ORDER BY xZlato DESC LIMIT 10";
$result = $conn->query($sql);
if($result-> num_rows > 0) {
$counter = 1;
while($row = $result->fetch_assoc()) {
$total = $row['xZlato'];
echo
"<td>[</td>".$counter."<td>] </td>".$row["p_name"]. '<td> | </td>' .number_format($total). '<strong><font color="#f5c842">G</font></strong>' .'<br>';
$counter++;
}
echo "</table>";
}
else
{
echo "0 results";
}
$conn->close();
?>
<strong><br>Level<br></strong>
<?php
$conn = mysqli_connect("localhost", "username", "password", "database");
if ($conn->connect_error)
{
die("Connection failed: ".$conn->connect_error);
}
$sql = "SELECT p_name, Level FROM users ORDER BY Level DESC LIMIT 10";
$result = $conn->query($sql);
if($result-> num_rows > 0) {
$counter = 1;
while($row = $result->fetch_assoc()) {
$total = $row['Level'];
echo
"<td>[</td>".$counter."<td>] </td>".$row["p_name"]. '<td> | <strong><font color="#b50000">LvL </font></strong></td>' .number_format($total). '<br>';
$counter++;
}
echo "</table>";
}
else
{
echo "0 results";
}
$conn->close();
?>
<strong><br>Online sati<br></strong>
<?php
$conn = mysqli_connect("localhost", "username", "password", "database");
if ($conn->connect_error)
{
die("Connection failed: ".$conn->connect_error);
}
$sql = "SELECT p_name, xOnlineSati FROM users ORDER BY xOnlineSati DESC LIMIT 10";
$result = $conn->query($sql);
if($result-> num_rows > 0) {
$counter = 1;
while($row = $result->fetch_assoc()) {
$total = $row['xOnlineSati'];
echo
"<td>[</td>".$counter."<td>] </td>".$row["p_name"]. '<td> | </td>' .number_format($total). '<strong><font color="#8200b5">H</font></strong>' .'<br>';
$counter++;
}
echo "</table>";
}
else
{
echo "0 results";
}
$conn->close();
?>
<strong><br>Top lista se refresha svaki put kada vi refreshujete sajt.</strong><br>
Svaka informacija izvlaci se iz live baze.<br><br>
</div>
<div class="next-news-in">
<a href="index.php"><span>Vrati se</span>
<p>Pocetna<img src="images/svg/arrow-right.svg" alt=""></p>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- UCP COMING SOON -->
<div id="loginModal" class="modl">
<i class="close" data-izimodal-close><img src="images/svg/close.svg" alt=""> Exit</i>
<div class="modal-content">
<div class="form-title">
<h3>Unesite podatke<br />od vaseg accounta</h3>
</div>
<div class="form-modal" id="loginForm">
<input type="text" name="easydata" class="easy-breezy" hidden>
<label for="nickname">Vas nickname</label>
<input type="text" id="rp_name" name="rp_name" class="primary-input text-center mb20" placeholder="Ime Prezime">
<label for="nickname">Password</label>
<input type="password" id="password" name="password" class="primary-input text-center mb20" placeholder="—">
<div class="alerts-wrapper inhtml">
<div class="alert-box red"></div>
</div>
<button class="primary-button wide" id="loginButton">
<p>Login</p>
</button><br>
</div>
</div>
</div>
<!-- YOUTUBE & SCRIPTS -->
<div id="videoModal" class="videoModal" data-izimodal-title="Youtube" data-izimodal-iframeURL="https://www.youtube.com/embed/YC5N66NOTP0"></div>
<script src="js/jquery.min.js"></script>
<script src="js/iziModal.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/totop.min.js"></script>
<script src="js/jquery.sticky.js"></script>
<script src="js/jquery.hashchange.min.js"></script>
<script src="js/jquery.easytabs.min.js"></script>
<script src="js/script.js"></script>
<script src="js/client.js"></script>
</body>
</html>