<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="News.aspx.cs" Inherits="web.admin.News" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>News</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<LINK href="images/adminstyle.css" type="text/css" rel="stylesheet">
				<script language="JavaScript">
<!--
//By Dicky 2005-2-17 11:16:49
function Window_Load(Flag)
{

if (Flag == 0)
{

  parent.document.all['Loading'].style.display = 'block';
  parent.document.all['Loading'].style.width = '500';
   parent.document.all['Loading'].style.height = '60';
  //show the window
}
else
{
  parent.document.all['Loading'].style.display = 'none';
  
  //hide the window
}
}
//-->
</script>
	</HEAD>
		<body rightmargin="0" leftmargin="0" topmargin="0" onload="Window_Load(1);">
	
		<form id="Form2" method="post" runat="server" onsubmit="Window_Load(0);">
<table width="100%" height="550" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
<div class="top">
          <table width="100%" align="center" cellpadding="0" cellspacing="0" background="img/labelbg.gif" bgcolor="#EDF6FF">
            <tr>
		      <td width="6%" height="32" class="tl"></td>
		<td width="90%" class="tm"><span class="tt">信息管理  &gt;&gt;文章管理</span></td>
		      <td width="1%" class="tm2"><span class="tt"></span></td>
		<td width="3%" class="tr"></td>
	</tr>
</table>
</div>
        <div class="mframe"> 
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
      <td class="ml"></td>
    <td  class="mm" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
                    <td bgcolor="#FFFFFF" valign="top" ><br>
                      <table width="90%" align="center" cellpadding="0"  cellspacing="0">
                        <tr>
		<td class="ml1"></td>
		<td class="mm1">
<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
                              <tr height="35">
                             <font color="FF0000">说明： 1、请勾选后进行批量删除、生成HTML操作；2、头条一是设置资讯首页的头条新闻，头条二是设置各个分类页的头条新闻.3、头条新闻只能存在一个,设置新的头条新闻，先前设置的自动取消！</font><br/>
					<td style="width: 246px"><asp:Button ID="btnDelete" Runat="server" CssClass="btn1" Text="批量删除文章"></asp:Button>
                        <asp:Button ID="btcreate" runat="server" CssClass="btn1" Text="生成HTML" /></td>
					<td align="center">
						<P align="right">搜索：
							<asp:TextBox id="txtKeyword" CssClass="input" runat="server"></asp:TextBox>
							<asp:DropDownList id="ddlCategory" runat="server"></asp:DropDownList>每页显示
							<asp:textbox id="txtPageSize" CssClass="input" Runat="server" Width="30px"></asp:textbox>
							<asp:Button id="btnSearch" runat="server" CssClass="btn" Text="GO"></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" BorderColor="#E0E0E0" BorderWidth="1px">
							<HeaderStyle Font-Bold="False" BackColor="#EDF6FF" CssClass="head" Height="35px"></HeaderStyle>
							<Columns>
								<asp:TemplateColumn>
									<HeaderStyle HorizontalAlign="Center" Width="30px"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center"></ItemStyle>
									<HeaderTemplate>
										<asp:CheckBox id="chkAll" runat="server" AutoPostBack="True"  OnCheckedChanged="chkItem_CheckedChanged"></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") %>'><%# DataBinder.Eval(Container.DataItem, "CategoryName") %></a>]
										<a href='../newsInfo/ShowNewsInfo_<%# DataBinder.Eval(Container.DataItem, "ArticleID") %>.html' target=_blank><%# DataBinder.Eval(Container.DataItem, "Title") %></a><%# DataBinder.Eval(Container.DataItem, "images").ToString()==""?"":"<font color='#FF0000'>&nbsp;&nbsp;(有导航图片)</font>" %>
									</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 HeaderText="置顶">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cz.aspx?Action=ChangeArticleDD&ArticleID=<%# DataBinder.Eval(Container.DataItem, "ArticleID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "IsTop").ToString()%>'>
											<img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsTop").ToString()%>.png' border="0"></a>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="30px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="推荐">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cz.aspx?Action=ChangeArticleJJ&ArticleID=<%# DataBinder.Eval(Container.DataItem, "ArticleID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "IsBest").ToString()%>'>
											<img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsBest").ToString()%>.png' border="0"></a>
									</ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" Width="30px" />
								</asp:TemplateColumn>
						
											<asp:TemplateColumn HeaderText="套红">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cz.aspx?Action=ChangeArticleHH&ArticleID=<%# DataBinder.Eval(Container.DataItem, "ArticleID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "isFormatRed").ToString()%>'>
											<img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "isFormatRed").ToString()%>.png' border="0"></a>
									</ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" Width="30px" />
								</asp:TemplateColumn>
									<asp:TemplateColumn HeaderText="热门">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cz.aspx?Action=ChangeArticleRR&ArticleID=<%# DataBinder.Eval(Container.DataItem, "ArticleID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "IsHot").ToString()%>'>
											<img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsHot").ToString()%>.png' border="0"></a>
									</ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" Width="30px" />
								</asp:TemplateColumn>
									<asp:TemplateColumn HeaderText="头条一">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cz.aspx?Action=ChangeArticletty&ArticleID=<%# DataBinder.Eval(Container.DataItem, "ArticleID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "issnews").ToString()%>'>
											<img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "issnews").ToString()%>.png' border="0"></a>
									</ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" Width="40px" />
								</asp:TemplateColumn>
									<asp:TemplateColumn HeaderText="头条二">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cz.aspx?Action=ChangeArticlette&ArticleID=<%# DataBinder.Eval(Container.DataItem, "ArticleID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "islnews").ToString()%>'>
											<img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "islnews").ToString()%>.png' border="0"></a>
									</ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" Width="40px" />
								</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") %>'>
											修改</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>
                                <asp:TemplateColumn HeaderText="生成HTML">
                                    <ItemTemplate >
                                        <a href='CreateNewsInfo.aspx?NewsID=<%# DataBinder.Eval(Container.DataItem, "ArticleID") %>'>
											生成HTML</a>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
                                    <ItemStyle  Width="80px" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
                                </asp:TemplateColumn>
							</Columns>
							<PagerStyle Mode="NumericPages"></PagerStyle>
                            <ItemStyle Height="27px" HorizontalAlign="Left" />
						</asp:datagrid>
						<TABLE cellSpacing="0" cellPadding="0" width="100%" align="center" id="tablePage">
							<TR height="35">
								<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" CssClass="input" Runat="server" Width="30px"></asp:textbox>&nbsp;&nbsp;
									<asp:button id="btnJump" Runat="server" CssClass="btn" Text=" Go "></asp:button></TD>
							</TR>
						</TABLE>
					</td>
				</tr>
			</table>
		</td>
		<td class="mr1"></td>
	</tr>
</table>
                    </td>
  </tr>
</table>


<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>
</td>
    <td  class="mr"></td>
  </tr>
</table>
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>

</div>
    </td>
  </tr>
</table>
		</form>
	</body>
</HTML>
