</div><div class="main-content">
<?php
if(!defined('panel'))
	die('Nope.');
if(!isset(Config::$_url[1])) echo '<meta http-equiv="refresh" content="0;URL=\''.Config::$_PAGE_URL.'group/list\'/>';

$q = Config::$g_con->prepare('SELECT * FROM `factions` WHERE `ID` = ?');
$q->execute(array(Config::$_url[1]));
if(!$q->rowCount()) {
	echo '
<title>Error! Invalid faction ID</title>
<div class="breadcrumbs" id="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="../">Home</a>
</li>
<li>
<a href="../group/list">Factions</a>
</li>
<li class="active">Invalid faction ID.</li>
</ul>

		<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="alert alert-danger">Error! Invalid faction ID.</div></div>';
	echo '<meta http-equiv="refresh" content="0;URL=\''.Config::$_PAGE_URL.'group/list\'/>';
	return;
}
?>
<title><?php echo Config::$factions[Config::$_url[1]] ?> members - <?php echo Config::$_SITE_NAME; ?></title>



	
			<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>
						<a href="<?php echo Config::$_PAGE_URL; ?>group/list">Factions</a>
					</li>
					<li>
						<a href="<?php echo Config::$_PAGE_URL; ?>group/members/<?php echo Config::$_url[1] ?>"><?php echo Config::$factions[Config::$_url[1]] ?></a>
					</li>					
					<li class="active">Members</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="page-header">
	<h1><?php echo Config::$factions[Config::$_url[1]] ?></h1>
	</div>
	<table class="table">
		<tr>
			<td>Name</td>
			<td>Rank</td>
			<td>FW</td>
			<td>Days in faction</td>
			<td>Last Online</td>
			<?php if(Config::$_url[1] == 1 || Config::$_url[1] == 2 || Config::$_url[1] == 3 || Config::$_url[1] == 8) { ?>
			<!-- Departamente -->
            <td>Arrests</td>
            <td>Confiscated licenses</td>
            <td>Tickets</td>
            <td>Frisks</td>
            <td>Money Deposited</td>
			<?php } ?>
            <?php if(Config::$_url[1] == 4 || Config::$_url[1] == 5 || Config::$_url[1] == 6 || Config::$_url[1] == 10) { ?>
			<!-- Mafii -->
            <td>Materials Deposited</td>
            <td>Drugs Deposited</td>
            <td>Money Deposited</td>
			<?php } ?>
            <?php if(Config::$_url[1] == 11) { ?>
            <!-- Hitman -->
			<td>Contracts</td>
			<td>Money Deposited</td>
			<?php } ?>
            <?php if(Config::$_url[1] == 9) { ?>
            <!-- News Reporter -->
			<td>News</td>
			<td>Lives</td>
			<td>Money Deposited</td>
			<?php } ?>
            <?php if(Config::$_url[1] == 12) { ?>
            <!-- School Instructors -->
			<td>Licenses sold</td>
			<td>Money Deposited</td>
			<?php } ?>
            <?php if(Config::$_url[1] == 13) { ?>
            <!-- Taxi -->
			<td>Commands</td>
			<td>Money Deposited</td>
			<?php } ?>
            <?php if(Config::$_url[1] == 14) { ?>
            <!-- Paramedic -->
			<td>Healted Players</td>
			<td>Money Deposited</td>
			<?php } ?>
			<td>Options</td>
		</tr>
		<?php
			$q = Config::$g_con->prepare('SELECT * FROM `users` WHERE `Leader` = ? OR `Member` = ? ORDER  BY `Rank` DESC');
			$q->execute(array(Config::$_url[1],Config::$_url[1]));
			while($row = $q->fetch(PDO::FETCH_OBJ)) {
		?>
		<tr>
			<td>
				<img src="<?php echo Config::$_PAGE_URL; ?>assets/images/avatars/<?php echo $row->Model ?>.png" style="width: 15px"/>&nbsp;
				<a class="ip" href="<?php echo Config::$_PAGE_URL ?>profile/<?php echo $row->id ?>"><?php echo $row->name ?></a>
			</td>
			<td><?php echo $row->Rank ?></td>
			<td><?php echo $row->FWarn ?>/3</td>
			<td><?php echo $row->FactionTime ?> days</td>
			<td><?php echo $row->lastOn ?></td>
			<?php if(Config::$_url[1] == 1 || Config::$_url[1] == 2 || Config::$_url[1] == 3 || Config::$_url[1] == 8) { ?>
			<!-- Departamente -->
			<td><?php echo $row->Commands ?></td>
			<td><?php echo $row->Lconf ?></td>
			<td><?php echo $row->Tickets ?></td>
			<td><?php echo $row->Frisks ?></td>
			<td><?php echo $row->Mdep ?></td>
			<?php } ?>
            <?php if(Config::$_url[1] == 4 || Config::$_url[1] == 5 || Config::$_url[1] == 6 || Config::$_url[1] == 10) { ?>
			<!-- Mafii -->
			<td><?php echo $row->Matsdep ?></td>
			<td><?php echo $row->Drugsdep ?></td>
			<td><?php echo $row->Mdep ?></td>
			<?php } ?>
            <?php if(Config::$_url[1] == 11) { ?>
			<!-- Hitman -->
			<td><?php echo $row->Commands ?></td>
			<td><?php echo $row->Mdep ?></td>
			<?php } ?>
            <?php if(Config::$_url[1] == 9) { ?>
			<!-- News Reporter -->
			<td><?php echo $row->Commands ?></td>
			<td><?php echo $row->Lives ?></td>
			<td><?php echo $row->Mdep ?></td>
			<?php } ?>
            <?php if(Config::$_url[1] == 12) { ?>
			<!-- School Instructors -->
			<td><?php echo $row->Commands ?></td>
			<td><?php echo $row->Mdep ?></td>
			<?php } ?>
            <?php if(Config::$_url[1] == 13) { ?>
			<!-- Taxi -->
			<td><?php echo $row->Commands ?></td>
			<td><?php echo $row->Mdep ?></td>
			<?php } ?>
            <?php if(Config::$_url[1] == 14) { ?>
			<!-- Paramedic -->
			<td><?php echo $row->Commands ?></td>
			<td><?php echo $row->Mdep ?></td>
			<?php } ?>
			<td><a href="<?php echo Config::$_PAGE_URL; ?>createcomplaint/<?php echo $row->id ?>" class="btn btn-minier btn-danger">Reclama player</a></td>
		</tr>
		<?php } ?>
	</table>
