Редакция 130 | Редакция 135 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 130 | Редакция 134 | ||
---|---|---|---|
Строка 32... | Строка 32... | ||
32 | $query->fetchInto($log, DB_FETCHMODE_ASSOC); |
32 | $query->fetchInto($log, DB_FETCHMODE_ASSOC); |
33 | $lastbuilddate = date("r",strtotime($log["log_record"])); |
33 | $lastbuilddate = date("r",strtotime($log["log_record"])); |
34 | $result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; |
34 | $result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; |
35 | $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"; |
35 | $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"; |
36 | $result .= "<channel>\n"; |
36 | $result .= "<channel>\n"; |
37 | $result .= "<title>Ant: последние изменения</title>\n"; |
37 | $result .= "<title>".$core->getSetting('codename',$db)." последние изменения</title>\n"; |
38 | $result .= "<link>http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/</link>\n"; |
38 | $result .= "<link>http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/</link>\n"; |
39 | $result .= "<description>Изменения списка поддерживаемых генератором sources.list дистрибутивов и репозиториев для них.</description>\n"; |
39 | $result .= "<description>Изменения списка поддерживаемых генератором sources.list дистрибутивов и репозиториев для них.</description>\n"; |
40 | $result .= "<language>ru</language>\n"; |
40 | $result .= "<language>ru</language>\n"; |
41 | $result .= "<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n"; |
41 | $result .= "<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n"; |
42 | $result .= "<lastBuildDate>".$lastbuilddate."</lastBuildDate>\n"; |
42 | $result .= "<lastBuildDate>".$lastbuilddate."</lastBuildDate>\n"; |
Строка 54... | Строка 54... | ||
54 | }
|
54 | }
|
55 | }
|
55 | }
|
56 | $result .= "</channel>\n</rss>"; |
56 | $result .= "</channel>\n</rss>"; |
57 | break; |
57 | break; |
58 | case '1': |
58 | case '1': |
- | 59 | $header = "application/atom+xml"; |
|
- | 60 | $query =& $db->query("SELECT * FROM changelog ORDER BY log_id DESC LIMIT 1"); |
|
- | 61 | $query->fetchInto($log, DB_FETCHMODE_ASSOC); |
|
- | 62 | $lastbuilddate = $log["log_record"]; |
|
- | 63 | $lastbuilddate = str_replace(" ","T",$lastbuilddate); |
|
- | 64 | $lastbuilddate .= "+06:00"; |
|
- | 65 | $result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; |
|
- | 66 | $result .= "<feed xmlns=\"http://www.w3.org/2005/Atom\">\n"; |
|
- | 67 | $result .= "<title>".$core->getSetting('codename',$db)." последние изменения</title>\n"; |
|
- | 68 | $result .= "<link>http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/\" />\n"; |
|
- | 69 | $result .= "<updated>".$lastbuilddate."</updated>\n"; |
|
- | 70 | $result .= "<author>\n<name>\n".$core->getSetting('codename',$db)."</name>\n</author>\n"; |
|
- | 71 | $result .= "<id>urn:http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/</id>\n"; |
|
- | 72 | $query =& $db->query("SELECT * FROM changelog ORDER BY log_id DESC LIMIT 10"); |
|
- | 73 | if ($query->numRows()>0) { |
|
- | 74 | while ($query->fetchInto($log, DB_FETCHMODE_ASSOC)) { |
|
- | 75 | $result .= "<entry>\n"; |
|
- | 76 | $result .= "<title type=\"html\">".stripslashes($log["log_title"])."</title>\n"; |
|
- | 77 | $result .= "<link>http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"]."</link>\n"; |
|
- | 78 | $result .= "<summary type=\"html\">".stripslashes($log["log_desc"])."</summary>\n"; |
|
- | 79 | $result .= "<id>urn:uuid:".md5("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"])."</id>\n"; |
|
- | 80 | $updated = str_replace(" ","T",$log["log_record"]); |
|
- | 81 | $updated .= "+06:00"; |
|
- | 82 | $result .= "<updated>".$updated."</updated>\n"; |
|
- | 83 | $result .= "</entry>\n"; |
|
- | 84 | }
|
|
- | 85 | }
|
|
- | 86 | $result .= "</feed>"; |
|
59 | break; |
87 | break; |
60 | }
|
88 | }
|
61 | 89 | ||
62 | header("Content-type: ".$header."\n\n"); |
90 | header("Content-type: ".$header."\n\n"); |
63 | echo $result; |
91 | echo $result; |