3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 Revised BSD License for more details.
11 Copyright 2004-2014 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2014 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: rssfeed.php - Last Update: 07/10/2014 SVN 788 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="rssfeed.php"||$File3Name=="/rssfeed.php") {
20 if(!isset($_GET['debug'])) { $_GET['debug'] = null; }
21 if(!is_numeric($_GET['id'])) { $_GET['id'] = null; }
22 $boardsname = htmlentities($Settings['board_name'], ENT_QUOTES, $Settings['charset']);
23 $boardsname = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $boardsname);
24 $_GET['feedtype'] = strtolower($_GET['feedtype']);
25 if($_GET['feedtype']!="rss"&&$_GET['feedtype']!="atom"&&$_GET['feedtype']!="oldrss"&&
26 $_GET['feedtype']!="opml"&&$_GET['feedtype']!="opensearch") {
27 $_GET['feedtype'] = "rss"; }
28 //$basepath = pathinfo($_SERVER['REQUEST_URI']);
29 /*if(dirname($_SERVER['REQUEST_URI'])!="."||
30 dirname($_SERVER['REQUEST_URI'])!=null) {
31 $basedir = dirname($_SERVER['REQUEST_URI'])."/"; }*/
32 if(dirname($_SERVER['SCRIPT_NAME'])!="."||
33 dirname($_SERVER['SCRIPT_NAME'])!=null) {
34 $basedir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
35 if($basedir==null||$basedir==".") {
36 if(dirname($_SERVER['SCRIPT_NAME'])=="."||
37 dirname($_SERVER['SCRIPT_NAME'])==null) {
38 $basedir = dirname($_SERVER['PHP_SELF'])."/"; } }
39 if($basedir=="\/") { $basedir="/"; }
40 $basedir = str_replace("//", "/", $basedir);
41 if($Settings['fixpathinfo']!="on"&&
42 $Settings['fixpathinfo']!="off"&&
43 $Settings['fixpathinfo']!==null) {
44 $basedir = "/"; } $BaseURL = $basedir;
45 if(!isset($_SERVER['HTTPS'])) { $_SERVER['HTTPS'] = 'off'; }
46 if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
47 if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
48 if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
49 $BoardURL = $prehost.$_SERVER["HTTP_HOST"].$BaseURL; }
50 if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
51 $BoardURL = $Settings['idburl'];
52 if($Settings['qstr']!="/") {
53 $AltBoardURL = $BoardURL; }
54 if($Settings['qstr']=="/") {
55 $AltBoardURL = preg_replace("/\/$/","",$BoardURL); } }
56 if ($_GET['id']==null) { $_GET['id']="1"; }
57 if($rssurlon=="on") { $BoardURL = $rssurl; }
58 $feedsname = basename($_SERVER['SCRIPT_NAME']);
59 if($_SERVER['PATH_INFO']!=null) {
60 $feedsname .= htmlentities($_SERVER['PATH_INFO'], ENT_QUOTES, $Settings['charset']); }
61 if($_SERVER['QUERY_STRING']!=null) {
62 $feedsname .= "?".htmlentities($_SERVER['QUERY_STRING'], ENT_QUOTES, $Settings['charset']); }
63 $checkfeedtype = "application/rss+xml";
64 if($_GET['feedtype']=="oldrss") { $checkfeedtype = "application/xml"; }
65 if($_GET['feedtype']=="rss") { $checkfeedtype = "application/rss+xml"; }
66 if($_GET['feedtype']=="atom") { $checkfeedtype = "application/atom+xml"; }
67 if($_GET['feedtype']=="opml") { $checkfeedtype = "text/x-opml"; }
68 if($_GET['feedtype']=="opensearch") { $checkfeedtype = "application/opensearchdescription+xml"; }
69 if(stristr($_SERVER["HTTP_ACCEPT"],$checkfeedtype) ) {
70 header("Content-Type: ".$checkfeedtype."; charset=".$Settings['charset']); }
71 else { if(stristr($_SERVER["HTTP_ACCEPT"],"application/xml") ) {
72 header("Content-Type: application/xml; charset=".$Settings['charset']); }
73 else { if (stristr($_SERVER["HTTP_USER_AGENT"],"FeedValidator")) {
74 header("Content-Type: application/xml; charset=".$Settings['charset']);
75 } else { header("Content-Type: text/xml; charset=".$Settings['charset']); } } }
76 header("Content-Language: en");
77 header("Vary: Accept");
78 if($_GET['feedtype']=="oldrss"||$_GET['feedtype']=="rss"||$_GET['feedtype']=="atom"||$_GET['feedtype']=="opml") {
79 $prequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"id\"=%i".$ForumIgnoreList2."", array($_GET['id']));
80 $preresult=sql_query($prequery,$SQLStat);
81 $prenum=sql_num_rows($preresult);
83 if($prenum==0) { redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); sql_free_result($preresult);
84 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
85 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
86 $ForumID=sql_result($preresult,0,"id");
87 $ForumName=sql_result($preresult,0,"Name");
88 $ForumName = htmlentities($ForumName, ENT_QUOTES, $Settings['charset']);
89 $ForumName = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $ForumName);
90 $ForumCatID=sql_result($preresult,0,"CategoryID");
91 $ForumType=sql_result($preresult,0,"ForumType");
92 $ForumType = strtolower($ForumType);
93 sql_free_result($preresult);
94 if($PermissionInfo['CanViewForum'][$ForumID]=="no"||
95 $PermissionInfo['CanViewForum'][$ForumID]!="yes") {
96 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
97 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
98 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
99 if($CatPermissionInfo['CanViewCategory'][$ForumCatID]=="no"||
100 $CatPermissionInfo['CanViewCategory'][$ForumCatID]!="yes") {
101 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
102 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
103 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
104 $gltf = array(null); $gltf[0] = $ForumID;
105 if ($ForumType=="subforum") {
106 $apcquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"ShowForum\"='yes' AND \"InSubForum\"=%i".$ForumIgnoreList2." ORDER BY \"id\"", array($ForumID));
107 $apcresult=sql_query($apcquery,$SQLStat);
108 $apcnum=sql_num_rows($apcresult);
109 $apci=0; $apcl=1; if($apcnum>=1) {
110 while ($apci < $apcnum) {
111 $SubsForumID=sql_result($apcresult,$apci,"id");
112 if(isset($PermissionInfo['CanViewForum'][$SubsForumID])&&
113 $PermissionInfo['CanViewForum'][$SubsForumID]=="yes") {
114 $gltf[$apcl] = $SubsForumID; ++$apcl; }
116 sql_free_result($apcresult); } }
117 $Atom = null; $RSS = null; $PreRSS = null;
118 $gltnum = count($gltf); $glti = 0;
119 while ($glti < $gltnum) {
120 $ExtraIgnores = null;
121 if($PermissionInfo['CanModForum'][$gltf[$glti]]=="no") {
122 $ExtraIgnores = " AND \"Closed\"<>3"; }
123 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i".$ExtraIgnores.$ForumIgnoreList4." ORDER BY \"LastUpdate\" DESC LIMIT %i", array($gltf[$glti],$Settings['max_topics']));
124 $result=sql_query($query,$SQLStat);
125 $num=sql_num_rows($result); $i=0;
127 $TopicID=sql_result($result,$i,"id");
128 $ForumID=sql_result($result,$i,"ForumID");
129 $CategoryID=sql_result($result,$i,"CategoryID");
130 $pquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"TopicID\"=%i ORDER BY \"TimeStamp\" ASC LIMIT %i", array($TopicID,1));
131 $presult=sql_query($pquery,$SQLStat);
132 $pnum=sql_num_rows($presult);
133 $MyDescription=sql_result($presult,0,"Post");
134 $UsersID=sql_result($result,$i,"UserID");
135 $GuestsName=sql_result($result,$i,"GuestName");
136 $requery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($UsersID));
137 $reresult=sql_query($requery,$SQLStat);
138 $renum=sql_num_rows($reresult);
139 if($renum<1) { $UsersID = -1;
140 $requery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($UsersID));
141 $reresult=sql_query($requery,$SQLStat);
142 $renum=sql_num_rows($reresult); }
143 $memrequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."mempermissions\" WHERE \"id\"=%i LIMIT 1", array($UsersID));
144 $memreresult=sql_query($memrequery,$SQLStat);
145 $memrenum=sql_num_rows($memreresult);
146 $UsersName=sql_result($reresult,0,"Name");
147 $UsersGroupID=sql_result($reresult,0,"GroupID");
148 $PreUserCanExecPHP=sql_result($memreresult,0,"CanExecPHP");
149 if($PreUserCanExecPHP!="yes"&&$PreUserCanExecPHP!="no"&&$PreUserCanExecPHP!="group") {
150 $PreUserCanExecPHP = "no"; }
151 $PreUserCanDoHTML=sql_result($memreresult,0,"CanDoHTML");
152 if($PreUserCanDoHTML!="yes"&&$PreUserCanDoHTML!="no"&&$PreUserCanDoHTML!="group") {
153 $PreUserCanDoHTML = "no"; }
154 $PreUserCanUseBBags=sql_result($memreresult,0,"CanUseBBags");
155 if($PreUserCanUseBBags!="yes"&&$PreUserCanUseBBags!="no"&&$PreUserCanUseBBags!="group") {
156 $PreUserCanUseBBags = "no"; }
157 sql_free_result($memreresult);
158 if($UsersName=="Guest") { $UsersName=$GuestsName;
159 if($UsersName==null) { $UsersName="Guest"; } }
160 sql_free_result($reresult);
161 $gquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($UsersGroupID));
162 $gresult=sql_query($gquery,$SQLStat);
163 $UsersGroup=sql_result($gresult,0,"Name");
164 $User1CanExecPHP = $PreUserCanExecPHP;
165 if($PreUserCanExecPHP=="group") {
166 $User1CanExecPHP=sql_result($gresult,0,"CanExecPHP"); }
167 if($User1CanExecPHP!="yes"&&$User1CanExecPHP!="no") {
168 $User1CanExecPHP = "no"; }
169 $User1CanDoHTML = $PreUserCanDoHTML;
170 if($PreUserCanDoHTML=="group") {
171 $User1CanDoHTML=sql_result($gresult,0,"CanDoHTML"); }
172 if($User1CanDoHTML!="yes"&&$User1CanDoHTML!="no") {
173 $User1CanDoHTML = "no"; }
174 $User1CanUseBBags = $PreUserCanUseBBags;
175 if($User1CanUseBBags=="group") {
176 $User1CanUseBBags=sql_result($gresult,0,"CanUseBBags"); }
177 if($User1CanUseBBags!="yes"&&$User1CanUseBBags!="no") {
178 $User1CanUseBBags = "no"; }
179 $GroupNamePrefix=sql_result($gresult,0,"NamePrefix");
180 $GroupNameSuffix=sql_result($gresult,0,"NameSuffix");
181 sql_free_result($gresult);
182 if($User1CanUseBBags=="yes") { $MyDescription = bbcode_parser($MyDescription); }
183 if($User1CanExecPHP=="no") {
184 $MyDescription = preg_replace("/\[ExecPHP\](.*?)\[\/ExecPHP\]/is","<span style=\"color: red; font-weight: bold;\">ERROR:</span> cannot execute php code.",$MyDescription); }
185 if($User1CanExecPHP=="yes") { $MyDescription = php_execute($MyDescription); }
186 if($User1CanDoHTML=="no") {
187 $MyDescription = preg_replace("/\[DoHTML\](.*?)\[\/DoHTML\]/is","<span style=\"color: red; font-weight: bold;\">ERROR:</span> cannot execute html.",$MyDescription); }
188 if($User1CanDoHTML=="yes") { $MyDescription = do_html_bbcode($MyDescription); }
189 $MyDescription = text2icons($MyDescription,$Settings['sqltable'],$SQLStat);
190 $MyDescription = preg_replace("/\<br\>/", "<br />", nl2br($MyDescription));
191 $MyDescription = url2link($MyDescription);
192 if(isset($GroupNamePrefix)&&$GroupNamePrefix!=null) {
193 $UsersName = $GroupNamePrefix.$UsersName; }
194 if(isset($GroupNameSuffix)&&$GroupNameSuffix!=null) {
195 $UsersName = $UsersName.$GroupNameSuffix; }
196 $TheTime=sql_result($result,$i,"TimeStamp");
197 $atomcurtime = new DateTime();
198 $atomcurtime->setTimestamp($TheTime);
199 $atomcurtime->setTimezone($utctz);
200 $AtomTime=$atomcurtime->format("Y-m-d\TH:i:s\Z");
201 //$OldRSSTime=$atomcurtime->format("Y-m-d\TH:i:s+0:00");
202 $OldRSSTime=$AtomTime;
203 $TheTime=$atomcurtime->format("D, j M Y G:i:s \G\M\T");
204 $TopicName=sql_result($result,$i,"TopicName");
205 $ForumDescription=sql_result($result,$i,"Description");
206 if(isset($PermissionInfo['CanViewForum'][$ForumID])&&
207 $PermissionInfo['CanViewForum'][$ForumID]=="yes"&&
208 isset($CatPermissionInfo['CanViewCategory'][$CategoryID])&&
209 $CatPermissionInfo['CanViewCategory'][$CategoryID]=="yes") {
210 if($_GET['feedtype']=="atom") {
211 $CDataDescription = "<![CDATA[\n".$MyDescription."\n]]>";
212 $Atom .= '<entry>'."\n".'<title>'.$TopicName.'</title>'."\n".'<summary>'.$CDataDescription.'</summary>'."\n".'<link rel="alternate" href="'.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).'" />'."\n".'<id>'.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).'</id>'."\n".'<author>'."\n".'<name>'.$UsersName.'</name>'."\n".'</author>'."\n".'<updated>'.$AtomTime.'</updated>'."\n".'</entry>'."\n"; }
213 if($_GET['feedtype']=="oldrss") {
214 $CDataDescription = "<![CDATA[\n".$MyDescription."\n]]>";
215 $PreRSS .= ' <rdf:li rdf:resource="'.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).'" />'."\n";
216 $RSS .= '<item rdf:about="'.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).'">'."\n".'<title>'.$TopicName.'</title>'."\n".'<description>'.$CDataDescription.'</description>'."\n".'<dc:publisher>'.$UsersName.'</dc:publisher>'."\n".'<dc:creator>'.$UsersName.'</dc:creator>'."\n".'<dc:date>'.$OldRSSTime.'</dc:date>'."\n".'</item>'."\n"; }
217 if($_GET['feedtype']=="rss") {
218 $CDataDescription = "<![CDATA[\n".$MyDescription."\n]]>";
219 $RSS .= '<item>'."\n".'<pubDate>'.$TheTime.'</pubDate>'."\n".'<author>'.$UsersName.'</author>'."\n".'<title>'.$TopicName.'</title>'."\n".'<description>'.$CDataDescription.'</description>'."\n".'<link>'.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).'</link>'."\n".'<guid>'.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).'</guid>'."\n".'</item>'."\n"; } }
220 ++$i; sql_free_result($presult); }
221 sql_free_result($result);
223 $endtag = " <!-- Renee Sabonis ^_^ -->\n";
224 xml_doc_start("1.0",$Settings['charset']);
225 if($Settings['showverinfo']=="on") { ?>
226 <!-- generator="<?php echo $VerInfo['iDB_Ver_Show']; ?>" -->
227 <?php } if($Settings['showverinfo']!="on") { ?>
228 <!-- generator="<?php echo $iDB; ?>" -->
229 <?php } echo "\n"; if($_GET['feedtype']=="oldrss") { ?>
231 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
232 xmlns="http://purl.org/rss/1.0/"
233 xmlns:dc="http://purl.org/dc/elements/1.1/"
235 <channel rdf:about="<?php echo $BoardURL.$feedsname; ?>">
236 <title><?php echo $boardsname." ".$ThemeSet['TitleDivider']; ?> Viewing Forum <?php echo $ForumName; ?></title>
237 <link><?php echo $BoardURL.url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?></link>
238 <description>RSS Feed of the Topics in Forum <?php echo $ForumName; ?></description>
239 <image rdf:resource="<?php echo $AltBoardURL.$SettDir['inc']; ?>rss.gif" />
243 <?php echo $PreRSS; ?>
248 <image rdf:about="<?php echo $AltBoardURL.$SettDir['inc']; ?>rss.gif">
249 <title><?php echo $boardsname; ?></title>
250 <link><?php echo $BoardURL.url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?></link>
251 <url><?php echo $AltBoardURL.$SettDir['inc']; ?>rss.gif</url>
253 <!-- Renee Sabonis ^_^ -->
254 <?php echo "\n".$RSS."\n"; ?></rdf:RDF>
255 <?php } if($_GET['feedtype']=="rss") { ?>
258 <title><?php echo $boardsname." ".$ThemeSet['TitleDivider']; ?> Viewing Forum <?php echo $ForumName; ?></title>
259 <description>RSS Feed of the Topics in Forum <?php echo $ForumName; ?></description>
260 <link><?php echo $BoardURL.url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?></link>
261 <language>en</language>
262 <?php if($Settings['showverinfo']=="on") { ?>
263 <generator><?php echo $VerInfo['iDB_Ver_Show']; ?></generator>
264 <?php } if($Settings['showverinfo']!="on") { ?>
265 <generator><?php echo $iDB; ?></generator>
266 <?php } echo "\n"; ?>
267 <copyright><?php echo $SettInfo['Author']; ?></copyright>
270 <url><?php echo $AltBoardURL.$SettDir['inc']; ?>rss.gif</url>
271 <title><?php echo $boardsname; ?></title>
272 <link><?php echo $AltBoardURL; ?></link>
274 <?php echo $endtag; ?>
275 <?php echo "\n".$RSS."\n"; ?></channel>
277 <?php } if($_GET['feedtype']=="atom") { ?>
278 <feed xmlns="http://www.w3.org/2005/Atom">
279 <title><?php echo $boardsname." ".$ThemeSet['TitleDivider']; ?> Viewing Forum <?php echo $ForumName; ?></title>
280 <subtitle>Atom Feed of the Topics in Forum <?php echo $ForumName; ?></subtitle>
281 <link rel="self" href="<?php echo $BoardURL.$feedsname; ?>" />
282 <id><?php echo $BoardURL.url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?></id>
283 <updated><?php echo gmdate("Y-m-d\TH:i:s\Z"); ?></updated>
284 <?php if($Settings['showverinfo']=="on") { ?>
285 <generator><?php echo $VerInfo['iDB_Ver_Show']; ?></generator>
286 <?php } if($Settings['showverinfo']!="on") { ?>
287 <generator><?php echo $iDB; ?></generator>
289 <icon><?php echo $AltBoardURL.$SettDir['inc']; ?>rss.gif</icon>
290 <?php echo $endtag; ?>
291 <?php echo "\n".$Atom."\n"; ?>
293 <?php } if($_GET['feedtype']=="opml") { ?>
296 <dateCreated><?php echo gmdate("d-M-Y"); ?></dateCreated>
300 <outline text="<?php echo $ForumName; ?> Topics RSS 1.0 Feed" type="link" url="<?php echo $BoardURL.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" htmlUrl="<?php echo $BoardURL.url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?>" xmlUrl="<?php echo $BoardURL.url_maker($exfile['rss'],$Settings['rss_ext'],"act=oldrss&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
302 <outline text="<?php echo $ForumName; ?> Topics RSS 2.0 Feed" type="rss" url="<?php echo $BoardURL.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" htmlUrl="<?php echo $BoardURL.url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?>" xmlUrl="<?php echo $BoardURL.url_maker($exfile['rss'],$Settings['rss_ext'],"act=rss&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
303 <outline text="<?php echo $ForumName; ?> Topics Atom Feed" type="atom" url="<?php echo $BoardURL.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" htmlUrl="<?php echo $BoardURL.url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?>" xmlUrl="<?php echo $BoardURL.url_maker($exfile['rss'],$Settings['rss_ext'],"act=atom&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
306 <?php echo $endtag; ?>
307 <?php } if($_GET['feedtype']=="opensearch") { ?>
308 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
309 xmlns:moz="http://www.mozilla.org/2006/browser/search/">
310 <ShortName><?php echo $boardsname." ".$ThemeSet['TitleDivider']; ?> Search</ShortName>
311 <Description><?php echo $SettInfo['Description']; ?></Description>
312 <InputEncoding><?php echo $Settings['charset']; ?></InputEncoding>
313 <Image width="16" height="16" type="image/x-icon"><?php echo $AltBoardURL.$ThemeSet['FavIcon']; ?></Image>
314 <Url type="text/html" method="POST" template="<?php echo $BoardURL.url_maker("search",$Settings['file_ext'],null,"search","search"); ?>">
315 <Param name="act" value="topics"/>
316 <Param name="search" value="{searchTerms}"/>
317 <Param name="type" value="wildcard"/>
318 <Param name="page" value="1"/>
320 <?php echo $endtag; ?>
321 <moz:SearchForm><?php echo $BoardURL.url_maker("search",$Settings['file_ext'],null,"search","search"); ?></moz:SearchForm>
322 </OpenSearchDescription>
323 <?php } if($_GET['debug']=="true"||$_GET['debug']=="on") {
324 function execution_time($starttime) {
325 list($uetime, $etime) = explode(" ", microtime());
326 $endtime = $uetime + $etime;
327 return bcsub($endtime, $starttime, 4); }
328 echo "<!-- execution_time=\"".execution_time($starttime)."\" -->"; }
329 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); ?>