📄 readnews.asp
字号:
<table border=0 align="left" cellpadding=3>
<tr>
<td>
<script language=javascript src=./admin/banner/ads.asp?place=0></script>
</td>
</tr>
</table><%end if%>
<%
Response.Write arr_Content(Page-1)
%>
<br>
<div align="right"><%
url="readnews.asp?newsid="&newsid
if MaxPages >0 then
Response.write "<a class=black href='" & Url & "&page=1' title='第1页'>首页</a> "
if Page-1 > 0 then
Prev_Page = Page - 1
Response.write "<a class=black href='" & Url & "&page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
end if
for PageCounter=0 to MaxPages
PageLink = PageCounter+1
if PageLink <> Page Then
Response.write "<a class=black href='" & Url & "&page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write "<font color='#FF0000'><B>["& PageLink &"]</B></font> "
end if
If PageLink = MaxPages+1 Then Exit for
Next
if page <= Maxpages then
bdd_Page = Page + 1
Response.write "<a class=black href='" & Url & "&page=" & bdd_Page & "' title='第" & bdd_Page & "页'>下一页</A>"
end if
Response.write " <A class=black href='" & Url & "&page=" & Maxpages+1 & "' title='第"& Maxpages+1 &"页'>尾页</A>"
end if
%></div></td>
</tr>
</table></td>
</tr>
<tr>
<td width="100%" height="25"> <div align="center">
<!--#include file=attach.asp -->
</div></td>
</tr>
<tr>
<td width=100% ><hr size=1></td>
</tr>
<tr>
<td height=8></td>
</tr>
<tr>
<td width=100% height=18><B>相关专题:</b>
<%set rs4=server.CreateObject("ADODB.RecordSet")
if SpecialID<>0 then
rs4.Source="select * from special where SpecialID=" & SpecialID
rs4.Open,conn,1,3
if not rs4.eof then%>
<a class=class href='Special_News.asp?SpecialID=<%=SpecialID%>'><%=trim(rs4("specialname"))%></a>
<%end if
rs4.Close
set rs4=nothing
set rs4=server.CreateObject("ADODB.RecordSet")
if specialid2<>0 then
rs4.Source="select * from special where SpecialID=" & SpecialID2
rs4.Open,conn,1,3
if not rs4.eof then %>
<a class=class href='Special_News.asp?SpecialID=<%=SpecialID2%>'><%=trim(rs4("specialname"))%></a>
<%end if
rs4.Close
set rs4=nothing
end if
%>
</td>
</tr>
<tr>
<td width=100% height=18><B>专题信息:</b></td>
</tr>
<tr>
<td height=8></td>
</tr>
<%
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select top 5 * from News where NewsID<>"& NewsID & " and (SpecialID=" & SpecialID & " or SpecialID2=" & SpecialID & ") and checkked=1 order by NewsID DESC"
rs.Open,conn,1,1
if rs.EOF then
Response.Write "<tr><td width=100% > 没有专题信息</td></tr>"
else
while not rs.EOF
title=trim(rs("title"))
title=replace(title,"<br>","")
Response.Write "<tr><td width=100% height=18> <img src=images/goxp.gif> <a class=middle target=_top href='ReadNews.asp?NewsID=" & rs("NewsID") & "'>" & Title & "</a><font color=#666666>(" & trim(rs("UpdateTime")) &")[<font color=#ff0000>" & rs("click") & "</font>]</font></td></tr>"
rs.MoveNext
wend
Response.Write "<tr><td width=98% align=right height=18><a class=lift href='Special_News.asp?SpecialID=" & SpecialID &"'><img src='images/more.gif' border='0'></a></td></tr>"
end if
rs.Close
set rs=nothing
end if
'------------------------------------------------------------------------------------------------------------------------------------
Response.Write "<tr><td width=100% ><hr size=1></td></tr><tr><td height=8></td></tr>"
Response.Write "<tr><td width=100% height=18><B>相关信息:</b></td></tr><tr><td height=8></td></tr>"
if about<>"" then
sql="select top 5 * from news where (about like '%" & about & "%' or title like '%" & about & "%') and title not like '%" & title & "%' and checkked=1 order by newsid desc"
set rs=conn.execute(sql)
do while not rs.eof
title=trim(rs("title"))
title=replace(title,"<br>","")
%>
<tr>
<td height=18> <img src=images/goxp.gif> <a class=middle target=_top href='ReadNews.asp?NewsID=<%=rs("NewsID")%>'><%=Title%></a><font color=#666666>(<%=month(trim(rs("updateTime")))%>月<%=day(trim(rs("updateTime")))%>日)[<font color=#666666><%=rs("click")%></font>]</font></td>
</tr>
<% rs.movenext
loop
Response.Write "<tr><td width=98% align=right height=18><a class=lift href='Result.asp?keyword=" & about &"'><img src='images/more.gif' border='0'></a></td></tr>"
else
Response.write "<tr><td width=100% > 没有相关信息</td></tr>"
end if
'rs.close
set rs=nothing
set rs1=server.CreateObject("ADODB.RecordSet")
rs1.Source="select top "&reviewnum&" * from review where NewsID=" & NewsID & " and passed=1 order by reviewid desc"
rs1.Open rs1.Source,conn,1,1
if rs1.EOF then NoReview=1
Response.Write "<tr><td width=100% ><hr size=1></td></tr><tr><td height=8></td></tr>"
Response.Write "<tr><td width=100% ><B>相关评论:</b></td></tr><tr><td height=8></td></tr>"
%>
<tr>
<td width="100%">
<%
if NoReview then
Response.Write " 没有相关评论"
end if
%>
</td>
</tr>
<%
if not NoReview then
while not rs1.EOF
author=server.HTMLEncode(trim(rs1("author")))
email=server.HTMLEncode(trim(rs1("email")))
reviewip=rs1("reviewip")
content=trim(rs1("content"))
''content=replace(content,"<","<")
''content=replace(content,">",">")
''content=replace(content,chr(13),"<BR>")
ContentLen=len(Content)
%>
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="5" style="table-layout:fixed; word-break:break-all">
<tr bgcolor="#EFEFEF">
<td width="322">发表人:<%=author%></td>
<td width="270">
<p align="right">
<%if Request.cookies("key")="super" or showip="1" then%>
IP:<%=reviewip%>
<%end if%>
</td>
</tr>
<tr>
<td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed; word-break:break-all">
<tr>
<td>发表人邮件:<a href='mailto:<%=email%>'><%=email%></a></td>
<td align="right">发表时间:<%=rs1("updatetime")%></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2">
<%
If ContentLen=<180 then
DisplayContent=Content
Response.Write " " & displaycontent
%>
</td>
</tr>
<%
else
%>
<tr bgcolor="#FFFFFF">
<td colspan="2">
<%
DisplayContent=mid(Content,1,180)
Response.Write " " & displaycontent & "... <a href='readview.asp?reviewID=" & rs1("reviewID") &"&NewsID=" & newsID &"' target=_blank class=class>详细内容</a>"
end if
%>
</td>
</tr>
</table></td>
</tr>
<%
rs1.MoveNext
wend
end if
rs1.Close
set rs1=nothing
conn.close
set conn=nothing
%>
</table></td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td height="25"> </td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="bottom" style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc"; border-top: 1px solid #cccccc">
<tr>
<td>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="20"> </td>
<td width="255" height="20">
<a href=review.asp?NewsID=<%=NewsID%> target="_blank" class=bottom><img src="images/icon1.gif" border="0">
发表、查看更多关于该信息的评论</a>
</td>
<td width="214" height="20">
<a href=send.asp?NewsID=<%=NewsID%> target=_blank class=bottom><img src="images/mail.gif" border="0">
将本信息发给好友</a>
</td>
<td width="168"><a href="javascript:window.print()" class=bottom><img src="images/printer.gif" border="0">
打印本页</a></td>
<td width="90"><input type="button" name="close2" value="关闭窗口" onClick="window.close();return false;"></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="19"> </td>
</tr>
</table>
<!--#include file=include/bottom.asp -->
<%end if%><%end if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -