From 27bc0fe2182afafee830bda8b161f67282f631c8 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 30 Sep 2014 04:39:21 +0200 Subject: fixed bug, added download page, prettified 404 page and general design --- functions.php | 52 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 11 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index efb173c..854489f 100644 --- a/functions.php +++ b/functions.php @@ -37,10 +37,12 @@ function failure($reason, $httpcode, $ajax = true, $heading = NULL){ } function print_login($option = false){ -if(isset($_GET["goto"]) && $_GET["goto"] != "") +if( isset($_GET["goto"]) && $_GET["goto"] != "" ) { $goto = htmlentities($_GET["goto"]); -else + +} else { $goto = "index"; +} global $user; if ( $user->isLoggedIn() ){ @@ -110,11 +112,11 @@ else function print_logout(){ global $user; - $user->logout(); - /* - global $c; - $c->flush(); - */ + if ( $user->isLoggedIn() ){ + $user->logout(); + header($_SERVER["SERVER_PROTOCOL"] . " 301 Moved"); + header("Location: ".DOMAIN."/?page=logout"); + } print_login("logout"); } @@ -191,8 +193,6 @@ function print_list($option = false){ ?> -
Downloade als [plain text] oder als [csv] Datei.
-