📄 admin_create_html.asp
字号:
<!--#include file="mdb.asp"-->
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.location.href='admin_login.asp';</script>")
Response.End
End if
%>
<html>
<head>
<title>分类生成</title>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<LINK REL="stylesheet" HREF="css.css" TYPE="text/css">
</head>
<body leftmargin='2' topmargin='0' marginwidth='0' marginheight='0'>
<b>正在生成栏目列表页面……请稍候!<font color='red'>在此过程中请勿刷新此页面!!!</font></b><br>
<%
dim site,siteurl,email,dlogo,stats,array,weburl,adurl,classtitle,classlist,classkey,classmemo,copyright,classid,classname,classlink
dim ji,fw,wstr,fso
dim sc1,sc2,sc3
Call reg(create)
sql="select * from O3888_title"
set rs=conn.execute(sql)
site=rs("site")
siteurl=rs("siteurl")
email=rs("email")
dlogo=rs("dlogo")
stats=rs("stats")
array=rs("array")
weburl=rs("weburl")
adurl=rs("adurl")
classtitle=rs("classtitle")
classlist=rs("classlist")
classkey=rs("classkey")
classmemo=rs("classmemo")
Copyright=rs("Copyright")
rs.close
set rs=nothing
sql="select * from O3888_template_class where id=1"
set rs=conn.execute(sql)
template=rs("template")
rs.close
set rs=nothing
sql="select * from O3888_map"
set rs=conn.execute(sql)
e=rs("e")
f=rs("f")
e_table_top=rs("e_table_top")
e_tr_top=rs("e_tr_top")
e_tr_Circulation=rs("e_tr_Circulation")
e_tr_Packing=rs("e_tr_Packing")
e_tr_end=rs("e_tr_end")
e_table_end=rs("e_table_end")
g=rs("g")
h=rs("h")
g_table_top=rs("g_table_top")
g_tr_top=rs("g_tr_top")
g_tr_Circulation=rs("g_tr_Circulation")
g_tr_Packing=rs("g_tr_Packing")
g_tr_end=rs("g_tr_end")
g_table_end=rs("g_table_end")
rs.close
set rs=nothing
Call CheckAndCreateFolder("../"&classlist&"")
ji=0
classid=request("classid")
if classid="" then
sql="select * from O3888_class"
set rss=conn.execute(sql)
do while not rss.eof
classid=rss("classid")
Call listit()
rss.movenext
loop
rss.close
set rss=nothing
else
Call listit()
end if
%>
<b>生成分类文件结束!共生成了 <font color='red'><%=ji%></font> 个分类文件!</b><br><br>
<br><div align='center'>
<a href='admin_create.asp'><b>返 回</b></a>
</div>
</body>
</html>
<%
function listit()
sql="select * from O3888_class where classid="&classid
set rs=conn.execute(sql)
classname=rs("classname")
topclass=rs("topclass")
key=rs("key")
if rs("key")<>"" then
key=rs("key")
else
key=classkey
end if
if rs("memo")<>"" then
memo=rs("memo")
else
memo=classmemo
end if
if memo="" then memo=classmemo
O3888_g_search=""
if not rs("search")="" then
r_key=split(rs("search"),"|")
for i=0 to ubound(r_key)
O3888_g_search=O3888_g_search&"<a target='_blank' href='http://www.baidu.com/s?tn=03888_pg&wd="&r_key(i)&"'>"&r_key(i)&"</a><span class='11'></span>"
next
end if
rs.close
set rs=nothing
sc1=""
while topclass<>0
sql="select * from O3888_class where classid="&topclass
set rs=conn.execute(sql)
if not rs.eof then
sc1="><a href='"&weburl&""&classlist&""&classtitle&""&rs("classid")&"/' target='_self'>"&rs("classname")&"</a>"&xunxu
topclass=rs("topclass")
end if
rs.close
set rs=nothing
wend
sc1=sc1&"><a href='"&weburl&""&classlist&""&classtitle&""&classid&"/' target='_self'>"&classname&"</a>"
wstr=replace(template,"{$O3888_sc1}",sc1)
sc2=e_table_top
sql="select top "&e&" * from O3888_class where topclass="&classid&" order by classid desc"
set rs=conn.execute(sql)
jishu=1
if rs.eof or rs.bof then
sc2=sc2&""
end if
while not rs.eof
if jishu=1 or jishu mod f = 1 then
sc2=sc2&replace(replace(e_tr_top,"{$O3888_e_classlink}",weburl&classlist&classtitle&rs("classid")&"/"),"{$O3888_e_classname}",rs("classname"))
else
sc2=sc2&replace(replace(e_tr_Circulation,"{$O3888_e_classlink}",weburl&classlist&classtitle&rs("classid")&"/"),"{$O3888_e_classname}",rs("classname"))
end if
if jishu mod f =0 then sc2=sc2&e_tr_end&vbCrLf
jishu=jishu+1
rs.movenext
wend
jishu=jishu-1
if jishu mod f <> 0 then
for i= 1 to f-(jishu mod f)
sc2=sc2&e_tr_Packing
if i = f-(jishu mod f) then sc2=sc2&e_tr_end&vbCrLf
next
end if
rs.close
set rs=nothing
sc2=sc2&e_table_end&vbCrLf
wstr=replace(wstr,"{$O3888_sc2}",sc2)
sc3=replace(g_table_top,"{$O3888_g_classname}",classname)
sql="select top "&g&" * from O3888_website where verity=1 and classid="&classid&" order by topid desc,id desc"
set rs=conn.execute(sql)
jishu=1
noooo=1
O3888_g_ji=0
if rs.eof or rs.bof then
sc3=sc3&"<tr bgColor=#ffffff><td width='25%' height='25'> </td><td width='25%'> </td><td width='25%'> </td><td width='25%'> </td></tr>"
end if
while not rs.eof
if rs("recommend")=1 then
recommend=" <img src='../../images/jing.gif'>"
else
recommend=""
end if
O3888_g_ji=O3888_g_ji+1
if jishu=1 or jishu mod h = 1 then
noooo=noooo+1
if noooo mod 2 = 1 then
bgcolor="06"
else
bgcolor="09"
end if
if stats=1 or stats=2 then
sc3=sc3&replace(replace(replace(g_tr_top,"{$O3888_g_urllink}",weburl&"go.asp?id="&rs("id")),"{$O3888_g_urlname}",""&rs("title")&""&recommend),"{$O3888_g_trcolor}",bgcolor)
else
sc3=sc3&replace(replace(replace(g_tr_top,"{$O3888_g_urllink}",rs("url")),"{$O3888_g_urlname}",""&rs("title")&""&recommend),"{$O3888_g_trcolor}",bgcolor)
end if
else
if stats=1 or stats=2 then
sc3=sc3&replace(replace(g_tr_Circulation,"{$O3888_g_urllink}",weburl&"go.asp?id="&rs("id")),"{$O3888_g_urlname}",""&rs("title")&""&recommend)
else
sc3=sc3&replace(replace(g_tr_Circulation,"{$O3888_g_urllink}",rs("url")),"{$O3888_g_urlname}",""&rs("title")&""&recommend)
end if
end if
if jishu mod h =0 then sc3=sc3&g_tr_end&vbCrLf
jishu=jishu+1
rs.movenext
wend
jishu=jishu-1
if jishu mod h <> 0 then
for i = 1 to h-(jishu mod h)
sc3=sc3&g_tr_Packing
if i = h-(jishu mod h) then sc3=sc3&g_tr_end&vbCrLf
next
end if
rs.close
set rs=nothing
if O3888_g_search="" then
sc3=sc3&g_table_end&"/table>"&vbCrLf
else
sc3=sc3&g_table_end&"tr height='26'><td colspan='5'><table cellSpacing='0' cellpadding='0' border='0' width='100%' height='100%' class='13'><tr><td> 相关搜索:"&O3888_g_search&"</td><td align='right'>"&O3888_g_ji&" </td></tr></table></td></tr></table><table border='0' cellpadding='0' cellspacing='0' width='950' height='10' align='center'><tr><td></td></tr></table>"&vbCrLf
end if
if array=1 then
sql="select * from O3888_class where verity=1 and topclass="&classid&" order by classid desc"
set r=conn.execute(sql)
if r.eof or r.bof then
sc3=sc3&""
end if
while not r.eof
O3888_g_search=""
if not r("search")="" then
g_key=split(r("search"),"|")
for i=0 to ubound(g_key)
O3888_g_search=O3888_g_search&"<a target='_blank' href='http://www.baidu.com/s?tn=03888_pg&wd="&g_key(i)&"'>"&g_key(i)&"</a><span class='11'></span>"
next
end if
sc3=sc3&replace(g_table_top,"{$O3888_g_classname}",r("classname"))
sql="select top "&g&" * from O3888_website where verity=1 and classid="&r("classid")&" order by topid desc,id desc"
set rs=conn.execute(sql)
jishu=1
noooo=1
O3888_g_ji=0
if rs.eof or rs.bof then
sc3=sc3&"<tr bgColor=#ffffff><td width='25%' height='25'> </td><td width='25%'> </td><td width='25%'> </td><td width='25%'> </td></tr>"
end if
while not rs.eof
if rs("recommend")=1 then
recommend=" <img src='../../images/jing.gif'>"
else
recommend=""
end if
O3888_g_ji=O3888_g_ji+1
if jishu=1 or jishu mod h = 1 then
noooo=noooo+1
if noooo mod 2=1 then
bgcolor="06"
else
bgcolor="09"
end if
if stats=1 or stats=2 then
sc3=sc3&replace(replace(replace(g_tr_top,"{$O3888_g_urllink}",weburl&"go.asp?id="&rs("id")),"{$O3888_g_urlname}",""&rs("title")&""&recommend),"{$O3888_g_trcolor}",bgcolor)
else
sc3=sc3&replace(replace(replace(g_tr_top,"{$O3888_g_urllink}",rs("url")),"{$O3888_g_urlname}",""&rs("title")&""&recommend),"{$O3888_g_trcolor}",bgcolor)
end if
else
if stats=1 or stats=2 then
sc3=sc3&replace(replace(g_tr_Circulation,"{$O3888_g_urllink}",weburl&"go.asp?id="&rs("id")),"{$O3888_g_urlname}",""&rs("title")&""&recommend)
else
sc3=sc3&replace(replace(g_tr_Circulation,"{$O3888_g_urllink}",rs("url")),"{$O3888_g_urlname}",""&rs("title")&""&recommend)
end if
end if
if jishu mod h =0 then sc3=sc3&g_tr_end&vbCrLf
jishu=jishu+1
rs.movenext
wend
jishu=jishu-1
if jishu mod h <> 0 then
for i= 1 to h - (jishu mod h)
sc3=sc3&g_tr_Packing
if i = h - (jishu mod h) then sc3=sc3&g_tr_end&vbCrLf
next
end if
rs.close
set rs=nothing
if O3888_g_search="" then
sc3=sc3&g_table_end&"/table>"&vbCrLf
else
sc3=sc3&g_table_end&"tr height='26'><td colspan='5'><table cellSpacing='0' cellpadding='0' border='0' width='100%' height='100%' class='13'><tr><td> 相关搜索:"&O3888_g_search&"</td><td align='right'>"&O3888_g_ji&" </td></tr></table></td></tr></table><table border='0' cellpadding='0' cellspacing='0' width='950' height='10' align='center'><tr><td></td></tr></table>"&vbCrLf
end if
r.movenext
wend
r.close
set r=nothing
end if
wstr=replace(wstr,"{$O3888_sc3}",sc3)
wstr=replace(wstr,"{$O3888_classtitle}",classtitle)
wstr=replace(wstr,"{$O3888_classlist}",classlist)
wstr=replace(wstr,"{$O3888_classname}",classname)
wstr=replace(wstr,"{$O3888_classlink}",classlink)
wstr=replace(wstr,"{$O3888_classkey}",key)
wstr=replace(wstr,"{$O3888_classmemo}",memo)
wstr=replace(wstr,"{$O3888_site}",site)
wstr=replace(wstr,"{$O3888_siteurl}",siteurl)
wstr=replace(wstr,"{$O3888_email}",email)
wstr=replace(wstr,"{$O3888_dlogo}",dlogo)
wstr=replace(wstr,"{$O3888_Copyright}",Copyright)
wstr=replace(wstr,"{$O3888_creattime}",now())
wstr=replace(wstr,"{$O3888_weburl}",weburl)
wstr=replace(wstr,"{$O3888_adurl}",adurl)
Call CheckAndCreateFolder("../"&classlist&""&classtitle&""&classid&"/")
Set fso=Server.CreateObject("Scripting.FileSystemObject")
set fw=fso.createtextfile(server.mappath("../"&classlist&""&classtitle&""&classid&"/index.asp"),true)
fw.writeline wstr
fw.close
set fw=nothing
set fso=nothing
ji=ji+1
response.write "<li>成功生成"&classname&"页:"&classlist&""&classtitle&""&classid&"/index.asp</li><br>"&VbCrlf
response.Flush
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -