X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/e32a48c6f4c05505465ed7fe3ca70cb703868d42..a9e8a86fbd513143fb39af6d7b88f92d5e4eff2b:/f.php diff --git a/f.php b/f.php index 953d20e..75d77d7 100644 --- a/f.php +++ b/f.php @@ -125,7 +125,7 @@ if (!empty ($link['key'])) '
'; ?> + 'method = "post" id = "submit_post">'; ?> ' . '' . t('Password protection') . @@ -135,20 +135,27 @@ if (!empty ($link['key'])) '' . '' . t('By using our services, you accept our'). ' ' . t('Term Of Service') . '' . - '' . - ''; - ?>' . + t('Warning, this file will self-destruct after being read') . + ''; + } + + ?>

' . t('Access denied') . '

'; @@ -176,40 +182,50 @@ if (!empty ($link['key'])) } } -if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_preview) +if (!$password_challenged && !$do_download && !$do_preview) { require (JIRAFEAU_ROOT.'lib/template/header.php'); echo '
' . ''; ?> + 'method = "post" id = "submit_post">'; ?> ' . $link['file_name'] . '' . + echo '
' . htmlspecialchars($link['file_name']) . '
' . '' . ''; + + if ($link['onetime'] == 'O') + { + echo ''; + } + + ?> + '; echo '
' . - t('You are about to download') . ' "' . $link['file_name'] . '" (' . jirafeau_human_size($link['file_size']) . ')' . + t('You are about to download') . ' "' . htmlspecialchars($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ')' . '
' . - t('By using our services, you accept our'). ' ' . t('Term Of Service') . ''; - ?>
' . t('Term Of Service') . '' . + '
' . + t('Warning, this file will self-destruct after being read') . + '
'; @@ -220,9 +236,11 @@ if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_prev 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'] . '"'); + header ('Content-Disposition: attachment; filename="' . $link['file_name'] . '"'); +else + header ('Content-Disposition: filename="' . $link['file_name'] . '"'); header ('Content-Type: ' . $link['mime_type']); +header ('Content-MD5: ' . hex_to_base64($link['md5'])); /* Read encrypted file. */ if ($link['crypted'])