[add] count total per page
This commit is contained in:
parent
5563208160
commit
7fbdffa7d7
|
@ -12,6 +12,7 @@ function getAllBan($db, $sortBy = 'ban_date, ban_time', $order = 'DESC') {
|
|||
return $allBan;
|
||||
}
|
||||
?>
|
||||
<h2>All time banned</h2>
|
||||
<div class='table'>
|
||||
<div class='row'>
|
||||
<a href="?page=allBans&sortBy=service&order=<?php echo $newOrder?>" class='cell-header'>Service</a>
|
||||
|
|
|
@ -12,8 +12,13 @@ function getCurrentBan($db, $sortBy = 'ban_date, ban_time', $order = 'DESC') {
|
|||
}
|
||||
|
||||
//echo '<h3>Currently ',abs($currentlybanned),' ',$grammer,' banned.</h3>';
|
||||
if (empty($sortBy)) {
|
||||
$sortBy = 'ban_date';
|
||||
}
|
||||
$currentBan = getCurrentBan($db, $sortBy, $order);
|
||||
$nbCurrentBan = count($currentBan);
|
||||
?>
|
||||
<h2>Currently Banned</h2>
|
||||
<h2>Currently Banned (<?php echo $nbCurrentBan; ?>)</h2>
|
||||
<div class='table'>
|
||||
<div class='row'>
|
||||
<div class='cell-header'>
|
||||
|
@ -33,10 +38,6 @@ function getCurrentBan($db, $sortBy = 'ban_date, ban_time', $order = 'DESC') {
|
|||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if (empty($sortBy)) {
|
||||
$sortBy = 'ban_date';
|
||||
}
|
||||
$currentBan = getCurrentBan($db, $sortBy, $order);
|
||||
foreach ($currentBan as $value) {
|
||||
echo '<div class="row">
|
||||
<div class="cell">', $value['service'], '</div>
|
||||
|
|
|
@ -9,7 +9,13 @@ function getLast24hBan($db, $sortBy = 'ban_date, ban_time', $order = 'DESC') {
|
|||
}
|
||||
return $lastBan;
|
||||
}
|
||||
if (empty($sortBy)) {
|
||||
$sortBy = 'ban_date';
|
||||
}
|
||||
$getLast24hBan = getLast24hBan($db, $sortBy, $order);
|
||||
$nbLast24hBan = count($getLast24hBan);
|
||||
?>
|
||||
<h2>Last 24h ban (<?php echo $nbLast24hBan; ?>)</h2>
|
||||
<div class='table'>
|
||||
<div class='cell-header'>
|
||||
<a href="?page=lastBan&sortBy=service&order=<?php echo $newOrder?>">Service</a>
|
||||
|
@ -27,10 +33,6 @@ function getLast24hBan($db, $sortBy = 'ban_date, ban_time', $order = 'DESC') {
|
|||
<a href="?page=lastBan&sortBy=country&order=<?php echo $newOrder?>">Country</a>
|
||||
</div>
|
||||
<?php
|
||||
if (empty($sortBy)) {
|
||||
$sortBy = 'ban_date';
|
||||
}
|
||||
$getLast24hBan = getLast24hBan($db, $sortBy, $order);
|
||||
foreach ($getLast24hBan as $value) {
|
||||
echo '
|
||||
<div class="row">
|
||||
|
|
Loading…
Reference in New Issue