<?php
defined('PHP168_PATH') or die();

/**
* 配置
**/

$this_system->check_manager($ACTION) or message('no_privilege');

if(REQUEST_METHOD == 'GET'){


	$alias = html_entities($this_system->SITE);
	$data = $this_module->get_site($alias);
    $data['config'] = mb_unserialize($data['config']);
    $data['config'] = p8_stripslashes($data['config']);
	$templates = $this_module->get_sites_templates();
	include template($this_module, 'edit', 'admin');
	
}else if(REQUEST_METHOD == 'POST'){
	//如果魔法引号开启strip掉
	$_POST = p8_stripslashes2($_POST);
	$this_controller->update($_POST) or message('fail');
	$this_system->log(array(
		'title' => $P8LANG['_module_update_admin_log'],
		'request' => $_POST,
	));
	message('done',$this_router.'-config');
}
