<?
header('Content-type: text/xml');
echo "<?xml version=\"1.0\" encoding=\"windows-1251\"?>";
echo "<rss version='2.0' xmlns:dc='http://purl.org/dc/elements/1.1/'>";
echo "<channel>";

echo "<title>jobnk.Ru/news - ������� ������������ � ����������� �������.</title>";
echo "<link>http://www.jobnk.ru</link>";
echo "<description>jobnk.Ru</description>";
$stop_compress=true;
require($_SERVER["DOCUMENT_ROOT"]."/engine/setup.php");



	
	

$time_start=time()-3600*24*10;

	$qry_main=mysql_query("SELECT * FROM `".$table_news."` WHERE `time`>='".$time_start."' ORDER BY `time` DESC");
		while ($row=mysql_fetch_array($qry_main)) {
			$id=$row['id'];
			$date=$row['time'];
			$title=$row['txt_name'];
			$pretext=$row['txt_pre'];
			
			$title=str_replace("'","&apos;",$title);
			$title=str_replace('"','&quot;',$title);
			$title=str_replace("&","&amp;",$title);
			$title=str_replace(">","&gt;",$title);
			$title=str_replace("<","&lt;",$title);
			
			$pretext=str_replace("'","&apos;",$pretext);
			$pretext=str_replace('"','&quot;',$pretext);
			$pretext=str_replace("&","&amp;",$pretext);
			$pretext=str_replace(">","&gt;",$pretext);
			$pretext=str_replace("<","&lt;",$pretext);

			echo "<item>";
			echo "<guid isPermaLink='true'>http://www.jobnk.ru/news/".$id."</guid>";
			echo "<author>andrey@doronchenko.ru</author>";
			echo "<pubDate>".date("r",$date)."</pubDate>";
			echo "<link>www.jobnk.ru/news/".$id."</link>";
			echo "<description>".stripslashes($pretext)."</description>";
			echo "<title>".stripslashes($title)."</title>";
			echo "</item>";
		}


echo "</channel>";
echo "</rss>";

?>