|
<%
LoginAction = GetParam("SubmitAction")
If LoginAction = "Login" then
sLogin = GetParam("loginVCTH")
sPassword = GetParam("passVCTH")
bPassed = CLng(DLookUp("joueurs_club", "count(*)", "login =" & ToSQL(sLogin, "Text") & " and pass=" & ToSQL(sPassword, "Text")))
if bPassed > 0 then
Session("UserID") = CStr(DLookUp("joueurs_club", "id", "login =" & ToSQL(sLogin, "Text") & " and pass=" & ToSQL(sPassword, "Text")))
Session("UserRights") = CLng(DLookUp("joueurs_club", "idLevel", "login =" & ToSQL(sLogin, "Text") & " and pass=" & ToSQL(sPassword, "Text")))
Session("UserPrenom") = CStr(DLookUp("joueurs_club", "Prenom", "login =" & ToSQL(sLogin, "Text") & " and pass=" & ToSQL(sPassword, "Text")))
Session("UserNom") = CStr(DLookUp("joueurs_club", "Nom", "login =" & ToSQL(sLogin, "Text") & " and pass=" & ToSQL(sPassword, "Text")))
UserCat = CLng(DLookUp("joueurs_club", "idCat", "login =" & ToSQL(sLogin, "Text") & " and pass=" & ToSQL(sPassword, "Text")))
CatMatch = CLng(DLookUp("categorie", "matchs", "id =" & UserCat))
cn.Close
Set cn = Nothing
If CatMatch = 0 then
response.redirect("matchsclub.asp")
Else
response.redirect("agendaclub.asp?idCat=" & UserCat)
End if
else
response.redirect("loginform.asp?LogErr=1")
end if
else
Session("UserID") = Empty
Session("UserRights") = Empty
Session("UserPrenom") = Empty
Session("UserNom") = Empty
response.redirect("matchsclub.asp")
End if
%>
|