📄 news_view.asp
字号:
<!--#include file = admin_conn.asp -->
<%
newsid=trim(request("newsid"))
sql = "select * from news where id="&newsid
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
title=trim(rs("title"))
dat=rs("time")
zz=trim(rs("zz"))
hit=rs("hit")+1
hit=hit&" <a style='text-decoration: none' target=_blank href=so.asp?word="&rs("xgnews")&">相"&"关"&"信"&"息</a>"
content=rs("content")
url=trim(rs("url"))
if url<>"" then
Response.Redirect url
end if
pl="<img src=images/bbstitle.gif><a href=# onclick='window.open(""NewsPL.asp?id="&rs("id")&""",""newsview"",""width=680,height=400,top=70,left=150,scrollbars=yes"" )' title='"&rs("title")&"'>发表,查看评论</a>"
pp="<img border='0' src='images/print.gif' width='16' height='16'><a href='javascript:window.print()'>打印本页</a>"
%>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<title><%=title%></title>
<STYLE type="text/css">
<!--
a:link { text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited { text-decoration: none; color: #000000 }
A:hover {COLOR: green; FONT-FAMILY: "宋体"; TEXT-DECORATION: underline;}
body { font-size: 10.5pt; font-family: 宋体, Arial;color: #000000}
TD {FONT-SIZE: 10.5pt; FONT-FAMILY: "宋体", "Arial";color: #000000}
body { margin-top: 0; margin-bottom: 0; color: #000000 }
-->
</STYLE>
</head>
<%
conn.Execute = "update news set hit='"&rs("hit")+1&"' where ID="&(newsid)
lmid=cint(rs("lm2"))
sql2 = "select * from lm where mb<>'' and id="&lmid
Set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open sql2,conn,1,1
if rs2.recordcount<>0 then
lm=rs2("lm2")
mbid=rs2("mb")
sql3 = "select * from newsmb where id="&mbid
Set rs3 = Server.CreateObject("ADODB.RecordSet")
rs3.Open sql3,conn,1,1
if rs3.recordcount<>0 then
nr=rs3("mid")
nr=replace(nr,"$$标题$$",title)
nr=replace(nr,"$$栏目名$$",lm)
nr=replace(nr,"$$时间$$",dat)
nr=replace(nr,"$$访问量$$",hit)
nr=replace(nr,"$$内容$$",content)
nr=replace(nr,"$$来源$$",zz)
nr=replace(nr,"$$评论$$",pl)
nr=replace(nr,"$$打印$$",pp)
response.write nr
else
response.write "<center><BR><BR><BR>模版设置不正确。"
end if
rs3.close
set rs3=nothing
else
Response.Write "<center><BR><BR><BR>此栏目模版设置不正确"
mbid=1
end if
rs.close
set rs=nothing
rs2.close
set rs2=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -