用ASP实现网站的“目录树”管理

别整些没用的1

别整些没用的1

2016-01-29 19:56

用ASP实现网站的“目录树”管理,用ASP实现网站的“目录树”管理

数据库结构(共使用了两个表)

1.tblCategory
字段名 类型
Root binary 说明树关或开(目录的根)
ID 自动编号 关键字
Sort integer 识别该字段内容的整数(如果root是开状态sort为0)表示显示的目录的顺序
Name text(255)可以包含html中的标识符
HREF text(255) 允许空

2.tblPages
ID 自动编号
Sort integer 关键字
Name text(255)
HREF text(255)

3.default.htm
[email protected]

;
[email protected]

;
[email protected]

;JavaScript/" target="_blank"JavaScript Tree Control [email protected]

;
[email protected]

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/asp/)

;
〈frameset cols="210,*"[email protected]

;
?〈frame src="m/attachment/portal" name="TOC"[email protected]

;
?〈frame src="/attachment/portal" name="basefrm"[email protected]

;
[email protected]

;
[email protected]

;

4.main.htm
[email protected]

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/asp/)

;[email protected]

;[email protected]

;[email protected]

;
[email protected]

;
[email protected]

;Start [email protected]

;
[email protected]

;
[email protected]

;

5.tree.asp
Set conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
conn.open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("toc.mdb")

strsql = "SELECT tblCategory.Root, tblCategory.[ID], tblCategory.Sort AS CatSort, tblPages.sort AS LinkSort, tblCategory.[Name] AS CatName, tblCategory.HREF AS CatURL, tblPages.[Name] AS LinkName, tblPages.href AS LinkURL FROM tblCategory LEFT JOIN tblPages ON tblCategory.[ID] = tblPages.[ID] ORDER BY tblCategory.root ASC, tblCategory.Sort, tblPages.sort"

rs.open strsql, conn, 2, 2

if not rs.eof then rs.movefirst
currentID = "" [email protected]

;
[email protected]

;
[email protected]

;
〈link rel="stylesheet" href="ftie4style.css"[email protected]

;
〈!-- Infrastructure code for the tree [email protected]

;
〈script src="http:///attachment/portal"[email protected]

;[email protected]

;
〈!-- Execution of the code that actually builds the specific tree [email protected]

;
[email protected]

;
USETEXTLINKS = 1
〈%
D hile Not Rs.EOF
If Rs("Root") = True Then [email protected]

;
foldersTree = gFld("〈%= Rs("CatName") [email protected]

;", "〈%= Rs("CatURL") [email protected]

;")
〈% Else [email protected]

;
aux1 = insFld(foldersTree, gFld("〈%= Rs("CatName") [email protected]

;", "〈%= Rs("CatURL") [email protected]

;"))
〈% currentID = Rs("ID")
savedID = Rs("ID")
Do While currentID = savedID and not rs.eof
if Rs("LinkName") [email protected]

; "" Then [email protected]

;
insDoc(aux1, gLnk(0, "〈%= Rs("LinkName") [email protected]

;", "〈%= Rs("LinkURL") [email protected]

;"))
〈%
end if
Rs.MoveNext
if not rs.eof then currentID = Rs("ID")
Loop
End If
if currentID = "" then rs.movenext
Loop [email protected]

;
[email protected]

;
[email protected]

;
initializeDocument()
[email protected]

;
〈base target="basefrm"[email protected]

;
[email protected]

;[email protected]

;
[email protected]

;
〈body bgcolor="white"[email protected]

;
[email protected]

;
[email protected]

;

展开更多 50%)
分享

猜你喜欢

用ASP实现网站的“目录树”管理

ASP
用ASP实现网站的“目录树”管理

ASP+ACCESS实现的无限级目录树

ASP
ASP+ACCESS实现的无限级目录树

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

用ASP实现自动建站.实现虚拟二级目录

ASP
用ASP实现自动建站.实现虚拟二级目录

Linux管理员手册(2)--目录树概述

Linux Linux命令 Linux安装 Linux编程 Linux桌面 Linux软件 Linux内核 Linux管理
Linux管理员手册(2)--目录树概述

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

用ASP实现网页BBS

ASP
用ASP实现网页BBS

用ASP实现电子贺卡

ASP
用ASP实现电子贺卡

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

ASP:Hack & Anti-Hack

ASP:Hack & Anti-Hack

ASP:网上通讯簿1.00

ASP:网上通讯簿1.00
下拉加载更多内容 ↓