<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_SubSite_DelSubSite, QianboCMS" EnableEventValidation="false" %>
<!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>分站管理</title>
    <link href="../Css/layout.css" rel="Stylesheet" type="text/css" />
    <script src="../../Js/Common.js" type="text/javascript"></script>
    <script>
        function conn() {
            var pass = $("txtPass");
            var ip = $("txtServerIp");
            var uid = $("txtUserName");
            if (ip.value == "") {
                alert('请输入数据库服务器IP！');
                ip.focus();
                return false;
            }
            if (uid.value == "") {
                alert('请输入用户名！');
                uid.focus();
                return false;
            }
            System_SubSite_DelSubSite.CanConnect("Server=" + ip.value + ";uid=" + uid.value + ";pwd=" + pass.value, CallBack);
        }
        function CallBack(res) {
            if (res.value == "true") {
                alert("数据库连接成功！");
            }
            else {
                alert("数据库连接失败！");
            }
        }
    </script>
</head>

<body>
    <table align="center" cellpadding="0" cellspacing="1" class="wzdh">
        <tr>
            <td style="padding-left: 10px;">
                <img src="../Images/Skin/Default/you.gif" align="absmiddle" />
                您现在的位置：<a href="../SystemInfo.aspx">后台管理</a> &gt;&gt; 分站列表
			</td>
        </tr>
    </table>
    <table align="center" cellpadding="0" cellspacing="1" class="border">
        <tr>
            <td class="wzlist"><a href="SetSub.aspx">新增分站</a> | <a href="SiteList.aspx">分站列表</a></td>
        </tr>
    </table>
    <form id="form1" runat="server">
        <table cellpadding="0" cellspacing="1" class="border" align="center">
            <tr>
                <td class="bqleft">分站名称(中文)：</td>
                <td class="bqright">
                    <asp:Label ID="SubSiteName" runat="server"></asp:Label>
				</td>
            </tr>
            <tr>
                <td class="bqleft">分站名称(英文)：</td>
                <td class="bqright">
                    <asp:Label ID="SubSiteEnName" runat="server"></asp:Label>
				</td>
            </tr>
            <tr>
                <td class="bqleft">数据库服务器IP：</td>
                <td class="bqright">
                    <asp:TextBox ID="txtServerIp" runat="server">(local)</asp:TextBox>
                    <span style="color: red;">*</span>
				</td>
            </tr>
            <tr>
                <td class="bqleft">删除数据库帐号：</td>
                <td class="bqright">
                    <asp:TextBox ID="txtUserName" runat="server">sa</asp:TextBox>
                    <span style="color: red;">*</span>
				</td>
            </tr>
            <tr>
                <td class="bqleft">删除数据库密码：</td>
                <td class="bqright">
                    <asp:TextBox ID="txtPass" runat="server" TextMode="Password">123456</asp:TextBox>
                    <input id="btnTest" class="btn" type="button" value="测试连接" onclick="conn();" />
				</td>
            </tr>
            <tr>
                <td class="bqleft"></td>
                <td class="bqright">
                    <asp:Button ID="Button1" runat="server" Text="确认删除" OnClientClick="return confirm('是否确定删除此分站？');" CssClass="btn" OnClick="Button1_Click" />
				</td>
            </tr>
        </table>
    </form>
</body>
</html>