<%@ Page Language="C#" AutoEventWireup="true" Inherits="Install_Default, QianboCMS" EnableViewStateMac="false" EnableEventValidation="false" ViewStateEncryptionMode="Never" %>
<!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 runat="server">
    <title>千博网站管理系统 <%=Qianbo.Common.Param.SysVersion%> - 安装向导</title>
    <link rev="stylesheet" media="all" href="Images/setup.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="../Scripts/Common.js"></script>
    <script>
        function Link() { var ip = $("txtIp").value; var name = $("txtName").value; var username = $("txtUserName").value; var password = $("txtPassWord").value; Install_Default.ExistsConn(ip, name, username, password, callback) }; function callback(res) { alert(res.value) }
    </script>
</head>

<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <table border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
                    <tr>
                        <td bgcolor="white">
                            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td colspan="2" bgcolor="#666666">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="8">
                                            <tr>
                                                <td><strong><font color="white">千博网站管理系统 <%=Qianbo.Common.Param.SysVersion%> - 安装向导</font></strong></td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2"></td>
                                </tr>
                                <tr>
                                    <td width="200" style="background: #fff url(Images/setup.jpg) no-repeat 0 0; width: 200px; height: 380px;"></td>
                                    <td width="550" valign="top">
                                        <table cellpadding="4" cellspacing="0" border="0" width="100%">
                                            <tr>
                                                <td height="50"><asp:Literal ID="LitMsg" runat="server"></asp:Literal></td>
                                            </tr>
                                        </table>
                                        <table id="Tab1" cellspacing="1" cellpadding="1" width="90%" align="center" border="0" runat="server">
                                            <tr>
                                                <td>
                                                    <p>欢迎安装千博网站管理系统 <%=Qianbo.Common.Param.SysVersion%></p>
                                                    <p>本向导将协助您一步步的安装此软件。建议您在运行本向导前仔细阅读程序包中的《安装说明》文档，如果您已经阅读过，请点击下一步。</p>
                                                </td>
                                            </tr>
                                        </table>
                                        <table id="Tab2" cellspacing="1" cellpadding="1" width="90%" align="center" border="0" runat="server">
                                            <tr>
                                                <td>
                                                    <p>现在对您的运行环境进行检测，以确认您的环境符合要求。</p>
                                                    <p>
                                                        <asp:Literal ID="LitCheck" runat="server"></asp:Literal>
                                                    </p>
                                                </td>
                                            </tr>
                                        </table>
                                        <table id="Tab3" cellspacing="1" cellpadding="1" width="90%" align="center" border="0" runat="server">
                                            <tr>
                                                <td colspan="2">
                                                    <p>在进入下一步之前，请先设置好数据库的登录帐号并建好数据库，并根据建好的帐号和数据库名填写表单中的项。虚拟主机用户该部分信息会由主机供应商提供。</p>
                                                    <p></p>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="30%">请选择数据库版本：</td>
                                                <td>
                                                    <asp:DropDownList ID="DropDownList1" runat="server">
                                                        <asp:ListItem Value="2016">SQL Server</asp:ListItem>
                                                    </asp:DropDownList>
												</td>
                                            </tr>
                                            <tr>
                                                <td>数据库IP：</td>
                                                <td>
                                                    <asp:TextBox ID="txtIp" runat="server" CssClass="inp" Text="(local)"></asp:TextBox>
												</td>
                                            </tr>
                                            <tr>
                                                <td>数据库名称：</td>
                                                <td>
                                                    <asp:TextBox ID="txtName" runat="server" CssClass="inp" Text=""></asp:TextBox>
												</td>
                                            </tr>
                                            <tr>
                                                <td>数据库用户名：</td>
                                                <td>
                                                    <asp:TextBox ID="txtUserName" runat="server" CssClass="inp" Text=""></asp:TextBox>
												</td>
                                            </tr>
                                            <tr>
                                                <td>数据库用户密码：</td>
                                                <td>
                                                    <asp:TextBox ID="txtPassWord" runat="server" CssClass="inp"></asp:TextBox>
                                                    <input id="Button6" type="button" class="btn" value="测试连接" onclick="Link()" />
												</td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <p>【超级管理员设置】</p>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>管理员用户名：</td>
                                                <td>
                                                    <asp:TextBox ID="txtAdminName" runat="server" CssClass="inp"></asp:TextBox>
												</td>
                                            </tr>
                                            <tr>
                                                <td>管理员密码：</td>
                                                <td>
                                                    <asp:TextBox ID="txtAdminPassWord" TextMode="Password" runat="server" CssClass="inp"></asp:TextBox>
												</td>
                                            </tr>
                                            <tr>
                                                <td>确认密码：</td>
                                                <td>
                                                    <asp:TextBox ID="txtAdminPassWord2" TextMode="Password" runat="server" CssClass="inp"></asp:TextBox>
												</td>
                                            </tr>
                                            <tr>
                                                <td>登录认证码：</td>
                                                <td>
                                                    <asp:TextBox ID="txtRZM" TextMode="Password" runat="server" CssClass="inp"></asp:TextBox>
												</td>
                                            </tr>
                                        </table>
                                        <table id="Tab4" cellspacing="1" cellpadding="1" width="90%" align="center" border="0" runat="server">
                                            <tr>
                                                <td height="120" align="center">
                                                    <p>
                                                        <asp:Timer ID="Timer1" runat="server" Interval="1500" OnTick="Timer1_Tick"></asp:Timer>
                                                        <img src="Images/loading.gif" border="0" align="absmiddle" />
                                                        正在安装，请稍候…
                                                    </p>
                                                </td>
                                            </tr>
                                        </table>
                                        <table id="Tab5" cellspacing="1" cellpadding="1" width="90%" align="center" border="0" runat="server">
                                            <tr>
                                                <td height="120" align="center">
                                                    <p>
                                                        <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                                                    </p>
                                                </td>
                                            </tr>
                                        </table>
                                        <table id="Tab6" cellspacing="1" cellpadding="1" width="90%" align="center" border="0" runat="server">
                                            <tr>
                                                <td height="120" align="center">
                                                    <p>
                                                        <img src="Images/error.gif" align="absmiddle" />
                                                        <asp:Literal ID="Literal2" runat="server"></asp:Literal>
                                                    </p>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>&nbsp;</td>
                                    <td>
                                        <table width="90%" border="0" cellspacing="0" cellpadding="8" align="center">
                                            <tr>
                                                <td align="right" height="50">
                                                    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="下一步" CssClass="btn" />
                                                    <asp:Button ID="Button4" runat="server" Text="上一步" OnClick="Button4_Click" CssClass="btn" Style="margin-left: 10px;" />
                                                    <asp:Button ID="Button2" runat="server" Text="下一步" OnClick="Button2_Click" CssClass="btn" Style="margin-left: 10px;" />
                                                    <asp:Button ID="Button5" runat="server" Text="上一步" OnClick="Button5_Click" CssClass="btn" Style="margin-left: 10px;" />
                                                    <asp:Button ID="Button3" runat="server" Text="下一步" OnClick="Button3_Click" CssClass="btn" Style="margin-left: 10px;" />
                                                    <asp:Button ID="Button7" runat="server" Text="重新连接" CssClass="btn" OnClick="Button7_Click" />
												</td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
            </Triggers>
        </asp:UpdatePanel>
    </form>
</body>
</html>