<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> Volley-Ball Club Tihange - Huy
<% SendMail = 0 SendMail = GetParam("SendMail") If SendMail = 1 then idJoueur = GetParam("idJoueur") Set rsSearchJ = Server.CreateObject("ADODB.Recordset") sqlSearchJ = "SELECT * FROM joueurs_club WHERE id=" & idJoueur openrs rsSearchJ, sqlSearchJ While not rsSearchJ.eof NomJ = rsSearchJ("Nom") PrenomJ = rsSearchJ("Prenom") Mail1J = rsSearchJ("Mail1") Mail2J = rsSearchJ("Mail2") If IsNull(Mail2J) OR Mail2J="" OR Mail2J = empty then Mail2J = "" End if Login = rsSearchJ("login") Pass = rsSearchJ("pass") rsSearchJ.movenext Wend rsSearchJ.close set rsSearchJ = nothing ContenuMail = "" _ & "" _ & "" _ & "Volley Tihange-Huy - Acces personnel au site" _ & "" _ & "" _ & PrenomJ & ",

" _ & "Suite à ton enregistrement sur le site, voici le mail de confirmation.

" _ & "Ranges précieusement ce mail, si tu as un trou de mémoire, il te servira de copion pour te connecter.

" _ & "Nom d'utilisateur : " & Login & "
" _ & "Mot de passe : " & Pass & "

" _ & "Grace à ces informations, tu pourras enregistrer tes participations au matchs, modifier ton profil, etc...

" _ & "Lainlain.

" _ & "" _ & "Suis ce lien pour te connecter

" _ & "" _ & "Suis ce lien pour te désinscrire de la mailing list" _ & "" _ & "" mailsendto = Mail1J mailsendcc = Mail2J mailsubject = "Volley Tihange-Huy - Acces personnel au site" Response.Write(mailsendcc) SendCDOEmail "mail.eurobrevets.be","tihangehuy@eurobrevets.be","eB.1963", mailsubject, ContenuMail,"tihangehuy@eurobrevets.be",mailsendto,mailsendcc, 1, "HTML" Response.Redirect("LoginForm.asp?MailSent=1&Register=1&Login=" & Login & "&Pass=" & Pass) end if Nom = GetParam("Nom") Prenom = GetParam("Prenom") Mail1 = GetParam("Mail1") Login = GetParam("Login") Pass = GetParam("Pass") '''''''''''''''''''''''''''''''''''''''''''''''''''' ' Vérification de l'existence du joueur dans la DB ' '''''''''''''''''''''''''''''''''''''''''''''''''''' ChkIfExist = CLng(DLookUp("joueurs_club", "count(*)", "Nom =" & ToSQL(Nom, "Text") & " AND Prenom=" & ToSQL(Prenom, "Text") & " AND (Mail1 =" & ToSQL(Mail1, "Text") & " OR Mail2=" & ToSQL(Mail1, "Text") & ")")) If ChkIfExist = 0 then Response.Redirect("NewLogin.asp?Err=10&Nom=" & Nom & "&Prenom=" & Prenom & "&Mail1=" & Mail1 & "&Login=" & Login) else Set rsSearchJ = Server.CreateObject("ADODB.Recordset") sqlSearchJ = "SELECT * FROM joueurs_club WHERE Nom =" & ToSQL(Nom, "Text") & " AND Prenom=" & ToSQL(Prenom, "Text") & " AND (Mail1 =" & ToSQL(Mail1, "Text") & " OR Mail2=" & ToSQL(Mail1, "Text") & ")" openrs rsSearchJ, sqlSearchJ While not rsSearchJ.eof idJoueur = rsSearchJ("id") NomJ = rsSearchJ("Nom") PrenomJ = rsSearchJ("Prenom") Mail1J = rsSearchJ("Mail1") Mail2J = rsSearchJ("Mail2") If IsNull(Mail2J) OR Mail2J="" OR Mail2J = empty then Mail2J = "" End if rsSearchJ.movenext Wend rsSearchJ.close set rsSearchJ = nothing '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Vérification du login et pass vide pour le joueur existant ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ChkIsLoginEmpty = DLookUp("joueurs_club", "login", "id=" & idJoueur) If IsNull(ChkIsLoginEmpty) OR ChkIsLoginEmpty = "" then '''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Vérification de la disponibilité du login et du pass ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''' ChkLogin = CLng(DLookUp("joueurs_club", "count(*)", "login =" & ToSQL(Login, "Text") & " and pass=" & ToSQL(Pass, "Text"))) If ChkLogin = 0 then '''''''''''''''''''''''''''''''' ' Enregistrement login dans DB ' '''''''''''''''''''''''''''''''' Set rsInsertLogin = Server.CreateObject("ADODB.Recordset") sqlInsertLogin = "UPDATE joueurs_club SET " & _ "login=" & ToSQL(Login, "Text") & ", " & _ "pass=" & ToSQL(Pass, "Text") & " " & _ "WHERE id=" & idJoueur openrs rsInsertLogin, sqlInsertLogin ''''''''''''''''''''''''''''''' ' Envoi du mail recapitulatif ' ''''''''''''''''''''''''''''''' ContenuMail = "" _ & "" _ & "" _ & "Volley Tihange-Huy - Acces personnel au site" _ & "" _ & "" _ & PrenomJ & ",

" _ & "Suite à ton enregistrement sur le site, voici le mail de confirmation.

" _ & "Ranges précieusement ce mail, si tu as un trou de mémoire, il te servira de copion pour te connecter.

" _ & "Nom d'utilisateur : " & Login & "
" _ & "Mot de passe : " & Pass & "

" _ & "Grace à ces informations, tu pourras enregistrer tes participations au matchs, modifier ton profil, etc...

" _ & "Lainlain.

" _ & "" _ & "Suis ce lien pour te connecter

" _ & "" _ & "Suis ce lien pour te désinscrire de la mailing list" _ & "" _ & "" mailsendto = Mail1J mailsendcc = Mail2J mailsubject = "Volley Tihange-Huy - Acces personnel au site" SendCDOEmail "mail.eurobrevets.be","tihangehuy@eurobrevets.be","eB.1963", mailsubject, ContenuMail,"tihangehuy@eurobrevets.be",mailsendto,mailsendcc, 1, "HTML" Response.Redirect("LoginForm.asp?MailSent=1&Register=1&Login=" & Login & "&Pass=" & Pass) else Response.Redirect("NewLogin.asp?Err=3&Nom=" & Nom & "&Prenom=" & Prenom & "&Mail1=" & Mail1 & "&Login=" & Login) end if else Response.Redirect("NewLogin.asp?Err=4&Nom=" & Nom & "&Prenom=" & Prenom & "&Mail1=" & Mail1 & "&Login=" & Login & "&idJoueur=" & idJoueur) end if end if %>