<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page import="com.opensymphony.xwork2.ActionContext" %>
<%@ include file="../language.jsp" %>
<%

if(session.getAttribute("loginUserName")==null){
	response.sendRedirect( "../login.jsp ");
}

%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<title>Soft Upgrade</title>
<head>

	<script src="../../scripts/jquery/jquery-1.4.2.min.js"></script>
	<script src="../../scripts/jquery/easyui/jquery.easyui.min.js"></script>
	<script src="../../scripts/jquery/jquery.corner.js"></script>
	<script src="../../scripts/easyui_common.js"></script>

	<link rel="stylesheet" type="text/css" href="../../scripts/jquery/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../../scripts/jquery/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="../../styles/style.css">
    <link rel="stylesheet" type="text/css" href="../../styles/comm.css">

	<script type="text/javascript">
	
	
	function upgrade(){//升级操作
		
		
		var _url='upgrade!upgrade.action';
	
		
		$('#upgradeWindow').window('open');
		
		$.post(_url,function(res){
			
			
			if(res=='true' || res==true){
				
				
				$.messager.show({
					title:'提示信息',
					msg:'恭喜，网站升级成功，升级成功后请及时删除/pages/upgrade文件夹！',
					timeout:10000,
					showType:'show'
				});
			}
			
			$('#upgradeWindow').window('close');
		});
		
	}
	
	
	$(document).ready(function(){
		
		$('#upgrade_btn').click(upgrade);
		
	});

	</script>


</head>
<body style="margin:0px;background-image:url(../../images/comm/login-bg.jpg);background-repeat:no-repeat; background-position:top;font-size:12px;" >



<div closed="false" class="easyui-window" collapsible="false" minimizable="false" maximizable="false" closable="false" title="Upgrade" style="width:650px;height:auto;" >

<form>
 
 	<div class="lineTableBgDiv" id="companyInfoDiv">
     	
       		<table style="width:100%" class="lineTable" cellspacing="1">
       		
       		
       		<tr>
       		<td style="height:80px">
       			注意：升级会改变数据库数据和结构，升级前建议先备份数据库或先在测试机上升级操作。
       		</td>
       		
       		</tr>
       		
       		<tr>
       		<td style="height:45px">
       			<a class="easyui-linkbutton"  id="upgrade_btn" icon="icon-ok" >升级到ITILBASE_II V1.2</a>
       		</td>
       		
       		</tr>
       		
       		</table>
       		
     </div>
 
</form>


</div>



<!-- 显示操作进程-->
<div id="upgradeWindow" class="easyui-window"  closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" closable="false" title="<fmt:message key="msg.tips"/>" style="width:280px;height:auto;">
    
	<div class="lineTableBgDiv">
	<table style="width: 100%" class="lineTable" cellspacing="1">
		<tr>
			<td style="text-align:center;height:40px"><img src="../../images/comm/loading.gif"/></td>
		</tr>
		<tr>
			<td style="text-align:center;font-size:14px"><div id="processMessage">
				正在执行系统升级，请稍后...
			</div></td>
		</tr>
		</table>
	</div>
   
</div>

</body>
</html>