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
<?php
 
class index_controller extends zphnet_controller{
    function index_action()
    {
        $this->seo('zphnet');
        $this->yun_tpl(array('index'));
    }
 
 
    function show_action()
    {
        $zid      =  intval($_GET['id']);
        $zphnetM  =  $this->MODEL('zphnet');
        // 网络招聘会信息
        $row      =  $zphnetM->getInfo(array('id'=>$zid));
        $this->yunset('row',$row);
        //用户进入记录
        if ($this->uid && $this->usertype){
            //招聘会进行中记录用户进入记录
            if ($row['etime'] > 0){
                
                $zphnetM->addZphnetUser(array('zid'=>$zid,'uid'=>$this->uid,'usertype'=>$this->usertype));
            }
            
            if ($this->usertype == 1){
                
                $resumeM  =  $this->MODEL('resume');
                $enum     =  $resumeM->getExpectNum(array('uid'=>$this->uid));
                
                $this->yunset('enum',$enum);
            }
        }
 
        $jkeyword  =  $rkeyword  =  '';
        if ($_GET['ztype'] == 'job'){
            
            $jkeyword  =  trim($_GET['keyword']);
            
        }elseif ($_GET['ztype'] == 'resume'){
            
            $rkeyword  =  trim($_GET['keyword']);
        }
        //进入大厅滚动展示
        $horn    =  $zphnetM->getZphnetUser(array('zid'=>$zid,'orderby'=>'ctime','limit'=>10));
        $this->yunset('horn',$horn);
        // 底部数量统计
        $allnum  =  $zphnetM->getZphnetAllNum(array('zid'=>$zid, 'status'=>1));
        $this->yunset('allnum',$allnum);
        // 查看职位记录
        $look    =  $zphnetM->getZphnetLook(array('zid'=>$zid,'orderby'=>'ctime','limit'=>15));
        $this->yunset('look',$look);
        
        // 企业列表展示,招聘会绑定了展示区域,按区分分类查
        if(!empty($row['zw'])){
            
            $zphArea  =  $zphnetM->getClass(array('id'=>$row['zw']));
            $this->yunset('zphArea',$zphArea);
 
            $area   =  $zphnetM->getClassList(array('keyid'=>$row['zw'],'orderby'=>'sort,asc'));
            $this->yunset('area',$area);
        }
 
        if ($_GET['zw']){
            $zw  =  intval($_GET['zw']);
        }elseif ($_GET['zw'] == 'other'){
            $zw  =  0;
        }
 
        $areaCom    =   $zphnetM->getAreaComList(array('zid'=>$row['id'],'limit'=>21),array('zw'=>$zw,'keyword'=>$jkeyword));
        $this->yunset('areaCom',$areaCom);
 
        //报名时用到套餐相关数据
        if ($this->usertype == 2) {
            
            $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'] == 1 && $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);
            
            $statisM    =   $this->MODEL('statis');
            $statis     =   $statisM->getInfo($this->uid, array( 'usertype' => 2));
            
            if (! empty($statis)) {
                $discount   =   isset($raV[$statis['rating']]) ? $raV[$statis['rating']] : array();
                $this -> yunset('discount', $discount);
                $this -> yunset('statis', $statis);
            }
            
            $add    =   $ratingM->getComSerDetailList(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);
        }
        $CacheM        =    $this -> MODEL('cache');
        $CacheList    =    $CacheM -> GetCache(array('hy','com'));
        $this->yunset($CacheList);
        if($_GET['boxtype']){
            
             $this->yunset('boxtype', $_GET['boxtype']);
        }
        // 增加浏览数
        $zphnetM->addZphnetHits($row['id']);
        
        $data['zph_title']  =   $row['title'];
        $data['zph_desc']   =   $this -> GET_content_desc($row['body']);
        $this -> data       =   $data;
        
        $this->seo('zphnet_show');
        $this->yun_tpl(array('show'));
    }
 
 
    /**网络招聘详情页 默认加载招聘岗位*/
     function getComList_action()
    {
        $zid      =  intval($_POST['zid']);
        $zphnetM  =  $this->MODEL('zphnet');
        $row      =  $zphnetM->getInfo(array('id'=>$zid));
        // 关键词搜索/已分配展位时,一页全部加载,不需要分页
        if ($_POST['keyword'] == ''){
            $page     =  intval($_POST['page']);
            $limit    =  21;
            
            $where['zid']      =  $zid;
            if($page > 0){
                
                $pagenav  =  ($page - 1) * $limit;
                $where['limit']  =  array($pagenav,$limit);
                
            }else{
                
                $where['limit']  =  $limit;
            }
            if ($_POST['zw']){
                $zw  =  intval($_POST['zw']);
            }elseif ($_POST['zw'] == 'other'){
                $zw  =  0;
            }
            $areaCom              =  $zphnetM->getAreaComList($where,array('zw'=>$zw,'keyword'=>$_POST['keyword']));
            
            $areaCom['spOpen']    =  $this->config['sy_spview_web'];
            $areaCom['usertype']  =  $this->usertype;
            echo json_encode($areaCom);
        }
    }
 
    /**
     * 保存查看企业、职位记录
     */
    function setLook_action()
    {
        
        $zid    =  intval($_POST['id']);
        $jobid  =  intval($_POST['jobid']);
        $comid  =  intval($_POST['comid']);
        
        $zphnetM  =  $this->MODEL('zphnet');
        $row      =  $zphnetM->getInfo(array('id'=>$zid));
        
        //招聘会进行中才保存
        if ($row['stime'] < 0 && $row['etime'] > 0){
            
            $data   =  array(
                'uid'       =>  $this->uid,
                'usertype'  =>  $this->usertype,
                'zid'       =>  $zid,
                'jobid'     =>  $jobid,
                'comid'     =>  $comid,
                'ctime'     =>  time()
            );
            
            $zphnetM->addZphnetLook($data);
        }
    }
    /**
     * 报名网络招聘会条件判断
     */
    function ajaxZphnet_action(){
        $data    =    array(
            'usertype'    =>    $this->usertype,
            'uid'        =>    $this->uid,
            'spid'        =>    $this->spid,
            'did'        =>    $this->config['did'],
            'jobid'        =>    $_POST['jobid'],
            'zid'        =>    intval($_POST['zid']),
        );
        $zphnetM  =  $this->MODEL('zphnet');
        $arr      =  $zphnetM->ajaxZphnet($data);
        
        echo json_encode($arr);die;
    }
    /**
     * 检查参会情况
     */
    function isJoin_action(){
        
        if ($this->uid){
            
            $zphnetM  =  $this->MODEL('zphnet');
            
            $row      =     $zphnetM->getZphnetCom(array('uid'=>$this->uid,'zid'=>$_POST['zid']),array('field'=>'`status`'));
            if(!empty($row)) {
                
                $row['code'] = 1;
                
            }else{
                $row['code'] = 2;
            }
            
            echo json_encode($row);
        }
    }
}
?>