Very simple script that shows list of banned players, time of ban/expires and reason of ban.
As there is no information about player banned in TFS 1.0 [only account id of player banned = all characters are banned] script gets player with highest level from account and show him as banned player.
I HOPE THAT SOMEONE HAS TIME AND CAN MAKE IT LOOKS NICE (AND OF COURSE POST IT ON OTLAND IN NEW THREAD!)
Now it's just simple list of players-bans. Paste code to file pages/bans.php:
you can view page at:
http://your-website-domain.com/?subtopic=bans
As there is no information about player banned in TFS 1.0 [only account id of player banned = all characters are banned] script gets player with highest level from account and show him as banned player.
I HOPE THAT SOMEONE HAS TIME AND CAN MAKE IT LOOKS NICE (AND OF COURSE POST IT ON OTLAND IN NEW THREAD!)
Now it's just simple list of players-bans. Paste code to file pages/bans.php:
PHP:
<?php
$data = $SQL->query('SELECT `players_data`.`name`, `account_bans`.`account_id`, `account_bans`.`reason`, `account_bans`.`banned_at`, `account_bans`.`expires_at`, `account_bans`.`banned_by` FROM `account_bans` INNER JOIN (SELECT * FROM (SELECT `account_id`, `name` FROM `players` WHERE `players`.`account_id` IN (SELECT `account_id` FROM `account_bans`) ORDER BY `level` DESC) x GROUP BY `account_id`) players_data ON `account_bans`.`account_id` = `players_data`.`account_id`')->fetchAll();
echo '<h2>Active bans</h2>';
foreach($data as $i => $ban)
{
echo ($i+1) . '. Player: <a href="?subtopic=characters&name=' . urlencode($ban['name']) . '">' . htmlspecialchars($ban['name']) . '</a> , banned at ' . date("j F Y, g:i a", $ban['banned_at']) . ' , expires at ' . date("j F Y, g:i a", $ban['expires_at']) . ' , reason: ' . htmlspecialchars($ban['reason']) . '<br />';
}
http://your-website-domain.com/?subtopic=bans