-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaffiliation.php
466 lines (406 loc) · 16.1 KB
/
affiliation.php
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
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
<?php
include('configuratie/configuratie.php');
include('includes/plug.php');
include('includes/doctype.php');
include("includes/lang/lang_".$_SESSION['lang'].".php");
$title = AFFILIATION;
$description = $title." ".$store_name;
$keywords = $title.", ".$store_name.", ".$keywords;
if(isset($_POST['affiliate_form']) AND $_POST['affiliate_form']=="yes" AND isset($_POST['clientV']) AND $_POST['clientV']=="") {
$str1a = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789ABCDEF';
$affiliateNumber = '';
for( $i = 0; $i < 10 ; $i++ ) {
$affiliateNumber .= substr($str1a, rand(0, strlen($str1a) - 1), 1);
}
$str1a = '123456789';
$affiliatePass = '';
for( $i = 0; $i < 6 ; $i++ ) {
$affiliatePass .= substr($str1a, rand(0, strlen($str1a) - 1), 1);
}
$affPrenom = str_replace("\'","'",$_POST['aff_prenom']);
$_POST['societe'] = str_replace("'","’",$_POST['societe']);
$_POST['aff_nom'] = str_replace("'","’",$_POST['aff_nom']);
$_POST['aff_prenom'] = str_replace("'","’",$_POST['aff_prenom']);
$_POST['aff_adresse1'] = str_replace("'","’",$_POST['aff_adresse1']);
$_POST['aff_adresse2'] = str_replace("'","’",$_POST['aff_adresse2']);
$_POST['aff_ville'] = str_replace("'","’",$_POST['aff_ville']);
$_POST['aff_pays'] = str_replace("'","’",$_POST['aff_pays']);
$_POST['aff_banque'] = str_replace("'","’",$_POST['aff_banque']);
$_POST['aff_adressebanque'] = str_replace("'","’",$_POST['aff_adressebanque']);
$_POST['aff_observations'] = str_replace("'","’",$_POST['aff_observations']);
$_POST['aff_titulaire'] = str_replace("'","’",$_POST['aff_titulaire']);
mysql_query("INSERT INTO affiliation (
aff_number,
aff_company,
aff_nom,
aff_prenom,
aff_email,
aff_adresse1,
aff_adresse2,
aff_zip,
aff_ville,
aff_pays,
aff_telephone,
aff_web,
aff_banque,
aff_addresse_banque,
aff_rib,
aff_observation,
aff_cheque,
aff_paypal,
aff_titulaire,
aff_pass,
aff_com
)
VALUES ('".$affiliateNumber."',
'".$_POST['societe']."',
'".$_POST['aff_nom']."',
'".$_POST['aff_prenom']."',
'".$_POST['aff_email']."',
'".$_POST['aff_adresse1']."',
'".$_POST['aff_adresse2']."',
'".$_POST['aff_codepostal']."',
'".$_POST['aff_ville']."',
'".$_POST['aff_pays']."',
'".$_POST['aff_telephone']."',
'".$_POST['aff_web']."',
'".$_POST['aff_banque']."',
'".$_POST['aff_adressebanque']."',
'".$_POST['aff_RIB_IBAN']."',
'".$_POST['aff_observations']."',
'".$_POST['aff_cheque']."',
'".$_POST['aff_paypal']."',
'".$_POST['aff_titulaire']."',
'".$affiliatePass."',
'".$affiliateCom."'
)");
$to = $_POST['aff_email'];
$subject = AFFILIATION." - ".$domaineFull;
$from = $mailInfo;
$_store = str_replace("’","'",$store_company);
$messageToSend = $_store."\r\n".$address_street."\r\n".$address_cp." - ".$address_city."\r\n".$address_country."\r\n";
if(!empty($address_autre)) {
$address_autre2 = str_replace("<br>","\r\n",$address_autre);
$messageToSend .= $address_autre2."\r\n";
}
if(!empty($tel)) $messageToSend .= TELEPHONE.": ".$tel."\r\n";
if(!empty($fax)) $messageToSend .= FAX.": ".$fax."\r\n";
$messageToSend .= "URL: http://".$www2.$domaineFull."\r\nEmail: ".$mailInfo."\r\n\r\n";
$messageToSend .= $affPrenom.",\r\n\r\n";
$messageToSend .= ENREGISTRER_AU_PROGRAMME." http://".$www2.$domaineFull.".\r\n";
$messageToSend .= VOTRE_NUMERO_AFFILIE_EST." : ".$affiliateNumber."\r\n";
$messageToSend .= VOTRE_PASS_EST." : ".$affiliatePass."\r\n";
$messageToSend .= VOTRE_COM." : ".$affiliateCom."%\r\n\r\n";
$messageToSend .= CLIQUER_SUR." :\r\n";
$messageToSend .= "http://".$www2.$domaineFull."/affiliate_linkweb.php?numAff=".$affiliateNumber."\r\n\r\n";
$messageToSend .= POUR_TOUTE_INFORMATION."\r\n";
$messageToSend .= LE_SERVICE_CLIENT."\r\n";
$messageToSend .= $mailInfo;
mail($to, $subject, rep_slash($messageToSend),
"Return-Path: $from\r\n"
."From: $from\r\n"
."Reply-To: $from\r\n"
."X-Mailer: PHP/" . phpversion());
$messageAff = MOT_DE_PASSE_ENVOYE." ".$to;
}
?>
<html>
<head>
<?php include('includes/hoofding.php');?>
<script type="text/javascript"><!--
function check_formt() {
var error = 0;
var error_message = "";
var aff_nom = document.form1.aff_nom.value;
var aff_prenom = document.form1.aff_prenom.value;
var aff_email = document.form1.aff_email.value;
var aff_adresse1 = document.form1.aff_adresse1.value;
var aff_codepostal = document.form1.aff_codepostal.value;
var aff_ville = document.form1.aff_ville.value;
var aff_pays = document.form1.aff_pays.value;
var aff_web = document.form1.aff_web.value;
var clientV = document.form1.clientV.value;
if(document.form1.elements['aff_nom'].type != "hidden") {
if(aff_nom == '' || aff_nom.length < 2) {
error_message = error_message + "<?php print CHAMPS_NON_VALIDE;?> <?php print PRENOM;?>\n";
error = 1;
}
}
if(document.form1.elements['aff_prenom'].type != "hidden") {
if(aff_prenom == '' || aff_prenom.length < 2) {
error_message = error_message + "<?php print CHAMPS_NON_VALIDE;?> <?php print NOM;?>\n";
error = 1;
}
}
if(document.form1.elements['aff_email'].type != "hidden") {
if(aff_email == '' || aff_email.length < 6 || aff_email.indexOf ('@') == -1 || aff_email.indexOf ('.') == -1 ) {
error_message = error_message + "<?php print CHAMPS_NON_VALIDE;?> <?php print ADRESSE_EMAIL;?>\n";
error = 1;
}
}
if(document.form1.elements['aff_adresse1'].type != "hidden") {
if(aff_adresse1 == '' || aff_adresse1.length < 5) {
error_message = error_message + "<?php print CHAMPS_NON_VALIDE;?> <?php print ADRESSE."1";?>\n";
error = 1;
}
}
if(document.form1.elements['aff_codepostal'].type != "hidden") {
if(aff_codepostal == '' || aff_codepostal.length < 4) {
error_message = error_message + "<?php print CHAMPS_NON_VALIDE;?> <?php print CODE_POSTAL;?>\n";
error = 1;
}
}
if(document.form1.elements['aff_ville'].type != "hidden") {
if(aff_ville == '' || aff_ville.length < 3) {
error_message = error_message + "<?php print CHAMPS_NON_VALIDE;?> <?php print VILLE;?>\n";
error = 1;
}
}
if(document.form1.elements['aff_pays'].type != "hidden") {
if(aff_pays == '' || aff_pays.length < 2) {
error_message = error_message + "<?php print CHAMPS_NON_VALIDE;?> <?php print PAYS;?>\n";
error = 1;
}
}
if(document.form1.elements['aff_web'].type != "hidden") {
if(aff_web == '' || aff_web.length < 16 || aff_web.indexOf ('.') == -1) {
error_message = error_message + "<?php print CHAMPS_NON_VALIDE;?> Website\n";
error = 1;
}
}
if(document.form1.elements['aff_toto'].type != "hidden") {
if(document.form1.aff_toto.value == 'no') {
error_message = error_message + "<?php print CHAMPS_NON_VALIDE;?> Ik ga akkoord met de voorwaarden\n";
error = 1;
}
}
if(document.form1.elements['clientV'].type != "hidden") {
if(clientV !== '') {
error_message = error_message + "<?php print CHAMPS_NON_VALIDE;?> <?php print LEAVE_CHAMPS_EMPTY;?>'n";
error = 1;
}
}
if(error == 1) {
alert(error_message);
return false;
} else {
return true;
}
}
//--></script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<?php
include('includes/geen_script.php');
include('includes/recup_bericht.php');
?>
<?php if($affiliateVisible=="oui" AND $activeEcom=="oui") {?>
<table width="<?php print $_SESSION['storeWidthUser'];?>" align="center" border="0" cellpadding="<?php print $cellpad;?>" cellspacing="0" class="TABLEBackgroundBoutiqueCentre">
<tr>
<td width="1" class="borderLeft"></td>
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="backGroundTop">
<?php
// header 1
if($header1Display=='oui') {
include('includes/tabel_top1.php');
}
else {
print "<tr valign='top'>";
}
// header 2
if($header2Display=='oui') {
print "<td colspan='3'>";
include('includes/tabel_top2.php');
print "</td></tr><tr>";
print "<td colspan='3'>";
}
else {
print "<td colspan='3'>";
}
// Menu tab
if($menuVisibleTab=="oui") {
include('includes/menu_tab.php');
$styleClass1 = "TABLEMenuPathTopPage";
}
else {
$styleClass1 = "TABLEMenuPathTopPageMenuTabOff";
}
// MENU HORIZONTAAL
if($menuCssVisibleHorizon=="oui") {
include('includes/menu_categories_layer_horizontaal.php');
$styleClass2 = "TABLEMenuPathTopPageMenuH";
}
if(isset($styleClass1)) $styleClass=$styleClass1;
if(isset($styleClass2)) $styleClass=$styleClass2;
?>
<?php if($tableDisplay=='oui') {?>
<table width="99%" align="center" border="0" cellspacing="0" cellpadding="5" class="<?php echo $styleClass;?>">
<tr height="32">
<?php if($tableDisplayLeft=='oui') {?>
<td>
<b><img src="im/accueil.gif" align="TEXTTOP"> <a href="cataloog.php"><?php print maj(HOME);?></a> | <?php print maj(AFFILIATION);?> |</b>
</td>
<?php
}
if($tableDisplayRight=='oui') include('includes/menu_top_rechts.php');?>
</tr>
</table>
<?php }?>
<?php include('includes/promo_afbeelden.php');?>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="3" cellspacing="5">
<tr>
<?php
// -----------
// links kolom
// -----------
if($colomnLeft=='oui') include('includes/kolom_links.php');
?>
<td valign="top" class="TABLEPageCentreProducts">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td valign="top">
<?php
if($addNavCenterPage=="oui") {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="titre"><?php print maj(AFFILIATION);?></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<?php
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" border="0" cellpadding="5" cellspacing="0"><tr><td class="TABLESousMenuPageCategory">
<img src="im/fleche_right.gif"> <b><?php print VOUS_ETES_AFFILIE;?></b>
</td></tr></table>
<br>
<?php
print '<form action="affiliate_details.php" method="POST">';
print VOTRE_NUMERO_AFFILIE_EST.' <input type="text" class="vullen" name="aff_account" size="10" value="">';
print " ";
print VOTRE_PASS_EST.' <input type="text" class="vullen" name="aff_pass" size="10" value="">';
print " ";
print '<INPUT TYPE="submit" VALUE="ok">';
print '</form>';
?>
</td>
</tr>
<td>
<br>
<table width="100%" border="0" cellpadding="5" cellspacing="0"><tr><td class="TABLESousMenuPageCategory">
<img src="im/fleche_right.gif"> <b><?php print VOUS_ETES_PAS_AFFILIE;?></b></td></tr></table>
<br>
<?php
print NOUS_REMUNERONS;
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center">
<p align='center'><br><?php print POUR_ADHERER;?></p>
<?php
if(isset($messageAff)) { print "<p align='center' class='styleAlert'>".$messageAff."<br></p>";}
?>
<form name="form1" action="<?php print $url_id10;?>" method="post" onsubmit="return check_formt()">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td align="left">Bedrijf</td><td><input name="societe" class="vullen" type="text" size="30"></td></tr>
<tr>
<td align="left"><?php print NOM;?> </td><td><input class="vullen" name="aff_nom" type="text" size="30"> *</td></tr>
<tr>
<td align="left"><?php print PRENOM;?> </td><td><input class="vullen" name="aff_prenom" type="text" size="30"> *</td></tr>
<tr>
<td align="left">E-mail</td><td><input name="aff_email" class="vullen" type="text" size="30"> *</td></tr>
<tr>
<td align="left" valign="top"><?php print ADRESSE;?> </td><td><input class="vullen" name="aff_adresse1" type="text" size="30"> *</td></tr>
<tr>
<td align="left" valign="top"><?php print ADRESSE;?> </td><td><input class="vullen" name="aff_adresse2" type="text" size="30"></td></tr>
<tr>
<td align="left" valign="top"><?php print CODE_POSTAL;?> </td><td><input class="vullen" name="aff_codepostal" type="text" size="6"> *</td></tr>
<tr>
<td align="left" valign="top"><?php print VILLE;?> </td><td><input name="aff_ville" class="vullen" type="text" size="30"> *</td></tr>
<tr>
<td align="left" valign="top"><?php print PAYS;?> </td><td><input name="aff_pays" class="vullen" type="text" size="20"> *</td></tr>
<tr>
<td align="left" valign="top"><?php print NUMERO_DE_TELEPHONE;?> </td><td><input class="vullen" name="aff_telephone" type="text" size="20"></td></tr>
<tr>
<td align="left" valign="top">Website</td><td><input name="aff_web" type="text" class="vullen" value="http://www." size="30"> *</td></tr>
<tr>
<td align="center" colspan="2" height="25" valign="top"><b><?php print VOUS_RECEVREZ_VOTRE_ARGENT;?></b></td></tr>
<td align="left" valign="top"></td><td><input name="aff_cheque" type="hidden" size="30"></td></tr>
<tr>
<td align="left" valign="top"><?php print PAYPAL_EMAIL;?></td><td><input class="vullen" name="aff_paypal" type="text" size="30"></td></tr>
<td align="left" colspan="2" valign="middle">• <?php print VIREMENT_BANCAIRE;?></td></tr>
<tr>
<td align="left" valign="top"><?php print BANQUE;?> </td><td><input class="vullen" name="aff_banque" type="text" size="30"></td></tr>
<tr>
<td align="left" valign="top">Rekening nummer </td><td><input class="vullen" name="aff_adressebanque" type="text" size="30"></td></tr>
<tr>
<td align="left" valign="top">IBAN</td><td><input class="vullen" name="aff_titulaire" type="text" size="30"></td></tr>
<tr>
<td align="left" valign="top">BIC</td><td><input name="aff_RIB_IBAN" class="vullen" type="text" size="30"></td></tr>
<tr>
<td align="left" colspan="2" height="10" valign="top"> </td></tr>
<tr>
<td align="right" valign="top"><?php print AI_LU2;?> </td><td>
<?php
print "<select name='aff_toto'>
<option value='no' selected>".NON."</option>
<option value='yes'>".OUI."</option>
</select>";
?>
</td></tr>
<tr>
<td align="left" valign="top"><?php print COMMENTAIRES;?> </td><td><textarea name="aff_observations" rows="4" cols="50"></textarea></td>
</tr>
</table>
<!--
<p align="center">
<img src="im/noSpam.png"><br>
<img src="im/lang<?php print $_SESSION['lang'];?>/laisser.gif" align="absmiddle"> :
-->
<input type="hidden" name="clientV" size="5" value="">
</p>
<p align="center">
<input type="hidden" name="affiliate_form" value="yes">
<input type="submit" value="<?php print ENVOYER;?>" name="submit">
</p>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
if(isset($messageAff)) { print "<p align='center' class='styleAlert'>".$messageAff."<br><br></p>";}
?>
</td>
</tr>
</table>
</td>
<?php
// ---------------------------------------
// kolom rechts
// ---------------------------------------
if($colomnRight=='oui') include("includes/kolom_rechts.php");
?>
</tr>
</table>
<?php include("includes/footer.php");?>
</td>
<td width="1" class="borderLeft"></td>
</tr>
</table>
<?php }?>
</body>
</html>