Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it L'avatar di diegoctn
    Registrato dal
    May 2001
    Messaggi
    2,118

    Visualizzare chi e quanto scarica un file.

    Ragazzi un consiglio: ho una serie di circolari da far vedere. Vorrei che la schermata fosse visualizzata per data decrescente ( e sto convertendo il tutto dall'utilizzo dello script.object al db access). Farò una tabella che visualizza i collegamenti. Vorrei anche avere la possibilità di visualizzare quanto volte è stata scaricata la circolare e da chi. Cosa fareste voi?

  2. #2
    Utente di HTML.it L'avatar di viki1967
    Registrato dal
    Feb 2003
    Messaggi
    1,757

    Re: Visualizzare chi e quanto scarica un file.

    Originariamente inviato da diegoctn
    Ragazzi un consiglio: ho una serie di circolari da far vedere. Vorrei che la schermata fosse visualizzata per data decrescente ( e sto convertendo il tutto dall'utilizzo dello script.object al db access). Farò una tabella che visualizza i collegamenti. Vorrei anche avere la possibilità di visualizzare quanto volte è stata scaricata la circolare e da chi. Cosa fareste voi?
    Per sapere quante volte è stato scaricato un determinato file potresti utilizzare questo script http://www.webmasterpoint.org/asp/sc...download&pag=2

    poi creati un dbase e registra l'ip utente.

  3. #3
    Utente di HTML.it L'avatar di viki1967
    Registrato dal
    Feb 2003
    Messaggi
    1,757
    download.asp:
    codice:
    <%
    Dim Path
    'Percorso del database
    Path="mdb-database/"
    %>
    <script language="JavaScript1.2">
    { 
    function download(loc) {    
    
             window.open(loc,'Video','width=400,height=100');    
    
    }
    }
    </script>
    <%
    Dim ConnDown
    Set ConnDown=Server.CreateObject("ADODB.Connection")
    ConnDown.Open "driver={Microsoft Access Driver (*.mdb)};dbq="& server.MapPath(path&"download.mdb")
    Dim SQLDown,RECDown
    SQLDown="select * from DOWNLOAD order by NOME"
    Set RECDown=ConnDown.Execute(SQLDown)%>
    <table width="400" border="0" cellspacing="0" cellpadding="3">
      <%
    While Not RECDown.EOF
    %>
      <tr> 
        <td width="279">&path=<%=path%>');"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=RECDown("NOME")%></font></td>
        <td width="121"> 
          <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=RECDown("HIT")%></font></div>
        </td>
      </tr>
      <%
    RECDown.MoveNext
    WEnd
    RECDown.Close
    ConnDown.Close
    Set RECDown = Nothing
    Set ConnDown = Nothing
    %>
    popdowm.asp:
    codice:
    <%
    Dim CODown,path
    CODown = Request.Querystring("cod")
    path = Request.Querystring("path")
    
    Dim ConnDown
    Set ConnDown=Server.CreateObject("ADODB.Connection")
    ConnDown.Open "driver={Microsoft Access Driver (*.mdb)};dbq="& server.MapPath(path&"download.mdb")
    Dim SQLDown,RECDown,cont
    SQLDown="select * from DOWNLOAD where COD="&CODown
    Set RECDown=ConnDown.Execute(SQLDown)
    cont=RECDown("HIT")
    cont=cont+1
    SQLDown="update DOWNLOAD set HIT="&cont&" where COD="&CODown
    ConnDown.Execute(SQLDown)
    %>
    <html>
    <head>
    <title>Download</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Refresh" content="5; url=<%=RECDown("FILE")%>">
    </head>
    
    <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <table width="400" border="0" cellspacing="0" cellpadding="3" height="100">
      <tr> 
        <td>
          <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DOWNLOAD</font></div>
        </td>
      </tr>
      <tr> 
        <td>
          <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Il 
            download inizier&agrave; tra pochi secondi, se hai problemi
    
            e non inizia ">clicca qui</font></div>
        </td>
      </tr>
      <%
    RECDown.Close
    ConnDown.Close
    Set RECDown=Nothing
    Set ConnDown=Nothing
    %>
    </body>
    </html>
    ti manca solo il dbase.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.