X-Git-Url: https://git.p6c8.net/jirafeau/jirafeau.git/blobdiff_plain/95228d17b576cb30af5c754b7a2c01ea0c86d891..0ed2d5528e2af3cac543a03c4914382d4846d7e8:/index.php diff --git a/index.php b/index.php index 29562ff..82b3c8c 100644 --- a/index.php +++ b/index.php @@ -28,10 +28,7 @@ require(JIRAFEAU_ROOT . 'lib/lang.php'); $download_pass = null; if ($cfg['download_password_requirement'] === 'generated') { - $download_pass = jirafeau_gen_download_pass( - $cfg['download_password_gen_len'], - $cfg['download_password_gen_chars'] - ); + $download_pass = jirafeau_gen_download_pass($cfg['download_password_gen_len'], $cfg['download_password_gen_chars']); } check_errors($cfg); @@ -41,18 +38,16 @@ if (has_error()) { require(JIRAFEAU_ROOT . 'lib/template/footer.php'); exit; } - require(JIRAFEAU_ROOT . 'lib/template/header.php'); // Logout action -if (isset($_POST['action']) && strcmp($_POST['action'], 'logout') === 0) { +if (isset($_POST['action']) && (strcmp($_POST['action'], 'logout') == 0)) { jirafeau_session_end(); } /* Check if user is allowed to upload. */ // First check: Is user already logged if (jirafeau_user_session_logged()) { - // nothing to do here } // Second check: Challenge by IP NO PASSWORD elseif (true === jirafeau_challenge_upload_ip_without_password($cfg, get_ip_address($cfg))) { @@ -78,164 +73,190 @@ elseif (true === jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) { if (!jirafeau_user_session_logged()) { ?>
- -
- - + + + +