Guest User

Untitled

a guest
Jun 20th, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. ....
  2. elseif ($_GET['action']=='login') {
  3.  
  4. if (empty($_POST['login_name'])) { $_POST['login_name']=''; }
  5. if (empty($_POST['login_pass'])) { $_POST['login_pass']=''; }
  6. if (!empty($_POST['send'])) {
  7. if (($_POST['login_name']==_ADMIN_NAME) and ($_POST['login_pass']==_ADMIN_PASS)) {
  8. //Successfully logged in
  9. $_SESSION['logged']=1;
  10.  
  11. // DOES NOT WORK
  12. header('Location: '.$filename);
  13. die('Command '.$filename);
  14. }
  15. }
  16. // Show Form;
  17. include('plogin.inc.php');
  18. }
  19. elseif ($_GET['action']=='logout') {
  20. $_SESSION['logged']=-1;
  21. // DOES WORK!
  22. header('Location: '.$filename);
  23. }
  24.  
  25. if( sizeof( $_POST ) == 0 ) header( "Location: " . $url );
  26. else echo '<html><head><meta http-equiv="refresh" content="1;url=' . $url . '"/></head><body>Redirecting to ' . $url . '</body></html>'
  27.  
  28. if( sizeof( $_POST ) == 0 ) header( "Location: " . $url );
  29. else echo '<html><head><meta http-equiv="refresh" content="1;url=' . $url . '"/></head><body>Redirecting to ' . $url . '</body></html>'
  30.  
  31. header('Location: '.$filename);
  32. ob_end_flush();
  33. exit();
  34.  
  35. die('Command '.$filename);
  36.  
  37. header('Location: '.$filename);
  38. flush(); //Try to force server to send header before script die
  39. die('Command '.$filename);
Add Comment
Please, Sign In to add comment