-
Notifications
You must be signed in to change notification settings - Fork 4
/
stats.php
61 lines (46 loc) · 1.43 KB
/
stats.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
<?php
require_once("functions.php");
style_top("Compiler Stats");
$amxx = $sql->fetchall("amxxversions");
$sm = $sql->fetchall("smversions");
$successamxx = $failureamxx = $successsm = $failuresm = 0;
for ($count = 0; $count < count($amxx); $count++)
{
$successamxx += $amxx[$count]['Success'];
$failureamxx += $amxx[$count]['Failure'];
}
for ($count = 0; $count < count($sm); $count++)
{
$successsm += $sm[$count]['Success'];
$failuresm += $sm[$count]['Failure'];
}
?>
<center>
<table>
<tr><th colspan="3">AMXModX Stats</th></tr>
<tr><th>Version</th><th>Success</th><th>Failed</th></tr>
<?php
for ($count = 0; $count < count($amxx); $count++)
{
echo "<tr><td>".$amxx[$count]['Name']."</td><td align=\"right\">".$amxx[$count]['Success']."</td><td align=\"right\">".$amxx[$count]['Failure']."</td></tr>";
}
?>
<tr><td>Total</td><td align="right"><?php echo $successamxx; ?></td><td align="right"><?php echo $failureamxx; ?></td></tr>
</table>
<br>
<table>
<tr><th colspan="3">Sourcemod Stats</th></tr>
<tr><th>Version</th><th>Success</th><th>Failed</th></tr>
<?php
for ($count = 0; $count < count($sm); $count++)
{
echo "<tr><td>".$sm[$count]['Name']."</td><td align=\"right\">".$sm[$count]['Success']."</td><td align=\"right\">".$sm[$count]['Failure']."</td></tr>";
}
?>
<tr><td>Total</td><td align="right"><?php echo $successsm; ?></td><td align="right"><?php echo $failuresm; ?></td></tr>
</table>
</center>
<br>
<?php
style_bot();
?>