Location: PHPKode > projects > ProjectPress > projectpress/pm-admin/options.php
<?php 
/**
 * ProjectPress site options
 *
 * @package ProjectPress
 * @since 2.0
 */

// Starts the session.
session_start();

define('access',true);

include(dirname(dirname(__FILE__)) . '/config.inc.php');
include(PM_DIR . 'pm-includes/global.inc.php');
require(PM_DIR . 'pm-includes/functions.php');
include(PM_DIR . 'pm-includes/header.php');

// User is logged in and is an admin.
is_admin();

// Enable for error checking and troubleshooting.
//display_errors();

if(isset($_POST['submit'])) {
$sitetitle = $_POST['sitetitle'];
	update_pm_option( 'sitetitle' , $sitetitle );
$siteurl = $_POST['siteurl'];
	update_pm_option( 'siteurl' , $siteurl );
$sitepath = $_POST['sitepath'];
	update_pm_option( 'sitepath' , $sitepath );
$admin_email = $_POST['admin_email'];
	update_pm_option( 'admin_email' , $admin_email );
$enable_registration = $_POST['enable_registration'];
	update_pm_option( 'enable_registration' , $enable_registration );
/*$enable_query = $_POST['enable_query'];
	update_pm_option( 'enable_query' , $enable_query );*/
pm_redirect('options.php');
}

	$enablereg = get_pm_option('enable_registration');
	$enablequery = get_pm_option('enable_query');

	/**
	 * Creates a new template for options page.
	 */
	$options = new Template(PM_DIR . "pm-includes/tpl/options.tpl");
	$options->set("pmurl", get_pm_option('siteurl'));
	$options->set("sitetitle", get_pm_option('sitetitle'));
	$options->set("siteurl", get_pm_option('siteurl'));
	$options->set("sitepath", get_pm_option('sitepath'));
	$options->set("adminemail", get_pm_option('admin_email'));
	
	if($enablereg == 'yes') {
		$options->set("enablereg", 'checked=checked');
	}
	
	/*if($enablequery == 'yes') {
		$options->set("enablequery", 'checked=checked');
	}*/
	
	/**
	 * Outputs the site options page.
	 */
	echo $options->output();

include(PM_DIR . 'pm-includes/footer.php');
Return current item: ProjectPress