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

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

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

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

    無需數據庫循環的無級分類代碼

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

    領測軟件測試網 <%@LANGUAGE="VBSCRIPT"%>
    <!--數據庫
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Cat]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[Cat]
    GO

    CREATE TABLE [dbo].[Cat] (
    [Cat_Id] [int] IDENTITY (1, 1) NOT NULL ,
    [Cat_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
    [Cat_Parent] [int] NULL
    ) ON [PRIMARY]
    GO
    -->
    <%
    MM_v2boy_STRING = "Driver={Microsoft Access Driver (*.mdb)};DBQ=d:\v2boy.mdb"
    Dim rsCat__MMColParam
    rsCat__MMColParam = "1"
    if (Request.QueryString("Cat_Parent") <> "") then rsCat__MMColParam = Request.QueryString("Cat_Parent")(1)
    'response.write request.querystring & "<hr>" & rsCat__MMColParam
    'response.end
    %>
    <%
    set rsCat = Server.CreateObject("ADODB.Recordset")
    rsCat.ActiveConnection = MM_v2boy_STRING
    rsCat.Source = "SELECT Cat_Id, Cat_Name, Cat_Parent FROM Cat WHERE Cat_Parent = " + Replace(rsCat__MMColParam, "'", "''") + ""
    rsCat.CursorType = 0
    rsCat.CursorLocation = 2
    rsCat.LockType = 3
    rsCat.Open()
    rsCat_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Repeat1__numRows = -1
    Dim Repeat1__index
    Repeat1__index = 0
    rsCat_numRows = rsCat_numRows + Repeat1__numRows
    %>
    <html>
    <head>
    <title>Î&Auml;µµ×ÊÁÏ</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <%
    dim request_all
    IF request.querystring <> "" then request_all = "&" & request.querystring
    %>
    <table width="100%" border="0" cellspacing="1" cellpadding="4">
    <tr>
    <td><a href="data.asp">Îĵµ×ÊÁÏ</a>
    <%
    dim i,j,h
    j = Request.QueryString("Cat_Parent").Count
    For i = 1 to j
    'For i = j to 1 step -1
    response.write "<a href=data.asp?"
    for h = (j - i + 1) to j
    'for h = j to (j - i + 1) step -1
    Response.Write "Cat_Parent=" & Request.QueryString("Cat_Parent")(h) & "&Cat_Name=" & Request.QueryString("Cat_Name")(h)
    if h <> j then
    response.write("&")
    end if
    Next
    'response.write "<br>"
    response.write ">" & Request.QueryString("Cat_Name")(j-i+1) & "</a> "
    Next

    response.write "<br>"

    While ((Repeat1__numRows <> 0) AND (NOT rsCat.EOF))
    %>
    <% If Not rsCat.EOF Or Not rsCat.BOF Then %>
    <a href="data.asp?Cat_Parent=<%=(rsCat.Fields.Item("Cat_Id").Value)%>&Cat_Name=<%=(rsCat.Fields.Item("Cat_Name").Value)%><%=request_all%>"><%=(rsCat.Fields.Item("Cat_Name").Value)%></a>
    <% End If ' end Not rsCat.EOF Or NOT rsCat.BOF %>
    <%
    Repeat1__index=Repeat1__index+1
    Repeat1__numRows=Repeat1__numRows-1
    rsCat.MoveNext()
    Wend
    %>
    </td>
    </tr>
    </table>
    </body>
    </html>
    <%
    rsCat.Close()
    %>


    文章來源于領測軟件測試網 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>