=1) { $CategoryID=sql_result($checkresult,0,"id"); $CategoryName=sql_result($checkresult,0,"Name"); $CategoryShow=sql_result($checkresult,0,"ShowCategory"); if($CategoryShow=="no") { $_SESSION['ShowActHidden'] = "yes"; } $CategoryType=sql_result($checkresult,0,"CategoryType"); $InSubCategory=sql_result($checkresult,0,"InSubCategory"); $SubShowForums=sql_result($checkresult,0,"SubShowForums"); $CategoryType = strtolower($CategoryType); $SubShowForums = strtolower($SubShowForums); $SCategoryName = $CategoryName; if(!isset($CatPermissionInfo['CanViewCategory'][$CategoryID])) { $CatPermissionInfo['CanViewCategory'][$CategoryID] = "no"; } if($CatPermissionInfo['CanViewCategory'][$CategoryID]=="no"|| $CatPermissionInfo['CanViewCategory'][$CategoryID]!="yes") { redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302; gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } if($CatPermissionInfo['CanViewCategory'][$CategoryID]=="yes") { if(isset($_SESSION['OldViewingPage'])) { $_SESSION['AncientViewingPage'] = $_SESSION['OldViewingPage']; } else { $_SESSION['AncientViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); } if(isset($_SESSION['OldViewingFile'])) { $_SESSION['AncientViewingFile'] = $_SESSION['OldViewingFile']; } else { if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") { $_SESSION['AncientViewingFile'] = $exfile['index'].$Settings['file_ext']; } if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") { $_SESSION['AncientViewingFile'] = $exfile['index']; } } if(isset($_SESSION['OldPreViewingTitle'])) { $_SESSION['AncientPreViewingTitle'] = $_SESSION['OldPreViewingTitle']; } else { $_SESSION['AncientPreViewingTitle'] = "Viewing"; } if(isset($_SESSION['OldViewingTitle'])) { $_SESSION['AncientViewingTitle'] = $_SESSION['OldViewingTitle']; } else { $_SESSION['AncientViewingTitle'] = "Board index"; } 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;"; } if(isset($_SESSION['ViewingPage'])) { $_SESSION['OldViewingPage'] = $_SESSION['ViewingPage']; } else { $_SESSION['OldViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); } if(isset($_SESSION['ViewingFile'])) { $_SESSION['OldViewingFile'] = $_SESSION['ViewingFile']; } else { if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") { $_SESSION['OldViewingFile'] = $exfile['index'].$Settings['file_ext']; } if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") { $_SESSION['OldViewingFile'] = $exfile['index']; } } if(isset($_SESSION['PreViewingTitle'])) { $_SESSION['OldPreViewingTitle'] = $_SESSION['PreViewingTitle']; } else { $_SESSION['OldPreViewingTitle'] = "Viewing"; } if(isset($_SESSION['ViewingTitle'])) { $_SESSION['OldViewingTitle'] = $_SESSION['ViewingTitle']; } else { $_SESSION['OldViewingTitle'] = "Board index"; } 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;"; } $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=lowview&id=".$CategoryID,"&","=",$prexqstr[$CategoryType],$exqstr[$CategoryType]); if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") { $_SESSION['ViewingFile'] = $exfile[$CategoryType].$Settings['file_ext']; } if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") { $_SESSION['ViewingFile'] = $exfile[$CategoryType]; } $_SESSION['PreViewingTitle'] = "Viewing SubCategory:"; $_SESSION['ViewingTitle'] = $CategoryName; $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:".$InSubCategory.",".$CategoryID."; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; if($InSubCategory!="0") { $iscquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."categories\" WHERE \"id\"=%i".$CatIgnoreList2." LIMIT 1", array($InSubCategory)); $iscresult=sql_query($iscquery,$SQLStat); $iscnum=sql_num_rows($iscresult); if($iscnum>=1) { $iscCategoryID=sql_result($iscresult,0,"id"); $iscCategoryName=sql_result($iscresult,0,"Name"); $iscCategoryShow=sql_result($iscresult,0,"ShowCategory"); $iscCategoryType=sql_result($iscresult,0,"CategoryType"); $iscCategoryType = strtolower($iscCategoryType); } if($iscnum<1) { $InSubCategory = "0"; } sql_free_result($iscresult); } ?>