<?php
/**
 *	Generated by miceCMS
 *	http://www.miceCMS.com/
 */
class user_deleteAction extends security_login {
	function action(){
		ModuleLimit(__CLASS__);
		global $conn;
		$msg='未删除任何内容';
		$num=0;
		$user_id=$this->_getParam('user_id');
		if($user_id > 0){
			$user=new model_User();
			$user->setSubsection('WHERE user_id='.$user_id);
			$results=$user->doDelete();
			$num++;
		}elseif(sizeof($_POST['checkbox'])){
			foreach($_POST['checkbox'] as $uid){
				$user=new model_User();
				$user->setSubsection('WHERE user_id='.$uid);
				$results=$user->doDelete();
				$num++;
			}
		}

		

		if($num>0){
			$msg='成功删除'.$num.'条记录';
		}

		$jsstring='Dialog.alert(\''.$msg.'\',function(){window.location.href="'.MICE_URL.'admin.php/user";window.event.returnValue = false;},300,100,"返回会员列表");';
		MessageBox($jsstring);
		exit;
	}
}
?>