% Session.Timeout = 20 %>
<%
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
%>
<%
' User levels
Const ewAllowAdd = 1
Const ewAllowDelete = 2
Const ewAllowEdit = 4
Const ewAllowView = 8
Const ewAllowList = 8
Const ewAllowSearch = 8
Const ewAllowAdmin = 16
If Request.Form("submit") <> "" Then
bValidPwd = False
' Setup variables
sUserId = Request.Form("userid")
sPassWd = Request.Form("passwd")
If Not bValidPwd Then
Set conn = Server.CreateObject("ADODB.Connection")
conn.open xDb_Conn_Str
sSql = "SELECT * FROM [Utenti]"
sSql = sSql & " WHERE [User] = '" & AdjustSql(sUserId) & "'"
Set rs = conn.Execute(sSql)
If Not rs.Eof Then
If UCase(rs("Password")) = UCase(sPassWd) Then
Session("Dama_status_User") = rs("User")
Session("Dama_status_Password") = rs("Password")
Session("Dama_status_UserID") = rs("ID_Utente")
Session("Dama_status_UserLevel") = CInt(rs("Tipo"))
Call SetUpUserLevel()
bValidPwd = True
End If
End If
' rs.Close
' Set rs = Nothing
sSql = "UPDATE Utenti SET UltimoLogin='"&Now&"' WHERE User = '" & Replace(AdjustSql(sUserId),"'","''") & "' AND Password='"&Replace(UCase(sPassWd),"'","''")&"'"
' response.write (sSql)
Set rs = conn.Execute(sSql)
If bValidPwd Then
Errore_Log = 0
else
Errore_Log = 1
End If
If Session("Dama_status_UserID") = "" Then
UserID_Log = 0
else
UserID_Log = Session("Dama_status_UserID")
End If
sSql = "INSERT INTO Login (Data_Log, IP_Log, User_Log, Pass_Log, UserID_Log, Errore_Log, UserAgent_Log) VALUES ('"&now&"', '"&Request.ServerVariables("REMOTE_ADDR")&"', '"&Replace(Request.Form("userid"),"'","''")&"', '"&Replace(Request.Form("passwd"),"'","''")&"', '"&UserID_Log&"', '"&Errore_Log&"', '"& Mid(Request.ServerVariables("HTTP_USER_AGENT"), 1, 100) &"')"
' response.write (sSql)
Set rs = conn.Execute(sSql)
' rs.Close
' Set rs = Nothing
conn.Close
Set conn = Nothing
End If
If bValidPwd Then
Call SetUpUserLevel()
' Write cookies
If Request.Form("rememberme") <> "" Then
Response.Cookies("Dama")("userid") = sUserId
Response.Cookies("Dama").Expires = Date + 365 ' Change the expiry date of the cookies here
End If
Session("Dama_status") = "login"
If Session("Dama_status_UserLevel") = 0 Then
Response.Redirect "attivazione.asp"
End If
Response.Redirect "default.asp"
Else
Session("ewmsg") = "Nome Utente o Password errati"
End If
End If
'-------------------------------------------------------------------------------
' Function SetUpUserLevel
' - Set Up User Level Security
' arrSecurity:
' ----------------------------------
' | | "table1" | "table2" | ...
' ----------------------------------
' | "level1" | n | n |
' ----------------------------------
' | "level2" | n | n |
' ----------------------------------
' ...
Sub SetUpUserLevel()
' Declare Security Table - m User Levels x n Tables
Dim arrSecurity(2, 7)
arrSecurity(0,1) = "Immagini" ' Table Name
If Session("Dama_status_UserLevel") = -1 Then
Session("Immagini_menuitem") = True
End If
arrSecurity(1,0) = "Guest" ' User Level Name
arrSecurity(1,1) = 13 ' User Level Security
If Session("Dama_status_UserLevel") = 1 Then
Session("Immagini_menuitem") = CBool(13 And ewAllowList)
End If
arrSecurity(2,0) = "PowerUser" ' User Level Name
arrSecurity(2,1) = 13 ' User Level Security
If Session("Dama_status_UserLevel") = 2 Then
Session("Immagini_menuitem") = CBool(13 And ewAllowList)
End If
arrSecurity(0,2) = "Novelle" ' Table Name
If Session("Dama_status_UserLevel") = -1 Then
Session("Novelle_menuitem") = True
End If
arrSecurity(1,2) = 13 ' User Level Security
If Session("Dama_status_UserLevel") = 1 Then
Session("Novelle_menuitem") = CBool(13 And ewAllowList)
End If
arrSecurity(2,2) = 13 ' User Level Security
If Session("Dama_status_UserLevel") = 2 Then
Session("Novelle_menuitem") = CBool(13 And ewAllowList)
End If
arrSecurity(0,3) = "Bacheca" ' Table Name
If Session("Dama_status_UserLevel") = -1 Then
Session("Bacheca_menuitem") = True
End If
arrSecurity(1,3) = 0 ' User Level Security
If Session("Dama_status_UserLevel") = 1 Then
Session("Bacheca_menuitem") = CBool(0 And ewAllowList)
End If
arrSecurity(2,3) = 13 ' User Level Security
If Session("Dama_status_UserLevel") = 2 Then
Session("Bacheca_menuitem") = CBool(13 And ewAllowList)
End If
arrSecurity(0,4) = "Manifestazioni" ' Table Name
If Session("Dama_status_UserLevel") = -1 Then
Session("Manifestazioni_menuitem") = True
End If
arrSecurity(1,4) = 0 ' User Level Security
If Session("Dama_status_UserLevel") = 1 Then
Session("Manifestazioni_menuitem") = CBool(0 And ewAllowList)
End If
arrSecurity(2,4) = 13 ' User Level Security
If Session("Dama_status_UserLevel") = 2 Then
Session("Manifestazioni_menuitem") = CBool(13 And ewAllowList)
End If
arrSecurity(0,5) = "Categorie" ' Table Name
If Session("Dama_status_UserLevel") = -1 Then
Session("Categorie_menuitem") = True
End If
arrSecurity(1,5) = 0 ' User Level Security
If Session("Dama_status_UserLevel") = 1 Then
Session("Categorie_menuitem") = CBool(0 And ewAllowList)
End If
arrSecurity(2,5) = 13 ' User Level Security
If Session("Dama_status_UserLevel") = 2 Then
Session("Categorie_menuitem") = CBool(13 And ewAllowList)
End If
arrSecurity(0,6) = "Utenti" ' Table Name
If Session("Dama_status_UserLevel") = -1 Then
Session("Utenti_menuitem") = True
End If
arrSecurity(1,6) = 0 ' User Level Security
If Session("Dama_status_UserLevel") = 1 Then
Session("Utenti_menuitem") = CBool(0 And ewAllowList)
End If
arrSecurity(2,6) = 8 ' User Level Security
If Session("Dama_status_UserLevel") = 2 Then
Session("Utenti_menuitem") = CBool(8 And ewAllowList)
End If
arrSecurity(0,7) = "Login" ' Table Name
If Session("Dama_status_UserLevel") = -1 Then
Session("Login_menuitem") = True
End If
arrSecurity(1,7) = 0 ' User Level Security
If Session("Dama_status_UserLevel") = 1 Then
Session("Login_menuitem") = CBool(0 And ewAllowList)
End If
arrSecurity(2,7) = 0 ' User Level Security
If Session("Dama_status_UserLevel") = 2 Then
Session("Login_menuitem") = CBool(0 And ewAllowList)
End If
Session("ewSecurity") = arrSecurity ' Save Security Table
End Sub
%>
Album Fotografico di Dama in Casentino: foto, immagini, scorci del paese, panorama, feste estive, eventi,Anghiari,Arezzo,Badia Tedalda,Bibbiena,Bucine,Capolona,Caprese Michelangelo,Castel Focognano,Castel San Niccolò,Castelfranco di Sopra,Castiglion Fibocchi,Castiglion Fiorentino,Cavriglia,Chitignano,Chiusi della Verna,Civitella in Val di Chiana,Cortona,Foiano della Chiana,Laterina,Loro Ciuffenna,Lucignano,Marciano della Chiana,Monte San Savino,Montemignaio,Monterchi,Montevarchi,Ortignano Raggiolo,Pergine Valdarno,Pian di Scò,Pieve Santo Stefano,Poppi,Pratovecchio,San Giovanni Valdarno,Sansepolcro,Sestino,Stia,Subbiano,Talla,Terranuova Bracciolini, montagna, centro storico
<% If sExport = "" Then %>
<% End If %>
Inserisci i tuoi dati...
<%
If Session("ewmsg") <> "" Then
%>
<%= Session("ewmsg") %>
<%
Session("ewmsg") = "" ' Clear message
End If
%>
Inserire un'immagine è semplicissimo:
1) Acquisisci una foto (con lo scanner per esempio)
2) Salvala con un nome che la identifichi in formato jpg
3) Fai il login (nel form qui sopra) e segui le istruzioni
Non hai User Name e una Password? Se sei un socio clicca qui...
Altrimenti se hai problemi manda un'e-mail a webmaster@damaincasentino.it specificando i tuoi dati e la password che desideri, il tuo account ti verrà attivato al più presto.