<?php
$url = 'http://www3.nhk.or.jp/rss/news/cat0.xml';
require_once '../rss/magpierss/rss_fetch.inc';
$rss = fetch_rss($url);
if (index_BOX_BORDER_COLOR <> '') {
	$side_border_color = index_BOX_BORDER_COLOR;
} else {
	$side_border_color = 'Royalblue';
}
?>
<table class="index_side_table" style="border-color: <?= $side_border_color ?>; border-width: <?= index_BOX_BORDER_WIDTH ?>; background-color: Royalblue;">
<tr><th><a href="http://www.nhk.or.jp/" target="_blank">NHK News</a></th></tr>
<tr><td class="index_rss_article" style="border-color: Royalblue;">
<ul style="margin:0 0 0 17px; padding:0; list-style:none; list-style-image:url('../rss/icon/044.gif');">
<?
$cnt = 0;
$cntmax = 5;
foreach ($rss->items as $item) {
?>
	<li style="margin: 2px 0 2px 0;"><a href="<?= $item['link'] ?>" target="_blank"><?= $item['title'] ?></a>
	<span style="color: #907070;">(<?= date("y/m/d H:i:s", strtotime((string)$item['pubdate'])) ?>)</span>
	</li>
<?php
	if (++$cnt >= $cntmax) break;
}
?>
</ul>
</td></tr></table>
