include_once("library/config.php");
include_once("library/db.php");
include_once("library/libcore.php");
include_once("library/libcoreDvig.php");
include_once("library/template.class.php");
include_once("map.php");
include_once("library/blocks.php");
global $log_message,$cross_links;
DB_connect();
initLanguage();
$sql = "select * from table_info where name_field='title'";
$title = db_fetch(db_query($sql));
$sql = "select * from table_info where name_field='description'";
$descriprion = db_fetch(db_query($sql));
$sql = "select * from table_info where name_field='email'";
$email = db_fetch(db_query($sql));
$server_http = "http://".$_SERVER['HTTP_HOST'];
// Tue, 10 Jun 2003 04:00:00 GMT
header('Content-type: application/xml');
$out = '
'.$title['value_field'].'
'.$server_http.'
'. $descriprion['value_field'] .'
ru-ru
'.date("D, j M Y G:i:s ").'GMT
'.$server_http.$cfg_static_server.'/images/rss.gif
'.$title['value_field'].'
'.$server_http.'
'.date("D, j M Y G:i:s ").'GMT
http://blogs.law.harvard.edu/tech/rss
Super-Pupper generator RSSow
'.$email['value_field'].'
'.$email['value_field'].'
';
$sql = "select n.*,c.alias,c.cid,c.razdel_name from content c,t_news n where c.razdel_name='news' and c.cid=n.id and c.disable = 0 and n.lang_id='ru' order by c.pos desc limit 10";
$rs = db_query($sql);
while($row = db_fetch($rs)){
if ($row['alias'] <> ""){
$link=$row['alias'];
} else {
$link=$row['id'];
}
if ( fileStaticExist("/content/t_news/".$row['cid']."_sm.jpg")) {
$img = "
";
} else {
$img= "";
}
$out .= " -
". $row['name'] ."
".$server_http."/".$row['razdel_name']."/".$link."
".date("D, j M Y G:i:s ",strtotime($row['dateCreate']))." GMT
".$server_http."/".$row['razdel_name']."/".$link."
";
}
$out .="
";
echo $out;
?>