Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ....
- elseif ($_GET['action']=='login') {
- if (empty($_POST['login_name'])) { $_POST['login_name']=''; }
- if (empty($_POST['login_pass'])) { $_POST['login_pass']=''; }
- if (!empty($_POST['send'])) {
- if (($_POST['login_name']==_ADMIN_NAME) and ($_POST['login_pass']==_ADMIN_PASS)) {
- //Successfully logged in
- $_SESSION['logged']=1;
- // DOES NOT WORK
- header('Location: '.$filename);
- die('Command '.$filename);
- }
- }
- // Show Form;
- include('plogin.inc.php');
- }
- elseif ($_GET['action']=='logout') {
- $_SESSION['logged']=-1;
- // DOES WORK!
- header('Location: '.$filename);
- }
- if( sizeof( $_POST ) == 0 ) header( "Location: " . $url );
- else echo '<html><head><meta http-equiv="refresh" content="1;url=' . $url . '"/></head><body>Redirecting to ' . $url . '</body></html>'
- if( sizeof( $_POST ) == 0 ) header( "Location: " . $url );
- else echo '<html><head><meta http-equiv="refresh" content="1;url=' . $url . '"/></head><body>Redirecting to ' . $url . '</body></html>'
- header('Location: '.$filename);
- ob_end_flush();
- exit();
- die('Command '.$filename);
- header('Location: '.$filename);
- flush(); //Try to force server to send header before script die
- die('Command '.$filename);
Add Comment
Please, Sign In to add comment