Forum 

Forum AspNuke.it - Il tuo Portale OpenSource in ASP

Pagine riservate

Autore Messaggio
rgrech

Amatore
Amatore
46 Discussioni



Profilo - rgrech
07 febbraio 2005 alle 11:52:39 Profilo - rgrechInvia un messaggio privato Rispondi quotando
Come posso creare pagine visibili solo ad alcune categorie di utenti registrati.
Zalabard

Moderatore

Esperto
Esperto
781 Discussioni



Profilo - Zalabard
09 febbraio 2005 alle 12:17:45 Profilo - ZalabardInvia un messaggio privato fsarzana@hotmail.com 228-720-524 Rispondi quotando
Crea delle "Categorie" di tipo "USERS" e poi usa la funzione
If IsAuthorizedCat("CATEGORIA") Then
' codice area riservata
Else
' messaggio "non hai il ruolo richiesto"
End If


Dove "CATEGORIA" è una di quelle create in precedenza
---------------
Frank Zalabard 8) (sviluppo@aspnuke.it)
rgrech

Amatore
Amatore
46 Discussioni



Profilo - rgrech
09 febbraio 2005 alle 16:30:21 Profilo - rgrechInvia un messaggio privato Rispondi quotando
grazie ora provo
rgrech

Amatore
Amatore
46 Discussioni



Profilo - rgrech
10 febbraio 2005 alle 12:22:20 Profilo - rgrechInvia un messaggio privato Rispondi quotando
Modificato il 10 febbraio 2005 alle 12:26:14

Non riesco a capire come e dove mettere lo scirpt

devo autorizzare la pagina solo agli utenti user

Ti allego tutta la pagina grazie per un tuo aiuto

<%
' ************************************************************************
' * ASPNUKE: Free web portal in ASP *
' ************************************************************************
' * ASP-Nuke 2.0 Copyright (c) 2004 by Aspnuke.it Staff *
' * (staff@aspnuke.it) http://www.aspnuke.it *
' * *
' * Re-design by Enrico Musante (c) 2004 (emu@libero.it) *
' * *
' * ASP-Nuke 1.0, 1.1, 1.2 Copyright (c) 2002-2003 by Gaetan Bouveret *
' * (webmaster@asp-nuke.com) http://www.asp-nuke.com *
' * *
' * This program is free software. You can redistribute it and/or modify *
' * it under the terms of the GNU General Public License as published by *
' * the Free Software Foundation; either version 2 of the License, or *
' * (at your option) any later version. *
' * *
' ************************************************************************
%>
<%
If IsAuthorizedCat("user") Then
' codice area riservata
Else
' messaggio "non hai il ruolo richiesto"
End If
%>

<!-- #include file="includes/includes-inc.asp" -->



<%
sTitlePage = GetTranslation("LANG_ARTICLES")

%>
<!-- #include file="includes/toppage1-inc.asp" -->
<%


%>

Zalabard

Moderatore

Esperto
Esperto
781 Discussioni



Profilo - Zalabard
10 febbraio 2005 alle 12:32:08 Profilo - ZalabardInvia un messaggio privato fsarzana@hotmail.com 228-720-524 Rispondi quotando
Ti faccio il mio esempio:
<%
' ************************************************************************
' * ASP-Nuke: Free web portal in ASP *
' ************************************************************************
' * Copyright (c) 2002-2003 by Gaetan Bouveret (webmaster@asp-nuke.com) *
' * http://www.asp-nuke.com *
' * *
' * This program is free software. You can redistribute it and/or modify *
' * it under the terms of the GNU General Public License as published by *
' * the Free Software Foundation; either version 2 of the License, or *
' * (at your option) any later version. *
' * *
' ************************************************************************
%>
<!-- #include file='includes/includes-inc.asp' -->
<!-- #include file='includes/GF-inc.asp' -->
<!-- #include file='includes/news-inc.asp' -->
<%
sTitlePage = GetTranslation("LANG_TITLE_GF")
sIcon = "GF_icon.ico"
sInfoPage = "Area riservata"
%>
<!-- #include file='includes/toppage-inc.asp' -->
<%
If IsAuthorizedCat("GRUPPOFAM") Then
DisplayGFReserved()
Else
DisplayGFnoaccess()
End If
%>
<!-- #include file='includes/bottompage-inc.asp' -->
<!-- #include file='includes/clearitall-inc.asp' -->


Naturalmente le funzioni DisplayGFReserved e DisplayGFnoaccess sono scritte nel file 'includes/GF-inc.asp' che è incluso all'inizio....

Ad esempio, le due funzioni sono:

