SHARE
TWEET

Untitled

a guest May 31st, 2017 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Admin Login
  2.  
  3.   if(mysql_real_escape_string($_POST['action']) == "adminlogin"){
  4.  
  5.   //echo "<script>alert('Error');history.back('');</script>";
  6.    $adminun = mysql_real_escape_string(strtolower($_POST['alogloginid']));
  7.    $adminpw = mysql_real_escape_string($_POST['alogloginpw']);
  8.    
  9.    //Checking Username Existance
  10.    
  11.    $CheckingUsername = mysql_query("SELECT `Id` FROM `user` WHERE `Id`='$adminun'") or die(mysql_errror());
  12.    if(mysql_num_rows($CheckingUsername) == 0){die("<script>alert('Error');history.back('');</script>");}//error
  13.    
  14.    //Checking Password For Username
  15.    $CheckingPassword = mysql_query("SELECT * FROM `user` WHERE `Id`='$adminun'") or die(mysql_error());
  16.    $UserPassword = mysql_fetch_assoc($CheckingPassword);
  17.    
  18.     if($adminpw != $UserPassword['Password']){die("<script>alert('Error');history.back('');</script>");}
  19.    
  20.    
  21.    //Checking The Authority Of User
  22.    $CheckingAuthority = mysql_query("SELECT * FROM `user` WHERE `Id`='$adminun'") or die(mysql_error());
  23.    $CheckingUserAuth = mysql_fetch_assoc($CheckingAuthority);
  24.    
  25.    //If Authority Is Less Than 99 (Game Master)..Error
  26.    if($CheckingUserAuth < 99){die("<script>alert('Error');history.back('');</script>");}  
  27.  
  28.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top