<?php
/**
 *	Generated by miceCMS
 *	http://www.miceCMS.com/
 */
class plugin_deleteAction extends security_login {
	function action(){
		//接收参数并放入Session
		ModuleLimit(__CLASS__);
		global $conn;
		$plugin_id=$this->_getParam('plugin_id');
		$name=$this->_getParam('name');

		if($plugin_id)
		{
			$plugin=new model_Plugin();
			$plugin->setSubsection('WHERE plugin_id='.$plugin_id);
			$results=$plugin->doDelete();
			if(!$results){
				$exeresult='删除此插件在数据库中的记录失败.';
			}else{
				$exeresult='此插件在数据库中的记录已删除,如需删除插件文件,请手动删除:plugins目录下的'.$name.'文件夹!';
			}
		}

		

		$jsstring='Dialog.alert("'.$exeresult.'",function(){history.back(-1);});';
		MessageBox($jsstring);
		exit;
	}
}
?>