Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. public function ASE_login()
  2. {
  3. if(isset($_POST['ase_login']))
  4. {
  5. if(!empty($_POST['ase_username']) && !empty($_POST['ase_password']))
  6. {
  7. if(self::checkRank($_POST['username']))
  8. {
  9. $username = Database::escape($_POST['ase_username']);
  10. $password = Database::escape(self::setHash($_POST['ase_password']));
  11.  
  12. $check_login = Database::Query("SELECT * FROM users WHERE username = '$username' AND password = '$password'");
  13.  
  14. if(mysqli_num_rows($check_login) > 0)
  15. {
  16. foreach($check_login as $check)
  17. {
  18. $_SESSION['ase_id'] = $check['id'];
  19. Template::Redirect("me");
  20. }
  21. } else $this->msg = "Gebruikersnaam & Wachtwoord komt niet overeen";
  22. } else $this->msg = "Oeps, je hebt niet de toegestaande rank";
  23. } else $this->msg = "Vul alle velden in";
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement