summaryrefslogtreecommitdiff
path: root/www/index.php
diff options
context:
space:
mode:
authorHorus32014-03-16 17:58:05 +0100
committerHorus32014-03-16 17:58:05 +0100
commit99e60dae1bb5825a426852860e67b9d00e124161 (patch)
tree4a027844a98682965712795f353f9ed90d3b7488 /www/index.php
parenta73cbd964b6d18937468537f04ca63c52c4c8210 (diff)
downloadfiles.iamfabulous.de-99e60dae1bb5825a426852860e67b9d00e124161.tar.gz
Redesigned login and register function.
Diffstat (limited to 'www/index.php')
-rwxr-xr-xwww/index.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/www/index.php b/www/index.php
index b73353b..3f6beea 100755
--- a/www/index.php
+++ b/www/index.php
@@ -25,10 +25,25 @@ if(empty($_GET)){
if(empty($_GET["name"])){
switch($_GET["task"]){
case("login"):
- login($db);
+ if($_SERVER['REQUEST_METHOD'] == 'POST'){
+ $content = login($db);
+ if($content == "success"){
+ account($db);
+ } else {
+ print_login($content);
+ }
+ } else {
+ $content = "";
+ print_login($content);
+ }
break;
case("logout"):
- logout();
+ $value = logout();
+ if(!$value){
+ print_login($value);
+ } else {
+ header("Refresh: 0; /httperror.php?e=500");
+ }
break;
case("invite"):
invite($db);