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

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

		$jsstring='Dialog.alert(\''.$msg.'\',function(){window.location.href="'.MICE_URL.'admin.php/config";window.event.returnValue = false;},300,100,"返回系统参数列表");';
		MessageBox($jsstring);

		exit;
	}
}
?>