diff options
| author | root | 2014-03-26 23:51:57 +0100 |
|---|---|---|
| committer | root | 2014-03-26 23:51:57 +0100 |
| commit | 43933b5939b329a4ab333b093a370dabe995e0ad (patch) | |
| tree | 2a91a58038943a8998776edaf33ab003860c7b6f /www/index.php | |
| parent | cb74ce9e9702677225102fc06b5adda8ce692cdc (diff) | |
| download | files.iamfabulous.de-43933b5939b329a4ab333b093a370dabe995e0ad.tar.gz | |
Small changes.
Diffstat (limited to 'www/index.php')
| -rwxr-xr-x | www/index.php | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/www/index.php b/www/index.php index 5866411..de33f64 100755 --- a/www/index.php +++ b/www/index.php @@ -23,11 +23,12 @@ if(empty($_GET)){ if(empty($_GET["name"])){ switch($_GET["task"]){ case("login"): + if($_SESSION["login"]){ + header("Refresh: 0; ".$scheme.$_SERVER["HTTP_HOST"]."/".$_SESSION["username"]); + exit; + } + if($_SERVER['REQUEST_METHOD'] == 'POST'){ - if($_SESSION["login"]){ - header("Refresh: 0; ".$scheme.$_SERVER["HTTP_HOST"]."/".$_SESSION["username"]); - exit; - } $var = login($db); if($var == LOGIN_SUCCESSFULL){ header("Refresh: 0; ".$scheme.$_SERVER["HTTP_HOST"]."/".$_SESSION["username"]); @@ -36,12 +37,7 @@ if(empty($_GET)){ print_login($var); } } else { - if(!$_SESSION["login"]){ - print_login(constant("EMPTY")); - } else { - header("Refresh: 0; ".$scheme.$_SERVER["HTTP_HOST"]."/" . $_SESSION["username"]); - exit; - } + print_login(constant("EMPTY")); } break; |
