<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopIndexArticle, HoWaveVGO" title="首页文章管理" enableEventValidation="false" %>
<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" RepeatDirection="Horizontal" RepeatLayout="Flow" >
             <asp:ListItem Text="固顶文章" Value="ontop" />
             <asp:ListItem Text="推荐文章　" Value="iselite" />
             <asp:ListItem Text="热门文章" Value="iselite" />         
           </asp:CheckBoxList></td>
        </tr>
        </table><br />  
        <div id="PreviewBox" 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="../Shop/Js/picPreview.js"></script> 
       <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="adminlist" Width="100%" DataKeyNames="ArticleID" 
       OnDataBound="GridView1_DataBound" EnableViewState="False">
           <Columns>
               <asp:TemplateField>
                <ItemTemplate>                                        
                    <input type="checkbox" name="chk_select" value='<%# Eval("ArticleID") %>' />                                    
                </ItemTemplate>
                <HeaderTemplate>
                   全选<input id="chkAll" onclick="SelectAllCheckboxes(this);" 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="ChannelID" />             
               <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='<%# Eval("LinkUrl") %>' />
                    <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 style="padding:10px;" align="center">
            <asp:Literal ID="ItemCount" runat="server" />
            <asp:Literal ID="CurrentPage" runat="server" />
            <asp:HiddenField ID="H_CurrentPage" runat="server" Value="0"/>
            <asp:HiddenField ID="H_SearchType" runat="server" Value="0"/>
            <asp:LinkButton ID="First" runat="server" CommandArgument="first" OnClick="PagerButton_Click">首 页</asp:LinkButton>
            <asp:LinkButton ID="Prev" runat="server" CommandArgument="prev" OnClick="PagerButton_Click">上一页</asp:LinkButton>
            <asp:LinkButton ID="Next" runat="server" CommandArgument="next" OnClick="PagerButton_Click">下一页</asp:LinkButton>
            <asp:LinkButton ID="Last" runat="server" CommandArgument="last" OnClick="PagerButton_Click">尾 页</asp:LinkButton>
                  到第<asp:TextBox ID="GoToPage" Width="20px" runat="server" />页<asp:Button ID="GoPageBtn" Text="确定" runat="server" OnClick="GoToPageBtn_Click" />
       </div>
       <div style="width:100%;" >           
           <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>

