⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shownews.asp

📁 中国114网搜索系统 版  本: 文件大小:580 KB 软件语言:简体中文 授权方式:免费版 相关链接:程序演示 开 发 商: 运行环境:ASP源码
💻 ASP
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0041)http://grwy.online.ha.cn/explorer 探索者工作室 -->
<HTML><head>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<STYLE type=text/css>BODY {
	FONT-SIZE: 10.5pt; LINE-HEIGHT: 18px
}
.p10 {
	FONT-SIZE: 10.5pt
}
</style>
<link rel="stylesheet" type="text/css" href="../html/style.css"></head>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"  background="1liv.jpg"  vlink=0000ff>
<!-- #include file=../change.asp -->
<!-- #include file=../inc/head.inc -->
<!-- #include file=../database.asp -->
<%
id=request.querystring("id")
Set rs = Server.CreateObject("ADODB.Recordset")

if isNumeric(id)=0 or isNull(id) or id="" then
	 sql="select max(id) from sitenews"
	 set num=conn.execute(sql)
	 if not num.eof then
	 	id=num(0)
	 else 
	 	id=0
	 end if
	 set num=nothing
end if

if isNumeric(id)=0 or isNull(id) or id="" then id=0

response.write "<table width=700 align=center cellpadding=10 cellspacing=0><tr bgcolor=ffffff height=3><td></td><td></td></tr><tr>"
response.write "<td width=150 bgcolor=ffffee valign=top><table width=100% ><tr><td bgcolor=ddddcc align=center><span class=p10><b>网站新闻</td></tr></table>"

sql="select TOP 20 id,title from sitenews where id >"&id-10&" and id<"&id+5 &" order by id DESC"
rs.open sql,conn,1,1
eofflag=1
if not rs.eof then
	getdata=rs.getrows(20)
	rs.close
	eofflag=0
else
	rs.close
end if

if eofflag=0 then
	response.write "<ul>"
	for n=0 to ubound(getdata,2)
		response.write "<li><a href=shownews.asp?id="&getdata(0,n)&">"&server.htmlencode(getdata(1,n))&"</a> </li>"
	next
	response.write "</ul>"
end if

sql="select TOP 1 * from sitenews where id="&id
rs.open sql,conn,1,3
if rs.bof or rs.eof then
response.write "<td><p><br>新闻"&server.htmlencode(bt)&"找不到!</td>"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
end if

title=rs("title")
document=rs("document")
htmlflag=rs("htmlflag")
photo=rs("photo")
url=rs("url")
ndatetime=rs("ndatetime")
looktimes=rs("looktimes")+1
rs("looktimes")=looktimes
rs.Update
rs.close

response.write "<td width=550 valign=top><br><p align=center><strong><font size=3>"&server.htmlencode(title)&"</font></strong></p>"
if document<>"" then
     if htmlflag=1 then
        if document<>"" then response.write document
     else
     	if photo<>"" then response.write "<table align=center><tr><td><img src='"&server.htmlencode(photo)&"' align='left'>"
        if document<>"" then response.write "<span class=p10>"&replace(server.htmlencode(document),vbCrLf,"<br>")
     end if
end if
response.write "<i><p align=right>("&ndatetime&")"
if url<>"" then response.write "<a href='"&server.htmlencode(url)&"'>相关链接</a>"
response.write " 浏览次数:"&looktimes
response.write "</i></td></tr></table></table>"
set rs=nothing
conn.close
set conn=nothing%>
</body></html>

⌨️ 快捷键说明

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