<?php
/**
 *	Generated by miceCMS
 *	http://www.miceCMS.com/
 */
class database_restoreAction extends security_login {
	function action(){
		ModuleLimit(__CLASS__);

		$filename=MICE_DIR.MICE_PRIVATE.'backup/'.$this->_getParam('filename');

		if (!is_file($filename)){
			$jsstring='Dialog.alert("文件不存在",function(){history.back(-1);});';
			MessageBox($jsstring);
			exit;
		}
		set_time_limit(0);

		include_once MICE_DIR.'/includes/restore.php';

		$restoreDB = new restoreDB($filename);

		$smarty = new Smarty();
		$smarty->load_filter('pre','micePreCompileAdmin');		
		$smarty->assign('table_data',$table_data);
		$smarty->assign('url',MICE_URL.'admin.php/database/index');
		$smarty->assign("results",$restoreDB->results);
		$smarty->assign("ExeResults",$restoreDB->ExeResults);

		$filename = new getTPLFileName(__CLASS__);
		$smarty->display($filename->TPLFileName);
	}
}
?>