/* Print link informations. */
echo '<tr>';
echo '<td>' .
- '<form action = "admin.php" method = "post">' .
- '<input type = "hidden" name = "action" value = "download"/>' .
- '<input type = "hidden" name = "link" value = "' . $node . '"/>' .
- '<input type = "submit" value = "' . htmlspecialchars($l['file_name']) . '" />' .
- '</form>';
+ '<strong><a id="upload_link" href="/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['onetime'] . '</td>';
+ echo '<td>';
+ if ($l['onetime'] == 'O')
+ echo 'Y';
+ else
+ echo 'N';
+ echo '</td>';
echo '<td>' . strftime ('%c', $l['upload_date']) . '</td>';
echo '<td>' . $l['ip'] . '</td>';
echo '<td>' .
'<form action = "admin.php" 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">' .
'<input type = "hidden" name = "action" value = "delete_link"/>' .
'<input type = "hidden" name = "link" value = "' . $node . '"/>' .
'<input type = "submit" value = "' . t('Del link') . '" />' .
if (!empty ($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$l = explode (',', $_SERVER['HTTP_X_FORWARDED_FOR']);
+ if ($l === FALSE)
+ return array();
foreach ($l as $ip)
array_push ($ip_list, preg_replace ('/\s+/', '', $ip));
}
foreach ($l as $ip)
{
// Separate IP from port
- $ip = explode (':', $ip)[0];
+ $ipa = explode (':', $ip);
+ if ($ipa === FALSE)
+ continue;
+ $ip = $ipa[0];
array_push ($ip_list, preg_replace ('/\s+/', '', $ip));
}
}