Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: categories.php - Last Update: 09/09/2010 SVN 533 - Author: cooldude2k $
+ $FileInfo: categories.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="categories.php"||$File3Name=="/categories.php") {
$OldUpdateTime = 0; $UseThisFonum = null;
if ($ForumType=="subforum") {
while ($glti < $gltnum) {
-$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i ORDER BY \"LastUpdate\" DESC LIMIT 1", array($gltf[$glti]));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$gltf[$glti]]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i".$ExtraIgnores." ORDER BY \"LastUpdate\" DESC LIMIT 1", array($gltf[$glti]));
$gltforesult=sql_query($gltfoquery,$SQLStat);
$gltfonum=sql_num_rows($gltforesult);
if($gltfonum>0) {
++$glti; } }
if ($ForumType!="subforum"&&$ForumType!="redirect") { $UseThisFonum = $gltf[0]; }
if ($ForumType!="redirect") {
-$gltquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i) OR (\"OldForumID\"=%i) ORDER BY \"LastUpdate\" DESC LIMIT 1", array($UseThisFonum,$UseThisFonum));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$UseThisFonum]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$gltquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i".$ExtraIgnores.") OR (\"OldForumID\"=%i".$ExtraIgnores.") ORDER BY \"LastUpdate\" DESC LIMIT 1", array($UseThisFonum,$UseThisFonum));
$gltresult=sql_query($gltquery,$SQLStat);
$gltnum=sql_num_rows($gltresult);
if($gltnum>0){
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: forums.php - Last Update: 09/09/2010 SVN 533 - Author: cooldude2k $
+ $FileInfo: forums.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="forums.php"||$File3Name=="/forums.php") {
$OldUpdateTime = 0; $UseThisFonum = null;
if ($ForumType=="subforum") {
while ($glti < $gltnum) {
-$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i ORDER BY \"LastUpdate\" DESC LIMIT 1", array($gltf[$glti]));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$gltf[$glti]]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i".$ExtraIgnores." ORDER BY \"LastUpdate\" DESC LIMIT 1", array($gltf[$glti]));
$gltforesult=sql_query($gltfoquery,$SQLStat);
$gltfonum=sql_num_rows($gltforesult);
if($gltfonum>0) {
++$glti; } }
if ($ForumType!="subforum"&&$ForumType!="redirect") { $UseThisFonum = $gltf[0]; }
if ($ForumType!="redirect") {
-$gltquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i) OR (\"OldForumID\"=%i) ORDER BY \"LastUpdate\" DESC LIMIT 1", array($UseThisFonum,$UseThisFonum));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$UseThisFonum]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$gltquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i".$ExtraIgnores.") OR (\"OldForumID\"=%i".$ExtraIgnores.") ORDER BY \"LastUpdate\" DESC LIMIT 1", array($UseThisFonum,$UseThisFonum));
$gltresult=sql_query($gltquery,$SQLStat);
$gltnum=sql_num_rows($gltresult);
if($gltnum>0){
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: lowforums.php - Last Update: 06/07/2010 SVN 520 - Author: cooldude2k $
+ $FileInfo: lowforums.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="lowforums.php"||$File3Name=="/lowforums.php") {
$OldUpdateTime = 0; $UseThisFonum = null;
if ($ForumType=="subforum") {
while ($glti < $gltnum) {
-$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i ORDER BY \"LastUpdate\" DESC LIMIT 1", array($gltf[$glti]));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$gltf[$glti]]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i".$ExtraIgnores." ORDER BY \"LastUpdate\" DESC LIMIT 1", array($gltf[$glti]));
$gltforesult=sql_query($gltfoquery,$SQLStat);
$gltfonum=sql_num_rows($gltforesult);
if($gltfonum>0) {
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: lowreplies.php - Last Update: 06/07/2010 SVN 520 - Author: cooldude2k $
+ $FileInfo: lowreplies.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="replies.php"||$File3Name=="/replies.php") {
$TopicForumID=sql_result($preresult,0,"ForumID");
$TopicCatID=sql_result($preresult,0,"CategoryID");
$TopicClosed=sql_result($preresult,0,"Closed");
+if($TopicClosed==3&&$PermissionInfo['CanModForum'][$TopicForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
$NumberReplies=sql_result($preresult,0,"NumReply");
$ViewTimes=sql_result($preresult,0,"NumViews");
sql_free_result($preresult);
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: lowsubcategories.php - Last Update: 06/07/2010 SVN 520 - Author: cooldude2k $
+ $FileInfo: lowsubcategories.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="lowsubcategories.php"||$File3Name=="/lowsubcategories.php") {
$OldUpdateTime = 0; $UseThisFonum = null;
if ($ForumType=="subforum") {
while ($glti < $gltnum) {
-$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"CategoryID\"=%i AND \"ForumID\"=%i ORDER BY \"LastUpdate\" DESC LIMIT 1", array($CategoryID,$gltf[$glti]));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$gltf[$glti]]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"CategoryID\"=%i AND \"ForumID\"=%i".$ExtraIgnores." ORDER BY \"LastUpdate\" DESC LIMIT 1", array($CategoryID,$gltf[$glti]));
$gltforesult=sql_query($gltfoquery,$SQLStat);
$gltfonum=sql_num_rows($gltforesult);
if($gltfonum>0) {
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: lowtopics.php - Last Update: 06/07/2010 SVN 520 - Author: cooldude2k $
+ $FileInfo: lowtopics.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="lowtopics.php"||$File3Name=="/lowtopics.php") {
if($PageLimit<0) { $PageLimit = 0; }
//End Topic Page Code
$i=0;
-$query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i ORDER BY \"Pinned\" DESC, \"LastUpdate\" DESC ".$SQLimit, array($_GET['id'],$PageLimit,$Settings['max_topics']));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$_GET['id']]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i".$ExtraIgnores." ORDER BY \"Pinned\" DESC, \"LastUpdate\" DESC ".$SQLimit, array($_GET['id'],$PageLimit,$Settings['max_topics']));
$result=sql_query($query,$SQLStat);
$num=sql_num_rows($result);
//List Page Number Code Start
<?php }
while ($i < $num) {
$TopicID=sql_result($result,$i,"id");
+$TForumID=sql_result($result,$i,"ForumID");
+$OldForumID=sql_result($result,$i,"OldForumID");
$UsersID=sql_result($result,$i,"UserID");
$GuestsName=sql_result($result,$i,"GuestName");
$TheTime=sql_result($result,$i,"TimeStamp");
$PinnedTopic=sql_result($result,$i,"Pinned");
$TopicStat=sql_result($result,$i,"Closed");
$PreTopic = null;
-if ($PinnedTopic>1) { $PinnedTopic = 1; }
+if ($PinnedTopic>2) { $PinnedTopic = 1; }
if ($PinnedTopic<0) { $PinnedTopic = 0; }
if(!is_numeric($PinnedTopic)) { $PinnedTopic = 0; }
-if ($TopicStat>1) { $TopicStat = 1; }
+if ($TopicStat>3) { $TopicStat = 1; }
if ($TopicStat<0) { $TopicStat = 0; }
if(!is_numeric($TopicStat)) { $TopicStat = 1; }
-if ($PinnedTopic==1) { $PreTopic="Pinned: "; }
+if ($PinnedTopic>0&&$PinnedTopic<3&&) { $PreTopic="<span style=\"font-weight: bold;\">Pinned: </span>"; }
if ($PinnedTopic==0) { $PreTopic=null; }
+if ($OldForumID==$ForumID&&$TForumID!=$ForumID) { $PreTopic="<span>Moved: </span>"; }
?>
-<li><a href="<?php echo url_maker($exfile['topic'],$Settings['file_ext'],"act=lowview&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic']); ?>"><?php echo $PreTopic.$TopicName; ?></a> <span style="color: gray; font-size: 10px;">(<?php echo $NumReply; ?> replies)</span></li>
+<li><?php echo $PreTopic; ?><a href="<?php echo url_maker($exfile['topic'],$Settings['file_ext'],"act=lowview&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic']); ?>"><?php echo $TopicName; ?></a> <span style="color: gray; font-size: 10px;">(<?php echo $NumReply; ?> replies)</span></li>
<?php ++$i; } ?>
</ul></div><div> </div>
<?php sql_free_result($result); } } } ?>
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: replies.php - Last Update: 09/09/2010 SVN 534 - Author: cooldude2k $
+ $FileInfo: replies.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="replies.php"||$File3Name=="/replies.php") {
if(!is_numeric($_GET['page'])) { $_GET['page'] = 1; }
if(!isset($_GET['modact'])) { $_GET['modact'] = null; }
if(!isset($_GET['link'])) { $_GET['link'] = "no"; }
+if(!isset($_GET['level'])) { $_GET['level'] = 1; }
+if(!is_numeric($_GET['level'])) { $_GET['level'] = 1; }
if($_GET['link']!="yes"&&$_GET['link']!="no") { $_GET['link'] = "no"; }
if($_GET['modact']=="pin"||$_GET['modact']=="unpin"||$_GET['modact']=="open"||
$_GET['modact']=="move"||$_GET['modact']=="close"||$_GET['modact']=="edit"||$_GET['modact']=="delete")
$TopicForumID=sql_result($preresult,0,"ForumID");
$TopicCatID=sql_result($preresult,0,"CategoryID");
$TopicClosed=sql_result($preresult,0,"Closed");
+if($TopicClosed==3&&$PermissionInfo['CanModForum'][$TopicForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
if(!isset($_GET['post'])||$_GET['post']!==null) {
$NumberReplies=sql_result($preresult,0,"NumReply"); }
if(isset($_GET['post'])&&$_GET['post']!==null) {
$TForumID=sql_result($gtsresult,0,"ForumID");
$TUsersID=sql_result($gtsresult,0,"UserID");
$TPinned=sql_result($gtsresult,0,"Pinned");
-if ($TPinned>1) { $TPinned = 1; }
+$TClosed=sql_result($gtsresult,0,"Closed");
+if($TopicClosed==2&&$PermissionInfo['CanModForum'][$TForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
+if($TopicClosed==3&&$PermissionInfo['CanModForum'][$TForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
+if ($TPinned>2) { $TPinned = 1; }
if ($TPinned<0) { $TPinned = 0; }
$CanPinTopics = false;
if($_SESSION['UserGroup']!=$Settings['GuestGroup']) {
if($PermissionInfo['CanPinTopics'][$TForumID]=="no"&&
$TopicClosed==1) { $CanPinTopics = false; } }
if($_SESSION['UserID']==0) { $CanPinTopics = false; }
+if($_GET['level']<1) { $_GET['level'] = 1; }
+if($_GET['level']>2) { $_GET['level'] = 1; }
+if($PermissionInfo['CanModForum'][$UseThisFonum]=="no") {
+if($_GET['level']>1) { $_GET['level'] = 1; } }
if($CanPinTopics===false) {
redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); sql_free_result($gtsresult);
ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
sql_free_result($gtsresult);
if($CanPinTopics===true) {
if($_GET['act']=="pin") {
-$queryupd = sql_pre_query("UPDATE \"".$Settings['sqltable']."topics\" SET \"Pinned\"=1 WHERE \"id\"=%i", array($TTopicID)); }
+$queryupd = sql_pre_query("UPDATE \"".$Settings['sqltable']."topics\" SET \"Pinned\"=%i WHERE \"id\"=%i", array($_GET['level'],$TTopicID)); }
if($_GET['act']=="unpin") {
$queryupd = sql_pre_query("UPDATE \"".$Settings['sqltable']."topics\" SET \"Pinned\"=0 WHERE \"id\"=%i", array($TTopicID)); }
sql_query($queryupd,$SQLStat);
$TForumID=sql_result($gtsresult,0,"ForumID");
$TUsersID=sql_result($gtsresult,0,"UserID");
$TClosed=sql_result($gtsresult,0,"Closed");
-if ($TClosed>1) { $TClosed = 1; }
+if($TopicClosed==2&&$PermissionInfo['CanModForum'][$TForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
+if($TopicClosed==3&&$PermissionInfo['CanModForum'][$TForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
+if ($TClosed>3) { $TClosed = 3; }
if ($TClosed<0) { $TClosed = 0; }
$CanCloseTopics = false;
if($_SESSION['UserGroup']!=$Settings['GuestGroup']) {
if($PermissionInfo['CanCloseTopics'][$TForumID]=="yes"&&
$PermissionInfo['CanModForum'][$TForumID]=="yes") {
$CanCloseTopics = true; } }
+if($_GET['level']<1) { $_GET['level'] = 1; }
+if($_GET['level']>3) { $_GET['level'] = 1; }
+if($PermissionInfo['CanModForum'][$UseThisFonum]=="no") {
+if($_GET['level']>1) { $_GET['level'] = 1; } }
if($_SESSION['UserID']==0) { $CanCloseTopics = false; }
if($CanCloseTopics===false) {
redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); sql_free_result($gtsresult);
sql_free_result($gtsresult);
if($CanCloseTopics===true) {
if($_GET['act']=="close") {
-$queryupd = sql_pre_query("UPDATE \"".$Settings['sqltable']."topics\" SET \"Closed\"=1 WHERE \"id\"=%i", array($TTopicID)); }
+$queryupd = sql_pre_query("UPDATE \"".$Settings['sqltable']."topics\" SET \"Closed\"=%i WHERE \"id\"=%i", array($_GET['level'],$TTopicID)); }
if($_GET['act']=="open") {
$queryupd = sql_pre_query("UPDATE \"".$Settings['sqltable']."topics\" SET \"Closed\"=0 WHERE \"id\"=%i", array($TTopicID)); }
sql_query($queryupd,$SQLStat);
$TTopicID=sql_result($gtsresult,0,"id");
$OldForumID=sql_result($gtsresult,0,"ForumID");
$OldCatID=sql_result($gtsresult,0,"CategoryID");
+$TClosed=sql_result($gtsresult,0,"Closed");
+if($TopicClosed==2&&$PermissionInfo['CanModForum'][$OldForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
+if($TopicClosed==3&&$PermissionInfo['CanModForum'][$OldForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
$CanMoveTopics = false;
if($_SESSION['UserGroup']!=$Settings['GuestGroup']) {
if($PermissionInfo['CanCloseTopics'][$OldForumID]=="yes"&&
$gtsresult=sql_query($gtsquery,$SQLStat);
$gtsnum=sql_num_rows($gtsresult);
$TUsersID=sql_result($gtsresult,0,"UserID");
+$TForumID=sql_result($gtsresult,0,"ForumID");
+$TClosed=sql_result($gtsresult,0,"Closed");
+if($TopicClosed==2&&$PermissionInfo['CanModForum'][$TForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
+if($TopicClosed==3&&$PermissionInfo['CanModForum'][$TForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
$CanDeleteTopics = false;
if($_SESSION['UserGroup']!=$Settings['GuestGroup']) {
if($PermissionInfo['CanDeleteTopics'][$ReplyForumID]=="yes"&&
$gtsresult=sql_query($gtsquery,$SQLStat);
$gtsnum=sql_num_rows($gtsresult);
$TUsersID=sql_result($gtsresult,0,"UserID");
+$TForumID=sql_result($gtsresult,0,"ForumID");
+$TClosed=sql_result($gtsresult,0,"Closed");
+if($TopicClosed==2&&$PermissionInfo['CanModForum'][$TForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
+if($TopicClosed==3&&$PermissionInfo['CanModForum'][$TForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
if($_SESSION['UserID']!=$TUsersID) { $ShowEditTopic = null; }
if($PermissionInfo['CanModForum'][$TopicForumID]=="yes"&&
$PermissionInfo['CanEditTopics'][$TopicForumID]=="yes") {
$ShowEditTopic = true; }
if($PermissionInfo['CanEditTopicsClose'][$TopicForumID]=="no"&&$TopicClosed==1) {
$ShowEditTopic = null; } }
+$TForumID=sql_result($gtsresult,0,"ForumID");
+$TClosed=sql_result($gtsresult,0,"Closed");
+if($TopicClosed==2&&$PermissionInfo['CanModForum'][$TForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
+if($TopicClosed==3&&$PermissionInfo['CanModForum'][$TForumID]=="no") {
+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);
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
?>
<div class="Table1Border">
<?php if($ThemeSet['TableStyle']=="div") { ?>
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: rssfeed.php - Last Update: 06/07/2010 SVN 520 - Author: cooldude2k $
+ $FileInfo: rssfeed.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="rssfeed.php"||$File3Name=="/rssfeed.php") {
$Atom = null; $RSS = null; $PreRSS = null;
$gltnum = count($gltf); $glti = 0;
while ($glti < $gltnum) {
-$query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i ORDER BY \"LastUpdate\" DESC LIMIT %i", array($gltf[$glti],$Settings['max_topics']));
+$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." 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) {
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: searchs.php - Last Update: 06/07/2010 SVN 520 - Author: cooldude2k $
+ $FileInfo: searchs.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="searchs.php"||$File3Name=="/searchs.php") {
sql_free_result($glrresult);
if($TimeStamp1==null) { $LastReply = " <br /> "; }
$PreTopic = $ThemeSet['TopicIcon'];
-if ($PinnedTopic>1) { $PinnedTopic = 1; }
+if ($PinnedTopic>2) { $PinnedTopic = 1; }
if ($PinnedTopic<0) { $PinnedTopic = 0; }
if(!is_numeric($PinnedTopic)) { $PinnedTopic = 0; }
-if ($TopicStat>1) { $TopicStat = 1; }
+if ($TopicStat>3) { $TopicStat = 1; }
if ($TopicStat<0) { $TopicStat = 0; }
if(!is_numeric($TopicStat)) { $TopicStat = 1; }
-if ($PinnedTopic==1&&$TopicStat==0) {
+if ($PinnedTopic>0&&$PinnedTopic<3&&$TopicStat==0) {
if($NumReply>=$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['HotPinTopic']; }
if($NumReply<$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['PinTopic']; } }
-if ($TopicStat==1&&$PinnedTopic==0) {
+if ($TopicStat>=0&&$TopicStat<=3&&$PinnedTopic==0) {
if($NumReply>=$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['HotClosedTopic']; }
if($NumReply<$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['HotTopic']; }
if($NumReply<$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['TopicIcon']; } }
-if ($PinnedTopic==1&&$TopicStat==1) {
+if ($PinnedTopic>0&&$PinnedTopic<3&&$TopicStat>=0&&$TopicStat<=3) {
if($NumReply>=$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['HotPinClosedTopic']; }
if($NumReply<$Settings['hot_topic_num']) {
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: subcategories.php - Last Update: 09/09/2010 SVN 533 - Author: cooldude2k $
+ $FileInfo: subcategories.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="subcategories.php"||$File3Name=="/subcategories.php") {
$OldUpdateTime = 0; $UseThisFonum = null;
if ($ForumType=="subforum") {
while ($glti < $gltnum) {
-$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i ORDER BY \"LastUpdate\" DESC LIMIT 1", array($gltf[$glti]));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$gltf[$glti]]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"ForumID\"=%i".$ExtraIgnores." ORDER BY \"LastUpdate\" DESC LIMIT 1", array($gltf[$glti]));
$gltforesult=sql_query($gltfoquery,$SQLStat);
$gltfonum=sql_num_rows($gltforesult);
if($gltfonum>0) {
++$glti; } }
if ($ForumType!="subforum"&&$ForumType!="redirect") { $UseThisFonum = $gltf[0]; }
if ($ForumType!="redirect") {
-$gltquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i) OR (\"OldForumID\"=%i) ORDER BY \"LastUpdate\" DESC LIMIT 1", array($UseThisFonum,$UseThisFonum));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$UseThisFonum]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$gltquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i".$ExtraIgnores.") OR (\"OldForumID\"=%i".$ExtraIgnores.") ORDER BY \"LastUpdate\" DESC LIMIT 1", array($UseThisFonum,$UseThisFonum));
$gltresult=sql_query($gltquery,$SQLStat);
$gltnum=sql_num_rows($gltresult);
if($gltnum>0){
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: subforums.php - Last Update: 09/09/2010 SVN 533 - Author: cooldude2k $
+ $FileInfo: subforums.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="subforums.php"||$File3Name=="/subforums.php") {
$OldUpdateTime = 0; $UseThisFonum = null;
if ($ForumType=="subforum") {
while ($glti < $gltnum) {
-$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"CategoryID\"=%i AND \"ForumID\"=%i ORDER BY \"LastUpdate\" DESC LIMIT 1", array($CategoryID,$gltf[$glti]));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$gltf[$glti]]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$gltfoquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"CategoryID\"=%i".$ExtraIgnores." AND \"ForumID\"=%i ORDER BY \"LastUpdate\" DESC LIMIT 1", array($CategoryID,$gltf[$glti]));
$gltforesult=sql_query($gltfoquery,$SQLStat);
$gltfonum=sql_num_rows($gltforesult);
if($gltfonum>0) {
++$glti; } }
if ($ForumType!="subforum"&&$ForumType!="redirect") { $UseThisFonum = $gltf[0]; }
if ($ForumType!="redirect") {
-$gltquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i) OR (\"OldForumID\"=%i) ORDER BY \"LastUpdate\" DESC LIMIT 1", array($UseThisFonum,$UseThisFonum));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$UseThisFonum]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$gltquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i".$ExtraIgnores.") OR (\"OldForumID\"=%i".$ExtraIgnores.") ORDER BY \"LastUpdate\" DESC LIMIT 1", array($UseThisFonum,$UseThisFonum));
$gltresult=sql_query($gltquery,$SQLStat);
$gltnum=sql_num_rows($gltresult);
if($gltnum>0){
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: topics.php - Last Update: 09/09/2010 SVN 533 - Author: cooldude2k $
+ $FileInfo: topics.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="topics.php"||$File3Name=="/topics.php") {
if($PageLimit<0) { $PageLimit = 0; }
//End Topic Page Code
$i=0;
-$query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i) OR (\"OldForumID\"=%i) ORDER BY \"Pinned\" DESC, \"LastUpdate\" DESC ".$SQLimit, array($_GET['id'],$_GET['id'],$PageLimit,$Settings['max_topics']));
+$ExtraIgnores = null;
+if($PermissionInfo['CanModForum'][$_GET['id']]=="no") {
+ $ExtraIgnores = " AND \"Closed\"<>3"; }
+$query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE (\"ForumID\"=%i".$ExtraIgnores.") OR (\"OldForumID\"=%i".$ExtraIgnores.") OR (\"Pinned\"=2".$ExtraIgnores.") ORDER BY \"Pinned\" DESC, \"LastUpdate\" DESC ".$SQLimit, array($_GET['id'],$_GET['id'],$PageLimit,$Settings['max_topics']));
$result=sql_query($query,$SQLStat);
$num=sql_num_rows($result);
//List Page Number Code Start
if(!isset($TimeStamp1)) { $TimeStamp1 = null; } if(!isset($LastReply)) { $LastReply = " <br /> "; }
if($TimeStamp1==null) { $LastReply = " <br /> "; }
$PreTopic = $ThemeSet['TopicIcon'];
-if ($PinnedTopic>1) { $PinnedTopic = 1; }
+if ($PinnedTopic>2) { $PinnedTopic = 1; }
if ($PinnedTopic<0) { $PinnedTopic = 0; }
if(!is_numeric($PinnedTopic)) { $PinnedTopic = 0; }
-if ($TopicStat>1) { $TopicStat = 1; }
+if ($TopicStat>3) { $TopicStat = 1; }
if ($TopicStat<0) { $TopicStat = 0; }
if(!is_numeric($TopicStat)) { $TopicStat = 1; }
if(!is_numeric($OldForumID)) { $OldForumID = $ForumID; }
if ($OldForumID!=$ForumID||$TForumID==$ForumID) {
$PreTopic = $ThemeSet['TopicIcon'];
$PreTopicText = null;
-if ($PinnedTopic==1&&$TopicStat==0) {
+if ($PinnedTopic>0&&$PinnedTopic<3&&$TopicStat==0) {
if($NumReply>=$Settings['hot_topic_num']) {
$PreTopicText = "<span style=\"font-weight: bold;\">Pinned: </span>";
$PreTopic=$ThemeSet['HotPinTopic']; }
if($NumReply<$Settings['hot_topic_num']) {
$PreTopicText = "<span style=\"font-weight: bold;\">Pinned: </span>";
$PreTopic=$ThemeSet['PinTopic']; } }
-if ($TopicStat==1&&$PinnedTopic==0) {
+if ($TopicStat>=0&&$TopicStat<=3&&$PinnedTopic==0) {
if($NumReply>=$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['HotClosedTopic']; }
if($NumReply<$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['HotTopic']; }
if($NumReply<$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['TopicIcon']; } }
-if ($PinnedTopic==1&&$TopicStat==1) {
+if ($PinnedTopic>0&&$PinnedTopic<3&&$TopicStat>=0&&$TopicStat<=3) {
if($NumReply>=$Settings['hot_topic_num']) {
$PreTopicText = "<span style=\"font-weight: bold;\">Pinned: </span>";
$PreTopic=$ThemeSet['HotPinClosedTopic']; }
$PreTopicText = "<span style=\"font-weight: bold;\">Pinned: </span>";
$PreTopic=$ThemeSet['PinClosedTopic']; } } }
if ($OldForumID==$ForumID&&$TForumID!=$ForumID) {
-$PreTopicText = "Moved: ";
+$PreTopicText = "<span>Moved: </span>";
$PreTopic = $ThemeSet['MovedTopicIcon'];
-if ($PinnedTopic==1&&$TopicStat==0) {
+if ($PinnedTopic>0&&$PinnedTopic<3&&$TopicStat==0) {
if($NumReply>=$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['MovedHotPinTopic']; }
if($NumReply<$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['MovedPinTopic']; } }
-if ($TopicStat==1&&$PinnedTopic==0) {
+if ($TopicStat>=0&&$TopicStat<=3&&$PinnedTopic==0) {
if($NumReply>=$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['MovedHotClosedTopic']; }
if($NumReply<$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['MovedHotTopic']; }
if($NumReply<$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['MovedTopicIcon']; } }
-if ($PinnedTopic==1&&$TopicStat==1) {
+if ($PinnedTopic>0&&$PinnedTopic<3&&$TopicStat>=0&&$TopicStat<=3) {
if($NumReply>=$Settings['hot_topic_num']) {
$PreTopic=$ThemeSet['MovedHotPinClosedTopic']; }
if($NumReply<$Settings['hot_topic_num']) {
Copyright 2004-2010 iDB Support - http://idb.berlios.de/
Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: versioninfo.php - Last Update: 09/09/2010 SVN 534 - Author: cooldude2k $
+ $FileInfo: versioninfo.php - Last Update: 09/10/2010 SVN 535 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {
return $return_var; }
// Version number and date stuff. :P
$VER1[0] = 0; $VER1[1] = 4; $VER1[2] = 0; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
-$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 534; $RName = "iDB"; $SFName = "IntDB";
-$SVNDay[0] = 09; $SVNDay[1] = 09; $SVNDay[2] = 2010; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
+$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 535; $RName = "iDB"; $SFName = "IntDB";
+$SVNDay[0] = 09; $SVNDay[1] = 10; $SVNDay[2] = 2010; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
$VerInfo['iDB_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,false);
$VerInfo['iDB_Ver_SVN'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,true);
$VerInfo['iDB_Full_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[0],$SubVerN,false);