<title>PaintBall - <?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">PaintBall</li>
				</ul><!-- /.breadcrumb -->

				<div class="nav-search" id="nav-search">
					<form method="POST" action="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="row-fluid"><div class="span12">
<div class="table-responsive">
<h2>PaintBall</h2>
<table class="table table-hover">
<tr class="alert-info table-bordered">
			<td>#</td>
			<td>Name</td>
			<td>Rank</td>
			<td>Level</td>
			<td>Kills/Deaths</td>
		</tr>
		</thead>
		<tbody>
			<?php
				$q = Config::$g_con->prepare('SELECT * FROM `users` ORDER BY `PaintKills` DESC LIMIT 50');
				$q->execute();
				$counter = 1; 
				while($row = $q->fetch(PDO::FETCH_OBJ)) {
					if($row->Status == 0) {
						$status = 'red';
					} if($row->Status == 1) {
						$status = 'green';
					} if($row->Status == 2) {
						$status = 'orange';
					}
					echo 
					"<tr>
						<td>". $counter ."</td>
						<td><i class='icon-circle light-". $status ." middle'></i> &nbsp; <a href='".Config::$_PAGE_URL.'profile/'.$row->id."'><font color='#0088CC'>{$row->name}</font></a></td>"; ?>
						<td>
						<?php if(Config::getID('users','PaintRank',$row->name) == 18) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Global Elite </span><br/><?php } ?>
						<?php if(Config::getID('users','PaintRank',$row->name) == 17) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Supreme Master First Class </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 16) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Legendary Eagle Master </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 15) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Legendary Eagle </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 14) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Distinguished Master Guardian </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 13) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Master Guradian Elite </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 12) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Master Guradian II </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 11) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Master Guradian I </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 10) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Gold Nova Master </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 9) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Gold Nova III </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 8) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Gold Nova II </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 7) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Gold Nova I </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 6) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Silver Elite Master </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 5) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Silver Elite </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 4) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Silver IV </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 3) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Silver III </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 2) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Silver II </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 1) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> Silver I </span><br/><?php } ?>
                        <?php if(Config::getID('users','PaintRank',$row->name) == 0) { ?><span class="label label-yellow arrowed-in-right"><i class="fa fa-gamepad red"></i> N/A </span><br/><?php } ?>
						</td>
					<?php echo"<td>{$row->Level}</td>
						<td>{$row->PaintKills}/{$row->PaintDeath}</td>
					</tr>";
				$counter++;
				}
			?>
		</tbody>
	</table>
</div>
