<?php
$url = 'http://news.ameba.jp/index.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 = 'Dodgerblue';
}
?>
<table class="index_side_table" style="border-color: <?= $side_border_color ?>; border-width: <?= index_BOX_BORDER_WIDTH ?>; background-color: Dodgerblue;">
<tr><th><a href="http://news.ameba.jp/" target="_blank">アメーバ News</a></th></tr>
<tr><td class="index_rss_article">
<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>
