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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
|
<?php include('_init.php');
$id = (int)$_GET["id"];
$sql = "select *,tutor_main.id as id2, mtcode1.name_en as residence_en, mtcode1.name_cn as residence_cn, mtcode1.extra1 as residence_master from tutor_main INNER JOIN master_type_code mtcode1 ON mtcode1.id = tutor_main.mas_residencecode where tutor_main.id = ? and tutor_main.status = ? and tutor_main.deleted = ? and tutor_main.approved = ?"; $parameters = array($id, 4, 0, 1); $tutor = bind_pdo($sql, $parameters, "selectone");
if (empty($tutor)) { echo "<script>alert('" . _lang("Cannot find tutor information!") . "'); location.href='index.php';</script>"; exit; }
$teaching_venue = get_teaching_venue($id); $teaching_mode = get_teaching_mode($id); $teaching_instrument = get_teaching_instrument($id);
if (isset($_GET["category_id"]) && (int)$_GET["category_id"] > 0 || $teaching_instrument[0]['mas_instrument']) { $category_id = $_GET["category_id"] ? $_GET["category_id"] : $teaching_instrument[0]['mas_instrument']; $sql = "select * from tutor_charge INNER JOIN master_type_code ON tutor_charge.mas_instrument = master_type_code.id where tutor_charge.mas_instrument = ? and tutor_charge.deleted = ?"; $parameters = array($category_id, 0); $row_instrument = bind_pdo($sql, $parameters, "selectone"); $payment_instrument = $row_instrument['name_' . $langcode]; $tutor_expectcharge = get_tutor_expectcharge($id, $_GET["category_id"], "tfee"); foreach ($tutor_expectcharge as $row2) { $trail_fee_grade = get_master_type_code("TRIAL_FEE_GRADE", $row2["grade_name"]); //if ($_SESSION["is_tutor"] != 1) { if ($row2['charge_30min'] > 0) { if ($row2['charge_30min'] < $payment_charge || !$payment_charge) { $payment_charge = $row2['charge_30min']; $payment_min = '30'; $payment_level = $trail_fee_grade['name_' . $langcode]; $payment_level_id = $trail_fee_grade['id']; } } if ($row2['charge_45min'] > 0) { if ($row2['charge_45min'] < $payment_charge || !$payment_charge) { $payment_charge = $row2['charge_45min']; $payment_min = '45'; $payment_level = $trail_fee_grade['name_' . $langcode]; $payment_level_id = $trail_fee_grade['id']; } } if ($row2['charge_60min'] > 0) { if ($row2['charge_60min'] < $payment_charge || !$payment_charge) { $payment_charge = $row2['charge_60min']; $payment_min = '60'; $payment_level = $trail_fee_grade['name_' . $langcode]; $payment_level_id = $trail_fee_grade['id']; } } //} } }
//$tutor_resdience_master = get_master_type_code("TEACH_AREACODE", $tutor["residence_master"]); //var_dump($tutor);
/*$start_date = new DateTime($tutor["dob_year"] . "-" . $tutor["dob_mon"]); $since_start = $start_date->diff(new DateTime()); $tutor_age = $since_start->y;
$year_range = get_master_type_code("YEAR_RANGE"); $tutor_year_range = "";
foreach ($year_range as $range) { if (empty($tutor_year_range) && $tutor_age <= $range["extra1"]) { $tutor_year_range = $range["name_" . $langcode]; } }*/
$tutor_year_range_info = get_tutor_year_range($tutor["dob_year"], $tutor["dob_mon"]); $tutor_year_range = $tutor_year_range_info["tutor_year_range"];
$tutor_expstudentage = get_tutor_expstudentage($id); $instrument_qualification = get_instrument_qualification($id); $teaching_area = get_teaching_area($id);
$teaching_area_master = array();
foreach ($teaching_area as $row) { $teachareacode = get_master_type_code("TEACH_AREACODE", $row["extra1"]); $teachareacode = $teachareacode["name_" . $langcode];
if (!in_array($teachareacode, $teaching_area_master)) { $teaching_area_master[] = $teachareacode; } }
$areas = get_master_type_code("TEACH_AREACODE");
$url = $site_info["url"];
$instrument = ''; if (!empty($teaching_instrument)) { foreach ($teaching_instrument as $key => $row) { $instrument .= $row["name_" . $langcode]; if (($key + 1) != count($teaching_instrument)) { $instrument .= ", "; } } }
$sql = "select *, student_postjob.id as studentpostjob_id, master_type_code.name_" . $langcode . " as instrument_name from student_postjob INNER JOIN master_type_code ON master_type_code.id = student_postjob.mas_instrument where student_postjob.studentmain_id = ? and student_postjob.status = ? and student_postjob.deleted = ? and student_postjob.approved = ?"; $parameters = array($_SESSION["student_login"], 1, 0, 1); $student_post_jobs = bind_pdo($sql, $parameters, "selectall"); ?> <!DOCTYPE html> <html lang="en"> <head> <?php echo $meta = ' <meta property="fb:app_id" content="1136003943104680"/> <meta property="og:title" content="' . $tutor["nickname"] . '-' . $instrument . '"/> <meta property="og:type" content="website"/> <meta property="og:url" content="' . $url . 'profile.php?id=' . $id . '&v=1"/> <meta property="og:image" content="' . $url . 'file/teacher/' . $tutor["profilephoto_path"] . '"/> <link rel="image_src" type="image/jpeg" href="' . $url . 'file/teacher/' . $tutor["profilephoto_path"] . '"/> <meta name="description" content="' . $tutor["self_describemyself"] . " " . $tutor["self_intro"] . '" /> <meta property="og:description" content="' . $tutor["self_describemyself"] . " " . $tutor["self_intro"] . '" /> <meta name="keywords" content="' . $tutor["nickname"] . '-' . $instrument . '"> <meta property="og:updated_time" content="' . time() . '" />'; ?> <?php include('_head.php'); ?> <link href="css/style_k.css?v=<?= time(); ?>" type="text/css" rel="stylesheet"> <style> .navbar-default { background-color: #000000 !important; border-color: #e7e7e7 !important;; }
#accumulate_tutorial_hours_table { width: 100%; border-collapse: collapse; }
#accumulate_tutorial_hours_table td, #accumulate_tutorial_hours_table th { padding: 5px; }
.fb-share-button { position: relative; top: 9px; left: 15px; } </style> </head>
<body> <?php include('_header.php') ?> <?php include('_dialog.php') ?> <div id="course_payment_box" class="panel panel-default"> <form action="_process.php" id="LiProfileAdminMsg" method="post" style="margin-bottom:0px;"> <input type="hidden" name="action" value="profile_adminmsg"/> <div class="header panel-heading"> <?= _lang("Please login first. If you have any problem, you can call 9446 0817 with Whatsapp to contact us.") ?> </div> <div class="panel-body"> <div style="font-weight:bold; text-align:center; margin-bottom:15px;">或<br> 留言給導師</div> <div> <textarea name="msg"></textarea> <div style="color:#F00; display:none;" class="error" id="msgError">請輸入你的留言。</div> </div> <div>電郵地址</div> <div> <input type="text" name="email" value=""> <div style="color:#F00; display:none;" class="error" id="emailError">請輸入你的電郵</div> <div style="color:#F00; display:none;" class="error" id="emailError2">請檢查電郵格式。</div> <div style="color:#F00; display:none;" class="error" id="emailError3">你的電郵已有人使用。</div> </div> <div>電話號碼</div> <div> <input type="text" name="tel" value="" maxlength="8"> <div style="color:#F00; display:none;" class="error" id="mobnoError">請輸入手提電話號碼。</div> <div style="color:#F00; display:none;" class="error" id="mobnoError2">手提電話應是數字。</div> </div> <div>#如果要我們的導師快速配對顧問服務,請致電3460 4105。</div> <button class="PayTutorBTN2 btn btn-primary" type="submit" style="margin-top:5px; margin-bottom:5px;">提交 </button> <div> <div class="PayTutorBTN3 btn btn-danger">取消</div> </div> </div> </form> </div> <div class="ProfileContent"> <div class="Profilecontainer">
<div style="margin-bottom: 10px;"> <div class="fl page_breadcrumbs"><a href="index.php" class="default_a"><?= _lang("Home") ?></a> > <a href="category.php" class="default_a"><?= _lang("Learn") ?></a> > <?= $tutor["nickname"] ?></div> <div id="displaying_text" class="fr"></div> <div class="clearboth"></div> </div>
<div class="row"> <div class="col-sm-12"> <div class="Profile" style="min-height: 320px;"> <div class="row"> <div class="col-sm-5" id="ProfileImg"> <?php if (!empty($tutor["profilephoto_path"])) {
?> <a id="fancybox_profile_img" href="file/teacher/<?= $tutor["profilephoto_path"] ?>"> <div class="profile_img_container tutor_img" style="display: none;"> <div class=" " style="background: url(file/teacher/<?= $tutor["profilephoto_path"] ?>) center center no-repeat; background-size: cover; width: inherit; height: inherit;"></div> </div> </a> <div> <img class="tutor_img2" style="display: none;" src="file/teacher/<?= $tutor["profilephoto_path"] ?>"> </div>
<?php } ?>
<div style="text-align: left; margin-top: 10px;"> <?php echo '<button class="ContactTutorBTN" type="button" onclick="contact_tutor();" style="margin-bottom:5px; width: auto !important;">' . _lang("Contact Tutor") . '</button>'; ?> <div id="fb-root" style="display: inline-block;"></div> <script>(function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/zh_HK/sdk.js#xfbml=1&version=v2.7"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-share-button" data-href="<?= $url . 'profile.php?id=' . $id . '&v=' . time() ?>" data-layout="button_count" data-size="large" data-mobile-iframe="true"> <a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?= $url . 'profile.php?id=' . $id . '&v=' . time() ?>&src=sdkpreparse">分享</a> </div> </div>
</div> <div class="col-sm-7"> <div class="ProfileInfo"> <div class="TutorName"> <div class="row"> <div class="col-sm-12" style="color: #D90018; "> <?= $tutor["nickname"] ?> </div> </div> </div> <div class="profile_text1"> <?= _lang("Tutor Code") . ": " . $tutor["tutor_no"] . "<br>" ?>
<?= _lang("Gender") . ": " . ($tutor["gender"] == "m" ? _lang("Male") : _lang("Female")) ?> <?= _lang("Age") . ": " . $tutor_year_range; ?> </div>
<div class="ProfileDetail capitalize margin0"> <div class="col-sm-12 padding0"> <?= strtolower(_lang("WHERE I TEACH")) ?> : <?php foreach ($teaching_area_master as $key => $row) {
echo $row; if (($key + 1) != count($teaching_area_master)) { echo " / "; } }
echo "<br>";
echo strtolower(_lang("TEACHING MUSICAL INSTRUMENTS")) . ": ";
if (!empty($teaching_instrument)) { foreach ($teaching_instrument as $key => $row) { echo $row["name_" . $langcode]; if (($key + 1) != count($teaching_instrument)) { echo ", "; } } }
echo "<br>";
echo _lang("Email Verification") . ': <span class="glyphicon glyphicon-ok-circle" aria-hidden="true" style="color: green;"></span> ' . _lang("Phone Verification") . ': <span class="glyphicon glyphicon-ok-circle" aria-hidden="true" style="color: green;"></span><br>';
?> </div> </div>
<div class="clearboth"></div> <hr style="margin: 10px 0;"> <!-- TutorIntro --> <div class="ProfileDetail" style="font-size: 20px; line-height: 120%;word-wrap: break-word;"> <?php echo nl2br($tutor["self_describemyself"]); ?> <!--<br> test test test test 中文 中文 <br> test test test test 中文 中文 <br> test test test test 中文 中文--> </div> </div> </div> </div> </div> </div>
<?php /* ?> <div class="col-sm-4"> <div class="ProfileSection fast_checkout"> <div style="font-size:18px; color: #D90018; font-weight:bold; text-align:center;">優惠體驗班</div> <hr style="margin: 8px 0;">
<div class="ProfileSectionTitle" style="float:left; margin-right:5px;color: #00994B;">樂器 :</div> <div class="AboutMeMessage" style="float:left;"><?= $payment_instrument ?></div> <div style="clear:both;"></div>
<div class="ProfileSectionTitle" style="float:left; margin-right:5px;color: #00994B;">級別 :</div> <div class="AboutMeMessage" style="float:left;"><?= $payment_level ?></div> <div style="clear:both;"></div>
<div class="ProfileSectionTitle" style="float:left; margin-right:5px;color: #00994B;">時數 :</div> <div class="AboutMeMessage" style="float:left;"><?= $payment_min . lang('mins') ?></div> <div style="clear:both;"></div>
<div class="ProfileSectionTitle" style="float:left; margin-right:5px;color: #00994B;">堂數 :</div> <div class="AboutMeMessage" style="float:left;">2</div> <div style="clear:both;"></div> <hr style="margin: 8px 0;"> <? if ($_SESSION["is_student"] == 1) { ?> <form action="fastpaypal.php" class="LiCodeForm" method="post" style="margin-bottom:0px;"> <input type="hidden" name="time" value="<?= aes_crypt($payment_min, 1) ?>"> <input type="hidden" name="instrument" value="<?= aes_crypt($_GET['category_id'], 1) ?>"> <input type="hidden" name="level" value="<?= aes_crypt($payment_level_id, 1) ?>"> <input type="hidden" name="tutor" value="<?= aes_crypt($tutor['id2'], 1) ?>">
<div class="ProfileSectionTitle" style="float:left; margin-right:5px;">每堂收費 :</div> <div class="AboutMeMessage" style="float:left;"> <span style="font-size:20px;color: #D90018;">$<span class="money"><?= $payment_charge ?></span></span> </div> <div style="clear:both;"></div>
<div class="ProfileSectionTitle">折扣優惠碼 : <input type="text" name="code" value="" style="width: 80px;line-height: 100%;"> <button class="btn btn-default exchange" style="padding: 0px 5px; background-color: #dddddd;"> 兌換 </button> </div>
<div style="color:#F00; display:none;" class="error" id="couponError"> 請輸入正確的優惠劵號碼 </div> <div style="color:#F00; display:none;" class="error" id="couponError2"> *$20優惠已滿額,多謝支持。有興趣學習音樂的同學,可以輸入 "INKY50" 以半價體驗兩堂音樂班。 </div> <div style="clear:both;"></div>
<div class="ProfileSectionTitle" style="float:left; margin-right:5px;font-size: 19px;font-weight: bold;"> 總收費 : </div> <div class="AboutMeMessage" style="float:left;"> <span class="orgmoney" style="display:none;"><?= $payment_charge ?></span> <span style="font-size:14px; color: #000; text-decoration:line-through; display:none;" class="oldprice">$<span class="money"></span></span> <span style="font-size:20px;color: #D90018;" class="nowprice">$<span class="money"><?= $payment_charge * 2 ?></span></span> </div> <div style="clear:both;"></div>
<button class="PayTutorBTN2 btn btn-primary paypal_loading" type="submit" style="margin-bottom:5px; margin-top:9px; background-color: #00994B; padding: 3px 12px;"> 繼續付款 </button> </form> <? } else { ?> <div class="course_payment_box"> <form action="fastpaypal.php" class="LiAdminMsg" method="post" style="margin-bottom:0px;"> <input type="hidden" name="time" value="<?= aes_crypt($payment_min, 1) ?>"><input type="hidden" name="instrument" value="<?= aes_crypt($_GET['category_id'], 1) ?>"><input type="hidden" name="level" value="<?= aes_crypt($payment_level_id, 1) ?>"><input type="hidden" name="tutor" value="<?= aes_crypt($tutor['id2'], 1) ?>"> <div class="header panel-heading">請先登入為學生。按 <div class="inline pointer" style="color: blue; text-decoration: underline;font-weight: bold" onclick="_login()"> 此 </div> 登入。<br>或<br>請提供電郵地址及手提電話號碼,我們將盡快為你提供協助。 </div> <div class="panel-body"> <div>電郵地址</div> <div><input type="text" name="email" value=""> <div style="color:#F00; display:none;" class="error" id="emailError"> 請輸入你的電郵 </div> <div style="color:#F00; display:none;" class="error" id="emailError2"> 請檢查電郵格式。 </div> <div style="color:#F00; display:none;" class="error" id="emailError3"> 你的電郵已有人使用。 </div> </div> <div>電話號碼</div> <div><input type="text" name="tel" value="" maxlength="8"> <div style="color:#F00; display:none;" class="error" id="mobnoError"> 請輸入手提電話號碼。 </div> <div style="color:#F00; display:none;" class="error" id="mobnoError2"> 手提電話應是數字。 </div> </div> <button class="PayTutorBTN2 btn btn-primary" type="submit" style="margin-top:5px; margin-bottom:5px;"> 聯絡管理員 </button> <div> <div class="PayTutorBTN3 btn btn-danger">取消</div> </div> </div> </form> </div>
<div class="ProfileSectionTitle" style="float:left; margin-right:5px;">每堂收費 :</div> <div class="AboutMeMessage" style="float:left;"> <span style="font-size:20px;color: #D90018;">$<span class="money"><?= $payment_charge ?></span></span> </div> <div style="clear:both;"></div>
<div class="ProfileSectionTitle">折扣優惠碼 : <input type="text" name="code" value="" style="width: 80px;line-height: 100%;"> <button class="btn btn-default exchange" style="padding: 0px 5px; background-color: #dddddd;"> 兌換 </button> </div>
<div style="color:#F00; display:none;" class="error" id="couponError"> 請輸入正確的優惠劵號碼 </div> <div style="color:#F00; display:none;" class="error" id="couponError2"> *$20優惠已滿額,多謝支持。有興趣學習音樂的同學,可以輸入 "INKY50" 以半價體驗兩堂音樂班。 </div> <div style="clear:both;"></div>
<div class="ProfileSectionTitle" style="float:left; margin-right:5px;font-size:19px;font-weight: bold;"> 總收費 : </div> <div class="AboutMeMessage" style="float:left;"> <span class="orgmoney" style="display:none;"><?= $payment_charge ?></span> <span style="font-size:14px; color: #000; text-decoration:line-through; display:none;" class="oldprice">$<span class="money"></span></span> <span style="font-size:20px;color: #D90018;" class="nowprice">$<span class="money"><?= $payment_charge * 2 ?></span></span> </div> <div style="clear:both;"></div>
<button class="PayTutorBTN2 btn btn-primary" type="button" onclick="open_payment_tutor($(this),<?= ($payment_charge * 2) ?>)" style="margin-bottom:5px; margin-top:9px;background-color: #00994B; font-size: 18px; font-weight: bold; border-radius: 15px; border-color: #00994B;padding: 3px 12px;"> 繼續付款 </button> <? } ?>
<img src="img/payment_method.jpg" alt="" style="width:100%; margin-top:10px;"/></form> </div> </div> <?php */ ?>
</div> </div> <div class="Profilecontainer"> <div class="row"> <div class="col-sm-8"> <?php if (!empty($tutor["youtube"])) { ?> <div id="youtube" class="ProfileSection"> <iframe width="100%" height="300" src="https://www.youtube.com/embed/<?= $tutor["youtube"] ?>?rel=0" frameborder="0" allowfullscreen></iframe> </div> <?php } ?> <div class="ProfileSection"> <div class="ProfileSectionTitle"> <?= _lang("ABOUT ME") ?> </div> <div class="AboutMeMessage"> <?= nl2br($tutor["self_intro"]) ?> </div> </div> <div class="ProfileSection"> <div class="ProfileSectionTitle"> <?= _lang("TEACHING VENUE AND MODE") ?> </div> <div class="TutorSubjects"> <div class="Subject"> <?= _lang("VENUE") ?> : <?php if (!empty($teaching_venue)) { foreach ($teaching_venue as $key => $row) { echo $row["name_" . $langcode]; if (($key + 1) != count($teaching_venue)) { echo ", "; } } } ?> </div> </div> <div class="TutorSubjects"> <div class="Subject"> <?= _lang("MODE") ?> : <?php if (!empty($teaching_mode)) { foreach ($teaching_mode as $key => $row) { //only show one to one if ($row["id"] != 1) continue; else echo $row["name_" . $langcode];
/*echo $row["name_" . $langcode]; if (($key + 1) != count($teaching_mode)) { echo ", "; }*/ } } ?> </div> </div> </div> <div class="ProfileSection"> <div class="ProfileSectionTitle"> <?= _lang("Other Information") ?> </div> <div class="AboutMeMessage"> <?php echo _lang("Expected Student Age") . ": ";
foreach ($tutor_expstudentage as $key => $row) { echo $row["name_" . $langcode]; if (($key + 1) != count($tutor_expstudentage)) { echo ", "; } }
echo "<br>";
echo _lang("Rent Musical Instruments") . ": " . ($tutor["cansupplyinstrument"] == 1 ? _lang("Provided") : _lang("Not Provided")) . "<br>"; echo _lang("Accompany") . ": " . ($tutor["canaccompany"] == 1 ? _lang("Provided") : _lang("Not Provided")); ?> </div> </div> <div class="ProfileSection"> <div class="ProfileSectionTitle" style="padding-bottom: 10px;"> <?= _lang("Trial Fee") ?> </div> <div class="AboutMeMessage"> <?php if (!empty($teaching_instrument)) { echo '<ul class="nav nav-tabs">'; foreach ($teaching_instrument as $key => $row) { echo '<li class="' . ($key == 0 ? "active" : "") . '"><a href="#instrument_trial_' . $key . '" class="instrument_' . $row["mas_instrument"] . '">' . $row["name_" . $langcode] . '</a></li>'; } echo '</ul>'; }
if (!empty($teaching_instrument)) { echo '<div class="tab-content">'; foreach ($teaching_instrument as $key => $row) { $tutor_expectcharge = get_tutor_expectcharge($id, $row["mas_instrument"], "tfee");
echo '<div id="instrument_trial_' . $key . '" class="tab-pane fade ' . ($key == 0 ? "in active" : "") . '">';
echo '<div class="table-responsive"> <table class="table"> <thead> <tr> <th width="25%">' . _lang("Grade") . '</th> <th width="25%">' . _lang("30 mins") . '</th> <th width="25%">' . _lang("45 mins") . '</th> <th width="25%">' . _lang("60 mins") . '</th> </tr> </thead> <tbody>'; foreach ($tutor_expectcharge as $row2) { $trail_fee_grade = get_master_type_code("TRIAL_FEE_GRADE", $row2["grade_name"]);
if ($row2["grade_name"] == 1) { $grade_name = '1 - 2'; } else if ($row2["grade_name"] == 2) { $grade_name = '3 - 5'; } $expaypalform1 = ''; $expaypalform2 = ''; $expaypalform3 = ''; $boxform = '<input type="hidden" name="instrument" value="' . aes_crypt($row2['mas_instrument'], 1) . '"/><input type="hidden" name="level" value="' . aes_crypt($row2["grade_name"], 1) . '"/><input type="hidden" name="tutor" value="' . aes_crypt($tutor['id2'], 1) . '"/><div class="header panel-heading" style="font-size:18px; color: #D90018; font-weight:bold; text-align:center;">優惠體驗班</div><div class="panel-body"><div class="fast_checkout" style="padding: 0px !important;"> <div class="ProfileSectionTitle" style="float:left; margin-right:5px; color: #00994B;">樂器 :</div> <div class="AboutMeMessage" style="float:left;">' . $row['name_' . $langcode] . '</div> <div style="clear:both;"></div>
<div class="ProfileSectionTitle" style="float:left; margin-right:5px; color: #00994B;">級別 :</div> <div class="AboutMeMessage payment_level" style="float:left;">' . $grade_name . '</div> <div style="clear:both;"></div>
<div class="ProfileSectionTitle" style="float:left; margin-right:5px; color: #00994B;">時數 :</div> <div class="AboutMeMessage" style="float:left;"><span class="payment_min"></span>' . lang('mins') . '</div> <div style="clear:both;"></div>
<div class="ProfileSectionTitle" style="float:left; margin-right:5px; color: #00994B;">堂數 :</div> <div class="AboutMeMessage" style="float:left;">2</div> <div style="clear:both;"></div>
<hr style="margin: 8px 0;"> <div class="ProfileSectionTitle" style="float:left; margin-right:5px;">每堂收費 :</div> <div class="AboutMeMessage" style="float:left;"> <span style="font-size:20px;color: #D90018;">$<span class="orgmoney">60</span></span> </div> <div style="clear:both;"></div> <div class="ProfileSectionTitle"> 折扣優惠碼 : <input type="text" name="code" value="" style="width: 80px;line-height: 100%; height:23px; margin-left:5px;"><button class="btn btn-default exchange" style="padding: 0px 5px; background-color: #dddddd; margin-left:5px;">兌換</button><div style="color:#F00; display:none;" class="error" id="couponError">' . _lang('請輸入正確的優惠劵號碼') . '</div><div style="color:#F00; display:none;" class="error" id="couponError2"> *$20優惠已滿額,多謝支持。有興趣學習音樂的同學,可以輸入 "INKY50" 以半價體驗兩堂音樂班。 </div></div> <div class="ProfileSectionTitle" style="float:left; margin-right:5px;font-size: 19px;font-weight: bold;">總收費 :</div> <div class="AboutMeMessage" style="float:left;"> <span style="font-size:14px; color: #000; text-decoration:line-through; display:none;" class="oldprice">$<span class="money"></span></span> <span style="font-size:20px;color: #D90018;" class="nowprice">$<span class="money">120</span></span> </div><div style="clear:both;"></div>'; if ($_SESSION["is_tutor"] != 1 && $_SESSION["is_student"] == 1) { $boxform .= '<button class="PayTutorBTN2 btn btn-primary paypal_loading" type="submit" style="margin-bottom:5px; margin-top:10px;">繼續付款</button>'; $expaypalform2_1 = ''; $expaypalform2_2 = ''; $expaypalform2_3 = ''; } else { $boxform .= '<button class="PayTutorBTN2 btn btn-primary " type="button" onclick="open_content_tutor($(this),200)" style="margin-bottom:5px; margin-top:10px;">繼續付款</button>';
$boxform2 = '<input type="hidden" name="instrument" value="' . aes_crypt($row2['mas_instrument'], 1) . '"/><input type="hidden" name="level" value="' . aes_crypt($row2["grade_name"], 1) . '"/><input type="hidden" name="tutor" value="' . aes_crypt($tutor['id2'], 1) . '"/><div class="header panel-heading" style="white-space: normal; font-size:14px;">請先登入為學生。按<div class="inline pointer" style="color: blue; text-decoration: underline;font-weight: bold" onclick="_login()"> 此 </div> 登入。<br>或<br>請提供電郵地址及手提電話號碼,我們將盡快為你提供協助。</div><div class="panel-body"><div>電郵地址</div><div><input type="text" name="email" value=""><div style="color:#F00; display:none;" class="error" id="emailError">' . _lang("Please enter email.") . '</div><div style="color:#F00; display:none;" class="error" id="emailError2">' . _lang("Please check email format.") . '</div><div style="color:#F00; display:none;" class="error" id="emailError3">' . _lang("This email has used by someone.") . '</div></div><div>電話號碼</div><div><input type="text" name="tel" value="" maxlength="8"><div style="color:#F00; display:none;" class="error" id="mobnoError">' . _lang("Please enter mobile number.") . '</div><div style="color:#F00; display:none;" class="error" id="mobnoError2">' . _lang("Mobile number should be digital number.") . '</div></div><div style="clear:both;"></div><button class="PayTutorBTN2 btn btn-primary" type="submit" style="margin-top:5px; margin-bottom:5px;">聯絡管理員</button><div style="clear:both;"></div><div class="PayTutorBTN3 btn btn-danger">取消</div></div>'; $expaypalform2_1 = '<div class="course_payment_box2"><form action="fastpaypal.php" class="LiAdminMsg" method="post" style="margin-bottom:0px;"><input type="hidden" name="time" value="' . aes_crypt(30, 1) . '"/>' . $boxform2 . '</form></div>'; $expaypalform2_2 = '<div class="course_payment_box2"><form action="fastpaypal.php" class="LiAdminMsg" method="post" style="margin-bottom:0px;"><input type="hidden" name="time" value="' . aes_crypt(45, 1) . '"/>' . $boxform2 . '</form></div>'; $expaypalform2_3 = '<div class="course_payment_box2"><form action="fastpaypal.php" class="LiAdminMsg" method="post" style="margin-bottom:0px;"><input type="hidden" name="time" value="' . aes_crypt(60, 1) . '"/>' . $boxform2 . '</form></div>'; } $boxform .= '<div style="clear:both;"></div><div class="PayTutorBTN3 btn btn-danger">取消</div></div></div>'; /*$expaypalform1 = '<button class="PayTutorBTN" type="button" onClick="open_payment_tutor($(this),' . $row2["charge_30min"] . ',30)">立即上堂</button><div class="course_payment_box"><form action="fastpaypal.php" class="LiCodeForm" method="post" style="margin-bottom:0px;"><input type="hidden" name="time" value="' . aes_crypt(30, 1) . '"/>' . $boxform . '</form></div>' . $expaypalform2_1; $expaypalform2 = '<button class="PayTutorBTN" type="button" onClick="open_payment_tutor($(this),' . $row2["charge_45min"] . ',45)">立即上堂</button><div class="course_payment_box"><form action="fastpaypal.php" class="LiCodeForm" method="post" style="margin-bottom:0px;"><input type="hidden" name="time" value="' . aes_crypt(45, 1) . '"/>' . $boxform . '</form></div>' . $expaypalform2_1; $expaypalform3 = '<button class="PayTutorBTN" type="button" onClick="open_payment_tutor($(this),' . $row2["charge_60min"] . ',60)">立即上堂</button><div class="course_payment_box"><form action="fastpaypal.php" class="LiCodeForm" method="post" style="margin-bottom:0px;"><input type="hidden" name="time" value="' . aes_crypt(60, 1) . '"/>' . $boxform . '</form></div>' . $expaypalform2_1;*/
$expaypalform1 = '<button class="PayTutorBTN" type="button" onClick="contact_tutor();">立即上堂</button><div class="course_payment_box"><form action="fastpaypal.php" class="LiCodeForm" method="post" style="margin-bottom:0px;"><input type="hidden" name="time" value="' . aes_crypt(30, 1) . '"/>' . $boxform . '</form></div>' . $expaypalform2_1; $expaypalform2 = '<button class="PayTutorBTN" type="button" onClick="contact_tutor();">立即上堂</button><div class="course_payment_box"><form action="fastpaypal.php" class="LiCodeForm" method="post" style="margin-bottom:0px;"><input type="hidden" name="time" value="' . aes_crypt(45, 1) . '"/>' . $boxform . '</form></div>' . $expaypalform2_1; $expaypalform3 = '<button class="PayTutorBTN" type="button" onClick="contact_tutor();">立即上堂</button><div class="course_payment_box"><form action="fastpaypal.php" class="LiCodeForm" method="post" style="margin-bottom:0px;"><input type="hidden" name="time" value="' . aes_crypt(60, 1) . '"/>' . $boxform . '</form></div>' . $expaypalform2_1;
echo '<tr> <td>' . ($trail_fee_grade["name_" . $langcode]) . '</td> <td>' . ($row2["charge_30min"] > 0 ? "$" . $row2["charge_30min"] . $expaypalform1 : _lang("N/A")) . '</td> <td>' . ($row2["charge_45min"] > 0 ? "$" . $row2["charge_45min"] . $expaypalform2 : _lang("N/A")) . '</td> <td>' . ($row2["charge_60min"] > 0 ? "$" . $row2["charge_60min"] . $expaypalform3 : _lang("N/A")) . '</td> </tr>'; }
echo '</tbody> </table> </div>'; echo '</div>'; } echo '</div>'; } ?> </div> </div> <div class="ProfileSection"> <div class="ProfileSectionTitle" style="padding-bottom: 10px;"> <?= _lang("Expected Fee") ?> </div> <div class="AboutMeMessage"> <?php if (!empty($teaching_instrument)) { echo '<ul class="nav nav-tabs">'; foreach ($teaching_instrument as $key => $row) { echo '<li class="' . ($key == 0 ? "active" : "") . '"><a href="#instrument_' . $key . '" class="instrument_' . $row["mas_instrument"] . '">' . $row["name_" . $langcode] . '</a></li>'; } echo '</ul>'; }
if (!empty($teaching_instrument)) { echo '<div class="tab-content">'; foreach ($teaching_instrument as $key => $row) { $tutor_expectcharge = get_tutor_expectcharge($id, $row["mas_instrument"], "fee");
echo '<div id="instrument_' . $key . '" class="tab-pane fade ' . ($key == 0 ? "in active" : "") . '">';
echo '<div class="table-responsive"> <table class="table"> <thead> <tr> <th width="25%">' . _lang("Grade") . '</th> <th width="25%">' . _lang("30 mins") . '</th> <th width="25%">' . _lang("45 mins") . '</th> <th width="25%">' . _lang("60 mins") . '</th> </tr> </thead> <tbody>'; foreach ($tutor_expectcharge as $row2) { echo '<tr> <td>' . $row2["grade_name"] . '</td> <td>' . ($row2["charge_30min"] > 0 ? "$" . $row2["charge_30min"] : _lang("N/A")) . '</td> <td>' . ($row2["charge_45min"] > 0 ? "$" . $row2["charge_45min"] : _lang("N/A")) . '</td> <td>' . ($row2["charge_60min"] > 0 ? "$" . $row2["charge_60min"] : _lang("N/A")) . '</td> </tr>'; }
echo '</tbody> </table> </div>'; echo '</div>'; } echo '</div>'; } ?> </div> </div> <div class="ProfileSection"> <div class="ProfileSectionTitle" style="padding-bottom: 10px;"> <?= _lang("Visit Home Additional Fee") ?> </div> <div class="AboutMeMessage"> <?php if (!empty($areas)) { echo '<ul class="nav nav-tabs">'; foreach ($areas as $key => $row) { echo '<li class="' . ($key == 0 ? "active" : "") . '"><a href="#area_' . $key . '" >' . $row["name_" . $langcode] . '</a></li>'; } echo '</ul>'; }
if (!empty($areas)) { echo '<div class="tab-content">';
foreach ($areas as $key => $row) {
$sql = "select * from master_type_code where typeid = ? and extra1 = ? and deleted = ?"; $parameters = array('RESIDENCE_POSITIONCODE', $row['code'], 0); $rows_position = bind_pdo($sql, $parameters, "selectall");
echo '<div id="area_' . $key . '" class="tab-pane fade ' . ($key == 0 ? "in active" : "") . '">';
foreach ($teaching_area as $row2) { if ($row2["extra1"] == $row["code"]) { echo '<div class="col-md-3" ' . ((float)$row2["studenhome_addcharge"] > 0 ? 'style="color: #D90018; font-weight: bold;"' : '') . '>' . $row2["name_" . $langcode] . ' $' . (float)$row2["studenhome_addcharge"] . '</div>'; } }
echo '</div>'; } echo '</div>'; } ?> </div> </div> </div> <div class="col-sm-4"> <div class="ProfileSection"> <div class="ProfileSectionTitle"> <?= _lang("MUSICAL INSTRUMENTS RESUME") ?> </div> <?php if (!empty($instrument_qualification)) { foreach ($instrument_qualification as $row) { echo '<div class="TutorSubjects"> <div class="Subject">' . $row["instrument_name"] . '</div> <div class="SubjectLevel">' . _lang("Level") . ": " . $row["grade_name"] . '</div> </div>'; } } ?> </div> <div class="ProfileSection"> <div class="ProfileSectionTitle uppercase"> <a class="fancybox1" href="#accumulate_tutorial_hours" style="text-decoration: none; color: inherit;"> <?= _lang("Accumulate Tutorial Hours") ?> <span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span></a></div> <div class="SectionContent"> <div><!--<span class="glyphicon glyphicon-time" aria-hidden="true"></span>--> <span class="stars"> <?= $tutor["stars"] ?> </span></div> <!--<div><span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span> 15 Positive Review </div>--> </div> </div> <div class="ProfileSection"> <div class="ProfileSectionTitle"> <?= _lang("LAST LOGIN") ?> </div> <div class="SectionContent"> <?= get_last_login_date($tutor["cmsloginid"]) ?> </div> </div> <div class="ProfileSection"> <div class="ProfileSectionTitle"> <?= _lang("WHERE I TEACH") ?> </div> <div class="SectionContent"> <?php if (!empty($teaching_area)) { foreach ($teaching_area as $row) { echo '<li>' . $row["name_" . $langcode] . '</li>'; } } ?> </div> </div> </div> </div> </div> </div> <?php if (isset($_SESSION["cmsloginid"]) && isset($_SESSION["is_student"]) && $_SESSION["is_student"] == 1) { ?> <div id="contact_tutor_chat_box" style="display: none; overflow-x: hidden;"> <div class="row"> <div class="col-md-12"> <h3 class="tc"> <?= _lang("Leave Message for Tutor") ?> </h3> <?php if (empty($student_post_jobs)) { echo "請先<a href='webadmin/student_postjob_form.php'>發求學帖子</a>。<br>"; } ?> <?= _lang("選擇已發出的求學帖子") ?> : <select name="job_id" id="job_id"> <option value="">--- <?= _lang("Please Select") ?> --- </option> <?php foreach ($student_post_jobs as $row) { echo "<option value='" . $row["studentpostjob_id"] . "'>" . _lang("Job No.") . ": " . $row["postjob_no"] . " " . $row["instrument_name"] . " " . _lang("Level") . ": " . $row["level"] . "</option>"; } ?> </select> <br> <br> <p style="font-size: 16px;"> <?= _lang("Tutor") . ": " . $tutor["nickname"]; ?> ,<br> </p> <textarea style="width:100%;" rows="5" name="content" id="content" placeholder="<?= _lang("Please note the tips below.") ?>"></textarea> <div class="tr"> <div style="font-size: 12px; color: red;"> <?= _lang("Mobile no, email address and any contact is not allowed during the conversation.") ?> </div> <button class="ContactTutorBTN" type="button" onclick="contact_tutor_submit();" style="margin-top: 10px;"> <?= _lang("Submit") ?> </button> </div> <?php if ($_SESSION["wlangcode"] == "en") { ?> <p style="color: #0012ff;font-size:12px; font-weight:100;">*Tips:<br> 1) Before confirmation and payment for trial lesson, the tutor and student will only have 5 conversation chances <br> 2) We suggest both parties to chat based on the following topics: <br> <span style="padding-left: 20px;"></span>a) Learning location b) Lesson time c) Music background d) Learning objective e) e) Arrangement of instrument and teaching material </p> <?php } else { ?> <p style="color: #0012ff;font-size:12px; font-weight:100;">*提示:<br> 1)於付款確定試堂前,導師與學生有5次來回對話機會 <br> 2)我們建議雙方於對話中就以下內容進行商討: <br> <span style="padding-left: 20px;"></span>a) 教學地點 b) 上課時間 c) 履歷及背景 d) 學習目的 e) 教材及樂器安排 </p> <?php } ?> </div> </div> </div> <?php } ?> <div id="accumulate_tutorial_hours" style="display:none;"> <h4><b>累積上課時數</b></h4> <p> 導師跟學生於MusicCircle進行配對後,會開始學習階段。當中每次透過MusicCircle 付款的時數,都會記錄於MusicCircle的系統內,導師累積時數愈多,導師排名愈高。 </p> <h4><b>累積時數的星級分配</b></h4> <p> MusicCircle會每天總結導師的累積時數,並按比例地分配各導師所得的星級,比例如下: </p> <table id="accumulate_tutorial_hours_table"> <tr> <th>星級</th> <th class="nowrap">導師比例</th> <th>例子(以100位導師計算)</th> </tr> <tr> <td><span class="stars">5</span></td> <td>20% (最高)</td> <td>累積時數排名第1-20位</td> </tr> <tr> <td><span class="stars">4</span></td> <td>30%</td> <td>累積時數排名第21-50位</td> </tr> <tr> <td><span class="stars">3</span></td> <td>30%</td> <td>累積時數排名第51-80位</td> </tr> <tr> <td><span class="stars">2</span></td> <td>10%</td> <td>累積時數排名第81-90位</td> </tr> <tr> <td><span class="stars">1</span></td> <td>10%</td> <td>累積時數排名第91-100位</td> </tr> </table> </div>
<div id="loading"><img src="img/loading_icon.gif" style="width: 100px;"></div>
<? include('_footer.php') ?> <link rel="stylesheet" href="js/fancybox/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen"/> <script type="text/javascript" src="js/fancybox/jquery.fancybox.pack.js?v=2.1.5"></script> <script type="text/javascript"> $(document).ready(function () { if ($("input[name='code']").val()) { $("input[name='code']").parent().children(".exchange").trigger("click"); }
$(".nav-tabs a").click(function () { $(this).tab('show'); }); $('.nav-tabs a').on('shown.bs.tab', function (event) { var x = $(event.target).text(); // active tab var y = $(event.relatedTarget).text(); // previous tab $(".act span").text(x); $(".prev span").text(y); });
<?php if(isset($_GET["category_id"]) && (int)$_GET["category_id"] > 0){ ?> $("body").find(".instrument_<?=(int)$_GET["category_id"]?>").click(); <?php } ?>
$(".fancybox1").fancybox({ maxWidth: 800, maxHeight: 350, fitToView: false, width: '100%', height: '100%', autoSize: false, closeClick: false, openEffect: 'none', closeEffect: 'none' });
//paypal loading $(".paypal_loading").on("click", function () { $('#loading').slideDown(100); }); }); $('.fast_checkout .exchange').click( function () { var thisform = $(this).parent(); var fee = Number($('.orgmoney', thisform.parent()).html()); var coupon_code = $('input[name="code"]', thisform).val(); jQuery.ajax({ url: '_ajax.php', type: 'POST', data: { ajax: "coupon", limit_type: 'try', fee: (fee * 2), coupon: coupon_code }, dataType: 'html', //dataType (default: Intelligent Guess (xml, json, script, or html)) timeout: 1000, error: function (result) { //alert('Error Occur. Please try again.'); //console.log(result.responseText); }, success: function (json) { var json = JSON.parse(json); console.log(json); if (json.status == false) { if (coupon_code.toUpperCase() == "INKY20" || coupon_code.toUpperCase() == "IMC$20") { $('#couponError2', thisform.parent()).show(); } else { $('#couponError', thisform.parent()).show(); }
$('.oldprice', thisform.parent()).hide(); $('.nowprice .money', thisform.parent()).html(fee * 2); } else if (json.status == true) { $('#couponError', thisform.parent()).hide(); $('#couponError2', thisform.parent()).hide(); $('.oldprice', thisform.parent()).show(); $('.oldprice .money', thisform.parent()).html(fee * 2); $('.nowprice .money', thisform.parent()).html(json.total); } } }); return false; } ); $('#LiProfileAdminMsg').submit( function () { var error = false; $('.error', this).hide(); if (!$('textarea[name="msg"]', this).val()) { $("#msgError", this).show(); error = true; } if (!$('input[name="email"]', this).val()) { $("#emailError", this).show(); error = true; } else if (!/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/.test($('input[name="email"]', this).val())) { $("#emailError2", this).show(); error = true; } if (!$('input[name="tel"]', this).val()) { $("#mobnoError", this).show(); error = true; } else { var num = $('input[name="tel"]', this).val(); if ($.isNumeric(num) == false) { $("#mobnoError2", this).show(); error = true; } } if (error == false) { return true; } else { return false; } } ); $('.LiAdminMsg').submit( function () { var error = false; $('.error', this).hide(); if (!$('input[name="email"]', this).val()) { $("#emailError", this).show(); error = true; } else if (!/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/.test($('input[name="email"]', this).val())) { $("#emailError2", this).show(); error = true; } if (!$('input[name="tel"]', this).val()) { $("#mobnoError", this).show(); error = true; } else { var num = $('input[name="tel"]', this).val(); if ($.isNumeric(num) == false) { $("#mobnoError2", this).show(); error = true; } } if (error == false) { return true; } else { return false; } } ); $('.PayTutorBTN3').click( function () { $(this).parent().parent().parent().parent().hide(); $('#LiFullbg').hide(); } ); function open_content_tutor(thisform) { //$('#LiFullbg').show(); $('.course_payment_box,.course_payment_box .error').hide(); $('.course_payment_box2', thisform.parent().parent().parent().parent().parent()).show(); } function open_payment_tutor(thisform, money, time) { return; $('#LiFullbg').show(); $('.course_payment_box input[name="code"]').val(''); $('.course_payment_box .error').hide(); $('.course_payment_box .oldprice').hide(); $('.course_payment_box,.course_payment_box .error').hide(); $('.course_payment_box', thisform.parent()).show(); $('.course_payment_box .payment_min').html(time); $('.course_payment_box .orgmoney', thisform.parent()).html(money); $('.course_payment_box .nowprice .money', thisform.parent()).html((money * 2)); } function payment_tutor(time, instrument, level, tutor) { if (confirm('你確認購買嗎?')) { location.href = 'fastpaypal.php?time=' + time + '&instrument=' + instrument + '&level=' + level + '&tutor=' + tutor; } } function contact_tutor() { <?php if($detect->isMobile() && !$detect->isTablet() && !isset($_SESSION["request_pc"]) && !isset($_SESSION["cmsloginid"])) { ?> location.href = "index_user.php"; return false; <?php } else{ ?> //check if user login <?php if(!isset($_SESSION["cmsloginid"])){?> $('#LiFullbg').show(); $('#course_payment_box .error').hide(); $('#course_payment_box').show(); <? //echo "alert('" . _lang("Please login first. If you have any problem, you can call 9446 0817 with Whatsapp to contact us.") . "'); return;"; }else if(!isset($_SESSION["is_student"]) || $_SESSION["is_student"] == 0){ echo "alert('" . _lang("You are not a student. You cannot contact tutor.") . "'); return;"; }else { ?> //popup box $.fancybox({ //settings 'type': 'inline', 'maxWidth': 800, 'maxHeight': 420, 'fitToView': false, 'width': '90%', 'height': '90%', 'autoSize': false, 'closeClick': false, 'openEffect': 'none', 'closeEffect': 'none', 'href': '#contact_tutor_chat_box' }); <?php } ?> <?php } ?>
}
function contact_tutor_submit() { var tutor_id = <?=!empty($id) ? $id : ""?>; var content = $("#content").val(); var job_id = $("#job_id").val();
if (!job_id) { alert("<?=_lang("Please select job.");?>"); return; }
if (!tutor_id) { alert("<?=_lang("Cannot find tutor id.");?>"); return; }
if (!content) { alert("<?=_lang("Please enter message.");?>"); return; }
jQuery.ajax({ url: '_ajax.php', type: 'POST', data: { ajax: "contact_tutor_submit", job_id: job_id, tutor_id: tutor_id, content: content, }, dataType: 'html', //dataType (default: Intelligent Guess (xml, json, script, or html)) timeout: 1000, error: function (result) { alert('Error Occur. Please try again.'); console.log(result.responseText); }, success: function (result) { //$('#loading').slideUp(100); //console.log(result); alert(result); $.fancybox.close(); } }); }
function resizeImage() { //console.log($(window).width()); if ($(window).width() <= 768) { $(".tutor_img").hide(); $(".tutor_img2").show(); } else { $(".tutor_img").show(); $(".tutor_img2").hide(); }
//$(".tutor_img2").show(); }
resizeImage();
$(window).resize(function () { resizeImage(); });
$(function () { $("#job_id").on("change", function () {
var job_id = $(this).val(), tutor_id = "<?=$id?>";
jQuery.ajax({ url: '_ajax.php', type: 'POST', data: { ajax: "check_contact", job_id: job_id, tutor_id: tutor_id, }, dataType: 'html', //dataType (default: Intelligent Guess (xml, json, script, or html)) timeout: 1000, error: function (result) { //alert('Error Occur. Please refresh and try again.'); console.log(result.responseText); }, success: function (result) { //$('#loading').slideUp(100); //console.log(result); var json = result, obj = JSON.parse(json);
if (obj.error == 1) { alert("Missing job id or tutor id."); } else { if (obj.matched_musical_instrument) { if (parseInt(obj.count_chat) > 0) { location.href = "webadmin/chat_index.php?type=1&first_chat_id=" + obj.first_chat_id; } else {
} } else { $("#job_id").val("");
alert("<?=_lang("Your job requirement does not match teaching musical instruments of tutor. You do not allow to chat with tutor.")?>");
$.fancybox.close();
} } //alert(result); } }); });
$.fn.stars = function () { return $(this).each(function () { $(this).html($('<span />').width(Math.max(0, (Math.min(5, parseFloat($(this).html())))) * 16)); }); };
$('span.stars').stars();
$("#fancybox_profile_img").fancybox({}); });
function _login() { $(".course_payment_box,.course_payment_box2").hide(); $("#LiLoginMenu").click(); $("#LiFullbg").hide(); } <? if($_SESSION['profile_msg'] == true){?> alert('你的聯絡資料已被記錄,我們將盡快與你聯絡。'); <? unset($_SESSION['profile_msg']); }?> </script> </body> </html>
|