<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_Tag_TagList, QianboCMS" EnableEventValidation="false" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Import Namespace="Qianbo.Common" %>
<%@ Import Namespace="Qianbo.BLL" %>
<!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 type="text/javascript" src="../../Js/Common.js"></script>
    <script type="text/javascript">
        function AlertClear() {
            var searchCount = $('txtSearchCount').value.trim();
            if (!CheckNumberNotZero(searchCount)) {
                alert('清理关键字搜索次数条件必须为正整数！');
                return false;
            }
            if (confirm('是否确定清理搜索次数小于' + searchCount + '次的关键字？')) {
                return true;
            }
            else {
                return false;
            }
        }
        function CheckValidate() {
            if ($("txtTagName").value.trim().length == 0) {
                alert("关键字名称不能为空！");
                return false;
            }
            return true;
        }
    </script>
</head>

<body>
    <table cellspacing="1" cellpadding="0" class="wzdh" align="center">
        <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>
    <form id="form1" runat="server">
        <table cellpadding="0" cellspacing="1" class="border" align="center">
            <tr>
                <td class="wzlist">
					<span style="float: left;">
						关键字名称：
						<asp:TextBox ID="txtTagName" runat="server" MaxLength="20" Columns="10"></asp:TextBox>
						所属类别：
						<asp:DropDownList ID="ddlTagCategoryId" runat="server"></asp:DropDownList>
						所属系统：
						<asp:DropDownList ID="ddlModelType" runat="server"></asp:DropDownList>
						<asp:Button ID="btnSubmit" runat="server" CssClass="btn" OnClick="btnSubmit_Click" OnClientClick="return CheckValidate()" Text="添加关键字" />
					</span>
                    <span style="float: right;">
						清理搜索次数小于
						<asp:TextBox ID="txtSearchCount" runat="server" MaxLength="10" Width="30px"></asp:TextBox>
                        次的关键字
						<asp:Button ID="btnClear" runat="server" CssClass="btn" OnClick="btnClear_Click" OnClientClick="return AlertClear()" Text="清理" />
					</span>
				</td>
            </tr>
        </table>
        <table cellpadding="0" cellspacing="1" class="border" align="center">
            <asp:Repeater ID="repTag" runat="server" EnableViewState="false">
                <HeaderTemplate>
                    <tr class="title">
                        <td>关键字名称</td>
                        <td width="180px">关键字类别</td>
                        <td width="120px">所属模块</td>
                        <td width="90px">昨日搜索次数</td>
                        <td width="90px">今日搜索次数</td>
                        <td width="90px">总搜索次数</td>
                        <td width="90px">添加者</td>
                    </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="tdbg">
                        <td><%# Function.HtmlEncode(Eval("TagName"))%></td>
                        <td><%# Eval("TagCategoryName")%></td>
                        <td><%# Eval("ModelName")%></td>
                        <td><%# Eval("YesterdaySearchCount")%></td>
                        <td><%# Eval("DaySearchCount")%></td>
                        <td><%# Eval("TotalSearchCount")%></td>
                        <td><%# Function.HtmlEncode(Eval("UserName"))%></td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
        <table cellpadding="0" cellspacing="1" class="border" align="center">
            <tr>
                <td class="wzlist">
                    <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PageSize="20" HorizontalAlign="Right" PrevPageText="上一页" ShowInputBox="Never" UrlPageIndexName="p" UrlPaging="True" ShowCustomInfoSection="Left" Width="99%" LayoutType="Table" CustomInfoSectionWidth="10%"></webdiyer:AspNetPager>
				</td>
            </tr>
        </table>
    </form>
    <asp:Literal ID="LitMsg" runat="server"></asp:Literal>
</body>
</html>