=1) { while ($apci < $apcnum) { $SubsForumID=sql_result($apcresult,$apci,"id"); if(isset($PermissionInfo['CanViewForum'][$SubsForumID])&& $PermissionInfo['CanViewForum'][$SubsForumID]=="yes") { $gltf[$apcl] = $SubsForumID; ++$apcl; } ++$apci; } sql_free_result($apcresult); } } $Atom = null; $RSS = null; $PreRSS = null; $gltnum = count($gltf); $glti = 0; while ($glti < $gltnum) { $ExtraIgnores = null; if($PermissionInfo['CanModForum'][$gltf[$glti]]=="no") { $ExtraIgnores = " AND \"Closed\"<>3"; } $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'])); $result=sql_query($query,$SQLStat); $num=sql_num_rows($result); $i=0; while ($i < $num) { $TopicID=sql_result($result,$i,"id"); $ForumID=sql_result($result,$i,"ForumID"); $CategoryID=sql_result($result,$i,"CategoryID"); $pquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"TopicID\"=%i ORDER BY \"TimeStamp\" ASC LIMIT %i", array($TopicID,1)); $presult=sql_query($pquery,$SQLStat); $pnum=sql_num_rows($presult); $MyDescription=sql_result($presult,0,"Post"); $UsersID=sql_result($result,$i,"UserID"); $GuestsName=sql_result($result,$i,"GuestName"); $requery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($UsersID)); $reresult=sql_query($requery,$SQLStat); $renum=sql_num_rows($reresult); if($renum<1) { $UsersID = -1; $requery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($UsersID)); $reresult=sql_query($requery,$SQLStat); $renum=sql_num_rows($reresult); } $memrequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."mempermissions\" WHERE \"id\"=%i LIMIT 1", array($UsersID)); $memreresult=sql_query($memrequery,$SQLStat); $memrenum=sql_num_rows($memreresult); $UsersName=sql_result($reresult,0,"Name"); $UsersGroupID=sql_result($reresult,0,"GroupID"); $PreUserCanExecPHP=sql_result($memreresult,0,"CanExecPHP"); if($PreUserCanExecPHP!="yes"&&$PreUserCanExecPHP!="no"&&$PreUserCanExecPHP!="group") { $PreUserCanExecPHP = "no"; } $PreUserCanDoHTML=sql_result($memreresult,0,"CanDoHTML"); if($PreUserCanDoHTML!="yes"&&$PreUserCanDoHTML!="no"&&$PreUserCanDoHTML!="group") { $PreUserCanDoHTML = "no"; } $PreUserCanUseBBTags=sql_result($memreresult,0,"CanUseBBTags"); if($PreUserCanUseBBTags!="yes"&&$PreUserCanUseBBTags!="no"&&$PreUserCanUseBBTags!="group") { $PreUserCanUseBBTags = "no"; } sql_free_result($memreresult); if($UsersName=="Guest") { $UsersName=$GuestsName; if($UsersName==null) { $UsersName="Guest"; } } sql_free_result($reresult); $gquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($UsersGroupID)); $gresult=sql_query($gquery,$SQLStat); $UsersGroup=sql_result($gresult,0,"Name"); $User1CanExecPHP = $PreUserCanExecPHP; if($PreUserCanExecPHP=="group") { $User1CanExecPHP=sql_result($gresult,0,"CanExecPHP"); } if($User1CanExecPHP!="yes"&&$User1CanExecPHP!="no") { $User1CanExecPHP = "no"; } $User1CanDoHTML = $PreUserCanDoHTML; if($PreUserCanDoHTML=="group") { $User1CanDoHTML=sql_result($gresult,0,"CanDoHTML"); } if($User1CanDoHTML!="yes"&&$User1CanDoHTML!="no") { $User1CanDoHTML = "no"; } $User1CanUseBBTags = $PreUserCanUseBBTags; if($User1CanUseBBTags=="group") { $User1CanUseBBTags=sql_result($gresult,0,"CanUseBBTags"); } if($User1CanUseBBTags!="yes"&&$User1CanUseBBTags!="no") { $User1CanUseBBTags = "no"; } $GroupNamePrefix=sql_result($gresult,0,"NamePrefix"); $GroupNameSuffix=sql_result($gresult,0,"NameSuffix"); sql_free_result($gresult); if($User1CanUseBBTags=="yes") { $MyDescription = bbcode_parser($MyDescription); } if($User1CanExecPHP=="no") { $MyDescription = preg_replace("/\[ExecPHP\](.*?)\[\/ExecPHP\]/is","ERROR: cannot execute php code.",$MyDescription); } if($User1CanExecPHP=="yes") { $MyDescription = php_execute($MyDescription); } if($User1CanDoHTML=="no") { $MyDescription = preg_replace("/\[DoHTML\](.*?)\[\/DoHTML\]/is","ERROR: cannot execute html.",$MyDescription); } if($User1CanDoHTML=="yes") { $MyDescription = do_html_bbcode($MyDescription); } $MyDescription = text2icons($MyDescription,$Settings['sqltable'],$SQLStat); $MyDescription = preg_replace("/\/", "
", nl2br($MyDescription)); $MyDescription = url2link($MyDescription); if(isset($GroupNamePrefix)&&$GroupNamePrefix!=null) { $UsersName = $GroupNamePrefix.$UsersName; } if(isset($GroupNameSuffix)&&$GroupNameSuffix!=null) { $UsersName = $UsersName.$GroupNameSuffix; } $TheTime=sql_result($result,$i,"TimeStamp"); $atomcurtime = new DateTime(); $atomcurtime->setTimestamp($TheTime); $atomcurtime->setTimezone($utctz); $AtomTime=$atomcurtime->format("Y-m-d\TH:i:s\Z"); //$OldRSSTime=$atomcurtime->format("Y-m-d\TH:i:s+0:00"); $OldRSSTime=$AtomTime; $TheTime=$atomcurtime->format("D, j M Y G:i:s \G\M\T"); $TopicName=sql_result($result,$i,"TopicName"); $ForumDescription=sql_result($result,$i,"Description"); if(isset($PermissionInfo['CanViewForum'][$ForumID])&& $PermissionInfo['CanViewForum'][$ForumID]=="yes"&& isset($CatPermissionInfo['CanViewCategory'][$CategoryID])&& $CatPermissionInfo['CanViewCategory'][$CategoryID]=="yes") { if($_GET['feedtype']=="atom") { $CDataDescription = ""; $Atom .= ''."\n".''.$TopicName.''."\n".''.$CDataDescription.''."\n".''."\n".''.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).''."\n".''."\n".''.$UsersName.''."\n".''."\n".''.$AtomTime.''."\n".''."\n"; } if($_GET['feedtype']=="oldrss") { $CDataDescription = ""; $PreRSS .= ' '."\n"; $RSS .= ''."\n".''.$TopicName.''."\n".''.$CDataDescription.''."\n".''.$UsersName.''."\n".''.$UsersName.''."\n".''.$OldRSSTime.''."\n".''."\n"; } if($_GET['feedtype']=="rss") { $CDataDescription = ""; $RSS .= ''."\n".''.$TheTime.''."\n".''.$UsersName.''."\n".''.$TopicName.''."\n".''.$CDataDescription.''."\n".''.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).''."\n".''.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).''."\n".''."\n"; } } ++$i; sql_free_result($presult); } sql_free_result($result); ++$glti; } } $endtag = " \n"; xml_doc_start("1.0",$Settings['charset']); if($Settings['showverinfo']=="on") { ?> <?php echo $boardsname." ".$ThemeSet['TitleDivider']; ?> Viewing Forum <?php echo $ForumName; ?> RSS Feed of the Topics in Forum <?php echo $boardsname; ?> rss.gif <?php echo $boardsname." ".$ThemeSet['TitleDivider']; ?> Viewing Forum <?php echo $ForumName; ?> RSS Feed of the Topics in Forum en 120 rss.gif <?php echo $boardsname; ?> <?php echo $boardsname." ".$ThemeSet['TitleDivider']; ?> Viewing Forum <?php echo $ForumName; ?> Atom Feed of the Topics in Forum rss.gif Topics RSS 1.0 Feed" type="link" url="" htmlUrl="" xmlUrl="" /> -->*/ ?> " htmlUrl="" xmlUrl="" /> " htmlUrl="" xmlUrl="" /> Search "> "; } gzip_page($Settings['use_gzip'],$GZipEncode['Type']); ?>