X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/d496172554ae4ab0dac6e9d7a1e77eb8fd3749df..6c475b4ff725d463a721c0727d4886f3ae278ca1:/f.php diff --git a/f.php b/f.php index fbf466a..59717b9 100644 --- a/f.php +++ b/f.php @@ -135,17 +135,24 @@ if (!empty ($link['key'])) '</td></tr>' . '<tr><td>' . t('By using our services, you accept our'). ' <a href="' . $cfg['web_root'] . '/tos.php' . '">' . t('Term Of Service') . '</a>' . - '</td></tr>' . - '<tr><td>'; - ?><input type="submit" id = "submit_download" value="<?php echo t('Download'); ?>" - onclick="document.getElementById('submit_post').action=' + '</td></tr>'; + + if ($link['onetime'] == 'O') + { + echo '<tr><td id="self_destruct">' . + t('Warning, this file will self-destruct after being read') . + '</td></tr>'; + } + + ?><tr><td><input type="submit" id = "submit_download" value="<?php echo t('Download'); ?>" + onclick="document.getElementById('submit_post').action=' <?php echo $cfg['web_root'] . '/f.php?h=' . $link_name . '&d=1'; if (!empty($crypt_key)) echo '&k=' . urlencode($crypt_key); ?>'; document.getElementById('submit_download').submit ();"/><?php - if ($cfg['download_page'] && $cfg['preview'] && jirafeau_is_viewable($link['mime_type'])) + if ($cfg['preview'] && jirafeau_is_viewable($link['mime_type'])) { ?><input type="submit" id = "submit_preview" value="<?php echo t('Preview'); ?>" onclick="document.getElementById('submit_post').action=' @@ -175,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 '<div>' . @@ -189,9 +196,19 @@ 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']) . ')' . '</td></tr>' . '<tr><td>' . - t('By using our services, you accept our'). ' <a href="' . $cfg['web_root'] . '/tos.php' . '">' . t('Term Of Service') . '</a>'; - ?></td></tr><tr><td><input type="submit" id = "submit_download" value="<?php echo t('Download'); ?>" - onclick="document.getElementById('submit_post').action=' + t('By using our services, you accept our'). ' <a href="' . $cfg['web_root'] . '/tos.php' . '">' . t('Term Of Service') . '</a>' . + '</td></tr>'; + + if ($link['onetime'] == 'O') + { + echo '<tr><td id="self_destruct">' . + t('Warning, this file will self-destruct after being read') . + '</td></tr>'; + } + + ?> + <tr><td><input type="submit" id = "submit_download" value="<?php echo t('Download'); ?>" + onclick="document.getElementById('submit_post').action=' <?php echo $cfg['web_root'] . '/f.php?h=' . $link_name . '&d=1'; if (!empty($crypt_key)) @@ -199,7 +216,7 @@ if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_prev ?>'; document.getElementById('submit_post').submit ();"/><?php - if ($cfg['download_page'] && $cfg['preview'] && jirafeau_is_viewable($link['mime_type'])) + if ($cfg['preview'] && jirafeau_is_viewable($link['mime_type'])) { ?><input type="submit" id = "submit_preview" value="<?php echo t('Preview'); ?>" onclick="document.getElementById('submit_post').action='