濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > 使用ASP實(shí)現(xiàn)網(wǎng)站的“目錄樹(shù)”管理的代碼

使用ASP實(shí)現(xiàn)網(wǎng)站的“目錄樹(shù)”管理的代碼

熱門(mén)標(biāo)簽:福建外呼增值業(yè)務(wù)線路 宜賓語(yǔ)音外呼系統(tǒng)軟件 電銷(xiāo)機(jī)器人源碼網(wǎng)盤(pán)下載 綿陽(yáng)防封電銷(xiāo)卡價(jià)格 調(diào)度系統(tǒng)外呼 中國(guó)辦理電信400電話 伊春外呼業(yè)務(wù)系統(tǒng) 電銷(xiāo)機(jī)器人教育 河北智能外呼系統(tǒng)軟件
使用ASP實(shí)現(xiàn)網(wǎng)站的目錄樹(shù)

數(shù)據(jù)庫(kù)結(jié)構(gòu)(共使用了兩個(gè)表)
1。tblCategory
字段名  類(lèi)型  
Root   binary   說(shuō)明樹(shù)關(guān)或開(kāi)(目錄的根)
ID     自動(dòng)編號(hào) 關(guān)鍵字
Sort   integer  識(shí)別該字段內(nèi)容的整數(shù)(如果root是開(kāi)狀態(tài)sort為0)表示顯示的目錄的順序
Name   text(255)可以包含html中的標(biāo)識(shí)符
HREF   text(255) 允許空

2。tblPages
ID   自動(dòng)編號(hào)
Sort  integer 關(guān)鍵字
Name  text(255)
HREF  text(255)

3.default.htm
html>
head>
title>javascript Tree Control Template/title>
/head>
frameset cols=""210,*"">
?frame src=""tree.asp"" name=""TOC"">
?frame src=""main.htm"" name=""basefrm"">
/frameset>
/html>

4.main.htm
head>title>/title>/head>
body>
h2>Start Page/h2>
/body>
/html>

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 = """" %>
html>
head>
link rel=""stylesheet"" href=""ftie4style.css"">
!-- Infrastructure code for the tree -->
script src=""ftiens4.js"">/script>
!-- Execution of the code that actually builds the specific tree -->
script>
USETEXTLINKS = 1
%
    Do While Not Rs.EOF
       If Rs(""Root"") = True Then %>
            foldersTree = gFld(""%= Rs(""CatName"") %>"", ""%= Rs(""CatURL"") %>"")
    % Else %>
            aux1 = insFld(foldersTree, gFld(""%= Rs(""CatName"") %>"", ""%= Rs(""CatURL"") %>""))
    % currentID = Rs(""ID"")
            savedID = Rs(""ID"")
            Do While currentID = savedID and not rs.eof
                if Rs(""LinkName"") > """" Then %>
                    insDoc(aux1, gLnk(0, ""%= Rs(""LinkName"") %>"", ""%= Rs(""LinkURL"") %>""))
                    %
                end if
                Rs.MoveNext
                if not rs.eof then currentID = Rs(""ID"")
             Loop
         End If
        if currentID = """" then rs.movenext
    Loop %>
/script>
script>
initializeDocument()
/script>
base target=""basefrm"">
title>/title>
/head>
body bgcolor=""white"">
/body>
/html>

 


標(biāo)簽:那曲 電商邀評(píng) 銅川 新鄉(xiāng) 河池 優(yōu)質(zhì)小號(hào) 延邊 蘇州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《使用ASP實(shí)現(xiàn)網(wǎng)站的“目錄樹(shù)”管理的代碼》,本文關(guān)鍵詞  使用,ASP,實(shí)現(xiàn),網(wǎng),站的,目錄樹(shù),;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《使用ASP實(shí)現(xiàn)網(wǎng)站的“目錄樹(shù)”管理的代碼》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于使用ASP實(shí)現(xiàn)網(wǎng)站的“目錄樹(shù)”管理的代碼的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    中牟县| 唐河县| 甘孜| 巫山县| 定远县| 林甸县| 临泉县| 门源| 陆河县| 探索| 仙游县| 保靖县| 大城县| 雅安市| 黄陵县| 长子县| 定结县| 宣武区| 获嘉县| 胶南市| 吉木萨尔县| 达尔| 大英县| 邵东县| 瑞昌市| 朔州市| 凌源市| 扬州市| 来安县| 上高县| 平江县| 嘉禾县| 阿城市| 武城县| 富宁县| 基隆市| 延边| 盐城市| 舒兰市| 两当县| 类乌齐县|