<?php
/**
 *	Generated by miceCMS
 *	http://www.miceCMS.com/
 */
class indexAction extends security_normal {

	function action(){
		$miceSession = new session();
		if($miceSession->get('loginname')==''){
			header("Location: ".MICE_URL.'admin.php/login');
			exit;
		}

		global $conn;
		$menu=new model_Menu();
		$menu->setSubsection('WHERE isvisible=0 AND parentid=0 ORDER BY orderid');
		$menus=$menu->doSelect();
		

		if(stristr($_SERVER["HTTP_USER_AGENT"],"Firefox"))
		{
			$doctype='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >'; 
		}else{
			$doctype='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'; 
		} 

		$user=new model_User();
		$user->setSubsection('WHERE user_id='.$miceSession->get('userid'));
		$users=$user->doSelectOne();

		$usergroup=new model_Usergroup();
		$usergroup->setSubsection('WHERE usergroup_id='.$miceSession->get('usergroupid'));
		$usergroups=$usergroup->doSelectOne();

		
		
		$smarty = new Smarty();
		$smarty->load_filter('pre','micePreCompileAdmin');
		$smarty->assign("title","企业网站管理");
		$smarty->assign('menus',$menus);
		$smarty->assign('doctype',$doctype);
		$smarty->assign('usergroupmenu',$miceSession->get('usergroupmenu'));
		$smarty->assign("ciframesrc",MICE_URL.'admin.php/article/index');
		$smarty->assign("users",$users);
		$smarty->assign("usergroups",$usergroups);
		$filename = new getTPLFileName(__CLASS__);
		$smarty->display($filename->TPLFileName);
	}
}
?>