= 1000000000) return round($n / 1000000000, 2).'B';
if ($n >= 1000000) return round($n / 1000000, 2).'M';
if ($n >= 1000) return round($n / 1000, 1).'K';
return $n;
}
$tribe1 = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE tribe = 1");
$tribe2 = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE tribe = 2");
$tribe3 = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE tribe = 3");
$tribes = Array(mysqli_num_rows($tribe1),mysqli_num_rows($tribe2),mysqli_num_rows($tribe3));
$users = mysqli_num_rows(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE tribe > 0 AND tribe < 4"));
?>
| World Information |
| Registered players |
|
| Active players |
|
| Players online |
".($t - 300)) or die(mysqli_error($database->dblink));
$num_rows = mysqli_num_rows($result);
echo $num_rows;?>
|
| Players Banned |
|
| Villages settled |
|
| Total Population |
dblink,"SELECT SUM(pop) AS sumofpop FROM ".TB_PREFIX."vdata"); $getpop = mysqli_fetch_assoc($pop); echo $getpop['sumofpop']; ?> |
| Player Information |
Tribe |
Registered |
Percent |
| Romans |
|
0) ? ($percents[0] = round(100 * ($tribes[0] / $users), 2))."%" : "---"; ?> |
| Teutons |
|
0) ? ($percents[1] = round(100 * ($tribes[1] / $users), 2))."%" : "---"; ?> |
| Gauls |
|
0) ? (100-$percents[0]-$percents[1])."%" : "---"; ?> |
| Server Information |
|
Total |
Average |
Gold |
|
|
| Troops on the Server |
';
}
echo '';
for($i=1; $i<11; $i++) {
$total = ($units_villages['u'.$i] + $units_enforcements['u'.$i]);
echo ''.formatNum($total).' | ';
}
echo "";
for($i=11; $i<21; $i++) {
echo ' | ';
}
echo '';
for($i=11; $i<21; $i++) {
$total = ($units_villages['u'.$i] + $units_enforcements['u'.$i]);
echo '| '.formatNum($total).' | ';
}
echo "
";
for($i=21; $i<31; $i++) {
echo ' | ';
}
echo '';
for($i=21; $i<31; $i++) {
$total = ($units_villages['u'.$i] + $units_enforcements['u'.$i]);
echo '| '.formatNum($total).' | ';
}
echo "
";
for($i=31; $i<41; $i++) {
echo ' | ';
}
echo '';
for($i=31; $i<41; $i++) {
$total = ($units_villages['u'.$i] + $units_enforcements['u'.$i]);
echo '| '.formatNum($total).' | ';
}
echo "
";
for($i=41; $i<51; $i++) {
echo ' | ';
}
echo '';
for($i=41; $i<51; $i++) {
$total = ($units_villages['u'.$i] + $units_enforcements['u'.$i]);
echo '| '.formatNum($total).' | ';
}
?>