📄 makenews1.asp
字号:
<!--#include file="Session.asp"-->
<!--#include file="Conn.asp"-->
<!--#include file="Classmake.asp"-->
<%
'=======================================
'88red科技独立开发完成本程序,并提供免费技术支持与升级服务
'官方网站 http://www.88red.com QQ:8375158 TEL:13964489818
'对于商业客户,本站提供细致周到的各项售后服务;对于盗版客户恕不提供,对于散播本程序者本站将追究其法律责任
'88red科技将陆续开发其他各种先进程序,例如企业网站建站系统等等,对老客户购买其他程序给予最大程度的优惠,欢迎洽谈
'=======================================
id1=request("gid")
set rs=server.createobject("adodb.recordset")
sql="select * from news where id="&id1
rs.open sql,conn,1,1
if rs.eof then
response.write"数据库里面没有新闻!"
response.end
else
bclassid=rs("bclassid")
sclassid=rs("sclassid")
title=rs("title")
key=rs("gjz")
des=rs("miaoshu")
xg=rs("xg")
addman=rs("source")
content=rs("body")
adddate=rs("date")
filename2=rs("filename")
if key="" then
key=title
end if
if des="" then
des=title
end if
end if
rs.close
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql="select * from bigclass where bcid="&bclassid
rs.open sql,conn,1,1
if not rs.eof then
bname=rs("bcname")
burl=rs("name1")
end if
rs.close
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql="select * from smallclass where scid="&sclassid
rs.open sql,conn,1,1
if not rs.eof then
sname=rs("scname")
surl=rs("name2")
end if
rs.close
set rs=nothing
dh="<a href=../index.htm>首页</a><<<<a href=../"&burl&"1.htm>"&bname&"</a><<<<a href=../"&surl&"1.htm>"&sname&"</a>"
filename="../News/newsmb.htm"
set fso = Server.CreateObject("Scripting.FileSystemObject")
set f2= fso.OpenTextFile(server.mappath(""&filename&""))
If Not fso.FileExists(server.mappath(""&filename&"")) Then
mb1="新闻页面模版news/newsmb.htm不存在,请检查该路径文件。"
else
mb1=f2.ReadAll
End If
f2.close
set f2=nothing
set fso=nothing
set rs3=server.CreateObject("adodb.recordset")
sql3="select top 6 * from news where title like '%"&xg&"%' order by id desc"
rs3.open sql3,conn,1,1
if rs3.eof then
theclass="暂时没有相关新闻文章"
else
do while not rs3.eof
thenews=thenews&"·<a href="&rs3("filename")&".htm target=_blank><font class=word1>"&trim(rs3("title"))&"</font></a><br>"
rs3.movenext
loop
end if
rs3.close
set rs3=nothing
set rs2=server.CreateObject("adodb.recordset")
sql2="select top 1 * from news where id>"&id1
rs2.open sql2,conn,1,1
if not rs2.eof then
tsp_name=rs2("title")
turl=rs2("filename")
two1="上一篇文章: <a href="&turl&".htm>"&tsp_name&"</a><br>"
else
two1="上一篇文章: 暂时还没有<br>"
end if
rs2.close
set rs2=nothing
set rs2=server.CreateObject("adodb.recordset")
sql2="select top 1 * from news where id<"&id1&" order by id desc"
rs2.open sql2,conn,1,1
if not rs2.eof then
tsp_name=rs2("title")
turl=rs2("filename")
two2="下一篇文章: <a href="&turl&".htm>"&tsp_name&"</a><br>"
else
two2="下一篇文章: 暂时还没有"
end if
rs2.close
set rs2=nothing
theclass=two1&two2
mb1=replace(mb1,"[website]",website)
mb1=replace(mb1,"[theurl]",url1)
mb1=replace(mb1,"[title]", title)
mb1=replace(mb1,"[key]",key)
mb1=replace(mb1,"[des]",des)
mb1=replace(mb1,"[pname]", addman)
mb1=replace(mb1,"[body]", content)
mb1=replace(mb1,"[theclass]", theclass)
mb1=replace(mb1,"[thenews]", thenews)
mb1=replace(mb1,"[daohang]", dh)
mb1=replace(mb1,"[date]", adddate)
mb1=replace(mb1,"[bottom]",bottom)
call makeclass
call makeinfo
set fso=server.createobject("scripting.filesystemobject")
filename1="../news/"&filename2&".htm"
set ffile=fso.createtextfile(server.mappath(""&filename1&""))
ffile.write""&mb1&""
ffile.close
set ffile=nothing
set fso=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -