Guest User

Untitled

a guest
Jul 23rd, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. session_start();
  2.  
  3.  
  4. include_once("../../../libraries/sdfsdfsdf/login_classes.php");
  5. $auth = new Auth;
  6.  
  7. $action = $_REQUEST['action'];
  8.  
  9. $username = $_POST['username'];
  10. $password = $_POST['password'];
  11.  
  12. if ($action == 'login' && !$auth->emailExists($username)) {
  13.  
  14. Header('Location: index.php?action=unknownuser');
  15.  
  16. } else if ($action == 'login' && !$auth->isAccountActive($username)) {
  17.  
  18. Header('Location: index.php?action=inactive');
  19.  
  20. } else if ($action == 'login' && $auth->userAuth($username, $password)) {
  21.  
  22. Header('Location: index.php');
  23.  
  24. } else if ($_SESSION['loggedin']) {
  25.  
  26. Header('Location: services.php');
  27.  
  28. }
Add Comment
Please, Sign In to add comment