Example #1
0
 $connection = $con->getConnection();
 $misc = new miscFunction($connection);
 $notifyObject = new notifications();
 $loginValues = array("username" => $username, "password" => $password);
 $_SESSION["loginValues"] = $loginValues;
 $validateLogin = $misc->validateLogin($username, $password);
 if ($validateLogin === false) {
     header("location:login.php");
 }
 $result = $misc->getAdminDetails($username, $password);
 if (mysqli_num_rows($result) == 1) {
     while ($row = $result->fetch_assoc()) {
         $status = $row["status"];
         if ($status == 0) {
             $msg = "You are not allowed to access this page because you have been deacvtivated!!!";
             echo $notifyObject->errorMessage($msg);
             exit;
         }
         $_SESSION["name"] = $row["name"];
         $_SESSION["level"] = $row["level"];
         $level = $row["level"];
         $_SESSION["Admin_Id"] = $row["admin_id"];
         //$details= array("identification"=>$Identification,"officerId"=>$officerId,"userName"=>$username,"level"=>$level);
         //$_SESSION["details"]=$details;
         if ($level == 1) {
             header("location:index.php");
             return;
         } elseif ($level == 2) {
             header("location:adminindex.php");
             return;
         }
Example #2
0
		<div class="col-md-3 col-md-offset-3">
			<div class="centre">
				<ul>
				<li><a href="<?php 
        echo "./views/center.php?centercode=" . $centercode;
        ?>
 ">	<?php 
        echo $centercode;
        ?>
</a></li>
				</ul>
			</div>
		</div>
		<br/> <br/>	
		<?php 
    }
    ?>
		
		<div class= "finished">
			<a href="<?php 
    echo "./models/finish.php?Admin_Id=" . $Admin_Id;
    ?>
"> <button  name="Finish" class="btn-btn-danger btn-md"> FINISH </button></a>
		</div>
			<?php 
} else {
    echo $notifyObject->errorMessage("Please Login when a new session is configured");
}
?>
	</body>
</html>