chengkun
2025-04-30 6ab292fb7415be124651e312ec4f21c594568f17
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
<?php
 
class right_controller extends company{
    function index_action(){
 
        $this    ->    company_satic();
        $this    ->    public_action();
 
        $sy_only_price  =   @explode(',',$this->config['sy_only_price']);
        if (in_array('vip', $sy_only_price)){
            $this->yunset('meal',1);
        }
 
        $ratingM    =    $this    ->    MODEL('rating');
        $whereData    =    array(
            'category'    =>    '1',
            'service_price'    =>array('>','0'),
            'display'=>'1',
            'orderby'=>array('type,asc','sort,desc')
        );
        if($this->config['com_vip_type']==2 || $this->config['com_vip_type']==0){
            /*套餐模式*/
            $whereData['type']    =    '1';
            $rows    =    $ratingM    ->    getList($whereData,array('coupon'=>'1'));
 
            $this->yunset("rows",$rows);
            $this->com_tpl('member_right');
        }elseif($this->config['com_vip_type']==1){
            /*时间模式*/
            $whereData['type']    =    '2';
            $times    =    $ratingM    ->    getList($whereData,array('coupon'=>'1'));
 
            $this->yunset("times",$times);
            $this->com_tpl('member_time');
        }
 
    }
 
    function time_action(){
 
        $this    ->    company_satic();
        $this    ->    public_action();
 
        $sy_only_price  =   @explode(',',$this->config['sy_only_price']);
        if (in_array('vip', $sy_only_price)){
            $this->yunset('meal',1);
        }
 
        $ratingM    =    $this    ->    MODEL('rating');
        $whereData    =    array(
            'category'        =>    '1',
            'service_price'    =>    array('>','0'),
            'display'        =>    '1',
            'orderby'        =>    array('type,asc','sort,desc')
        );
        if($this->config['com_vip_type']==2){
            /*套餐模式*/
            $whereData['type']    =    '1';
            $rows    =    $ratingM    ->    getList($whereData,array('coupon'=>'1'));
            $this->yunset("rows",$rows);
            $this->com_tpl('member_right');
        }elseif($this->config['com_vip_type']==1 || $this->config['com_vip_type']==0){
            /*时间模式*/
            $whereData['type']    =    '2';
            $times    =    $ratingM    ->    getList($whereData,array('coupon'=>'1'));
 
            $this    ->    yunset("times",$times);
            $this    ->    com_tpl('member_time');
        }
    }
 
    function added_action(){
 
        $sy_only_price  =   @explode(',',$this->config['sy_only_price']);
        if (in_array('pack', $sy_only_price)){
            $this->yunset('meal',1);
        }
 
        $statis        =    $this    ->company_satic();
        if($statis['rating_type'] == 2){
            $this->ACT_msg("index.php?c=right", "时间会员无需购买增值服务!");
        }
        $this        ->    public_action();
        $id            =    intval($_GET['id']);
 
        $ratingM    =    $this    ->    MODEL('rating');
        $rows        =    $ratingM    ->    getComServiceList(array('display'=>'1','orderby'=>'sort,desc'));
 
        if(empty($id)){
            //$row    =    $ratingM    ->    getComServiceInfo(array('display'=>'1','orderby'=>'sort,desc'),array('field'=>'id'));
            $id        =    $rows[0]['id'];
        }
        $info        =    $ratingM    ->    getComSerDetailList(array('type'=>$id,'orderby'=>'sort,desc'));
 
        if ($statis){
            $discount    =    $ratingM    ->    getInfo(array('id'=>$statis['rating']));
            $this        ->    yunset("discount",$discount);
        }
        $this    ->    yunset("info",$info);
        $this    ->    yunset("rows",$rows);
        $this    ->    com_tpl('added');
    }
}
?>