Location: PHPKode > projects > SiteX > admin/editor_rights.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(!userAdmin())
	loginError($sxLang['LoginRequired']);

if($EditOptions)
{
	if($edit_show_homepageoptions != 1) $edit_show_homepageoptions = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_homepageoptions' WHERE setup_key='EditorRightsHomepageOptions'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());
	
	if($edit_show_navigation != 1) $edit_show_navigation = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_navigation' WHERE setup_key='EditorRightsNavigation'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());
	
	if($edit_show_albumsadd != 1) $edit_show_albumsadd = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_albumsadd' WHERE setup_key='EditorRightsAlbumsAdd'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_albumsmanage != 1) $edit_show_albumsmanage = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_albumsmanage' WHERE setup_key='EditorRightsAlbumsManage'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());
	
	if($edit_show_commentsmanager != 1) $edit_show_commentsmanager = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_commentsmanager' WHERE setup_key='EditorRightsCommentsManager'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_contactmanage != 1) $edit_show_contactmanage = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_contactmanage' WHERE setup_key='EditorRightsContactManage'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_eventsadd != 1) $edit_show_eventsadd = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_eventsadd' WHERE setup_key='EditorRightsEventsAdd'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_eventsmanage != 1) $edit_show_eventsmanage = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_eventsmanage' WHERE setup_key='EditorRightsEventsManage'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_filesmanage != 1) $edit_show_filesmanage = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_filesmanage' WHERE setup_key='EditorRightsFilesManage'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_forumsoptions != 1) $edit_show_forumsoptions = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_forumsoptions' WHERE setup_key='EditorRightsForumsOptions'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_forumsmanage != 1) $edit_show_forumsmanage = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_forumsmanage' WHERE setup_key='EditorRightsForumsManage'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_forumsadd != 1) $edit_show_forumsadd = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_forumsadd' WHERE setup_key='EditorRightsForumsAdd'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());
	
	if($edit_show_guestbookedit != 1) $edit_show_guestbookedit = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_guestbookedit' WHERE setup_key='EditorRightsGuestbookEdit'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_journaladd != 1) $edit_show_journaladd = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_journaladd' WHERE setup_key='EditorRightsJournalAdd'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_journaledit != 1) $edit_show_journaledit = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_journaledit' WHERE setup_key='EditorRightsJournalEdit'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_journalmanage != 1) $edit_show_journalmanage = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_journalmanage' WHERE setup_key='EditorRightsJournalManage'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_linksadd != 1) $edit_show_linksadd = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_linksadd' WHERE setup_key='EditorRightsLinksAdd'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_linksedit != 1) $edit_show_linksedit = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_linksedit' WHERE setup_key='EditorRightsLinksEdit'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_online != 1) $edit_show_online = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_online' WHERE setup_key='EditorRightsOnline'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_pagesadd != 1) $edit_show_pagesadd = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_pagesadd' WHERE setup_key='EditorRightsPagesAdd'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_pagesedit != 1) $edit_show_pagesedit = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_pagesedit' WHERE setup_key='EditorRightsPagesEdit'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());	
	
	if($edit_show_pagesdelete != 1) $edit_show_pagesdelete = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_pagesdelete' WHERE setup_key='EditorRightsPagesDelete'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_photoadd != 1) $edit_show_photoadd = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_photoadd' WHERE setup_key='EditorRightsPhotoAdd'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_batchadd != 1) $edit_show_batchadd = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_batchadd' WHERE setup_key='EditorRightsPhotoBatchAdd'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_photoedit != 1) $edit_show_photoedit = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_photoedit' WHERE setup_key='EditorRightsPhotoEdit'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_pollsedit != 1) $edit_show_pollsedit = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_pollsedit' WHERE setup_key='EditorRightsPollsEdit'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_usersadd != 1) $edit_show_usersadd = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_usersadd' WHERE setup_key='EditorRightsUsersAdd'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_usersedit != 1) $edit_show_usersedit = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_usersedit' WHERE setup_key='EditorRightsUsersEdit'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_usersemail != 1) $edit_show_usersemail = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_usersemail' WHERE setup_key='EditorRightsUsersEmail'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_usersoptions != 1) $edit_show_usersoptions = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_usersoptions' WHERE setup_key='EditorRightsUserOptions'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_usertypes != 1) $edit_show_usertypes = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_usertypes' WHERE setup_key='EditorRightsUserTypes'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());

	if($edit_show_visitorstats != 1) $edit_show_visitorstats = 0;
	$query = "UPDATE $DB_Setup SET setup_value='$edit_show_visitorstats' WHERE setup_key='EditorRightsVisitorStats'";
	$result = mysql_query($query, $Link) or queryError("701", mysql_error());	
	
	header("Location:$PHP_SELF?message=".str_replace(" ","_",$sxLang['MessageUserOptionsUpdated']));
	die();
}

$sxTitleAddendum = $sxLang['AdminHeading'];
include("../themes/$THEME_FOLDER/header.php");
?>
   
