📄 html_make_all.asp
字号:
<!--#include file="config.asp"-->
<%
dim founderr,errmsg
founderr=false
errmsg=""
if session("adminlogin")<>sessionvar then
founderr=true
errmsg=errmsg+"<br>"+"<li>你尚未登录,或者超时了!请<a href='index.asp'>重新登录</a>!"
call diserror()
response.end
end if
if session("flag")>1 then
errmsg=errmsg+"<br>"+"<li>你的管理权限不够!!</a>!"
call diserror()
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="0" topmargin="0" marginwidth="0" MARGINHEIGHT="0"><script>if(top==self)top.location="index.asp" </script>
<table width="100%" cellpadding="2" cellspacing="0" CLASS="HeaderTdStyle" BGCOLOR="#0099CF" >
<tr >
<td height="26" colspan="2" align="center"><b>一次更新所有前台分类HTML页面</b></td>
</tr> <tr>
<td width="76" height="30" BGCOLOR=""#0099CF""><b>管理导航:</b></td>
<td height="30" BGCOLOR="#ffffff">此功能非常消耗服务器资源!请甚用! </td>
</tr>
</table><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="26"></td></tr>
</table>
<%if session("flag")>1 then
response.write"<li>对不起!您没有管理此项操作的权限"
response.end
end if
%>
<br>
<%if Request("action")="" then%>
<li><a href="?action=makeall">确定现在一次更新前台所有分类HTML页面吗?</a>
<% end if
if Request("action")="makeall" then
%>
<table cellspacing="1" cellpadding="3" width="99%" class="table1" bgcolor="#0099CF" align="CENTER" >
<tr bgcolor="#0099CF">
<td height="25" class="title"><b>分类名称(所在目录)(更新数据)</b></td>
<td class="title"><b>更新日期</b></td>
<td class="title"><b>操作提示</b></td>
</tr>
<%
newsday=""&year(date())&"年"&month(date())&"月"&day(date())&"日"
set rs0000=server.createobject("adodb.recordset")
sql0000="select sortid,sort,reid,bigid,sml,ymgjc from happywz_SORT where reid=0 order by -sortid desc"
rs0000.open sql0000,conn,1,1
do while not rs0000.eof
sml=rs0000("sml")
ymgjc=rs0000("ymgjc")
sql="select * from happywz_SORT where bigid="&cint(rs0000("bigid"))&" order by sortstep,orders"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.eof then
Response.Write("<tr bgcolor=""#B0CBE6"">")
Response.Write("<td colspan=""6"" height=""50"">目前还没有分类,请<a href=""admin_class_edit.asp?a=add"">添加一个分类</a></td>")
Response.Write("</tr>")
end if
do while not rs.eof %>
<tr bgcolor="#ffffff">
<td height="22" width="40%" >
<%
dim sortitle1,sortitle,sortstep
if rs("reid")="0" then
sortitle1=" >> "&rs("sort")
sortitle=""
classlink1=" >> <a href="&sml&".htm class=title>"&rs("sort")&"</a>"
classlink=""
Response.write sortitle1
sortstep=rs("sortstep")
titlename=sortitle1
classname=classlink1
else
if rs("sortstep")=sortstep then
sortitle=sortitle1&" >> "&rs("sort")
classlink=classlink1&" >> <a href="&sml&".htm class=title>"&rs("sort")&"</a>"
else
sortitle=sortitle1&""&sortitle&" >> "&rs("sort")
classlink=classlink1&""&classlink&" >> <a href="&sml&rs("sortid")&".htm class=title>"&rs("sort")&"</a>"
end if
Response.write sortitle
sortstep=rs("sortstep")
titlename=sortitle
classname=classlink
end if
%>
<font color="#666666">(<%=rs("sml")%>)(</font><font color="#FF0000"><b><%=rs("sjsum")%></b></font>)</td>
<td><%=newsday%></td>
<% '--------写出下级分类列表
set rs_0001=server.createobject("adodb.recordset")
sqls_0001="select sortid,sort,reid from happywz_SORT where reid= " &rs("sortid")
rs_0001.open sqls_0001,conn,1,1
do while not rs_0001.eof
classlist=classlist&"<b> <A HREF="&sml&rs_0001("sortid")&".htm>"&rs_0001("sort")&"</a></b> |"
rs_0001.movenext
if rs_0001.eof then exit do
loop
rs_0001.close
set rs_0001=nothing
if classlist<>"" then classlist=left(classlist,len(classlist)-1)
'response.write classlist
'----完成%>
<%
'-----------生成数据列表
urllist="<table width='100%' cellpadding='4' cellspacing='0' bordercolorlight='#CAE9FF' bordercolordark='#FFFFFF' border='1' align='center'><tbody>"
set rs_url=server.createobject("adodb.recordset")
sql_url="select wwwid,wwwurl,wwwweb,addtime,isok,hits from happywz_WEB where wwwsort='"&rs("sort")&"' order by addtime desc"
rs_url.open sql_url,conn,1,1
jishu=1
while not rs_url.eof
if rs_url("addtime")>Now()-7 then
xin="<FONT COLOR=#FF0000>[新]</FONT>"
else
xin=""
end if
if rs_url("isok")=true then
jian="<FONT COLOR=#FF0000>√</FONT>"
else
jian=""
end if
if jishu=1 or jishu mod 4 = 1 then
urllist=urllist&"<TR><TD WIDTH='25%' "&webxs20gg&"><a href='../error.asp?id="&rs_url("wwwid")&"' title='网址报错' target=_blank>◇</a><A HREF='"&rs_url("wwwurl")&"' TARGET=_blank>"&rs_url("wwwweb")&"</A>"&xin&" "&jian&"<a href=http://www.baidu.com/baidu?tn=xs20&word="&rs_url("wwwweb")&" title='更多关于"&rs_url("wwwweb")&"的网站' target=_blank>☆</a></TD>"
else
urllist=urllist&"<TD WIDTH='25%' "&webxs20gg&"><a href='../error.asp?id="&rs_url("wwwid")&"' title='网址报错' target=_blank>◇</a><A HREF='"&rs_url("wwwurl")&"' TARGET=_blank>"&rs_url("wwwweb")&"</A>"&xin&" "&jian&"<a href=http://www.baidu.com/baidu?tn=xs20&word="&rs_url("wwwweb")&" title='更多关于"&rs_url("wwwweb")&"的网站' target=_blank>☆</a></TD>"
end if
if jishu mod 4=0 then urllist=urllist&"</tr>"
jishu=jishu+1
rs_url.movenext
wend
rs_url.close
set rs_url=nothing
urllist=urllist&"<tr align=center><td colspan=4 "&webxs20gg&"><b><a href=http://www.baidu.com/baidu?tn=xs20&word="&rs("sort")&" target=_blank>请点击访问:更多关于"&rs("sort")&"的网址</a></b></td></tr></TBODY></TABLE>"
'-----------数据列表完成
'response.write urllist
menu="| "
set rs_u=server.createobject("adodb.recordset")
sql_u="select title,url from happywz_URL where space=5 order by id"
rs_u.open sql_u,conn,1,1
while not rs_u.eof
menu=menu+"<a class='Channel' href='"&rs_u("url")&"' target='_blank'>"&rs_u("title")&"</a> | "
rs_u.movenext
wend
rs_u.close
set rs_u=nothing
'读出模版文件
set rs_2 = server.CreateObject ("Adodb.recordset")
sql_2="select * from happywz_DEMO where ifuse=1 and demoid="&cint(rs("demoid"))
rs_2.open sql_2,conn,1,1
if rs_2.eof then
errmsg=errmsg+"<br>"+"<li>该分类模版未绑定!!</a>!"
call diserror()
response.end
end if
okfile=rs_2("demohtml")
rs_2.close
set rs_2=nothing
wzdl="../addurl.asp?sort="&rs("sort")
ymgjc=rs("ymgjc")
sortkk=""
set rs_u=server.createobject("adodb.recordset")
sql_u="select sort,sml from happywz_SORT where sortstep=0"
rs_u.open sql_u,conn,1,1
jishu=1
while not rs_u.eof
if jishu=1 or jishu mod 2 = 1 then
sortkk=sortkk+"<TR bgColor=#ffffff><TD align=center "&webxs20gg&"><a href='../html/"&rs_u("sml")&".htm' title='"&rs_u("sort")&"'>"&rs_u("sort")&"</a></TD>"
else
sortkk=sortkk+"<TD align=center "&webxs20gg&"><a href='../html/"&rs_u("sml")&".htm' title='"&rs_u("sort")&"'>"&rs_u("sort")&"</a></TD></tr>"
end if
jishu=jishu+1
rs_u.movenext
wend
rs_u.close
set rs_u=nothing
sort1=rs("sort")
'---------替换模板数据
okfile = replace(okfile,"#classname#",classname)
okfile = replace(okfile,"#wangzhandenglu#",wzdl)
okfile = replace(okfile,"#newsday#",newsday)
okfile = replace(okfile,"#classlist#",classlist)
okfile = replace(okfile,"#urllist#",urllist)
okfile = replace(okfile,"#gjc#",ymgjc)
okfile = replace(okfile,"#titlename#",titlename)
okfile = replace(okfile,"#url#",weburl)
okfile = replace(okfile,"#email#",webemail)
okfile = replace(okfile,"#webtitle#",webtitle)
okfile = replace(okfile,"#webstat#",webstat)
okfile = replace(okfile,"#memo#",webdescription)
okfile = replace(okfile,"#logo2#",weblogo2)
okfile = replace(okfile,"#keywords#",webkeywords)
okfile = replace(okfile,"#menu#",menu)
okfile = replace(okfile,"#gao#",webgao)
okfile = replace(okfile,"#sortkk#",sortkk)
okfile = replace(okfile,"#sort1#",sort1)
'----定义目录文件夹和分类文件名称
dim fpath
dim filename
fpath="../html"
'----生成分类文件名称
if rs("sortstep")=0 then
filename=sml&".htm"
else
filename=sml&rs("sortid")&".htm"
end if
Set fso = Server.CreateObject(""&fsoset&"")
Set fout = fso.Createtextfile(server.mappath(fpath&"/"&filename),true)
fout.writeline okfile
fout.close
%>
<td><font color="#0000FF">更新完成</font> <a href="<%response.write fpath&"\"&filename%>" target="_blank"><font color="#FF0000">点击查看生成文件</font></a></td>
</tr>
<%
rs.movenext
urllist=""
classlist=""
loop
rs.close
set rs=nothing
rs0000.movenext
if rs0000.eof or rs0000.bof then exit do
loop
rs0000.close
set rs0000=nothing
conn.close
set conn=nothing
end if%>
</table>
<BR>
<BR>
<TABLE WIDTH="99%" BORDER="0" CELLPADDING="2" CELLSPACING="1" BGCOLOR="#0099CF" ALIGN="CENTER" >
<TR BGCOLOR="#0099CF">
<TD HEIGHT="22"
COLSPAN="2" ALIGN="center"><B>操作说明</B></TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD WIDTH="87" HEIGHT="30"><B>操作说明:</B></TD>
<TD
HEIGHT="30">
<LI>此功能非常消耗服务器资源!请甚用!
</TD>
</TR>
</TABLE>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -