<?php
!defined('P_W') && exit('Forbidden');
require_once R_P . 'lib/framework/controller.php';
class AdminController extends Controller {
	var $_layout_type = 'pw';
	
	function FrontController() {
		$this->__construct();
	
	}
	
	function __construct() {
		$this->_setLayoutFile('admin');
	}
	
	function _setLayoutType($type) {
		$this->_layout_type = $type;
	}
	
	/**
	 * 获取$_POST或$_GET参数
	 * @param array $params 变量数组
	 */
	function _gp($params, $istrim = true) {
		if (!S::isArray($params)) return array();
		S::gp($params, null, 1, $istrim);
		$tmp = array();
		foreach ($params as $param) {
			$tmp[] = $this->_getGlobal($param);
		}
		return $tmp;
	}
	
	function _output() {
		parent::_output();
		switch ($this->_layout_type) {
			case 'ajax':
				ajax_footer();
				break;
			case 'pw':
			default:
				afooter();
		}
	}

}