Small update
[iDB.git] / inc / categories.php
blob6970ea785f70f41a9baad451e2b567ec4949526f
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-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: categories.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="categories.php"||$File3Name=="/categories.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 $prequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."categories\" WHERE \"id\"=%i".$CatIgnoreList2." LIMIT 1", array($_GET['id']));
26 $preresult=sql_query($prequery,$SQLStat);
27 $prenum=sql_num_rows($preresult);
28 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);
29 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
30 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
31 if($prenum>=1) {
32 $CategoryID=sql_result($preresult,0,"id");
33 $CategoryName=sql_result($preresult,0,"Name");
34 $CategoryShow=sql_result($preresult,0,"ShowCategory");
35 if($CategoryShow=="no") { $_SESSION['ShowActHidden'] = "yes"; }
36 $CategoryType=sql_result($preresult,0,"CategoryType");
37 $InSubCategory=sql_result($preresult,0,"InSubCategory");
38 $SubShowForums=sql_result($preresult,0,"SubShowForums");
39 $CategoryDescription=sql_result($preresult,0,"Description");
40 $CategoryType = strtolower($CategoryType); $SubShowForums = strtolower($SubShowForums);
41 $CategoryPostCountView=sql_result($preresult,0,"PostCountView");
42 $CategoryKarmaCountView=sql_result($preresult,0,"KarmaCountView");
43 if($MyPostCountChk==null) { $MyPostCountChk = 0; }
44 if($MyKarmaCount==null) { $MyKarmaCount = 0; }
45 if($GroupInfo['HasAdminCP']!="yes"||$GroupInfo['HasModCP']!="yes") {
46 if($CategoryPostCountView!=0&&$MyPostCountChk<$CategoryPostCountView) {
47 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
48 if($CategoryKarmaCountView!=0&&$MyKarmaCount<$CategoryKarmaCountView) {
49 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } }
50 if(!isset($CatPermissionInfo['CanViewCategory'][$CategoryID])) {
51 $CatPermissionInfo['CanViewCategory'][$CategoryID] = "no"; }
52 if($CatPermissionInfo['CanViewCategory'][$CategoryID]=="no"||
53 $CatPermissionInfo['CanViewCategory'][$CategoryID]!="yes") {
54 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
55 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
56 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
57 if($CatPermissionInfo['CanViewCategory'][$CategoryID]=="yes") {
58 if(!isset($CatCheck)) { $CatCheck = null; }
59 if($CatCheck!="skip") {
60 if(isset($_SESSION['OldViewingPage'])) { $_SESSION['AncientViewingPage'] = $_SESSION['OldViewingPage']; } else { $_SESSION['AncientViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
61 if(isset($_SESSION['OldViewingFile'])) { $_SESSION['AncientViewingFile'] = $_SESSION['OldViewingFile']; } else {
62 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
63 $_SESSION['AncientViewingFile'] = $exfile['index'].$Settings['file_ext']; }
64 if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
65 $_SESSION['AncientViewingFile'] = $exfile['index']; } }
66 if(isset($_SESSION['OldPreViewingTitle'])) { $_SESSION['AncientPreViewingTitle'] = $_SESSION['OldPreViewingTitle']; } else { $_SESSION['AncientPreViewingTitle'] = "Viewing"; }
67 if(isset($_SESSION['OldViewingTitle'])) { $_SESSION['AncientViewingTitle'] = $_SESSION['OldViewingTitle']; } else { $_SESSION['AncientViewingTitle'] = "Board index"; }
68 if(isset($_SESSION['OldExtraData'])) { $_SESSION['AncientExtraData'] = $_SESSION['OldExtraData']; } else { $_SESSION['AncientExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
69 if(isset($_SESSION['ViewingPage'])) { $_SESSION['OldViewingPage'] = $_SESSION['ViewingPage']; } else { $_SESSION['OldViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
70 if(isset($_SESSION['ViewingFile'])) { $_SESSION['OldViewingFile'] = $_SESSION['ViewingFile']; } else {
71 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
72 $_SESSION['OldViewingFile'] = $exfile['index'].$Settings['file_ext']; }
73 if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
74 $_SESSION['OldViewingFile'] = $exfile['index']; } }
75 if(isset($_SESSION['PreViewingTitle'])) { $_SESSION['OldPreViewingTitle'] = $_SESSION['PreViewingTitle']; } else { $_SESSION['OldPreViewingTitle'] = "Viewing"; }
76 if(isset($_SESSION['ViewingTitle'])) { $_SESSION['OldViewingTitle'] = $_SESSION['ViewingTitle']; } else { $_SESSION['OldViewingTitle'] = "Board index"; }
77 if(isset($_SESSION['ExtraData'])) { $_SESSION['OldExtraData'] = $_SESSION['ExtraData']; } else { $_SESSION['OldExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
78 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=view&id=".$CategoryID,"&","=",$prexqstr[$CategoryType],$exqstr[$CategoryType]);
79 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
80 $_SESSION['ViewingFile'] = $exfile[$CategoryType].$Settings['file_ext']; }
81 if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
82 $_SESSION['ViewingFile'] = $exfile[$CategoryType]; }
83 $_SESSION['PreViewingTitle'] = "Viewing Category:";
84 $_SESSION['ViewingTitle'] = $CategoryName;
85 $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:".$InSubCategory.",".$CategoryID."; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;";
86 if($InSubCategory!="0") {
87 $iscquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."categories\" WHERE \"id\"=%i".$CatIgnoreList2." LIMIT 1", array($InSubCategory));
88 $iscresult=sql_query($iscquery,$SQLStat);
89 $iscnum=sql_num_rows($iscresult);
90 if($iscnum>=1) {
91 $iscCategoryID=sql_result($iscresult,0,"id");
92 $iscCategoryName=sql_result($iscresult,0,"Name");
93 $iscCategoryShow=sql_result($iscresult,0,"ShowCategory");
94 $iscCategoryType=sql_result($iscresult,0,"CategoryType");
95 $iscCategoryType = strtolower($iscCategoryType); }
96 if($iscnum<1) { $InSubCategory = "0"; }
97 sql_free_result($iscresult); }
99 <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']); ?>"><?php echo $Settings['board_name']; ?></a><?php if($InSubCategory!="0") { echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile[$iscCategoryType],$Settings['file_ext'],"act=view&id=".$iscCategoryID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr[$iscCategoryType],$exqstr[$iscCategoryType]); ?>"><?php echo $iscCategoryName; ?></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></div>
100 <div class="DivNavLinks">&nbsp;</div>
101 <?php
102 if($CategoryType=="subcategory") {
103 redirect("location",$rbasedir.url_maker($exfile['subcategory'],$Settings['file_ext'],"act=".$_GET['act']."&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['subcategory'],$exqstr['subcategory'],FALSE));
104 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
105 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } }
106 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"ShowForum\"='yes' AND \"CategoryID\"=%i AND \"InSubForum\"=0".$ForumIgnoreList2." ORDER BY \"OrderID\" ASC, \"id\" ASC", array($CategoryID));
107 $result=sql_query($query,$SQLStat);
108 $num=sql_num_rows($result);
109 $i=0;
110 if($num>=1) {
112 <div class="Table1Border">
113 <?php if($ThemeSet['TableStyle']=="div") { ?>
114 <div class="TableRow1">
115 <span style="text-align: left;">
116 <?php echo $ThemeSet['TitleIcon']; ?><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></span></div>
117 <?php } ?>
118 <table id="Cat<?php echo $CategoryID; ?>" class="Table1">
119 <?php if($ThemeSet['TableStyle']=="table") { ?>
120 <tr id="CatStart<?php echo $CategoryID; ?>" class="TableRow1">
121 <td class="TableColumn1" colspan="5"><span style="text-align: left;">
122 <?php echo $ThemeSet['TitleIcon']; ?><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></span>
123 </td>
124 </tr><?php } ?>
125 <tr id="ForumStatRow<?php echo $CategoryID; ?>" class="TableRow2">
126 <th class="TableColumn2" style="width: 4%;">&nbsp;</th>
127 <th class="TableColumn2" style="width: 58%;">Forum</th>
128 <th class="TableColumn2" style="width: 7%;">Topics</th>
129 <th class="TableColumn2" style="width: 7%;">Posts</th>
130 <th class="TableColumn2" style="width: 24%;">Last Topic</th>
131 </tr>
132 <?php }
133 while ($i < $num) {
134 $ForumID=sql_result($result,$i,"id");
135 $ForumName=sql_result($result,$i,"Name");
136 $ForumShow=sql_result($result,$i,"ShowForum");
137 $ForumType=sql_result($result,$i,"ForumType");
138 $ForumShowTopics=sql_result($result,$i,"CanHaveTopics");
139 $ForumShowTopics = strtolower($ForumShowTopics);
140 $NumTopics=sql_result($result,$i,"NumTopics");
141 $NumPosts=sql_result($result,$i,"NumPosts");
142 $NumRedirects=sql_result($result,$i,"Redirects");
143 $ForumDescription=sql_result($result,$i,"Description");
144 $ForumType = strtolower($ForumType); $sflist = null;
145 $gltf = array(null); $gltf[0] = $ForumID;
146 if ($ForumType=="subforum") {
147 $apcquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"ShowForum\"='yes' AND \"InSubForum\"=%i".$ForumIgnoreList2." ORDER BY \"OrderID\" ASC, \"id\" ASC", array($ForumID));
148 $apcresult=sql_query($apcquery,$SQLStat);
149 $apcnum=sql_num_rows($apcresult);
150 $apci=0; $apcl=1; if($apcnum>=1) {
151 while ($apci < $apcnum) {
152 $NumsTopics=sql_result($apcresult,$apci,"NumTopics");
153 $NumTopics = $NumsTopics + $NumTopics;
154 $NumsPosts=sql_result($apcresult,$apci,"NumPosts");
155 $NumPosts = $NumsPosts + $NumPosts;
156 $SubsForumID=sql_result($apcresult,$apci,"id");
157 $SubsForumName=sql_result($apcresult,$apci,"Name");
158 $SubsForumType=sql_result($apcresult,$apci,"ForumType");
159 $SubsForumShowTopics=sql_result($result,$i,"CanHaveTopics");
160 if(isset($PermissionInfo['CanViewForum'][$SubsForumID])&&
161 $PermissionInfo['CanViewForum'][$SubsForumID]=="yes") {
162 $ExStr = ""; if ($SubsForumType!="redirect"&&
163 $SubsForumShowTopics!="no") { $ExStr = "&page=1"; }
164 $sfurl = "<a href=\"";
165 $sfurl = url_maker($exfile[$SubsForumType],$Settings['file_ext'],"act=view&id=".$SubsForumID.$ExStr,$Settings['qstr'],$Settings['qsep'],$prexqstr[$SubsForumType],$exqstr[$SubsForumType]);
166 $sfurl = "<a href=\"".$sfurl."\">".$SubsForumName."</a>";
167 if($apcl==1) {
168 $sflist = "Subforums:";
169 $sflist = $sflist." ".$sfurl; }
170 if($apcl>1) {
171 $sflist = $sflist.", ".$sfurl; }
172 $gltf[$apcl] = $SubsForumID; ++$apcl; }
173 ++$apci; }
174 sql_free_result($apcresult); } }
175 if(isset($PermissionInfo['CanViewForum'][$ForumID])&&
176 $PermissionInfo['CanViewForum'][$ForumID]=="yes") {
177 $LastTopic = "&nbsp;<br />&nbsp;<br />&nbsp;";
178 if(!isset($LastTopic)) { $LastTopic = null; }
179 $gltnum = count($gltf); $glti = 0;
180 $OldUpdateTime = 0; $UseThisFonum = null;
181 if ($ForumType=="subforum") {
182 while ($glti < $gltnum) {
183 $ExtraIgnores = null;
184 if($PermissionInfo['CanModForum'][$gltf[$glti]]=="no") {
185 $ExtraIgnores = " AND \"Closed\"<>3"; }
186 $gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i".$ExtraIgnores.$ForumIgnoreList4." ORDER BY \"LastUpdate\" DESC LIMIT 1", array($gltf[$glti]));
187 $gltforesult=sql_query($gltfoquery,$SQLStat);
188 $gltfonum=sql_num_rows($gltforesult);
189 if($gltfonum>0) {
190 $NewUpdateTime=sql_result($gltforesult,0,"LastUpdate");
191 if($NewUpdateTime>$OldUpdateTime) {
192 $UseThisFonum = $gltf[$glti];
193 $OldUpdateTime = $NewUpdateTime; }
194 sql_free_result($gltforesult); }
195 ++$glti; }
196 if($UseThisFonum==0) {
197 $UseThisFonum = $gltf[0]; } }
198 if ($ForumType!="subforum"&&$ForumType!="redirect") { $UseThisFonum = $gltf[0]; }
199 if ($ForumType!="redirect") {
200 $ExtraIgnores = null;
201 if($PermissionInfo['CanModForum'][$UseThisFonum]=="no") {
202 $ExtraIgnores = " AND \"Closed\"<>3"; }
203 $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));
204 $gltresult=sql_query($gltquery,$SQLStat);
205 $gltnum=sql_num_rows($gltresult);
206 if($gltnum>0){
207 $TopicID=sql_result($gltresult,0,"id");
208 $TopicName=sql_result($gltresult,0,"TopicName");
209 $NumReplys=sql_result($gltresult,0,"NumReply");
210 $NumPages = null; $NumRPosts = $NumReplys + 1;
211 if(!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; }
212 if($NumRPosts>$Settings['max_posts']) {
213 $NumPages = ceil($NumRPosts/$Settings['max_posts']); }
214 if($NumRPosts<=$Settings['max_posts']) { $NumPages = 1; }
215 $TopicName1 = pre_substr($TopicName,0,20);
216 $oldtopicname=$TopicName;
217 if (pre_strlen($TopicName)>20) {
218 $TopicName1 = $TopicName1."..."; $TopicName=$TopicName1; }
219 $glrquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"TopicID\"=%i ORDER BY \"TimeStamp\" DESC LIMIT 1", array($TopicID));
220 $glrresult=sql_query($glrquery,$SQLStat);
221 $glrnum=sql_num_rows($glrresult);
222 if($glrnum>0){
223 $ReplyID=sql_result($glrresult,0,"id");
224 $UsersID=sql_result($glrresult,0,"UserID");
225 $GuestsName=sql_result($glrresult,0,"GuestName");
226 $TimeStamp=sql_result($glrresult,0,"TimeStamp");
227 $tmpusrcurtime = new DateTime();
228 $tmpusrcurtime->setTimestamp($TimeStamp);
229 $tmpusrcurtime->setTimezone($usertz);
230 $TimeStamp=$tmpusrcurtime->format($_SESSION['iDBDateFormat'].", ".$_SESSION['iDBTimeFormat']);
231 sql_free_result($glrresult); }
232 $PreUsersName = GetUserName($UsersID,$Settings['sqltable'],$SQLStat);
233 if($PreUsersName['Name']===null) { $UsersID = -1;
234 $PreUsersName = GetUserName($UsersID,$Settings['sqltable'],$SQLStat); }
235 $UsersName = $PreUsersName['Name'];
236 $UsersHidden = $PreUsersName['Hidden'];
237 if($UsersName=="Guest") { $UsersName=$GuestsName;
238 if($UsersName==null) { $UsersName="Guest"; } }
239 $UsersName1 = pre_substr($UsersName,0,20);
240 $oldusername=$UsersName;
241 if (pre_strlen($UsersName)>20) {
242 $UsersName1 = $UsersName1."..."; $UsersName=$UsersName1; }
243 $lul = null;
244 if($UsersID>0&&$UsersHidden=="no") {
245 $lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']);
246 $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>"; }
247 if($UsersID<=0||$UsersHidden=="yes") {
248 if($UsersID==-1) { $UserPre = "Guest:"; }
249 if(($UsersID<-1&&$UsersHidden=="yes")||$UsersID==0||($UsersID>0&&$UsersHidden=="yes")) {
250 $UserPre = "Hidden:"; }
251 $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>"; } }
252 if($LastTopic==null) { $LastTopic = "&nbsp;<br />&nbsp;<br />&nbsp;"; }
253 sql_free_result($gltresult); }
254 if ($ForumType=="redirect") { $LastTopic="&nbsp;<br />Redirects: ".$NumRedirects."<br />&nbsp;"; }
255 $PreForum = $ThemeSet['ForumIcon'];
256 if ($ForumType=="forum") { $PreForum=$ThemeSet['ForumIcon']; }
257 if ($ForumType=="subforum") { $PreForum=$ThemeSet['SubForumIcon']; }
258 if ($ForumType=="redirect") { $PreForum=$ThemeSet['RedirectIcon']; }
259 $ExStr = ""; if ($ForumType!="redirect"&&
260 $ForumShowTopics!="no") { $ExStr = "&page=1"; }
261 if($ThemeSet['ForumStyle']==1) {
262 $ForumClass[1] = " class=\"TableColumn3\" ";
263 $ForumClass[2] = " class=\"TableColumn3\" ";
264 $ForumClass[3] = " class=\"TableColumn3\" ";
265 $ForumClass[4] = " class=\"TableColumn3\" ";
266 $ForumClass[5] = " class=\"TableColumn3\" "; }
267 if($ThemeSet['ForumStyle']==2) {
268 $ForumClass[1] = " class=\"TableColumn3\" ";
269 $ForumClass[2] = " class=\"TableColumn3\" ";
270 $ForumClass[3] = " class=\"TableColumn3Alt\" ";
271 $ForumClass[4] = " class=\"TableColumn3Alt\" ";
272 $ForumClass[5] = " class=\"TableColumn3Alt\" "; }
274 <tr class="TableRow3" id="Forum<?php echo $ForumID; ?>">
275 <td<?php echo $ForumClass[1]; ?>><div class="forumicon">
276 <?php echo $PreForum; ?></div></td>
277 <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>
278 <div class="forumdescription">
279 <?php echo $ForumDescription; ?><br />
280 <?php echo $sflist; ?></div></td>
281 <td<?php echo $ForumClass[3]; ?>style="text-align: center;"><?php echo $NumTopics; ?></td>
282 <td<?php echo $ForumClass[4]; ?>style="text-align: center;"><?php echo $NumPosts; ?></td>
283 <td<?php echo $ForumClass[5]; ?>><?php echo $LastTopic; ?></td>
284 </tr>
285 <?php } ++$i; } sql_free_result($result);
286 if($num>=1) { ?>
287 <tr id="CatEnd<?php echo $CategoryID; ?>" class="TableRow4">
288 <td class="TableColumn4" colspan="5">&nbsp;</td>
289 </tr>
290 </table></div>
291 <div class="DivCategories">&nbsp;</div>
292 <?php } } }
293 sql_free_result($preresult); ?>