<?php
class AdmincomAction extends CommonAction{
	function _initialize(){
		header("Content-Type:text/html; charset=utf-8");
		parent::islogin();
		parent::showLoginInfo();
		if(empty($_SESSION['isadmin']))
		{
			$this->redirect('/public/admlogin');
			exit;
		}
		$this->showSiteInfo();
    }
	protected function showSiteInfo($title="",$key="",$des="",$copy="")
	{
		$site=F('site');
		$data['title']=$title?$title.'--'.$site['title']:$site['title'];
		$data['keyword']=$key?$key.'--'.$site['keyword']:$site['keyword'];
		$data['description']=$des?$des.'--'.$site['description']:$site['description'];
		$data['copyright']=$copy?$copy.'--'.$site['copyright']:$site['copyright'];
		$this->assign('site',array_merge($site,$data));
	}
}
?>