/var/www/hkosl.com/imusiccircle/index.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
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
<?php include('_init.php');
    
//unset($_SESSION["index_popup"]);

    
if(isset($_GET["request_pc"]) && $_GET["request_pc"] == 1){
        
$_SESSION["request_pc"]    = 1;
        
//header("Location: ".$_SERVER['HTTP_REFERER']);
        
echo '<script>history.go(-2);</script>';
        exit;
    }

    
//$_SESSION["index_popup"] = 1;

    
$sql              "select * from tutor_main
                    INNER JOIN tutor_charge ON tutor_main.id = tutor_charge.tutormain_id
                    INNER JOIN tutor_expectcharge ON tutor_charge.id = tutor_expectcharge.charge_id
                    where tutor_charge.deleted = ? and tutor_main.status = ? and tutor_main.deleted = ? and tutor_main.approved = ? and tutor_main.recommend = ?
                    group by tutor_main.id
                    order by rand()
                    limit 8"
;
    
$parameters       = array(04011);
    
$recommend_tutors bind_pdo($sql$parameters"selectall");

    
$sql        "select *,student_postjob.id as student_postjob_id, master_type_code.name_" $langcode " as instrument_name from student_postjob 
            INNER JOIN student_main ON student_main.id = student_postjob.studentmain_id
            INNER JOIN master_type_code ON master_type_code.id = student_postjob.mas_instrument
            where student_postjob.status = ? and student_postjob.deleted = ? and student_postjob.approved = ? and student_main.status = ? and student_main.deleted = ? and student_main.approved = ? 
            order by student_postjob.createdate DESC limit 8"
;
    
$parameters = array(101401);
    
