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-2010 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: subcategories.php - Last Update: 09/09/2010 SVN 533 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="subcategories.php"||
$File3Name=="/subcategories.php") {
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']."categories\" WHERE \"id\"=%i 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(); }
32 $CategoryID=sql_result($checkresult,0,"id");
33 $CategoryName=sql_result($checkresult,0,"Name");
34 $CategoryShow=sql_result($checkresult,0,"ShowCategory");
35 $CategoryType=sql_result($checkresult,0,"CategoryType");
36 $InSubCategory=sql_result($checkresult,0,"InSubCategory");
37 $SubShowForums=sql_result($checkresult,0,"SubShowForums");
38 $CategoryType = strtolower($CategoryType); $SubShowForums = strtolower($SubShowForums);
39 $SCategoryName = $CategoryName;
40 if(!isset($CatPermissionInfo['CanViewCategory'][$CategoryID])) {
41 $CatPermissionInfo['CanViewCategory'][$CategoryID] = "no"; }
42 if($CatPermissionInfo['CanViewCategory'][$CategoryID]=="no"||
43 $CatPermissionInfo['CanViewCategory'][$CategoryID]!="yes") {
44 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
45 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
46 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
47 if($CatPermissionInfo['CanViewCategory'][$CategoryID]=="yes") {
48 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=view&id=".$CategoryID,"&","=",$prexqstr[$CategoryType],$exqstr[$CategoryType]);
49 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
50 $_SESSION['ViewingFile'] = $exfile[$CategoryType].$Settings['file_ext']; }
51 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
52 $_SESSION['ViewingFile'] = $exfile[$CategoryType]; }
53 $_SESSION['PreViewingTitle'] = "Viewing SubCategory:";
54 $_SESSION['ViewingTitle'] = $CategoryName;
55 if($InSubCategory!="0") {
56 $iscquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."categories\" WHERE \"id\"=%i LIMIT 1", array($InSubCategory));
57 $iscresult=sql_query($iscquery,$SQLStat);
58 $iscnum=sql_num_rows($iscresult);
60 $iscCategoryID=sql_result($iscresult,0,"id");
61 $iscCategoryName=sql_result($iscresult,0,"Name");
62 $iscCategoryShow=sql_result($iscresult,0,"ShowCategory");
63 $iscCategoryType=sql_result($iscresult,0,"CategoryType");
64 $iscCategoryType = strtolower($iscCategoryType); }
65 if($iscnum<1) { $InSubCategory = "0"; }
66 sql_free_result($iscresult); }
68 <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
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
>
69 <div
class="DivNavLinks"> 
;</div
>
71 if($CategoryType=="category") {
72 redirect("location",$rbasedir.url_maker($exfile['category'],$Settings['file_ext'],"act=".$_GET['act']."&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['category'],$exqstr['category'],FALSE));
73 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
74 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
75 sql_free_result($checkresult);
76 $prequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."categories\" WHERE \"ShowCategory\"='yes' AND \"InSubCategory\"=%i ORDER BY \"OrderID\" ASC, \"id\" ASC", array($_GET['id']));
77 $preresult=sql_query($prequery,$SQLStat);
78 $prenum=sql_num_rows($preresult);
80 while ($prei < $prenum) {
81 $CategoryID=sql_result($preresult,$prei,"id");
82 $CategoryName=sql_result($preresult,$prei,"Name");
83 $CategoryShow=sql_result($preresult,$prei,"ShowCategory");
84 $CategoryType=sql_result($preresult,$prei,"CategoryType");
85 $SSubShowForums=sql_result($preresult,$prei,"SubShowForums");
86 $CategoryDescription=sql_result($preresult,$prei,"Description");
87 $CategoryType = strtolower($CategoryType); $SubShowForums = strtolower($SubShowForums);
88 if(isset($CatPermissionInfo['CanViewCategory'][$CategoryID])&&
89 $CatPermissionInfo['CanViewCategory'][$CategoryID]=="yes") {
90 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"ShowForum\"='yes' AND \"CategoryID\"=%i AND \"InSubForum\"=0 ORDER BY \"OrderID\" ASC, \"id\" ASC", array($CategoryID));
91 $result=sql_query($query,$SQLStat);
92 $num=sql_num_rows($result);
96 <div
class="Table1Border">
97 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
98 <div
class="TableRow1">
99 <span style
="text-align: left;">
100 <?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
>
102 <table
class="Table1" id
="SubCat<?php echo $CategoryID; ?>">
103 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
104 <tr id
="SubCatStart<?php echo $CategoryID; ?>" class="TableRow1">
105 <td
class="TableColumn1" colspan
="5"><span style
="text-align: left;">
106 <?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
>
109 <tr id
="ForumStatRow<?php echo $CategoryID; ?>" class="TableRow2">
110 <th
class="TableColumn2" style
="width: 4%;"> 
;</th
>
111 <th
class="TableColumn2" style
="width: 58%;">Forum
</th
>
112 <th
class="TableColumn2" style
="width: 7%;">Topics
</th
>
113 <th
class="TableColumn2" style
="width: 7%;">Posts
</th
>
114 <th
class="TableColumn2" style
="width: 24%;">Last Topic
</th
>
118 $ForumID=sql_result($result,$i,"id");
119 $ForumName=sql_result($result,$i,"Name");
120 $ForumShow=sql_result($result,$i,"ShowForum");
121 $ForumType=sql_result($result,$i,"ForumType");
122 $ForumShowTopics=sql_result($result,$i,"CanHaveTopics");
123 $ForumShowTopics = strtolower($ForumShowTopics);
124 $NumTopics=sql_result($result,$i,"NumTopics");
125 $NumPosts=sql_result($result,$i,"NumPosts");
126 $NumRedirects=sql_result($result,$i,"Redirects");
127 $ForumDescription=sql_result($result,$i,"Description");
128 $ForumType = strtolower($ForumType); $sflist = null;
129 $gltf = array(null); $gltf[0] = $ForumID;
130 if ($ForumType=="subforum") {
131 $apcquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"ShowForum\"='yes' AND \"InSubForum\"=%i ORDER BY \"OrderID\" ASC, \"id\" ASC", array($ForumID));
132 $apcresult=sql_query($apcquery,$SQLStat);
133 $apcnum=sql_num_rows($apcresult);
134 $apci=0; $apcl=1; if($apcnum>=1) {
135 while ($apci < $apcnum) {
136 $NumsTopics=sql_result($apcresult,$apci,"NumTopics");
137 $NumTopics = $NumsTopics +
$NumTopics;
138 $NumsPosts=sql_result($apcresult,$apci,"NumPosts");
139 $NumPosts = $NumsPosts +
$NumPosts;
140 $SubsForumID=sql_result($apcresult,$apci,"id");
141 $SubsForumName=sql_result($apcresult,$apci,"Name");
142 $SubsForumType=sql_result($apcresult,$apci,"ForumType");
143 $SubsForumShowTopics=sql_result($result,$i,"CanHaveTopics");
144 if(isset($PermissionInfo['CanViewForum'][$SubsForumID])&&
145 $PermissionInfo['CanViewForum'][$SubsForumID]=="yes") {
146 $ExStr = ""; if ($SubsForumType!="redirect"&&
147 $SubsForumShowTopics!="no") { $ExStr = "&page=1"; }
148 $sfurl = "<a href=\"";
149 $sfurl = url_maker($exfile[$SubsForumType],$Settings['file_ext'],"act=view&id=".$SubsForumID.$ExStr,$Settings['qstr'],$Settings['qsep'],$prexqstr[$SubsForumType],$exqstr[$SubsForumType]);
150 $sfurl = "<a href=\"".$sfurl."\">".$SubsForumName."</a>";
152 $sflist = "Subforums:";
153 $sflist = $sflist." ".$sfurl; }
155 $sflist = $sflist.", ".$sfurl; }
156 $gltf[$apcl] = $SubsForumID; ++
$apcl; }
158 sql_free_result($apcresult); } }
159 $gltf = array(null); $gltf[0] = $ForumID;
160 if ($ForumType=="subforum") {
161 $apcquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"ShowForum\"='yes' AND \"InSubForum\"=%i ORDER BY \"OrderID\" ASC, \"id\" ASC", array($ForumID));
162 $apcresult=sql_query($apcquery,$SQLStat);
163 $apcnum=sql_num_rows($apcresult);
164 $apci=0; $apcl=1; if($apcnum>=1) {
165 while ($apci < $apcnum) {
166 $NumsTopics=sql_result($apcresult,$apci,"NumTopics");
167 $NumTopics = $NumsTopics +
$NumTopics;
168 $NumsPosts=sql_result($apcresult,$apci,"NumPosts");
169 $NumPosts = $NumsPosts +
$NumPosts;
170 $SubsForumID=sql_result($apcresult,$apci,"id");
171 $SubsForumName=sql_result($apcresult,$apci,"Name");
172 $SubsForumType=sql_result($apcresult,$apci,"ForumType");
173 if(isset($PermissionInfo['CanViewForum'][$SubsForumID])&&
174 $PermissionInfo['CanViewForum'][$SubsForumID]=="yes") {
175 $sfurl = "<a href=\"";
176 $sfurl = url_maker($exfile[$SubsForumType],$Settings['file_ext'],"act=view&id=".$SubsForumID.$ExStr,$Settings['qstr'],$Settings['qsep'],$prexqstr[$SubsForumType],$exqstr[$SubsForumType]);
177 $sfurl = "<a href=\"".$sfurl."\">".$SubsForumName."</a>";
179 $sflist = "Subforums:";
180 $sflist = $sflist." ".$sfurl; }
182 $sflist = $sflist.", ".$sfurl; }
183 $gltf[$apcl] = $SubsForumID; ++
$apcl; }
185 sql_free_result($apcresult); } }
186 if ($ForumType=="subforum") {
187 $apcquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"ShowForum\"='yes' AND \"InSubForum\"=%i ORDER BY \"OrderID\" ASC, \"id\" ASC", array($ForumID));
188 $apcresult=sql_query($apcquery,$SQLStat);
189 $apcnum=sql_num_rows($apcresult);
190 $apci=0; $apcl=1; if($apcnum>=1) {
191 while ($apci < $apcnum) {
192 $NumsTopics=sql_result($apcresult,$apci,"NumTopics");
193 $NumTopics = $NumsTopics +
$NumTopics;
194 $NumsPosts=sql_result($apcresult,$apci,"NumPosts");
195 $NumPosts = $NumsPosts +
$NumPosts;
196 $SubsForumID=sql_result($apcresult,$apci,"id");
197 if(isset($PermissionInfo['CanViewForum'][$SubsForumID])&&
198 $PermissionInfo['CanViewForum'][$SubsForumID]=="yes") {
199 $gltf[$apcl] = $SubsForumID; ++
$apcl; }
201 sql_free_result($apcresult); } }
202 if(isset($PermissionInfo['CanViewForum'][$ForumID])&&
203 $PermissionInfo['CanViewForum'][$ForumID]=="yes") {
204 $LastTopic = " <br /> <br /> ";
205 if(!isset($LastTopic)) { $LastTopic = null; }
206 $gltnum = count($gltf); $glti = 0;
207 $OldUpdateTime = 0; $UseThisFonum = null;
208 if ($ForumType=="subforum") {
209 while ($glti < $gltnum) {
210 $gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i ORDER BY \"LastUpdate\" DESC LIMIT 1", array($gltf[$glti]));
211 $gltforesult=sql_query($gltfoquery,$SQLStat);
212 $gltfonum=sql_num_rows($gltforesult);
214 $NewUpdateTime=sql_result($gltforesult,0,"LastUpdate");
215 if($NewUpdateTime>$OldUpdateTime) {
216 $UseThisFonum = $gltf[$glti];
217 $OldUpdateTime = $NewUpdateTime; }
218 sql_free_result($gltforesult); }
220 if ($ForumType!="subforum"&&$ForumType!="redirect") { $UseThisFonum = $gltf[0]; }
221 if ($ForumType!="redirect") {
222 $gltquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i) OR (\"OldForumID\"=%i) ORDER BY \"LastUpdate\" DESC LIMIT 1", array($UseThisFonum,$UseThisFonum));
223 $gltresult=sql_query($gltquery,$SQLStat);
224 $gltnum=sql_num_rows($gltresult);
226 $TopicID=sql_result($gltresult,0,"id");
227 $TopicName=sql_result($gltresult,0,"TopicName");
228 $NumReplys=sql_result($gltresult,0,"NumReply");
229 $NumPages = null; $NumRPosts = $NumReplys +
1;
230 if(!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; }
231 if($NumRPosts>$Settings['max_posts']) {
232 $NumPages = ceil($NumRPosts/$Settings['max_posts']); }
233 if($NumRPosts<=$Settings['max_posts']) { $NumPages = 1; }
234 $TopicName1 = pre_substr($TopicName,0,20);
235 $oldtopicname=$TopicName;
236 if (pre_strlen($TopicName)>20) {
237 $TopicName1 = $TopicName1."..."; $TopicName=$TopicName1; }
238 $glrquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"TopicID\"=%i ORDER BY \"TimeStamp\" DESC LIMIT 1", array($TopicID));
239 $glrresult=sql_query($glrquery,$SQLStat);
240 $glrnum=sql_num_rows($glrresult);
242 $ReplyID=sql_result($glrresult,0,"id");
243 $UsersID=sql_result($glrresult,0,"UserID");
244 $GuestsName=sql_result($glrresult,0,"GuestName");
245 $TimeStamp=sql_result($glrresult,0,"TimeStamp");
246 $TimeStamp=GMTimeChange("F j Y, g:i a",$TimeStamp,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
247 sql_free_result($glrresult); }
248 $PreUsersName = GetUserName($UsersID,$Settings['sqltable'],$SQLStat);
249 if($PreUsersName['Name']===null) { $UsersID = -1;
250 $PreUsersName = GetUserName($UsersID,$Settings['sqltable'],$SQLStat); }
251 $UsersName = $PreUsersName['Name'];
252 $UsersHidden = $PreUsersName['Hidden'];
253 if($UsersName=="Guest") { $UsersName=$GuestsName;
254 if($UsersName==null) { $UsersName="Guest"; } }
255 $UsersName1 = pre_substr($UsersName,0,20);
256 $oldusername=$UsersName;
257 if (pre_strlen($UsersName)>20) {
258 $UsersName1 = $UsersName1."..."; $UsersName=$UsersName1; }
260 if($UsersID>0&&$UsersHidden=="no") {
261 $lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']);
262 $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."#reply".$NumRPosts."\" title=\"".$oldtopicname."\">".$TopicName."</a><br />\nUser: <a href=\"".$lul."\" title=\"".$oldusername."\">".$UsersName."</a>"; }
263 if($UsersID<=0||
$UsersHidden=="yes") {
264 if($UsersID==-1) { $UserPre = "Guest:"; }
265 if(($UsersID<-1&&$UsersHidden=="yes")||
$UsersID==0||
($UsersID>0&&$UsersHidden=="yes")) {
266 $UserPre = "Hidden:"; }
267 $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."#reply".$NumRPosts."\" title=\"".$oldtopicname."\">".$TopicName."</a><br />\n".$UserPre." <span title=\"".$oldusername."\">".$UsersName."</span>"; } }
268 if($LastTopic==null) { $LastTopic = " <br /> <br /> "; }
269 sql_free_result($gltresult); }
270 if ($ForumType=="redirect") { $LastTopic=" <br />Redirects: ".$NumRedirects."<br /> "; }
271 $PreForum = $ThemeSet['ForumIcon'];
272 if ($ForumType=="forum") { $PreForum=$ThemeSet['ForumIcon']; }
273 if ($ForumType=="subforum") { $PreForum=$ThemeSet['SubForumIcon']; }
274 if ($ForumType=="redirect") { $PreForum=$ThemeSet['RedirectIcon']; }
275 $ExStr = ""; if ($ForumType!="redirect"&&
276 $ForumShowTopics!="no") { $ExStr = "&page=1"; }
277 if($ThemeSet['ForumStyle']==1) {
278 $ForumClass[1] = " class=\"TableColumn3\" ";
279 $ForumClass[2] = " class=\"TableColumn3\" ";
280 $ForumClass[3] = " class=\"TableColumn3\" ";
281 $ForumClass[4] = " class=\"TableColumn3\" ";
282 $ForumClass[5] = " class=\"TableColumn3\" "; }
283 if($ThemeSet['ForumStyle']==2) {
284 $ForumClass[1] = " class=\"TableColumn3\" ";
285 $ForumClass[2] = " class=\"TableColumn3\" ";
286 $ForumClass[3] = " class=\"TableColumn3Alt\" ";
287 $ForumClass[4] = " class=\"TableColumn3Alt\" ";
288 $ForumClass[5] = " class=\"TableColumn3Alt\" "; }
290 <tr
class="TableRow3" id
="Forum<?php echo $ForumID; ?>">
291 <td
<?php
echo $ForumClass[1]; ?
>><div
class="forumicon">
292 <?php
echo $PreForum; ?
></div
></td
>
293 <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
>
294 <div
class="forumdescription"><?php
echo $ForumDescription; ?
><br
/>
295 <?php
echo $sflist; ?
></div
></td
>
296 <td
<?php
echo $ForumClass[3]; ?
>style
="text-align: center;"><?php
echo $NumTopics; ?
></td
>
297 <td
<?php
echo $ForumClass[4]; ?
>style
="text-align: center;"><?php
echo $NumPosts; ?
></td
>
298 <td
<?php
echo $ForumClass[5]; ?
>><?php
echo $LastTopic; ?
></td
>
300 <?php
} ++
$i; } sql_free_result($result);
303 <tr id
="SubCatEnd<?php echo $CategoryID; ?>" class="TableRow4">
304 <td
class="TableColumn4" colspan
="5"> 
;</td
>
307 <div
class="DivSubCategories"> 
;</div
>
308 <?php
} } ++
$prei; } }
309 sql_free_result($preresult);
311 if($SubShowForums!="yes") {
312 $CategoryName = $SCategoryName; }
313 if($SubShowForums!="no") {
314 require($SettDir['inc'].'categories.php'); } }