<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="edit_Keywords_strategy.aspx.vb" Inherits="gogo_mechanism.edit_Keywords_strategy" %>
<%@ Import namespace="gogo_mechanism"%>
<html>
	<head id="head1"  runat="server">
    <title><%=pagename %></title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="stylesheet" type="text/css" href="lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="stylesheets/theme.css">
    <link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css">
    <link href="site_css2.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="js/DatePicker/WdatePicker.js" language="javascript"></script>
    <script type="text/javascript" src="js/myjs.js" language="javascript"></script>
    <script src="lib/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="lib/bootstrap/js/bootstrap.js" type="text/javascript"></script>
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!-- Le fav and touch icons -->
        <style type="text/css">

			.STYLE1 { COLOR: #999999 }
			</style>
</head>
  <body class=""> 
     <!--<![endif]-->
    <form id="Form1" runat="server">
    <div class="content">
        
        <div class="header">

            <h1 class="page-title"><%=pagename %></h1>
        </div>
        
                <ul class="breadcrumb">
            <li><a href="info.aspx">系统首页</a> <span class="divider">/</span></li>
            <li><a href="KeywordsStrategy_config.aspx">关键词策略管理</a> <span class="divider">/</span></li>
            <li class="active"><%=pagename %></li>
        </ul>

        <div class="container-fluid">
            <div class="row-fluid">
                    
<div class="btn-toolbar">
    <asp:button id="Button1" runat="server" Text="保存(ALT+S)" AccessKey="s" 
        class="btn"></asp:button>
	<asp:button id="Button2" runat="server" Text="取消(ALT+C)" 
        CausesValidation="False" AccessKey="C" class="btn"></asp:button>
</div>
<div class="btn-group"></div>
<div class="well">


<table class="table" width="100%">
					<tr>
						<td class="td1">编号：</td>
						<td class="td2">
                            <asp:Label ID="id" runat="server"></asp:Label>
                        </td>
					</tr>
					<tr>
						<td class="td1">所属部门：</td>
						<td class="td2">
                            <asp:TextBox ID="dpmid" onclick="showDIV(this,dwtree);" 
                                    runat="server" ReadOnly="True" Width="170px"></asp:TextBox>                            </td>
					</tr>
					<tr>
						<td class="td1">策略名称：</td>
						<td class="td2">
                            <asp:TextBox ID="mc" runat="server" Width="270px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="mc" ErrorMessage="名称不能为空"></asp:RequiredFieldValidator>
                        </td>
					</tr>
					<tr>
						<td class="td1">启用状态：</td>
						<td class="td2">
                            <asp:CheckBox ID="kg" runat="server" Checked="True" Text="启用" />
                        </td>
					</tr>
					<tr>
						<td class="td1">预警级别：</td>
						<td class="td2">
                            <asp:DropDownList ID="jb" runat="server">
                                <asp:ListItem Value="1">蓝色</asp:ListItem>
                                <asp:ListItem Value="2">黄色</asp:ListItem>
                                <asp:ListItem Value="3">红色</asp:ListItem>
                            </asp:DropDownList>
                        </td>
					</tr>
					<tr>
						<td class="td1">邮件短信报警：</td>
						<td class="td2">
                            <asp:CheckBox ID="msg" runat="server" Text="开启" />
                        </td>
					</tr>
					<tr>
						<td class="td1">IP地址限制：</td>
						<td class="td2">
                            <asp:DropDownList ID="ipc" runat="server">
                                <asp:ListItem Value="0">不限制</asp:ListItem>
                                <asp:ListItem Value="1">在IP范围内预警</asp:ListItem>
                                <asp:ListItem Value="2">在IP范围外预警</asp:ListItem>
                            </asp:DropDownList>
                            <br />
                            <asp:TextBox ID="ips" runat="server" Height="80px" MaxLength="4000" 
                                TextMode="MultiLine" Width="300px"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="ipsre" runat="server" 
                                ControlToValidate="ips" ErrorMessage="IP地址范围格式错误" 
                                ValidationExpression="(((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))-((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))))(\n(((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))-((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))))){0,9999}"></asp:RegularExpressionValidator>
                            <br />
                            <span class="STYLE1">（IP地址范围以行为单位，每行格式为：<span class="v_l">110.96.0.0-</span><span 
                                class="v_r">110.127.255.255</span>）</span></td>
					</tr>
					<tr>
						<td class="td1">关键词识别模式：</td>
						<td class="td2">
                            <asp:DropDownList ID="keysmod" runat="server" AutoPostBack="True">
                                <asp:ListItem Value="1">仅需出现</asp:ListItem>
                                <asp:ListItem Value="4">出现且有间隔要求</asp:ListItem>
                                <asp:ListItem Value="2">按照顺序</asp:ListItem>
                                <asp:ListItem Value="3">按照顺序且间隔要求</asp:ListItem>
                            </asp:DropDownList>
                            <asp:Label ID="jgstr" runat="server" Text="最大间隔字符数"></asp:Label>
                            <asp:TextBox ID="jg" runat="server" Width="53px">100</asp:TextBox>
                            <asp:RequiredFieldValidator ID="jgre1" runat="server" ControlToValidate="jg" 
                                ErrorMessage="间隔必填"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="jgre2" runat="server" 
                                ControlToValidate="jg" ErrorMessage="间隔必须为非负整数" 
                                ValidationExpression="^[1-9]\d*$"></asp:RegularExpressionValidator>
                        </td>
					</tr>
					<tr>
						<td class="td1">关键词组选择：</td>
						<td class="td2">
                            <asp:DropDownList ID="keys" runat="server">
                            </asp:DropDownList>
                            &nbsp;<asp:CheckBox ID="ddcx" runat="server" Text="定义为必须出现" />
                            &nbsp;<asp:Button ID="Button3" runat="server" CausesValidation="False" Text="加入选择" class="btn"/>
                            <span class="STYLE1">（可将所有非必须出现的关键词组理解为一个必须出现的关键词组）</span></td>
					</tr>
					<tr>
						<td class="td1">已选关键词组：</td>
						<td class="td2">
<asp:GridView ID="GridView1" runat="server"  AutoGenerateColumns="False" GridLines="None" PageSize="15" 
                                Width="100%" CssClass="table">
                                     <Columns>
                                        <asp:BoundField DataField="kid" HeaderText="编号">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="kmc" HeaderText="名称">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="ddcx" HeaderText="出现规则">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" />
                                        </asp:BoundField>
                                             <asp:CommandField HeaderText="操作" SelectText="删除" ShowSelectButton="True" >
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" />
                                        </asp:CommandField>
                                    </Columns>
        <PagerStyle CssClass="pagerclass" />
        <EmptyDataTemplate>
            暂无选择关键词！
        </EmptyDataTemplate>
        </asp:GridView>
                        </td>
					</tr>
					<tr>
						<td class="td1">排除关键词：</td>
						<td class="td2">
                            <asp:TextBox ID="nokeys" runat="server" Height="51px" MaxLength="4000" 
                                TextMode="MultiLine" Width="380px"></asp:TextBox>
                            <br />
                            <span class="STYLE1">（每个关键词一行，如果上述任一个关键词出现，那么就不会预警）</span></td>
					</tr>
					<tr>
						<td class="td1">排序权重：</td>
						<td class="td2">
                            <asp:TextBox ID="qz" runat="server" Width="43px">0</asp:TextBox>
                            <span class="STYLE1">
                            <asp:RequiredFieldValidator ID="ddsjre5" runat="server" ControlToValidate="qz" 
                                ErrorMessage="权重必填"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="ddsjre6" runat="server" 
                                ControlToValidate="qz" ErrorMessage="权重必须为非负整数" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                            </span>
                        </td>
					</tr>
					</table>



</div>
                  
            </div>
        </div>
    </div>
                <!--隐藏开始-->
			<div class="menudiv" id="dwtree">
            <asp:TreeView ID="fidTreeView" runat="server" ImageSet="XPFileExplorer" 
        NodeIndent="15" ShowLines="True">
            <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
            <NodeStyle Font-Names="Tahoma" ForeColor="Black" 
                HorizontalPadding="2px" NodeSpacing="0px" VerticalPadding="2px" />
            <ParentNodeStyle Font-Bold="False" />
            <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" 
                HorizontalPadding="0px" VerticalPadding="0px" />
        </asp:TreeView>
            </div>
			<!--隐藏结束-->
    </form>
</body>
</html>