chengkun
2025-05-26 8f3df543230cd4403368b39b9bbe5726d11a0284
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
<?php
 
class train_controller extends common{
    /* 培训首页 */
    function index_action(){
 
        $trainM                =        $this->MODEL('train');
 
        /* 推荐课程 */
        $rswhere            =        array(
        
            'r_status'        =>    1,
            'status'        =>    1,
            'pause_status'    =>    1,
            'rec'            =>    1,
            'orderby'        =>    'id,desc',
            'limit'            =>    8
            
        );
        
        if($this->config['did']){
            
            $rswhere['did']        =        $this->config['did'];
            
        }
        $recsubject                =        $trainM->getSubList($rswhere, array('field' => "`id`,`uid`,`name`,`price`,`pic`" , 'utype'=>'front','num'=>1));
        
        $this->yunset("recsubject",$recsubject);
        
        /* 推荐机构 */
        $rtwhere            =        array(
        
            'r_status'        =>    1,
            'name'            =>    array('<>', ''),
            'rec'            =>    1,
            'orderby'        =>    'uid,desc',
            'limit'            =>    12
            
        );
        
        if($this->config['did']){
            
            $rtwhere['did']        =        $this->config['did'];
            
        }
        $rectrain                =        $trainM->getList($rtwhere , array('field'=>'`uid`,`name`,`logo`,`content`' , 'utype'=>'front'));
        
        $this->yunset("rectrain",$rectrain);
 
        /* 最新课程 */
        $nswhere            =        array(
        
            'r_status'        =>    1,
            'status'        =>    1,
            'pause_status'    =>    1,
            'orderby'        =>    'ctime,desc',
            'limit'            =>    8
            
        );
        
        if($this->config['did']){
            
            $nswhere['did']        =        $this->config['did'];
            
        }
        $NewSubjectList            =        $trainM->getSubList($nswhere, array('field' => "`id`,`uid`,`name`,`price`,`pic`" , 'utype'=>'front','num'=>1));
    
        $this->yunset("newsubject",$NewSubjectList);
 
        foreach($_GET as $k=>$v){
            if($k!=""){
                $searchurl[]=$k."=".$v;
            }
        }
        $this->yunset('backurl',Url('wap'));
        $searchurl=@implode("&",$searchurl);
        $this->yunset("searchurl",$searchurl);
        $this->yunset("headertitle","职业培训");
        $this->seo("train_index");
        $this->yuntpl(array('wap/train'));
    }
    
    /* 培训课程列表页 */
    function subject_action(){    
        $trainM                =        $this->MODEL('train');
        $CacheM                =        $this->MODEL('cache');
        
        $where['r_status']                =        1;
                    
        $where['status']                =        '1';
                    
        $where['pause_status']            =        '1';
                    
        if((int)$_GET['type']){        
                        
            $where['type']                =        (int)$_GET['type'];
                        
            $urlarr['type']                =        (int)$_GET['type'];
        }            
                    
        if($_GET['keyword']){            
                        
            $where['name']                =         array('like', trim($_GET['keyword']));
                        
            $urlarr['keyword']            =        (int)$_GET['keyword'];
        }            
                    
        if((int)$_GET['nid']){    
                        
            $where['nid']                =        (int)$_GET['nid'];
                        
            $urlarr['nid']                =        (int)$_GET['nid'];
        }    
            
        $urlarr['c']                     =        $_GET['c'];
        $urlarr['page']                    =        "{{page}}";
        $urlarr['a']                    =        "subject";
        $pageurl                        =        Url("wap",$urlarr);
        /* 提取分页     */
        $pageM                            =        $this  -> MODEL('page');
        $pages                            =        $pageM -> pageList('px_subject', $where, $pageurl, $_GET['page']);
            
        if($pages['total'] > 0){    
                
            $where['orderby']            =        'ctime,desc';
                
            $where['limit']                =        $pages['limit'];        
            $List                        =        $trainM -> getSubList($where,array('utype'=>'front','num'=>1));
            
            $this->yunset("newsubject",$List);
        }
        
        
        $this->yunset("topplaceholder","搜索课程");
        foreach($_GET as $k=>$v){
            if($k!=""){
                $searchurl[]=$k."=".$v;
            }
        }
        $searchurl    =    @implode("&",$searchurl);
        $CacheList    =    $CacheM->GetCache(array('subject','subjecttype'));
        $this->yunset($CacheList);
        $this->yunset("searchurl",$searchurl);
        $this->yunset('backurl',Url('wap',array('c'=>'train')));
        $this->seo("train_index");
        $this->yuntpl(array('wap/pxsubject'));
    }
    
