?? makeallclass.asp
字號:
<!--#include file="../../conn/conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>生成網站行業分類JS文件</title>
</head>
<body>
<%
if Request.Cookies("globalec")("globalecmaster")="" or Request.Cookies("globalec")("masterflag")="" then
response.write "<script language='javascript'>"
response.write"this.location.href='../login.asp';</SCRIPT>"
response.end
end if
if instr(Request.Cookies("globalec")("masterflag"),"92")=0 then
response.redirect "../err.asp"
response.end
end if
Dim classall
set rs=conn.execute("select * from class_1")
do while not rs.eof
classall = classall & "cur = new Category('"&rs("sortid")&"','"&rs("sort")&"');"&vbCrlf
classall = classall & ""&vbCrlf
classall = classall & "catArr = catArr.concat(cur);"&vbCrlf
classall = classall & ""&vbCrlf
set rs3=conn.execute("select * from class_2 where sortid="&rs("sortid")&"")
do while not rs3.eof
set rs4=conn.execute("select * from class_3 where typeid="&rs3("typeid")&"")
if rs4.eof then
classall = classall & "cur.addBoard(new Board('"&rs("sortid")&"','"&rs3("typeid")&",0','"&rs3("typename")&"'))"&vbCrlf
classall = classall & ""&vbCrlf
else
do while not rs4.eof
classall = classall & "cur.addBoard(new Board('"&rs("sortid")&"','"&rs3("typeid")&","&rs4("typeid_2")&"','"&rs3("typename")&"/"&rs4("typename_2")&"'))"&vbCrlf
classall = classall & ""&vbCrlf
rs4.movenext
loop
rs4.close
set rs4=nothing
end if
rs3.movenext
loop
rs3.close
set rs3=nothing
rs.movenext
loop
rs.close
set rs=nothing
filename="/js/allCategorys.js"
set fso = Server.CreateObject("Scripting.FileSystemObject")
set fout = fso.CreateTextFile(server.mappath(""&filename&""))
fout.write classall
fout.close
set fout=nothing
set fso=nothing
response.write"<SCRIPT language=JavaScript>alert('生成行業分類JS成功!');"
response.write"javascript:history.back(-1)</SCRIPT>"
response.end
%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -