* @author Slawkens * @copyright 2019 MyAAC * @link https://my-aac.org */ defined('MYAAC') or die('Direct access not allowed!'); $title = 'Bans list'; if($config['otserv_version'] == TFS_02) { echo 'Bans page doesnt work on TFS 0.2/1.0.'; return; } if(!$config['bans_display_all']) echo 'Last ' . $config['bans_limit'] . ' banishments.

'; if($config['bans_display_all']) { $_page = isset($_GET['page']) ? $_GET['page'] : 0; $offset = $_page * $config['bans_limit'] + 1; } $bans = $db->query('SELECT * FROM ' . $db->tableName('bans') . ' WHERE ' . $db->fieldName('active') . ' = 1 ORDER BY ' . $db->fieldName('added') . ' DESC LIMIT ' . ($config['bans_limit'] + 1) . (isset($offset) ? ' OFFSET ' . $offset : '')); if(!$bans->rowCount()) { ?> There are no banishments yet. 100) { $next_page = true; break; } ?>
Nick Type Expires Reason Comment Added by:
' . date("d M Y", $ban['expires']); ?> ' . date("d.m.Y", $ban['added']); ?>
0) echo ''; if($next_page) echo ''; ?>
Previous Page
Next Page
query('SELECT `name` FROM `players` WHERE `account_id` = ' . $id . ' ORDER BY `lastlogin` DESC LIMIT 1;'); if ($playerQuery->rowCount() == 0) { return "*Error*"; } $playerQuery = $playerQuery->fetch(); return $playerQuery['name']; } function getPlayerNameById($id) { if (!is_numeric($id)) { return ''; } global $db; $playerQuery = $db->query('SELECT `name` FROM `players` WHERE `id` = ' . $id); if ($playerQuery->rowCount()) { $player = $playerQuery->fetch(PDO::FETCH_ASSOC); return $player['name']; } return ''; }