<title>Banlist - <?php echo Config::$_SITE_NAME; ?></title>
<?php
if(!defined('panel'))
	die('Nope.');
?>

</div>
	<div class="main-content">
			<div class="breadcrumbs" id="breadcrumbs">
				<script type="text/javascript">
					try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
				</script>

				<ul class="breadcrumb">
					<li>
						<i class="ace-icon fa fa-home home-icon"></i>
						<a href="<?php echo Config::$_PAGE_URL; ?>">Home</a>
					</li>
					<li class="active">Banlist</li>
				</ul><!-- /.breadcrumb -->

				<div class="nav-search" id="nav-search">
					<form method="POST" action="<?php echo Config::$_PAGE_URL; ?>search">
						<span class="input-icon">
							<input type="text" placeholder="Search ..." name="sname" id="username" type="submit" class="nav-search-input" autocomplete="on"> 
							<i class="ace-icon fa fa-search nav-search-icon"></i>
						</span>
					</form>
				</div> <!-- /.nav-search -->
			</div>	
<div class="page-content">

<div class="table-responsive">
<table class="table">
<tr class="success">
<td>Player</td>
<td>Ban Date</td>
<td>Ban Reason</td>
<td>Banned by</td>
<td>Ban Expire at</td>
<td>IP Ban</td>				

		</tr>
		</thead>
		<tbody>
			<?php
				$q = Config::$g_con->prepare('SELECT * FROM `bans` WHERE `Active` = 1 ORDER BY `ID` DESC '.Pagination::limit());
				$q->execute();
				while($row = $q->fetch(PDO::FETCH_OBJ)) {
					echo 
					"<tr>
						<td><a href='http://wster-rpg.cf/panel/profile/" .Config::getID('users','id',$row->PlayerName)."'>{$row->PlayerName}</a></td>
						<td>{$row->BanTimeDate}</td>
						<td>{$row->Reason}</td>
						<td>{$row->AdminName}</td>																							
						<td>" . (!$row->Days ? 'permanent' : "$row->Days days") . "</td>
						<td>" . (!$row->IPBan ? 'no' : "yes") . "</td>";
					echo "</tr>";
				}
			?>
		</tbody>
	</table>
</div>
<?php
echo Pagination::create(Config::rows('bans'));
?>
