From cbb9b9964e03c511d768a6c93db1dba6b4af741e Mon Sep 17 00:00:00 2001 From: pikami Date: Mon, 20 Jun 2016 18:39:39 +0000 Subject: [PATCH] Bug fixes #1 --- index.php | 17 ++++++++++++----- login.php | 9 ++++++--- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index f8f0a57..cfa04d0 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,9 @@ + @@ -118,13 +124,14 @@ if (isset($_GET["page"])){ } else if($_GET["page"] == "login"){ include_once "login.php"; } else if($_GET["page"] == "logout"){ - header("Location: login.php?logout=1"); - die(); + echo '

Please wait...

'; + echo ''; + die(); } else if($_GET["page"] == "signup"){ - include_once "signup.php"; + include_once "signup.php"; } else { - $uid = $_GET["page"]; - include_once "ViewPaste.php"; + $uid = $_GET["page"]; + include_once "ViewPaste.php"; } } else if (isset($_GET["user"])){ include_once "UserPage.php"; diff --git a/login.php b/login.php index caed986..815d582 100644 --- a/login.php +++ b/login.php @@ -13,7 +13,8 @@ if(isset($_GET["logout"])){ LogOutUserBySession($_COOKIE["pp_sid"],$_COOKIE["pp_skey"]); UnsetBrowserCookies(); } - header("Location: index.php"); + echo '

Please wait...

'; + echo ''; } else if(isset($_POST["type"])) { if($_POST["type"]=="login" && isset($_POST["user"]) && isset($_POST["pwd"])){ //Get options @@ -44,7 +45,8 @@ if(isset($_GET["logout"])){ setcookie("pp_sid", $sid); //Dies when browser closes setcookie("pp_skey", $skey); //Dies when browser closes } - header("Location: index.php"); + echo '

Please wait...

'; + echo ''; die(); } else echo "No!"; //TODO: Wrong password @@ -78,7 +80,8 @@ if(isset($_GET["logout"])){ $stmt->bindParam(':user', $user); $stmt->bindParam(':pwd', $hash); if($stmt->execute()){ - header("Location: login"); + echo '

Please wait...

'; + echo ''; } else { echo "Fail!"; }