X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/6550c22fe503f109fc5e30ffee0d8445f51862bc:/pub/index.php..ba6f06965a4d9846e23d99a0e9f74b1361c18c40:/index.php?ds=sidebyside diff --git a/pub/index.php b/index.php similarity index 79% rename from pub/index.php rename to index.php index 80a5230..af1efb4 100644 --- a/pub/index.php +++ b/index.php @@ -1,7 +1,8 @@ + * Copyright (C) 2012 Jerome Jutteau * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,47 +18,47 @@ * along with this program. If not, see . */ -define('JYRAPHE_ROOT', dirname(__FILE__) . '/'); +define('JIRAFEAU_ROOT', dirname(__FILE__) . '/'); define('DEBUG', true); -require(JYRAPHE_ROOT . 'lib/config.php'); -require(JYRAPHE_ROOT . 'lib/settings.php'); -require(JYRAPHE_ROOT . 'lib/functions.php'); +require(JIRAFEAU_ROOT . 'lib/config.php'); +require(JIRAFEAU_ROOT . 'lib/settings.php'); +require(JIRAFEAU_ROOT . 'lib/functions.php'); /* check if the destination dirs are writable */ $writable = is_writable(VAR_FILES) && is_writable(VAR_LINKS) && is_writable(VAR_TRASH); $res = array(); -if($writable && isset($_POST['jyraphe'])) { +if($writable && isset($_POST['jirafeau'])) { $key = $_POST['key']; $time = time(); switch($_POST['time']) { case 'minute': - $time += JYRAPHE_MINUTE; + $time += JIRAFEAU_MINUTE; break; case 'hour': - $time += JYRAPHE_HOUR; + $time += JIRAFEAU_HOUR; break; case 'day': - $time += JYRAPHE_DAY; + $time += JIRAFEAU_DAY; break; case 'week': - $time += JYRAPHE_WEEK; + $time += JIRAFEAU_WEEK; break; case 'month': - $time += JYRAPHE_MONTH; + $time += JIRAFEAU_MONTH; break; default: - $time = JYRAPHE_INFINITY; + $time = JIRAFEAU_INFINITY; break; } - $res = jyraphe_upload($_FILES['file'], isset($_POST['one_time_download']), $key, $time, $cfg); + $res = jirafeau_upload($_FILES['file'], isset($_POST['one_time_download']), $key, $time, $cfg); } -require(JYRAPHE_ROOT . 'lib/template/header.php'); +require(JIRAFEAU_ROOT . 'lib/template/header.php'); /* Checking for errors. */ if(!is_writable(VAR_FILES)) { @@ -73,7 +74,7 @@ if(!is_writable(VAR_TRASH)) { } /* Check if the install.php script is still in the directory. */ -if (file_exists(JYRAPHE_ROOT . 'install.php')) { +if (file_exists(JIRAFEAU_ROOT . 'install.php')) { add_error (_('Installer script still present'), _('Please make sure to delete the installer script "install.php" before continuing.')); } @@ -86,13 +87,13 @@ if(!has_error() && !empty($res)) { if($cfg['rewrite']) { $link .= 'file-' . $res['link']; } else { - $link .= 'file.php?h=' . $res['link']; // h because 'h' looks like a jyraphe ;) + $link .= 'file.php?h=' . $res['link']; // h because 'h' looks like a jirafeau ;) } echo '
' . NL; echo '

' . _('File uploaded! Copy the following URL to get it:') . '
' . NL; echo '' . $link . '' . NL; - if($time != JYRAPHE_INFINITY) { + if($time != JIRAFEAU_INFINITY) { echo '
' . _('This file is valid until the following date:') . '
' . strftime('%c' ,$time) . ''; } @@ -109,11 +110,11 @@ if(!has_error () && $writable) {

-
+

-

+


@@ -139,5 +140,5 @@ if(!has_error () && $writable) {