• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
    • 軟件測試技術
    • 軟件測試博客
    • 軟件測試視頻
    • 開源軟件測試技術
    • 軟件測試論壇
    • 軟件測試沙龍
    • 軟件測試資料下載
    • 軟件測試雜志
    • 軟件測試人才招聘
      暫時沒有公告

    字號: | 推薦給好友 上一篇 | 下一篇

    用ASP實現網站的“目錄樹”管理

    發布: 2007-7-14 19:37 | 作者: 佚名    | 來源: 網絡轉載     | 查看: 10次 | 進入軟件測試論壇討論

    領測軟件測試網

    數據庫結構(共使用了兩個表)

    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
    〈html$#@62;
    〈head$#@62;
    〈title$#@62;JavaScript/" target="_blank">JavaScript Tree Control Template〈/title$#@62;
    〈/head$#@62;
    〈frameset cols="210,*"$#@62;
    ?〈frame src="tree.asp" name="TOC"$#@62;
    ?〈frame src="main.htm" name="basefrm"$#@62;
    〈/frameset$#@62;
    〈/html$#@62;

    4.main.htm
    〈head$#@62;〈title$#@62;〈/title$#@62;〈/head$#@62;
    〈body$#@62;
    〈h2$#@62;Start Page〈/h2$#@62;
    〈/body$#@62;
    〈/html$#@62;

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


    延伸閱讀

    文章來源于領測軟件測試網 http://www.kjueaiud.com/


    關于領測軟件測試網 | 領測軟件測試網合作伙伴 | 廣告服務 | 投稿指南 | 聯系我們 | 網站地圖 | 友情鏈接
    版權所有(C) 2003-2010 TestAge(領測軟件測試網)|領測國際科技(北京)有限公司|軟件測試工程師培訓網 All Rights Reserved
    北京市海淀區中關村南大街9號北京理工科技大廈1402室 京ICP備10010545號-5
    技術支持和業務聯系:info@testage.com.cn 電話:010-51297073

    軟件測試 | 領測國際ISTQBISTQB官網TMMiTMMi認證國際軟件測試工程師認證領測軟件測試網

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>