    /* 培训课程内容页 */
    function subshow_action(){
        if((int)$_GET['id']){
            $trainM        =    $this->MODEL('train');
            $resumeM    =    $this->MODEL('resume');
            $CompanyM    =    $this->MODEL("company");
            $CacheM        =    $this->MODEL('cache');
            $lietouM    =    $this->MODEL('lietou');
            
            /* 课程详情 */
            $rwhere        =    array(
            
                'id'                =>    (int)$_GET['id'],
                
                'PHPYUNBTWSTART_A'    =>    '',
                
                'uid'                =>    array('=' , $this->uid),
                
                'PHPYUNBTWSTART_B'    =>    'OR',
                
                'status'            =>    '1',
                
                'pause_status'        =>    '1',
                
                'PHPYUNBTWEND_B'    =>    '',
                
                'PHPYUNBTWEND_A'    =>    ''
            
            );
            
            $row        =    $trainM->getSubInfo($rwhere,array('utype'=>'front'));
            
            if($row['id']==''){
                
                $data['msg']    =    '没有找到该课程!';
                
                $data['url']    =    'index.php';
                
                $this->layer_msg($data['msg'],9,0,$data['url'],2);
                
            }elseif($row['r_status']==2){
                
                $data['msg']    =    '发布该课的机构已被锁定!';
                
                $data['url']    =    'index.php';
                
                $this->layer_msg($data['msg'],9,0,$data['url'],2);
                
            }else{
                
                $trainM->upSubInfo(array('id'=>(int)$_GET['id']),array('hits'=>array('+',1)));
 
                $this->yunset("row",$row);
                
                 /* 收藏数目 */
                $collect_num    =    $trainM->getSubCollectNum(array('sid'=>$row['id']));
                $this->yunset("collect_num",$collect_num);
                
                /* 培训机构信息 */
                $traininfo        =    $trainM->getInfo(array('r_status'=>1 , 'uid'=>$row['uid']));
                $this->yunset("train",$traininfo);
                
                /* 该机构其他课程 */
                $otherlist        =    $trainM->getSubList(array('r_status'=>1,'uid'=>$row['uid'],'id'=>array('<>', (int)$_GET['id']),'status'=>1,'pause_status'=>1) , array('num'=>1 ,'uid'=>$this->uid));
                $this->yunset("otherlist",$otherlist);
                
                /* 报名的时候,调用姓名和联系电话 */
                if($this->uid&&$this->usertype!='4'){
                    if($this->usertype==1){
                        $member                =    $resumeM->getResumeInfo(array("uid"=>$this->uid),array("field"=>'name,telphone'));
                        $user['name']        =    $member['name'];
                        $user['phone']        =    $member['telphone'];
                        
                    }elseif($this->usertype==2){
                        $member                =    $CompanyM->getInfo($this->uid,array("field"=>'linkman,linktel'));
                        $user['name']        =    $member['linkman'];
                        $user['phone']        =    $member['linktel'];
                        
                    }elseif($this->usertype==3){
                        $member                =    $lietouM->getInfo(array("uid"=>$this->uid),array("field"=>'realname,moblie,phone'));
                        $user['name']        =    $member['realname'];
                        if($member['moblie']){
                            $user['phone']    =    $member['moblie'];
                        }elseif($member['phone']){
                            $user['phone']    =    $member['phone'];
                        }
                    }
                    $this->yunset("user",$user);
                   
                    /* 获取收藏课程信息 */
                    $collect    =    $trainM->getSubCollectInfo(array('uid'=>$this->uid,'sid'=>(int)$_GET['id']));
                    $this->yunset("collect",$collect);
                    
                    /* 获取报名信息 */
                    $baoming    =    $trainM->getBmInfo(array('uid'=>$this->uid,'sid'=>(int)$_GET['id']));
                    $this->yunset("baoming",$baoming);
                }
                
            }
            $data['px_subject_name']    =    $row['name'];
            $this->data                    =    $data;
        }
        
        $CacheList        =    $CacheM->GetCache(array('city','subject','com'));
        $this->reclist($row['uid']);
        $this->yunset($CacheList);
        $this->yunset("headertitle","课程详情");
        $this->seo("subject_show");
        $this->yuntpl(array('wap/pxsubshow'));
    }
    
