1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375
| <%
set rstVerifAbonne = CreateObject("ADODB.Recordset")
if Request("AMOTCLE")<>"" then
rstVerifAbonne.Open "SELECT IDENTIFIANTABONNE,NOM,titre FROM c_i_ABONNE WHERE MOTCLE ='"&litForm("AMOTCLE")&"' and MOTDEPASSE='"&litForm("AMOTPASSE")&"' AND (SITE='"&LeSite&"' or (('"&LeSite&"'<>'anafinance')and (site<>'anafinance')))" , _
strConnexion
Nb=0
if NOT(rstVerifAbonne.Eof) then
session("PASSE")=Request("AMOTPASSE")
session("ACCES")=Request("AMOTCLE")
session("NOM")=rstVerifAbonne("titre")&" "&rstVerifAbonne("nom")
session("idabo")=rstVerifAbonne("IDENTIFIANTABONNE")
else
msg="Code d'accès ou Mot de passe invalide !"
end if
rstVerifAbonne.close
elseif Request("MOTCLE")<>"" then
rstVerifAbonne.Open "SELECT IDENTIFIANTABONNE FROM c_i_ABONNE WHERE MOTCLE ='"&litform("MOTCLE")&"' AND (SITE='"&LeSite&"' or (('"&LeSite&"'<>'anafinance')and (site<>'anafinance')))" , _
strConnexion
Nb=0
if NOT(rstVerifAbonne.Eof) then
msg="Ce Code d'accès est déjà utilisé par un de nos clients. Merci d'en choisir un autre !"
ABOVALIDE=false
else
rstVerifAbonne.close
rstVerifAbonne.Open "c_i_ajout_abonne('"&litForm("SOCIETE")&"','"&litForm("TITRE")&"','"&litForm("PRENOM")&"','"&litForm("NOM")&"','"&litForm("ADRESSE")&"','"&litForm("CODEPOSTAL")&"','"&litForm("VILLE")&"','"&litForm("TELEPHONE")&"','"&litForm("EMAIL")&"','"&litForm("TVA")&"','"&LeSite&"','"&litForm("MOTCLE")&"','"&litForm("MOTPASSE")&"',"&litForm("ORIGINE")&","&litForm("OPTIN")&")", _
strConnexion
if NOT(rstVerifAbonne.Eof) then
msg="VALIDE"
session("PASSE")=REQUEST("MOTPASSE")
session("ACCES")=REQUEST("MOTCLE")
session("NOM")=REQUEST("titre")&" "&REQUEST("nom")
session("idabo")=rstVerifAbonne("NumeroAbonne")
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.from= "webmaster@"&LeSite&".com"
objNewMail.TO= rstVerifAbonne("EMAIL")
objNewMail.Subject = LeSite&".com : Création de votre compte"
bodyTEXT="Le : "& nOW()& vbCrLf
bodyTEXT=bodyTEXT &"*****************************************"& vbCrLf
bodyTEXT=bodyTEXT & vbCrLf& vbCrLf
bodyTEXT=bodyTEXT &"Bonjour,"& vbCrLf
bodyTEXT=bodyTEXT & vbCrLf& vbCrLf
bodyTEXT=bodyTEXT &"Nous avons enregistré votre demande d'ouverture de compte "
bodyTEXT=bodyTEXT &" sur le site www."&LeSite&".com ."& vbCrLf
bodyTEXT=bodyTEXT &"Vos identifiants de connexions sont les suivants :"& vbCrLf
bodyTEXT=bodyTEXT &"Code d'accès: "&rstVerifAbonne("MOTCLE")& vbCrLf
bodyTEXT=bodyTEXT &"Mot de passe: "&rstVerifAbonne("MOTDEPASSE")& vbCrLf& vbCrLf
bodyTEXT=bodyTEXT &"Conservez-les, ils vous serviront pour vos prochaines commandes"& vbCrLf
bodyTEXT=bodyTEXT &"et pour bénéficier des offres gratuites et promotionnelles."& vbCrLf
bodyTEXT=bodyTEXT &"Nous vous remercions de votre confiance."& vbCrLf
bodyTEXT=bodyTEXT & vbCrLf& vbCrLf
bodyTEXT=bodyTEXT&"L'équipe de www."&LeSite&".com "&vbCrLf&vbCrLf
bodyTEXT=bodyTEXT &"*****************************************"& vbCrLf
bodyTEXT=bodyTEXT & vbCrLf& vbCrLf
bodyTEXT=bodyTEXT & vbCrLf
objNewMail.body=bodyTEXT
objNewMail.send
Set objNewMail = Nothing ' NE peut PAS être réutilisé pour un autre message
else
msg="Impossible d'enregistrer ce compte avec les informations fournies."
end if
end if
rstVerifAbonne.close
elseif Request("NOM")<>"" or Request("SOCIETE")<>"" then
rstVerifAbonne.Open "c_i_ajout_abonne('"&litForm("SOCIETE")&"','"&litForm("TITRE")&"','"&litForm("PRENOM")&"','"&litForm("NOM")&"','"&litForm("ADRESSE")&"','"&litForm("CODEPOSTAL")&"','"&litForm("VILLE")&"','"&litForm("TELEPHONE")&"','"&litForm("EMAIL")&"','"&litForm("TVA")&"','"&LeSite&"','"&session("ACCES")&"','"&session("PASSE")&"',0,"&litForm("OPTIN")&")", _
strConnexion
session("NOM")=Request("titre")&" "&Request("nom")
rstVerifAbonne.close
end if
function LitForm(champ)
litform=replace(Request.Form(champ),"'","''")
if champ="OPTIN" and litform="" then
litform=0
end if
end function
Function AfficherTab(Libelle,Contenu)
if TRIM(contenu)<>"" Then%>
<tr>
<td class="enteteFiche" width="80"><%=Libelle%></td>
<td class="ligneFiche" ><%=Contenu%></td>
</tr>
<%End if
End Function
%>
<html>
<head>
<script language=javascript>
function VersSuite(Chaine)
{
//Vérification de la saisie pour la commande de surveillance
theForm=document.forms["theFormu"];
if (Chaine=="Confirm")
{
theForm.action="ConfirmationCommandeCB.asp?<%=request.querystring%>";
return (true);
}
else if (Chaine=="Ident")
{
if (theForm.amotcle.value == "")
{
alert("Vous devez absolument renseigner le code d'accès ");
theForm.amotcle.focus();
return (false);
}
if (theForm.amotpasse.value=="")
{
alert("Vous devez absolument renseigner le mot de passe ");
theForm.amotpasse.focus();
return (false);
}
theForm.action="?<%=request.querystring%>";
return (true);
}
else if ((Chaine=="Modif")||(Chaine=="Modif2"))
{
if ((theForm.nom.value == "")&&(theForm.societe.value == ""))
{
alert("Vous devez absolument renseigner le champ Nom ou le champ Société ");
theForm.nom.focus();
return (false);
}
if (theForm.adresse.value == "")
{
alert("Vous devez absolument renseigner le champ Adresse ");
theForm.adresse.focus();
return (false);
}
if (theForm.codepostal.value == "")
{
alert("Vous devez absolument renseigner le champ Code postal ");
theForm.codepostal.focus();
return (false);
}
if (theForm.ville.value == "")
{
alert("Vous devez absolument renseigner le champ Ville ");
theForm.ville.focus();
return (false);
}
if (theForm.telephone.value == "")
{
alert("Vous devez absolument renseigner le champ Telephone ");
theForm.telephone.focus();
return (false);
}
if (theForm.email.value=="")
{
alert("Vous devez absolument renseigner votre e-mail ");
theForm.email.focus();
return (false);
}
var checkStr = theForm.email.value;
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
if (ch == "@")
{
for (j = i; j < checkStr.length; j++)
{
ch2 = checkStr.charAt(j);
if (ch2 == ".")
{
var test = "ok";
break;
}
}
}
}
if (test != "ok")
{
alert("Attention ! Votre adresse email semble mal saisie. ");
theForm.email.focus();
return (false);
}
if (Chaine=="Modif2"){
if (theForm.motcle.value == "")
{
alert("Vous devez absolument renseigner le code d'accès ");
theForm.motcle.focus();
return (false);
}
if (theForm.motpasse.value=="")
{
alert("Vous devez absolument renseigner le mot de passe ");
theForm.motpasse.focus();
return (false);
}
}
theForm.action="?<%=request.querystring%>";
return (true);
}
theForm.method="post";
theForm.submit;
return (true);
}
-->
</script>
<% HautDePage "Confirmation de vos coordonnées",0 %>
<tr><td colspan=2 class="Menu"> </td></tr>
<tr>
<td valign=top width=180>
<!--Menu 1 -->
<table class="principal" cellspacing="0" cellpadding="0" width=180>
<tr>
<td class="titre"> N'oubliez pas</td>
<td class="cointitre" ><img src="/Images/CoinBlancExterieurHD.gif" width="10" height="10" border="0" align="top"></td>
</tr>
<tr>
<td colspan="2" class="sectionMenu" >
Pour plus de souplesse d'utilisation,
demandez vos forfaits !
</td>
</tr>
</table>
</td>
<td valign=top align=center >
<a name="Haut"></a>
<table class="principal" cellspacing="0" cellpadding="0" width=95% align="center">
<tr>
<td class="TitreMilieu" > <b> Vérification de votre identité</b> </td>
<td class="cointitreMilieu" align="right" ><img src="/Images/CoinBlancExterieurHD.gif" width="10" height="10" border="0" align="top"></td>
</tr>
<tr>
<td colspan=2 class="contenuMilieu" >
<form name="theFormu" method="post">
<% For Each Match in request.Form
if Match<>"amotcle" and Match<>"amotpasse" and Match<>"motcle" and Match<>"motpasse"_
and Match<>"titre" and Match<>"prenom" and Match<>"nom" and Match<>"societe" and Match<>"adresse"_
and Match<>"tva" and Match<>"codepostal" and Match<>"ville" and Match<>"email" and Match<>"OPTIN" and Match<>"ORIGINE"_
and Match<>"telephone" and Match<>"Confirm" and Match<>"Modif" and Match<>"Ident" then%>
<input type=hidden name="<%=Match%>" value="<%=request.Form(Match)%>">
<%end if
next%>
<%if session("ACCES")<>"ANONYME" then
rstVerifAbonne.Open "SELECT * FROM c_i_ABONNE WHERE MOTCLE ='"&Session("ACCES")&"' AND MOTDEPASSE='"&Session("PASSE")&"' AND (SITE='"&LeSite&"' or (('"&LeSite&"'<>'anafinance')and (site<>'anafinance')))" , _
strConnexion
if rstVerifAbonne.EOF or rstVerifAbonne.BOF then%>
<table class="principal" cellspacing=0 cellpadding=0 width="100%">
<tr>
<td> Votre mot de passe n'est pas valide. Merci de vous reconnecter </td>
</tr>
</table>
<%else%>
<table class="principal" cellspacing=0 cellpadding=0 width="100%">
<tr>
<td >Afin de pouvoir établir votre facture, merci de vérifier vos coordonnées.</td>
</tr>
</table>
<table class="principal" cellspacing=0 cellpadding=0 width="100%">
<% if rstVerifAbonne("Titre")="M." then CheckM=" selected" else CheckM=""
if rstVerifAbonne("Titre")="Mme" then CheckMme=" selected" else CheckMme=""
if rstVerifAbonne("Titre")="Mlle" then CheckMlle=" selected" else CheckMlle=""%>
<%=AfficherTab("Civilité :","<select name=""titre"" class=normal > <option"&CheckM&">M.<option"&CheckMme&">Mme<option"&CheckMlle&">Mlle</select>")%>
<%=AfficherTab("Prénom :","<input type=text name=""prenom"" class=normal value="""&rstVerifAbonne("Prenom")&""" size=30 maxlength=50>")%>
<%=AfficherTab("Nom :","<input type=text name=""nom"" class=normal value="""&rstVerifAbonne("nom")&""" size=30 maxlength=50>")%>
<%=AfficherTab("Société :","<input type=text name=""societe"" class=normal value="""&rstVerifAbonne("Societe")&""" size=30 maxlength=50>")%>
<%=AfficherTab("N°TVA Intra.:","<input type=text name=""tva"" value="""&rstVerifAbonne("tvaintra")&""" class=normal size=15 maxlength=13> (pour les particuliers, écrire PARTICULIER)")%>
<%=AfficherTab("Adresse :","<input type=text name=""adresse"" class=normal value="""&rstVerifAbonne("Adresse")&""" size=50 maxlength=250>")%>
<%=AfficherTab("Code postal :","<input type=text name=""codepostal"" class=normal value="""&rstVerifAbonne("Codepostal")&""" size=6 maxlength=5>")%>
<%=AfficherTab("Ville :","<input type=text name=""ville"" class=normal value="""&rstVerifAbonne("Ville")&""" size=30 maxlength=50>")%>
<%=AfficherTab("Téléphone :","<input type=text name=""telephone"" class=normal value="""&rstVerifAbonne("Telephone")&""" size=16 maxlength=50>")%>
<%=AfficherTab("email :","<input type=text name=""email"" class=normal value="""&rstVerifAbonne("email")&""" size=30 maxlength=50>")%>
<input type=hidden name="OPTIN" value="<%=rstVerifAbonne("optin")%>">
<tr>
<td> </td>
<td ><input type=submit name="Confirm" value="Continuer la commande" class="bouton" onclick='return VersSuite("Confirm");'> <input type=submit name="Modif" value="Modifier les coordonnées" class="bouton" onclick='return VersSuite("Modif");'></td>
</tr>
</table>
<%end if%>
<%elseif msg="" then%>
<table class="principal" cellspacing=2 cellpadding=0 width="100%">
<tr>
<td > Afin de pouvoir établir votre facture et d'assurer le suivi de vos commandes, vous devez indiquer vos coordonnées.<br> </td>
</tr>
<tr>
<td > Vous n'êtes pas identifié. Si vous avez déjà commandé sur notre site, merci d'indiquer votre mot de passe et votre code d'accès </td>
</tr>
</table>
<table class="principal" cellspacing=0 cellpadding=0 width="100%">
<%=AfficherTab("Code d'accès :","<input type=text name=""amotcle"" class=normal size=8 maxlength=8>")%>
<%=AfficherTab("Mot de passe :","<input type=password name=""amotpasse"" class=normal size=8 maxlength=8>")%>
<tr>
<td> </td>
<td ><input type=submit name="Ident" value="Valider" class="bouton" onclick='return VersSuite("Ident");'></td>
</tr>
</table>
<table class="principal" cellspacing=0 cellpadding=0 width="100%">
<td > Sinon, remplissez le formulaire ci-dessous. Vous choisissez un code d'accès et un mot de passe qui vous
permettra de ne plus avoir à indiquer vos coordonnées sur le site, et vous bénéficierez des avantages des clients inscrits. </td>
</tr>
</table>
<table class="principal" cellspacing=0 cellpadding=0 width="100%">
<%=AfficherTab("Code d'accès :","<input type=text name=""motcle"" class=normal size=8 maxlength=8>")%>
<%=AfficherTab("Mot de passe :","<input type=password name=""motpasse"" class=normal size=8 maxlength=8>")%>
<%=AfficherTab("Civilité :","<select name=""titre"" class=normal > <option>M.<option>Mme<option>Mlle</select>")%>
<%=AfficherTab("Prénom :","<input type=text name=""prenom"" class=normal size=30 maxlength=50>")%>
<%=AfficherTab("Nom :","<input type=text name=""nom"" class=normal size=30 maxlength=50>")%>
<%=AfficherTab("Société :","<input type=text name=""societe"" class=normal size=30 maxlength=50>")%>
<%=AfficherTab("N°TVA Intra.:","<input type=text name=""tva"" class=normal size=15 maxlength=13>")%>
<%=AfficherTab("Adresse :","<input type=text name=""adresse"" class=normal size=50 maxlength=250>")%>
<%=AfficherTab("Code postal :","<input type=text name=""codepostal"" class=normal size=6 maxlength=5>")%>
<%=AfficherTab("Ville :","<input type=text name=""ville"" class=normal size=30 maxlength=50>")%>
<%=AfficherTab("Téléphone :","<input type=text name=""telephone"" class=normal size=16 maxlength=50>")%>
<%=AfficherTab("email :","<input type=text name=""email"" class=normal size=30 maxlength=50>")%>
<%
set operation= CreateObject("ADODB.Recordset")
operation.Open "select * from c_i_origine order by idorigine ", _
strConnexion
if not (operation.eof) then
Monselect=""
while not( operation.eof)
Monselect=Monselect&"<option value="&operation("idorigine")&">"&operation("libelle")&"</option>"
operation.movenext
wend
else
Monselect="<option value=0>_</option>"
end if%>
<%=AfficherTab("J'ai connu le site par","<select name=""ORIGINE"" class=normal>"&Monselect&"</select>")%>
<%=AfficherTab("<input type=checkbox name=""OPTIN"" class=normal value=""1"" >","<span class=petit>J'accepte de recevoir les offres promotionnelles de www."&lesite&".com. <br>J'ai bien noté que mon email ne sera communiqué à aucun tiers.</span>")%>
<tr>
<td> </td>
<td ><input type=submit name="Modif" value="Enregistrer les coordonnées" class="bouton" onclick='return VersSuite("Modif2");'></td>
</tr>
</table>
<%elseif msg="VALIDE" then%>
<table class="principal" cellspacing=0 cellpadding=0 width="100%">
<tr>
<td > Votre inscription a été validée.<br> Un mail avec votre mot de passe et votre code d'accès vous a été envoyé.<br>
Conservez-le, ils vous serviront à votre prochaine commande sur notre site.</td>
</tr>
</table> |
Partager