⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 news.asp

📁 管理登录system 管理员:admin 密码:admin888 数据库链接文件: conn.asp 内容数据库前台链接文件 systemconn.asp 内容数据库后台链接文件 sy
💻 ASP
字号:
<!--#include file="siteinfo.asp"-->
<HTML>
<HEAD>
<TITLE><%=sitename%></TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<link href="images/CSS.css" type=text/css rel=stylesheet>
</HEAD>
<BODY >
<!--#include file="top.asp" -->
<table width="778" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="179" valign="top" background="images/BGline01.gif"><!--#include file="Newsleft.asp" --></td>
    <td valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="20" height="22" background="images/BGline04.gif">&nbsp;</td>
        <td background="images/BGline04.gif"><span class="ABOUT_01"><img src="images/GO_03.gif" width="11" height="11" align="absmiddle"> 当前位置:<a href="index.asp">首页</a> &gt; <a href="News.asp">新闻中心</a><%
idd=trim(request.QueryString("id"))
if idd<>"" then 
set rsNt = server.createobject("adodb.recordset")
rsNt.source = "select * from NewTree where ID="&idd&""
rsNt.open rsNt.source,conn,1,3
Pidd=rsNt("Pid")
if Pidd=0 then
response.write"&nbsp;>&nbsp;<a href='News.asp?id="&rsNt("id")&"'>"&rsNt("content")&"</a>" 
else
set rsNt0 = server.createobject("adodb.recordset")
rsNt0.source = "select * from NewTree where ID="&Pidd&""
rsNt0.open rsNt0.source,conn,1,3
response.write"&nbsp;>&nbsp;<a href='News.asp?id="&rsNt("Pid")&"'>"&rsNt0("content")&"</a>&nbsp;>&nbsp;<a href='News.asp?id="&rsNt("id")&"'>"&rsNt("content")&"</a>" 
rsNt0.Close
set rsNt0=nothing
end if
rsNt.Close
set rsNt=nothing
end if
%>
		
		</span></td>
        <td width="20" background="images/BGline04.gif">&nbsp;</td>
      </tr>
      <tr>
        <td width="20" height="20">&nbsp;</td>
        <td>&nbsp;</td>
        <td width="20">&nbsp;</td>
      </tr>
      <tr>
        <td width="20">&nbsp;</td>
        <td><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" >
          <%
idd=trim(request.QueryString("id"))
dim i,intPage,page,pre,last,filepath
set rsp = server.createobject("adodb.recordset")
productsSQL= "select id,Newtitle,Putman,addtime from News where TreeID like '%"&idd&"%' and Putout=true order by id desc"
'rsp.open productsSQL,conn,1,1

rsp.PageSize = 12  '这里设定每页显示的记录数
rsp.CursorLocation = 3
rsp.Open productsSQL,conn,0,2,1  
pre = true
last = true
page = trim(Request.QueryString("page"))
 if len(page) = 0 then
    intpage = 1
    pre = false
 else
    if cint(page) =< 1 then
       intpage = 1
       pre = false
    else
        if cint(page)>=rsp.PageCount then
        intpage = rsp.PageCount
        last = false
        else
        intpage = cint(page)
     end if
   end if
end if
   if not rsp.eof then
         rsp.AbsolutePage = intpage
   end if
%>
          <%
if rsp.bof then Response.write"<div align='center' font style='font-size:10pt;font-family: 宋体;color=green'><br><b>您还没有添加新闻内容!</b><br></div><br><br>"
%>
          <%
for i=1 to rsp.PageSize
if rsp.EOF or rsp.BOF then  exit for

%>
          <tr>
            <td height="22"  style="BORDER-BOTTOM:#C99999 1px solid;CURSOR:hand;"  onMouseOver = "this.style.backgroundColor ='#E6F2EF'" onMouseOut ="this.style.backgroundColor ='#FFFFFF'" >&nbsp; <img src="images/GO_04.gif" width="4" height="7"> &nbsp;<a href="NewsShow.asp?id=<%=rsp("id")%>"  target="_blank"><%=rsp("Newtitle")%></a><font class="TIME">&nbsp;&nbsp;[<%=rsp("addtime")%>]</FONT></td>
          </tr>
          <%
rsp.movenext
next
%>
        </table></td>
        <td width="20">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" borderColorLight="#808080" borderColorDark="#ffffff" bgcolor="#CEDEFF"  style="BORDER-BOTTOM:#CECFCE 1px solid;">
          <tr valign="middle">
            <%if rsp.pagecount>0 then%>
            <td  height="20" align="center">当前页<%=intpage%>/<%=rsp.PageCount%>&nbsp;&nbsp;&nbsp;&nbsp;
            <%else%>
            <td  height="20" align="center">当前页0/0&nbsp;&nbsp;&nbsp;&nbsp;              <%end if%>
            共有<%=rsp.recordcount%>条信息,每页<%=rsp.PageSize%>条&nbsp;&nbsp;&nbsp;&nbsp;<a href="News.asp?page=1&id=<%=idd%>">首页</a>&nbsp;|&nbsp;
                <%if pre then%>
                <a href="News.asp?page=<%=intpage -1%>&id=<%=idd%>">上页</a>&nbsp;|&nbsp;
                <%end if%>
                <%if last then%>
                <a href="News.asp?page=<%=intpage +1%>&id=<%=idd%>">下页</a>&nbsp;|&nbsp;
                <%end if%>
                <a href="News.asp?page=<%=rsp.PageCount%>&id=<%=idd%>">尾页</a>&nbsp;|&nbsp;转到第
                <select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
                    <%
       for i = 1 to rsp.PageCount
       if i = intpage then%>
                    <option value="News.asp?page=<%=i%>&id=<%=idd%>" selected><%=i%></option>
                    <%else%>
                    <option value="News.asp?page=<%=i%>&id=<%=idd%>"><%=i%></option>
                    <%
       end if
        next
        %>
                  </select>
      页</td>
            </tr>
        </table></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><img src="images/NEWScenter_HOT.gif" width="100" height="25">
          <% 
			   set rs=server.createobject("adodb.recordset")
			   sql="select id,Newtitle from News where Putout=true and Hot=true ORDER BY kig desc"
               rs.open sql,conn,1,3 
if rs.BOF then
  response.write "<tr><td colspan='7' width='100%' height='50'' align='center'>暂无热点新闻!</td>"
end if
               count=0
               do while not rs.eof and count<10
			   Newtitle=rs("Newtitle")
			   %>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" >
            <tr>
                <td height="22" background="images/BGline04.gif"  onMouseOver = "this.style.backgroundColor ='#E6F2EF'" onMouseOut = "this.style.backgroundColor ='#F7F7F7'"  CURSOR:hand >&nbsp; <img src="images/GO_04.gif" width="4" height="7"> &nbsp;<a href="NewsShow.asp?id=<%=rs("id")%>"  target="_blank"><%=rs("Newtitle")%></a></td>

            </tr>
          </table>
          <%count=count+1
                  rs.movenext
                  loop %></td><td>&nbsp;</td>
      </tr>
      <tr>
        <td width="20" height="40">&nbsp;</td>
        <td>&nbsp;</td>
        <td width="20">&nbsp;</td>
      </tr>
    </table>
    </td>
    <td width="1" background="images/BGline02.gif"></td>
  </tr>
</table>
<!--#include file="bot.asp" -->
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -