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
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
|
<?php require_once('webadmin/basic_info.php');
$id = (int)$_SESSION["id"]; $campaign = get_campaign($id, 1);
if (!isset($_SESSION["id"]) || (int)$_SESSION["id"] <= 0 || empty($campaign)) { missing_campaign_id(); } ?> <!DOCTYPE html> <html> <head> <?php require_once('html_head.php'); ?> </head> <body>
<div class="container" style="border: none;"></div>
<?php require_once('html_footer.php'); ?> </body> </html> <?php check_campaign_date($campaign);
//loop question $message = "";
if (isset($_SESSION["REQUEST_REGISTRATION"]) && $_SESSION["REQUEST_REGISTRATION"] == 1) { $_POST["telephone"] = $_SESSION["telephone"]; $_POST["password"] = $_SESSION["password"]; $_POST["tnc"] = $_SESSION["tnc"]; }
if ($campaign["user_login"] == "NOT_REQUEST_LOGIN") {
if ($campaign["fill_user_name"] == 1) { if (empty($_POST["user_name"])) { $message .= "Please enter your name. \\n請輸入姓名。\\n\\n"; } }
if ($campaign["fill_tel"] == 1) { if (empty($_POST["telephone"])) { $message .= "Please enter mobile number. \\n請輸入流動電話。\\n\\n"; } else { if (!is_numeric($_POST["telephone"]) || (int)$_POST["telephone"] <= 0) { $message .= "Mobile number should be a digital number. \\n流動電話必須由數字組成。\\n\\n"; }
/*if ($_POST["telephone"][0] != "5" && $_POST["telephone"][0] != "6" && $_POST["telephone"][0] != "9") { $message .= "Please enter correct mobile number. \\n請輸入正確的流動電話。\\n\\n"; }*/
if (strlen($_POST["telephone"]) != 8) { $message .= $_POST["telephone"][0] . "Mobile number should be 8 digital number. \\n流動電話應是由8個數字組成。\\n\\n"; } } }
if ($campaign["fill_email"] == 1) { if (empty($_POST["email"])) { $message .= "Please enter email. \\n請輸入電郵地址。\\n\\n"; } else { if (!filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) { $message .= "Email format is not correct. \\n請輸入正確的電郵地址。\\n\\n"; } } }
if ($campaign["fill_birthday"] == 1) { if (empty($_POST["birthday"])) { $message .= "Please enter birthday. \\n請輸入出生日期。\\n\\n"; } else { if (!validateDate($_POST["birthday"], "Y-m-d")) { $message .= "Please enter correct birthday. \\n請輸入正確的出生日期。\\n\\n"; } } }
if ($campaign["fill_facebook_name"] == 1) { if (empty($_POST["facebook_name"])) { $message .= "Please enter facebook name. \\n請輸入面書名稱。\\n\\n"; } }
} else if ($campaign["user_login"] == "REQUEST_LOGIN") { if (empty($_POST["telephone"])) { $message .= "Please enter mobile number. \\n請輸入流動電話。\\n\\n"; } else { if (!is_numeric($_POST["telephone"]) || (int)$_POST["telephone"] <= 0) { $message .= "Mobile number should be a digital number. \\n流動電話必須由數字組成。\\n\\n"; }
if ($_POST["telephone"][0] != "5" && $_POST["telephone"][0] != "6" && $_POST["telephone"][0] != "9") { $message .= "Please enter correct mobile number. \\n請輸入正確的流動電話。\\n\\n"; }
if (strlen($_POST["telephone"]) != 8) { $message .= "Mobile number should be 8 digital number. \\n流動電話應是由8個數字組成。\\n\\n"; } }
if (empty($_POST["password"])) { $message .= "Please enter password. \\n請輸入密碼。\\n\\n"; } }
if (!isset($_POST["tnc"])) { $message .= "Please read and agree the terms & conditions. \\n請細閱及同意條款及細則。\\n\\n"; }
if (!empty($message)) { echo "<script type='text/javascript'>alert('" . $message . "'); location.href=history.back(); </script>"; exit; }
$promotion_code = "";
//insert user info if ($campaign["user_login"] == "NOT_REQUEST_LOGIN") {
if ($campaign["fill_tel"] == 1 || $campaign["fill_email"] == 1) { //only one user info for one campaign $sql = "select * from user_info where (tel = ? or email = ?) and campaign_id = ?"; $parameters = array(aes_crypt($_POST["telephone"], 1), aes_crypt($_POST["email"], 1), $id); $result = bind_pdo($sql, $parameters, "selectone");
if (!empty($result)) { echo "<script type='text/javascript'>alert('This email/telephone number has joined this campaign before. Thank you very much.\\n閣下之電郵/電話號碼已完成此活動。多謝參與。'); location.href='thankyou.php?id=" . $id . "'</script>"; exit; } }
$user_email = $_POST["email"]; $user_name = $_POST["user_name"];
$sql = "insert into user_info (campaign_id, user_name, tel, email, facebook_name, birthday, session_id, createdate) values (?,?,?,?,?,?,?,?)"; $parameters = array($id, $_POST["user_name"], aes_crypt($_POST["telephone"], 1), aes_crypt($_POST["email"], 1), $_POST["facebook_name"], $_POST["birthday"], session_id(), $nowdate); bind_pdo($sql, $parameters); $user_info_id = $dbh->lastInsertId();
//update question owner $sql = "update answer set user_info_id = ?, temp = ?, lastupdate = ? where session_id = ? and temp = ? and campaign_id = ?"; $parameters = array($user_info_id, 0, date("Y-m-d H:i:s"), session_id(), 1, $id); bind_pdo($sql, $parameters);
if ($campaign["enable_promotion_code"] == 1) { //need to send email and apply API
//generate promotion code $url = $site_info["skytree_api_hostname"] . 'api/promotionCodeAPI/Generate/' . $campaign["promotion_code_master_id"]; $postData = array(); $result = call_curl($url, $postData, 0); $result = json_decode($result, true);
if ($result["success"] == 1) { $promotion_code = $result["data"][0];
$sql = "update user_info set promotion_code = ? where id = ?"; $parameters = array($promotion_code, $user_info_id); bind_pdo($sql, $parameters); } else { echo "<script type='text/javascript'>alert('Generate promotion code error.');history.back();</script>"; exit; } }
//} else if ($campaign["user_login"] == "REQUEST_LOGIN") { } else { //call api to check member info $url = $site_info["api_url"] . "validate_vip";
if (isset($_SESSION["REQUEST_REGISTRATION"]) && $_SESSION["REQUEST_REGISTRATION"] == 1) { $postData = array("telephone" => $_POST["telephone"], "password" => ($_POST["password"])); } else { $postData = array("telephone" => $_POST["telephone"], "password" => md5($_POST["password"])); }
$result = call_curl($url, $postData, 1);
$result = json_decode($result, true);
if (!empty($result["vip_code"]) && !empty($result["email"]) && !empty($result["user_name"])) { //valid vip $vip_code = $result["vip_code"]; $user_email = $result["email"]; $user_name = $result["user_name"]; $user_tel = $result["tel"]; $_SESSION["survey_vip_code"] = $vip_code;
if ($campaign["user_login"] != "NOT_REQUEST_LOGIN") { //only one user info for one campaign $sql = "select * from user_info where vip_code = ? and campaign_id = ?"; $parameters = array($vip_code, $id); $user_info = bind_pdo($sql, $parameters, "selectone");
if (!empty($user_info)) { echo "<script type='text/javascript'>alert('This email/telephone number has joined this campaign before. Thank you very much.\\n閣下之電郵/電話號碼已完成此活動。多謝參與。'); location.href='campaign.php?id=" . $id . "'</script>"; exit; } }
$sql = "insert into user_info (campaign_id, vip_code, user_name, tel, email, facebook_name, session_id, createdate) values (?,?,?,?,?,?,?,?)"; $parameters = array($id, $result["vip_code"], $result["user_name"], aes_crypt($result["tel"], 1), aes_crypt($result["email"], 1), "", session_id(), $nowdate); bind_pdo($sql, $parameters); $user_info_id = $dbh->lastInsertId();
//update question owner $sql = "update answer set user_info_id = ?, vip_code = ?, temp = ?, lastupdate = ? where session_id = ? and temp = ? and campaign_id = ?"; $parameters = array($user_info_id, $vip_code, 0, date("Y-m-d H:i:s"), session_id(), 1, $id); bind_pdo($sql, $parameters);
if ($campaign["enable_get_points"] == 1) { $give_points_success = false; //add points to vip code $points = $campaign["get_points"]; if ($points > 0) { $url = $site_info["sinomax_api_url"] . "doBonusAdjustment"; $postData = array("VIP_CODE" => $vip_code, "SURVEY_ID" => $id . "-" . $campaign["name_en"], "OPERATOR" => $campaign["points_operator"], "VALUE" => $points); $json_result = call_curl($url, $postData, 1);
$result = json_decode($json_result, true); if ($result["RESPONSE_ERR_MSG_IDX"] == "ERR_00") { //success $give_points_success = true; /*echo "<script type='text/javascript'>alert('You have got Sinomax member points.\\n你已獲取積分獎勵。');location.href='thankyou.php';</script>"; exit;*/ } else { //fail /*echo "<script type='text/javascript'>alert('Cannot get Sinomax member points.\\n獲取積分獎勵不成功。');location.href='thankyou.php';</script>"; exit;*/ } } }
if ($campaign["enable_promotion_code"] == 1) { //need to send email and apply API
//generate promotion code $url = $site_info["skytree_api_hostname"] . 'api/promotionCodeAPI/Generate/' . $campaign["promotion_code_master_id"]; $postData = array(); $result = call_curl($url, $postData, 0); $result = json_decode($result, true);
if ($result["success"] == 1) { $promotion_code = $result["data"][0];
$sql = "update user_info set promotion_code = ? where id = ?"; $parameters = array($promotion_code, $user_info_id); bind_pdo($sql, $parameters); } else { echo "<script type='text/javascript'>alert('Generate promotion code error.');history.back();</script>"; exit; } }
} else { $vip_code = ""; echo "<script type='text/javascript'>alert('Login fail. Please check your mobile number or password.\\n登入失敗。請檢查你輸入的電話號碼和密碼。');history.back();</script>"; exit; }
}
/*header("Location: thankyou.php"); exit;*/
if (!empty($user_email)) {
if (!empty($promotion_code)) { $promotion_code_ref_name = "";
//get promotion code name $url = $site_info["skytree_api_hostname"] . 'api/promotionCodeAPI/list'; $postData = array(); $promotion_code_master = call_curl($url, $postData, 0); $promotion_code_master = json_decode($promotion_code_master, true);
foreach ($promotion_code_master["data"] as $master) { if ($master["id"] == $campaign["promotion_code_master_id"]) { $promotion_code_ref_name = $master["ref_name"]; break; } } }
require_once("inc/class.phpmailer.php"); //send password to member
$email_to_customer_subject = $campaign{"companyname_en"} . " - Complete " . $campaign["name_en"] . " Survey"; //email content to customer ob_start();
?>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="Generator" content="Microsoft Word 15 (filtered medium)"> <!--[if !mso]> <style>v\: * { behavior: url(#default#VML); }
o\: * { behavior: url(#default#VML); }
w\: * { behavior: url(#default#VML); }
.shape { behavior: url(#default#VML); } </style><![endif]--> <style><!-- /* Font Definitions */ @font-face { font-family: Helvetica; panose-1: 2 11 6 4 2 2 2 2 2 4; }
@font-face { font-family: 新細明體; panose-1: 2 2 5 0 0 0 0 0 0 0; }
@font-face { font-family: "Cambria Math"; panose-1: 2 4 5 3 5 4 6 3 2 4; }
@font-face { font-family: Calibri; panose-1: 2 15 5 2 2 2 4 3 2 4; }
@font-face { font-family: "\@新細明體"; panose-1: 2 2 5 0 0 0 0 0 0 0; }
@font-face { font-family: "MS PGothic"; panose-1: 2 11 6 0 7 2 5 8 2 4; }
@font-face { font-family: "\@MS PGothic"; panose-1: 2 11 6 0 7 2 5 8 2 4; }
/* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm; margin-bottom: .0001pt; font-size: 12.0pt; font-family: "MS PGothic", sans-serif; mso-fareast-language: JA; }
a:link, span.MsoHyperlink { mso-style-priority: 99; color: blue; text-decoration: underline; }
a:visited, span.MsoHyperlinkFollowed { mso-style-priority: 99; color: purple; text-decoration: none none; }
span.hide-for-small { mso-style-name: hide-for-small; }
span.EmailStyle18 { mso-style-type: personal-reply; font-family: "Calibri", sans-serif; color: #1F497D; }
.MsoChpDefault { mso-style-type: export-only; font-size: 10.0pt; }
@page WordSection1 { size: 612.0pt 792.0pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; }
div.WordSection1 { page: WordSection1; }
.desc img{ width: 100%; }
.container1 p{ margin-bottom: 0; }
body{ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important; } --></style> <!--[if gte mso 9]> <xml> <o:shapedefaults v:ext="edit" spidmax="1028"/> </xml><![endif]--><!--[if gte mso 9]> <xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout> </xml><![endif]--></head> <body lang="ZH-TW" style="background:#e4e6ea;"> <div class="WordSection1"> <div> <div align="center"> <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="width:600px;min-width:200px"> <tr> <td style="background:white;padding:0cm 0cm 0cm 0cm;border-collapse:collapse!important"> <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="600" style=" width: 600px; margin: 0 auto;height:75.0pt;border-collapse:collapse;border-collapse:collapse!important"> <tr> <td style="background:#1a3363;padding:7.5pt 15.0pt 0.5pt 15.0pt;border-spacing:0; text-align:center;"> <a href="#" target="_blank" title="SINOMAX"><img border="0" id="_x0000_i1027" src="<?=$site_info["url"]?>images/email1.png" alt="SINOMAX"></a> </td> </tr> </table>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="600" style="width:450.0pt;border-collapse:collapse;border-collapse:collapse!important;"> <tr> <td style="background:white;border-spacing:0"> <div style="background:#1a3363;"><img style="vertical-align: top;" border="0" id="_x0000_i1027" src="<?=$site_info["url"]?>images/email2.png" alt="SINOMAX"></div>
<div style="margin: 0 auto;border-left: 10px solid #1a3363;border-right: 10px solid #1a3363; text-align: center;" class="container1"> <div style="width: 310px;max-width: 310px;margin: 0 auto; text-align: left;"> <p style="margin-top: 0;"> <?php if (empty($user_name)) { $user_name_en = "Sir / Madam"; $user_name_tc = "先生 / 女士";
echo "Dear " . ($user_name_en) . "/ 尊貴的" . ($user_name_tc) . ","; } else { $user_name_en = $user_name; $user_name_tc = $user_name;
echo "Dear / 尊貴的" . strtoupper($user_name_en) . ","; } ?>
</p>
<div class="desc"> <br> <?php if (!empty($campaign["desc4_en"])) { echo $campaign["desc4_en"] . "<br><br>"; }
if (!empty($campaign["desc4_tc"])) { echo $campaign["desc4_tc"] . "<br><br>"; } ?> </div>
<p> <?php if ($campaign["user_login"] != "NOT_REQUEST_LOGIN" && !empty($_SESSION["survey_vip_code"])) { echo "VIP ID / VIP編號: " . $_SESSION["survey_vip_code"] . " <br/>"; } ?>
Campaign Name / 活動名稱: <?= $campaign["name_en"] ?><br/> Participation Date / 參加日期: <?= date("d/m/Y") ?><br/>
<?php if ($campaign["enable_get_points"] == 1 && $give_points_success) {
$points = $campaign["get_points"]; echo "Earned / 已獲取S-Dollar: " . $points . "<br/>"; }
//promotion code if ($campaign["enable_promotion_code"] == 1 && !empty($promotion_code)) {
echo "Promotion Code / 優惠代碼: " . $promotion_code . "<br/>"; echo "Discount Details / 折扣詳情: " . $promotion_code_ref_name . "<br/>"; }
?>
</p>
<br> </div>
</div>
</td>
</tr>
</table>
<div style="background:#1a3363;"><img border="0" id="_x0000_i1027" src="<?=$site_info["url"]?>images/email3.png" alt="SINOMAX"></div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="600" style="width:450.0pt;border-collapse:collapse;word-break:break-word;border-left: 10px solid #1a3363;border-right: 10px solid #1a3363;background:#1a3363;"> <tbody> <tr> <td align="center" valign="middle" style="padding:6.5pt 2.5pt 2.5pt 2.5pt;border-spacing:0em;font-size:22px;color: #fff;">
DOWNLOAD OUR MOBILE APP </td> </tr> <tr> <td align="center" valign="middle" style="padding:7.5pt 17.5pt 0pt 17.5pt;border-spacing:0em;"> <a href="https://itunes.apple.com/hk/app/sinomax/id972941924"><img src="<?= $site_info["url"] ?>images/app_store.png" border="0" alt="App Store" height="35" style="height: 35px;"></a><a href="https://play.google.com/store/apps/details?id=com.sinomax.app" style="margin-left: 50px;"><img src="<?= $site_info["url"] ?>images/google_play.png" border="0" alt="Google play" height="35" style="height: 35px;"></a>
</td> </tr> </tbody> </table>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="600" style="width:450.0pt;border-collapse:collapse;word-break:break-word"> <tbody> <tr> <td valign="top" style="padding:12.5pt 17.5pt 7.5pt 17.5pt;border-spacing:0em;font-size:8.5pt;text-align: center;color:#FFFFFF;background: #1a3363;"> <div class="copyright fl"> <a href="https://www.facebook.com/SinomaxLife/"><img src="<?= $site_info["url"] ?>images/fb.png" border="0" width="42" alt="Facebook"></a><img src="<?= $site_info["url"] ?>images/survey_icon_line.png" border="0" height="25"><a href="https://www.youtube.com/channel/UCPIbTu7Zs1w6jMGBOe4YrCg"><img src="<?= $site_info["url"] ?>images/survey_icon_youtube.png" alt="YouTube" width="42" border="0"></a><img src="<?= $site_info["url"] ?>images/survey_icon_line.png" border="0" height="25"><a href="http://eshop.sinomax.com"><img src="<?= $site_info["url"] ?>images/survey_icon_cart.png" border="0" width="42" alt="eSHOP"></a><br><br>Copyright 2016 © Sinomax Health and Household Products Limited. All Rights Reserved.<br><br> 如欲取消訂閱推廣電郵,請以該電郵地址發電郵至<a href="mailto:cs@sinomax.com" style="color:#FFFFFF;">cs@sinomax.com</a>,並清楚列明「取消訂閱推廣電郵」。
You can choose to opt out of receiving email from SINOMAX at any time. Please send an email to <a href="mailto:cs@sinomax.com" style="color:#FFFFFF;">cs@sinomax.com</a> from the email address you wish to unsubscribe by stating "Unsubscribe me from email marketing" in email.
</div> </td> </tr> </tbody> </table> </td> </tr> </table> </div> </div> </div> </body> </html>
<?php $email_customer_body = ob_get_contents();
ob_end_clean(); $enquiryemail = $campaign{"sender_email"}; $company_name = $campaign{"companyname_en"};;
//for customer $x_mail = new PHPMailer();
/*$x_mail->IsSMTP(); $x_mail->Host = "localhost"; $x_mail->SMTPAuth = true;*/
$x_mail->IsSMTP(); // Set mailer to use SMTP $x_mail->Host = 'smtp.sendgrid.net'; // Specify main and backup server $x_mail->Port = 587; // Set the SMTP port $x_mail->SMTPAuth = true; // Enable SMTP authentication $x_mail->Username = 'garricklam1'; // SMTP username $x_mail->Password = 'garrick1'; // SMTP password $x_mail->SMTPSecure = 'tls';
$x_mail->CharSet = "UTF-8"; $x_mail->Sender = $enquiryemail; $x_mail->AddReplyTo($enquiryemail, $company_name); $x_mail->From = $enquiryemail; $x_mail->FromName = $company_name;
//send to user not send to client $x_mail->AddAddress($user_email, $user_name); $x_mail->AddBCC("kelvinchan@onesolution.com.hk", $company_name);
$x_mail->WordWrap = 50; $x_mail->IsHTML(true); $x_mail->Subject = $email_to_customer_subject; $x_mail->Body = $email_customer_body; $x_mail->Send();
/*if ($x_mail->Send()) { echo "<script type='text/javascript'>alert('We have sent a survey reward email to you. Please check your email account.\\n 我們已發出優惠碼到你的電郵地址。請到你的電郵地址戶口檢查郵件。');top.location.href='thankyou.php';</script>"; exit; } else { echo "<script type='text/javascript'>alert('Survey reward email cannot send out. Please contact us for further details.\\n優惠碼未能發送到你的電郵地址,請與我們聯絡。');top.location.href='thankyou.php';</script>"; exit; }*/ }
header("Location: thankyou.php?id=" . $id); exit;
/*if ($campaign["enable_get_points"] == 1 && $campaign["enable_promotion_code"] == 1 && $give_points_success && !empty($promotion_code)) {
echo "<script type='text/javascript'>alert('You have got promotion code and Sinomax member points.\\n你已獲取優惠代碼和積分獎勵。');location.href='thankyou.php?id=" . $id . "';</script>";
} else if ($campaign["enable_get_points"] == 1) { //add points to vip code $points = $campaign["get_points"]; if ($points > 0) { if ($give_points_success) { //success echo "<script type='text/javascript'>alert('You have got Sinomax member points.\\n你已獲取積分獎勵。');location.href='thankyou.php?id=" . $id . "';</script>"; exit; } else { //fail echo "<script type='text/javascript'>alert('Cannot get Sinomax member points.\\n獲取積分獎勵不成功。');location.href='thankyou.phpid=" . $id . "';</script>"; exit; } } } else { header("Location: thankyou.php?id=" . $id); exit; }*/
|