Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
  1. La community italiana di SEO, marketing digitale e AI
  2. Categorie
  3. Coding e Sistemistica
  4. Coding
  5. Aiuto su questo script!

Aiuto su questo script!

Pianificato Fissato Bloccato Spostato Coding
2 Post 1 Autori 1.2k Visualizzazioni 1 Seguito
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • D
    D
    djjunior
    scritto su ultima modifica di
    User 0
    #1
    Aiuto su questo script!

    Carissimi
    utilizzo questo script come file manager, ma c'è una limitazione, al di sotto di 2 sottocartelle non mi fa visionare le altre cartelle, come correggerlo per far visionare tutte le sottocartelle?
    Per favore aiutatemi sono alle prime armi dell'asp.
    Grazie 1000
    G.
    Lo script è composto da 2 pagine la default.asp che ha per inclusione treeviewfunctions.asp
    Ecco i codici:

    Pagina - default.asp

    <html>
    <head>
    <title>TreeView</title>
    <link rel=stylesheet href='treeview.css'></link>
    </head>
    </html>
     
    <script language=javascript src='treeview.js'></script>
    <!--#include file='treeviewFunctions.asp'-->
     
    <%
        set fso = CreateObject("Scripting.FileSystemObject")
     
        vDir = "/public/"
        root = Server.MapPath(vDir) & "\"
        set fold = fso.getFolder(root)
     
        ' we'll assume that the starting point is not empty
        ' (has at least one subfolder or one file)
     
        response.write getfoldlink("r0", "r0", fold, vDir)
        if fold.subfolders.count > 0 then
     
            ' counter
            r1c = 0
     
            'loop through all subfolders in starting folder
            for each f in fold.subfolders
     
                ' another counter
                r1c = r1c + 1
     
                ' concatenate local/relative path once            
                sfoldname = root & f.name & "\"
                fpath = vDir & f.name & "/"
     
                set cfold = fso.getFolder(sfoldname)
                if cfold.subfolders.count > 0 or cfold.files.count > 0 then
     
                    ' we need to make the folder a tree node
                    response.Write getfoldlink("r1" & r1c, "r1", cfold, fpath)
     
                    ' reset counter
                    r2c = 0
     
                    for each sf in cfold.subfolders
     
                        ' keep track to identify nodes by id
                        r2c = r2c + 1
     
                        ' concatenate local/relative path once            
                        sfoldname = root & f.name & "\" & sf.name & "\"
                        path = vDir & f.name & "/" & sf.name & "/"
     
                        ' build an identifier for this node
                        id = "r2" & r1c & "_" & r2c
     
                        set sfold = fso.getFolder(sfoldname)
                        if sfold.files.count > 0 then
     
                            ' we need to make the folder a tree node
                            response.Write getfoldlink(id, "r2", sfold, path)
                            for each fil in sfold.files
                                response.write getfilelink("r2a", path, fil)
                            next
                            response.Write "</div>"
                        else
     
                            ' this folder is not an expandable node
                            response.write getfoldlink("", "r2", sfold, path)
                        end if
                    next
                    for each fil in cfold.files
     
                        ' show each file in this subfolder
                        response.write getfilelink("r1a", fpath, fil)
                    next
                    response.Write "</div>"
                else
     
                    ' this folder is not an expandable node
                    response.Write getfoldlink("", "r1", cfold, fpath)
                end if
            next
        end if
        for each fil in fold.files
     
            ' show the files in the starting folder
            response.write getfilelink("r0a", vDir, fil)
        next
        response.Write "</div>"
     
        set fso = nothing
    %>
    

    Pagina: treeviewfunctions.asp

    function getfoldlink(d, c, f, p) 
    if d <> "" then 
     
    ' needs to be clickable 
    getfoldlink = "<a href='#' style='cursor:hand' " & _ 
    "onclick='flip(""" & d & """);" & _ 
    "this.blur();return false;'>" & _ 
    "<img id='i" & d & "' class=" & c & _ 
    " src=plus.gif vspace=0 hspace=2 border=0>" & _ 
    "<img src=folder.gif hspace=2 border=0></a>&nbsp;" & _ 
    "<a target=_blank href=" & p & getsftitle(f) & _ 
    ">" & f.name & "</a></div><div id='" & d & "'" & _ 
    " display=none style='display:none'>" 
    else 
     
    ' can't be clickable 
    getfoldlink = "<div><img id='i" & d & "' " & _ 
    "class=" & c & " src=plus.gif vspace=0 " & _ 
    "hspace=2 visibility=hidden style='visibility:hidden'><img" & _ 
    " src=folder.gif hspace=2>&nbsp;<a " & _ 
    "target=_blank href=" & p & getsftitle(f) & _ 
    ">" & f.name & "</a></div>" 
    end if 
    end function 
     
    function getfilelink(c, fold, file) 
    getfilelink = "<div><img class=" & c & " src=file.gif" & _ 
    " hspace=2>&nbsp;<a href=" & fold & file.name & _ 
    getfiletitle(file) & ">" & file.name & "</a></div>" 
    end function 
     
    function getfiletitle(file) 
    getfiletitle = " title='Size: " & _ 
    formatnumber(file.size/1024, 2, -1, 0, -1) & _ 
    " kb" & vbCrLf & getDL(file) & "'" 
    end function 
     
    function getsftitle(fold) 
    getsftitle = " title='" & getsfc(fold) & _ 
    vbCrLf & getfc(fold) & _ 
    vbCrLf & getfs(fold) & _ 
    vbCrLf & getDL(fold) & "'" 
    end function 
     
    function getDL(o) 
    d = o.dateLastModified 
    getDL = "Last mod: " & formatdatetime(d, 2) & _ 
    " " & formatdatetime(d, 3) 
    end function 
     
    function getfc(fold) 
    getfc = fCount(fold.files.count) 
    end function 
     
    function getsfc(fold) 
    getsfc = sfCount(fold.subfolders.count) 
    end function 
     
    function getfs(fold) 
    getfs = "Size: " & bToMB(fold.size) 
    end function 
     
    function bToMB(b) 
    bToMB = formatnumber(b/1024/1024, 2, -1, 0, -1) & " MB" 
    end function 
     
    function fCount(c) 
    fCount = formatnumber(c, 0, -1, 0, -1) & " file" & _ 
    suffix(c) 
    end function 
     
    function sfCount(c) 
    sfCount = formatnumber(c, 0, -1, 0, -1) & _ 
    " subfolder" & suffix(c) 
    end function 
     
    function suffix(c) 
    if c <> 1 then suffix = "s" 
    end function 
    %>
    
    1 Risposta Ultima Risposta
    Miglior risposta 0
    0
    • D
      D
      djjunior
      scritto su ultima modifica di
      User 0
      #2

      nessuno può aiutarmi?

      1 Risposta Ultima Risposta
      Miglior risposta 0
      0

      Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

      Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

      Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

      Registrati Accedi
      Rispondi
      • Risposta alla discussione
      Effettua l'accesso per rispondere
      • Da Vecchi a Nuovi
      • Da Nuovi a Vecchi
      • Più Voti


      • Accedi

      • Non hai un account? Registrati

      • Accedi o registrati per effettuare la ricerca.
      • Primo post
        Ultimo post
      Home Accedi Registrati
      Menu
      • CATEGORIES
      • La Community Connect.gt
      • Presentati alla Community
      • News Ufficiali da Connect.gt
      • Internet News
      • A Scuola Di
      • Digital Marketing
      • Intelligenza Artificiale
      • SEO & GEO
      • Web Marketing e Content
      • Google Analytics e Web Analytics
      • Google Ads & Advertising
      • YouTube
      • TikTok, Instagram e altri Social
      • Google Adsense, Affiliazioni e Guadagno
      • E-Commerce
      • Coding e Sistemistica
      • Help Center: consigli per il tuo progetto
      • Hosting e Cloud
      • Coding
      • CMS & Piattaforme Self-Hosted
      • Annunci e Collaborazioni
      • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
      • Collaborazioni WEB e Lavoro: offro e cerco
      • Impresa, Fisco e Leggi
      • Consulenza Legale e Professioni Web
      • Consulenza Fiscale, Imprese, Startup e P.Iva
      • Gli Off Topic
      • PC, Smartphone e altri Hardware
      • Tutti i Software
      • GT Fetish Cafè
      • Discussioni
      • Non letti 0
      • Recenti
      • Hashtag
      • Popolare
      • Utenti
      • Privacy
      • Termini e condizioni
      • © 2026 Search On Media Group S.r.l.