<% option explicit Dim struserName,struserpass,struserStatus,struserId dim objconn, rslogin,userrs dim SQLLOGIN,SQLLOG,SQLUSER dim strmydsn2'dsn de la db dim strredirect,strredirectADMIN'lien de redirection si login valide dim temp '*************************************************************************************** 'Variable a configurer strmydsn2 = "blog" strredirect = "blog.asp" strredirectADMIN = "protected/admin/adminuser/dspusersadmin.asp" '*************************************************************************************** struserName = Request.Form("usr") struserPass = Request.Form("pass") if request("Try") = 1 and struserName <> "" and struserPass <> "" then set objConn = server.createobject("ADODB.Connection") objConn.mode = 3 objConn.open strmydsn2 SQLLOGIN="SELECT * FROM users WHERE ucase(userName)='" & ucase(struserName) & "' and ucase(userpass) ='"&ucase(struserpass)&"'" set rslogin = objConn.execute(SQLLOGIN) if rslogin.eof then Session("authorized") = False Session("message") = "Nom d'usager ou Mot de passe invalide!" struserStatus ="Erreur" else Session("authorized") = True Session("SecureLevel") = rslogin("userLevel") struserId = rslogin("userId") SQLUSER="SELECT * FROM users" set userRS = server.createobject("adodb.recordset") userRS.CursorLocation=3 userRS.CursorType=1 userRS.LockType = 2 userRS.open SQLUSER,objConn userRS.Filter = "[userId] =" & struserId userRS("userCount") = userRS("userCount") +1 userRS.Update userrs.close set userRS = nothing struserStatus = "Ok" end if '******************************************************** 'Inscription dans les log if struserId = "" then struserId = 0 SQLLOG = "INSERT INTO Log (userId,LogName, LogPass, LogStatus, LogIp, LogDate ) "&_ "Values("&struserId&",'"&struserName&"','"&struserPass&"','"&struserStatus&"','"&Request.ServerVariables("REMOTE_ADDR")&"','"&Now()&"')" 'Response.Write SQLLOG objconn.Execute SQLLOG '******************************************************** objConn.close Set rslogin = Nothing Set objConn = Nothing if struserStatus = "Ok" then IF Session("SecureLevel") = 5 THEN Response.Redirect strredirectADMIN ELSE Response.Redirect strredirect END IF end if elseif request("Try") = 1 and (struserName = "" or struserPass = "") then Session("message") = "Nom d'usager ou Mot de passe invalide!" end if %> Identification
DONATION

Imprimez ce document et retournez-le à:
Aqadien.org
790 Côte D'Abraham
Québec, Québec. G1R 1A1
OU
2106 Chartier
Dorval, Québec, H9P 1H2
Canada
Print this form and return it to:
Aqadien.org
790 Cote D'Abraham
Quebec, Quebec. G1R 1A1
OR
2106 Chartier
Dorval, Quebec, H9P 1H2
Canada
Émettre le chèque ou mandat au nom de Aqadien.org
Please make cheque or money order payable to Aqadien.org

 Autre montant:   

Nom / Name:
Courriel / E-mail:
Rue / Street:
Ville / City:
C.P./P.C./ZIP:
Province / State:
Pays / Country
Organisation / Organization
Tél / Tel:

Offrez votre metier et votre profession. -
Offer your trade and profession. -
Inscrire votre metier ou profession. -
Inscribe your profession and trade.