?? 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 + -