📄 shownews_body.asp
字号:
<%sub shownews_body()
opennews
sql="select * from news where news_id="&request.querystring("news_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tr>
<td colspan="3" height="10"></td>
</tr>
<tr>
<td valign="top">
<table width="98%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#B9BDC6">
<tr>
<td bgcolor="#F5F5F5" align="center" class="chinese">来源:<a href="<%=rs("news_ahome")%>" target="_blank"><%=rs("news_author")%></a> 更新日期:<%=rs("news_date")%> 阅读次数:<%=rs("news_count")%></td>
</tr>
</table>
<br>
<table width="98%" border="0" cellspacing="1" cellpadding="6" align="center" bgcolor="#BDC1CA">
<tr>
<td bgcolor="#FFFFFF" class="chinese">
<div align="center"><b><%=rs("news_title")%></b></div>
<br>
<br>
<%=ubb2html(formatStr(autourl(rs("news_content"))),true,true)%> <br>
<br>
--------------------------------------------------------------------------------<br>
<b>相关新闻</b><br>
<%sql="select * from news where news_content like '%"&rs("news_keyword")&"%' and news_id <> "&rs("news_id")&" order by news_date DESC"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof
%>
<a href="shownews.asp?news_id=<%=rs2("news_id")%>"><%=rs2("news_title")%></a> <%=rs2("news_date")%><br>
<%
rs2.movenext
loop
if rs2.eof and rs2.bof then
response.write "没有相关新闻"
end if
rs2.close
set rs2=nothing
%>
</td>
</tr>
</table>
<br>
</td>
<td width="1" background="images/dotlinev.gif"></td>
<td width="200" align="center" valign="top">
<table width="94%" border="0" cellspacing="1" cellpadding="8" bgcolor="#ACB3BD" class="chinese">
<tr>
<td bgcolor="#F5F5F5" width="84%" align="right">
<P style="LINE-HEIGHT: 150%"><a href="news.asp?type=1">最新的10篇新闻</a><br>
<a href="news.asp?type=2">按时间降序排列</a><br>
<a href="news.asp?type=3">按时间升序排列</a></p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" height="1"></td>
</tr>
</table>
<%
rs.close
set rs=nothing
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -