X-Git-Url: https://git.p6c8.net/jirafeau/pcanterino.git/blobdiff_plain/ac471fd7432906217f7a2d46b37d49b1c9f512ea..refs/heads/master:/index.php diff --git a/index.php b/index.php index 37dd677..454bc52 100644 --- a/index.php +++ b/index.php @@ -1,9 +1,9 @@ - * Jimmy Beauvois + * Copyright (C) 2008 Julien "axolotl" BERNARD + * Copyright (C) 2015 Jerome Jutteau + * Copyright (C) 2024 Jirafeau project (see AUTHORS.md) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -25,7 +25,9 @@ require(JIRAFEAU_ROOT . 'lib/settings.php'); require(JIRAFEAU_ROOT . 'lib/functions.php'); require(JIRAFEAU_ROOT . 'lib/lang.php'); -if ($cfg['download_password_requirement'] === "generated") { +$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']); } @@ -101,70 +103,8 @@ elseif (true === jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) { } ?> -
-

- -
-

- - -

- - -

-
- -
-

- -
-

- '?> - -

-
-
- - - -
-

- -

- - -

-
- - -
-

- -

- - -

-
- -
-

- -

- - -

-
- -
-

:

-

-
-
+

@@ -192,11 +132,13 @@ elseif (true === jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) { 0) { echo t('2_BIG') . ', ' . t('FILE_LIM') . " " . $cfg['maximal_upload_size'] . " MB."; } -?>')"/> +?>'); control_selected_file_extension(, '.')"/>

@@ -204,72 +146,34 @@ elseif (true === jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) { ' . t('ONE_TIME_DL') . ':'; - echo ''; - } - if ($cfg['download_password_requirement'] === 'generated') { - echo ''; - } else { - echo ''; - echo ''; - }?> + + echo ' />'; + } +if ($cfg['download_password_requirement'] === 'generated') { + echo ''; +} else { + echo ''; + echo ' '; + echo ''; +}?> - + + + = 1024) { } else { echo '

'; } +if (!empty($cfg['disallowed_extensions'])) { + // only shown when the selected file matches, see control_selected_file_extension() + echo ''; +} ?>

@@ -306,6 +214,20 @@ if ($cfg['maximal_upload_size'] >= 1024) {