<?php
header('Content-type: text/xml'); 
echo("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"); ?>
<rss version="2.0">
<channel>
<title>WARN Articles</title>
<link>http://www.elinfonet.com/fedindex/24</link>
<description>Articles discussing issues under the Worker Adjustment Retraining Notification Act.</description>
<lastBuildDate><?php echo date("D, d M Y H:m:s");  ?> EST</lastBuildDate>
<language>en-us</language>


<?php

require("../private/new_connect.php");
$mysql_link = mysql_connect("$hostname", "$username", "$password") or die("<DIV CLASS=text8>We apologize. &nbsp;We are experiencing some technical difficulties connecting to our database server. &nbsp;Please refresh/reload the page or try back later. &nbsp;If the problem continues, please e-mail us at webmaster@elinfonet.com.</DIV>");
mysql_select_db($db1,$mysql_link) or die("<DIV CLASS=text8b>We apologize. &nbsp;The page you are viewing cannot connect to the proper database. &nbsp;Please refresh/reload the page or try back later. &nbsp;If the problem continues, please e-mail us at webmaster@elinfonet.com.</DIV><P>");


  $feditems = mysql_query("

SELECT			ID,
				Title,
				ArtLink,
				Description,
				date_format(Added,'%a, %d %b %Y %T') AS date,
				SiteName
FROM			olr_links,
				sites
WHERE			sites.Partner='1'			AND
				CatCode='24'					AND
				sites.SiteCode=olr_links.SiteCode
ORDER BY		ID DESC, Date DESC LIMIT 10");

if (!$feditems) {
  echo("<P>Error performing query: " .  mysql_error() . "</P>");  exit(); }

while($fRow = mysql_fetch_array($feditems)) {
echo("<item>\n"); 
echo("<title>".$fRow["Title"]."</title>\n" );
echo("<link>http://www.elinfonet.com/newscount.php?popID=".$fRow["ID"]."</link>\n" );
echo("<guid isPermaLink=\"false\">Article: ".$fRow["ID"]."</guid>\n" );
echo("<pubDate>".$fRow["date"]." EST</pubDate>\n" );
echo("<author>webmaster@elinfonet.com (Employment Law Information Network)</author>\n" );
echo("<description>".htmlspecialchars($fRow["Description"])."</description>\n" );
echo("</item>\n" );
}

echo("</channel>\n\n" );
echo("</rss>\n\n" );

?>