forked from gogo40/XManager0_public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
globalRankingViewForm.php
executable file
·144 lines (115 loc) · 3.11 KB
/
globalRankingViewForm.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.rating1 {
border: 1px solid #777;
font-weight: bold;
font-family: Georgia, "Times New Roman", Times, serif;
color: #BEBEBE;
background-color: #FFC;
}
.rating2 {
border: 1px solid #777;
font-weight: bold;
font-family: Georgia, "Times New Roman", Times, serif;
color: #00FF00;
background-color: #FFC;
}
.rating3 {
border: 1px solid #777;
font-weight: bold;
font-family: Georgia, "Times New Roman", Times, serif;
color: #0000FF;
background-color: #FFC;
}
.rating4 {
border: 1px solid #777;
font-weight: bold;
font-family: Georgia, "Times New Roman", Times, serif;
color: #FFA500;/*#FFFF00;*/
background-color: #FFC;
}
.rating5 {
border: 1px solid #777;
font-weight: bold;
font-family: Georgia, "Times New Roman", Times, serif;
color: #FF0000;
background-color: #FFC;
}
.TabelaRodadaTitulo {
background-color: #003300;
font-family: Georgia, "Times New Roman", Times, serif;
color: #FFF;
font-size: 12px;
}
.TabelaRodadaLinha {
font-size: 12px;
background-color: #FFC;
color: #000000;
text-align: center;
}
.TabelaRodadaLinha td {
font-family: Georgia, "Times New Roman", Times, serif;
color: #000;
}
.TabelaRodadaLinha {
border: 1px solid #777;
}
.TabelaRodadaLinha a {
font-family: Georgia, "Times New Roman", Times, serif;
color: #FF0000;
font-weight: bold;
}
.TabelaRodadaLinha a:hover {
font-family: Georgia, "Times New Roman", Times, serif;
color: #00FF00;
font-weight: bold;
}
</style>
</head>
<body>
<table width="858" border="0">
<tr class="TabelaRodadaTitulo">
<th scope="col" witdh="60">Posição</th>
<th scope="col">Nome</th>
<th scope="col">Capital</th>
<th scope="col">ELO</th>
</tr>
<?php
include_once("rooms.php");
$db = new maniadb;
$db->connect($GLOBALS['mydbpath'], $GLOBALS['mydbusr'], $GLOBALS['mydbpwd']);
$db->select($GLOBALS['mydb']);
$db->query("SELECT value FROM `Configuracao` WHERE id = 1");
$row = $db->nextRow();
$ns = $row['value'] + 50;
$db->query("SELECT id, name, capital, rating FROM `users` ORDER BY `rating` DESC LIMIT 0, $ns");
$n = 1;
while ($row = $db->nextRow() and $n <= 50) {
if ($row['id'] < 0) {
continue;
}
$name = $row['name'];
$capital = $row['capital'];
$rating = $row['rating'] + 1200;
$rcolor = getProfileColor($rating);
echo "<tr>";
echo "<th class=\"TabelaRodadaLinha\">$n</th>";
$n++;
echo "<th class=\"$rcolor\"> $name </th>";
echo "<th class=\"TabelaRodadaLinha\">";
printf("$ %.2lf", $capital);
echo "</th>";
echo "<th class=\"TabelaRodadaLinha\">";
printf("%.0lf", $rating);
echo "</th>";
echo "</tr>";
}
$db->close();
?>
</table>
</body>
</html>