Forum AspNuke.it - Il tuo Portale OpenSource in ASP
Blocco Downloads solo ai registrati
Autore
Messaggio
rachidz
Eliminato
0 Discussione
12 aprile 2004 alle 13:48:42
Salve a tutti, come faccio a far scaricare dal blocco "Downloads" solo gli iscritti al sito? Grazie !
djveleno
Amministratore
Esperto
1025 Discussioni
12 aprile 2004 alle 21:41:40
Puoi usare il mod accesso ristretto, che ti permette di consentire l'accesso ad una risorsa solo a chi si è iscritto (anche se, io personalmente non lo ritengo giusto ). Ciauzz DJ
--------------- A lavare la testa ai somari, ci si rimette l'acqua e il sapone!http://aspnuke208.somee.com/Default.asp
excess
Eliminato
0 Discussione
13 aprile 2004 alle 20:49:06
ciao... se ti riferisci al blocco laterale come quello presente in questo sito puoi fare una cosa del genere, nel file downloads-inc.asp scrivi questa sub:Sub DisplayModDownloads(iTop, sTypeSort) Dim oCn, oRs, rSQL, iLine Set oCn = DBConnexion(DB_MAIN) rSQL = "SELECT TOP " & iTop & " * FROM downloads WHERE dValid=1" Select Case sTypeSort Case "date" rSQL = rSQL & " ORDER BY dDate DESC, dTitle" Case "hits" rSQL = rSQL & " ORDER BY dHits DESC, dTitle" End Select CreateTopTable "ModDownloads", GetTranslation("LANG_DOWNLOADS") Set oRs = DBRecordSet(oCn, rSQL) If Not oRs.EOF Then Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF Response.Write " <tr class=""tablelinemain"">" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_TITLE") & "</td>" & vbCRLF If sTypeSort = "hits" Then Response.Write " <td width=""80"" align=""center"">" & GetTranslation("LANG_HITS") & "</td>" & vbCRLF Else Response.Write " <td width=""80"" align=""center"">" & GetTranslation("LANG_DATE") & "</td>" & vbCRLF End If Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF iLine = 1 if sPseudo <>"" then While Not oRs.EOF Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF Response.Write " <td><a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_DOWNLOAD_PAGE & "?dl=" & oRs("dID") & """ target=""_blank"">" & Server.HTMLEncode(oRs("dTitle")) & "</a> <span class=""small""><a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_DOWNLOADS_PAGE & "?id=" & oRs("dID") & """>" & GetTranslation("LANG_MORE_INFORMATION") & "</a></span></td>" & vbCRLF If sTypeSort = "hits" Then Response.Write " <td align=""center"">" & oRs("dHits") & "</td>" & vbCRLF Else Response.Write " <td align=""center"">" & GetDateDDMMYYYY(StringToDate(oRs("dDate"))) & "</td>" & vbCRLF End If Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF iLine = 1 + ((iLine-1) XOR 1) oRs.MoveNext WEnd else While Not oRs.EOF Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF 'Response.Write " <td>" & Server.HTMLEncode(oRs("dTitle")) & "<span class=""small"">" & "</span></td>" & vbCRLF Response.Write " <td><a href=""" & GLOBAL_SITE_PATH & "authent.asp" & """>" & Server.HTMLEncode(oRs("dTitle")) & "</a> <span class=""small"">" & "</span></td>" & vbCRLF If sTypeSort = "hits" Then Response.Write " <td align=""center"">" & oRs("dHits") & "</td>" & vbCRLF Else Response.Write " <td align=""center"">" & GetDateDDMMYYYY(StringToDate(oRs("dDate"))) & "</td>" & vbCRLF End If Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF iLine = 1 + ((iLine-1) XOR 1) oRs.MoveNext WEnd end if Response.Write "</table>" & vbCRLF Else Response.Write GetTranslation("LANG_EMPTY_SECTION") & vbCRLF End If CreateBottomTable "" oCn.Close Set oCn = Nothing Set oRs = Nothing End Sub e nel file block-inc.asp metti questo: case N : DisplayModDownloads 5,"date" 'GLOBAL_DOWNLOADS_TOP dove N sta per il numero del blocco laterale a cui sei arrivato e 5 è il numero dei link che vuoi che compaiano... ancora ciao
rachidz
Eliminato
0 Discussione
15 aprile 2004 alle 21:53:28
Ragazzi siete grandi, e proprio quello che cercavo, funziona bene!!!! Grazie!
excess
Eliminato
0 Discussione
16 aprile 2004 alle 12:30:54
prego ... (r)
Sostieni AspNuke
Un piccolo gesto per aiutarci a mantenere AspNuke.it online
Promo
MusicWebItalia.it Video Testi Traduzioni Spot Colonne sonore Accordi e Spartiti gratis.
Visitatori
Visitatori Correnti : 106
Membri : 0
Anna
Iscritti
Utenti: 18940
Ultimo iscritto :
glauco
Lista iscritti
Messaggi privati: 3373
Immagini: 39
Downloads: 144
Articoli: 49
Pagine: 101
Siti web: 425
Notizie: 180
Sondaggi: 11
Preferiti: 202544
Post sui forum: 51195
Libro degli ospiti: 4
Eventi: 7