01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
function plugin_referer_convert() {
global $script,$vars;
$args = func_get_args();
$num = is_numeric($args[0]) ? $args[0] : 0;
$page = (is_null($args[1]) || empty($args[1])) ? $vars['page'] : $args[1];
$r_page = rawurlencode($page);
$file = TRACKBACK_DIR.md5(rawurlencode($page)).".ref";
$data = tb_get($file);
usort($data, 'referer_sort_by_Counter_d'); // 2d カウンタ(大きい順)
$result = "<div class=\"referer\">リンク元 |";
$i = 0;
foreach ($data as $x) {
if ($num != 0 && $num == $i) {
$result .= " <a href=\"$script?plugin=referer&page=$r_page\">...</a>";
break;
}
$count = htmlspecialchars($x[2]);
$url = htmlspecialchars(rawurldecode($x[3])); // URL
$result .= "<a href=\"$url\">$count</a>|";
$i++;
}
$result .= "</div>\n";
return $result;
}
.;C:\Program Files\JavaSoft\JRE\1.3\lib\rt.jar