Редакция 140 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 140 | Редакция 209 | ||
---|---|---|---|
Строка 19... | Строка 19... | ||
19 | *
|
19 | *
|
20 | */
|
20 | */
|
21 | 21 | ||
22 | require_once dirname(__FILE__)."/lib/init.php"; |
22 | require_once dirname(__FILE__)."/lib/init.php"; |
23 | 23 | ||
24 | $mode = abs(intval($_GET["atom"])); |
24 | $mode = $secure->wrapInt($_GET["atom"]); |
25 | // RSS 2.0 - $mode = 0
|
25 | // RSS 2.0 - $mode = 0
|
26 | // Atom 1.0 - $mode = 1
|
26 | // Atom 1.0 - $mode = 1
|
27 | 27 | ||
28 | switch($mode) { |
28 | switch($mode) { |
29 | case '0': |
29 | case '0': |
Строка 43... | Строка 43... | ||
43 | $result .= "<atom:link href=\"http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/feed.php\" rel=\"self\" type=\"".$header."\" />\n"; |
43 | $result .= "<atom:link href=\"http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/feed.php\" rel=\"self\" type=\"".$header."\" />\n"; |
44 | $query =& $db->query("SELECT * FROM changelog ORDER BY log_id DESC LIMIT 10"); |
44 | $query =& $db->query("SELECT * FROM changelog ORDER BY log_id DESC LIMIT 10"); |
45 | if ($query->numRows()>0) { |
45 | if ($query->numRows()>0) { |
46 | while ($query->fetchInto($log, DB_FETCHMODE_ASSOC)) { |
46 | while ($query->fetchInto($log, DB_FETCHMODE_ASSOC)) { |
47 | $result .= "<item>\n"; |
47 | $result .= "<item>\n"; |
48 | $result .= "<title>".stripslashes($log["log_title"])."</title>\n"; |
48 | $result .= "<title>".$secure->stripStr($log["log_title"])."</title>\n"; |
49 | $result .= "<link>http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"]."</link>\n"; |
49 | $result .= "<link>http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"]."</link>\n"; |
50 | $result .= "<pubDate>".date("r",strtotime($log["log_record"]))."</pubDate>\n"; |
50 | $result .= "<pubDate>".date("r",strtotime($log["log_record"]))."</pubDate>\n"; |
51 | $result .= "<description><![CDATA[".stripslashes($log["log_desc"])."]]></description>\n"; |
51 | $result .= "<description><![CDATA[".$secure->stripStr($log["log_desc"])."]]></description>\n"; |
52 | $result .= "<guid isPermaLink=\"false\">".md5("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"])."</guid>\n"; |
52 | $result .= "<guid isPermaLink=\"false\">".md5("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"])."</guid>\n"; |
53 | $result .= "</item>\n"; |
53 | $result .= "</item>\n"; |
54 | }
|
54 | }
|
55 | }
|
55 | }
|
56 | $result .= "</channel>\n</rss>"; |
56 | $result .= "</channel>\n</rss>"; |
Строка 72... | Строка 72... | ||
72 | $result .= "<id>urn:uuid:".$core->getUUID("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/")."</id>\n"; |
72 | $result .= "<id>urn:uuid:".$core->getUUID("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/")."</id>\n"; |
73 | $query =& $db->query("SELECT * FROM changelog ORDER BY log_id DESC LIMIT 10"); |
73 | $query =& $db->query("SELECT * FROM changelog ORDER BY log_id DESC LIMIT 10"); |
74 | if ($query->numRows()>0) { |
74 | if ($query->numRows()>0) { |
75 | while ($query->fetchInto($log, DB_FETCHMODE_ASSOC)) { |
75 | while ($query->fetchInto($log, DB_FETCHMODE_ASSOC)) { |
76 | $result .= "<entry>\n"; |
76 | $result .= "<entry>\n"; |
77 | $result .= "<title type=\"html\">".stripslashes($log["log_title"])."</title>\n"; |
77 | $result .= "<title type=\"html\">".$secure->stripStr($log["log_title"])."</title>\n"; |
78 | $result .= "<link href=\"http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"]."\" />\n"; |
78 | $result .= "<link href=\"http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"]."\" />\n"; |
79 | $result .= "<summary type=\"html\"><![CDATA[".stripslashes($log["log_desc"])."]]></summary>\n"; |
79 | $result .= "<summary type=\"html\"><![CDATA[".$secure->stripStr($log["log_desc"])."]]></summary>\n"; |
80 | $result .= "<id>urn:uuid:".$core->getUUID("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"])."</id>\n"; |
80 | $result .= "<id>urn:uuid:".$core->getUUID("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"])."</id>\n"; |
81 | $updated = str_replace(" ","T",$log["log_record"]); |
81 | $updated = str_replace(" ","T",$log["log_record"]); |
82 | $updated .= "+06:00"; |
82 | $updated .= "+06:00"; |
83 | $result .= "<updated>".$updated."</updated>\n"; |
83 | $result .= "<updated>".$updated."</updated>\n"; |
84 | $result .= "</entry>\n"; |
84 | $result .= "</entry>\n"; |