aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorroot2014-09-28 22:26:50 +0200
committerroot2014-09-28 22:32:04 +0200
commitb9c2f9ce85e909005d0fef74794ba99d1724cbf8 (patch)
treea164f980b198647751009ad115efaad6168db37b /index.php
parentbde71668e1b64f57e4cd3d45703e8a488b1de957 (diff)
downloadjungegemeinde-b9c2f9ce85e909005d0fef74794ba99d1724cbf8.tar.gz
improvements and dl
Diffstat (limited to 'index.php')
-rw-r--r--index.php21
1 files changed, 5 insertions, 16 deletions
diff --git a/index.php b/index.php
index 3a5a4df..8b91155 100644
--- a/index.php
+++ b/index.php
@@ -1,9 +1,5 @@
<?php
-
-# if we kann redirect user with the ?goto variable
-$redirect = true;
-
require_once( dirname(__FILE__) . '/bootstrap.php');
ob_start('minify');
session_name(SESSION);
@@ -17,7 +13,7 @@ if ( isset($_SESSION["loggedin"]) && $_SESSION["loggedin"]){
$a = "0_";
}
-if ( $_SERVER["REQUEST_METHOD"] == "GET" && $_SERVER["REDIRECT_STATUS"] == 200 && strpos($_SERVER["QUERY_STRING"], "account") === false && strpos($_SERVER["QUERY_STRING"], "logout") === false) {
+if ( $_SERVER["REQUEST_METHOD"] == "GET" && $_SERVER["REDIRECT_STATUS"] == 200 && strpos($_SERVER["QUERY_STRING"], "account") === false && strpos($_SERVER["QUERY_STRING"], "logout") === false && strpos($_SERVER["QUERY_STRING"], "action") === false) {
$token = $c->getToken($_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]. $_SERVER["QUERY_STRING"], $a);
if ( $c->exists($token)){
header("X-Cache: Hit");
@@ -87,27 +83,20 @@ require_once 'static/header.php';
case("account"):
print_account();
break;
- case("404"):
- print_404();
- break;
case("action"):
require_once 'action.php';
break;
+ case("404"):
+ print_404();
+ break;
case("recover").
print_recover();
break;
default:
- print_index();
+ print_404();
break;
}
}
-
-/*
-if ( isset($_GET['goto']) && $_GET['goto'] != "" && $redirect ){
- header($_SERVER['SERVER_PROTOCOL'] . ' 302 Moved');
- header('Location: /?page='.$_GET['goto']);
-}
-*/
?>
</div>
</div>