Modificare il file:
\registrazione\inc_common.asp
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <% If isCommonCreated <> True Then 'Determino il timeout dello script Server.ScriptTimeout = 90 'Determino le dimensioni delle variabili Dim strDataBasePath 'Variabile Dim cString 'Variabile Dim adoCon 'Variabile Dim strSQL 'Variabile 'Setto la variabile per una connessione ADO Set adoCon = Server.CreateObject("ADODB.Connection") '------------------------------------------------------------------------------------ 'Cambiare il path del database strDataBasePath = "../mdb-database/utenti.mdb" '------------------------------------------------------------------------------------ 'Stringa per la connessione 'Se la seguente linea non funziona, commentare con ' e scegliere un altra stringa cString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(strDataBasePath) 'Usa questa stringa se usi Access Database 2000 o 2002 'cString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(strDataBasePath) 'Usa questa stringa se usi DSN 'cString = "DSN=NAME_OF_DSN" 'Sostituisci il NAME_OF_DSN con il DSN adoCon.Open cString 'Richiesta dei valori utente 'Setta the variable to the value in the users cookie str_userscode = Request.Cookies("Login")("userCode") 'Se l'user code non è vuota allora IF str_userscode <> "" THEN 'Creo un nuovo record set Set rsUserLog = Server.CreateObject("ADODB.RecordSet") 'Setta una nuova stringa sql StrSql="SELECT * FROM tbl_authors WHERE code='" & str_userscode & "';" 'Apro il recordset e eseguo il codice sql rsUserLog.open StrSql,cString 'Se non ci sono record che accertano l'identita dei dati dai cookies dell'utente 'setta la variabile vuota If rsUserLog.EOF Then Response.cookies("Login")("userCode") = "" 'Se non c'è nessun record allora Else ' Setta i valori del database con le variabili str_users_name = rsUserLog("name") str_users_password = rsUserLog("pass") str_users_nome = rsUserLog("nome") str_users_cognome = rsUserLog("cognome") str_users_email = rsUserLog("email") '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ' MODIFICA CAMPI PER LISTA '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ str_users_tel = rsUserLog("Tel") 'str_users_citta = rsUserLog("citta") 'str_users_provincia = rsUserLog("provincia") 'str_users_cap = rsUserLog("cap") str_users_authority = rsUserLog("authority") str_users_date = rsUserLog("dataregistrazione") str_users_code = rsUserLog("code") str_users_stato = rsUserLog("stato") 'str_users_pagina_web = rsUserLog("pagina_web") str_users_utentesospeso = rsUserLog("utentesospeso") End If 'Chiudo rsUserLog.Close set rsUserLog = Nothing 'Se l'user code è vuoto allora l'utente è guest Else Response.cookies("Login")("userCode") = "" End If '-------------------------------------------------------------------------------------------- 'Creo un nuovo record set set rsPageAttributes = Server.CreateObject("ADODB.RecordSet") 'Query sql pageSql = "SELECT * FROM tbl_admin" 'Apro il recordset e eseguo sql rsPageAttributes.open pageSql,cString adminEmail = rsPageAttributes("adminEmail") pageTitle = rsPageAttributes("TitoloSito") homePage = rsPageAttributes("homePage") mailServer = rsPageAttributes("mailHost") tipoMail = rsPageAttributes("tipoMail") conf_email = rsPageAttributes("conf_email") 'Chiusura rsPageAttributes.Close set rsPageAttributes = Nothing '-------------------------------------------------------------------------------------------- Else Dim isCommonCreated isCommonCreated = True End If '-------------------------------------------------------------------------------------------- Function GetState(intState) Select Case intState Case 0 GetState = "adStateClosed" Case 1 GetState = "adStateOpen" End Select 'Sintassi: GetState(adoCon.state) End Function '-------------------------------------------------------------------------------------------- %>
[
Íàçàä
]