<div class="bodyWrapper">
   <h1 class="sxAdminHeading"><?PHP echo $sxLang['EditorHeadingOptions']; ?></h1>
   <div class="sxAdminBreadcrumbs"><a href="index.php"><?PHP echo $sxLang['AdminBreadcrumb']; ?></a> > <a href="user_manager.php"><?PHP echo $sxLang['UserHeadingManager']; ?></a> > <?PHP echo $sxLang['EditorHeadingOptions']; ?></div>
   <?PHP echoMessage($message); ?>
	<table border="0" cellspacing="2" cellpadding="5" width="90%">
	  <form action="<?PHP echo $PHP_SELF; ?>" method="post" name="sxForm0">
	  <tr>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsHomepageOptions']; ?></td>
		<td><input name="edit_show_homepageoptions" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsHomepageOptions']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsPagesAdd']; ?></td>
		<td><input name="edit_show_pagesadd" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsPagesAdd']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsForumsAdd']; ?></td>
		<td><input name="edit_show_forumsadd" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsForumsAdd']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsUsersAdd']; ?></td>
		<td><input name="edit_show_usersadd" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsUsersAdd']) echo ' checked'; ?> />		</td>
	</tr>
	<tr>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsNavigation']; ?></td>
		<td><input name="edit_show_navigation" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsNavigation']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsPagesEdit']; ?></td>
		<td><input name="edit_show_pagesedit" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsPagesEdit']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsForumsManage']; ?></td>
		<td><input name="edit_show_forumsmanage" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsForumsManage']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsUsersEdit']; ?></td>
		<td><input name="edit_show_usersedit" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsUsersEdit']) echo ' checked'; ?> />		</td>
	</tr>
	<tr>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsContactManage']; ?></td>
		<td><input name="edit_show_contactmanage" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsContactManage']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsPagesDelete']; ?></td>
		<td><input name="edit_show_pagesdelete" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsPagesDelete']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsForumsOptions']; ?></td>
		<td><input name="edit_show_forumsoptions" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsForumsOptions']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsUsersEmail']; ?></td>
		<td><input name="edit_show_usersemail" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsUsersEmail']) echo ' checked'; ?> />		</td>
	</tr>
	<tr>
	  <td class="sxTdItem"><?PHP echo $sxLang['EditorRightsFilesManage']; ?></td>
		<td><input name="edit_show_filesmanage" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsFilesManage']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsJournalAdd']; ?></td>
		<td><input name="edit_show_journaladd" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsJournalAdd']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsAlbumsAdd']; ?></td>
		<td><input name="edit_show_albumsadd" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsAlbumsAdd']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsUserOptions']; ?></td>
		<td><input name="edit_show_usersoptions" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsUserOptions']) echo ' checked'; ?> />		</td>
	  </tr>
	  <tr>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsGuestbookEdit']; ?></td>
		<td><input name="edit_show_guestbookedit" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsGuestbookEdit']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsJournalEdit']; ?></td>
		<td><input name="edit_show_journaledit" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsJournalEdit']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsAlbumsManage']; ?></td>
		<td><input name="edit_show_albumsmanage" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsAlbumsManage']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsUserTypes']; ?></td>
		<td><input name="edit_show_usertypes" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsUserTypes']) echo ' checked'; ?> />		</td>
	</tr>
	  <tr>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsLinksAdd']; ?></td>
		<td><input name="edit_show_linksadd" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsLinksAdd']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsJournalManage']; ?></td>
		<td><input name="edit_show_journalmanage" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsJournalManage']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsPhotoAdd']; ?></td>
		<td><input name="edit_show_photoadd" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsPhotoAdd']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsCommentsManager']; ?></td>
		<td><input name="edit_show_commentsmanager" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsCommentsManager']) echo ' checked'; ?> />		</td>
	  </tr>
	  <tr>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsLinksEdit']; ?></td>
		<td><input name="edit_show_linksedit" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsLinksEdit']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsEventsAdd']; ?></td>
		<td><input name="edit_show_eventsadd" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsEventsAdd']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsPhotoBatchAdd']; ?></td>
		<td><input name="edit_show_batchadd" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsPhotoBatchAdd']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsOnline']; ?></td>
		<td><input name="edit_show_online" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsOnline']) echo ' checked'; ?> />		</td>
		</tr>
	  <tr>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsPollsEdit']; ?></td>
		<td><input name="edit_show_pollsedit" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsPollsEdit']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsEventsManage']; ?></td>
		<td><input name="edit_show_eventsmanage" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsEventsManage']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsPhotoEdit']; ?></td>
		<td><input name="edit_show_photoedit" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsPhotoEdit']) echo ' checked'; ?> />		</td>
		<td class="sxTdItem"><?PHP echo $sxLang['EditorRightsVisitorStats']; ?></td>
		<td><input name="edit_show_visitorstats" type="checkbox" value="1"<?PHP if($sxSetup['EditorRightsVisitorStats']) echo ' checked'; ?> />		</td>
	  </tr>	  
	  <tr>
		<td colspan="8" align="right"><br/><br/><input name="EditOptions" 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