<?php
/**
 *	Generated by miceCMS
 *	http://www.miceCMS.com/
 */
class usergroup_deleteAction extends security_login {
	function action(){
		ModuleLimit(__CLASS__);
		global $conn;
		$msg='未删除任何内容';
		$userusergroup_id=$this->_getParam('usergroup_id');
		if($userusergroup_id > 0){
			$usergroup=new model_Usergroup();
			$usergroup->setSubsection('WHERE usergroup_id='.$userusergroup_id);
			$results=$usergroup->doDelete();
			$msg='删除成功';
		}elseif(sizeof($_POST['checkbox'])){
			foreach($_POST['checkbox'] as $mid){
				$usergroup=new model_Usergroup();
				$usergroup->setSubsection('WHERE usergroup_id='.$mid);
				$results=$usergroup->doDelete();
			}
			$msg='删除成功';
		}

		

		$jsstring='Dialog.alert(\''.$msg.'\',function(){window.location.href="'.MICE_URL.'admin.php/usergroup";window.event.returnValue = false;},300,100,"删除结果");';
		MessageBox($jsstring);
		exit;
	}
}
?>