Location: PHPKode > projects > MonkeyChow > monkeychow/aggregator.php
<?php
/*
 * This file is part of Monkeychow - http://monkeychow.org
 *
 * aggregator.php - aggregated viewer
 *
 *
 * Copyright (C) 2006 Ernie Oporto
 * hide@address.com - http://www.shokk.com/blog/
 * 
 * Copyright (C) 2004 Stephen Minutillo
 * hide@address.com - http://minutillo.com/steve/
 *
 * Distributed under the GPL - see LICENSE
 *
 */

include_once("init.php");
header("Content-Type: text/html; charset=utf-8");

if(!isset($_REQUEST['which']))
{
        $which = 0;
}
else
{
        $which = htmlspecialchars($_REQUEST['which']);
}

if(is_null(htmlspecialchars($_REQUEST['howmany']) ))
{
        $howmany=50;
}
else
{
        $howmany=htmlspecialchars($_REQUEST['howmany']);
}

$order = 'desc';

$title = "My Aggregated Feeds by";

?>
<!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>
		<title><?php echo _("$title") ?> MonkeyChow</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" href="fof-common.css" media="all" />
		<script src="fof.js" type="text/javascript"></script>
        <script src="behindthescenes.js"></script>
		<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
	</head>
<body onload="parent.menu.location.reload();">

<p><?php echo _("$title") ?> <a href="http://www.monkeychow.org">MonkeyChow</a> </p>

<div id="items">


		<form name="items" action="view-action.php" method="post">
		<input type="hidden" name="action" id="action" />
		<input type="hidden" name="return" id="return" />

<?php

        $result = fof_get_items(htmlspecialchars(''), 'public', htmlspecialchars(''), $which, $howmany, $order, htmlspecialchars(''));
        $links = fof_get_nav_links(htmlspecialchars(''), 'public', htmlspecialchars(''), $which, $howmany);

        if($links)
        {
		$links=str_replace("view","aggregator",$links);
?>
                <div class="nav"><?php echo $links ?></div>

<?php
        }
foreach($result as $row)
{
	$items = true;

	$feed_link = htmlspecialchars($row['feed_link']);
	$feed_title = htmlspecialchars($row['feed_title']);
	$feed_description = htmlspecialchars($row['feed_description']);
	$item_id = $row['item_id'];
	$item_link = htmlspecialchars($row['item_link']);
	$item_title = htmlspecialchars($row['item_title']);
	$item_content = $row['item_content'];
	$item_read = $row['item_read'];
	$item_publish = $row['item_publish'];
	$item_star = $row['item_star'];
	$timestamp =  date("F j, Y, g:i a", $row['timestamp'] - (FOF_TIME_OFFSET * 60 * 60));
	$dccreator = $row['dccreator'];
	$dcdate = $row['dcdate'];
	$dcsubject = $row['dcsubject'];

	print "\n".'<div class="item">';
	print '<div class="headeragg">';

        print "<a href=\"$item_link\" rel=\"nofollow\">$item_title</a><br />";
        print "<a href=\"$feed_link\" title=\"$feed_description\" rel=\"nofollow\">$feed_title</a><br /><br />";
        print "<tr bgcolor=\"#dddddd\">";

	if($dccreator)
	{
		print "by $dccreator ";
	}

	if($dcsubject)
	{
		print "on $dcsubject ";
	}

	if($dcdate)
	{
				#$dcdate = date("F j, Y, g:i a", parse_w3cdtf($dcdate) + $asec - (FOF_TIME_OFFSET * 60 * 60));

		print "at $dcdate ";
	}
	print "(cached at $timestamp)";

    if( function_exists( 'tidy_parse_string' ) ) 
    {
			tidy_parse_string($item_content);
			tidy_setopt('output-xhtml', TRUE);
			tidy_setopt('indent', TRUE);
			tidy_setopt('indent-spaces', 2);
			tidy_setopt('wrap', 200);
			tidy_setopt('show-body-only', TRUE);
			tidy_clean_repair();
			$item_content = tidy_get_output();
	}

	print "</tr></div><div class=\"bodyagg\">$item_content</div><div class=\"clearer\"></div></div>";
}

if(!$items)
{
echo "<p>" . _("No items found") . ".</p>";
}

?>
		</form>
<?php
	if($links)
	{
?>
		<center><?php echo $links ?></center>

<?php
	}
?>





</div>
<script type="text/javascript" src="http://del.icio.us/js/playtagger"></script>
</body>

</html>
Return current item: MonkeyChow