<?xml version="1.0" encoding="iso-8859-1"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Sandwich Selector</title>
  <subtitle>Reviews of pre-packaged sandwiches</subtitle>
  <link rel="alternate" type="text/html"
        href="http://www.fatsquirrel.org/sandwichselector/"/>
  <id>tag:fatsquirrel.org,2026-06-09:/bologs/veghead/</id>
  <rights>Copyright 2001-2005, Veghead</rights>
  <updated>2026-06-09T02:25:59Z</updated>
  <link rel="self" href="/sandwichselector/atom.php" />
  <icon>http://www.fatsquirrel.org/sandwichselector/favicon.ico</icon>
  <author>
    <name>Veghead</name>
    <uri>http://www.fatsquirrel.org/</uri>
  </author>

<?
$maxcount=20;

$dbh = mysql_pconnect($dbserver,$dbuser,$dbpass);
if (!$dbh) {
	exit(0);
}

mysql_select_db($dbname,$dbh);

$query="select * from sandwich where sa_flags&1=1 order by sa_timestamp desc limit $maxcount";

$result=mysql_query($query);
$returned=mysql_num_rows($result);

if ($returned>0) {
	while(($row=mysql_fetch_array($result)) && ($count<($maxcount+$mincount))) {
		$nicedate=strftime("%Y-%m-%dT%TZ",strtotime($row["sa_timestamp"])); 
		$tagdate=strftime("%Y-%m-%d",strtotime($row["sa_timestamp"])); 
		print("<entry>\n");
                print("<title>".htmlentities($row["sa_name"])."</title>\n");
		print("<updated>$nicedate</updated>\n");
		print("<published>$nicedate</published>\n");
		print("<id>tag:fatsquirrel.org,$tagdate:/sandwichselector/ssid".$row['sa_id']);
		print("</id>\n");
		print("<link rel=\"alternate\" type=\"text/html\" ");
		print("href=\"http://www.fatsquirrel.org/sandwichselector/?vm=");
		print($row['sa_id']."\"/>\n");
		$rant=preg_replace("/\n/m"," ",substr(stripslashes($row['sa_review']),0,200));
		$rant=preg_replace("/<[^>]*\Z/","",$rant);
		$rant=preg_replace("/</","&lt;",$rant);
                print("<summary type=\"html\"><![CDATA[$rant ...]]></summary>\n");
		/*
                //print("<summary type=\"text/html\" mode=\"escaped\">".htmlentities(htmlentities($rant))."...  </summary>\n");
		$rant=$row["rant"];
		$rant=preg_replace("/\\\\/","",$rant);
		*/
		print("</entry>\n");
        }
}

?>
</feed>
