Fortera Global
Intermediate OT User
- Joined
- Nov 20, 2015
- Messages
- 1,180
- Solutions
- 2
- Reaction score
- 117
How add columm banned by: Nick of GOD
gesior acc
script:
gesior acc
script:
PHP:
<style type="text/css">
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 50px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
</style>
<?PHP
$idas = mysql_escape_string($_GET['idas']);
if($idas == true AND $group_id_of_acc_logged >= $config['site']['access_admin_panel'])
{
echo'<font color=green> Player unbanned succesfull.</font>';
$SQL->query("DELETE FROM account_bans WHERE account_id = $idas");
}
///
$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'
<center><a href="?subtopic=tibiarules"><font color=green> Read the Rulles, avoid bans.</font></a></center>';
if($data == true){
echo ' <img id="ContentBoxHeadline" class="Title" src="layouts/tibiacom/images/header/banneds.png" alt="Contentbox headline">
<table class="tg" border="1">
<th class="tg-031e">Number.</th>
<th class="tg-031e">Player</th>
<th class="tg-031e">Reason</th>
<th class="tg-031e">Expires</th>
<tr>
';
}else
{
echo '<font color=green>[#] Nothing banned at this moment.</font>';
}
foreach($data as $i => $ban)
{
if(!htmlspecialchars($ban['reason'])){
$ban['reason'] = "(None)";
}
$kada1 = $ban['expires_at'] - time();
$kada2 = date("i",$kada1);
$kada3 = date("s",$kada1);
$kada4 = $kada1/60/60;
$kada4 = current(explode(".", $kada4));
if($kada1 < 60)
{
$zodis = "<b>Expires at: $kada1 sec.</b>";
}
elseif($kada4 >= 1)
{
$zodis = "<b>Expires at: $kada4 h, $kada2 min.</b>";
}
elseif($kada2 >= 1)
{
$zodis = "<b>Expires at: $kada2 min, $kada3 sec.</b>";
}
if($group_id_of_acc_logged >= $config['site']['access_admin_panel'])
{
$extra = ' (<a href="?subtopic=banneds&idas=' . urlencode($ban['account_id']) . '">Unban</a>)';
}
echo '<td>' .($i+1) .'.'.$extra.'</td><td><a href="?subtopic=characters&name=' . urlencode($ban['name']) . '">' . htmlspecialchars($ban['name']) . '</a></td>
<td>' . htmlspecialchars($ban['reason']) . '<br /></td>
<td> ' . $zodis . ' </td><tr>';
}
echo '</table>';
?>