<%@ Page Language="C#" AutoEventWireup="true" Codebehind="upgrade.aspx.cs" Inherits="MyITJob.Admin.upgrade" %>

<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>WorkYi!NT 升级向导</title>
    <link rel="stylesheet" href="../images/install.css" type="text/css" />

    <script type="text/javascript">
	        function submittoupgrade(submited)
	        {   
	            document.getElementById("btnSubmit").disabled = true;
                document.getElementById("hint").style.display = "block";
	            if (!submited) {   
                    document.forms.item(0).submit(); // 触发按钮事件，进入Page_Load();
                }
	        }
    </script>

    <style type="text/css">
    .redfont {
	color: #F00;
}
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <table width="700" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666">
            <tr>
                <td bgcolor="#ffffff">
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                            <td colspan="2" bgcolor="#333333">
                                <table width="100%" border="0" cellspacing="0" cellpadding="8">
                                    <tr>
                                        <td>
                                            <font color="#ffffff">升级 WorkYi!NT</font></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td width="180" valign="top">
                                <img src="../images/install/install_logo.jpg" /></td>
                            <td width="520" valign="top">
                                <br />
                                <table id="Table2" cellspacing="1" cellpadding="1" width="90%" align="center" border="0">
                                    <tr>
                                        <td>
                                            <p style="text-align: center">
                                                系统检测到您当前安装的 工作易人才招聘系统 版本为</p>
                                            <p style="text-align: center">
                                                WorkYi!NT <font color="red">
                                                    <%=xmlVersion %>
                                                </font>版
                                            </p>
                                            <p class="redfont" style="text-align: center">
                                                【忠告】升级前请备份好您现有的网站文件及数据库</p>
                                            <p style="text-align: center">
                                                如升级后系统出现任何异常，<span class="redfont">授权版</span>用户可直接申请官方进行升级及修复。
                                            </p>
                                            <div id="hint" runat="server" style="display: none;">正在升级, 请稍候...</div>
                                        </td>
                                    </tr>
                                </table>
                                <p>
                                </p>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td>
                                <table width="90%" border="0" cellspacing="0" cellpadding="8">
                                    <tr>
                                        <td align="right">
                                            &nbsp;<input id="btnSubmit" type="button" runat="server" onclick="submittoupgrade(false);"
                                                value="下一步" onserverclick="btnSubmit_ServerClick" /></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
    <%
        // 单击按钮后，回发事件会变成true
        if (IsPostBack) { 
    %>
    <script type="text/javascript">submittoupgrade(true);</script>
    <%
        }
    %>
</body>
</html>
