js_news_xg.asp

来自「Art2008 CMS是一款具有强大的功能的基于ASP语言的网站管理软件」· ASP 代码 · 共 31 行

ASP
31
字号
<!-- #include file="admin_conn.asp"-->
<!--#include file = admin/titleb.asp -->
<%
	js_news_id=trim(request("news_id"))
   Set html_news_rs = Server.CreateObject("ADODB.RecordSet")
    html_news_rs.Open "select xgnews,title  from [news] where id="&js_news_id,conn,1,1
    webxgnews=html_news_rs("xgnews")
    if webxgnews="" then webxgnews=left(html_news_rs("title"),5)
    if webxgnews<>"" then
	webxgnews=replace(webxgnews,"[","")
	webxgnews=replace(webxgnews,"]","")
    end if

	html_news_rs.close
	set html_news_rs=nothing
Dim html_xgnews
Set xgrs = Server.CreateObject("ADODB.RecordSet")
xgrs.Open "select top 10 * from [news] where ( title like '%"&webxgnews&"%' or xgnews like '%"&webxgnews&"%' ) and id<>"&js_news_id&" and sh=1  order by id desc",conn,1,1
if xgrs.recordcount=0 then 
html_xgnews="没有相关信息"
else 
html_xgnews="<b>相关新闻:</b><br><br>"
while not xgrs.eof
   html_xgnews=html_xgnews + "·<a href="&fun_html_url(xgrs("id"))&" title='"&xgrs("title")&"'>"&xgrs("title")&"</a><BR>"
   xgrs.movenext
wend
end if
    xgrs.close:set xgrs=nothing
    conn.close: set conn=nothing
%>
document.write ("<%=html_xgnews%>");

⌨️ 快捷键说明

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