X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/a41981033b2828c7fd38a47f8e6410122137f99a..2236d06bd875c6eec12e64aa083a4076aa0173da:/f.php?ds=sidebyside diff --git a/f.php b/f.php index e1c858e..59717b9 100644 --- a/f.php +++ b/f.php @@ -135,17 +135,24 @@ 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,7 +182,7 @@ 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 '
' . @@ -190,17 +196,27 @@ if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_prev t('You are about to download') . ' "' . $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') . '' . + ''; + + if ($link['onetime'] == 'O') + { + echo '' . + t('Warning, this file will self-destruct after being read') . + ''; + } + + ?> + '; echo '
'; @@ -220,8 +236,9 @@ 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']); /* Read encrypted file. */