📄 html_makenewsclass.asp
字号:
<!--#include file="INC/HTMLPRODUCT.ASP"--><!--#include file="admin.ASP"-->
<%
dim title,bigclassid
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>"
Dim Rs1,Sql1,Moban
Set Rs1=Server.CreateObject("ADODB.RecordSet")
Sql1 ="Select Mb From Moban where ID=5 "
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 rslist = Server.CreateObject("ADODB.Recordset")
sql="select BigClassName from BigClass_New order by BigClassID"
rslist.open sql,conn,1,3
strnewsclass=""
do while not rslist.eof
strnewsclass=strnewsclass&"<li class=Fs_KstdLi>·<a href=NSList_"& rslist("BigClassId") &"_1.html target=_blank>"& rslist("BigClassName") &"</b></a></li>"
rslist.movenext
loop
rslist.close
set rslist=nothing
Set RsNews = Server.CreateObject("ADODB.Recordset")
sql="select * from BigClass_New order by BigClassID"
RsNews.open sql,conn,1,3
strnews=""
do while not RsNews.eof
strnews=strnews&"<table width=100% height=19 border=0 align=center cellpadding=0 cellspacing=0>"
strnews=strnews&"<tr><td width=21% height=18 bgcolor=#eeeeee> 首页>> "& RsNews("BigClassName")&"</td>"
strnews=strnews&"<td width=79% bgcolor=#eeeeee> </td></tr><tr> "
strnews=strnews&"<td height=1 colspan=2 bgcolor=#999999></td></tr>"
strnews=strnews&"</table>"
strnews=strnews&"<table width=100% border=0 align=center cellpadding=0 cellspacing=3 bgcolor=#FFFFFF> <tr><td height=8></td></tr><tr><td><table width=100% border=0 cellspacing=0 cellpadding=0>"
BigClass=RsNews("BigClassName")
BigClassid=RsNews("BigClassid")
n=6
If BigClass<>"" then
sql="select top 6 * from News where BigClassName='"& BigClass &"' order by AddDate desc"
set rs=conn.execute(sql)
do while not rs.eof
strnews=strnews&"<tr>"
strnews=strnews&"<td width=6% height=24 align=center ><img src=Img/arrow_6.gif width=11 height=11></td>"
strnews=strnews&"<td width=65% height=24 style=BORDER-bottom: #999999 1px dotted> "
if rs("FirstImageName")<>"" then
strnews=strnews&"<img src='../images/news.gif' border=0 alt='图片新闻'>"
end if
strnews=strnews&"<a href=News_"& RS("id") &".html target=_blank>"& RS("TITLE") &"</a> </td>"
strnews=strnews&"<td width=29% style=BORDER-bottom: #999999 1px dotted><font color=#999999>["& FormatDateTime(RS("AddDate"),2)&"](点击<font color=#ff0000>"& RS("hits") &"</font>)</font><br>"
n=n-1
if n<1 then exit do
rs.movenext
loop
rs.close
set rs=nothing
end if
strnews=strnews&"</td></tr></table></td></tr><tr><td height=8><div align=right><a href=NSlist_"& BigClassid &"_1.Html>更多>>></a></div></td></tr></table>"
RsNews.movenext
loop
RsNews.close
set RsNews=nothing
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
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)
Set Fso=Server.CreateObject("Scripting.FileSystemObject")
Set Fout=Fso.CreateTextFile(Server.Mappath("HTML/NEWS.html"))
Fout.Write Moban
Fout.Close
Conn.Close
Set Conn=nothing
Response.Write "分类页面成功生成</html>"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -