<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Member.User_Gbook_Manage, V5Shop.Member" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<!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" id="hdMain">
    <title>威博单用户系统</title>

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/membercss.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar-system.css" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript" language="javascript" src="Js/Calendar.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Calendar-Setup.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Calendar-zh.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Common.js"></script>
    <script type="text/javascript" language="javascript">
    //------------------------------------------------------------------
    // 检查日期型
    // obj          要检查的控件
    // Isfoucs      验证失败时是否控制焦点
    // IsMustInput  是否必须输入
    //------------------------------------------------------------------
    function CheckDate(objId, Isfoucs, IsMustInput)
    {
        var obj = document.getElementById(objId);
        if(obj.value == "")
        {
            if(IsMustInput)
            {
                alert("必须输入!");
                if(Isfoucs) obj.select();
                return false;
            }
        }
        else
        {
            var re = /^^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$/;
            if(!re.test(obj.value))
            {
                alert("请输入日期类型!");
                if(Isfoucs)
                {
                    obj.select();
                }
                else
                {
                    obj.value = "";
                }
                return false;
            }
        }
        return true;
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table border="0" cellpadding="5" cellspacing="0" class="membertable">
                <tr>
                    <td colspan="2" style="height:20px;background-image:url(../images/user/tbj10.gif);background-color:#65697A;">
                        <asp:Label ID="Label6" runat="server" Text="- 我的留言管理 -" Style="color: #ffffff; font-weight: bold;" />
                    </td>
                </tr>
                <tr>
                    <td style="border: 1px #CCCCCC solid; padding: 10px; text-align: left; background: #F9F9F9;">
                        <div>
                            <asp:Label ID="Label5" runat="server" meta:resourcekey="lblAdminNameResource" Text="留言标题:" />
                            <asp:TextBox ID="txtTitle" runat="server" Width="100px" CssClass="input2" />
                            <asp:Label ID="lblAdminName" runat="server" meta:resourcekey="lblAdminNameResource" Text="留言类型:" />
                            <asp:DropDownList ID="ddlMenuID" runat="server">
                                <asp:ListItem Value="-1">全部</asp:ListItem>
                            </asp:DropDownList>
                            <asp:Label ID="Label1" runat="server" meta:resourcekey="lblAdminNameResource" Text="是否回复:" />
                            <asp:DropDownList ID="ddlIsRemark" runat="server">
                                <asp:ListItem Value="-1">全部</asp:ListItem>
                                <asp:ListItem Value="1">已回复</asp:ListItem>
                                <asp:ListItem Value="0">未回复</asp:ListItem>
                            </asp:DropDownList>
                            <asp:Label ID="Label7" runat="server" meta:resourcekey="lblAdminNameResource" Text="留言时间:" />
                            <asp:TextBox ID="txtStart" runat="server" Width="100px" CssClass="input2" onblur="return CheckDate('txtStart', false, false);" /><img id="ImgDateStart" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                            -
                            <asp:TextBox ID="txtEnd" runat="server" Width="100px" CssClass="input2" onblur="return CheckDate('txtStart', false, false);" /><img id="ImgDateEnd" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btnSearch" runat="server" CssClass="input" meta:resourcekey="btnSearchResource" OnClick="btnSearch_Click" Text="查询" />
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="background-color: #FFFFFF; width: 100%; text-align: center">
                        <div id="content" class="opreate">
                            <div style="padding-right: 25px; padding-left: 25px; padding-bottom: 3px; color: #4b6888; padding-top: 3px; border-bottom: #cccccc 1px solid">
                                <input name="checkbox" type="checkbox" class="checkbox" id="CheckAllBox" onclick="CheckAll()" /> 
                                全选
        　    <asp:LinkButton ID="btnAdd" runat="server" ForeColor="#4B6888" meta:resourcekey="btnEditResource2" OnClick="btnAdd_Click" CausesValidation="False"><img src="images/icon/key_add.gif" alt="添加留言"/> 添加留言</asp:LinkButton>
        　    <asp:LinkButton ID="btnView" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnEditResource2" OnClick="btnView_Click" OnClientClick="return CheckSelectOne();"><img src="images/icon/key_detail.gif" alt="查看留言"/> 查看留言</asp:LinkButton>
        　    <asp:LinkButton ID="btnDelStatus" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnDel_Click" OnClientClick="return CheckDel()"><img src="images/icon/key_delete.gif" alt="删除"/> 删除</asp:LinkButton>
                            </div>
                            <div class="listborder">
                                <cc1:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize ="10"
                                    CssClass="datalist" HeaderStyle-ForeColor="#000000" EmptyDataText="没有任何可用信息！">
                                    <PagerSettings Mode="NumericFirstLast" />
                                    <Columns>
                                        <asp:TemplateField meta:resourcekey="DetilData">
                                            <itemtemplate>
                                              <input name="checkbox2" type="checkbox" class="checkbox" id="CheckBoxID" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" value='<%# Eval("ID") %>' runat="server" />
                                            </itemtemplate>
                                            <itemstyle horizontalalign="Center" width="5%" />
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" >
                                            <itemstyle width="5%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="UserName" HeaderText="用户名" SortExpression="UserName" >
                                            <itemstyle width="15%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Title" HeaderText="留言标题" SortExpression="Title" >
                                            <itemstyle width="35%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="MenuName" HeaderText="类型" SortExpression="MenuName" >
                                            <itemstyle width="10%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Date" HeaderText="留言时间" SortExpression="Date" >
                                            <itemstyle width="20%" />
                                        </asp:BoundField>
                                        <asp:TemplateField meta:resourcekey="DetilData" HeaderText="是否回复" SortExpression="IsRemark">
                                            <itemtemplate>
                          	                    <asp:Label ID="lblLockState" runat="server" Text='<%# FormatLockState(DataBinder.Eval(Container, "DataItem(IsRemark)","{0}")) %>'/>
                                            </itemtemplate>
                                            <itemstyle width="10%" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <HeaderStyle CssClass="category" ForeColor="Black" />
                                </cc1:V5ShopGridView>
                            </div>
                        </div>
                        <div id="hiddenfield">
                            <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
                            <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
                            <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
                            <uc1:HiddenField ID="Alert" runat="server" />
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <script language="javascript" type="text/javascript">
        Calendar.setup({
	        inputField     :    "txtStart",
	        ifFormat       :    "%Y-%m-%d", 
	        button         :    "ImgDateStart",
	        align          :    "Br",
	        singleClick    :    true
        });
        Calendar.setup({
	        inputField     :    "txtEnd",
	        ifFormat       :    "%Y-%m-%d", 
	        button         :    "ImgDateEnd",
	        align          :    "Br",
	        singleClick    :    true
        });
        </script>
    </form>
</body>
</html>
