<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopIndexArticle, WebApp_deploy" title="首页文章管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script src="Js/Function.js" type="text/javascript"></script> 
<table class="adminheading">
   <tr>
      <th valign="middle" class="menus" align="left">商城文章管理</th>
      <td align="right">
         <div style="width:100px"><asp:HyperLink ID="AddNew" runat="server" NavigateUrl="Admin_ShopIndexArticleAdd.aspx" ToolTip="新增商城文章，设置为某模块的文章后即可在调用该模块的页面显示。" >新增文章</asp:HyperLink></div>
      </td>
     <td class="rtdw"></td>
   </tr>                     
</table>        
 
   <table class="nick"><tr><td colspan="2" class="tit">快速查找</td></tr>
    <tr><td class="ltd">类型：</td><td class="rtd">
      <asp:DropDownList ID="QuickSearch" runat="server" Width="100px" OnSelectedIndexChanged="QuickSearch_SelectedIndexChanged" AutoPostBack="true" AppendDataBoundItems="True"  >
            <asp:ListItem Text="所有" Value="0" />
            <asp:ListItem Text="草稿" Value="-1" />
            <asp:ListItem Text="拒绝审核" Value="-2" />
            <asp:ListItem Text="审核通过" Value="-3" />                  
           </asp:DropDownList>
          
           <asp:CheckBoxList ID="CheckBoxList1" runat="server" AutoPostBack="true" RepeatDirection="Horizontal" RepeatLayout="Flow" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged" >
             <asp:ListItem Text="固顶文章" Value="ontop" />
             <asp:ListItem Text="推荐文章　" Value="iselite" />
             <asp:ListItem Text="热门文章" Value="ishots" />         
           </asp:CheckBoxList></td>
        </tr>
        </table>

        <div id="PreviewBox" style="display:none; position:absolute; border:1px #ccc solid; width:250px; height:150px; background-color:#fff;" onmouseout="hidePreview(event);">
            <div class="Picture" onmouseout="hidePreview(event);">
	            <span></span>
	            <div>
		            <a id="previewUrl" href="javascript:void(0)" target="_blank"><img oncontextmenu="return(false)" id="PreviewImage" src="about:blank" border="0" onmouseout="hidePreview(event);" /></a>
	            </div>
            </div>
        </div>

       <script type="text/javascript" src="/Js/picPreview.js"></script> 
       <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="adminlist" DataKeyNames="ArticleID"  PageSize="15"
       OnDataBound="GridView1_DataBound" EnableViewState="False">
           <Columns>
               <asp:TemplateField>
                <ItemTemplate>                                        
                    <input type="checkbox" id="chk_select" name="chk_select" value='<%# Eval("ArticleID") %>' />                                    
                </ItemTemplate>
                <HeaderTemplate>
                   <input id="chkAll" onclick="SelectAllCheckboxes(this,'chk_select');" runat="server" type="checkbox" />                                     
                </HeaderTemplate>
                   <ItemStyle HorizontalAlign="Center" Width="5%" />
            </asp:TemplateField> 
               <asp:BoundField HeaderText="ID" DataField="ArticleID" />
               <asp:BoundField HeaderText="精简标题"  DataField="ShortTitle">
                   <HeaderStyle Width="20%" />
               </asp:BoundField>
               <asp:BoundField HeaderText="所属模块" DataField="Title" />             
               <asp:TemplateField HeaderText="类型">
                 <ItemTemplate>
                   <asp:Literal  ID="ArticleType" runat="server" Text='<%# Eval("ArticleType") %>' />
                   <asp:HiddenField ID="PicUrl" runat="server" Value='<%# Eval("UploadPicUrl") %>' />
                 </ItemTemplate>
               </asp:TemplateField>
               <asp:BoundField HeaderText="录入者"  DataField="Editor"/>
               <asp:BoundField HeaderText="点击数" DataField="Hits"/>
               <asp:TemplateField HeaderText="文章属性">
                 <ItemTemplate>
                   <asp:Literal  ID="IsElite" runat="server" Text='<%# Convert.ToString(Eval("Elite"))=="1"?"荐":"" %>' />
                   <asp:Literal  ID="OnTop" runat="server" Text='<%# Convert.ToString(Eval("OnTop"))=="1"?"顶":"" %>' />                   
                 </ItemTemplate>
               </asp:TemplateField>
                <asp:TemplateField HeaderText="链接类型">
                 <ItemTemplate>
                   <asp:Literal ID="LinkType" runat="server" Text='<%# Convert.ToString(Eval("LinkType"))=="1"?"外部链接":"本站文章" %>' />
                  　  </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField HeaderText="审核状态">
                 <ItemTemplate>
                   <asp:Literal  ID="ChectType" runat="server" Text='<%# Eval("Status") %>' />
                 </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField HeaderText="操作">
                 <ItemTemplate>
                    <asp:HyperLink  Target="_blank" ID="Detail" Text="查看" runat="server" NavigateUrl='<%# "../ShowArticle.aspx?id="+Eval("ArticleID") %>' />
                    <asp:HyperLink ID="Modify" Text="修改" runat="server" NavigateUrl='<%#"Admin_ShopIndexArticleAdd.aspx?Action=Edit&ArticleID="+Eval("ArticleID") %>' />
                      
                 </ItemTemplate>
                   <HeaderStyle Width="12%" />
               </asp:TemplateField>               
              　
           </Columns>
           <EmptyDataTemplate>
                <tr>
                    <th>选中</th>
                    <th>ID</th>
                    <th>精简标题</th>
                    <th>所属栏目</th>
                    <th>录入者</th>
                    <th>点击数</th>
                    <th>文章属性</th>
                    <th>审核状态</th>
                    <th>操作</th>                    
                </tr>
                <tr>
                   <td colspan="9" style="text-align:center; line-height:20px;">暂无记录！</td>
                </tr>
       </EmptyDataTemplate>
       </asp:GridView>
       
       <div class="page">
       <asp:Label runat="server" ID="pagePanel" />
       </div>
       
       <div class="div_btm">           
           <div style="float:inherit; text-align:center;">
           <asp:Button ID="DeleteBtn" runat="server" Text="删除文章" CommandName="delete"  OnCommand="ArticleButtonOnCommon" OnClientClick="return confirm('您确定要删除,删除后不能恢复?')"/>
           <asp:Button ID="Button1" runat="server" Text="设为固顶" CommandName="ontop" OnCommand="ArticleButtonOnCommon" />
           <asp:Button ID="Button2" runat="server" Text="取消固顶" CommandName="cancleontop" OnCommand="ArticleButtonOnCommon"/>
           <asp:Button ID="Button3" runat="server" Text="设为推荐" CommandName="iselite" OnCommand="ArticleButtonOnCommon"/>
           <asp:Button ID="Button4" runat="server" Text="取消推荐" CommandName="cancleelite" OnCommand="ArticleButtonOnCommon"/>
           <asp:Button ID="Button5" runat="server" Text="审核通过" CommandName="pass" OnCommand="ArticleButtonOnCommon"/>
           <asp:Button ID="Button6" runat="server" Text="拒绝审核" CommandName="nopass" OnCommand="ArticleButtonOnCommon"/>
       </div>
    </div>

</asp:Content>

