<?php
require_once(LIB.'Post.class.php');
$post = new Post();

$urls = $post->getHotUrl();

$title = '話題のURL';
$box = get_show_boxes(__FILE__);
$css_links = array('url.css');
$script = <<<EOD
	$(function() {
		T.initRead(true);
	});
EOD;
include LAYOUTS.'header.inc.php';
include LAYOUTS.'control.inc.php';
?>
<div id="content-container" class="container ui-widget">
	<div class="box controller ui-widget-content ui-corner-all">
<?php
if (! empty($urls)) {
	echo '<ul class="url-list">';
	foreach ($urls as $k => $v) {
		echo '<li>';
		echo '<a href="'.BASE_URL.'url/'.rawurlencode(rawurlencode($v['url'])).'" class="name url-title">'.h(empty($v['title']) ? $v['url'] : $v['title']).'</a><br/>';
		echo '<a href="'.$v['url'].'" class="name">'.h($v['url']).'</a><br/>';
		echo '勢い: '.$v['rcnt'].', 言及数: '.$v['cnt'];
		echo '</li>';
	}
	echo '</ul>';
} else {
	echo '<div style="margin:1em">現在特にURLは話題になっていないようです。</div>';
}
?>
	</div>
</div>
<?php
include LAYOUTS.'footer.inc.php';
?>