Location: PHPKode > projects > SiteX > admin/forums_options.php
<?PHP
ob_start();
session_start();
include("../includes/globals.php.inc");
include("../includes/functions.php");
include("../lang/English.php");
if(strtolower($sxSetup['Language']) != 'english') include("../lang/".$sxSetup['Language'].".php");
include("../themes/$THEME_FOLDER/config.php.inc");
if((!userForumManager())AND(!userAdmin())AND(!userEditor()))  loginError($sxLang['LoginRequired']);
if((userEditor())AND(!$sxSetup['EditorRightsForumsOptions']))  loginError($sxLang['LoginRequired']);

if($Submit)
{
	$query = "UPDATE $DB_Setup SET setup_value='$edit_forum_topics_per_page' WHERE setup_key='ForumTopicsPerPage'";
	$result = mysql_query($query, $Link) or queryError("55", mysql_error());
	
	$query = "UPDATE $DB_Setup SET setup_value='$edit_forum_posts_per_page' WHERE setup_key='ForumPostsPerPage'";
	$result = mysql_query($query, $Link) or queryError("56", mysql_error());
	
	if($edit_forum_anonymous != 1) $edit_forum_anonymous = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_forum_anonymous' WHERE setup_key='ForumAnonymous'";
	$result = mysql_query($query, $Link) or queryError("57", mysql_error());
	
	$query = "UPDATE $DB_Setup SET setup_value='$edit_forum_width' WHERE setup_key='ForumWidth'";
	$result = mysql_query($query, $Link) or queryError("56", mysql_error());
	
	if($edit_forum_hide_private != 1) $edit_forum_hide_private = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_forum_hide_private' WHERE setup_key='ForumHidePrivate'";
	$result = mysql_query($query, $Link) or queryError("58", mysql_error());
	
	if($edit_forum_edit_timeout != 1) $edit_forum_edit_timeout = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_forum_edit_timeout' WHERE setup_key='ForumEditTimeout'";
	$result = mysql_query($query, $Link) or queryError("59", mysql_error());
	
	$query = "UPDATE $DB_Setup SET setup_value='$edit_forum_edit_timeout_seconds' WHERE setup_key='ForumEditTimeoutSeconds'";
	$result = mysql_query($query, $Link) or queryError("60", mysql_error());

	header("Location:$PHP_SELF?message=".str_replace(" ","_",$sxLang['MessageForumPrefUpdated']));
	die();
}

$sxTitleAddendum = $sxLang['AdminHeading'];
include("../themes/$THEME_FOLDER/header.php");
?> 
<script language="JavaScript" type="text/JavaScript">
<!--
function protectTimeout(){
	if(document.form1.edit_forum_edit_timeout.checked == true){
		document.form1.edit_forum_edit_timeout_seconds.disabled=false;
	}else{
		document.form1.edit_forum_edit_timeout_seconds.value = "";
		document.form1.edit_forum_edit_timeout_seconds.disabled=true;
	}
}
//-->
</script>     
  <div class="bodyWrapper">
   <h1 class="sxAdminHeading"><?PHP echo getComponentName("6").' '.$sxLang['GeneralHeadingOptions']; ?></h1>
   <div class="sxAdminBreadcrumbs"><?PHP if(userAdmin()) { ?><a href="index.php"><?PHP echo $sxLang['AdminBreadcrumb']; ?><?PHP }?><?PHP if(userEditor()) { ?><a href="editor_index.php"><?PHP echo $sxLang['EditorBreadcrumb']; ?><?PHP }?></a> > <a href="forums_manager.php"><?PHP echo $sxLang['ForumHeadingManager']; ?></a> > <?PHP echo getComponentName("6").' '.$sxLang['GeneralHeadingOptions']; ?></div>   
   <?PHP echoMessage($message); ?>
	<table border="0" cellspacing="2" cellpadding="3" width="<?PHP echo $sxThemeConfig['ContentWidth']; ?>">
	<form method="post" action="<?PHP echo $PHP_SELF; ?>" name="form1">
	  <tr> 
		  <td class="sxTdItem"><?PHP echo $sxLang['ForumItemAnonPosting']; ?></td>
		  <td><input name="edit_forum_anonymous" type="checkbox" value="1"<?PHP if($sxSetup['ForumAnonymous']) echo ' checked'; ?> /></td>
		</tr>
	  <tr> 
		  <td class="sxTdItem"><?PHP echo $sxLang['ForumItemHidePrivate']; ?></td>
		  <td><input name="edit_forum_hide_private" type="checkbox" value="1"<?PHP if($sxSetup['ForumHidePrivate']) echo ' checked'; ?> /></td>
		</tr>
	  <tr> 
		  <td class="sxTdItem"><?PHP echo $sxLang['GeneralItemWidth']; ?></td>
		  <td><input name="edit_forum_width" type="text" size="4" maxlength="5" value="<?PHP echo $sxSetup['ForumWidth']; ?>" /> <span class="sxSmallText">px</span></td>
		</tr>
	  <tr> 
		  <td class="sxTdItem"><?PHP echo $sxLang['ForumItemTopicsPP']; ?></td>
		  <td><input name="edit_forum_topics_per_page" type="text" size="3" maxlength="3" value="<?PHP echo $sxSetup['ForumTopicsPerPage']; ?>" /></td>
		</tr>
	  <tr> 
		  <td class="sxTdItem"><?PHP echo $sxLang['ForumItemPostsPP']; ?></td>
		  <td><input name="edit_forum_posts_per_page" type="text" size="3" maxlength="3" value="<?PHP echo $sxSetup['ForumPostsPerPage']; ?>" /></td>
		</tr>
	  <tr> 
		  <td class="sxTdItem"><?PHP echo $sxLang['ForumItemEditingTimeout']; ?></td>
		  <td><input name="edit_forum_edit_timeout" type="checkbox" value="1"<?PHP if($sxSetup['ForumEditTimeout']) echo ' checked'; ?> onclick="protectTimeout()" />
			<input name="edit_forum_edit_timeout_seconds" type="text" <?PHP if(!$sxSetup['ForumEditTimeout']) echo 'disabled="disabled"'; ?>size="3" maxlength="15" value="<?PHP echo $sxSetup['ForumEditTimeoutSeconds']; ?>" /> <?PHP echo $sxTimePeriodsPlural[0]; ?></td>
		</tr>
	  <tr> 
		  <td class="sxTdItem">&nbsp;</td>
		  <td>&nbsp;</td>
		</tr>
	  <tr> 
		  <td class="sxTdItem">&nbsp;</td>
		  <td><input name="Submit" type="submit" value="<?PHP echo $sxLang['ButtonEditOptions']; ?>" class="sxButton" /></td>
		</tr>
	 </form></table>
  </div>
<?PHP
include("../themes/$THEME_FOLDER/footer.php");
ob_end_flush();
?>
Return current item: SiteX