Sub DisplayGFnoaccess()
CreateTopTable "GFnoaccess",GetTranslation("LANG_GRUPPOFAM") & " - Accesso riservato"
Response.Write("<br><h4>Quest'area è riservata ai componenti del Gruppo Famiglie</h4><p>")
Response.Write("<div class=""normal"">Se non sei abilitato, ma vorresti esserlo,<br>")
Response.Write("invia un <i>messaggio privato</i> (<u>dopo esserti registrato</u>) a ")
Response.Write("<STRONG><A href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_PRIVATE_MESSAGES_PAGE & "?do=new&to=Checco"">Checco</A>.</STRONG></div>")
CreateBottomTable "<a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_GF_PAGE & "?cat=0"">Torna indietro</a>"
End Sub

Sub DisplayGFReserved()
CreateTopTable "GFnoaccess",GetTranslation("LANG_GRUPPOFAM") & " - Accesso riservato"
GF_ReservedDisplay
CreateBottomTable "<a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_GF_PAGE & "?cat=0"">Torna indietro</a>"
Response.Write "<a name=""GF_NEWS"">"
DisplayTopNewsLinks GF_TOP_NEWS, GF_NEWS_ID
DisplayTopNews GF_TOP_NEWS, GF_NEWS_ID
DisplayTopArticlesGF GF_TOP_ARTICLES, GF_ARTICLES_ID, GF_ARTICLES_ID2
DisplayTopDirectoryGF GLOBAL_DIRECTORY_TOP, GF_LINKS_ID
End Sub


... con un po' di personalizzazione, puoi ottenere ciò che vuoi
---------------
Frank Zalabard 8) (sviluppo@aspnuke.it)
rgrech

Amatore
Amatore
46 Discussioni



Profilo - rgrech
10 febbraio 2005 alle 12:34:57 Profilo - rgrechInvia un messaggio privato Rispondi quotando
Grazie mille riprovo
rgrech

Amatore
Amatore
46 Discussioni



Profilo - rgrech
10 febbraio 2005 alle 14:00:24 Profilo - rgrechInvia un messaggio privato Rispondi quotando
Niente da fare sono propio handy .

Ho creato un file gf-inc.asp dove ho copiato tutto il listato che mi hai scitto

ho ricreato la pagina che dovrebbe essere riservata che qui sotto ti allego ma niente da fare.


<%
' ************************************************************************
' * ASPNUKE: Free web portal in ASP *
' ************************************************************************
' * ASP-Nuke 2.0 Copyright (c) 2004 by Aspnuke.it Staff *
' * (staff@aspnuke.it) http://www.aspnuke.it *
' * *
' * Re-design by Enrico Musante (c) 2004 (emu@libero.it) *
' * *
' * ASP-Nuke 1.0, 1.1, 1.2 Copyright (c) 2002-2003 by Gaetan Bouveret *
' * (webmaster@asp-nuke.com) http://www.asp-nuke.com *
' * *
' * This program is free software. You can redistribute it and/or modify *
' * it under the terms of the GNU General Public License as published by *
' * the Free Software Foundation; either version 2 of the License, or *
' * (at your option) any later version. *
' * *
' ************************************************************************
%>
<!-- #include file="includes/includes-inc.asp" -->
<!-- #include file="includes/gf-inc.asp" -->
<%


<%
sTitlePage = GetTranslation("LANG_TITLE_GF")
sIcon = "GF_icon.ico"
sInfoPage = "Area riservata"
%>
<!-- #include file="includes/toppage1-inc.asp" -->
<%
If IsAuthorizedCat("user") Then
DisplayGFReserved()
Else
DisplayGFnoaccess()
End If
%>



Garzie per la tua pazzienza
Zalabard

Moderatore

Esperto
Esperto
781 Discussioni



Profilo - Zalabard
10 febbraio 2005 alle 14:10:24 Profilo - ZalabardInvia un messaggio privato fsarzana@hotmail.com 228-720-524 Rispondi quotando
Ma che errore ti da? cosa vedi? hai definito una CATEGORIA "users" che si chiama "user"?!?!?!

Guardati anche il manuale http://www.aspnuke.it/manuale20/index.html?categorie.htm
---------------
Frank Zalabard 8) (sviluppo@aspnuke.it)
rgrech

Amatore
Amatore
46 Discussioni



Profilo - rgrech
10 febbraio 2005 alle 14:22:42 Profilo - rgrechInvia un messaggio privato Rispondi quotando
Modificato il 10 febbraio 2005 alle 14:24:34

No non l'ho creata

Mi da impossibile visualizzare la pagine.

Intanto loggo il manuale grazie
rgrech

Amatore
Amatore
46 Discussioni



Profilo - rgrech
10 febbraio 2005 alle 15:12:16 Profilo - rgrechInvia un messaggio privato Rispondi quotando
Qualcosa di nuovo è successo ma mi da questo messaggio
per gli iscritti


LANG_GRUPPOFAM - Accesso riservato
Errore di run-time di Microsoft VB Script error '800a01f4'

Variabile non definita: 'GF_ReservedDisplay'

/includes/gf-inc.asp, line 28

e questo per i non iscritti

LANG_GRUPPOFAM - Accesso riservato


Quest'area è riservata ai componenti del Gruppo Famiglie

Se non sei abilitato, ma vorresti esserlo,
invia un messaggio privato (dopo esserti registrato) a Checco.
Errore di run-time di Microsoft VB Script error '800a01f4'

Variabile non definita: 'GLOBAL_SITE_GF_PAGE'

/includes/gf-inc.asp, line 23



 1  2  >>

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 : 191
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: 558 Notizie: 180 Sondaggi: 11 Preferiti: 5688469 Post sui forum: 51195 Libro degli ospiti: 4 Eventi: 7

Versioni

Temi