summaryrefslogtreecommitdiff
path: root/www/index.php
diff options
context:
space:
mode:
authormoehm2014-03-27 19:21:18 +0100
committermoehm2014-03-27 19:21:18 +0100
commited5dabd4df988f63d300fa4ed6cc388990b0fdfb (patch)
tree950e9187234391550c784604a8cb659105000313 /www/index.php
parent2310c2e3cb4cf9b724ef065fcb8543a60d0ff280 (diff)
parenta35197cefeb2dae3e3688eec5762824263d16f0c (diff)
downloadfiles.iamfabulous.de-ed5dabd4df988f63d300fa4ed6cc388990b0fdfb.tar.gz
Merge branch 'master' of git.iamfabulous.de:files.iamfabulous.de
Diffstat (limited to 'www/index.php')
-rwxr-xr-xwww/index.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/www/index.php b/www/index.php
index 5775b86..d7adf38 100755
--- a/www/index.php
+++ b/www/index.php
@@ -32,11 +32,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"]);
@@ -45,12 +46,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;