📄 news.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"> </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> > <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" > <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" > <a href='News.asp?id="&rsNt("Pid")&"'>"&rsNt0("content")&"</a> > <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"> </td>
</tr>
<tr>
<td width="20" height="20"> </td>
<td> </td>
<td width="20"> </td>
</tr>
<tr>
<td width="20"> </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'" > <img src="images/GO_04.gif" width="4" height="7"> <a href="NewsShow.asp?id=<%=rsp("id")%>" target="_blank"><%=rsp("Newtitle")%></a><font class="TIME"> [<%=rsp("addtime")%>]</FONT></td>
</tr>
<%
rsp.movenext
next
%>
</table></td>
<td width="20"> </td>
</tr>
<tr>
<td> </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%>
<%else%>
<td height="20" align="center">当前页0/0 <%end if%>
共有<%=rsp.recordcount%>条信息,每页<%=rsp.PageSize%>条 <a href="News.asp?page=1&id=<%=idd%>">首页</a> |
<%if pre then%>
<a href="News.asp?page=<%=intpage -1%>&id=<%=idd%>">上页</a> |
<%end if%>
<%if last then%>
<a href="News.asp?page=<%=intpage +1%>&id=<%=idd%>">下页</a> |
<%end if%>
<a href="News.asp?page=<%=rsp.PageCount%>&id=<%=idd%>">尾页</a> | 转到第
<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> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </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 > <img src="images/GO_04.gif" width="4" height="7"> <a href="NewsShow.asp?id=<%=rs("id")%>" target="_blank"><%=rs("Newtitle")%></a></td>
</tr>
</table>
<%count=count+1
rs.movenext
loop %></td><td> </td>
</tr>
<tr>
<td width="20" height="40"> </td>
<td> </td>
<td width="20"> </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 + -