return round($o, 1) . $u[$p];
}
+// Convert UTC timestamp to a datetime field
+function jirafeau_get_datetimefield($timestamp)
+{
+ $content = '<span class="datetime" data-datetime="' . strftime('%Y-%m-%d %H:%M', $timestamp) . '">'
+ . strftime('%Y-%m-%d %H:%M', $timestamp) . ' (GMT)</span>';
+ return $content;
+}
+
function jirafeau_clean_rm_link($link)
{
$p = s2p("$link");
/* Print link informations. */
echo '<tr>';
echo '<td>' .
- '<strong><a id="upload_link" href="/f.php?h='. htmlspecialchars($node) .'" title="' .
+ '<strong><a id="upload_link" href="' . JIRAFEAU_ABSPREFIX . 'f.php?h='. htmlspecialchars($node) .'" title="' .
t('Download page') . '">' . htmlspecialchars($l['file_name']) . '</a></strong>';
echo '</td>';
echo '<td>' . $l['mime_type'] . '</td>';
echo '<td>' . jirafeau_human_size($l['file_size']) . '</td>';
- echo '<td>' . ($l['time'] == -1 ? '' : strftime('%c', $l['time'])) .
- '</td>';
+ echo '<td>' . ($l['time'] == -1 ? '∞' : jirafeau_get_datetimefield($l['time'])) . '</td>';
echo '<td>';
if ($l['onetime'] == 'O') {
echo 'Y';
echo 'N';
}
echo '</td>';
- echo '<td>' . strftime('%c', $l['upload_date']) . '</td>';
+ echo '<td>' . jirafeau_get_datetimefield($l['upload_date']) . '</td>';
echo '<td>' . $l['ip'] . '</td>';
echo '<td>' .
- '<form action = "admin.php" method = "post">' .
+ '<form method="post">' .
'<input type = "hidden" name = "action" value = "download"/>' .
'<input type = "hidden" name = "link" value = "' . $node . '"/>' .
'<input type = "submit" value = "' . t('Download') . '" />' .
'</form>' .
- '<form action = "admin.php" method = "post">' .
+ '<form method="post">' .
'<input type = "hidden" name = "action" value = "delete_link"/>' .
'<input type = "hidden" name = "link" value = "' . $node . '"/>' .
'<input type = "submit" value = "' . t('Del link') . '" />' .
'</form>' .
- '<form action = "admin.php" method = "post">' .
+ '<form method="post">' .
'<input type = "hidden" name = "action" value = "delete_file"/>' .
'<input type = "hidden" name = "md5" value = "' . $l['md5'] . '"/>' .
'<input type = "submit" value = "' . t('Del file and links') . '" />' .
if (!jirafeau_has_upload_password($cfg)) {
return false;
}
-
+
foreach ($cfg['upload_password'] as $p) {
if ($password == $p) {
return true;