<?php
require_once("../headers.php"); 
 
if( isset($_POST['logname']) && isset($_POST['logsecret']) ){

 

$username=$_POST['logname'];

$password=$_POST['logsecret'];
 if($password!="" &&  $username!=""){
$rQ=$con->superlogin($username,$password);
if ($rQ->rowCount()>0) {
	$Dr=$rQ->fetch();//
 
$id1="gsfhuw8891o1pggywiuiwpwp8091";
$g ="qwesgbsynnebbdyyeuueumnennennee"; 
           $admin=$Dr['userid'];
            
           
           echo "<script> window.location.href='systemuser.php?i=$id1&gs=$g&&id=$admin' </script>";
	           
  
}
else{
	$r="Invalid username or password!.";
	
	echo "<script> window.location.href='staff.php?id=$r' </script>";
	 
}


}
else{
  $r="Both username and password required!.";
  	echo "<script> window.location.href='staff.php?id=$r' </script>";

  
 
}
}
else{
  $r="Both username and password required!.";
  
  	echo "<script> window.location.href='staff.php?id=$r' </script>";

  
}
 
?>