X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/a046e3b04175367c1afadd306513414fa61ba3fd..a37a6ed33d07882e4259a6cd2a570893b0057bbf:/lib/functions.php?ds=inline diff --git a/lib/functions.php b/lib/functions.php index 83d7a2d..f70e0de 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -744,7 +744,7 @@ function jirafeau_get_link($hash) } /** - * List files ii folder in admin interface. + * List files in admin interface. */ function jirafeau_admin_list($name, $file_hash, $link_hash) { @@ -780,25 +780,39 @@ function jirafeau_admin_list($name, $file_hash, $link_hash) } /* Print link information. */ echo ''; - echo '' . - '' . jirafeau_escape($l['file_name']) . '
'; + echo ''; + + if (!$l['crypted'] && !$l['crypted_legacy']) { + echo'' . jirafeau_escape($l['file_name']) . ''; + } + else { + echo jirafeau_escape($l['file_name']); + } + + echo '
'; + echo t('TYPE') . ': ' . jirafeau_escape($l['mime_type']) . '
'; echo t('SIZE') . ': ' . jirafeau_human_size($l['file_size']) . '
'; echo t('EXPIRE') . ': ' . ($l['time'] == -1 ? '∞' : jirafeau_get_datetimefield($l['time'])) . '
'; - echo t('ONETIME') . ': ' . ($l['onetime'] == 'O' ? 'Yes' : 'No') . '
'; + echo t('ONETIME') . ': ' . ($l['onetime'] == 'O' ? t('YES') : t('NO')) . '
'; + echo t('ENCRYPTED') . ': ' . (($l['crypted'] || $l['crypted_legacy']) ? t('YES') : t('NO')) . '
'; echo t('UPLOAD_DATE') . ': ' . jirafeau_get_datetimefield($l['upload_date']) . '
'; if (strlen($l['ip']) > 0) { echo t('ORIGIN') . ': ' . $l['ip'] . '
'; } echo ''; + + if (!$l['crypted'] && !$l['crypted_legacy']) { + echo '
' . + '' . + '' . + jirafeau_admin_csrf_field() . + '' . + '
'; + } + echo '
' . - '' . - '' . - jirafeau_admin_csrf_field() . - '' . - '
' . - '
' . '' . '' . jirafeau_admin_csrf_field() .