<%@ Page language="c#" Codebehind="News.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.News" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
	    <!--#include file="inc/head.inc"-->
		<title>News</title>
	</HEAD>
	<body>
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />新闻列表</div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">
		    <div class="frame">
		        <div class="frame_title">新闻管理-<%=Request.QueryString["Status"]=="0" ? "未审批" : (Request.QueryString["Status"]=="1" ? "审批通过" : "审批未通过")%></div>
		        <div class="frame_content">
		            <table class="tableBorder" cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
				        <tr>
					        <td><asp:Button ID="btnDelete" OnClick="btnDelete_Click" Runat="server" Text="删除新闻" CssClass="inputbtn"></asp:Button></td>
					        <td align="center">
						        <P align="right">搜索：
							        <asp:TextBox id="txtKeyword" runat="server"></asp:TextBox>
							        <asp:DropDownList id="ddlCategory" runat="server"></asp:DropDownList>每页显示
							        <asp:textbox id="txtPageSize" Runat="server" Width="30px" BorderColor="Black" BackColor="White"
								        BorderWidth="1px"></asp:textbox>
							        <asp:Button id="btnSearch" OnClick="btnSearch_Click" runat="server" Text="GO" CssClass="inputbtn"></asp:Button></P>
					        </td>
				        </tr>
				        <tr>
					        <td height="23" class="forumRowHighlight" colspan="2">
						        <asp:datagrid id="dgNewsList" runat="server" AllowPaging="True" PageSize="20" PagerStyle-Mode="NumericPages"
							        AutoGenerateColumns="False" DataKeyField="ArticleID" Width="100%" HorizontalAlign="Center"
							        HeaderStyle-CssClass="summary-title">
							        <HeaderStyle Font-Bold="True"></HeaderStyle>
							        <Columns>
								        <asp:TemplateColumn>
									        <HeaderStyle HorizontalAlign="Center" Width="30px"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <HeaderTemplate>
										        <asp:CheckBox id="chkAll" runat="server"></asp:CheckBox>
									        </HeaderTemplate>
									        <ItemTemplate>
										        <asp:CheckBox id="chkItem" runat="server"></asp:CheckBox>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="顶">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="10px"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "IsTop").ToString() == "1" ? "<img src='images/istop.gif' title='置顶'>" : "" %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="荐">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="10px"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "IsBest").ToString() == "1" ? "<img src='images/isBest.gif' title='推荐'>" : "" %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="[分类] 新闻标题">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        [<a href='News.aspx?keyword=&CatID=<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>&Status=<%=Request.QueryString["Status"] != null ? Request.QueryString["Status"] : "1" %>'><%# DataBinder.Eval(Container.DataItem, "CategoryName") %></a>]
										        <a href='../NewsShow.aspx?NewsID=<%# DataBinder.Eval(Container.DataItem, "ArticleID") %>' target=_blank><%# DataBinder.Eval(Container.DataItem, "Title") %></a>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="日期">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="60px"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "AddTime", "{0:yy.M.d}") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn>
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									        <ItemTemplate>
										        <a href='NewsAdd.aspx?NewsID=<%# DataBinder.Eval(Container.DataItem, "ArticleID") %>&Status=<%=Request.QueryString["Status"] %><%=(Request.QueryString["CatID"] != null ? "&CatID=" + Request.QueryString["CatID"] : "") %>'>
											        修改</a>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:ButtonColumn Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('确认删除吗？')&quot;&gt;删除&lt;/div&gt;"
									        CommandName="Delete">
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
								        </asp:ButtonColumn>
							        </Columns>
							        <PagerStyle Mode="NumericPages"></PagerStyle>
						        </asp:datagrid>
						        <TABLE cellSpacing="0" cellPadding="0" width="100%" align="center" id="tablePage">
							        <TR>
								        <TD vAlign="middle">
									        <asp:label id="lblPager" Runat="server"></asp:label></TD>
								        <TD vAlign="middle" align="right"><INPUT id="controlID" type="hidden" name="controlID" runat="server">
									        <asp:textbox id="txtPage" Runat="server" Width="30px" BorderWidth="1px" BackColor="White" BorderColor="Black"></asp:textbox>&nbsp;&nbsp;
									        <asp:button id="btnJump" OnClick="btnJump_Click" Runat="server" Text=" Go " CssClass="inputbtn"></asp:button></TD>
							        </TR>
						        </TABLE>
					        </td>
				        </tr>
			        </table>
		        </div>
	        </div>
		</form>
		</div>
		</div>
		</div>
	</body>
</HTML>
