X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/379a0267c27b3731c60b7221f8f533aaf418fcae..e91b93baaaa5e4bb1baa2e565c2db4776c211039:/f.php diff --git a/f.php b/f.php index bcf0848..c19232d 100644 --- a/f.php +++ b/f.php @@ -39,7 +39,7 @@ $link_name = $_GET['h']; if (!preg_match('/[0-9a-zA-Z_-]+$/', $link_name)) { require(JIRAFEAU_ROOT.'lib/template/header.php'); - echo '

' . t('Sorry, the requested file is not found') . '

'; + echo '

' . t('FILE_404') . '

'; require(JIRAFEAU_ROOT.'lib/template/footer.php'); exit; } @@ -47,7 +47,7 @@ if (!preg_match('/[0-9a-zA-Z_-]+$/', $link_name)) { $link = jirafeau_get_link($link_name); if (count($link) == 0) { require(JIRAFEAU_ROOT.'lib/template/header.php'); - echo '

' . t('Sorry, the requested file is not found') . + echo '

' . t('FILE_404') . '

'; require(JIRAFEAU_ROOT.'lib/template/footer.php'); exit; @@ -73,21 +73,43 @@ if (isset($_GET['p']) && !empty($_GET['p'])) { $do_preview = true; } -$p = s2p($link['md5']); -if (!file_exists(VAR_FILES . $p . $link['md5'])) { +$p = s2p($link['hash']); +if (!file_exists(VAR_FILES . $p . $link['hash'])) { jirafeau_delete_link($link_name); require(JIRAFEAU_ROOT.'lib/template/header.php'); - echo '

'.t('File not available.'). + echo '

'.t('FILE_NOT_AVAIL'). '

'; require(JIRAFEAU_ROOT.'lib/template/footer.php'); exit; } if (!empty($delete_code) && $delete_code == $link['link_code']) { - jirafeau_delete_link($link_name); require(JIRAFEAU_ROOT.'lib/template/header.php'); - echo '

'.t('File has been deleted.'). - '

'; + if (isset($_POST['do_delete'])) { + jirafeau_delete_link($link_name); + echo '

'.t('FILE_DELETED'). + '

'; + } else { ?> +
+
$link['time']) { jirafeau_delete_link($link_name); require(JIRAFEAU_ROOT.'lib/template/header.php'); echo '

'. - t('The time limit of this file has expired.') . ' ' . - t('File has been deleted.') . + t('FILE_EXPIRED') . ' ' . + t('FILE_DELETED') . '

'; require(JIRAFEAU_ROOT . 'lib/template/footer.php'); exit; @@ -105,7 +127,7 @@ if ($link['time'] != JIRAFEAU_INFINITY && time() > $link['time']) { if (empty($crypt_key) && $link['crypted']) { require(JIRAFEAU_ROOT.'lib/template/header.php'); - echo '

' . t('Sorry, the requested file is not found') . + echo '

' . t('FILE_404') . '

'; require(JIRAFEAU_ROOT.'lib/template/footer.php'); exit; @@ -119,20 +141,20 @@ if (!empty($link['key'])) { '