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

📄 create_html.asp

📁 网吧使用的导航web站点
💻 ASP
字号:
<!--#include file="mdb.asp"-->
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.location.href='admin/index.asp';</script>")
Response.End
End if
set rs=server.createobject("adodb.recordset")
rs.open "select * from title",conn,1,3
site=rs("site")
siteurl=rs("siteurl")
email=rs("email")
Powered=rs("Powered")
Copyright=rs("Copyright")
rs.close
classid=request("classid")
rs.open "select * from feilei where classid="&classid,conn,1,3
classname=rs("classname")
topclass=rs("topclass")
rs.close
dim wstr,fso,fw
set fr=server.createobject("adodb.recordset")
fr.open "select * from template where id=1",conn,1,3
wstr=fr("template")
fr.close
set fr=nothing
dim rstr,xunxu
xunxu="><a class=a href='HOTwz0"&classid&".htm'>" & classname & "</a>"
while topclass<>0
	rs.open "select * from feilei where classid="&topclass,conn,1,3
	if not rs.eof then
		xunxu="><a class=a href='HOTwz0" & rs("classid") & ".htm'>" & rs("classname") & "</a>" & xunxu
		topclass=rs("topclass")
	end if
	rs.close
wend
wstr=replace(wstr,"<{{sc1}}>",xunxu)
rs.open "select * from feilei where topclass="&classid,conn,1,3
jishu=1
if rs.eof then
	rstr=rstr&""
end if
while not rs.eof
	if jishu=1 or jishu mod 7 = 1 then
		rstr=rstr & "<tr><td width='150' height='20' align=center><a class=a href='HOTwz0"&rs("classid")&".htm'>["&rs("classname")&"]</a></td>"
    else
		rstr=rstr & "<td width='150' height='20' align=center><a class=a href='HOTwz0"&rs("classid")&".htm'>["&rs("classname")&"]</a></td>"
	end if
	if jishu mod 7 =0  then rstr=rstr & "</tr>"
	jishu=jishu+1
	rs.movenext
wend
jishu=jishu-1
if jishu mod 7 <> 0 then
for i= 1 to 7-(jishu mod 7)
	rstr=rstr & "<td width='100'>&nbsp;</td>"
	if  i = 7-(jishu mod 7) then rstr=rstr & "</tr>"
next
end if
rs.close
wstr=replace(wstr,"<{{sc2}}>",rstr)
rstr=empay
Copyright=Powered&Copyright
rs.open "select * from detail where verity=1 and classid="&classid&" order by topid desc,id",conn,1,3
jishu=1
noooo=1
while not rs.eof
	if jishu=1 or jishu mod 4 = 1 then
	noooo=noooo+1
		if noooo mod 2=1 then
		bgcolor="#FFFFFF"
		else
		bgcolor="#F7F7F7"
		end if
if rs("recommend")=1 then
		rstr=rstr & "<tr bgColor="&bgcolor&"><td width='25%' height='25'>&nbsp;&nbsp;<a class=a href='"&rs("url")&"' target='_blank'>"&rs("title")&"&nbsp;<font color=#C60A00>荐</font></a></td>"
		else
		rstr=rstr & "<tr bgColor="&bgcolor&"><td width='25%' height='25'>&nbsp;&nbsp;<a class=a href='"&rs("url")&"' target='_blank'>"&rs("title")&"</a></td>"
	end if
		else
if rs("recommend")=1 then
		rstr=rstr & "<td width='25%' height='20'>&nbsp;&nbsp;<a class=a  href='"&rs("url")&"' target='_blank'>"&rs("title")&"&nbsp;<font color=#C60A00>荐</font></a></td>"
		else
		rstr=rstr & "<td width='25%' height='20'>&nbsp;&nbsp;<a class=a  href='"&rs("url")&"' target='_blank'>"&rs("title")&"</a></td>"
	end if
	end if
	if jishu mod 4 =0  then rstr=rstr & "</tr>"
	jishu=jishu+1
	rs.movenext
wend
jishu=jishu-1
if jishu mod 4 <> 0 then
for i= 1 to 4-(jishu mod 4)
	rstr=rstr & "<td width='25%'>&nbsp;</td>"
	if  i = 4-(jishu mod 4) then rstr=rstr & "</tr>"
next
end if
rs.close
wstr=replace(wstr,"<{{sc3}}>",rstr)
wstr=replace(wstr,"<{{classname}}>",classname)
wstr=replace(wstr,"<{{site}}>",site)
wstr=replace(wstr,"<{{siteurl}}>",siteurl)
wstr=replace(wstr,"<{{email}}>",email)
wstr=replace(wstr,"<{{Copyright}}>",Copyright)
wstr=replace(wstr,"<{{creattime}}>",date())
Set fso=Server.CreateObject("Scripting.FileSystemObject")
set fw=fso.createtextfile(server.mappath("2006/HOTwz0"&classid&".htm"),true)
fw.writeline wstr
fw.close
set rs=nothing
set fso=nothing
response.write "ok"
%>

⌨️ 快捷键说明

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