<?php
/**
 *	Generated by miceCMS
 *	http://www.miceCMS.com/
 */
class usergroup_editAction extends security_login {
	function action(){
		ModuleLimit(__CLASS__);
		global $conn;
		$userusergroup_id=$this->_getParam('usergroup_id');
		if($userusergroup_id){
			$usergroup=new model_Usergroup();
			$usergroup->setSubsection('WHERE usergroup_id='.$userusergroup_id);
			$results=$usergroup->doSelectOne();
			$menustr=$results->getMenu();
		}else{
			$results=new model_Usergroup();
			$menustr='';
		}

		$category=new model_Category();
		$category->setSubsection('WHERE type=\'menu\' and parentid=0 ORDER BY orderid');
		$menus=$category->doSelect();

		//分类
		$category2=new model_Category();
		$category2->setSubsection('WHERE parentid=0 AND type = \'menu\'');
		//$categoryrs=$category2->doSelect();
		$childcount=$category2->doCount();

		

		$smarty = new Smarty();
		$smarty->load_filter('pre','micePreCompileAdmin');
		$smarty->assign('results',$results);
		$smarty->assign('menus',$menus);
		$smarty->assign('childcount',$childcount);
		$smarty->assign('index',MICE_URL.'admin.php/usergroup');
		$smarty->assign('formaction',MICE_URL.'admin.php/usergroup/update');
		$filename = new getTPLFileName(__CLASS__);
		$smarty->display($filename->TPLFileName);
	}
}
?>