<?php
include('database.php');
//session_start();
//extract($_SESSION);
//extract($_GET);
//extract($_POST);

if(isset($_GET['i'])){
	$qry199="SELECT * FROM exam_admin WHERE id='".$_GET['i']."' LIMIT 1";
	$result199=mysqli_query($con, $qry199);
	$reger = mysqli_fetch_assoc($result199);
	$admin_id = $reger['id']; 
}

if(isset($_GET['page'])){ $content=$_GET['page']; }else{ $content=""; }

if ($content==''){
$content='home';
}elseif(!file_exists('inc/'.$content.'.php')){
   $content='404'; 
}
if($admin_id==''){
	echo '<script>alert('.$admin_id.')</script>';
    echo '<script>window.location = "login.php";</script>';
}else{
	$qry = mysqli_query ($con, "SELECT * FROM exam_admin WHERE id=$admin_id");
    while ($row = mysqli_fetch_array($qry)){
        
        $username=$row['username'];
        $status=$row['status'];
        //echo '<script>window.location = "index.php?page=dashboard";</script>'; 
    } 
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>NIQS Examination - Admin</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
 <!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
	<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
	<!-- Graph CSS -->
<lin8k href="css/font-awesome.css" rel="stylesheet"> 
	<!-- jQuery -->
<link href='//fonts.googleapis.com/css?family=Roboto:700,500,300,100italic,100,400' rel='stylesheet' type='text/css'>
	<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
	<!-- /js -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- //js-->

</head> 
<body>
   <div class="page-container">
   <!--/content-inner-->
	<div class="left-content">
	   <div class="inner-content">
		<!-- header-starts -->
			<div class="header-section" style="background-color:black">
						<!--menu-right-->
						<div class="top_menu">
						        
							<!--/profile_details-->
								<div align="center" class="profile_details_left" style="alignment-adjust: central; width: 100%;">
									<font color="white">
									<h1> NIGERIAN INSTITUTE OF QUANTITY SURVEYORS</h1>
									<font size='5'> Online Examination Registration</font>
									</font>
							<div class="clearfix"></div>	
							</div>
							<div class="clearfix"></div>	
							<!--//profile_details-->
						</div>
						<!--//menu-right-->
				<div class="clearfix"></div>
				</div>
				<!-- //header-ends -->
						<!--outter-wp-->
							<div class="outter-wp">
									
									<?php 
                                    include('inc/'.$content.'.php');
                                    ?>
										<!--//graph-visual-->
									</div>
									<!--//outer-wp-->
									 <!--footer section start-->
										<footer style="background-color:black; width:100%"> 
										   <p>&copy <?php echo date('Y'); ?>. All Rights Reserved </p>
									</footer>
							<!--footer section end-->
								</div>
							</div>
				<!--//content-inner-->
			<!--/sidebar-menu-->
				<div class="sidebar-menu">
					<header class="logo">
					<a href="#" class="sidebar-icon"> <span class="fa fa-bars"></span> </a> <a href="index.php"> <span id="logo"><h1><?php echo $username; ?></h1></span> 

				  </a> 
				</header>
			<div style="border-top:1px solid rgba(69, 74, 84, 0.7)"></div>
			<!--/down-->			
			   <!--//down-->
				<div class="menu">
					<ul id="menu" >
					    	 <li><a href="index.php?page=home&i=<?php echo $_GET['i']; ?>"><i class="fa fa-tachometer"></i> <span>Dashboard</span></a></li-->
							 <li><a href="index.php?page=verifypay&i=<?php echo $_GET['i']; ?>"><i class="fa fa-edit"></i> <span>Verify Payment</span></a></li>
							 <li><a href="index.php?page=offlinepay&i=<?php echo $_GET['i']; ?>"><i class="fa fa-edit"></i> <span>Create Profile</span></a></li>
					         
							 <?php
							  if($_SESSION["admin_id"]==1){ echo '<li><a href="index.php?page=matureofflinepay&i='.$_GET['i'].'"><i class="fa fa-edit"></i> <span>Create Mature Profile</span></a></li>'; } ?>
					         <li><a href="index.php?page=getcard&i=<?php echo $_GET['i']; ?>"><i class="fa fa-search"></i> <span>Exam Card</span></a></li>
					         <!--li><a href="index.php?page=matureb&i=<?php echo $_GET['i']; ?>"><i class="fa fa-search"></i> <span>Mature <sup>2</sup></span></a></li-->
					         <li><a href="index.php?page=prevmature&i=<?php echo $_GET['i']; ?>"><i class="fa fa-search"></i> <span>Previous Mature</span></a></li>
					         <li><a href="index.php?page=mature&i=<?php echo $_GET['i']; ?>"><i class="fa fa-search"></i> <span>Mature</span></a></li>
			      	         <li><a href="index.php?page=epci&i=<?php echo $_GET['i']; ?>"><i class="fa fa-search"></i> <span>Experience</span></a></li>
					         <li><a href="index.php?page=pci&i=<?php echo $_GET['i']; ?>"><i class="fa fa-search"></i> <span>PCI</span></a></li>
					         <li><a href="index.php?page=tpcfull&i=<?php echo $_GET['i']; ?>"><i class="fa fa-search"></i> <span>TPC Full</span></a></li>
					         <li><a href="index.php?page=tpcref&i=<?php echo $_GET['i']; ?>"><i class="fa fa-search"></i> <span>TPC Referred</span></a></li>
					         <li><a href="index.php?page=gdefull&i=<?php echo $_GET['i']; ?>"><i class="fa fa-search"></i> <span>GDE Full</span></a></li>
					         <li><a href="index.php?page=gderef&i=<?php echo $_GET['i']; ?>"><i class="fa fa-search"></i> <span>GDE Referred</span></a></li>
							 <li><a href="index.php?page=probationfull&i=<?php echo $_GET['i']; ?>"><i class="fa fa-search"></i> <span>Probation Full</span></a></li>		 
        					<li><a href="index.php?page=password&i=<?php echo $_GET['i']; ?>"><i class="fa fa-edit"></i> <span>Change Password</span></a></li>
			<li><a href="logout.php"><i class="fa fa-sign-out"></i> <span>Log Out</span></a></li>
				  </ul>
				</div>
			  </div>
			  <div class="clearfix"></div>		
			</div>
							<script>
							var toggle = true;
										
							$(".sidebar-icon").click(function() {                
							  if (toggle)
							  {
								$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
								$("#menu span").css({"position":"absolute"});
							  }
							  else
							  {
								$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
								setTimeout(function() {
								  $("#menu span").css({"position":"relative"});
								}, 400);
							  }
											
											toggle = !toggle;
										});
							</script>
<!--js -->
	<script src="js/jquery.nicescroll.js"></script>
	<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
   <script src="js/bootstrap.min.js"></script>
</body>
</html>