summaryrefslogtreecommitdiff
path: root/www/index.php
diff options
context:
space:
mode:
authorHorus32014-03-29 20:26:26 +0100
committerHorus32014-03-29 20:26:26 +0100
commitf471b2130461efa25c62dbe8b015da6219cf3498 (patch)
tree1205716f618bee59e9d3a60f2a65c051f8f541e7 /www/index.php
parentea8083d7162a099a8a2e1a7976ecd1e5278a5558 (diff)
downloadfiles.iamfabulous.de-f471b2130461efa25c62dbe8b015da6219cf3498.tar.gz
Improved the ban system and the download mechanism.
Diffstat (limited to 'www/index.php')
-rwxr-xr-xwww/index.php20
1 files changed, 6 insertions, 14 deletions
diff --git a/www/index.php b/www/index.php
index be63506..841cf12 100755
--- a/www/index.php
+++ b/www/index.php
@@ -9,23 +9,15 @@ if(!isset($_SESSION["login"])){
$_SESSION["login"] = false;
}
-if(!isset($_SESSION["banned"])){
- $_SESSION["banned"] = false;
-}
-
-if($_SESSION["banned"]){
- if(check_if_banned($db)){
- $_SESSION["banned"] = false;
- } else {
- echo "You are banned. ;_;";
- exit;
- }
-}
-
if(!isset($_SESSION["login_attempts"])){
$_SESSION["login_attempts"] = 6;
}
+if(check_if_banned($db)){
+ echo "You are banned. ;_;";
+ exit;
+}
+
if(empty($_GET)){
if(!$_SESSION["login"]){
print_login(constant("EMPTY"));
@@ -114,7 +106,7 @@ if(empty($_GET)){
case("download"):
if(!isset($_GET["hash"])){
- $download_hash = "";
+ $download_hash = "empty";
} else {
$download_hash = $_GET["hash"];
}