2012-12-05 13:51:29 +01:00
|
|
|
<?php
|
|
|
|
/*
|
2012-12-05 17:29:38 +00:00
|
|
|
* Jirafeau, your web file repository
|
2013-07-29 20:03:15 +00:00
|
|
|
* Copyright (C) 2013
|
|
|
|
* Jerome Jutteau <j.jutteau@gmail.com>
|
|
|
|
* Jimmy Beauvois <jimmy.beauvois@gmail.com>
|
2012-12-05 13:51:29 +01:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
2015-07-11 16:24:31 +02:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2012-12-05 13:51:29 +01:00
|
|
|
*/
|
2018-02-09 23:35:52 +01:00
|
|
|
session_start();
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
define('JIRAFEAU_ROOT', dirname(__FILE__) . '/');
|
2012-12-05 13:51:29 +01:00
|
|
|
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
require(JIRAFEAU_ROOT . 'lib/settings.php');
|
|
|
|
require(JIRAFEAU_ROOT . 'lib/functions.php');
|
|
|
|
require(JIRAFEAU_ROOT . 'lib/lang.php');
|
2012-12-05 13:51:29 +01:00
|
|
|
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
check_errors($cfg);
|
|
|
|
if (has_error()) {
|
|
|
|
show_errors();
|
|
|
|
require(JIRAFEAU_ROOT . 'lib/template/footer.php');
|
2013-02-06 22:23:09 +01:00
|
|
|
exit;
|
|
|
|
}
|
2013-08-01 19:30:11 +00:00
|
|
|
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
require(JIRAFEAU_ROOT . 'lib/template/header.php');
|
2015-07-16 10:29:53 +02:00
|
|
|
|
2015-04-27 20:07:29 +02:00
|
|
|
/* Check if user is allowed to upload. */
|
2017-03-17 17:28:56 +01:00
|
|
|
// First check: Challenge by IP
|
|
|
|
if (true === jirafeau_challenge_upload_ip($cfg['upload_ip'], get_ip_address($cfg))) {
|
|
|
|
// Is an upload password required?
|
2017-02-13 22:55:25 +01:00
|
|
|
if (jirafeau_has_upload_password($cfg)) {
|
2017-03-17 17:28:56 +01:00
|
|
|
// Logout action
|
2017-02-13 22:55:25 +01:00
|
|
|
if (isset($_POST['action']) && (strcmp($_POST['action'], 'logout') == 0)) {
|
|
|
|
session_unset();
|
|
|
|
}
|
2013-08-01 19:30:11 +00:00
|
|
|
|
2017-03-17 17:28:56 +01:00
|
|
|
// Challenge by password
|
|
|
|
// …save successful logins in session
|
2017-02-13 22:55:25 +01:00
|
|
|
if (isset($_POST['upload_password'])) {
|
|
|
|
if (jirafeau_challenge_upload_password($cfg, $_POST['upload_password'])) {
|
|
|
|
$_SESSION['upload_auth'] = true;
|
|
|
|
$_SESSION['user_upload_password'] = $_POST['upload_password'];
|
|
|
|
} else {
|
|
|
|
$_SESSION['admin_auth'] = false;
|
2018-02-08 23:16:23 +01:00
|
|
|
jirafeau_fatal_error(t('BAD_PSW'), $cfg);
|
2017-02-13 22:55:25 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-17 17:28:56 +01:00
|
|
|
// Show login form if user session is not authorized yet
|
|
|
|
if (true === empty($_SESSION['upload_auth'])) {
|
2017-02-13 22:55:25 +01:00
|
|
|
?>
|
2017-03-30 15:55:34 +02:00
|
|
|
<form method="post" class="form login">
|
2017-02-13 22:55:25 +01:00
|
|
|
<fieldset>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td class = "label"><label for = "enter_password">
|
2018-02-08 23:16:23 +01:00
|
|
|
<?php echo t('UP_PSW') . ':'; ?></label>
|
2017-02-13 22:55:25 +01:00
|
|
|
</td>
|
2018-02-09 23:31:50 +01:00
|
|
|
</tr><tr>
|
2017-02-13 22:55:25 +01:00
|
|
|
<td class = "field"><input type = "password"
|
|
|
|
name = "upload_password" id = "upload_password"
|
|
|
|
size = "40" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr class = "nav">
|
|
|
|
<td class = "nav next">
|
|
|
|
<input type = "submit" name = "key" value =
|
2018-02-08 23:16:23 +01:00
|
|
|
"<?php echo t('LOGIN'); ?>" />
|
2017-02-13 22:55:25 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
<?php
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
require(JIRAFEAU_ROOT.'lib/template/footer.php');
|
2013-08-01 19:30:11 +00:00
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
2017-03-17 17:28:56 +01:00
|
|
|
}
|
|
|
|
else {
|
2018-02-08 23:16:23 +01:00
|
|
|
jirafeau_fatal_error(t('ACCESS_KO'), $cfg);
|
2017-03-17 17:28:56 +01:00
|
|
|
}
|
2017-02-20 16:15:17 +01:00
|
|
|
|
2013-01-31 23:14:14 +01:00
|
|
|
?>
|
|
|
|
<div id="upload_finished">
|
2018-02-08 23:16:23 +01:00
|
|
|
<p><?php echo t('FILE_UP') ?></p>
|
2015-03-10 23:49:25 +01:00
|
|
|
|
|
|
|
<div id="upload_finished_download_page">
|
2015-04-25 12:44:23 +02:00
|
|
|
<p>
|
2018-02-08 23:16:23 +01:00
|
|
|
<a id="upload_link" href=""><?php echo t('DL_PAGE') ?></a>
|
2017-07-09 16:48:32 +02:00
|
|
|
<a id="upload_link_email" href=""><img id="upload_image_email"/></a>
|
2018-02-09 22:13:53 +01:00
|
|
|
</p><p>
|
|
|
|
<code id=upload_link_text></code>
|
2017-07-09 16:48:32 +02:00
|
|
|
<button id="upload_link_button">✂</button>
|
2015-04-25 12:44:23 +02:00
|
|
|
</p>
|
2015-03-10 23:49:25 +01:00
|
|
|
</div>
|
2013-01-31 23:14:14 +01:00
|
|
|
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
<?php if ($cfg['preview'] == true) {
|
|
|
|
?>
|
2015-03-10 23:49:25 +01:00
|
|
|
<div id="upload_finished_preview">
|
2017-07-09 16:48:32 +02:00
|
|
|
<p>
|
2018-02-08 23:16:23 +01:00
|
|
|
<a id="preview_link" href=""><?php echo t('VIEW_LINK') ?></a>
|
2018-02-09 22:13:53 +01:00
|
|
|
</p><p>
|
|
|
|
<code id=preview_link_text></code>
|
2017-07-09 16:48:32 +02:00
|
|
|
<button id="preview_link_button">✂</button>
|
|
|
|
</p>
|
2015-03-10 23:49:25 +01:00
|
|
|
</div>
|
2017-02-20 16:15:17 +01:00
|
|
|
<?php
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
} ?>
|
2015-03-10 23:49:25 +01:00
|
|
|
|
|
|
|
<div id="upload_direct_download">
|
2017-07-09 16:48:32 +02:00
|
|
|
<p>
|
2018-02-08 23:16:23 +01:00
|
|
|
<a id="direct_link" href=""><?php echo t('DIRECT_DL') ?></a>
|
2018-02-09 22:13:53 +01:00
|
|
|
</p><p>
|
|
|
|
<code id=direct_link_text></code>
|
2017-07-09 16:48:32 +02:00
|
|
|
<button id="direct_link_button">✂</button>
|
|
|
|
</p>
|
2015-03-10 23:49:25 +01:00
|
|
|
</div>
|
|
|
|
|
2017-03-30 15:56:09 +02:00
|
|
|
<div id="upload_delete">
|
2017-07-09 16:48:32 +02:00
|
|
|
<p>
|
2018-02-08 23:16:23 +01:00
|
|
|
<a id="delete_link" href=""><?php echo t('DELETE_LINK') ?></a>
|
2018-02-09 22:13:53 +01:00
|
|
|
</p><p>
|
|
|
|
<code id=delete_link_text></code>
|
2017-07-09 16:48:32 +02:00
|
|
|
<button id="delete_link_button">✂</button>
|
|
|
|
</p>
|
2015-04-25 11:53:52 +02:00
|
|
|
</div>
|
|
|
|
|
2017-03-30 15:56:09 +02:00
|
|
|
<div id="upload_validity">
|
2018-02-08 23:16:23 +01:00
|
|
|
<p><?php echo t('VALID_UNTIL'); ?>:</p>
|
2015-04-25 11:53:52 +02:00
|
|
|
<p id="date"></p>
|
|
|
|
</div>
|
2013-01-31 23:14:14 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="uploading">
|
|
|
|
<p>
|
2018-02-08 23:16:23 +01:00
|
|
|
<?php echo t('UP'); ?>
|
2015-03-21 11:12:52 +01:00
|
|
|
<div id="uploaded_percentage"></div>
|
|
|
|
<div id="uploaded_speed"></div>
|
|
|
|
<div id="uploaded_time"></div>
|
2013-01-31 23:14:14 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
2015-03-12 20:16:34 +01:00
|
|
|
<div id="error_pop" class="error">
|
|
|
|
</div>
|
|
|
|
|
2013-01-31 23:14:14 +01:00
|
|
|
<div id="upload">
|
2013-07-29 20:03:15 +00:00
|
|
|
<fieldset>
|
2013-01-31 23:14:14 +01:00
|
|
|
<legend>
|
2018-02-08 23:16:23 +01:00
|
|
|
<?php echo t('SEL_FILE'); ?>
|
2013-01-31 23:14:14 +01:00
|
|
|
</legend>
|
|
|
|
<p>
|
|
|
|
<input type="file" id="file_select" size="30"
|
2018-02-08 23:16:23 +01:00
|
|
|
onchange="control_selected_file_size(<?php echo $cfg['maximal_upload_size'] ?>, '<?php echo t('2_BIG') . ', ' . t('FILE_LIM') . " " . $cfg['maximal_upload_size'] . " MB"; ?>')"/>
|
2013-01-31 23:14:14 +01:00
|
|
|
</p>
|
2015-03-12 20:16:34 +01:00
|
|
|
|
2013-01-31 23:14:14 +01:00
|
|
|
<div id="options">
|
|
|
|
<table id="option_table">
|
|
|
|
<tr>
|
2018-02-08 23:16:23 +01:00
|
|
|
<td><?php echo t('ONE_TIME_DL'); ?>:</td>
|
2013-01-31 23:14:14 +01:00
|
|
|
<td><input type="checkbox" id="one_time_download" /></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-08 23:16:23 +01:00
|
|
|
<td><label for="input_key"><?php echo t('PSW') . ':'; ?></label></td>
|
2013-01-31 23:14:14 +01:00
|
|
|
<td><input type="text" name="key" id="input_key" /></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-08 23:16:23 +01:00
|
|
|
<td><label for="select_time"><?php echo t('TIME_LIM') . ':'; ?></label></td>
|
2013-01-31 23:14:14 +01:00
|
|
|
<td><select name="time" id="select_time">
|
2017-01-13 15:39:12 +01:00
|
|
|
<?php
|
|
|
|
$expirationTimeOptions = array(
|
|
|
|
array(
|
|
|
|
'value' => 'minute',
|
2018-02-08 23:16:23 +01:00
|
|
|
'label' => '1_MIN'
|
2017-01-13 15:39:12 +01:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'value' => 'hour',
|
2018-02-08 23:16:23 +01:00
|
|
|
'label' => '1_H'
|
2017-01-13 15:39:12 +01:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'value' => 'day',
|
2018-02-08 23:16:23 +01:00
|
|
|
'label' => '1_D'
|
2017-01-13 15:39:12 +01:00
|
|
|
),
|
2017-01-13 18:32:17 +00:00
|
|
|
array(
|
|
|
|
'value' => 'week',
|
2018-02-08 23:16:23 +01:00
|
|
|
'label' => '1_W'
|
2017-01-13 18:32:17 +00:00
|
|
|
),
|
2017-01-13 15:39:12 +01:00
|
|
|
array(
|
|
|
|
'value' => 'month',
|
2018-02-08 23:16:23 +01:00
|
|
|
'label' => '1_M'
|
2017-01-13 15:39:12 +01:00
|
|
|
),
|
2017-01-13 18:32:17 +00:00
|
|
|
array(
|
|
|
|
'value' => 'quarter',
|
2018-02-08 23:16:23 +01:00
|
|
|
'label' => '1_Q'
|
2017-01-13 18:32:17 +00:00
|
|
|
),
|
2017-01-13 15:39:12 +01:00
|
|
|
array(
|
|
|
|
'value' => 'year',
|
2018-02-08 23:16:23 +01:00
|
|
|
'label' => '1_Y'
|
2017-01-13 15:39:12 +01:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'value' => 'none',
|
2018-02-08 23:16:23 +01:00
|
|
|
'label' => 'NONE'
|
2017-01-13 15:39:12 +01:00
|
|
|
)
|
|
|
|
);
|
|
|
|
foreach ($expirationTimeOptions as $expirationTimeOption) {
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
$selected = ($expirationTimeOption['value'] === $cfg['availability_default'])? 'selected="selected"' : '';
|
|
|
|
if (true === $cfg['availabilities'][$expirationTimeOption['value']]) {
|
|
|
|
echo '<option value="' . $expirationTimeOption['value'] . '" ' .
|
2017-01-13 15:39:12 +01:00
|
|
|
$selected . '>' . t($expirationTimeOption['label']) . '</option>';
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
}
|
2017-01-13 15:39:12 +01:00
|
|
|
}
|
|
|
|
?>
|
2013-01-31 23:14:14 +01:00
|
|
|
</select></td>
|
|
|
|
</tr>
|
2015-03-12 20:16:34 +01:00
|
|
|
|
|
|
|
<?php
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
if ($cfg['maximal_upload_size'] > 0) {
|
2018-02-08 23:16:23 +01:00
|
|
|
echo '<p class="config">' . t('FILE_LIM');
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
echo " " . $cfg['maximal_upload_size'] . " MB</p>";
|
2015-03-12 20:16:34 +01:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
2018-04-30 19:04:25 +02:00
|
|
|
<p id="max_file_size" class="config"></p>
|
2013-07-29 20:03:15 +00:00
|
|
|
<p>
|
2015-02-23 13:34:50 +01:00
|
|
|
<?php
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
if (jirafeau_has_upload_password($cfg) && $_SESSION['upload_auth']) {
|
|
|
|
?>
|
2015-02-23 13:34:50 +01:00
|
|
|
<input type="hidden" id="upload_password" name="upload_password" value="<?php echo $_SESSION['user_upload_password'] ?>"/>
|
|
|
|
<?php
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
|
|
|
|
} else {
|
|
|
|
?>
|
2015-02-23 13:34:50 +01:00
|
|
|
<input type="hidden" id="upload_password" name="upload_password" value=""/>
|
|
|
|
<?php
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
|
2015-02-23 13:34:50 +01:00
|
|
|
}
|
|
|
|
?>
|
2018-02-08 23:16:23 +01:00
|
|
|
<input type="submit" id="send" value="<?php echo t('SEND'); ?>"
|
2013-07-29 20:03:15 +00:00
|
|
|
onclick="
|
|
|
|
document.getElementById('upload').style.display = 'none';
|
|
|
|
document.getElementById('uploading').style.display = '';
|
2017-07-09 13:55:46 +02:00
|
|
|
upload (<?php echo jirafeau_get_max_upload_size_bytes(); ?>);
|
2013-07-29 20:03:15 +00:00
|
|
|
"/>
|
|
|
|
</p>
|
2013-01-31 23:14:14 +01:00
|
|
|
</table>
|
2013-07-29 20:03:15 +00:00
|
|
|
</div> </fieldset>
|
2013-08-01 19:30:11 +00:00
|
|
|
|
|
|
|
<?php
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
if (jirafeau_has_upload_password($cfg)) {
|
|
|
|
?>
|
2017-03-30 15:55:34 +02:00
|
|
|
<form method="post" class="form logout">
|
2013-08-01 19:30:11 +00:00
|
|
|
<input type = "hidden" name = "action" value = "logout"/>
|
2018-02-08 23:16:23 +01:00
|
|
|
<input type = "submit" value = "<?php echo t('LOGOUT'); ?>" />
|
2013-08-01 19:30:11 +00:00
|
|
|
</form>
|
|
|
|
<?php
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
|
2013-08-01 19:30:11 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
2013-01-31 23:14:14 +01:00
|
|
|
</div>
|
2013-07-29 20:03:15 +00:00
|
|
|
|
2015-07-11 16:24:31 +02:00
|
|
|
<script type="text/javascript" lang="Javascript">
|
2018-05-21 20:53:52 +02:00
|
|
|
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
|
2015-03-12 20:16:34 +01:00
|
|
|
document.getElementById('error_pop').style.display = 'none';
|
2013-01-31 23:14:14 +01:00
|
|
|
document.getElementById('uploading').style.display = 'none';
|
|
|
|
document.getElementById('upload_finished').style.display = 'none';
|
|
|
|
document.getElementById('options').style.display = 'none';
|
|
|
|
document.getElementById('send').style.display = 'none';
|
2013-02-10 01:37:43 +01:00
|
|
|
if (!check_html5_file_api ())
|
|
|
|
document.getElementById('max_file_size').innerHTML = '<?php
|
2018-02-16 18:35:07 +01:00
|
|
|
echo t('NO_BROWSER_SUPPORT') . jirafeau_get_max_upload_size();
|
2013-02-10 01:37:43 +01:00
|
|
|
?>';
|
2017-07-09 16:48:32 +02:00
|
|
|
|
|
|
|
addCopyListener('upload_link_button', 'upload_link');
|
|
|
|
addCopyListener('preview_link_button', 'preview_link');
|
|
|
|
addCopyListener('direct_link_button', 'direct_link');
|
|
|
|
addCopyListener('delete_link_button', 'delete_link');
|
2018-05-21 20:53:52 +02:00
|
|
|
// @license-end
|
2013-01-31 23:14:14 +01:00
|
|
|
</script>
|
[FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-01-24 13:08:59 +01:00
|
|
|
<?php require(JIRAFEAU_ROOT . 'lib/template/footer.php'); ?>
|