Forum 

Forum AspNuke.it - Il tuo Portale OpenSource in ASP

Blocco Downloads solo ai registrati

Autore Messaggio
rachidz

Eliminato
Eliminato
0 Discussione



Profilo - rachidz
12 aprile 2004 alle 13:48:42 Profilo - rachidzInvia un messaggio privato Rispondi quotando
Salve a tutti,
come faccio a far scaricare dal blocco "Downloads" solo gli iscritti al sito?
Grazie ! [lo]
djveleno

Amministratore

Esperto
Esperto
1025 Discussioni



Profilo - djveleno
12 aprile 2004 alle 21:41:40 Profilo - djvelenoInvia un messaggio privato Rispondi quotando
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
Eliminato
0 Discussione



Profilo - excess
13 aprile 2004 alle 20:49:06 Profilo - excessInvia un messaggio privato Rispondi quotando
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
Eliminato
0 Discussione



Profilo - rachidz
15 aprile 2004 alle 21:53:28 Profilo - rachidzInvia un messaggio privato Rispondi quotando
Ragazzi siete grandi, e proprio quello che cercavo, funziona bene!!!!
Grazie! (o) [feu]
[lo]
excess

Eliminato
Eliminato
0 Discussione



Profilo - excess
16 aprile 2004 alle 12:30:54 Profilo - excessInvia un messaggio privato Rispondi quotando
prego ...
[lo]
(r)

Log in

Login
Password
Memorizza i tuoi dati:

Cerca

 

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 offline Anna

Iscritti

 Utenti: 18940
Ultimo iscritto : glauco
Lista iscritti
Messaggi privati: 3373 Commenti: 2210 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

Versioni

Temi