sessione.asp
richiamato dal file default.aspcodice:<% dim percorso dim fsoMyFile Set fsoMyFile = CreateObject("Scripting.FileSystemObject") percorso = session("sssUtente")&".asp" dim file1,file2,file3,file Set file1 = CreateObject("Scripting.FileSystemObject") Set file2 = file1.GetFolder(server.mappath("../public/"&session("sssUtente"))) Set file3 = file2.Files For Each file in file3 if file.name <> percorso then dim fso set fso = createobject("Scripting.fileSystemObject") fso.DeleteFile(Server.MapPath("../public/"& session("sssUtente")&"/"&file.name)) end if next response.redirect("../password/password.asp") %>
il problema è che lentissimo oppure non carica proprio come "incastrato!". Secondo voi dipende dal codice "MALSANO" oppure da un collegamento sbagliato? grazie, ciao!codice:<% Option Explicit On Error resume Next dim utente utente = "" dim password password = "" if Session ("sssUtente") = utente or Session("sssPassword") = password then response.redirect("password.asp?errore=1") end if dim carica if carica="1" then response.redirect (session("sssUtente")&"/"&session("sssUtente")&".asp") end if dim x x=0 dim fso set fso = createobject("Scripting.fileSystemObject") %> <div align = "center"> <u> <% response.write ("SPAZIO RISERVATO A: ") %> </u> <% response.write (session("sssUtente")) %> </div> <html> <div align="center" style="font-weight:bold"> Elenco files:<hr> <p align="left"> <% dim percorso dim fsoMyFile Set fsoMyFile = CreateObject("Scripting.FileSystemObject") percorso = session("sssUtente")&".asp" dim file1,file2,file3,file Set file1 = CreateObject("Scripting.FileSystemObject") Set file2 = file1.GetFolder(server.mappath("/mdb-database/"&session("sssUtente"))) Set file3 = file2.Files For Each file in file3 if file.name <> percorso then session("file")=file.name x=x+1 fsomyfile.copyfile server.mappath("/mdb-database/"&session("sssUtente")&file.name), server.mappath("/public/"&session("sssUtente")&file.name),true %> <div align="center"><valign="center"> <table border="1" cellpadding="5"> <tr><td width="200" bgcolor="yellow" link="blue" vlink="red" color="blue" align="center" valign="middle"> <p style="blue"> <%response.write "" & file.name & "" %></td>    <td> <input type="submit" value="Elimina" onclick=window.location.href="../elimina.asp"></p> </valign></td></tr></table> </div> <% end if next if x=0 then %> <div align="center"> [/b] <p style="color: red"> Non ci sono file </color> </div> <% end if %> </p> <hr> </div> <div align="center"> <input type="submit" value="Inserisci documento" onclick="funzione1()"> </div> <% if request.querystring("pass")<>"1" then %> <form name="Frmcambio_Password" method= "post" action="cambio_password.asp" > </p> <p align="center"> <input type="button" value="chiudi sessione ed esci" name="pulsante2"onclick="location.href='../../password/sessione.asp'" <input type="button" value="Modifica password" name="Pulsante" onClick="window.location.href='../../password/cambio_password.asp'"></p> </form> <head> <% end if %> <script> function funzione1() { alert("Da qui si possono trasferire file su server... Attenzione si possono verificare malfunzionamenti con i file asp"); window.location.href="../../password/upload.asp?conferma=true" } </script> <% if err.Number <> 0 then response.write("Probabile errore o malfunzionamento, verificare sul server!") end if %> <script> alert('Importante: prima di uscire fare "chiudi sessione"'); </script> </head> </html>

Rispondi quotando
