<%@ Page Language="c#" Inherits="WebApp.addRegister" CodeBehind="addRegister.aspx.cs" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head id="Head1" runat="server">
    <title>添加网站</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/adminCssEdit.htm" -->
</head>
<body>
    <div class="edit-func-box func-box">
        <div class="hd">
            添加网站</div>
        <form id="frmAddRegister" method="post" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div class="bd">
            <table class="edit-table">
                <tr>
                    <th  >
                        <font color="red">*</font>网站名称：
                    </th>
                    <td colspan="3" >
                        <asp:TextBox ID="txtSchoolName" runat="server" CssClass="input-txt input-txt3" MaxLength="100"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqSchoolName" Display="Dynamic" ControlToValidate="txtSchoolName"
                            runat="server" ErrorMessage="请输入网站名称" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <th>
                        <font color="red">*</font>序列号：
                    </th>
                    <td colspan="3">
                        <asp:TextBox ID="txtSN" runat="server" CssClass="input-txt input-txt3"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqSN" Display="Dynamic" ControlToValidate="txtSN"
                            runat="server" ErrorMessage="请输入序列号" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <th >
                        <font color="red">*</font>域名：
                    </th>
                    <td colspan="3">
                        <asp:TextBox ID="txtDomainName" runat="server" CssClass="input-txt input-txt1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqDomaiName" Display="Dynamic" ControlToValidate="txtDomainName"
                            runat="server" ErrorMessage="请输入域名" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="validDomainName" runat="server" Display="Dynamic"
                            ControlToValidate="txtDomainName" ErrorMessage="请按如下格式输入：www.demo.com" ValidationExpression="([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"
                            ValidationGroup="webreg"></asp:RegularExpressionValidator>
                        <span style="color: Red">注：请确保所填写的域名与将建站的web服务器ip地址之间已做好域名解析，否则网站将不能正常访问。</span>
                    </td>
                </tr>
                <tr>
                    <th width="15%">
                        <font color="red">*</font>WEB服务器：
                    </th>
                    <td width="35%">
                     
                        <asp:DropDownList ID="ddlServer" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlServer_SelectedIndexChanged">
                        </asp:DropDownList>
                       </th>
                     
                    <th  width="15%">
                        WEB服务：
                    </th>
                    <td width="35%">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:DropDownList ID="ddlWebServer" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlWebServer_SelectedIndexChanged">
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="reqddlWebServer" runat="server" ControlToValidate="ddlWebServer"
                                    Display="Dynamic" ErrorMessage="请选择WEB服务" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="ddlServer" EventName="SelectedIndexChanged" />
                            </Triggers>
                        </asp:UpdatePanel>
                        <%--</td>
                    <td width="28%" align="left">--%>
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:Label ID="lbSpace" runat="server" Visible="False" Font-Bold="False" ForeColor="Red"></asp:Label>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="ddlWebServer" EventName="SelectedIndexChanged" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                    
                </tr>
                <tr style="display: none">
                    <th >
                        <font color="red">*</font>域名IP：
                    </th>
                    <td >
                        <input id="txtIP" runat="server" disabled="disabled" type="text" cssclass="input-txt input-txt3" />
                        <asp:RequiredFieldValidator ID="reqIP" Display="Dynamic" ControlToValidate="txtIP"
                            runat="server" ErrorMessage="请输入域名IP"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr style="display: none">
                    <th>
                        <font color="red">*</font>端口号：
                    </th>
                    <td>
                        <asp:TextBox ID="txtPort" runat="server" Width="56px" CssClass="input-txt input-txt3"
                            Enabled="False"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqPort" Display="Dynamic" ControlToValidate="txtPort"
                            runat="server"></asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="validPort" Display="Dynamic" ControlToValidate="txtPort"
                            runat="server" ErrorMessage=" 端口号为数字型" Type="Integer" Operator="DataTypeCheck"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <th>
                        <font color="red">*</font>网站分配空间大小：
                    </th>
                    <td>
                        <asp:TextBox ID="txtWebSpace" runat="server" MaxLength="4" Width="56px">0</asp:TextBox>
                        MB（0为不限制大小）
                        <asp:RequiredFieldValidator ID="reqWebSpace" Display="Dynamic" ControlToValidate="txtWebSpace"
                            runat="server" ErrorMessage="请输入网站空间大小" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="validWebSpace" Display="Dynamic" ControlToValidate="txtWebSpace"
                            runat="server" ErrorMessage=" 网站空间大小必须为大于0的整数" Type="Integer" Operator="GreaterThanEqual"
                            ValidationGroup="webreg" ValueToCompare="0"></asp:CompareValidator>
                    </td>
               
                    <th >
                        <font color="red">*</font>数据库服务：
                    </th>
                    <td >
                        <asp:DropDownList ID="ddlDBServer" runat="server">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="reqddlDBServer" runat="server" ControlToValidate="ddlDBServer"
                            Display="Dynamic" ErrorMessage="请选择数据库服务" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                    </td>
                </tr>
               
                <tr style="display: none">
                    <th>
                        <font color="red">*</font>目标文件夹路径：
                    </th>
                    <td>
                        <asp:TextBox ID="txtDesnPath" runat="server" Width="376px" Enabled="False" CssClass="input-txt input-txt3"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqDesnPath" Display="Dynamic" ControlToValidate="txtDesnPath"
                            runat="server"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr style="display: none">
                    <th>
                        <font color="red">*</font>网站服务器IP：
                    </th>
                    <td>
                        <asp:TextBox ID="txtSysIP" runat="server" Width="176px" CssClass="input-txt input-txt3"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqSysIP" Display="Dynamic" ControlToValidate="txtSysIP"
                            runat="server" Enabled="False"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr style="display: none">
                    <th >
                        <font color="red">*</font>网站管理员：
                    </th>
                    <td >
                        <asp:TextBox ID="txtSysAdmin" runat="server" Width="112px" CssClass="input-txt input-txt3"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqSysAdmin" Display="Dynamic" ControlToValidate="txtSysAdmin"
                            runat="server" Enabled="False"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr style="display: none">
                    <th >
                        <font color="red">*</font>网站管理员密码：
                    </th>
                    <td >
                        <asp:TextBox ID="txtSysPwd" runat="server" Width="112px" TextMode="Password"></asp:TextBox>
                        <font color="red">*</font>
                        <asp:RequiredFieldValidator ID="reqSysPwd" Display="Dynamic" ControlToValidate="txtSysPwd"
                            runat="server" Enabled="False"></asp:RequiredFieldValidator>
                    </td>
                </tr>
               
                <tr style="display: none">
                    <th >
                        <font color="red">*</font>数据库IP：
                    </th>
                    <td >
                        <asp:TextBox ID="txtDBIP" runat="server" Enabled="False"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqDBIP" Display="Dynamic" ControlToValidate="txtDBIP"
                            runat="server" ErrorMessage="请输入数据库IP"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr style="display: none">
                    <th>
                        <font color="red">*</font>数据库管理员：
                    </th>
                    <td >
                        <asp:TextBox ID="txtDBAdmin" runat="server" Width="112px" Enabled="False"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqDBAdmin" Display="Dynamic" ControlToValidate="txtDBAdmin"
                            runat="server" ErrorMessage="请输入数据库管理员"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr style="display: none">
                    <th >
                        <font color="red">*</font>数据库管理员密码：
                    </th>
                    <td>
                        <asp:TextBox ID="txtDBAdminPwd" runat="server" Width="112px" TextMode="Password"
                            Enabled="False"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqDBAdminPwd" Display="Dynamic" ControlToValidate="txtDBAdminPwd"
                            runat="server" ErrorMessage="请输入数据库管理员密码"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr style="display: none">
                    <th>
                        <font color="red">*</font>数据库名称：
                    </th>
                    <td >
                        <asp:TextBox ID="txtDBName" runat="server" Width="112px"></asp:TextBox>
                        <font color="#ff0000">*</font>以字母开头，可以是字母与数字的组合！
                        <asp:RequiredFieldValidator ID="reqDBName" Display="Dynamic" ControlToValidate="txtDBName"
                            runat="server" ErrorMessage="请输入数据库名称"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtDBName"
                            ErrorMessage="数据库命名错误！" ValidationExpression="^[a-zA-Z][a-zA-Z0-9]*$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr style="display: none">
                    <th >
                        <font color="red">*</font> 数据库访问密码：
                    </th>
                    <td >
                        <asp:TextBox ID="txtDBUserPwd" runat="server" Width="112px" TextMode="Password"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqDBUserPwd" Display="Dynamic" ControlToValidate="txtDBUserPwd"
                            runat="server" ErrorMessage="请输入数据库访问密码"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <th>
                        <font color="red">*</font> 联系人：
                    </th>
                    <td>
                        <asp:TextBox ID="txtLinkman" runat="server" CssClass="input-txt input-txt1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqLinkman" Display="Dynamic" ControlToValidate="txtLinkman"
                            runat="server" ErrorMessage="请输入联系人" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                    </td>
               
                    <th >
                        <font color="red">*</font>联系电话：
                    </th>
                    <td >
                        <asp:TextBox ID="txtPhone" runat="server" CssClass="input-txt input-txt1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqPhone" Display="Dynamic" ControlToValidate="txtPhone"
                            runat="server" ErrorMessage="请输入联系电话" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <th >
                        <font color="red">*</font>E-mail：
                    </th>
                    <td >
                        <asp:TextBox ID="txtEmail" runat="server" CssClass="input-txt input-txt1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqEmail" Display="Dynamic" ControlToValidate="txtEmail"
                            runat="server" ErrorMessage="请输入联系人Email" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="validEmail" runat="server" Display="Dynamic"
                            ControlToValidate="txtEmail" ErrorMessage=" 请输入有效格式的E-mail" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                            ValidationGroup="webreg"></asp:RegularExpressionValidator>
                    </td>
              
                    <th>
                        QQ：
                    </th>
                    <td>
                        <asp:TextBox ID="txtQQ" runat="server" MaxLength="100" CssClass="input-txt input-txt1"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th>
                        MSN：
                    </th>
                    <td colspan="3">
                        <asp:TextBox ID="txtMSN" runat="server" MaxLength="100" CssClass="input-txt input-txt1"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th >
                        移动电话：
                    </th>
                    <td colspan="3">
                        <asp:TextBox ID="txtMobile" runat="server" CssClass="input-txt input-txt1"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th >
                        备注：
                    </th>
                    <td colspan="3">
                        <asp:TextBox ID="txtRemark" runat="server" MaxLength="100" TextMode="MultiLine" Rows="3"
                             width="340"></asp:TextBox>
                    </td>
                </tr>
                <%--<tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="btnSave" runat="server" Text="保存" CssClass="btn" OnClick="btnSave_Click"
                            ValidationGroup="webreg"></asp:Button>
                    </td>
                </tr>--%>
            </table>
            <div class="ft">
                <div class="action-field txt-c">
                    <asp:Button ID="btnSave" runat="server" Text="保存" CssClass="btn" OnClick="btnSave_Click"
                        ValidationGroup="webreg"></asp:Button> <font color="red">注意：带“*”为必填项。</font>
                    <input id="SystemPath" type="hidden" name="Hidden1" runat="server">
                </div>
                <!--/action-field-->
            </div>
        </div>
        </form>
    </div>
</body>
</html>