    /* 培训机构列表页*/
    function agency_action(){
        $trainM                        =    $this->MODEL('train');
        $CacheM                        =    $this->MODEL('cache');
        
        $where['r_status']            =    1;
        
        $where['name']                =    array('<>', '');
        
        $where['sid']                =    array('<>', '');
        
        if((int)$_GET['sid']){
            $where['sid']            =    (int)$_GET['sid'];        
        }
        
        if((int)$_GET['pr']){
            $where['pr']            =    (int)$_GET['pr'];        
        }
        
        if((int)$_GET['provinceid']){
            $where['provinceid']    =    (int)$_GET['provinceid'];        
        }
        
        if((int)$_GET['cityid']){
            $where['cityid']        =    (int)$_GET['cityid'];        
        }
        
        if((int)$_GET['three_cityid']){
            $where['threecityid']    =    (int)$_GET['three_cityid'];        
        }
        
        if((int)$_GET['mun']){
            $where['mun']            =    (int)$_GET['mun'];        
        }
        
        if($_GET['keyword']){
            $where['name']            =    array('like' , trim($_GET['keyword']));        
        }
        
        $urlarr['c']                 =    "train";
        $urlarr['a']                =    $_GET['a'];
        $urlarr['page']                =    "{{page}}";
        $pageurl                    =    Url("wap",$urlarr);
        $pageM                        =    $this  -> MODEL('page');
        $pages                        =    $pageM -> pageList('px_train', $where, $pageurl, $_GET['page']);
        
        if($pages['total'] > 0){
            
            $where['orderby']        =    array('rec,desc','uid,desc');
             
            $where['limit']            =    $pages['limit'];    
            
            $List                    =    $trainM -> getList($where,array('utype'=>'wap'));
            
            $this->yunset("rows",$List);
        }
        
        if(isset($List) && is_array($List)){
            if($_GET['keyword']){
                $this->addkeywords("10",$_GET['keyword']);
            }
        }
        
        foreach($_GET as $k=>$v){
            if($k!=""){
                $searchurl[]        =    $k."=".$v;
            }
        }
        $searchurl                    =    @implode("&",$searchurl);
        
        $CacheList                    =    $CacheM->GetCache(array('com','city','subject'));
        
        $this->yunset($CacheList);
        $this->yunset("searchurl",$searchurl);
        $this->yunset("topplaceholder","搜索培训机构");
        $this->yunset('backurl',Url('wap',array('c'=>'train')));
        $this->seo("agency");
        $this->yuntpl(array('wap/pxagency'));
    }
    
    /* 培训机构内容页 */
    function agencyshow_action(){
        $trainM                            =        $this->MODEL('train');
            
        $id                                =        (int)$_GET['id'];        
        
        /* 机构内容页关注培训机构 */
        $this->getAtnTrain((int)$_GET['id']);
        
        $show                            =        $trainM->getPxshowList(array('uid'=>$id));
        $this->yunset("show",$show);
        
        /* 课程 */
        $swhere                            =        array(
                
            'r_status'                    =>        1,
            'status'                    =>        1,
            'pause_status'                =>        1,
            'uid'                        =>        $id,
            'orderby'                    =>        'ctime,desc',
            'limit'                        =>        6
                    
        );        
        $sublist                        =        $trainM->getSubList($swhere, array('field' => "`id`,`uid`,`name`,`price`,`pic`,`hours`,`ctime`" , 'utype'=>'front','num'=>1 ,'uid'=>$this->uid));
        
        $this->yunset('sublist',$sublist);
        
        /* 讲师 */
        $twhere                            =        array(
                    
            'r_status'                    =>        1,
            'uid'                        =>        $id,
            'status'                    =>        1,
            'orderby'                    =>        'ctime,desc',
            'limit'                        =>        10
            
        );
        
        if($this->config['did']){
            
            $twhere['did']                =        $this->config['did'];
                    
        }        
        $teacher                        =        $trainM->getTeaList($twhere,array('field'=>'`id`,`uid`,`name`,`pic`,`sid`,`hy`,`cityid`'));
                
        
        
        $this->agency($id);
        $this->reclist($id);
        $this->yunset('teach',$teacher);
        $this->yunset("headertitle","机构详情");
        $this->seo("agency_show");
        $this->yuntpl(array('wap/pxagencyshow'));
    }
 
