X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/261af8ac3be2c4d9fbdae0f25c036440833d746c..752f34d41b53e1eb6559c19fcef87e5b85e578c1:/lib/functions.php diff --git a/lib/functions.php b/lib/functions.php index 83fdaf1..d454011 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -613,21 +613,28 @@ jirafeau_admin_list ($name, $file_hash, $link_hash) /* Print link informations. */ echo ''; echo '' . - '
' . - '' . - '' . - '' . - '
'; + '' . htmlspecialchars($l['file_name']) . ''; echo ''; echo '' . $l['mime_type'] . ''; echo '' . jirafeau_human_size ($l['file_size']) . ''; echo '' . ($l['time'] == -1 ? '' : strftime ('%c', $l['time'])) . ''; - echo '' . $l['onetime'] . ''; + echo ''; + if ($l['onetime'] == 'O') + echo 'Y'; + else + echo 'N'; + echo ''; echo '' . strftime ('%c', $l['upload_date']) . ''; echo '' . $l['ip'] . ''; echo '' . '
' . + '' . + '' . + '' . + '
' . + '
' . '' . '' . '' . @@ -1121,6 +1128,8 @@ get_ip_list_http_forwarded() 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)); } @@ -1130,7 +1139,10 @@ get_ip_list_http_forwarded() 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)); } }