mirror of
https://github.com/pikami/palm-paste.git
synced 2024-11-24 20:55:42 +00:00
Bug fixes #1
This commit is contained in:
parent
045af4ac7e
commit
cbb9b9964e
@ -1,3 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
if(isset($_GET["page"]) && $_GET["page"] == "login" && isset($_POST["type"]) && $_POST["type"]=="login"){
|
||||||
|
include_once "login.php";
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
@ -118,7 +124,8 @@ if (isset($_GET["page"])){
|
|||||||
} else if($_GET["page"] == "login"){
|
} else if($_GET["page"] == "login"){
|
||||||
include_once "login.php";
|
include_once "login.php";
|
||||||
} else if($_GET["page"] == "logout"){
|
} else if($_GET["page"] == "logout"){
|
||||||
header("Location: login.php?logout=1");
|
echo '<center><h4>Please wait...</h4></center>';
|
||||||
|
echo '<meta http-equiv="refresh" content="2;url=login.php?logout=1">';
|
||||||
die();
|
die();
|
||||||
} else if($_GET["page"] == "signup"){
|
} else if($_GET["page"] == "signup"){
|
||||||
include_once "signup.php";
|
include_once "signup.php";
|
||||||
|
@ -13,7 +13,8 @@ if(isset($_GET["logout"])){
|
|||||||
LogOutUserBySession($_COOKIE["pp_sid"],$_COOKIE["pp_skey"]);
|
LogOutUserBySession($_COOKIE["pp_sid"],$_COOKIE["pp_skey"]);
|
||||||
UnsetBrowserCookies();
|
UnsetBrowserCookies();
|
||||||
}
|
}
|
||||||
header("Location: index.php");
|
echo '<center><h4>Please wait...</h4></center>';
|
||||||
|
echo '<meta http-equiv="refresh" content="2;url=index.php">';
|
||||||
} else if(isset($_POST["type"])) {
|
} else if(isset($_POST["type"])) {
|
||||||
if($_POST["type"]=="login" && isset($_POST["user"]) && isset($_POST["pwd"])){
|
if($_POST["type"]=="login" && isset($_POST["user"]) && isset($_POST["pwd"])){
|
||||||
//Get options
|
//Get options
|
||||||
@ -44,7 +45,8 @@ if(isset($_GET["logout"])){
|
|||||||
setcookie("pp_sid", $sid); //Dies when browser closes
|
setcookie("pp_sid", $sid); //Dies when browser closes
|
||||||
setcookie("pp_skey", $skey); //Dies when browser closes
|
setcookie("pp_skey", $skey); //Dies when browser closes
|
||||||
}
|
}
|
||||||
header("Location: index.php");
|
echo '<center><h4>Please wait...</h4></center>';
|
||||||
|
echo '<meta http-equiv="refresh" content="2;url=index.php">';
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
else echo "No!"; //TODO: Wrong password
|
else echo "No!"; //TODO: Wrong password
|
||||||
@ -78,7 +80,8 @@ if(isset($_GET["logout"])){
|
|||||||
$stmt->bindParam(':user', $user);
|
$stmt->bindParam(':user', $user);
|
||||||
$stmt->bindParam(':pwd', $hash);
|
$stmt->bindParam(':pwd', $hash);
|
||||||
if($stmt->execute()){
|
if($stmt->execute()){
|
||||||
header("Location: login");
|
echo '<center><h4>Please wait...</h4></center>';
|
||||||
|
echo '<meta http-equiv="refresh" content="2;url=login">';
|
||||||
} else {
|
} else {
|
||||||
echo "Fail!";
|
echo "Fail!";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user