<%
    //-----------------------------------------------------------
    // 文件名称: Article_Article_Manage.aspx
    // 页面名称: 文章管理
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-05-30
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Article_Article_Manage, V5Shop.Shop.Article" culture="auto" uiculture="auto" meta:resourcekey="PageResource1" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<!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/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar-system.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.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/Calendar.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Calendar-zh.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Calendar-Setup.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <uc3:ManageHeader ID="PageHead" runat="server" />
            <div id="search">
                <!-- 查询部 -->
                <div style="padding: 10px 20px; border: 1px #eeeeee solid; background: #f7f7f7; margin: 0 0 5px 0;">
                    <table width="100%">
                        <tr>
                            <td width="80%">
                    
                    <table cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td style="height: 30px; width: 100px; vertical-align: middle; text-align: right;">
                                <asp:Label ID="lblRoleName" runat="server" Text="文章标题：" meta:resourcekey="lblRoleNameResource" /></td>
                            <td style="height: 30px; vertical-align: middle; width: 100px; text-align: right;">
                                <asp:TextBox ID="txtTitle" runat="server" MaxLength="255" />&nbsp;
                            </td>
                            <td style="height: 30px; width: 120px; vertical-align: middle; text-align: right;">
                                <asp:Label ID="Label1" runat="server" meta:resourcekey="lblRoleNameResource" Text="作者/发布人：" /></td>
                            <td style="height: 30px; vertical-align: middle; text-align: left;">
                                <asp:TextBox ID="txtAuther" runat="server" MaxLength="255" />&nbsp;</td>
                            <td style="height: 30px; width: 100px; vertical-align: middle; text-align: right;">
                                <asp:Label ID="Label4" runat="server" Text="文章类别：" meta:resourcekey="lblIsDelResource" /></td>
                            
                        <td style="height: 30px; vertical-align: middle; width: 100px; text-align: left;">
                                <asp:DropDownList ID="ddlCategoryName" runat="server" Width="120px">
                                    <asp:ListItem Value="-1">全部</asp:ListItem>
                                </asp:DropDownList></td>
                        </tr>
                        </table>
                        
                        <div id="searchmore" style="display: none;">
                                <table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td style="height: 30px; width: 100px; vertical-align: middle; text-align: right;">
                                <asp:Label ID="Label6" runat="server" Text="文章类型：" meta:resourcekey="lblIsDelResource" /></td>
                            <td style="height: 30px; vertical-align: middle; width: 100px; text-align: left;">
                                <asp:DropDownList ID="ddlType" runat="server" Width="60px">
                                    <asp:ListItem Value="-1">全部</asp:ListItem>
                                    <asp:ListItem Value="0">本地新闻</asp:ListItem>
                                    <asp:ListItem Value="1">外部链接</asp:ListItem>
                                </asp:DropDownList>&nbsp;</td>
                        
                            <td style="width: 100px; vertical-align: middle; height: 30px; text-align: right;">
                                <asp:Label ID="lblIsDel" runat="server" Text="前台显示：" meta:resourcekey="lblIsDelResource" /></td>
                            <td style="vertical-align: middle; width: 100px; height: 30px; text-align: right">
                                <asp:DropDownList ID="ddlIsShow" runat="server" meta:resourcekey="ddlIsDelResource" Width="60px">
                                    <asp:ListItem Value="-1">全部</asp:ListItem>
                                    <asp:ListItem Value="0">不显示</asp:ListItem>
                                    <asp:ListItem Value="1">显示</asp:ListItem>
                                </asp:DropDownList></td>
                            <td style="width: 120px; vertical-align: middle; height: 30px; text-align: right;">
                                <asp:Label ID="Label2" runat="server" Text="是否置顶：" meta:resourcekey="lblIsDelResource" /></td>
                            <td style="vertical-align: middle; height: 30px; text-align: left">
                                <asp:DropDownList ID="ddlIsTop" runat="server" meta:resourcekey="ddlIsDelResource" Width="60px">
                                    <asp:ListItem Value="-1">全部</asp:ListItem>
                                    <asp:ListItem Value="0">未置顶</asp:ListItem>
                                    <asp:ListItem Value="1">置顶</asp:ListItem>
                                </asp:DropDownList></td>
                            <td style="width: 100px; vertical-align: middle; height: 30px; text-align: right;">
                                <asp:Label ID="Label3" runat="server" Text="允许评论：" meta:resourcekey="lblIsDelResource" /></td>
                            <td style="vertical-align: middle; width: 100px; height: 30px; text-align: left">
                                <asp:DropDownList ID="ddlIsReply" runat="server" meta:resourcekey="ddlIsDelResource" Width="60px">
                                    <asp:ListItem Value="-1">全部</asp:ListItem>
                                    <asp:ListItem Value="0">不允许</asp:ListItem>
                                    <asp:ListItem Value="1">允许</asp:ListItem>
                                </asp:DropDownList>&nbsp;</td>
                        </tr>
                        </table>
                        
                                <table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td style="width: 70px; vertical-align: middle; height: 30px; text-align: right;">
                                <asp:Label ID="Label5" runat="server" Text="文章属性：" meta:resourcekey="lblIsDelResource" /></td>
                            <td style="vertical-align: middle; width: 100px; height: 30px; text-align: left">
                                <asp:DropDownList ID="ddlArticleProperty" runat="server" Width="120px">
                                    <asp:ListItem Value="-1">全部</asp:ListItem>
                                </asp:DropDownList></td>
                            <td style="width: 80px; height: 30px; vertical-align: middle; text-align: right;">
                                <asp:Label ID="Label7" runat="server" meta:resourcekey="lblRoleNameResource" Text="发布时间：" /></td>
                            <td style="height: 30px; vertical-align: middle; text-align: left;">
                                <asp:TextBox ID="txtStartDate" runat="server" onblur="return CheckDate(this, true, false);" />&nbsp;<img id="sltStart" style="text-align: center" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                                &nbsp;-&nbsp;
                                <asp:TextBox ID="txtEndDate" runat="server" onblur="return CheckDate(this, true, false);" />&nbsp;<img id="sltEnd" style="text-align: center" alt="打开日历" src="images/calendar1.gif" title="打开日历" /></td>
                  
                        </tr>
                    </table>
                       </div>
                            </td>
                            <td width="45%" align="left">
                                <a href="javascript:void(0);" onclick="HiddenOrShowSearch()">
                                    <img id="searchimg" src="images/more.gif" align="absmiddle" />
                                    <span id="searchwd">更多</span></a> <span>
                                        <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" meta:resourcekey="btnSearchResource" CssClass="button" />
                                    </span>
                            </td>
                            </tr>
                            </table>
                </div>
            </div>
            <div id="content">
                <!-- 操作栏 -->
                <div style="padding-right: 25px; padding-left: 25px; padding-bottom: 3px; color: #4b6888; padding-top: 3px; border-bottom: #cccccc 1px solid">
                    <input id="CheckAllBox" onclick="CheckAllByGridView('GridViewShow', 0, 'CheckAllBox')" type="checkbox" class="checkbox" />
                    <asp:Label ID="lblSelectAll" Text="全选" runat="server" Width="50px" />
                    <asp:LinkButton ID="btnAdd" runat="server" ForeColor="#4B6888" meta:resourcekey="btnAddResource2" OnClick="btnAdd_Click" Width="85px"><img src="images/icon/key_add.gif" alt="添加文章" /> 添加文章</asp:LinkButton>
                    <asp:LinkButton ID="AddLink" runat="server" ForeColor="#4B6888" meta:resourcekey="btnAddResource2" OnClick="AddLink_Click" Width="110px"><img src="images/icon/key_add2.gif" alt="添加外部文章" /> 添加外部文章</asp:LinkButton>
                    <asp:LinkButton ID="btnEdit" runat="server" ForeColor="#4B6888" meta:resourcekey="btnEditResource2" OnClick="btnEdit_Click" OnClientClick="return CheckEdit()" CausesValidation="False" Width="60px"><img src="images/icon/key_edit.gif" alt="编辑" /> 编辑</asp:LinkButton>
                    <asp:LinkButton ID="btnDel" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnDel_Click" OnClientClick="return CheckDel()" Width="60px"><img src="images/icon/key_delete.gif" alt="删除" /> 删除</asp:LinkButton>
                    <asp:LinkButton ID="btnUp" runat="server" CausesValidation="False" ForeColor="#4B6888" OnClick="btnUp_Click" OnClientClick="return CheckUp()" Width="60px"><img src="images/icon/key_top.gif" />向上</asp:LinkButton>
                    <asp:LinkButton ID="btnDown" runat="server" ForeColor="#4B6888" OnClick="btnDown_Click" OnClientClick="return CheckDown()" Width="60px"><img src="images/icon/key_down.gif" /> 向下</asp:LinkButton>
                    <asp:LinkButton ID="btnReply" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnEditResource2" OnClientClick="return CheckSelectOne()" OnClick="btnReply_Click" Width="85px"><img src="images/icon/key_detail.gif" alt="查看评论" /> 查看评论</asp:LinkButton>
                </div>
                <!-- 明细数据 -->
                <div class="listborder">
                    <cc1:NewV5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="datalist" PageSize="12" CacheName="TableCache_">
                        <PagerSettings Mode="NumericFirstLast" />
                        <Columns>
                            <asp:TemplateField meta:resourcekey="DetilData">
                                <itemstyle horizontalalign="Center" width="5%" />
                                <itemtemplate>
                                <input runat="server" value='<%# Eval("ID") %>' id="CheckBoxID" type="checkbox" class="checkbox"
                                    onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" />
                            
</itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" >
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="文章标题" SortExpression="Title">
                                <itemstyle width="25%" />
                                <itemtemplate>
                                    <a target="_blank" href='../article.aspx?id=<%# Eval("ID") %>'>
                                        <asp:Label id="lblName" runat="server" text='<%# Eval("Title") %>' />
                                    </a>
                                
</itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="所属类别" DataField="CategoryID" SortExpression="CategoryID" >
                                <itemstyle width="10%" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="作者/发布人" DataField="Auther" SortExpression="Auther" >
                                <itemstyle width="10%" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="排序号" DataField="OrderID" SortExpression="OrderID" />
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="文章属性" SortExpression="ArticlePropertyCode">
                                <itemtemplate>
                                	<asp:Label ID="lblArticlePropertyCode" runat="server" Text='<%# FormatState("ArticlePropertyCode", DataBinder.Eval(Container, "DataItem(ArticlePropertyCode)","{0}")) %>'></asp:Label>
                            
</itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField headertext="浏览" DataField="Hits" SortExpression="Hits" />
                            <asp:BoundField headertext="评论" DataField="ReviewCount" SortExpression="ReviewCount" />
                            <asp:BoundField HeaderText="发布时间" DataField="Date" SortExpression="Date" >
                                <itemstyle width="15%" />
                            </asp:BoundField>
                        </Columns>
                        <HeaderStyle CssClass="category" />
                    </cc1:NewV5ShopGridView>
                </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" />
                <cc1:ClientScriptBox ID="ClientScriptBox" runat="server" />
            </div>
            <uc2:PageBottom ID="PageBottom" runat="server" />
        </div>
    </form>
    <script type="text/javascript">
        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>
</body>
</html>
