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

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