%
response.write Application("idpassete")
if request.form("cmd")="ok" then
erreur=""
if request.form("nom")="" then
erreur=erreur&"Vous n'avez pas rempli votre nom.
"
end if
if request.form("prenom")="" then
erreur=erreur&"Vous n'avez pas rempli votre prénom.
"
end if
if request.form("adresse1")="" then
erreur=erreur&"Vous n'avez pas rempli votre adresse.
"
end if
if request.form("cp")="" then
erreur=erreur&"Vous n'avez pas rempli votre code postal.
"
end if
if request.form("ville")="" then
erreur=erreur&"Vous n'avez pas rempli votre ville.
"
end if
if request.form("pays")="" then
erreur=erreur&"Vous n'avez pas rempli votre pays.
"
end if
if request.form("email")<>"" then
email=corrigemailpourlespolio(request.form("email"))
if len(email)=4 and left(email,3)="bad" then
erreur=erreur&"Votre email n'est pas correct.
"
end if
else
email=""
end if
if request.form("payment")="" then
erreur=erreur&"Vous n'avez pas choisi de mode de paiement.
"
end if
if erreur<>"" then
status="pasok"
else
Application.Lock
id=Application("idpassete")
Application("idpassete")=id+1
Application.Unlock
if request.form("adherent")="OUI" then
adherent = 1
codepaiement="DA03"&id
prix = "70 Euros"
else
adherent = 0
codepaiement="DA04"&id
prix = "81 Euros"
end if
sqlinsert = "insert into CommandePassETE (refcommande,adherent,nom,prenom,adresse1,adresse2,cp,ville,pays,email,paiement,typepaiement)"
sqlinsert = sqlinsert & " values("&id&","&adherent&",'"&convert(request.form("nom"))&"','"&convert(request.form("prenom"))&"','"&convert(request.form("adresse1"))&"','"&convert(request.form("adresse2"))&"','"&convert(request.form("cp"))&"','"&convert(request.form("ville"))&"','"&convert(request.form("pays"))&"','"&email&"','"&request.form("payment")&"',2)"
'response.write sqlinsert
Conn.execute(sqlinsert)
if request.form("newsletter") and email<>"" then
Set RS = Conn.execute("SELECT count(*) as nombre FROM parisdansenewsletter where email='"&email&"'")
if rs("nombre")=0 then
Conn.execute("INSERT INTO parisdansenewsletter(depot,email,active,provenance) VALUES('"&Date&"','"&left(trim(email),150)&"',1,'Commande du Pass ETE')")
else
Conn.execute("update parisdansenewsletter set active=1 where email='"&email&"'")
end if
end if
status="ok"
if email<>"" then
call envoiconfparticulier(email,codepaiement,request.form("payment"),prix)
end if
if request.form("payment")="CB" then
response.redirect("http://paiement.cogitel-forum.fr/paiement.asp?reference="&codepaiement)
end if
end if
end if
%>