    /* 培训师 */
    function teacher_action(){
        $trainM                            =        $this->MODEL('train');
        $CacheM                            =        $this->MODEL('cache');
            
        $where['r_status']                =        1;
                
        $where['status']                =        '1';
            
        if((int)$_GET['sid']){        
            $where['sid']                =        (int)$_GET['sid'];
            $urlarr['sid']                =        (int)$_GET['sid'];
        }    
            
        if((int)$_GET['provinceid']){    
            $where['provinceid']        =        (int)$_GET['provinceid'];
            $urlarr['provinceid']        =        (int)$_GET['provinceid'];
        }        
                
        if((int)$_GET['cityid']){        
            $where['cityid']            =        (int)$_GET['cityid'];
            $urlarr['cityid']            =        (int)$_GET['cityid'];
        }    
            
        if((int)$_GET['three_cityid']){    
            $where['three_cityid']        =        (int)$_GET['three_cityid'];
            $urlarr['three_cityid']        =        (int)$_GET['three_cityid'];
        }    
            
        if((int)$_GET['hy']){
            $where['hy']                =        (int)$_GET['hy'];
            $urlarr['hy']                =        (int)$_GET['hy'];
        }    
            
        if($_GET['keyword']){    
            $where['name']                =        array('like',trim($_GET['keyword']));
            $urlarr['keyword']            =        trim($_GET['keyword']);
        }    
    
        $urlarr['c']                     =        $_GET['c'];
        $urlarr['a']                    =        $_GET['a'];
        $urlarr['page']                    =        "{{page}}";
        $pageurl                        =        Url("wap",$urlarr);
        $pageM                            =        $this  -> MODEL('page');
        $pages                            =        $pageM -> pageList('px_teacher', $where, $pageurl, $_GET['page']);
        
        if($pages['total'] > 0){
            
            $where['orderby']            =        'ctime,desc';
                    
            $where['limit']                =        $pages['limit'];    
            
            $List                        =        $trainM -> getTeaList($where,array('utype'=>'front' , 'uid'=>$this->uid));
            
            $this->yunset("rows",$List);
        }
 
        foreach($_GET as $k=>$v){
            if($k!=""){
                $searchurl[]            =        $k."=".$v;
            }
        }
        $searchurl                        =        pylode("&",$searchurl);
        
        $CacheList                        =        $CacheM->GetCache(array('hy','city','subject'));
        
        $this->yunset($CacheList);
        $this->yunset("topplaceholder","搜索讲师");
        $this->yunset("searchurl",$searchurl);
        $this->yunset('backurl',Url('wap',array('c'=>'train')));
        $this->seo('teacher');
        $this->yuntpl(array('wap/pxteacher'));
    }
    
     /* 讲师内容页 */
    function teamshow_action(){
        $trainM                            =        $this->MODEL('train');
        $CacheM                            =        $this->MODEL('cache');
        
        if((int)$_GET['nid']){
            $teacher                    =        $trainM->getTeaInfo(array('r_status'=>1 , 'id'=>(int)$_GET['nid']), array('uid'=>$this->uid) );
            
            if($teacher['id']==''){
                $this->ACT_msg_wap($this->config['sy_weburl'],"没有找到相关讲师!",2,5);
            }
            
            $this->yunset("teacher",$teacher);
            
            $data['px_teacher_name']    =        $teacher['name'];
            
            $this->data                    =        $data;
            $teachsub                    =        $trainM->getSubList(array('r_status'=>1 ,'status'=>'1','pause_status'=>'1' , 'teachid'=>array('findin',(int)$_GET['nid']) ) ,array( 'uid'=>$this->uid));
            
            $this->yunset("teachsub",$teachsub);
        }
        
        $CacheList                        =        $CacheM->GetCache(array('hy','city','subject'));
        
        $this->yunset($CacheList);
        $this->yunset("headertitle","讲师详情");
        $this->seo('teamshow');
        $this->yuntpl(array('wap/pxteachershow'));
    }
    
    /* 培训课程报名 */
    function baoming_action(){
        if($_POST['submit']){
            $orderM                =        $this->MODEL('companyorder');
            
            $data['uid']        =        $this->uid;
            
            $data['did']        =        $this->userdid;
            
            $data['usertype']    =        $this->usertype;
            
            $data['sid']        =        $_POST['sid'];
            
            $data['s_uid']        =        $_POST['s_uid'];
                                     
            $data['name']        =        $_POST['name'];
                                         
            $data['phone']        =        $_POST['phone'];
                                     
            $data['content']    =        $_POST['content'];
                                     
            $data['price']        =        $_POST['price'];
            
            $data['isprice']    =        $_POST['isprice'];
            
            $data['utype']        =        'wap';
            
            $return                =        $orderM->addBaomingOrder($data);
            
            $this->layer_msg($return['msg'],9,0,$return['url'],2);
           
        }
    }
    
    /* 收藏培训课程 */
    function collect_action(){
        if($_POST['id']){
            $trainM    =    $this->MODEL('train');
        
            $data['uid']        =    $this->uid;
            $data['usertype']    =    $this->usertype;
            $data['id']            =    $_POST['id'];
            
            $return    =    $trainM    -> collectSub($data);    
            
            echo $return ;die;
            
        }
    }
    
