<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Other_BlackIP_Operate, V5Shop.Shop.Others" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc1" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<!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 id="Head1" runat="server">
    <title>IP地址过滤添加/编辑页面</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>

    <script type="text/javascript" language="javascript" src="js/Control_Calendar.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="【 IP地址过滤添加 】"></asp:Label>
                <asp:Label ID="lblEdit" runat="server" Text="【 IP地址过滤编辑 】" Visible="false"></asp:Label>
                <a href="Other_BlackIP_Manage.aspx" title="返回IP地址过滤列表">返回列表</a>
            </div>
        </div>
        <div>
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="OperateTable">
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblStartIp" runat="server" Text="开始IP："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px" colspan="3">
                        <asp:TextBox ID="txtStartIp" runat="server" MaxLength="150" Width="300px"></asp:TextBox><span class="NeedMsg">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtStartIp"
                            runat="server" ErrorMessage="不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtStartIp"
                            Display="Dynamic" ErrorMessage="IP地址格式不正确" ValidationExpression="(\d+)\.(\d+|\*)\.(\d+|\*)\.(\d+|\*)"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 29px; width: 20%;">
                        <asp:Label ID="lblCategoryID" runat="server" Text="结束IP："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 29px" colspan="3">
                        <asp:TextBox ID="txtEndIp" runat="server" MaxLength="150" Width="300px"></asp:TextBox><span class="NeedMsg">*</span>&nbsp;
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtEndIp"
                            ErrorMessage="不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtEndIp"
                            Display="Dynamic" ErrorMessage="IP地址格式不正确" ValidationExpression="(\d+)\.(\d+|\*)\.(\d+|\*)\.(\d+|\*)"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 29px; width: 20%;">
                        <asp:Label ID="lblStartDate" runat="server" Text="屏蔽开始时间："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 29px" colspan="3">
                        <asp:TextBox ID="txtStartDate" runat="server" MaxLength="150" Width="200px"></asp:TextBox>
                        <img id="sltStart" src="images/calendar1.gif" title="打开日历" alt="打开日历" align="absmiddle" />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtStartDate"
                            runat="server" ErrorMessage="日期格式不正确" ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"
                            Display="Dynamic"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 29px; width: 20%;">
                        <asp:Label ID="lblEndDate" runat="server" Text="屏蔽结束日期："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 29px" colspan="3">
                        <asp:TextBox ID="txtEndDate" runat="server" MaxLength="150" Width="200px"></asp:TextBox>
                        <img id="sltEnd" src="images/calendar1.gif" title="打开日历" alt="打开日历" align="absmiddle" />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" ControlToValidate="txtEndDate"
                            runat="server" ErrorMessage="日期格式不正确" ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"
                            Display="Dynamic"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 35px; width: 20%;">
                        <cc1:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="例外用户" ImageURL="images/help.gif"
                            Text="此项设置的用户将会被放行，允许正常访问网站，不受IP过滤影响" />
                        <asp:Label ID="Label1" runat="server" Text="例外用户："></asp:Label></td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 35px" colspan="3">
                        <asp:DropDownList ID="ddlUserType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlUserType_SelectedIndexChanged">
                        </asp:DropDownList>
                        <asp:TextBox ID="txtUserName" runat="server" Width="200px"></asp:TextBox>
                        <asp:Button ID="btnSearchUser" runat="server" CssClass="button" OnClick="btnSearchUser_Click"
                            Text="搜索" CausesValidation="False" /></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="width: 20%; height: 30px;">
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px;width:10%;">
                        <asp:Label ID="lblNonSelectUser" runat="server" Text="待选例外用户"></asp:Label><br/>
                        <asp:ListBox ID="lbNonSelectUser" runat="server" Height="200px" Width="140px" SelectionMode="Multiple"></asp:ListBox>
                    </td>
                    <td align="center" bgcolor="#ffffff" style="height: 30px; width: 10%;">
                        <asp:Button ID="btnAddUser" runat="server" Text="添加>>" CssClass="button" CausesValidation="False" OnClick="btnAddUser_Click" /><br/><br/>
                        <asp:Button ID="btnDelUser" runat="server" Text="<<移除" CssClass="button" CausesValidation="False" OnClick="btnDelUser_Click" />
                    </td>
                    <td align="left" bgcolor="#ffffff" style="height: 30px;">
                    <asp:Label ID="lblSelectUser" runat="server" Text="已选例外用户"></asp:Label><br/>
                        <asp:ListBox ID="lbSelectUser" runat="server" Height="200px" Width="140px" SelectionMode="Multiple"></asp:ListBox></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblDescription" runat="server" Text="描述："></asp:Label></td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px" colspan="3">
                        <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Width="300px" Height="60px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="txtDescription"
                            Display="Dynamic" ErrorMessage="长度必须在250字以内" ValidationExpression="^[\s\S]{0,250}$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="width: 20%; height: 30px;">
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px" colspan="3">
                        <asp:Button ID="btnAdd" runat="server" Text="确定" OnClick="btnAdd_Click" meta:resourcekey="btnAddResource1"
                            CssClass="button" />
                        <asp:Button ID="btnEdit" runat="server" Text="更新" OnClick="btnEdit_Click" Visible="False"
                            meta:resourcekey="btnEditResource1" CssClass="button" />
                        <input id="iptReset" runat="server" type="reset" value="重置" class="button" />
                        <input id="btnReturn" runat="server" type="button" value="返回列表" onclick="window.location.href='Other_BlackIP_Manage.aspx'"
                            class="button" />
                    </td>
                    <td align="left" bgcolor="#ffffff" style="height: 30px">
                    </td>
                </tr>
            </table>

            <script type="text/javascript">
            //加TABLE样式
            InitTrClass();
            
            //日历控件
        Calendar.setup({
	        inputField     :    "txtStartDate",
	        ifFormat       :    "%Y-%m-%d", 
	        button         :    "sltStart",
	        align          :    "Br",
	        singleClick    :    true
        });
        Calendar.setup({
	        inputField     :    "txtEndDate",
	        ifFormat       :    "%Y-%m-%d", 
	        button         :    "sltEnd",
	        align          :    "Br",
	        singleClick    :    true
        }); 
            </script>

        </div>
    </form>
    <uc1:PageBottom ID="PageBottom1" runat="server" />
</body>
</html>
