34,7 → 34,7 |
$result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; |
$result .= "<rss version=\"2.0\"\n xmlns:content=\"http://purl.org/rss/1.0/modules/content/\"\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n xmlns:atom=\"http://www.w3.org/2005/Atom\"\n>\n"; |
$result .= "<channel>\n"; |
$result .= "<title>Ant: последние изменения</title>\n"; |
$result .= "<title>".$core->getSetting('codename',$db)." последние изменения</title>\n"; |
$result .= "<link>http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/</link>\n"; |
$result .= "<description>Изменения списка поддерживаемых генератором sources.list дистрибутивов и репозиториев для них.</description>\n"; |
$result .= "<language>ru</language>\n"; |
56,6 → 56,34 |
$result .= "</channel>\n</rss>"; |
break; |
case '1': |
$header = "application/atom+xml"; |
$query =& $db->query("SELECT * FROM changelog ORDER BY log_id DESC LIMIT 1"); |
$query->fetchInto($log, DB_FETCHMODE_ASSOC); |
$lastbuilddate = $log["log_record"]; |
$lastbuilddate = str_replace(" ","T",$lastbuilddate); |
$lastbuilddate .= "+06:00"; |
$result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; |
$result .= "<feed xmlns=\"http://www.w3.org/2005/Atom\">\n"; |
$result .= "<title>".$core->getSetting('codename',$db)." последние изменения</title>\n"; |
$result .= "<link>http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/\" />\n"; |
$result .= "<updated>".$lastbuilddate."</updated>\n"; |
$result .= "<author>\n<name>\n".$core->getSetting('codename',$db)."</name>\n</author>\n"; |
$result .= "<id>urn:http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/</id>\n"; |
$query =& $db->query("SELECT * FROM changelog ORDER BY log_id DESC LIMIT 10"); |
if ($query->numRows()>0) { |
while ($query->fetchInto($log, DB_FETCHMODE_ASSOC)) { |
$result .= "<entry>\n"; |
$result .= "<title type=\"html\">".stripslashes($log["log_title"])."</title>\n"; |
$result .= "<link>http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"]."</link>\n"; |
$result .= "<summary type=\"html\">".stripslashes($log["log_desc"])."</summary>\n"; |
$result .= "<id>urn:uuid:".md5("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"])."</id>\n"; |
$updated = str_replace(" ","T",$log["log_record"]); |
$updated .= "+06:00"; |
$result .= "<updated>".$updated."</updated>\n"; |
$result .= "</entry>\n"; |
} |
} |
$result .= "</feed>"; |
break; |
} |
|