chengkun
2025-05-20 4c1f0f659384d71ce28be1fc0343e56e75568fe1
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
<?php
 
 
 
class lietou extends common
{
 
    public $ltInfo = array();
 
    function __construct($tpl, $db, $def = "", $model = "index", $m = "")
    {
 
        $this->common($tpl, $db, $def, $model, $m);
 
        $LtM    =   $this->MODEL('lietou');
        $uid    =   $this->uid;
 
        $this->ltInfo   =   $LtM->getInfo(array('uid' => $uid), array('utype' => 'user'));
 
        if (!in_array($_GET['c'], array('info', 'uppic', 'log')) && !in_array($_GET['act'], array('logout'))) {
 
            if ($this->config['lt_enforce_info'] == 1) {
 
                if (!$this->ltInfo['realname'] || !$this->ltInfo['com_name'] || !$this->ltInfo['provinceid'] || !$this->ltInfo['moblie']) {
 
                    $this->yunset('isdef', 1);
                    $this->yunset('class', 1);
 
                    $remindInfo['url']      =   'index.php?c=info';
                    $remindInfo['title']    =   '基本信息尚未完善!';
                    $remindInfo['msg']      =   '完善的基本信息有助于帮您快速招聘人才!';
 
                    $this->yunset('isremind', 1);
                    $this->yunset('remindInfo', $remindInfo);
 
                    $this->lietou_tpl('info');
                }
 
            } elseif (!$this->ltInfo['uid']) {
 
                //容错机制,前期强制完善资料,后期开放,防止部分数据无uid 又可以直接操作会员中心
                $userinfoM  =   $this->MODEL("userinfo");
                $userinfoM->activUser($this->uid, 3);
            }
        }
    }
 
    function public_action()
    {
 
        include(PLUS_PATH."com.cache.php");
        $this->yunset('comdata', $comdata);
        $this->yunset('comclass_name', $comclass_name);
 
        $UserInfoM  =   $this->MODEL('userinfo');
        $member     =   $UserInfoM->getInfo(array('uid' => $this->uid), array('setname' => '1'));
        $this->yunset('member', $member);
 
        $ltM        =   $this->MODEL('lietou');
        $user       =   $this->ltInfo;
        $user       =   $this->lt_array_action($user);
 
        $this->yunset('user', $user);
 
        $giverebatenum  =   $ltM->getRebatesNum(array('job_uid' => $this->uid));
 
        $this->yunset('giverebatenum', $giverebatenum);
 
        $statis     =   $this->lt_satic();
 
        // 会员等级 增值包 套餐
        $ratingM    =   $this->MODEL('rating');
        $ratingList =   $ratingM->getList(array('display' => 1, 'orderby' => array('type,asc', 'sort,desc')));
        $rating_1   =   $rating_2   =   $raV    =   array();
 
        if (!empty($ratingList)) {
            foreach ($ratingList as $ratingV) {
 
                $raV[$ratingV['id']]    =   $ratingV;
 
                if ($ratingV['category'] == 2 && $ratingV['service_price'] > 0) {
                    if ($ratingV['type'] == 1) {
 
                        $rating_1[]     =   $ratingV;
                    } elseif ($ratingV['type'] == 2) {
 
                        $rating_2[]     =   $ratingV;
                    }
                }
            }
        }
        $this->yunset('rating_1', $rating_1);
        $this->yunset('rating_2', $rating_2);
 
        if (!empty($statis)) {
 
            $discount   =   isset($raV[$statis['rating']]) ? $raV[$statis['rating']] : array();
            $this->yunset('discount', $discount);
            $this->yunset('statis', $statis);
            $this->yunset('todayStart', strtotime('today'));
        }
 
        $add        =   $ltM->getLtservicedetailList(array('orderby' => array('type,asc', 'sort,desc')), array('pack' => '1'));
        $this->yunset('add', $add);
 
        $couponM    =   $this->MODEL('coupon');
        $couponList =   $couponM->getCouponList(array('uid' => $this->uid, 'status' => 1, 'validity' => array('>', time()), 'orderby' => array('coupon_amount,asc', 'coupon_scope,asc')));
        $this->yunset('couponList', $couponList);
 
        if (!isVip($statis['vip_etime'])) {
 
            $this->yunset('vipIsDown', 1); //  会员过期
        }
 
        $this->get_nav();
    }
 
    function lietou_tpl($tpl)
    {
        $this->yuntpl(array('member/lietou/' . $tpl));
    }
 
    function get_nav()
    {
 
        if (in_array($_GET['c'], array('info', 'uppic', 'binding', 'passwd', 'zixun', 'sysnews', 'setname', 'baoming_subject', 'fav_subject', 'subject_zixun', 'fav_agency', 'atn_teacher'))) {
 
            $isdef  =   1;
        } elseif (in_array($_GET['c'], array('jobadd', 'job'))) {
 
            $isdef  =   2;
        } elseif (in_array($_GET['c'], array('mypay', 'pay', 'paylog', 'consume', 'payment', 'coupon_list', 'reward_list', 'paylogtc', 'right', 'log', 'integral', 'integral_reduce', 'payment')) || in_array($_GET['act'], array('loglist', 'withdraw', 'withdrawlist', 'change', 'changelist'))) {
 
            $isdef  =   3;
        } elseif (in_array($_GET['c'], array('search_resume', 'down_resume', 'look_resume', 'entrust_resume', 'yp_resume', 'give_rebates', 'my_rebates', 'talent', 'jobpack', 'reward', 'chat'))) {
 
            $isdef  =   4;
        } elseif (empty($_GET['c'])) {
 
            $isdef  =   5;
        }
        $this->yunset("isdef", $isdef);
    }
 
    //会员统计信息调用
    function lt_satic()
    {
        $statisM = $this->MODEL('statis');
        $statis = $statisM->vipLtOver($this->uid);
 
        $this->yunset('statis', $statis);
        $this->yunset("addltjobnum", $statis['addltjobnum']);
        $this->yunset('todayStart', strtotime('today'));
 
        return $statis;
    }
 
    function user_shell()
    {
 
        $userinfo   =   $this->MODEL('lietou')->getInfo(array('uid' => $this->uid));
 
        if ($userinfo['realname'] == "") {
 
            $this->ACT_layer_msg("请先完善基本资料!", 8, $_SERVER['HTTP_REFERER']);
 
        }
    }
 
    function logout_action()
    {
        $this->logout();
    }
 
    /**
     * 将猎头信息替换为缓存数组中内容
     */
    function lt_array_action($info, $array = array())
    {
        if (!empty($array)) {
 
            $ltclass_name   =   $array["ltclass_name"];
            $city_name      =   $array["city_name"];
        } else {
            include PLUS_PATH."/lt.cache.php";
            include PLUS_PATH."/city.cache.php";
        }
        $info['provinceid_info']    =   $city_name[$info["provinceid"]];
        $info['cityid_info']        =   $city_name[$info["cityid"]];
        $info['three_cityid_info']  =   $city_name[$info["three_cityid"]];
        $info['title_info']         =   $ltclass_name[$info["title"]];
        $info['exp_info']           =   $ltclass_name[$info["exp"]];
        return $info;
    }
}
 
?>