X-Git-Url: https://git.p6c8.net/jirafeau/pcanterino.git/blobdiff_plain/a4c1c7c916f27a14a450fb26e5ab0b2290186ea9..95228d17b576cb30af5c754b7a2c01ea0c86d891:/index.php diff --git a/index.php b/index.php index a21b72e..29562ff 100644 --- a/index.php +++ b/index.php @@ -28,7 +28,10 @@ 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); @@ -38,16 +41,18 @@ 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))) { @@ -73,162 +78,157 @@ elseif (true === jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) { if (!jirafeau_user_session_logged()) { ?>
- -
- - + + + +