Skip to content

Commit

Permalink
Add "template/blank.php"
Browse files Browse the repository at this point in the history
If you just want to show some message or just need a blank page, use this template.
  • Loading branch information
domen111 committed Apr 26, 2015
1 parent ac9a1ce commit c0a7d8c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
7 changes: 2 additions & 5 deletions login.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
if(isset($_POST["account"]) && isset($_POST["password"])){
$user = checkPassword($_POST["account"],$_POST["password"]);
if($user !== -1 && $user !== -2){
require("template/header.php");
?>
<center>Login succeed.</center>
<?php
require("template/footer.php");
$E["msg"] = "Login succeed.";
require("template/blank.php");

//set cookie
$hash = randomHash(32);
Expand Down
7 changes: 2 additions & 5 deletions signup.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,8 @@
die("SQL ERROR: " . $e->getMessage());
}

require("template/header.php");
?>
<center>Signup succeed. Please login.</center>
<?php
require("template/footer.php");
$E["msg"] = "Signup succeed. Please login.";
require("template/blank.php");
header('refresh: 3;url=login.php');
}else {
if($checkaccount !== -1){
Expand Down
8 changes: 8 additions & 0 deletions template/blank.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
if(!defined("IN_SYSTEM"))
die("Access Denied");
?>

<?php require("header.php"); ?>

<?php require("footer.php"); ?>

0 comments on commit c0a7d8c

Please sign in to comment.