Repository navigation
Expand file tree
/
Copy pathcustomer-payment.php
More file actions
1981 lines (1722 loc) · 117 KB
/
Copy pathcustomer-payment.php
File metadata and controls
1981 lines (1722 loc) · 117 KB
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
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
include("include/header.php");
if (!isset($_SESSION['fb_id'])) {
include 'fbmain.php';
}
session_start();
ob_start();
//print_r($_GET);
?>
<?php
if(!isset($_COOKIE["subscribe"]))
header("location:".SITE_URL);
if ($_GET['item'] != "") {
$prod_id = $_GET['item'];
$multi_deal_id = $_GET['mid'];
$_SESSION['prod_id'] = $_GET['item'];
$_SESSION['mid'] = $_GET['mid'];
$sql_prod = "SELECT * FROM ".TABLE_DEALS." WHERE status >= 1 AND deal_id = '".$prod_id."' LIMIT 0, 1";
$prod_res = mysql_fetch_array(mysql_query($sql_prod));
// select multi deal if has
if ($prod_res['is_multi'] == 'y') {
if ($_GET['mid'] != '') {
$sql_is_multi = "SELECT * FROM getdeals_multi_deals WHERE deal_id = ".$prod_res['deal_id']." AND multi_deal_id = ".$multi_deal_id;
$is_multi = mysql_fetch_array(mysql_query($sql_is_multi));
} else {
header('location:'.SITE_URL);
}
}
//$prod_res['is_multi'] == 'n' ? number_format($prod_res['discounted_price'], 2) : number_format($is_multi['multi_deal_item_price'], 2)
/*$sql_todays_buy = "SELECT SUM(qty) FROM ".TABLE_TRANSACTION." WHERE deal_id = ".$today_res['deal_id'];
$total_buy = mysql_fetch_array(mysql_query($sql_todays_buy));
$sql_todays_image = "SELECT * FROM ".TABLE_DEAL_IMAGES." WHERE deal_id = ".$today_res['deal_id'];
$todays_image = mysql_fetch_array(mysql_query($sql_todays_image));*/
}
else {
header('location:'.SITE_URL);
}
/*if (isset($_POST['Submit']) && $_POST['Submit'] == 'Send as Gift') {
$_SESSION['gift_mail'] = $_POST['frndemail'];
$_SESSION['gift_name'] = $_POST['frndname'];
$_SESSION['gift_msg'] = $_POST['frndmsg'];
}*/
if ($_GET['gift'] == 'gifting') {
$_SESSION['gift'] = 'gifting';
}
if ($_SESSION['gift'] == 'gifting') {
$_SESSION['header_location'] = SITE_URL.'customer-payment.php?item='.$_SESSION['prod_id'].'&gift='.$_SESSION['gift'];
} else {
$_SESSION['header_location'] = SITE_URL.'customer-payment.php?item='.$_SESSION['prod_id'];
}
?>
<!-- Login code starts -->
<?php
/*
$flag = 0;
if(strtolower($_SERVER['REQUEST_METHOD']) == 'post' && $_POST['btnLogin'] == "Log In")
{
$lemail = $_POST["lemail"];
$lpassword = $_POST["lpassword"];
if($flag == 0)
{
if($lemail == '')
{
$msg = 'Please enter email';
$flag = 1;
}
}
if($flag == 0)
{
if($lpassword == '')
{
$msg = 'Please enter password';
$flag = 1;
}
}
if($flag == 0)
{
$lpassword = base64_encode($lpassword);
$sql_select = "SELECT * FROM ".TABLE_USERS." WHERE email="."'".$lemail."' and password="."'".$lpassword."'";
$result_select = mysql_query($sql_select);
$count_select = mysql_num_rows($result_select);
if($count_select >0)
{
$row_select = mysql_fetch_array($result_select);
$user_id = $row_select["user_id"];
$_SESSION["user_id"] = $user_id;
if ($_SESSION['mid'] != '') {
header('location:'.SITE_URL.'customer-payment.php?item='.$_SESSION['prod_id'].'&mid='.$_SESSION['mid']);
} else {
header('location:'.SITE_URL.'customer-payment.php?item='.$_SESSION['prod_id']);
}
}
else
{
$msg = 'Invalid login';
$flag = 1;
}
}
}
*/
?>
<!-- Login code ends -->
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
<?php
if ($_GET['gift'] == 'gifting') {
?>
<div class="top_curve1_23"></div>
<div class="clear"></div>
<div class="mid_curve1_23">
<div class="signup_box1">
<p class="reset" style="padding: 0px 0 0 15px; line-height: 10px; margin: 0px 0 0 0; font: normal 13px Arial Rounded MT Bold;">
<span><img alt="" src="images/gift_pix.gif" align="absmiddle"></span>
<span style="line-height: 10px; padding: 0 0 0 10px;">Buy this deal as gift. All Jumblr deals are transferable!</span>
</p>
</div>
</div>
<div class="bot_curve1_23"></div>
<?php
}
?>
<div class="accounts">
<div class="accounts_top"></div>
<div class="accounts_mid">
<!--<p style="padding:0; margin: 7px 0 0 10px; font-family: Arial Rounded MT Bold; color: #ff7f22; font-size:30px;">Your Order </p>-->
<div class="white-container1" style="width:97%; margin: 10px auto 0 auto; background:#fff;">
<div>
<!-- <div class="start_savings"></div>-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="cart_box2">
<tr>
<td colspan="4" style="font: bold 15px/26px Arial, Helvetica, sans-serif; color:#000"><strong></strong></td>
</tr>
<tr>
<th width="395"><strong>Your Deal</strong></th>
<?php
if($prod_res['nowdeal_repeatday'])
{ ?>
<th width="95" style="border-right:0px;"><strong>Repeat date</strong></th><?php } ?>
<th width="95" style="border-right:0px;"><strong>Quantity</strong></th>
<th width="41" style="border-left:0px;"><strong></strong></th>
<th width="97" style="border-right:0px;"><strong>Price</strong></th>
<th width="11" style="border-left:0px;"><strong></strong></th>
<th width="371" align="left"><strong>Total</strong></th>
</tr>
<tr class="gray_01">
<td>
<script type="text/javascript">
function multiProdSelect(mid) {
var url = '<?php echo SITE_URL; ?>customer-payment.php?item=<?php echo $prod_res['deal_id']; ?>&mid='+mid+'';
window.open(url, "_self", "");
}
</script>
<?php
/*if ($_SESSION['gift_mail'] != NULL) {
echo '<img height="50" width="55" alt="" src="images/Giftbox.png" align="left">';
}*/
if ($prod_res['is_multi'] == 'y') {
if ($_GET['mid'] != '') {
$sql_is_multi_title = "SELECT * FROM getdeals_multi_deals WHERE deal_id = ".$prod_res['deal_id'];
echo '
<div style="width:290px;" class="styled_select left">
<select name="" style="width:310px;" onchange="return multiProdSelect(this.options[this.selectedIndex].id);">';
$is_multi_title_res = mysql_query($sql_is_multi_title);
while ($is_multi_title_row = mysql_fetch_array($is_multi_title_res)) {
echo '<option name="" value="'.$is_multi_title_row['multi_deal_item_name'].'" id="'.$is_multi_title_row['multi_deal_id'].'" '.($_GET['mid'] == $is_multi_title_row['multi_deal_id'] ? "selected=selected" : "").'>'.strip_tags($is_multi_title_row['multi_deal_item_name']).'</option>';
}
echo '
</div>
</select>';
}
} else {
echo strip_tags($prod_res['title']);
}
//echo strip_tags($prod_res['deal_id']);
?>
</td>
<?php
if($prod_res['nowdeal_repeatday'])
{
$rep_day=explode(",",$prod_res['nowdeal_repeatday']);
$cnt=count($rep_day);
?>
<td> <div class="styled_select" style="width:100px;">
<select style="background: transparent; width: 100px;" name="repeat_date" id="repeat_date" onchange="rep()">
<option value="">Select Date</option>
<?php for ($i = 0; $i < $cnt; $i++) {
if($rep_day[$i]>=date('Y-m-d'))
{
?>
<option value="<?php echo $i; ?>"><?php echo ($rep_day[$i]); ?></option>
<?php }
}
?>
</select>
</div> </td>
<?php
}
?>
<td><?php
if(!$_GET['buyout'])
{
?>
<div class="styled_select" style="width:60px;">
<select style="background: transparent; width: 80px;" name="amount" id="" onchange="ajaxReq(this.value);">
<?php for ($i = 1; $i <= 30; $i++) { ?>
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
<?php } ?>
</select>
</div>
<?php
}
else
{ echo $prod_res['max_coupons'];
?>
<?php } ?>
</td>
<td>x</td>
<td><?php echo getSettings(currency_symbol); ?><?php echo ($prod_res['is_multi'] == 'n' ? number_format($prod_res['discounted_price'], 2) : number_format($is_multi['multi_deal_item_price'], 2)); //number_format($prod_res['discounted_price'], 2); ?></td>
<td>=</td>
<td><div id="total_price"><?php echo getSettings(currency_symbol); ?><?php if(!$_GET['buyout']){echo ($prod_res['is_multi'] == 'n' ? number_format($prod_res['discounted_price'], 2) : number_format($is_multi['multi_deal_item_price'], 2));}else{ echo $buyout_price=number_format($prod_res['discounted_price']*$prod_res['max_coupons']); } ?></div></td>
</tr>
<!--<tr>
<td colspan="3" style="font: bold 15px/26px Arial, Helvetica, sans-serif; text-align:right;">Total Cost = </td>
<td style="font: bold 15px/26px Arial, Helvetica, sans-serif; text-align:right; text-align:left; padding-left:10px;">
<div id="big_total_price"><?php echo getSettings(currency_symbol); ?><?php echo strip_tags($prod_res['discounted_price']); ?></div>
<?php //echo $_SESSION['total_price']; ?>
</td>
</tr>-->
</table>
<br>
<?php if ($_GET['gift'] == 'gifting') : ?>
<a href="#giftdiv" id="gift" class="redemClass"><img alt="" src="images/icon_t.gif" align="bottom"> <b>Give this Jumblr as Gift</b></a>
<?php endif ?>
<div style="display: none;">
<div id="giftdiv" style="width:701px;height:px;overflow:auto; background-color: transparent;">
<?php //if (isset($_SESSION['user_id'])) {?>
<form action="" name="frmgift" method="post">
<div class="deal_recomm">
<div class="top_recomm">
<p>Buy it for a friend!</p>
</div>
<div class="clear"></div>
<div style="border-bottom: 3px solid #7fd7fb;"></div>
<div class="clear"></div>
<div class="recomm_mid" id="gift_response">
<div class="invita_deal">
<div><p style="font: bold 16px/16px Arial, Helvetica, sans-serif; padding: 14px 0 8px 0px; margin: 0;">Fill out the from below and give the gift of Jumblr!</p></div>
<div class="clear"></div>
</div>
<div class="invita_deal">
<div class="massage">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
<td><table width="100%" border="0" cellpadding="2" cellspacing="2">
<tbody><tr>
<td><p style="font: normal 14px/16px Arial, Helvetica, sans-serif; padding: 6px 0px; margin: 0;">To</p></td>
</tr>
<tr>
<td>
<input name="frndname" id="frndname" type="text" class="text_box12" style="width: 230px;"/>
<div id="name_error" class="error" style="display: none;">This field is required.</div>
</td>
</tr>
<tr>
<td><p style="font: normal 14px/16px Arial, Helvetica, sans-serif; padding: 6px 0px; margin: 0;">From <span style="font: normal 12px/16px Arial, Helvetica, sans-serif; padding: 10px 0px; margin: 0;">(Name you want the recipient to see)</span></p></td>
</tr>
<tr>
<td>
<input name="fromname" id="fromname" class="text_box12" style="width: 230px;" type="text">
</td>
</tr>
<tr>
<td><p style="font: normal 14px/16px Arial, Helvetica, sans-serif; padding: 6px 0px; margin: 0;">Delivery Method</p></td>
</tr>
<tr>
<td><input name="radiobutton" value="radiobutton" type="radio">
<span style="font: normal 12px/26px Arial, Helvetica, sans-serif; padding: 6px 0 20px 0px; margin: 0;">Email it to</span></td>
</tr>
<tr>
<td>
<input name="frndemail" id="frndemail" type="text" class="text_box12" style="width: 230px;"/>
<div id="email_error" class="error" style="display: none;">Please enter a valid email.</div>
</td>
</tr>
<tr>
<td><input name="radiobutton" value="radiobutton" type="radio">
<span style="font: normal 12px/26px Arial, Helvetica, sans-serif; padding: 10px 0 20px 0px; margin: 0;">I'll print it myself</span></td>
</tr>
<tr>
<td>
<input type="button" name="Submit" class="tellbtn" value="Save Details" onclick="return set_gift();"/>
<!-- <a href="javascript: void(0);" style="text-decoration: none;"><input type="button" name="close" class="tellbtn" value="Close" onclick=""/></a> -->
<!-- href="<?php echo SITE_URL; ?>customer-payment.php?item=<?php echo $prod_res['deal_id']; ?>&gift=gifting" -->
</td>
</tr>
<tr>
<td> </td>
</tr>
</tbody></table></td>
<td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
<td><p style="font: normal 14px/16px Arial, Helvetica, sans-serif; padding: 10px 0px; margin: 0;">Message <span style="font: normal 11px/26px Arial, Helvetica, sans-serif; padding: 10px 0 20px 0px; margin: 0;">(Maximum 350 characters)</span></p></td>
</tr>
<tr>
<td>
<textarea name="frndmsg" id="frndmsg" class="textareabg" style="width: 300px; height: 210px;"></textarea>
<div id="msg_error" class="error" style="display: none;">Please enter your message.</div>
</td>
</tr>
<tr>
<td><p style="font: normal 14px/16px Arial, Helvetica, sans-serif; padding: 10px 0px; margin: 0;">350 characters remaining</p></td>
</tr>
</tbody></table></td>
</tr>
</tbody></table>
</div>
</div>
</div>
<div class="clear"></div>
<div style="border-bottom: 3px solid #7fd7fb;"></div>
<div class="recomm_bot"></div>
</div>
</form>
<?php //} else { ?>
<!--
<div class="top_recomm">
<p>Please login to Gift deals to friends.</p>
</div>
<div class="clear"></div>
<div style="border-bottom: 3px solid #7fd7fb;"></div>
<div class="recomm_bot"></div>
-->
<?php //} ?>
</div>
</div>
<script type="text/javascript">
function set_gift() {
//alert('Hi'); return false;
//$('.error_orange').hide();
//$('.error').hide();
$('input.text-input').css({backgroundColor:"#FFFFFF"});
$('input.text-input').focus(function(){
$(this).css({backgroundColor:"#FFDDAA"});
});
$('input.text-input').blur(function(){
$(this).css({backgroundColor:"#FFFFFF"});
});
// validate and process form
// first hide any error messages
$('.error').hide();
var name = $("input#frndname").val();
var email = $("input#frndemail").val();
var details = $("textarea#frndmsg").val();
if (name == "" || email == "" || details == "") {
$("div#name_error").show();
$("div#email_error").show();
//$("div#enquery_error").show();
$("div#msg_error").show();
//$("div#phno_error").show();
// $("input#name").focus();
return false;
}
var dataString = 'name='+ name + '&email=' + email + '&details=' + details ;
//alert (dataString);return false;
$.ajax({
type: "POST",
url: "ajax_gift.php",
data: dataString,
success: function() {
$('#gift_response').html("<div id='message' class='message'></div>");
$('#message').html("<h2>Thank You</h2>")
.append("<p>Thanks for attaching details!</p>")
//.append("<p>If you don't hear from us within 7 working days then please contact us.</p>")
//.hide()
//.fadeIn(1500, function() {
// $('#message').append("<img id='checkmark' src='images/tick.png' />");
//});
}
});
return false;
}
</script>
<div style="width: 100%; height: auto; margin:0;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr style="height: 40px;">
<td style="color:#7fd7fc; font: normal 12px/18px Arial, Helvetica, sans-serif;" width="59%">
<?php
$chk_fb_sql = "SELECT * FROM ".TABLE_FB_USER." WHERE fb_id = '".$_SESSION['fb_id']."'";
$fb_query = mysql_fetch_array(mysql_query($chk_fb_sql));
$email = $fb_query['email'];
$chk_recom_vault_sql = "SELECT * FROM ".TABLE_CREDITS_VAULT." WHERE user_id = '$email'";
$recom_vault_query = mysql_query($chk_recom_vault_sql);
$chk_recom_vault_row = mysql_num_rows($recom_vault_query);
if ($chk_recom_vault_row > 0) {
?> <div id="redeem" style="width: 330px;" class="redemClass">
<p style="padding:0; margin:0 0 0 5px;"><a href="javascript: void(0);">Do you want to use your discount?</a></p>
</div><?php
}
?>
<div class="clear"></div>
<div id="redeem_div" style="width:330px; padding-top: 1px; display: none;">
<div style="width:150px; float: left; margin: 5px 0 0 5px;">
<?php
$dis_per=getSettings(discount)*100;
?>
<label><?php echo $dis_per.'% discount';?></label>
</div>
<?php
$discount=$prod_res['discounted_price']-($prod_res['discounted_price']*getSettings(discount));
?>
<div style="float: right; text-align:right; width: 130px; margin-top: 3px;"><input type="submit" class="tellbtn13" name="submit" value="Apply" id="discount" onclick="return change('<?php echo number_format($discount,2) ?>')"/></div><div id="disp" style="display:none">Discount will be deducted from purchase value</div>
</div>
</td>
<td style="font-family:Arial Rounded MT Bold; font-size: 14px; color: #333333; text-align:right; text-align:left; padding-left:10px;" width="65%">Total amount:</td>
<td style="font-family:Arial Rounded MT Bold; font-size: 20px; color: #000; text-align:left; padding-left:15px;" width="36%;">
<div id="big_total_price" style="text-align:right; padding-right: 15px;"><?php echo getSettings(currency_symbol); ?><?php if(!$_GET['buyout'])
{echo ($prod_res['is_multi'] == 'n' ? number_format($prod_res['discounted_price'], 2) : number_format($is_multi['multi_deal_item_price'], 2)); } else { echo $buyout_price=number_format($prod_res['discounted_price']*$prod_res['max_coupons']); } ?><span></span>
</div>
<?php //echo $_SESSION['total_price']; ?></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="accounts_bot"><img src="images/spacer.gif" alt="" width="1" height="9"/></div>
</div>
<script>
$("div#redeem").click(function () {
$("div#redeem_div").slideToggle(500);
});
/*$("p#close").click(function() {
$("div#redeem_div").slideUp(300);
}); */
$("div#redeem_div").ready(function() {
$("div#redeem_div").hide(0);
});
</script>
<div class="clear"></div>
<div class="accounts">
<div class="accounts_top"></div>
<div class="accounts_mid">
<?php if (!$_SESSION['fb_id']) { ?>
<p class="black_text1" style="color:#3A3B3D; margin: 5px 15px 0 0;"><a href="<?php echo $loginUrl; ?>"><img src="http://www.realestatenewport.com/assets/facebook-login-button-5c5750b27cc8759f735f49a5ad2a4263.png" alt="" align="top" /></a> Please login with Facebook to buy this deal. If you have an account on Facebook you can use it to log in.</p>
<?php } ?>
<div class="clear"></div>
<div class="register_box2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="vertical-align:top; padding:0px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<?php if (!isset($_SESSION['user_id'])) { ?>
<?php
if($flag !=0)
{
if($flag == 1)
{
?>
<div style="width:100%; height:45px; background-color:#fff; padding-top:4px; padding-left:30px;">
<label style="color:red;"><?php //echo "* ".$msg; ?> Please enter your details into the highlited boxes and you must agree with our Terms & Conditions.</label>
</div>
<?php
}
if($flag == 2)
{
//header('location:'.SITE_URL.'national_deals.php?acsucc=You\'ve successfully created your account. Welcome to Jumblr!');
?>
<div style="width:100%; height:45px; background-color:#fff;padding-top:4px; padding-left:30px; text-align: center;">
<label style="color:#006600;"><?php echo $msg; ?></label>
</div>
<?php
}
}
?>
<form action="thankyou.php" name="cust_register" id="cust_register" onkeyup="javascript: return hasValue();" onsubmit="javascript:return ValidateCcForm();" method="post" class="skinned-form-controls skinned-form-controls-mac" style="background:#fff; margin:0px; padding:0px; border:1px solid #fff;">
<div><h6 style="margin: 15px 0 15px 15px; background:none; font-size:24px; text-align:left;" >Choose Payment Method To Pay For Your Jumblr Voucher</h6></div>
<div style="border:1px solid #CCCCCC; margin:15px 0;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><form class="skinned-form-controls skinned-form-controls-mac"><table style="padding-top:15px;" width="100%" border="0" cellspacing="0" cellpadding="0">
<input type="hidden" maxlength="7" name="payment_amount" id="payment_amount" value="<?php echo (!$_GET['buyout'] ? ($prod_res['is_multi'] == 'n' ? number_format($prod_res['discounted_price'], 2) : number_format($is_multi['multi_deal_item_price'], 2)): number_format($prod_res['discounted_price']*$prod_res['max_coupons'], 2));?>">
<input type="hidden" name="paymentType" value="Sale" />
<tr>
<!--<td width="6%" align="left" valign="top" style="padding-left:12px;"><input type="radio" id="ccrad" name="payment_system" value="cc" checked="checked" style="z-index: 1000;"/></td>-->
<td width="18%" align="left" valign="middle" style="font: bold 13px/33px Arial, Helvetica, sans-serif;
color: #3a3b3d; padding-left: 15px;"><input style="margin-top: 7px;" type="radio" id="ccrad" name="payment_system" value="cc" checked="checked"/><span style="text-transform: uppercase; font-size:12px; padding-left:5px;"> Credit/Debit Card</span></td>
<td width="25%" align="left" valign="top"><img src="images/c_cards.gif" alt="" width="214" height="33" align="absmiddle"/></td>
<td style="padding-left: 15px; font: bold 13px/33px Arial, Helvetica, sans-serif;
color: #3a3b3d;" valign="top"><input style="margin-top: 7px;" type="radio" name="payment_system" id="maestro" value="maestro" />
<span style="text-transform: uppercase; font-size:12px; padding-left:5px;"> Maestro</span> <img src="images/payment_icon01.gif" alt="" width="51" height="33" align="absmiddle" /></td>
<td style="padding-left: 15px; font: bold 13px/33px Arial, Helvetica, sans-serif;
color: #3a3b3d;" valign="top"><input style="margin-top: 7px;" type="radio" name="payment_system" id="paypal" value="paypal" />
<span style="text-transform: uppercase; font-size:12px; padding-left:5px;"> Paypal</span> <img src="images/paypal.gif" alt="" width="51" height="33" align="absmiddle" /><br />
</td>
</tr>
</table></form></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="660">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="leftfrom" style="width:100%; <?php if (isset($_SESSION['user_id'])) { echo 'border: none;'; }?> ">
<tr>
<td style="vertical-align:top; padding:0px;">
<?php if (!isset($_SESSION['user_id'])) { ?>
<!-- Not Login Payment table starts -->
<!-- <form action="" name="frmccnotloginpayment" method="post" class="skinned-form-controls skinned-form-controls-mac" onsubmit="javascript: return ValidateCcForm();"> -->
<input type="hidden" maxlength="7" name="payment_amount" id="payment_amount" value="<?php echo (!$_GET['buyout'] ? ($prod_res['is_multi'] == 'n' ? number_format($prod_res['discounted_price'], 2) : number_format($is_multi['multi_deal_item_price'], 2)):number_format($prod_res['max_coupons']*$prod_res['discounted_price'],2)); ?>">
<input type="hidden" name="paymentType" value="Sale" />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="leftfrom" style="width:100%;">
<!--<tr>
<td><table style="padding-top:15px;" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6%" align="left" valign="top" style="padding-left:12px;"><input id="ccrad" name="payment_system" type="radio" value="cc" checked="checked"/></td>
<td width="18%" align="left" valign="top" style="font: bold 13px/20px Arial, Helvetica, sans-serif;
color: #3a3b3d;"><span style="text-transform: uppercase; font-size:12px;">Credit/Debit Card</span></td>
<td width="30%" align="left" valign="top"><img src="images/c_cards.png" alt="" width="112" height="19"/></td>
<td style="padding-left: 15px; font: bold 13px/20px Arial, Helvetica, sans-serif;
color: #3a3b3d;" valign="top"><input type="radio" name="payment_system" id="maestro" value="maestro" />
<span style="text-transform: uppercase; font-size:12px;">Maestro</span> <img src="images/payment_icon01.png" alt="" width="22" height="14" /></td>
<td style="padding-left: 15px; font: bold 13px/20px Arial, Helvetica, sans-serif;
color: #3a3b3d;" valign="top"><input type="radio" name="payment_system" id="paypal" value="paypal" />
<span style="text-transform: uppercase; font-size:12px;">Paypal</span> <img src="images/paypal.png" alt="" width="43" height="15" /><br />
</td>
</tr>
</table></td>
</tr>-->
<tr>
<td width="660">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!--<tr>
<td colspan="2" style="padding-left:14px;"><img src="images/payment_details.png" alt="" width="164" height="21"/></td>
</tr>
<tr>
<td style="font: normal 11px/14px Arial, Helvetica, sans-serif; color:#666666; padding-left:14px;" width="100%" colspan="2">Please provide your credit card information below</td>
</tr>-->
<!--<tr>
<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6%" align="left" valign="top" style="padding-left:14px;"><input id="ccrad" name="payment_system" type="radio" value="cc" checked="checked"/></td>
<td width="26%" align="left" valign="top">Credit/Debit Card</td>
<td width="68%" align="left" valign="top"><img src="images/c_cards.png" alt="" width="112" height="19"/></td>
</tr>
</table></td>
</tr>-->
<tr>
<!-- cc form -->
<td colspan="2"><table id="cc" style="margin: 0 0 0 20px;" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="width:auto;">
<tr>
<td width="100%" colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="width:auto;">
<tr>
<td width="315">CARDHOLDERS FIRST NAME</td>
<td>CARDHOLDERS LAST NAME</td>
</tr>
<tr>
<td><input type="text" size=30 maxlength=32 name=firstName id=firstName class="text_box123" style="width:285px;"/></td>
<td><input type="text" size=30 maxlength=32 name=lastName id=lastName class="text_box123" style="width:286px;"/></td>
</tr>
<tr>
<td><div id="payment_cc_firstName_errorloc" class="error_orange"></div></td>
<td><div id="payment_cc_lastName_errorloc" class="error_orange"></div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" colspan="2">ADDRESS LINE 1</td>
</tr>
<tr>
<td colspan="2">
<input type="text" maxlength=100 name=address1 id=address1 class="text_box12 width600"/>
</td>
</tr>
<tr>
<td colspan="2"><div id="payment_cc_address1_errorloc" class="error_orange"></div></td>
</tr>
<tr>
<td width="100%" colspan="2">ADDRESS LINE 2</td>
</tr>
<tr>
<td colspan="2">
<input type="text" maxlength=100 name=address2 id=address2 class="text_box12 width600"/>
</td>
</tr>
<tr>
<td colspan="2"><div id="payment_cc_address2_errorloc" class="error_orange"></div></td>
</tr>
<tr>
<td width="100%" colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="width:auto;">
<tr>
<td width="315">TOWN / CITY</td>
<td>POSTCODE</td>
</tr>
<tr>
<td><input type="text" maxlength=40 name=city id=city class="text_box123" style="width: 285px;"/></td>
<td><input type="text" maxlength=10 name=zip id=zip class="text_box123" style="width: 285px;" /></td>
</tr>
<tr>
<td><div id="payment_cc_city_errorloc" class="error_orange"></div></td>
<td><div id="payment_cc_zip_errorloc" class="error_orange"></div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="width:auto;">
<tr>
<td width="315">CARD NUMBER</td>
<!-- <td>CARD TYPE</td> -->
<td width="315" style="padding-left: 0px;">SECURITY CODE <a href="javascript: showDetails(10)" onmouseover="return overlib('<font class=bodytext><div class=tiptool12><div class=arrowright></div><div class=tip_top12></div><div class=clear></div><div class=tip_mid12><img src=images/toobg.gif style=padding-left:16px; /></div><div class=tip_bot12></div></div></font>',BORDER,'1');" onMouseOut="nd();"><img src="images/question.png" alt="" width="12" height="12" class="tips" original-title="3 digits security code"/></a></td>
</tr>
<tr>
<td><input type="text" maxlength="19" name="creditCardNumber" id="creditCardNumber" class="text_box12" style="width:285px" value=""/></td>
<td><input type="text" maxlength="4" name="cvv2Number" id="cvv2Number" class="text_box123" value="962" style="width:285px; margin-left: 0px;"/></td>
<!-- <td>
<div class="styled_select" style="width:135px;">
<select name="creditCardType" id="creditCardType" onChange="javascript:generateCC(); return false;" style="width:150px;">
<option value="Visa" selected>Visa</option>
<option value="MasterCard">MasterCard</option>
<option value="Discover">Discover</option>
<option value="Amex">American Express</option>
</select>
</div>
</td> -->
</tr>
<tr>
<td><div id="payment_cc_creditCardNumber_errorloc" class="error_orange"></div></td>
<!-- <td><div id="payment_cc_creditCardType_errorloc" class="error_orange"></div></td> -->
<td><div id="payment_cc_cvv2Number_errorloc" class="error_orange"></div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="width:auto;">
<tr>
<!-- <td width="315">SECURITY CODE <a href="javascript: showDetails(10)" onclick="return overlib('<font class=bodytext><div class=tiptool><div class=tip_top></div><div class=clear></div><div class=tip_mid><h2>Where can I find my card security code?</h2><ul><li><img src=images/card.gif style=padding-left:30px; /></li></ul></div><div class=tip_bot></div></div></font>',BORDER,'1');" onMouseOut="nd();"><img src="images/question.png" alt="" width="12" height="12" /></a></td> -->
<td>EXPIRY DATE</td>
</tr>
<tr>
<!-- <td><input type="text" maxlength="4" name="cvv2Number" id="cvv2Number" class="text_box123" value="962" style="width:285px;"/></td> -->
<td>
<div class="styled_select" style="width:140px; float:left; margin-right:10px;">
<select name="expDateMonth" id="expDateMonth" style="width:155px;">
<option value="000">Month</option>
<?php for ($m = 1; $m <= 12; $m++) { ?>
<option value="<?php echo $m; ?>"><?php echo $m; ?></option>
<?php } ?>
</select>
</div>
<div class="styled_select" style="width:140px; float:left;">
<select name="expDateYear" id="expDateYear" style="width:155px;">
<option value="000">Year</option>
<?php for ($y = date("Y"); $y <= date("Y")+10; $y++) { ?>
<option value="<?php echo $y; ?>"><?php echo $y; ?></option>
<?php } ?>
</select>
</div>
</td>
</tr>
<tr>
<!-- <td><div id="payment_cc_cvv2Number_errorloc" class="error_orange"></div></td> -->
<td><div id="payment_cc_expDateMonth_errorloc" class="error_orange"></div><div id="payment_cc_expDateYear_errorloc" class="error_orange"></div></td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<!-- maestro form -->
<!--<tr>
<td style="padding-left:15px;"><input type="radio" name="payment_system" id="maestro" value="maestro" />
Maestro <img src="images/payment_icon01.png" alt="" width="22" height="14" /></td>
</tr>-->
<tr>
<td colspan="2"><table id="maestro" style="margin: 0 0 0 20px;" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315">CARDHOLDERS FIRST NAME</td>
<td style="padding: 0 0 0 9px;">CARDHOLDERS LAST NAME</td>
</tr>
<tr>
<td><input type="text" size=30 maxlength=32 name=firstName id=firstName class="text_box123" style="width:282px;"/></td>
<td><input type="text" size=30 maxlength=32 name=lastName id=lastName class="text_box123" style="width:289px; margin: 0 0 0 7px;"/></td>
</tr>
<tr>
<td><div id="payment_maestro_firstName_errorloc" class="error_orange"></div></td>
<td><div id="payment_maestro_lastName_errorloc" class="error_orange"></div></td>
</tr>
<tr>
<td width="100%" colspan="2">ADDRESS LINE 1</td>
</tr>
<tr>
<td colspan="2">
<input type="text" maxlength=100 name=address1 id=address1 class="text_box12 width600"/>
</td>
</tr>
<tr>
<td colspan="2"><div id="payment_maestro_address1_errorloc" class="error_orange"></div></td>
</tr>
<tr>
<td width="100%" colspan="2">ADDRESS LINE 2</td>
</tr>
<tr>
<td colspan="2">
<input type="text" maxlength=100 name=address2 id=address2 class="text_box12 width600"/>
</td>
</tr>
<tr>
<td colspan="2"><div id="payment_maestro_address2_errorloc" class="error_orange"></div></td>
</tr>
<tr>
<td width="40%">TOWN / CITY</td>
<td width="50%" style="padding-left: 8px;">POSTCODE</td>
</tr>
<tr>
<td><input type="text" maxlength=40 name=city id=city class="text_box123" style="width: 289px;"/></td>
<td><input type="text" maxlength=10 name=zip id=zip class="text_box123" style="width: 289px; margin: 0 0 0 8px;" /></td>
</tr>
<tr>
<td><div id="payment_maestro_city_errorloc" class="error_orange"></div></td>
<td><div id="payment_maestro_zip_errorloc" class="error_orange"></div></td>
</tr>
<tr>
<td>CARD NUMBER</td>
<td style="padding-left: 8px;">SECURITY CODE <a href="javascript: showDetails(10)" onmouseover="return overlib('<font class=bodytext><div class=tiptool><div class=arrowright></div><div class=tip_top></div><div class=clear></div><div class=tip_mid><img src=images/toobg.gif style=padding-left:20px; /></div><div class=tip_bot></div></div></font>',BORDER,'1');" onMouseOut="nd();"><img src="images/question.png" alt="" width="12" height="12" class="tips" original-title="3 digits security code"/></a></td>
</tr>
<tr>
<td><input type="text" maxlength="19" name="creditCardNumber" id="creditCardNumber" class="text_box123" style="width:289px" value=""/></td>
<td><input type="text" maxlength="4" name="cvv2Number" id="cvv2Number" class="text_box123" value="962" style="width:289px; margin-left: 10px;"/></td>
<!-- <td>
<div class="styled_select" style="width:135px;">
<select name="creditCardType" id="creditCardType" onChange="javascript:generateCC(); return false;" style="width:150px;">
<option value="Visa" selected>Visa</option>
<option value="MasterCard">MasterCard</option>
<option value="Discover">Discover</option>
<option value="Amex">American Express</option>
</select>
</div>
</td> -->
</tr>
<tr>
<td><div id="payment_maestro_creditCardNumber_errorloc" class="error_orange"></div></td>
<!-- <td><div id="payment_cc_creditCardType_errorloc" class="error_orange"></div></td> -->
<td><div id="payment_maestro_cvv2Number_errorloc" class="error_orange"></div></td>
</tr>
<tr>
<td width="40%">VALID FROM</td>
<td width="50%" style="padding: 0 0 0 6px;">VALID UNTIL</td>
</tr>
<tr>
<td>
<div class="styled_select" style="width:140px; float:left; margin-right:0;">
<select name="valDateMonth" id="valDateMonth" style="width:155px;">
<?php for ($m = 1; $m <= 12; $m++) { ?>
<option value="<?php echo $m; ?>"><?php echo $m; ?></option>
<?php } ?>
</select>
</div>
<div class="styled_select" style="width:140px; float:right; margin-right:6px;">
<select name="valDateYear" id="valDateYear" style="width:155px;">
<?php for ($y = date("Y"); $y <= date("Y")+10; $y++) { ?>
<option value="<?php echo $y; ?>"><?php echo $y; ?></option>
<?php } ?>
</select>
</div>
<div style="clear: both;"></div>
<div class="error_orange" id="payment_maestro_valDateMonth_errorloc"></div>
<div class="error_orange" id="payment_maestro_valDateYear_errorloc"></div>
</td>
<td>
<div class="styled_select" style="width:140px; float:left; margin: 0 10px 0 10px;">
<select name="expDateMonth" id="expDateMonth" style="width:155px;">
<?php for ($m = 1; $m <= 12; $m++) { ?>
<option value="<?php echo $m; ?>"><?php echo $m; ?></option>
<?php } ?>
</select>
</div>
<div class="styled_select" style="width:140px; float:left; margin-right:10px;">
<select name="expDateYear" id="expDateYear" style="width:155px;">
<?php for ($y = date("Y"); $y <= date("Y")+10; $y++) { ?>
<option value="<?php echo $y; ?>"><?php echo $y; ?></option>
<?php } ?>
</select>
</div>
<div style="clear: both;"></div>
<div class="error_orange" id="payment_maestro_expDateMonth_errorloc"></div>
<div class="error_orange" id="payment_maestro_expDateYear_errorloc"></div>
</td>
</tr>
</tr>
<tr>
<td width="50%" colspan="2">ISSUE NUMBER</td>
</tr>
<tr>
<td colspan="2"><input type="text" name="issueno" id="issueno" class="text_box12" /></td>
</tr>
<tr>
<td colspan="2"><div class="error_orange" id="payment_maestro_issueno_errorloc"></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<!-- paypal -->
<!--<tr>
<td colspan="2" style="padding-left:15px;"><input type="radio" name="payment_system" id="paypal" value="paypal" />
Paypal <img src="images/paypal.png" alt="" width="43" height="15" /><br />
</td>
</tr>-->
<!-- <tr id="paypal">
<td style="font-size:11px;">paypal</td>
</tr> -->
<tr>
<td class="linkundrline" colspan="2" style="font-size:12px; padding-left:20px; font-weight: normal;">
By purchasing, you agree to the deal <a id="various3" href="#fine_print" style="color:3f48cc;">Fine Print </a>and the Jumblr <a href="<?php echo SITE_URL; ?>page.php?page=Terms and Conditions" style="color:3f48cc;">Terms & Conditions.</a>
</td>
</tr>
<tr>
<td colspan="2">
<div style="display: none; ">
<div id="fine_print" style=" background: #fff; border: 5px solid silver; height: 300pz; width: 410px; padding: 15px 15px;">
<h2 style="border-bottom:1px dashed #CCCCCC; padding-bottom:8px; margin-bottom:4px;">Deal Fine Print</h2>
<style>
.fine_style{
list-style-type: disc;
width: 92%;
margin: 0 auto;
}
</style>
<?php echo $prod_res['fineprint']; ?>
<!-- <ul class="fine_style">
<li>One per person.</li>
<li>May buy multiples as gifts.</li>
<li>Voucher valid for 1 month.</li>
<li>POstage costs an aditional <?php echo getSettings(currency_symbol); ?>4.95</li>
<li>Please allow up to 10 working days for delivery after redeeming.</li>
</ul> -->
<br/>
</div>
</div>
<div id="gateway_error_msg" class="error"></div>
<!-- paypal IPN values -->
<?php
//$amount = $_SESSION['total_price'];
$user_id = $_SESSION["user_id"];
$deal_id = $prod_res['deal_id'];
//$qty = $_SESSION['qty'];
$trn_date = date("Y-m-d H:i:s");
?>
<input type="hidden" id="frm_paypal_total_qty" name="item_number" value="<?php echo !$_GET['buyout']?1:$prod_res['max_coupons'];?>">
<input type="hidden" id="frm_paypal_total_price" name="amount" value="<?php echo (!$_GET['buyout']?($prod_res['is_multi'] == 'n' ? number_format($prod_res['discounted_price'], 2) : number_format($is_multi['multi_deal_item_price'], 2)):number_format($prod_res['max_coupons']*$prod_res['discounted_price'],2)); ?>">
<input type="hidden" name="custom" value="<?php echo $user_id.",".$deal_id.",".$trn_date; ?>">
<input type="hidden" name="item_name" value="<?php echo $prod_res['title']; ?>">
<input type="hidden" name="repeat_date_val" id="repeat_date_val" value="">
<input type="submit" name="Submit" value="Buy Now" class="buyu_btn07" style="margin-left:16px;"/> </td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</td>
<td width="260"><table style="padding-top: 40px;" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="40px">
<td style="color:#696969; font: normal 18px/44px Calibri, Arial, Helvetica, sans-serif;"><img src="images/green_thick.gif" alt="" width="20" height="17" style="padding-top: 5px;" />Your privacy is assured</td>
</tr>
<tr height="40px">
<td style="color:#696969; font: normal 18px/44px Calibri, Arial, Helvetica, sans-serif;"><img src="images/green_thick.gif" alt="" width="20" height="17" style="padding-top: 5px;"/>Get amazing deals daily</td>
</tr>
<tr height="40px">
<td style="color:#696969; font: normal 18px/44px Calibri, Arial, Helvetica, sans-serif;"><img src="images/green_thick.gif" alt="" width="20" height="17" style="padding-top: 5px;"/>Shop online with confidence</td>
</tr>
<tr height="40px">
<td style="color:#696969; font: normal 18px/44px Calibri, Arial, Helvetica, sans-serif;"><img src="images/green_thick.gif" alt="" width="20" height="17" style="padding-top: 5px;"/>Explorer the new side of life</td>
</tr>
</table></td>
</tr>
</table>