chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
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
<?php
/*
 * $Author :PHPYUN开发团队
 *
 * 官网: http://www.phpyun.com
 *
 * 版权所有 2009-2021 宿迁鑫潮信息技术有限公司,并保留所有权利。
 *
 * 软件声明:未经授权前提下,不得用于商业运营、二次开发以及任何形式的再次发布。
 */
class zphnet_controller extends common{
    
    function index_action(){
        $this->yunset('backurl',Url('wap'));
        $this->yunset('headertitle','网络招聘会');
        $this->seo('zph');
        $this->yuntpl(array('wap/zphnet'));
    }
    
    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);
                $this->yunset('addresumeurl',Url('wap',array('c'=>'addresume'), 'member'));
            }
        }
 
        $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'=>'20'),array('zw'=>$zw,'keyword'=>$jkeyword));
        $this->yunset('areaCom',$areaCom);
        
        if($_GET['boxtype']){
            
            $this->yunset('boxtype', $_GET['boxtype']);
        }
        if($_GET['form']=='list' && $_GET['type']=='wlzph') {
            $this->yunset('backurl', Url('wap', array('c' => 'zph','type'=>'wlzph')));
        }elseif($_GET['form']=='list'){
            $this->yunset('backurl', Url('wap', array('c' => 'zphnet')));
        }
        $this->yunset('headertitle','网络招聘会详情');
        
        $CacheM        =    $this -> MODEL('cache');
        $CacheList    =    $CacheM -> GetCache(array('hy','com'));
        $this->yunset($CacheList);
        
        $data['zph_title']    =    $row['title'];
        $data['zph_desc']    =    $this->GET_content_desc($row['body']);
        $this->data            =    $data;
        $this->seo('zph_show');
        $this->yuntpl(array('wap/zphnet_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    =  20;
            
            $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,'utype'=>'wap'));
            
            $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['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,
            'jobid'        =>    $_POST['jobid'],
            'zid'        =>    intval($_POST['zid']),
        );
        $zphnetM  =  $this->MODEL('zphnet');
        $arr      =  $zphnetM->ajaxZphnet($data);
        
        if ($arr['status'] == 2 && !empty($_POST['jobid'])){
            // 套餐不足,记录jobid的cookie来备用
            $this->cookie->setcookie('zphjobid', $_POST['jobid'], time()+86400);
        }
        
        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);
        }
    }
 
    function GetHits_action()
    {
        $id = intval($_GET['id']);
        if (empty($id)) {
            echo 'document.write(0)';
            die();
        }
 
        $zphnetM   =   $this->MODEL('zphnet');
 
        $zphnetM->addZphnetHits($id);
 
        $hits   =   $zphnetM->getInfo(array('id' => $id), array('field' => '`hits`'));
        echo 'document.write('.$hits['hits'].')';
        die();
    }
}
?>