Small bug fix to Version Number. :)
[iDB.git] / inc / subforums.php
blob041602da14987683b408ba3a08d189adbd95acb3
1 <?php
2 /*
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-2011 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: subforums.php - Last Update: 12/07/2010 SVN 600 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="subforums.php"||$File3Name=="/subforums.php") {
18 require('index.php');
19 exit(); }
20 if(!is_numeric($_GET['id'])) { $_GET['id'] = null; }
21 if(!isset($ThemeSet['ForumStyle'])) { $ThemeSet['ForumStyle'] = 1; }
22 if(!is_numeric($ThemeSet['ForumStyle'])) { $ThemeSet['ForumStyle'] = 1; }
23 if($ThemeSet['ForumStyle']>2||$ThemeSet['ForumStyle']<1) {
24 $ThemeSet['ForumStyle'] = 1; }
25 $checkquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"id\"=%i".$ForumIgnoreList2." LIMIT 1", array($_GET['id']));
26 $checkresult=sql_query($checkquery,$SQLStat);
27 $checknum=sql_num_rows($checkresult);
28 if($checknum==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($checkresult);
29 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
30 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
31 if($checknum>=1) {
32 $ForumID=sql_result($checkresult,0,"id");
33 $ForumName=sql_result($checkresult,0,"Name");
34 $ForumType=sql_result($checkresult,0,"ForumType");
35 $InSubForum=sql_result($checkresult,0,"InSubForum");
36 $CategoryID=sql_result($checkresult,0,"CategoryID");
37 $RedirectURL=sql_result($checkresult,0,"RedirectURL");
38 $RedirectTimes=sql_result($checkresult,0,"Redirects");
39 $CanHaveTopics=sql_result($checkresult,0,"CanHaveTopics");
40 $NumberViews=sql_result($checkresult,0,"NumViews");
41 $SForumName = $ForumName;
42 $ForumType = strtolower($ForumType); $CanHaveTopics = strtolower($CanHaveTopics);
43 if($CanHaveTopics!="yes"&&$ForumType!="redirect") {
44 if($NumberViews==0||$NumberViews==null) { $NewNumberViews = 1; }
45 if($NumberViews!=0&&$NumberViews!=null) { $NewNumberViews = $NumberViews + 1; }
46 $viewup = sql_pre_query("UPDATE \"".$Settings['sqltable']."forums\" SET \"NumViews\"='%s' WHERE \"id\"=%i", array($NewNumberViews,$_GET['id']));
47 sql_query($viewup,$SQLStat); }
48 if($ForumType=="redirect") {
49 if($RedirectTimes==0||$RedirectTimes==null) { $NewRedirTime = 1; }
50 if($RedirectTimes!=0&&$RedirectTimes!=null) { $NewRedirTime = $RedirectTimes + 1; }
51 $redirup = sql_pre_query("UPDATE \"".$Settings['sqltable']."forums\" SET \"Redirects\"='%s' WHERE \"id\"=%i", array($NewRedirTime,$_GET['id']));
52 sql_query($redirup,$SQLStat);
53 if($RedirectURL!="http://"&&$RedirectURL!="") {
54 redirect("location",$RedirectURL,0,null,false); ob_clean();
55 header("Content-Type: text/plain; charset=".$Settings['charset']);
56 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
57 if($RedirectURL=="http://"||$RedirectURL=="") {
58 redirect("location",url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
59 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
60 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } }
61 if($ForumType=="forum") {
62 redirect("location",$rbasedir.url_maker($exfile['forum'],$Settings['file_ext'],"act=".$_GET['act']."&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['forum'],$exqstr['forum'],FALSE));
63 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
64 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
65 sql_free_result($checkresult);
66 $prequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."categories\" WHERE \"ShowCategory\"='yes' AND \"id\"=%i".$CatIgnoreList2." ORDER BY \"OrderID\" ASC, \"id\" ASC", array($CategoryID));
67 $preresult=sql_query($prequery,$SQLStat);
68 $prenum=sql_num_rows($preresult);
69 $prei=0;
70 $CategoryID=sql_result($preresult,0,"id");
71 $CategoryType=sql_result($preresult,0,"CategoryType");
72 $CategoryName=sql_result($preresult,0,"Name");
73 $CategoryShow=sql_result($preresult,0,"ShowCategory");
74 $CategoryDescription=sql_result($preresult,0,"Description");
75 if($InSubForum!="0") {
76 $isfquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"id\"=%i".$ForumIgnoreList2." LIMIT 1", array($InSubForum));
77 $isfresult=sql_query($isfquery,$SQLStat);
78 $isfnum=sql_num_rows($isfresult);
79 if($isfnum>=1) {
80 $isfForumID=sql_result($isfresult,0,"id");
81 $isfForumCatID=sql_result($isfresult,0,"CategoryID");
82 $isfForumName=sql_result($isfresult,0,"Name");
83 $isfForumType=sql_result($isfresult,0,"ForumType");
84 $isfForumType = strtolower($isfForumType);
85 $isfRedirectURL=sql_result($isfresult,0,"RedirectURL"); }
86 if($isfnum<1) { $InSubForum = "0"; }
87 sql_free_result($isfresult); }
88 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=view&id=".$ForumID."&page=".$_GET['page'],"&","=",$prexqstr[$ForumType],$exqstr[$ForumType]);
89 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
90 $_SESSION['ViewingFile'] = $exfile[$ForumType].$Settings['file_ext']; }
91 if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
92 $_SESSION['ViewingFile'] = $exfile[$ForumType]; }
93 $_SESSION['PreViewingTitle'] = "Viewing SubForum:";
94 $_SESSION['ViewingTitle'] = $ForumName;
96 <div class="NavLinks"><?php echo $ThemeSet['NavLinkIcon']; ?><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>">Board index</a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile[$CategoryType],$Settings['file_ext'],"act=view&id=".$CategoryID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$CategoryType],$exqstr[$CategoryType]); ?>"><?php echo $CategoryName; ?></a><?php if($InSubForum!="0") { echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile[$isfForumType],$Settings['file_ext'],"act=view&id=".$isfForumID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr[$isfForumType],$exqstr[$isfForumType]); ?>"><?php echo $isfForumName; ?></a><?php } echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?>"><?php echo $ForumName; ?></a></div>
97 <div class="DivNavLinks">&nbsp;</div>
98 <?php
99 if(!isset($CatPermissionInfo['CanViewCategory'][$CategoryID])) {
100 $CatPermissionInfo['CanViewCategory'][$CategoryID] = "no"; }
101 if($CatPermissionInfo['CanViewCategory'][$CategoryID]=="no"||
102 $CatPermissionInfo['CanViewCategory'][$CategoryID]!="yes") {
103 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
104 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
105 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
106 if(!isset($PermissionInfo['CanViewForum'][$_GET['id']])) {
107 $PermissionInfo['CanViewForum'][$_GET['id']] = "no"; }
108 if($PermissionInfo['CanViewForum'][$_GET['id']]=="no"||
109 $PermissionInfo['CanViewForum'][$_GET['id']]!="yes") {
110 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
111 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
112 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
113 if($CatPermissionInfo['CanViewCategory'][$CategoryID]=="yes"&&
114 $PermissionInfo['CanViewForum'][$_GET['id']]=="yes") {
115 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"ShowForum\"='yes' AND \"CategoryID\"=%i AND \"InSubForum\"=%i".$ForumIgnoreList2." ORDER BY \"OrderID\" ASC, \"id\" ASC", array($CategoryID,$_GET['id']));
116 $result=sql_query($query,$SQLStat);
117 $num=sql_num_rows($result);
118 $i=0;
120 <div class="Table1Border">
121 <?php if($ThemeSet['TableStyle']=="div") { ?>
122 <div class="TableRow1">
123 <span style="text-align: left;">
124 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['category'],$Settings['file_ext'],"act=view&id=".$CategoryID,$Settings['qstr'],$Settings['qsep'],$prexqstr['category'],$exqstr['category']); ?>"><?php echo $CategoryName; ?></a></span></div>
125 <?php } ?>
126 <table class="Table1" id="Cat<?php echo $CategoryID; ?>">
127 <?php if($ThemeSet['TableStyle']=="table") { ?>
128 <tr class="TableRow1" id="CatStart<?php echo $CategoryID; ?>">
129 <td class="TableColumn1" colspan="5"><span style="text-align: left;">
130 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['category'],$Settings['file_ext'],"act=view&id=".$CategoryID,$Settings['qstr'],$Settings['qsep'],$prexqstr['category'],$exqstr['category']); ?>"><?php echo $CategoryName; ?></a></span>
131 </td>
132 </tr><?php } ?>
133 <tr id="ForumStatRow<?php echo $CategoryID; ?>" class="TableRow2">
134 <th class="TableColumn2" style="width: 4%;">&nbsp;</th>
135 <th class="TableColumn2" style="width: 58%;">Forum</th>
136 <th class="TableColumn2" style="width: 7%;">Topics</th>
137 <th class="TableColumn2" style="width: 7%;">Posts</th>
138 <th class="TableColumn2" style="width: 24%;">Last Topic</th>
139 </tr>
140 <?php
141 while ($i < $num) {
142 $ForumID=sql_result($result,$i,"id");
143 $ForumName=sql_result($result,$i,"Name");
144 $ForumShow=sql_result($result,$i,"ShowForum");
145 $ForumType=sql_result($result,$i,"ForumType");
146 $ForumShowTopics=sql_result($result,$i,"CanHaveTopics");
147 $ForumShowTopics = strtolower($ForumShowTopics);
148 $NumTopics=sql_result($result,$i,"NumTopics");
149 $NumPosts=sql_result($result,$i,"NumPosts");
150 $NumRedirects=sql_result($result,$i,"Redirects");
151 $ForumDescription=sql_result($result,$i,"Description");
152 $ForumType = strtolower($ForumType); $sflist = null;
153 $gltf = array(null); $gltf[0] = $ForumID;
154 if ($ForumType=="subforum") {
155 $apcquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"ShowForum\"='yes' AND \"InSubForum\"=%i".$ForumIgnoreList2." ORDER BY \"OrderID\" ASC, \"id\" ASC", array($ForumID));
156 $apcresult=sql_query($apcquery,$SQLStat);
157 $apcnum=sql_num_rows($apcresult);
158 $apci=0; $apcl=1; if($apcnum>=1) {
159 while ($apci < $apcnum) {
160 $NumsTopics=sql_result($apcresult,$apci,"NumTopics");
161 $NumTopics = $NumsTopics + $NumTopics;
162 $NumsPosts=sql_result($apcresult,$apci,"NumPosts");
163 $NumPosts = $NumsPosts + $NumPosts;
164 $SubsForumID=sql_result($apcresult,$apci,"id");
165 $SubsForumName=sql_result($apcresult,$apci,"Name");
166 $SubsForumType=sql_result($apcresult,$apci,"ForumType");
167 $SubsForumShowTopics=sql_result($result,$i,"CanHaveTopics");
168 if(isset($PermissionInfo['CanViewForum'][$SubsForumID])&&
169 $PermissionInfo['CanViewForum'][$SubsForumID]=="yes") {
170 $ExStr = ""; if ($SubsForumType!="redirect"&&
171 $SubsForumShowTopics!="no") { $ExStr = "&page=1"; }
172 $sfurl = "<a href=\"";
173 $sfurl = url_maker($exfile[$SubsForumType],$Settings['file_ext'],"act=view&id=".$SubsForumID.$ExStr,$Settings['qstr'],$Settings['qsep'],$prexqstr[$SubsForumType],$exqstr[$SubsForumType]);
174 $sfurl = "<a href=\"".$sfurl."\">".$SubsForumName."</a>";
175 if($apcl==1) {
176 $sflist = "Subforums:";
177 $sflist = $sflist." ".$sfurl; }
178 if($apcl>1) {
179 $sflist = $sflist.", ".$sfurl; }
180 $gltf[$apcl] = $SubsForumID; ++$apcl; }
181 ++$apci; }
182 sql_free_result($apcresult); } }
183 if(isset($PermissionInfo['CanViewForum'][$ForumID])&&
184 $PermissionInfo['CanViewForum'][$ForumID]=="yes") {
185 $LastTopic = "&nbsp;<br />&nbsp;<br />&nbsp;";
186 if(!isset($LastTopic)) { $LastTopic = null; }
187 $gltnum = count($gltf); $glti = 0;
188 $OldUpdateTime = 0; $UseThisFonum = null;
189 if ($ForumType=="subforum") {
190 while ($glti < $gltnum) {
191 $ExtraIgnores = null;
192 if($PermissionInfo['CanModForum'][$gltf[$glti]]=="no") {
193 $ExtraIgnores = " AND \"Closed\"<>3"; }
194 $gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"CategoryID\"=%i".$ExtraIgnores.$ForumIgnoreList4." AND \"ForumID\"=%i ORDER BY \"LastUpdate\" DESC LIMIT 1", array($CategoryID,$gltf[$glti]));
195 $gltforesult=sql_query($gltfoquery,$SQLStat);
196 $gltfonum=sql_num_rows($gltforesult);
197 if($gltfonum>0) {
198 $NewUpdateTime=sql_result($gltforesult,0,"LastUpdate");
199 if($NewUpdateTime>$OldUpdateTime) {
200 $UseThisFonum = $gltf[$glti];
201 $OldUpdateTime = $NewUpdateTime; }
202 sql_free_result($gltforesult); }
203 ++$glti; }
204 if($UseThisFonum==0) {
205 $UseThisFonum = $gltf[0]; } }
206 if ($ForumType!="subforum"&&$ForumType!="redirect") { $UseThisFonum = $gltf[0]; }
207 if ($ForumType!="redirect") {
208 $ExtraIgnores = null;
209 if($PermissionInfo['CanModForum'][$UseThisFonum]=="no") {
210 $ExtraIgnores = " AND \"Closed\"<>3"; }
211 $gltquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i".$ExtraIgnores.$ForumIgnoreList4.") OR (\"OldForumID\"=%i".$ExtraIgnores.$ForumIgnoreList4.") ORDER BY \"LastUpdate\" DESC LIMIT 1", array($UseThisFonum,$UseThisFonum));
212 $gltresult=sql_query($gltquery,$SQLStat);
213 $gltnum=sql_num_rows($gltresult);
214 if($gltnum>0){
215 $TopicID=sql_result($gltresult,0,"id");
216 $TopicName=sql_result($gltresult,0,"TopicName");
217 $NumReplys=sql_result($gltresult,0,"NumReply");
218 $TopicName1 = pre_substr($TopicName,0,20);
219 $oldtopicname=$TopicName; $NumRPosts = $NumReplys + 1;
220 if(!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; }
221 if($NumRPosts>$Settings['max_posts']) {
222 $NumPages = ceil($NumRPosts/$Settings['max_posts']); }
223 if($NumRPosts<=$Settings['max_posts']) { $NumPages = 1; }
224 if (pre_strlen($TopicName)>20) {
225 $TopicName1 = $TopicName1."..."; $TopicName=$TopicName1; }
226 $glrquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"TopicID\"=%i ORDER BY \"TimeStamp\" DESC LIMIT 1", array($TopicID));
227 $glrresult=sql_query($glrquery,$SQLStat);
228 $glrnum=sql_num_rows($glrresult);
229 if($glrnum>0){
230 $ReplyID=sql_result($glrresult,0,"id");
231 $UsersID=sql_result($glrresult,0,"UserID");
232 $GuestsName=sql_result($glrresult,0,"GuestName");
233 $TimeStamp=sql_result($glrresult,0,"TimeStamp");
234 $TimeStamp=GMTimeChange("F j Y, g:i a",$TimeStamp,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
235 sql_free_result($glrresult); }
236 $PreUsersName = GetUserName($UsersID,$Settings['sqltable'],$SQLStat);
237 if($PreUsersName['Name']===null) { $UsersID = -1;
238 $PreUsersName = GetUserName($UsersID,$Settings['sqltable'],$SQLStat); }
239 $UsersName = $PreUsersName['Name'];
240 $UsersHidden = $PreUsersName['Hidden'];
241 $UsersName1 = pre_substr($UsersName,0,20);
242 if($UsersName=="Guest") { $UsersName=$GuestsName;
243 if($UsersName==null) { $UsersName="Guest"; } }
244 $oldusername=$UsersName;
245 if (pre_strlen($UsersName)>20) {
246 $UsersName1 = $UsersName1."..."; $UsersName=$UsersName1; }
247 $lul = null;
248 if($UsersID>0&&$UsersHidden=="no") {
249 $lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']);
250 $LastTopic = $TimeStamp."<br />\nTopic: <a href=\"".url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic']).$qstrhtml."&#35;reply".$NumRPosts."\" title=\"".$oldtopicname."\">".$TopicName."</a><br />\nUser: <a href=\"".$lul."\" title=\"".$oldusername."\">".$UsersName."</a>"; }
251 if($UsersID<=0||$UsersHidden=="yes") {
252 if($UsersID==-1) { $UserPre = "Guest:"; }
253 if(($UsersID<-1&&$UsersHidden=="yes")||$UsersID==0||($UsersID>0&&$UsersHidden=="yes")) {
254 $UserPre = "Hidden:"; }
255 $LastTopic = $TimeStamp."<br />\nTopic: <a href=\"".url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic']).$qstrhtml."&#35;reply".$NumRPosts."\" title=\"".$oldtopicname."\">".$TopicName."</a><br />\n".$UserPre." <span title=\"".$oldusername."\">".$UsersName."</span>"; } }
256 if($LastTopic==null) { $LastTopic = "&nbsp;<br />&nbsp;<br />&nbsp;"; }
257 sql_free_result($gltresult); }
258 if ($ForumType=="redirect") { $LastTopic="&nbsp;<br />Redirects: ".$NumRedirects."<br />&nbsp;"; }
259 $PreForum = $ThemeSet['ForumIcon'];
260 if ($ForumType=="forum") { $PreForum=$ThemeSet['ForumIcon']; }
261 if ($ForumType=="subforum") { $PreForum=$ThemeSet['SubForumIcon']; }
262 if ($ForumType=="redirect") { $PreForum=$ThemeSet['RedirectIcon']; }
263 $ExStr = ""; if ($ForumType!="redirect"&&
264 $ForumShowTopics!="no") { $ExStr = "&page=1"; }
265 if($ThemeSet['ForumStyle']==1) {
266 $ForumClass[1] = " class=\"TableColumn3\" ";
267 $ForumClass[2] = " class=\"TableColumn3\" ";
268 $ForumClass[3] = " class=\"TableColumn3\" ";
269 $ForumClass[4] = " class=\"TableColumn3\" ";
270 $ForumClass[5] = " class=\"TableColumn3\" "; }
271 if($ThemeSet['ForumStyle']==2) {
272 $ForumClass[1] = " class=\"TableColumn3\" ";
273 $ForumClass[2] = " class=\"TableColumn3\" ";
274 $ForumClass[3] = " class=\"TableColumn3Alt\" ";
275 $ForumClass[4] = " class=\"TableColumn3Alt\" ";
276 $ForumClass[5] = " class=\"TableColumn3Alt\" "; }
278 <tr class="TableRow3" id="SubForum<?php echo $ForumID; ?>">
279 <td<?php echo $ForumClass[1]; ?>><div class="forumicon">
280 <?php echo $PreForum; ?></div></td>
281 <td<?php echo $ForumClass[2]; ?>><div class="forumname"><a href="<?php echo url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID.$ExStr,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?>"<?php if($ForumType=="redirect") { echo " onclick=\"window.open(this.href);return false;\""; } ?>><?php echo $ForumName; ?></a></div>
282 <div class="forumdescription">
283 <?php echo $ForumDescription; ?><br />
284 <?php echo $sflist; ?></div></td>
285 <td<?php echo $ForumClass[3]; ?>style="text-align: center;"><?php echo $NumTopics; ?></td>
286 <td<?php echo $ForumClass[4]; ?>style="text-align: center;"><?php echo $NumPosts; ?></td>
287 <td<?php echo $ForumClass[5]; ?>><?php echo $LastTopic; ?></td>
288 </tr>
289 <?php } ++$i; } sql_free_result($result);
291 <tr id="CatEnd<?php echo $CategoryID; ?>" class="TableRow4">
292 <td class="TableColumn4" colspan="5">&nbsp;</td>
293 </tr>
294 </table></div>
295 <div class="DivSubForums">&nbsp;</div>
296 <?php } sql_free_result($preresult);
297 $ForumCheck = "skip";
298 if($CanHaveTopics!="yes") {
299 $ForumName = $SForumName; }
300 if($CanHaveTopics!="no") {
301 require($SettDir['inc'].'topics.php'); } }