<?php header('Content-type: text/xml');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?> "; 
require_once('Connections/cnLocalDirJamm.php'); 
include('includes/_functions.php');
include('site_content/_sitevars.php');
mysql_select_db($database_cnLocalDirJamm, $cnLocalDirJamm);
$query_rsRecent50 = "SELECT UID, Title, `Desc`, dateadded FROM links WHERE Approved = '1' ORDER BY UID DESC LIMIT 20";
$rsRecent50 = mysql_query($query_rsRecent50, $cnLocalDirJamm) or die(mysql_error());
$row_rsRecent50 = mysql_fetch_assoc($rsRecent50);
$totalRows_rsRecent50 = mysql_num_rows($rsRecent50);
$TTT = strtotime("now");     // get current time 
$rssdate = strftime("%a, %d %b %Y %H:%M:%S %z",$TTT);  // format time 
?>
<rss version="2.0">
<channel> 
<title><? echo $WEBSITE_NAME; ?> New Additions</title> 
<link><?php echo $RootURL; ?></link> 
<description>New website additions to <?php echo $WEBSITE_NAME_COM; ?> where you can market and promote your <?php echo $WEBSITE_CATEGORY; ?> site online</description> 
<pubDate><? echo $rssdate; ?></pubDate> 
<language>en</language> 
<copyright>2007 <?php echo $WEBSITE_CATEGORY; ?> directory</copyright> 
<?php do 
{ 
$PageURL = $RootURL . $PAGE_NAME_HTACCESS . $row_rsRecent50['UID'] . ".htm"; 
$PageTitle = $row_rsRecent50['Title']; 
$PageTitle = ereg_replace("[^[:space:]a-zA-Z0-9*_.-]", "", $PageTitle);
$PageDescNew = $WEBSITE_NAME . " new addition featuring ";
$PageDesc = "";
$PageDesc = $row_rsRecent50['Desc']; 
$PageDesc = ShortenText($PageDesc);
$PageDesc = ereg_replace("[^[:space:]a-zA-Z0-9*_.-]", "", $PageDesc);

$PageDescShow = $PageDescNew . $PageDesc;
$PageDate = $row_rsRecent50['dateadded']; 
?>
<item> 
<title><? echo $PageTitle; ?></title>
<link><? echo $PageURL; ?></link>
<pubDate><? echo $PageDate; ?></pubDate>
<description><? echo $PageDescShow; ?></description>
</item> 
<?php 
$PageDescShow = "";
} while ($row_rsRecent50 = mysql_fetch_assoc($rsRecent50)); 
mysql_free_result($rsRecent50);
?>
</channel>
</rss>
