<? header('Content-type: text/xml'); ?>
<?php echo "<"."?"."xml version="."\"1.0\""." encoding="."\"ISO-8859-1\""."?".">"; ?>

<rss version="2.0">
<channel>
<title>TennCare Advocacy Program: Resources and Information</title>
<link>http://www.tenncareadvocacy.org/</link>
<description>The TennCare Advocacy Program works for TennCare enrollees, or those eligible for TennCare, who are experiencing difficulty accessing necessary medical care</description>
<language>en-us</language>
<image>
<title>TennCare Advocacy Program</title>
<width>88</width>
<height>30</height>
<link>http://www.tenncareadvocacy.org/</link>
<url>http://www.tenncareadvocacy.org/images/taprss.gif</url>
</image>
<copyright>Copyright <? echo date("Y"); ?> TennCareAdvocacy.org</copyright>
<?php
include("db.php");
$getlastdate=mysql_query("SELECT UNIX_TIMESTAMP(added) pubdate FROM taplinks ORDER BY DATE_FORMAT(added, '%Y%m%d') DESC,id DESC LIMIT 1",$conn);
$lastdate=mysql_fetch_array($getlastdate);
$getnewresources=mysql_query("SELECT id,type,category,linktext,links,description,UNIX_TIMESTAMP(added) pubdate FROM taplinks  ORDER BY DATE_FORMAT(added, '%Y%m%d') DESC,id DESC LIMIT 10",$conn);
while($newresources=mysql_fetch_array($getnewresources)) {
$newresources["links"]=str_replace(' ','%20',$newresources["links"]);
?>
  <item>
  <title><?php echo htmlentities($newresources["linktext"],ENT_QUOTES); ?></title>
  <description>&lt;table border=0 cellpadding=3 cellspacing=0&gt;&lt;tr&gt;&lt;td&gt;<?php echo htmlentities($newresources["linktext"],ENT_QUOTES); ?>&lt;br&gt;<?php echo htmlentities($newresources["description"],ENT_QUOTES); ?>&lt;/td&gt;&lt;td&gt;<?php if(substr($newresources["links"],-3,3)=="pdf") { ?>&lt;img src=http://www.tenncareadvocacy.org/images/PDF_icon_sm.gif title=PDF align=right&gt;<? } ?>&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</description>
  <link><?php if(substr($newresources["links"],0,4)=="http") { echo $newresources["links"]; } else { echo "http://www.tenncareadvocacy.org/".$newresources["links"]; } ?></link> 
  <pubDate><?php echo strftime("%a, %d %b %Y %T %Z",$newresources['pubdate']); ?></pubDate>
  </item>
<? } ?>
  <item>
  <title>See More New Resources and Information</title>
  <description>See link for further details</description>
  <link>http://www.tenncareadvocacy.org/resources/helpful_links.php?id=3_9</link> 
  <pubDate><?php echo strftime("%a, %d %b %Y %T %Z",$lastdate['pubdate']); ?></pubDate>
  </item>
</channel>
</rss>