2012-12-05 17:29:38 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* Jirafeau, your web file repository
|
|
|
|
* Copyright (C) 2008 Julien "axolotl" BERNARD <axolotl@magieeternelle.org>
|
2020-11-15 21:41:14 +01:00
|
|
|
* Copyright (C) 2015 Jerome Jutteau <jerome@jutteau.fr>
|
2012-12-05 17:29:38 +00: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
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
[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 17:29:38 +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/settings.php');
|
|
|
|
require(JIRAFEAU_ROOT . 'lib/functions.php');
|
|
|
|
require(JIRAFEAU_ROOT . 'lib/lang.php');
|
2012-12-05 17:29:38 +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
|
|
|
if (!isset($_GET['h']) || empty($_GET['h'])) {
|
2017-07-09 13:55:46 +02:00
|
|
|
header('Location: ./');
|
2013-01-02 23:03:32 +01:00
|
|
|
exit;
|
|
|
|
}
|
2012-12-05 17:29:38 +00:00
|
|
|
|
2013-02-14 13:44:32 +00:00
|
|
|
/* Operations may take a long time.
|
|
|
|
* Be sure PHP's safe mode is off.
|
|
|
|
*/
|
2013-08-01 19:29:56 +00:00
|
|
|
@set_time_limit(0);
|
2013-02-14 13:44:32 +00:00
|
|
|
|
2013-01-02 23:03:32 +01:00
|
|
|
$link_name = $_GET['h'];
|
2012-12-05 17:29:38 +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
|
|
|
if (!preg_match('/[0-9a-zA-Z_-]+$/', $link_name)) {
|
|
|
|
require(JIRAFEAU_ROOT.'lib/template/header.php');
|
2018-02-08 23:16:23 +01:00
|
|
|
echo '<div class="error"><p>' . t('FILE_404') . '</p></div>';
|
[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-01-02 23:03:32 +01:00
|
|
|
exit;
|
|
|
|
}
|
2012-12-05 18:48:00 +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
|
|
|
$link = jirafeau_get_link($link_name);
|
|
|
|
if (count($link) == 0) {
|
|
|
|
require(JIRAFEAU_ROOT.'lib/template/header.php');
|
2018-02-08 23:16:23 +01:00
|
|
|
echo '<div class="error"><p>' . t('FILE_404') .
|
2013-01-02 23:03:32 +01:00
|
|
|
'</p></div>';
|
[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-01-02 23:03:32 +01:00
|
|
|
exit;
|
|
|
|
}
|
2012-12-05 17:29:38 +00:00
|
|
|
|
2013-01-02 23:03:32 +01:00
|
|
|
$delete_code = '';
|
[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 (isset($_GET['d']) && !empty($_GET['d']) && $_GET['d'] != '1') {
|
2013-01-02 23:03:32 +01:00
|
|
|
$delete_code = $_GET['d'];
|
[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-01-02 23:03:32 +01:00
|
|
|
|
2013-07-24 14:46:39 +02:00
|
|
|
$crypt_key = '';
|
[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 (isset($_GET['k']) && !empty($_GET['k'])) {
|
2013-07-24 14:46:39 +02:00
|
|
|
$crypt_key = $_GET['k'];
|
[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-07-24 14:46:39 +02:00
|
|
|
|
2015-03-10 21:25:21 +01:00
|
|
|
$do_download = false;
|
[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 (isset($_GET['d']) && $_GET['d'] == '1') {
|
2015-03-10 21:25:21 +01:00
|
|
|
$do_download = true;
|
[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-01-02 23:03:32 +01:00
|
|
|
|
2015-03-10 21:25:21 +01:00
|
|
|
$do_preview = false;
|
[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 (isset($_GET['p']) && !empty($_GET['p'])) {
|
2015-03-10 21:25:21 +01:00
|
|
|
$do_preview = true;
|
[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-01-02 23:03:32 +01:00
|
|
|
|
2019-12-04 21:33:01 +01:00
|
|
|
$p = s2p($link['hash']);
|
|
|
|
if (!file_exists(VAR_FILES . $p . $link['hash'])) {
|
[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
|
|
|
jirafeau_delete_link($link_name);
|
|
|
|
require(JIRAFEAU_ROOT.'lib/template/header.php');
|
2018-02-08 23:16:23 +01:00
|
|
|
echo '<div class="error"><p>'.t('FILE_NOT_AVAIL').
|
2013-01-02 23:03:32 +01:00
|
|
|
'</p></div>';
|
[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-01-02 23:03:32 +01:00
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
[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 (!empty($delete_code) && $delete_code == $link['link_code']) {
|
|
|
|
require(JIRAFEAU_ROOT.'lib/template/header.php');
|
2017-09-05 00:02:51 +02:00
|
|
|
if (isset($_POST['do_delete'])) {
|
|
|
|
jirafeau_delete_link($link_name);
|
2018-02-08 23:16:23 +01:00
|
|
|
echo '<div class="message"><p>'.t('FILE_DELETED').
|
2017-09-05 00:02:51 +02:00
|
|
|
'</p></div>';
|
|
|
|
} else { ?>
|
|
|
|
<div>
|
|
|
|
<form action="f.php" method="post" id="submit_delete_post" class="form login">
|
|
|
|
<input type="hidden" name="do_delete" value=1/>
|
|
|
|
<fieldset>
|
2018-02-08 23:16:23 +01:00
|
|
|
<legend> <?php echo t('CONFIRM_DEL') ?> </legend>
|
2017-09-05 00:02:51 +02:00
|
|
|
<table>
|
|
|
|
<tr><td>
|
2018-04-30 19:23:45 +02:00
|
|
|
<?php echo t('GONNA_DEL') . ' "' . jirafeau_escape($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ').' ?>
|
2017-09-05 00:02:51 +02:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>
|
2019-11-12 00:25:04 +01:00
|
|
|
<?php echo t('USING_SERVICE'). ' <a href="tos.php" target="_blank" rel="noopener noreferrer">' . t('TOS') . '</a>.' ?>
|
2017-09-05 00:02:51 +02:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>
|
2018-02-08 23:16:23 +01:00
|
|
|
<input type="submit" id="submit_delete" value="<?php echo t('DELETE'); ?>"
|
2017-09-05 00:02:51 +02:00
|
|
|
onclick="document.getElementById('submit_delete_post').action='<?php echo 'f.php?h=' . $link_name . '&d=' . $delete_code . "';"; ?>
|
|
|
|
document.getElementById('submit_delete').submit ();"/>
|
|
|
|
</td></tr>
|
|
|
|
</table>
|
|
|
|
</fieldset></form></div><?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-01-02 23:03:32 +01:00
|
|
|
exit;
|
|
|
|
}
|
2012-12-07 20:41:43 +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
|
|
|
if ($link['time'] != JIRAFEAU_INFINITY && time() > $link['time']) {
|
|
|
|
jirafeau_delete_link($link_name);
|
|
|
|
require(JIRAFEAU_ROOT.'lib/template/header.php');
|
2013-01-02 23:03:32 +01:00
|
|
|
echo '<div class="error"><p>'.
|
2018-02-08 23:16:23 +01:00
|
|
|
t('FILE_EXPIRED') . ' ' .
|
|
|
|
t('FILE_DELETED') .
|
2013-01-02 23:03:32 +01:00
|
|
|
'</p></div>';
|
[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-01-02 23:03:32 +01:00
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
[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 (empty($crypt_key) && $link['crypted']) {
|
|
|
|
require(JIRAFEAU_ROOT.'lib/template/header.php');
|
2018-02-08 23:16:23 +01:00
|
|
|
echo '<div class="error"><p>' . t('FILE_404') .
|
2013-07-24 14:46:39 +02:00
|
|
|
'</p></div>';
|
[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-07-24 14:46:39 +02:00
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2013-01-02 23:03:32 +01:00
|
|
|
$password_challenged = false;
|
[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 (!empty($link['key'])) {
|
|
|
|
if (!isset($_POST['key'])) {
|
|
|
|
require(JIRAFEAU_ROOT.'lib/template/header.php');
|
2013-01-31 23:14:14 +01:00
|
|
|
echo '<div>' .
|
2017-07-09 13:55:46 +02:00
|
|
|
'<form action="f.php" method="post" id="submit_post" class="form login">'; ?>
|
2013-01-02 23:03:32 +01:00
|
|
|
<input type = "hidden" name = "jirafeau" value = "<?php echo JIRAFEAU_VERSION ?>"/><?php
|
|
|
|
echo '<fieldset>' .
|
2018-02-08 23:16:23 +01:00
|
|
|
'<legend>' . t('PSW_PROTEC') .
|
2013-01-02 23:03:32 +01:00
|
|
|
'</legend><table><tr><td>' .
|
2018-02-08 23:16:23 +01:00
|
|
|
t('GIMME_PSW') . ' : ' .
|
2013-01-02 23:03:32 +01:00
|
|
|
'<input type = "password" name = "key" />' .
|
2013-01-03 01:08:54 +01:00
|
|
|
'</td></tr>' .
|
|
|
|
'<tr><td>' .
|
2019-11-12 00:25:04 +01:00
|
|
|
t('USING_SERVICE'). ' <a href="tos.php" target="_blank" rel="noopener noreferrer">' . t('TOS') . '</a>.' .
|
2015-04-06 17:13:33 +02:00
|
|
|
'</td></tr>';
|
|
|
|
|
[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 ($link['onetime'] == 'O') {
|
2015-04-06 17:13:33 +02:00
|
|
|
echo '<tr><td id="self_destruct">' .
|
2018-02-08 23:16:23 +01:00
|
|
|
t('AUTO_DESTRUCT') .
|
2015-04-06 17:13:33 +02:00
|
|
|
'</td></tr>';
|
2018-02-08 23:16:23 +01:00
|
|
|
} ?><tr><td><input type="submit" id = "submit_download" value="<?php echo t('DL'); ?>"
|
2017-01-18 19:41:14 +01:00
|
|
|
onclick="document.getElementById('submit_post').action='<?php
|
2017-07-09 13:55:46 +02:00
|
|
|
echo 'f.php?h=' . $link_name . '&d=1';
|
[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 (!empty($crypt_key)) {
|
2013-07-24 14:46:39 +02:00
|
|
|
echo '&k=' . urlencode($crypt_key);
|
[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-07-24 14:46:39 +02:00
|
|
|
document.getElementById('submit_download').submit ();"/><?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['preview'] && jirafeau_is_viewable($link['mime_type'])) {
|
2018-02-08 23:16:23 +01:00
|
|
|
?><input type="submit" id = "submit_preview" value="<?php echo t('PREVIEW'); ?>"
|
2017-01-18 19:41:14 +01:00
|
|
|
onclick="document.getElementById('submit_post').action='<?php
|
2017-07-09 13:55:46 +02:00
|
|
|
echo 'f.php?h=' . $link_name . '&p=1';
|
[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 (!empty($crypt_key)) {
|
2015-03-10 23:49:25 +01:00
|
|
|
echo '&k=' . urlencode($crypt_key);
|
[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
|
|
|
document.getElementById('submit_preview').submit ();"/><?php
|
2012-12-07 20:41:43 +00:00
|
|
|
}
|
2013-01-02 23:03:32 +01:00
|
|
|
echo '</td></tr></table></fieldset></form></div>';
|
[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-01-02 23:03:32 +01:00
|
|
|
exit;
|
[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 {
|
|
|
|
if ($link['key'] == md5($_POST['key'])) {
|
2013-07-24 14:46:39 +02:00
|
|
|
$password_challenged = true;
|
[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 {
|
|
|
|
sleep(2);
|
|
|
|
require(JIRAFEAU_ROOT.'lib/template/header.php');
|
2018-02-08 23:16:23 +01:00
|
|
|
echo '<div class="error"><p>' . t('ACCESS_KO') .
|
2012-12-31 01:22:14 +01:00
|
|
|
'</p></div>';
|
[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');
|
2012-12-07 20:41:43 +00:00
|
|
|
exit;
|
|
|
|
}
|
2012-12-05 17:29:38 +00:00
|
|
|
}
|
2013-01-02 23:03:32 +01:00
|
|
|
}
|
2012-12-05 17:29:38 +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
|
|
|
if (!$password_challenged && !$do_download && !$do_preview) {
|
|
|
|
require(JIRAFEAU_ROOT.'lib/template/header.php');
|
|
|
|
echo '<div>' .
|
2017-07-09 13:55:46 +02:00
|
|
|
'<form action="f.php" method="post" id="submit_post" class="form download">'; ?>
|
2013-01-02 23:03:32 +01:00
|
|
|
<input type = "hidden" name = "jirafeau" value = "<?php echo JIRAFEAU_VERSION ?>"/><?php
|
2018-04-30 19:23:45 +02:00
|
|
|
echo '<fieldset><legend>' . jirafeau_escape($link['file_name']) . '</legend><table>' .
|
2013-01-03 01:08:54 +01:00
|
|
|
'<tr><td>' .
|
2018-04-30 19:23:45 +02:00
|
|
|
t('NOW_DOWNLOADING') . ' "' . jirafeau_escape($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ').' .
|
2013-01-03 01:08:54 +01:00
|
|
|
'</td></tr>' .
|
|
|
|
'<tr><td>' .
|
2019-11-12 00:25:04 +01:00
|
|
|
t('USING_SERVICE'). ' <a href="tos.php" target="_blank" rel="noopener noreferrer">' . t('TOS') . '</a>.' .
|
2015-04-06 17:13:33 +02:00
|
|
|
'</td></tr>';
|
|
|
|
|
[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 ($link['onetime'] == 'O') {
|
|
|
|
echo '<tr><td id="self_destruct">' .
|
2018-02-08 23:16:23 +01:00
|
|
|
t('AUTO_DESTRUCT') .
|
2015-04-06 17:13:33 +02:00
|
|
|
'</td></tr>';
|
[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
|
|
|
} ?>
|
2018-02-08 23:16:23 +01:00
|
|
|
<tr><td><input type="submit" id = "submit_download" value="<?php echo t('DL'); ?>"
|
2017-01-18 19:41:14 +01:00
|
|
|
onclick="document.getElementById('submit_post').action='<?php
|
2017-07-09 13:55:46 +02:00
|
|
|
echo 'f.php?h=' . $link_name . '&d=1';
|
[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 (!empty($crypt_key)) {
|
|
|
|
echo '&k=' . urlencode($crypt_key);
|
|
|
|
} ?>';
|
2015-03-23 13:48:52 +01:00
|
|
|
document.getElementById('submit_post').submit ();"/><?php
|
2012-12-31 01:22: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
|
|
|
if ($cfg['preview'] && jirafeau_is_viewable($link['mime_type'])) {
|
2018-02-08 23:16:23 +01:00
|
|
|
?><input type="submit" id = "submit_preview" value="<?php echo t('PREVIEW'); ?>"
|
2017-01-18 19:41:14 +01:00
|
|
|
onclick="document.getElementById('submit_post').action='<?php
|
2017-07-09 13:55:46 +02:00
|
|
|
echo 'f.php?h=' . $link_name . '&p=1';
|
[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 (!empty($crypt_key)) {
|
|
|
|
echo '&k=' . urlencode($crypt_key);
|
|
|
|
} ?>';
|
2015-03-23 13:48:52 +01:00
|
|
|
document.getElementById('submit_post').submit ();"/><?php
|
2013-01-02 23:03:32 +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
|
|
|
echo '</td></tr>';
|
|
|
|
echo '</table></fieldset></form></div>';
|
|
|
|
require(JIRAFEAU_ROOT.'lib/template/footer.php');
|
|
|
|
exit;
|
2012-12-07 20:41:43 +00:00
|
|
|
}
|
2013-01-02 23:03:32 +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
|
|
|
header('HTTP/1.0 200 OK');
|
|
|
|
header('Content-Length: ' . $link['file_size']);
|
|
|
|
if (!jirafeau_is_viewable($link['mime_type']) || !$cfg['preview'] || $do_download) {
|
|
|
|
header('Content-Disposition: attachment; filename="' . $link['file_name'] . '"');
|
|
|
|
} else {
|
|
|
|
header('Content-Disposition: filename="' . $link['file_name'] . '"');
|
|
|
|
}
|
|
|
|
header('Content-Type: ' . $link['mime_type']);
|
2019-12-04 21:33:01 +01:00
|
|
|
if ($cfg['file_hash'] == "md5") {
|
|
|
|
header('Content-MD5: ' . hex_to_base64($link['hash']));
|
|
|
|
}
|
2020-02-25 22:42:40 +01:00
|
|
|
if ($cfg['litespeed_workaround']) {
|
|
|
|
// Work around that LiteSpeed truncates large files.
|
|
|
|
// See https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:config:internal-redirect
|
|
|
|
if ($_GET['litespeed_workaround'] == 'phase2') {
|
|
|
|
$file_web_path = preg_replace('#^' . $_SERVER['DOCUMENT_ROOT'] . '#', '', VAR_FILES);
|
|
|
|
header('X-LiteSpeed-Location: ' . $file_web_path . $p . $link['hash']);
|
|
|
|
} else {
|
|
|
|
// Since Content-Type isn't forwarded by LiteSpeed, first
|
|
|
|
// redirect to the same URL but append the file name.
|
|
|
|
header('Location: ' . $_SERVER['PHP_SELF'] . '/' . $link['file_name'] . '?' .
|
|
|
|
$_SERVER['QUERY_STRING'] . '&litespeed_workaround=phase2');
|
|
|
|
}
|
|
|
|
}
|
2013-07-24 14:46:39 +02:00
|
|
|
/* Read encrypted file. */
|
2020-12-05 13:43:22 +01:00
|
|
|
elseif ($link['crypted']) {
|
2013-07-24 14:46:39 +02:00
|
|
|
/* Init module */
|
|
|
|
$m = mcrypt_module_open('rijndael-256', '', 'ofb', '');
|
2013-07-26 15:45:54 +00:00
|
|
|
/* Extract key and iv. */
|
2019-12-04 21:33:01 +01:00
|
|
|
$hash_key = md5($crypt_key);
|
|
|
|
$iv = jirafeau_crypt_create_iv($hash_key, mcrypt_enc_get_iv_size($m));
|
2013-07-26 15:45:54 +00:00
|
|
|
/* Init module. */
|
2019-12-04 21:33:01 +01:00
|
|
|
mcrypt_generic_init($m, $hash_key, $iv);
|
2013-07-24 14:46:39 +02:00
|
|
|
/* Decrypt file. */
|
2019-12-04 21:33:01 +01:00
|
|
|
$r = fopen(VAR_FILES . $p . $link['hash'], 'r');
|
[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
|
|
|
while (!feof($r)) {
|
|
|
|
$dec = mdecrypt_generic($m, fread($r, 1024));
|
2013-07-24 14:46:39 +02:00
|
|
|
print $dec;
|
|
|
|
}
|
[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
|
|
|
fclose($r);
|
2013-07-24 14:46:39 +02:00
|
|
|
/* Cleanup. */
|
|
|
|
mcrypt_generic_deinit($m);
|
|
|
|
mcrypt_module_close($m);
|
|
|
|
}
|
|
|
|
/* Read file. */
|
[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 {
|
2019-12-04 21:33:01 +01:00
|
|
|
$r = fopen(VAR_FILES . $p . $link['hash'], 'r');
|
[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
|
|
|
while (!feof($r)) {
|
|
|
|
print fread($r, 1024);
|
2013-07-24 14:46:39 +02: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
|
|
|
fclose($r);
|
2012-12-05 17:29:38 +00:00
|
|
|
}
|
2013-01-02 23:03:32 +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
|
|
|
if ($link['onetime'] == 'O') {
|
|
|
|
jirafeau_delete_link($link_name);
|
|
|
|
}
|
2013-01-02 23:03:32 +01:00
|
|
|
exit;
|
2012-12-05 17:29:38 +00:00
|
|
|
|
|
|
|
?>
|