Hello I use Nicaw and Avesta and I want to show ban comment in "bans".
Website looks like this:
Here is my modified code for bans.php
Does anybody know why I cant see ban comment (under "reason")?
edit: Thanks Cykotitan, added rep. No need to bump thread though.
Website looks like this:
Here is my modified code for bans.php
PHP:
<div class="mid">
<?php
$SQL = AAC::$SQL;
$SQL->myQuery('SELECT players.name, bans.comment, bans.expires, bans.active FROM bans, players WHERE bans.type = 2 AND players.id = bans.value OR bans.type = 3 AND players.account_id = bans.value ORDER BY expires ASC');
echo '<table style="width:100%">'."\n";
echo '<tr class="color0"><td style="width:25%"><b>Name</b></td><td style="width:25%"><b>Reason</b></td><td style="width:25%"><b>Ban Ends</b></td><td style="width:25%"><b>Time Left</b></td></tr>'."\n";
while ($ban = $SQL->fetch_array()){
if(!$ban['active']) continue;
$time = date("jS F Y H:i:s",(int) $ban['expires']);
$d = floor(($ban['expires'] - time())/(24*3600));
$h = floor(($ban['expires'] - time() - $d * 24*3600)/3600);
if ($d != 0)
$timeleft = $d.'d '.$h.'h';
else
$timeleft = $h.'h';
if ($ban['expires'] - time() > 0 && (($ban['expires'] - time()) < $cfg['max_ban_time'] || $cfg['max_ban_time'] == 0)){
$i++;
echo '<tr '.getStyle($i).'><td>'.$ban['name'].'</td><td>'.$comment.'</td><td>'.$time.'</td><td>'.$timeleft.'</td></tr>'."\n";
}
}
echo '</table>'."\n";
?>
</div>
Does anybody know why I cant see ban comment (under "reason")?
edit: Thanks Cykotitan, added rep. No need to bump thread though.
Last edited: