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

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>添加站点</title>
    <meta name="description" content="overview &amp; stats" />
    <!--#include file = "../assets/head.htm" -->

    <script src="../assets/js/validate.js" type="text/javascript"></script>
    <script type="text/javascript">
    function checkAll()
    {
        //验证
        return checkAllValidate();
    }
    </script>
</head>
<body class="no-skin">
    <form id="frmAddRegister" method="post" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <div class="breadcrumbs" id="breadcrumbs">
                <script type="text/javascript">
                    try { ace.settings.check('breadcrumbs', 'fixed') } catch (e) { }
                </script>

  			    <ul class="breadcrumb">
					<li>
						<i class="ace-icon fa fa-home home-icon"></i>
						主页
					</li>
					<li>站点管理</li>
					<li class="active">站点开通</li>
				</ul><!-- /.breadcrumb -->

                <!-- /section:basics/content.searchbox -->
            </div>
            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <!-- PAGE CONTENT BEGINS -->

                <div class="row form-horizontal">
                    <div class="col-xs-12">
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="txtSchoolName">网站名称：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtSchoolName" runat="server" CssClass="col-xs-10 col-sm-5" MaxLength="100" notNull="true" msgName="网站名称"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Display="Dynamic" ControlToValidate="txtSchoolName" runat="server" ErrorMessage="请输入网站名称" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                                <span class="help-inline col-xs-12 col-sm-7">
                                    <span class="middle">*</span>
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right form-field-mask-3" for="txtSN">序列号：</label>
                            <div class="col-sm-9">
                                <div class="input-group col-xs-10 col-sm-5" style="float:left;">
                                <asp:TextBox ID="txtSN" runat="server" CssClass="form-control input-mask-product col-xs-10 col-sm-5" notNull="true" msgName="序列号"></asp:TextBox>
                                <span class="input-group-addon">
								    <i class="ace-icon fa fa-key"></i>
							    </span>
                                </div>
                                <span class="help-inline col-sm-7">
                                    <span class="middle">*</span>
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="txtDomainName">域名：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtDomainName" runat="server" CssClass="col-xs-10 col-sm-5" notNull="true" msgName="域名"></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 class="middle">&emsp;*&nbsp 注：请确保所填写的域名与将建站的Web服务器IP地址之间已做好域名解析，否则网站将不能正常访问。</span>

                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="ddlServer">WEB服务器：</label>
                            <div class="col-sm-9">
                                <asp:DropDownList ID="ddlServer" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlServer_SelectedIndexChanged" CssClass="col-xs-10 col-sm-5">
                                </asp:DropDownList>
                                <span class="help-inline col-xs-12 col-sm-7">
                                    <span class="middle">*</span>
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="ddlWebServer">WEB服务：</label>
                            <div class="col-sm-9">
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <asp:DropDownList ID="ddlWebServer" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlWebServer_SelectedIndexChanged" CssClass="col-xs-10 col-sm-5">
                                        </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>
                                <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>
                                <span class="help-inline col-xs-12 col-sm-7">
                                    <span class="middle">*</span>
                                </span>
                            </div>
                        </div>

                        <div class="form-group" style="display: none;">
                            <label class="col-sm-3 control-label no-padding-right" for="txtIP">服务器IP：</label>
                            <div class="col-sm-9">
                                <input id="txtIP" runat="server" disabled="disabled" type="text" cssclass="col-xs-10 col-sm-5" />
                                <asp:RequiredFieldValidator ID="reqIP" Display="Dynamic" ControlToValidate="txtIP"
                                    runat="server" ErrorMessage="请输入域名IP"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="form-group" style="display: none;">
                            <label class="col-sm-3 control-label no-padding-right" for="txtPort">端口号：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtPort" runat="server" Width="56px" CssClass="col-xs-10 col-sm-5" 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>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="ddlDBServer">数据库服务：</label>
                            <div class="col-sm-9">
                                <asp:DropDownList ID="ddlDBServer" runat="server" CssClass="col-xs-10 col-sm-5">
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="reqddlDBServer" runat="server" ControlToValidate="ddlDBServer"
                                    Display="Dynamic" ErrorMessage="请选择数据库服务" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                                <span class="help-inline col-xs-12 col-sm-7">
                                    <span class="middle">*</span>
                                </span>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="txtWebSpace">网站分配空间大小：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtWebSpace" runat="server" MaxLength="4" CssClass="col-xs-10 col-sm-2">0</asp:TextBox>
                                &emsp;*&nbsp; 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>
                            </div>
                        </div>
                        
                        <div class="form-group" style="display: none;">
                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1">目标文件夹路径：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtDesnPath" runat="server" Enabled="False" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqDesnPath" Display="Dynamic" ControlToValidate="txtDesnPath"
                                    runat="server"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="form-group" style="display: none;">
                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1">网站服务器IP：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtSysIP" runat="server" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqSysIP" Display="Dynamic" ControlToValidate="txtSysIP"
                                    runat="server" Enabled="False"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="form-group" style="display: none;">
                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1">网站管理员：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtSysAdmin" runat="server" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqSysAdmin" Display="Dynamic" ControlToValidate="txtSysAdmin"
                                    runat="server" Enabled="False"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="form-group" style="display: none;">
                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1">网站管理员密码：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtSysPwd" runat="server" TextMode="Password" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqSysPwd" Display="Dynamic" ControlToValidate="txtSysPwd"
                                    runat="server" Enabled="False"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="form-group" style="display: none;">
                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1">数据库IP：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtDBIP" runat="server" Enabled="False" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqDBIP" Display="Dynamic" ControlToValidate="txtDBIP"
                                    runat="server" ErrorMessage="请输入数据库IP"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="form-group" style="display: none;">
                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1">数据库管理员：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtDBAdmin" runat="server" Enabled="False" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqDBAdmin" Display="Dynamic" ControlToValidate="txtDBAdmin"
                                    runat="server" ErrorMessage="请输入数据库管理员"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="form-group" style="display: none;">
                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1">数据库管理员密码：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtDBAdminPwd" runat="server" TextMode="Password" Enabled="False" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqDBAdminPwd" Display="Dynamic" ControlToValidate="txtDBAdminPwd"
                                    runat="server" ErrorMessage="请输入数据库管理员密码"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="form-group" style="display: none;">
                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1">数据库名称：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtDBName" runat="server" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                                以字母开头，可以是字母与数字的组合！
                                <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>
                            </div>
                        </div>

                        <div class="form-group" style="display: none;">
                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1">数据库访问密码：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtDBUserPwd" runat="server" TextMode="Password" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqDBUserPwd" Display="Dynamic" ControlToValidate="txtDBUserPwd"
                                    runat="server" ErrorMessage="请输入数据库访问密码"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="txtLinkman">联系人：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtLinkman" runat="server" CssClass="col-xs-10 col-sm-5" notNull="true" msgName="联系人"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqLinkman" Display="Dynamic" ControlToValidate="txtLinkman" runat="server" ErrorMessage="请输入联系人" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                                <span class="help-inline col-xs-12 col-sm-7">
                                    <span class="middle">*</span>
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="txtPhone">联系电话：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtPhone" runat="server" CssClass="col-xs-10 col-sm-5" notNull="true" msgName="联系电话"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqPhone" Display="Dynamic" ControlToValidate="txtPhone"
                                    runat="server" ErrorMessage="请输入联系电话" ValidationGroup="webreg"></asp:RequiredFieldValidator>
                                <span class="help-inline col-xs-12 col-sm-7">
                                    <span class="middle">*</span>
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="txtEmail">E-mail：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtEmail" runat="server" CssClass="col-xs-10 col-sm-5" notNull="true" msgName="电子邮件" regex="/^(\w)+(\.\w+)*@(\w)+((\.\w{2,3}){1,3})$/" regexMsg="信箱格式不正确"></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>
                                <span class="help-inline col-xs-12 col-sm-7">
                                    <span class="middle">*</span>
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="txtQQ">QQ：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtQQ" runat="server" MaxLength="100" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="txtMSN">MSN：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtMSN" runat="server" MaxLength="100" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="txtMobile">移动电话：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtMobile" runat="server" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="txtRemark">备注：</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtRemark" runat="server" MaxLength="100" TextMode="MultiLine" Rows="3"
                                    CssClass="col-xs-10 col-sm-5"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                    
                </div>
                 <div class="clearfix form-actions">
                         <div class="col-md-offset-3 col-md-9">
                             <asp:Button ID="btnSave" runat="server" Text="创建站点" OnClientClick="return checkAll()" CssClass="btn btn-sm btn-primary" OnClick="btnSave_Click" ValidationGroup="webreg"></asp:Button>	
                        </div>
                    </div>
               
                <!-- PAGE CONTENT ENDS -->
            </div>
        </div>
        
        <input id="SystemPath" type="hidden" name="Hidden1" runat="server" />
    </form>
    <!--#include file = "../assets/foot.htm" -->
</body>
</html>
