Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "../../libs/common.php";
- include "../../libs/db.php";
- include "../../libs/items.php";
- include "../../libs/stats.php";
- include "../../libs/roles.php";
- include "$baseDir/config/config.php";
- InitModules();
- $db = new Database($dbhost, $dbuser, $dbpass, $dbname);
- header ("content-type: text/xml; charset=UTF-8");
- ?>
- <rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">
- <atom:link href="http://<?php echo $_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"]; ?>" rel="self" type="application/rss+xml"/>
- <language>en-us</language>
- <channel>
- <title><?php echo $gameName; ?> Rss Feed</title>
- <description>Latest and greatest news from <?php echo $gameName; ?></description>
- <sy:updatePeriod>hourly</sy:updatePeriod>
- <sy:updateFrequency>1</sy:updateFrequency>
- <?php
- $result = $db->Execute("select id, time, title, text, creator from gameupdates order by id desc");
- foreach ($result as $row) :
- $n = $db->LoadData("select username from users where id = ?", $row["creator"]);
- //$text = str_replace(
- // array("[b]","[/b]","[i]","[/i]","[u]","[/u]","[ul]","[/ul]","[li]","[/li]","[ol]","[/ol]","[/li]\n"),
- // array("<b>","</b>","<em>","</em>","<span style=\"text-decoration: underline;\">","</span>","<ul>","</ul>","<li>","</li>","<ol>","</ol>","</li>"),
- // $row["text"]);
- ?>
- <item>
- <guid isPermaLink="false"> <?php echo $row["id"]; ?></guid>
- <pubDate><?php echo FormatShortDate($row["time"]); ?></pubDate>
- <dc:creator><![CDATA[ <?php echo $n["username"]; ?> ]]></dc:creator>
- <subject><![CDATA[ <?php echo $row["title"]; ?> ]]></subject>
- <description>
- <![CDATA[ <?php echo PrettyMessage ($row["text"]); ?> ]]>
- </description>
- </item>
- <?php endforeach; ?>
- <copyright><![CDATA[ © of <?php echo $gameName. date(" Y"); ?> ]]></copyright>
- </channel>
- </rss>
Advertisement
Add Comment
Please, Sign In to add comment