<%@ Language=VBScript %>
<% Response.Buffer = True %>
<!--#include file="../../connoklin.asp"-->
<!--#include file="../Config.asp"-->
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css.css" type="text/css">
<title><%=website%>后台管理</title>
<SCRIPT language=JavaScript>
<!--
if (window == top)top.location.href = "<%=webpath%>index.asp"; //frames.htm为框架网页
// 
-->
</SCRIPT>
</HEAD>
<BODY leftMargin=0 rightMargin=0 topMargin=0 marginwidth="0" marginheight="0" bgcolor="#FFFFFF" text="#000000">
<table width="780" border="0" cellspacing="2" cellpadding="0" height="300" align="center">
  <tr>
    <td height="12" align="center">&nbsp;</td>
  </tr>
  <tr>
    <td height="20" align="center"><font class="t16"><b>文章管理</b></font>&nbsp;&nbsp;&nbsp;&nbsp;[<a href="news_add.asp">新增</a>]</td>
  </tr>
  <tr>
    <td align="center" valign="top"><% const MaxPerPage=100
   sql="SELECT * FROM news where bigclassname<>'联系我们' and bigclassname<>'诚聘英才' and bigclassname<>'资讯中心' and bigclassname<>'加盟店展示' order by flag desc,ID desc"
   set rs=server.createobject("adodb.recordset")
   rs.open sql,conn,3,3
   if rs.eof and rs.bof then
   response.write "<p align='center'><font size=3>暂 无 信 息</font></p>"
   else
   rs.pagesize=MaxPerPage
    	nowPage=request.querystring("page")
       if nowPage="" then
	      nowpage=1
	   else
	     nowPage=cint(nowPage)
         if nowPage<1 or nowPage>RS.PageCount then
	        NowPage=1
	      end if
	   end if	  
       RS.absolutePage=NowPage   
       response.write("本版共有信息<font color=red>"&rs.recordcount&"</font>条,每页显示<font color=red>"&MaxPerPage&"</font>条,本页第<font color=red>"&NowPage&"</font>页")
%>
&nbsp;&nbsp;&nbsp;&nbsp;
<%
   dim m_nPageCount
	     m_nPageCount=Rs.PageCount
		  dim nTemp,szTemp
  		   szTemp="news.asp?Page="
		   nTemp=1
		   response.write("[<a class=b href='"&sztemp&nTemp&"'>首  页</a>]")
	       if nowPage>1 then
		      nTemp=NowPage-1
		       response.write "&nbsp;&nbsp;"
           response.write("[<a class=b href='"&szTemp&nTemp&"'>上一页</a>]")		
           end if
	       if nowPage<m_nPageCount then
               nTemp=NowPage+1
              response.write "&nbsp;&nbsp;"
              response.write("[<a class=b  href='"&szTemp&nTemp&"'>下一页</a>]")
		   end if
           nTemp=m_nPageCount 
		   response.write "&nbsp;&nbsp;"  
           response.write("[<a class=b href='"&szTemp&nTemp&"'>尾  页</a>]")
     %>
<table width="780" cellpadding="0" cellspacing="1" border="0" bordercolordark=#ffffff bgcolor="#000000">
  <tr bgcolor="1F75B5">
    <td width="79" height="24" align="center" bgcolor="6E7A8C"><font color="#FFFFFF">ID</font></td>
    <td width="104" height="24" align="center" bgcolor="6E7A8C"><font color="#FFFFFF">类别</font></td>
    <td width="306" align="center" bgcolor="6E7A8C"><font color="#FFFFFF">标题</font></td>
    <td width="53" align="center" bgcolor="6E7A8C"><font color="#FFFFFF">排序</font></td>
    <td width="67" align="center" bgcolor="6E7A8C"><font color="#FFFFFF">发布人</font></td>
    <td width="83" align="center" bgcolor="6E7A8C"><font color="#FFFFFF">发布时间</font></td>
	<td width="80" height="24" align="center" bgcolor="6E7A8C"><font color="#FFFFFF">编辑</font></td>
  </tr>
  <%
for aa=1 to MaxPerPage
if not rs.eof then
%>
  <tr>
    <td width="79" height="24" align="center" bgcolor="#FFFFFF"><%=rs("ID")%></td>
    <td height="24" align="center" bgcolor="#FFFFFF"><%=rs("bigclassname")%></td>
    <td width="306" height="24" bgcolor="#FFFFFF"><a href="../../show.asp?ID=<%=rs("ID")%>" target="_blank">
      <%
	TitleStr=rs("title")
	if lenB(TitleStr)>50 then
		TitleStr=leftB(rs("title"),50)&".."
	end if
	response.write TitleStr
	%>
    </a></td>
    <td width="53" height="24" align="center" bgcolor="#FFFFFF"><%=rs("flag")%></td>
    <td width="67" height="24" align="center" bgcolor="#FFFFFF"><%=rs("author")%></td>
    <td width="83" height="24" align="center" bgcolor="#FFFFFF"><%=rs("time")%></td>
	<td width="80" height="24" align="center" bgcolor="#FFFFFF"><a class=b href="news_modi.asp?id=<%=rs("ID")%>">编辑</a> | <a class=b href="news_del.asp?id=<%=rs("ID")%>">删除</a></td>
  </tr>
  <%
   else
   exit for
  end if
   rs.movenext
   next
%>
</table>
<%
end if		
  rs.close
  set rs=nothing 
  %>
</td>
  </tr>
</table>
</BODY></HTML>