$jobs       bind_pdo($sql$parameters"selectall");
?>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <? include('_head.php'); ?>
        <link href="css/style_k.css?v=<?=time();?>" type="text/css" rel="stylesheet">

        <style>
            .fancybox-skin {
                background-color: transparent !important;
            }

            @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
                .read_more_center {
                    margin-left: -55px;
                }
            }

        </style>
    </head>

    <body>

    <? include('_header.php'?>
    <? include('_dialog.php'?>
    <header>
        <div class="container">
            <div class="intro-text">
                <div class="intro-heading"><?= _lang("YOUR MUSICAL JOURNEY OFFICIALLY SET SAIL"?></div>
                <div class="BeginsBTN">
                    <!-- id="ToLearn" -->
                    <a href="category.php" class="index_main_btn index_main_btn_1"><?= _lang("Learn"?></a>
                    <!--<a href="course_category.php" class="index_main_btn index_main_btn_2"><?/*= _lang("Join Music Class") */?></a>-->
                    <a href="party_show.php" class="index_main_btn index_main_btn_3"><?= _lang("Party Show"?></a>
                    <a href="musical_show.php" class="index_main_btn index_main_btn_4"><?= _lang("Musical Show"?></a>
                </div>
                <div class="SearchBox">
                    <input type="text" name="category_search" id="category_search" placeholder="<?= _lang("Search (eg. piano, cello)"?>">
                    <div class="searchBT pointer" onClick="category_search();">
                        <span class="glyphicon glyphicon-search"></span></div>
                    <br>

                </div>
            </div>
        </div>
    </header>
    <div class="HowItWorks" id="HIW">
        <div class="container">
            <div class="row">
                <?php if ($langcode == "en") { ?>
                    <div class="col-sm-12" id="IntroParagh"><span class="BigTitle">HOW IT WORKS</span> <br>
                        <div class="redThickBorder">
                            <hr>
                        </div>
                        <!--<div class="IntroContent"> Learn more about our booking procedures </div>-->
                    </div>

                    <div class="col-lg-4 col-sm-6">
                        <div class="StudentVersion">
                            <div class="HIWHead">Student</div>
                            <div class="STRow">
                                <div class="HIWText">
                                    <h11>1. Search for tutor</h11>
                                    <br> Simply search for your tutor or make a job posting on MusicCircle based on
                                    your learning preference
                                </div>
                                <div class="HIWImg"><img src="img/howitworks/img1.png"></div>
                            </div>
                            <div class="STRow">
                                <div class="HIWText">
                                    <h11>2. Connect with tutor</h11>
                                    <br> Get connected with the tutor on our platform for learning particulars
                                </div>
                                <div class="HIWImg"><img src="img/howitworks/img2.png"></div>
                            </div>
                            <div class="STRow">
                                <div class="HIWText">
                                    <h11>3. Trial confirmation</h11>
                                    <br> Confirm with 2 trial lessons and paid for trial lessons fee via our platform
                                </div>
                                <div class="HIWImg"><img src="img/howitworks/img3.png"></div>
                            </div>
                            <div class="STRow">
                                <div class="HIWText">
                                    <h11>4. Trial and evaluation</h11>
                                    <br> Take the trial lessons with your selected tutor and rate the tutor based on
                                    your learning experience
                                </div>
                                <div class="HIWImg"><img src="img/howitworks/img4.png"></div>
                            </div>
                            <div class="STRow">
                                <div class="HIWText">
                                    <h11>5. Start learning</h11>
                                    <br> Start your music learning journey
                                </div>
                                <div class="HIWImg"><img src="img/howitworks/img5.png"></div>
                            </div>
                        </div>
                    </div>
                    <div id="PhoneImgSection">
                        <div class="col-lg-4" id="PhoneImg"><img src="img/index_mobile.png"></div>
                    </div>
                    <div class="col-lg-4 col-sm-6">
                        <div class="TutorVersion">
                            <div class="HIWHead">Tutor</div>
                            <div class="TTRow">
                                <div class="HIWImg"><img src="img/howitworks/img6.png"></div>
                                <div class="HIWText">
                                    <h11>1. Tutor registration</h11>
                                    <br> Register as a tutor and upload your music achievements. Students can search for
                                    their tutors on the tutor list
                                </div>
                            </div>
                            <div class="TTRow">
                                <div class="HIWImg"><img src="img/howitworks/img7.png"></div>
                                <div class="HIWText">
                                    <h11>2. Connect with student</h11>
                                    <br> Get connected with the students on our platform and matching can be done
                                    efficiently
                                </div>
                            </div>
                            <div class="TTRow">
                                <div class="HIWImg"><img src="img/howitworks/img8.png"></div>
                                <div class="HIWText">
                                    <h11>3. Trial confirmation</h11>
                                    <br> Confirm trail lessons with students. After trial, tutors and students have to
                                    reach consent to proceed with future learning
                                </div>
                            </div>
                            <div class="TTRow">
                                <div class="HIWImg"><img src="img/howitworks/img9.png"></div>
                                <div class="HIWText">
                                    <h11>4. Supporting</h11>
                                    <br> MusicCircle provides supporting, like timetable, tuition fee reminder for our
                                    members which helps our tutors better manage their students and concentrate on their
                                    teaching
                                </div>
                            </div>
                        </div>
                    </div>
                <?php } else { ?>
                    <div class="col-sm-12" id="IntroParagh"><span class="BigTitle">運作流程</span> <br>
                        <div class="redThickBorder">
                            <hr>
                        </div>
                        <div class="IntroContent">你的音樂之旅正式啟航</div>
                    </div>
                    <div class="col-lg-4 col-sm-6">
                        <div class="StudentVersion">
                            <div class="HIWHead">學生版</div>
                            <div class="STRow">
                                <div class="HIWText">
                                    <h11>1. 找導師</h11>
                                    <br> 根據需求尋找心儀導師或發佈求學資訊讓導師主動跟你聯絡
                                </div>
                                <div class="HIWImg"><img src="img/howitworks/img1.png"></div>
                            </div>
                            <div class="STRow">
                                <div class="HIWText">
                                    <h11>2. 溝通確認</h11>
                                    <br> 邀請導師於平台上溝通 確認學習需求和時間
                                </div>
                                <div class="HIWImg"><img src="img/howitworks/img2.png"></div>
                            </div>
                            <div class="STRow">
                                <div class="HIWText">
                                    <h11>3. 確認試堂</h11>
                                    <br> 於平台付款 向導師購買試堂時段每次試堂共2節
                                </div>
                                <div class="HIWImg"><img src="img/howitworks/img3.png"></div>
                            </div>
                            <div class="STRow">
                                <div class="HIWText">
                                    <h11>4. 試堂及評價老師</h11>
                                    <br> 按照購買試堂時段上課於第2節試堂後可根據上課體驗給導師合適的評價
                                </div>
                                <div class="HIWImg"><img src="img/howitworks/img4.png"></div>
                            </div>
                            <div class="STRow">
                                <div class="HIWText">
                                    <h11>5. 正式上課</h11>
                                    <br> 試堂滿意後根據教學協議跟導師正式開始學習
                                </div>
                                <div class="HIWImg"><img src="img/howitworks/img5.png"></div>
                            </div>
                        </div>
                    </div>
                    <div id="PhoneImgSection">
                        <div class="col-lg-4" id="PhoneImg"><img src="img/index_mobile.png"></div>
                    </div>
                    <div class="col-lg-4 col-sm-6">
                        <div class="TutorVersion">
                            <div class="HIWHead">導師版</div>
                            <div class="TTRow">
                                <div class="HIWImg"><img src="img/howitworks/img6.png"></div>
                                <div class="HIWText">
                                    <h11>1. 註冊導師</h11>
                                    <br> 輸入個人資料及相關音樂履歷 登記成為導師通過核實後學生可於導師清單中尋找心儀導師
                                </div>
                            </div>
                            <div class="TTRow">
                                <div class="HIWImg"><img src="img/howitworks/img7.png"></div>
                                <div class="HIWText">
                                    <h11>2. 溝通確認</h11>
                                    <br> 於平台上跟學生溝通於試堂前跟學生先確認學習需求及時間 於最短時間內提升配對成功機會
                                </div>
                            </div>
                            <div class="TTRow">
                                <div class="HIWImg"><img src="img/howitworks/img8.png"></div>
                                <div class="HIWText">
                                    <h11>3. 試堂</h11>
                                    <br> 按協定時間跟學生試堂 試堂後 導師及學生均有權選擇是否正式開始長期學習
                                </div>
                            </div>
                            <div class="TTRow">
                                <div class="HIWImg"><img src="img/howitworks/img9.png"></div>
                                <div class="HIWText">
                                    <h11>4. 配套</h11>
                                    <br> 平台會給導師提供音樂教學以外的配套 例如:上課時間表 學費提示 讓老師可有效管理不同學生之需求
                                </div>
                            </div>
                        </div>
                    </div>
                <?php ?>

            </div>
        </div>
    </div>
    <div id="LearnSection">
        <div class="container">
            <div class="Title">
                <img src="img/home/MusicIconI.png"> <?= _lang("FIND TUTOR"?>
                <div style="float: right">
                    <a href="category.php" style="text-decoration: none;color: #c11c2c;">
                        <span class="glyphicon glyphicon-th" aria-hidden="true"></span> <?= _lang("More"?>
                    </a>
                </div>

            </div>
            <div class="row">
                <?php
                    $index_musical_instrument 
= array(
                        
160 => array("img" => "img/home/image1.jpg""name" => "Piano Class"),
                        
168 => array("img" => "img/home/image2.jpg""name" => "Guitar Class"),
                        
130 => array("img" => "img/home/image3.jpg""name" => "Drum Class"),
                        
11  => array("img" => "img/home/image4.jpg""name" => "Violin Class"),
                        
150 => array("img" => "img/home/image5.jpg""name" => "Saxophone Class"),
                        
32  => array("img" => "img/home/image6.jpg""name" => "Vocal Training"),
                    );

                    foreach (
$index_musical_instrument as $key => $row) {
                        
?>
                        <div class="col-md-4 col-sm-6">
                            <div class="MusicOption">
                                <div class="hovereffect">
                                    <img class="img-responsive" src="<?= $row["img"?>" alt="">
                                    <div class="overlay">
                                        <div class="MusicTitle"><a href="category.php?id=<?= $key ?>">
                                                <h2><?= _lang($row["name"]) ?></h2>
                                            </a></div>
                                        <p class="read_more_center">
                                            <a href="category.php?id=<?= $key ?>"><?= _lang("Read More"?></a>
                                        </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    <?php ?>
            </div>
        </div>
    </div>

    <div class="RecommendSection">
        <div class="container">
            <div class="Title"><img src="img/home/MusicIconII.png"> <?= _lang("RECOMMEND TUTOR"?>

                <div style="float: right">
                    <a href="category.php?recommend=1" style="text-decoration: none;color: #c11c2c;">
                        <span class="glyphicon glyphicon-th" aria-hidden="true"></span> <?= _lang("More"?>
                    </a>
                </div>
            </div>
            <div class="row">
                <?php
                    
//get recommend tutor
                    
if (!empty($recommend_tutors)) {

                        foreach (
$recommend_tutors as $tutor) {
                            
$teaching_instrument get_teaching_instrument($tutor["tutormain_id"]);
                            
$teaching_area       get_teaching_area($tutor["tutormain_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;
                                }
                            }
                            
?>

                            <div class="col-md-3 col-sm-6">
                                <div class="PopulatCourse recommend_tutor_container" style="">
                                    <?php if (!empty($tutor["profilephoto_path"])) { ?>
                                        <a href="profile.php?id=<?= $tutor["tutormain_id"?>">
                                            <div class="recommend_tutor_img_container">
                                                <div class="tutor_img" style="background: url(file/teacher/<?= $tutor["profilephoto_path"?>) center center no-repeat; background-size: cover; width: inherit; height: inherit"></div>
                                                <img class="tutor_img2" src="file/teacher/<?= $tutor["profilephoto_path"?>">
                                            </div>
                                        </a>
                                    <?php ?>

                                    <div class="recommend_tutor_info_container">
                                        <br> <span class="RecommendTutor"><?= $tutor["nickname"?></span> <br>
                                        <span class="RecommendTutor">
                                            <?php
                                                
if (!empty($teaching_instrument)) {
                                                    foreach (
$teaching_instrument as $key => $row) {
                                                        echo 
$row["name_" $langcode];
                                                        if ((
$key 1) != count($teaching_instrument)) {
                                                            echo 
" / ";
                                                        }
                                                    }
                                                }
                                            
?>
                                        </span> <br> <span class="RecommendTutor">-
                                            <?php
                                                
foreach ($teaching_area_master as $key => $row) {

                                                    echo 
$row;
                                                    if ((
$key 1) != count($teaching_area_master)) {
                                                        echo 
" / ";
                                                    }
                                                }
                                            
?>
                                            -</span>

                                        <a href="profile.php?id=<?= $tutor["tutormain_id"?>" class="MoreBTN job_detail"><?= _lang("Read More"?></a>
                                    </div>

                                </div>
                            </div>

                        <?php }
                    } 
?>
            </div>
        </div>
    </div>

    <div class="JobPostSection">
        <div class="container">
            <div class="Title"><img src="img/home/MusicIconII.png"> <?= _lang("Job Search / List"?>
                <div style="float: right">
                    <a href="job.php" style="text-decoration: none;color: #c11c2c;">
                        <span class="glyphicon glyphicon-th" aria-hidden="true"></span> <?= _lang("More"?>
                    </a>
                </div>
            </div>
            <div class="row">
                <?php
                    
if (!empty($jobs)) {
                        foreach (
$jobs as $key => $row) {

                            
//check if student has paid trial fee
                            
$has_order  false;
                            
$sql        "select * from `order` where job_id = ? and deleted = ? and status = ?";
                            
$parameters = array($row["student_postjob_id"], 0"paid");
                            
$order      bind_pdo($sql$parameters"selectone");
                            if (!empty(
$order)) {
                                
$has_order true;
                            }

                            
$_30mins "";
                            
$_45mins "";
                            
$_60mins "";

                            if (!empty(
$row["30mins_min_budget"]) && !empty($row["30mins_max_budget"])) {
                                
$_30mins "30" _lang("mins") . ": $" $row["30mins_min_budget"] . ' - ' $row["30mins_max_budget"] . ', ';
                            } else {
                                if (!empty(
$row["30mins_min_budget"]) && empty($row["30mins_max_budget"])) {
                                    
$_30mins "30" _lang("mins") . ": " _lang("Above") . " $" $row["30mins_min_budget"] . ', ';
                                }

                                if (empty(
$row["30mins_min_budget"]) && !empty($row["30mins_max_budget"])) {
                                    
$_30mins "30" _lang("mins") . ": " _lang("Below") . " $" $row["30mins_max_budget"] . ', ';
                                }
                            }

                            if (!empty(
$row["45mins_min_budget"]) && !empty($row["45mins_max_budget"])) {
                                
$_45mins "45" _lang("mins") . ": $" $row["45mins_min_budget"] . ' - ' $row["45mins_max_budget"] . ', ';
                            } else {
                                if (!empty(
$row["45mins_min_budget"]) && empty($row["45mins_max_budget"])) {
                                    
$_45mins "45" _lang("mins") . ": " _lang("Above") . " $" $row["45mins_min_budget"] . ', ';
                                }

                                if (empty(
$row["45mins_min_budget"]) && !empty($row["45mins_max_budget"])) {
                                    
$_45mins "45" _lang("mins") . ": " _lang("Below") . " $" $row["45mins_max_budget"] . ', ';
                                }
                            }

                            if (!empty(
$row["60mins_min_budget"]) && !empty($row["60mins_max_budget"])) {
                                
$_60mins "60" _lang("mins") . ": $" $row["60mins_min_budget"] . ' - ' $row["60mins_max_budget"] . ', ';
                            } else {
                                if (!empty(
$row["60mins_min_budget"]) && empty($row["60mins_max_budget"])) {
                                    
$_60mins "60" _lang("mins") . ": " _lang("Above") . " $" $row["60mins_min_budget"] . ', ';
                                }

                                if (empty(
$row["60mins_min_budget"]) && !empty($row["60mins_max_budget"])) {
                                    
$_60mins "60" _lang("mins") . ": " _lang("Below") . " $" $row["60mins_max_budget"] . ', ';
                                }
                            }

                            
$sql        "select * from student_postjoblearndistrict 
                        INNER JOIN master_type_code ON master_type_code.id = student_postjoblearndistrict.mas_teachareacode
                        where student_postjoblearndistrict.deleted = ? and student_postjoblearndistrict.studentpostjob_id = ?"
;
                            
$parameters = array(0$row["student_postjob_id"]);
                            
$result     bind_pdo($sql$parameters"selectall");

                            
$student_postjoblearndistrict_master      = array();
                            
$student_postjoblearndistrict_master_text "";

                            if (!empty(
$result)) {
                                foreach (
$result as $row2) {
                                    
$teachareacode get_master_type_code("TEACH_AREACODE"$row2["extra1"]);
                                    
$teachareacode $teachareacode["name_" $langcode];

                                    if (!
in_array($teachareacode$student_postjoblearndistrict_master)) {
                                        
$student_postjoblearndistrict_master[] = $teachareacode;
                                    }
                                }
                            }

                            if (!empty(
$student_postjoblearndistrict_master)) {
                                foreach (
$student_postjoblearndistrict_master as $key3 => $row3) {
                                    
$student_postjoblearndistrict_master_text .= $row3;

                                    if ((
$key3 1) != count($student_postjoblearndistrict_master)) {
                                        
$student_postjoblearndistrict_master_text .= " / ";
                                    }
                                }
                            } else {
                                
$student_postjoblearndistrict_master_text _lang("N/A");
                            }

                            echo 
'<div class="col-md-3 col-sm-6">
                    <div class="PopulatCourse job_post_container">
                    <div>'
;
                            if (
$has_order || $row["completed_flag"] == 1) {
                                echo 
'<div style="position: relative;">
                        <button class="ContactTutorBTN" type="button" style="cursor: default; background-color: #575656; position: absolute; width: 100%;left: 0;">' 
_lang("Matched") . '</button>
                    </div>'
;
                            }

                            echo 
'<a href="job.php?id=' $row["student_postjob_id"] . '">
                    <img src="img/instrument/' 
$row["extra3"] . '" style="width: 100%; height: 60%; max-height: 195px;">
                    </a> 
                    </div>
                    <br>
                    
                        <span class="RecommendTutor">' 
_lang("Musical Instrument") . ': ' $row["instrument_name"] . '</span> <br>
                        <span class="RecommendTutor">- ' 
$student_postjoblearndistrict_master_text ' -</span> <br>
                        <span class="RecommendTutor" style="font-size: 13px;">' 
_lang("Level") . ': ' $row["level"] . '</span> <br>';
                            if (
$_30mins || $_45mins || $_60mins) {
                                echo 
'<div class="RecommendTutor" style="display: inline-block; vertical-align: top; font-size: 13px;">' _lang("Tuition Budget") . ': </div>';
                                echo 
'<div class="RecommendTutor" style="display: inline-block; font-size: 13px;">
                        ' 
$_30mins $_45mins $_60mins '
                        </div>'
;
                            }
                            echo 
'<div class="job_detail"><a href="job.php?id=' $row["student_postjob_id"] . '" class="MoreBTN">' _lang("Read More") . '</a></div>
                        
                    </div>
                </div>'
;
                        }
                    } else {
                        echo 
"<br>" _lang("No Job Now.");
                    }
                
?>
            </div>
        </div>
    </div>

    <div id="popup" style="display: none;">
        <!--<img src="img/popup/Uni_x_iMC_7Mar2017.jpg" alt="" style="width: 100%;"/>-->
        <div id="popup_slider">
            <ul class="slides">
                <li><img src="img/popup/MC Matching_PopUp_1.jpg" style="width: 100%;"></li>
                <li><img src="img/popup/MC Matching_PopUp_2.jpg" style="width: 100%;"></li>
                <li><img src="img/popup/MC Matching_PopUp_3.jpg" style="width: 100%;"></li>
                <li><img src="img/popup/MC Matching_PopUp_4.jpg" style="width: 100%;"></li>
            </ul>
        </div>
    </div>

    <div id="status" style="display: none;">
    </div>
    <script src="js/jquery.min.js"></script>
    <? include('_footer.php'?>

    <script type="text/javascript">
        function category_search() {
            var search = $("#category_search").val();
            if (!search) {
                alert("<?=_lang("Please enter searching words.")?>");
            } else {
                location.href = 'category.php?search=' + search;
            }
        }

        function resizeImage() {
            //console.log($(window).width());
            if ($(window).width() <= 750) {
                $(".tutor_img").hide();
                $(".tutor_img2").show();
            } else {
                $(".tutor_img").show();
                $(".tutor_img2").hide();
            }

            //$(".tutor_img2").show();
        }

        $(function () {
            //center image
            resizeImage();

            $(window).resize(function () {
                resizeImage();
            });

        })
    </script>

    <?php
        
//ori popup
        /*$_SESSION["index_popup"] = 1; if (!isset($_SESSION["index_popup"])) { ?>
        <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>
        <link rel="stylesheet" href="js/flexslider2/flexslider.css" type="text/css" media="screen"/>
        <script type="text/javascript" src="js/flexslider2/jquery.flexslider-min.js"></script>

        <script type="text/javascript">
            $(function () {
                $.fancybox({
                    //settings
                    'type': 'inline',
                    'fitToView': false,
                    'maxWidth': 800,
                    'width': '100%',
                    'height': '100%',
                    'autoSize': false,
                    'closeClick': false,
                    'openEffect': 'none',
                    'closeEffect': 'none',
                    'href': '#popup',

                });

                $('#popup_slider').flexslider({
                    animation: "slide"
                });

            });
        </script>
    <?php } */ 
?>

    <?php
        
if ($detect->isMobile() && !$detect->isTablet() && !isset($_SESSION["index_popup"])) { ?>
            <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>
            <link rel="stylesheet" href="js/flexslider2/flexslider.css" type="text/css" media="screen"/>
            <script type="text/javascript" src="js/flexslider2/jquery.flexslider-min.js"></script>

            <script type="text/javascript">
                $(function () {
                    $.fancybox({
                        //settings
                        'type': 'inline',
                        'fitToView': true,
                        //'maxWidth': 800,
                        'width': '100%',
                        'height': '80%',
                        'autoSize': false,
                        'closeClick': false,
                        'openEffect': 'none',
                        'closeEffect': 'none',
                        'padding': 0,
                        'href': '#popup',
                        'helpers': {
                            'overlay': {'closeClick': false} // prevents closing when clicking OUTSIDE fancybox
                        },
                        'beforeClose': function () {
                            <?php
                            
/*if (empty($_SESSION["app_device_id"]) && empty($_SESSION["app_notification_token"])) {
                                echo 'location.href="index_user.php"';
                            }*/
                            
?>
                        },
                    });

                    $('#popup_slider').flexslider({
                        animation: "slide",
                        animationLoop: false,
                        after: function (slider) {
                            var curSlide = slider.currentSlide;
                            console.log(curSlide);
                            if (curSlide == "3") {
                                $(document).find(".fancybox-close").show();
                            }
                        }
                    });

                    $(document).find(".fancybox-close").hide();
                });
            </script>
        <?php ?>

    </body>
    </html>

<?php
    $_SESSION
["index_popup"] = 1;