<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../common/init.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="${ctx}/resources/css/main.css" type="text/css" />
<link rel='stylesheet' href='${ctx}/resources/css/easyui.css' type='text/css' media='screen' />
<link rel='stylesheet' href='${ctx}/resources/css/easyui/icon.css' type='text/css' media='screen' />
<link rel='stylesheet' href='${ctx}/resources/css/user-center-style.css' type='text/css' media='screen' />
<%@ include file="../../common/top.jsp"%>
<script type="text/javascript" src="${ctx}/resources/js/swfupload/swfupload.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/swfupload/DBFhandlers.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/swfupload/batchPaper.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/jquery.mask.js"></script>
<title>系统备份还原</title>
<script type="text/javascript">
	$(function(){
		swfuFormal=new SWFUpload({
		    upload_url :"${ctx}/user/restoreSys",
		    use_query_string : false,
		    
		   // File Upload Settings
		   file_size_limit : "100 MB",  // 1000MB
		   file_types : "*.zip",
		   file_types_description : "所有文件",
		   file_upload_limit : "0",
		                   
		   file_queue_error_handler : fileQueueError,
		   file_dialog_complete_handler : restoreFileDialogComplete,//选择好文件后提交
		   upload_progress_handler : uploadProgress,
		   upload_error_handler : uploadError,
		   upload_success_handler : restoreUploadSuccess,
		   upload_complete_handler : restoreUploadComplete,
		
		   // Button Settings
		   button_image_url : '${ctx}/resources/images/SmallSpyGlassWithTransperancy_17x18.png',
		   button_placeholder_id : "formalPaperReturnBtn",
		   button_width: 370,
		   button_height: 18,
		   button_text : '<span class="button">上传还原文件</span><span style="color: red;">(提示:上传.zip包)</span>',
		   button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12px; } .buttonSmall { font-size: 10px; color: #ff0000;}',
		   button_text_top_padding: 0,
		   button_text_left_padding: 18,
		   button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
		   button_cursor: SWFUpload.CURSOR.HAND,
		   
		   // Flash Settings
		   flash_url : '${ctx}/resources/js/swfupload/swfupload.swf',
		
		   custom_settings : {
		       upload_target : "divFileProgressContainer"
		   },
		   // Debug Settings
		   debug: false  //是否显示调试窗口
		});
		
		
		
		
		$("#backupsBtn").on('click',function(){
			$.messager.confirm("操作提示", "是否确定备份?", function (data) {
				if (data) {
					location.href="${ctx}/user/backupSys";
				}
			});
		});
	});
</script>
</head>
<body>
	<%@ include file="../../common/header.jsp"%>
	<div id="content" class="content">
		<%@ include file="../../common/sub_menu.jsp"%>
		<div class="page" id="page" align="center">
			<div class="page-header" >题库系统备份还原</div>
			<div class="page-body" style="width: 600px; padding-top: 120px;">
				<div style="width: 300px; float: left;height: 204px;">
					<input type="button" style="background-color: #FFFF99;width: 300px;height: 204px; font-size:30px;" id="backupsBtn" value="系统备份"/>
				</div>
				<div  style="width: 300px;float: left;height: 204px;">
					<input type="button" style="background-color:#FF6666;width: 300px;height: 204px; font-size:30px;" id="restoreBtn" value="系统还原" onclick="$('#w5').window('open')"/>
				</div>
			</div>
		</div>
	</div>
	
	<div id="w5" class="easyui-window" title="系统还原" data-options="modal:true,closed:true,iconCls:'icon-import'" style="width:480px;height:200px;padding:10px;">
	    <div  id="uploadDiv">
		    <div id="do_import_paper_button">
		        <div id="rukuPaperUploadMsg" ></div>
		        <span id="formalPaperReturnBtn"></span>
		    </div>
	    </div>
	</div>
</body>
</html>