02.02.2017, 11:04
Hi bro.. i need problem with Website UCP.
My UCP just working for Forever banned(not work for temporary banned), can help me?
script for Temporary Days. i just can create for permanent banned in UCP.
please.. help me.
My UCP just working for Forever banned(not work for temporary banned), can help me?
script for Temporary Days. i just can create for permanent banned in UCP.
please.. help me.
PHP код:
<table class="table table-bordered">
<thead>
<td>Username</td>
<td>IP</td>
<td>Banner</td>
<td>Reason</td>
<td>Banned From</td>
<td>Unbanned</td>
</thead>
<?php
$query = $koneksi->prepare("SELECT user_banned, bIP, ban_reason, ban_time, (ban_timestamp + (ban_time * 60) - DATE_FORMAT('now', '%%s')) AS banTimeLeft, DATE_FORMAT( TIMESTAMP(ban_timestamp + (ban_time * 60), 'unixepoch'), '%%d-%%m-%%Y %%H:%%M') AS banExpired, DATE_FORMAT( TIMESTAMP(ban_timestamp, 'unixepoch'), '%%d-%%m-%%Y %%H:%%M') AS bannedFrom, user_banner FROM `bans` ");
$query->execute();
if($query->rowCount() == 0)
{
echo "<tr><td colspan='6'><small>There's no player on ban list</small></td></tr>";
}
while($data = $query->fetch())
{
if($data['ban_time'] == 0)
{
$data['banExpired'] = "Never";
}
echo "<tr><td>".$data['user_banned']."</td>";
echo "<td>".$data['bIP']."</td>";
echo "<td>".$data['user_banner']."</td>";
echo "<td>".$data['ban_reason']."</td>";
echo "<td>".$data['bannedFrom']."</td>";
echo "<td>".$data['banExpired']."</td></tr>";
}
?>
</table>