📄 create_html.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%
classid=request("classid")
set rs=server.createobject("adodb.recordset")
rs.open "select * from feilei where classid="&classid,conn,1,3
classname=rs("classname")
topclass=rs("topclass")
rs.close
dim fso
dim fr
dim wstr
dim fw
set fso=createobject("scripting.filesystemobject")
set fr=fso.opentextfile(server.mappath("template/sc.htm"))
wstr=fr.readall
fr.close
dim rstr
dim xunxu
xunxu="><a class=a href='rzzz" & 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='rzzz" & 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='"&rs("classid")&".htm'>["&rs("classname")&"]</a></td>"
else
rstr=rstr & "<td width='150' height='20' align=center><a class=a href='"&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'> </td>"
if i = 7-(jishu mod 7) then rstr=rstr & "</tr>"
next
end if
rs.close
wstr=replace(wstr,"<{{sc2}}>",rstr)
rstr=empay
rs.open "select * from detail where 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
rstr=rstr & "<tr bgColor="&bgcolor&"><td width='25%' height='25'> <a class=a href='"&rs("url")&"' target='_blank'>"&rs("title")&"</a></td>"
else
rstr=rstr & "<td width='25%' height='20'> <a class=a href='"&rs("url")&"' target='_blank'>"&rs("title")&"</a></td>"
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%'> </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,"<{{tongji}}>",tongji)
wstr=replace(wstr,"<{{creattime}}>",date())
set fw=fso.createtextfile(server.mappath("2008/" & classid & ".htm"),true)
fw.writeline wstr
fw.close
set fso=nothing
response.write "ok"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -