📄 html_makenews.asp
字号:
<!--#include file="INC/HTMLPRODUCT.ASP"--><!--#include file="admin.ASP"-->
<%
dim title
set rs_news=server.createobject("adodb.recordset")
sqltext4="select top 1 * from Bs_Sysdata"
rs_news.open sqltext4,conn,1,1
title=rs_news("BsCompanyName")
rs_news=nothing
rs_news.close
Response.Write "<Html>"
Response.Write "<Head>"
Response.Write "<Title>管理中心</title>"
Response.Write "<Meta Http-Equiv=""Content-Type"" Content=""Text/Html; CharSet=Gb2312"">"
Response.Write "<Link Type=""Text/Css"" Rel=""StyleSheet"" Href=""Images/style.css"">"
Response.Write "</Head>"
FileID=request("ID")
Dim Rs1,Sql1,Moban
Set Rs1=Server.CreateObject("ADODB.RecordSet")
Sql1 ="Select Mb From Moban where ID=7 "
Set Rs1=Conn.Execute (Sql1)
Moban=Rs1("Mb")
Moban1=Moban
strsmallclass="<TABLE cellSpacing=0 cellPadding=0 width=99% border=0>"
set rsbig = server.CreateObject ("adodb.recordset")
sql="select * from BigClass_New"
rsbig.open sql,conn,1,1
if rsbig.eof and rsbig.bof then
Response.Write "栏目正在建设中……"
else
i=1
do while not rsbig.eof
strsmallclass=strsmallclass&"<TR><TD language=javascript onmouseup=""opencat(cat10"&i&"000, img10"&i&"000);"" id=item$pval[catID]) style=""CURSOR: hand"" width=34 height=24 align=center><IMG id=img10"&i&"000 src=img/class1.gif width=20 height=20></TD><TD width=662><a href='NSlist_"&rsbig("BigClassid")&"_1.html'>"&rsbig("BigClassName")&"</a></TD></TR><TR>"
strsmallclass=strsmallclass&"<TD id=cat10"&i&"000 "
if rsbig("BigClassName")=BigClassName then
strsmallclass=strsmallclass&"style='DISPLAY' "
else
strsmallclass=strsmallclass&"style='DISPLAY: none' "
end if
strsmallclass=strsmallclass&"colspan=2>"
set rsSmall = server.CreateObject ("adodb.recordset")
sqls="select * from SmallClass_new where BigClassName='" & rsbig("BigClassName") & "' order by SmallClassID"
rsSmall.open sqls,conn,1,1
if rsSmall.eof and rsSmall.bof then
strsmallclass=strsmallclass&"没有小类"
else
j=1
do while not rsSmall.eof
strsmallclass=strsmallclass&" <IMG height=20 src=img/class3.gif width=26 align=absMiddle border=0><a href=NSSLIST_"&rsSmall("smallClassid")&"_1.html>"&rsSmall("SmallClassName")&"</a><BR>"
rsSmall.movenext
j=j+1
loop
end if
rsSmall.close
set rsSmall=nothing
strsmallclass=strsmallclass&"</TD></TR>"
rsbig.movenext
i=i+1
loop
rsbig.close
set rsbig=nothing
end if
strsmallclass=strsmallclass&"</TABLE>"
set rsRoot=server.createobject("adodb.recordset")
sql="select * From MenuClass where Depth=0 and ShowOnTop=True order by RootID"
rsRoot.open sql,conn,1,1
strtitle=""
do while not rsRoot.eof
ParentID=rsroot("classID")
strtitle=strtitle&"<li><a href="& rsroot("linkurl") &">"& rsroot("Classname") &"</a>"
strtitle=strtitle&"</strong><ul>"
set rsRoot1=server.createobject("adodb.recordset")
sql1="select * From MenuClass where Depth=1 and ShowOnTop=True and ParentID="& ParentID &" order by RootID"
rsRoot1.open sql1,conn,1,1
do while not rsRoot1.eof
strtitle=strtitle&"<li><a href="& rsroot1("linkurl")&">"& rsroot1("Classname")&"</a></li>"
RSROOT1.MOVENEXT
LOOP
RSROOT1=NOTHING
RSROOT1.CLOSE
strtitle=strtitle&"</ul>"
strtitle=strtitle&"</li>"
RSROOT.MOVENEXT
LOOP
RSROOT=NOTHING
RSROOT.CLOSE
id=cstr(request("id"))
Set rsnews=Server.CreateObject("ADODB.RecordSet")
sql="update news set hits=hits+1 where id in("&FileID&")"
conn.execute sql
sql="select * from news where id in("&FileID&")"
rsnews.Open sql,conn,1,1
Do while not Rsnews.eof
title=rsnews("title")
strnews="<table width=649 border=0 align=center cellpadding=0 cellspacing=0>"
strnews=strnews&"<tr><td height=50 colspan=2 align=center class=tit>"&rsnews("title")&"</td></tr><tr>"
strnews=strnews&"<td width=100% align=center style=border-top: 1 solid #666666;border-bottom: 1 solid #666666>发布者:"&rsnews("user")&" 发布时间:"& rsnews("AddDate")&" 阅读:<font color=#FF0000>"&rsnews("hits")&"</font>次 </td></tr><tr><td class=black id=fontzoom colspan=2><br>"&rsnews("content")&"</td></tr><tr align=right><td colspan=2> </td></tr><tr align=right><td colspan=2> </td></tr>"
strnews=strnews&"</table> "
strnews=strnews&"<br><table width=95% border=0 align=center cellpadding=0 cellspacing=0><tr><td align=right><a href=javascript:window.print()>打印本页</a> || <a href=javascript:window.close()>关闭窗口</a></td></tr></table></td></tr></table>"
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top 6 * from FriendLinks where linktype=2 and ISOK=true order by id desc"
rs_Product.open sqltext,conn,1,1
strleft=""
do while not rs_product.eof
strleft=strleft&"<li class=Fs_KstdLi>·<a href="& rs_Product("siteurl") &" target=_blank>"& rs_Product("sitename") &"</b></a></li>"
rs_product.movenext
loop
rs_product.close
set rs_product=nothing
Moban=Replace(Moban,"<!-strleft->",strleft)
Moban=Replace(Moban,"<!-strsmallclass->",strsmallclass)
Moban=Replace(Moban,"<!-strnews->",strnews)
Moban=Replace(Moban,"<!-strClassname->",strClassname)
Moban=Replace(Moban,"<!-strLogin->",strLogin)
Moban=Replace(Moban,"<!-strTitle->",strTitle)
Moban=Replace(Moban,"<!-Title->",Title)
Moban=Replace(Moban,"<!-body->",body)
Moban=Replace(Moban,"<!-plist_bottom->",plist_bottom)
Set Fso=Server.CreateObject("Scripting.FileSystemObject") '创建fso对象
Set Fout=Fso.CreateTextFile(server.mappath("Html/News_"&id&".html"))
Fout.WriteLine Moban
Moban=Moban1
RsNews.Movenext
Loop
Fout.Close
Response.Write "<body>"
Response.Write "·<font color=""#FF0000""><b>成功:生成Html新闻页面文件成功,ID为["&Request("ID")&"]!</font></b>"
Response.Write "<script LANGUAGE=""JavaScript"">"
Response.Write "<!--"
Response.Write "setTimeout('window.close();', 600);"
Response.Write "// -->"
Response.Write "</script>"
Response.Write "</body>"
Rs1.Close
Set Rs1=nothing
Rs.Close
Set Rs=nothing
Conn.Close
Set Conn=nothing
Response.Write "</html>"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -