diff --git a/inc/core.php b/inc/core.php index af41461..8e26015 100644 --- a/inc/core.php +++ b/inc/core.php @@ -25,12 +25,12 @@ function architect($url) if( ( (!defined('UPLOAD_FORM_LOCATION') || (defined('UPLOAD_FORM_LOCATION') && !UPLOAD_FORM_LOCATION)) && count($u)==0) || (defined('UPLOAD_FORM_LOCATION') && UPLOAD_FORM_LOCATION && '/'.implode('/',$u)==UPLOAD_FORM_LOCATION) ) { // check if client address is allowed + $forbidden = false; if(defined('ALLOWED_SUBNET') && !isIPInRange( getUserIP(), ALLOWED_SUBNET )) { - header("HTTP/1.1 401 Unauthorized"); - exit; + $forbidden = true; } - renderTemplate('main'); + renderTemplate('main',array('forbidden'=>$forbidden)); return; } diff --git a/templates/main.html b/templates/main.html index bde05ad..8146072 100644 --- a/templates/main.html +++ b/templates/main.html @@ -42,6 +42,13 @@ echo '
Due to configured restrictions, you are not allowed to upload files at this time
+ +