<?php
/**
 *	Generated by miceCMS
 *	http://www.miceCMS.com/
 */
class form_openAction extends security_login {
	function action(){
		ModuleLimit(__CLASS__);
		global $conn;
		$msg='未改变任何内容';
		$num=0;
		$form_id=$this->_getParam('form_id');
		if($form_id > 0){
			$form=new model_Form();
			$form->setSubsection('WHERE form_id='.$form_id);
			$form->setIsopen('1');
			$results=$form->doUpdate();
			
			$num++;
		}elseif(sizeof($_POST['checkbox'])){
			foreach($_POST['checkbox'] as $aid){
				$form=new model_Form();
				$form->setSubsection('WHERE form_id='.$aid);
				$form->setIsopen('1');
				$results=$form->doUpdate();

				$num++;
			}
		}
		if($num>0){
			$msg='成功审核通过'.$num.'条记录';
		}
		

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

		exit;
	}
}
?>