<?php
/*
newsfeedDigest.php
auth: Thomas Scherz @ University of Cincinnati
date: March 5, 2008
desc: Parse blog news feed into page, resembes Facebook through CSS.
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<link rel="stylesheet" type="text/css" href="newsstyle.css" />

</head>
<body>

	<div id="news">
		<div id="whatsnew">
			<ul>
			<li id="whatsnew_head"><h2>Library News Headlines</h2></li>
			<li class="rss_feed">
				<ul class="rss_items">				
				<?php 
					//RSS READER
					require_once 'magpierss/rss_fetch.inc';
					
					//Change the location of your RSS FEED HERE.
					$url = "http://olc7.ohiolink.edu/whatsnew/index.xml";
					$rss = fetch_rss($url);
					$num_items = 5;
					$items = array_slice($rss->items, 0, $num_items);
				
					foreach ($items as $item ) {
						$title = $item[title];
						$url   = $item[link];
						echo '<li class="rss_item"><a href=' . $url . ' target="_blank">'.$title.'</a></li>';
					}
				?>
				</ul>
			</li>
			<li id="whatsnew_footer"></li>
		</ul>
		</div>
	</div>
</body>
</html>