Guest User

Untitled

a guest
Jan 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. $sha_pass = sha1(strtoupper($name).":".strtoupper($pass));
  2. $accountsql = mysqli_query($mysql->db_link_auth, "SELECT id, username FROM account WHERE username = '".$name."' AND sha_pass_hash = '".$sha_pass."'");
  3.  
  4. if(!$accountsql)
  5. {
  6. echo 'Error in SQL code ' . mysqli_error($mysql->db_link_auth);
  7. exit;
  8. }
  9.  
  10. $accountarr = mysqli_fetch_assoc($accountsql);
  11.  
  12. // Kontrola zda jsou zadané údaje správně...
  13. if(mysqli_num_rows($accountsql) == 0)
  14. {
  15. //Log::login($_SESSION['Username'], $_SERVER['REMOTE_ADDR'], $_SESSION['GMLevel'], 'Incorrect');
  16. //header("location:index.php?bad_login");
  17. echo '<meta http-equiv="REFRESH" content="0;url=index.php?bad_login">';
  18. exit;
  19. }
  20.  
  21. $gmlevelsql = mysqli_query($mysql->db_link_auth, "SELECT gmlevel FROM account_access WHERE id = '" . $accountarr['id'] . "' AND RealmID IN (1, -1)");
Add Comment
Please, Sign In to add comment