    function zixun_action(){
        $trainM        =    $this->MODEL('train');
        
        if($_POST['submit']){
            if(!$this->uid){
                
                $data['msg']    =    "您还没有登录,请先登录!";
                
            }
            
            if($this->usertype==4){
                
                $data['msg']    =    "只有个人和hr可以收藏!";
                
            }
            
            if($_POST['phone']==''){
                
                $data['msg']    =    "联系电话不能为空!";
                
            }elseif(!CheckMobile($_POST['phone'])){
                
                $data['msg']    =    "请正确填写联系电话!";
            }
            
            if(!empty($data)){
                
                $this->layer_msg($data['msg'],9,0,$_SERVER['HTTP_REFERER'],2);
                
            }
            
            $trainM->addPxzixun(array('uid'=>$this->uid,'sid'=>$_POST['sid'],'s_uid'=>$_POST['s_uid'],'phone'=>$_POST['phone'],'content'=>$_POST['content'],'ctime'=>time(),'did'=>$this->userdid,'usertype'=>$this->usertype));
            
            $data['msg']        =    "咨询成功!";
            $data['url']        =    $_SERVER['HTTP_REFERER'];
            $this->layer_msg($data['msg'],9,0,$data['url'],2);
        }
        
        $id                        =        (int)$_GET['id'];
        
        $where['s_uid']            =        $id;
                
        $urlarr['id']            =        $_GET['id'];
        $urlarr['c']             =        $_GET['c'];
        $urlarr['a']            =        $_GET['a'];
        $urlarr['page']            =        "{{page}}";
        $pageurl                =        Url("wap",$urlarr);
        $pageM                    =        $this  -> MODEL('page');
        $pages                    =        $pageM -> pageList('px_zixun', $where, $pageurl, $_GET['page']);
        
        if($pages['total'] > 0){    
                
            $where['orderby']    =        'ctime,desc';
                
            $where['limit']        =        $pages['limit'];    
                
            $List                =        $trainM -> getPxzxList($where,array('utype'=>'front'));
            
            $this->yunset("rows",$List);
        }
        
        $this->yunset("headertitle","留言咨询");
        $this->agency($id);
        $this->seo('zixun');
        $this->yuntpl(array('wap/pxzixun'));
    }
    
    function agency($id){
        
        if($id){
            $trainM        =    $this->MODEL('train');
            $row        =    $trainM->getInfo(array('uid'=>$id));
            if($row['r_status']==2){
                
                $data['msg']        =    "该机构已被锁定!";
                $data['url']        =    'index.php?c=index&a=agency';
                
            }elseif($row['uid']==''){
                
                $data['msg']        =    "没有找到该机构!";
                $data['url']        =    'index.php?c=index&a=agency';
            }
            
            /* content里会有html标签没有闭合影响到页面显示和查看更多功能,用closetages补全闭合标签 */
            $row['logo']            =    $row['logo_n'];
            $row['shortcontent']    =    $this->CloseTags(mb_substr($row['content'],0,600,'utf-8'));
            $row['content']            =    $this->CloseTags($row['content']);
            $data['px_agency_name']    =    $row['name'];
            $this->data                =    $data;
            $banner                    =    $trainM        ->    getBannerInfo(array('uid'=>$id),array('pic'=>1));
            
            $this->yunset("banner",$banner);
            $this->yunset("row",$row);
        }
        $CacheM        =    $this->MODEL('cache');
        $CacheList    =    $CacheM->GetCache(array('com','city','subject','hy'));
        $this->yunset($CacheList);
    }
    
    function reclist($id){
        $trainM            =    $this->MODEL('train');
        
        $zixun            =    $trainM->getPxzxList(array('s_uid'=>$id , 'orderby'=>'id,desc' , 'limit'=>4) ,array('utype'=>'front') );
        
        $this->yunset("zixun",$zixun);        
    }
    
    /* 机构内容页关注培训机构 */
    function getAtnTrain($id){
        
        if($this->uid    &&    $this->usertype!='4'){    
            $atnM                =        $this->MODEL('atn');
            
            $atwhere['uid']        =        $this->uid;
                
            $atwhere['sc_uid']    =        $id;
                
            $atwhere['tid']        =        '';
            
            $isatn                =        $atnM->getatnInfo($atwhere , array('field'=>'id'));
            
            $this->yunset("isatn",$isatn);
        }
        
    }
 
    
}
?>