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
<?php
 
 
 
class ajax_controller extends common
{
 
    /**
     *功能需求:添加简历置顶开启条件
     *内容描述:当网站设置开启简历中工作简历,教育经历,项目经历进行验证
     */
    function top_resume_action()
    {
 
        $data       =   array(
            'eid'   =>  $_POST['eid'],
            'uid'   =>  $this->uid
        );
 
        $resumeM    =   $this->MODEL('resume');
 
        $return     =   $resumeM->topResumeCheck($data);
 
        echo json_encode($return);
 
        die;
    }
 
    /**
     * @desc 订单付款类型修改(仅限会员中心操作)
     */
    function order_type_action()
    {
 
        if ($this->uid && $this->username) {
 
            if ($_POST['paytype'] == 'wxpay'){
                // 微信支付 companyorder里payComOrderByWXPC方法有处理,此处不需要修改
                echo 1;
            }else{
                $orderM =   $this->MODEL('companyorder');
                $oid    =   intval($_POST['oid']);
                $nid    =   $orderM->upInfo($oid, array('order_type' => $_POST['paytype'], 'port' => '1'), $this->uid);
                if ($nid) {
                    
                    $this->MODEL('log')->addMemberLog($this->uid, $this->usertype, "修改订单付款类型", 88, 2);
                }
                
                echo $nid ? 1 : 2;
            }
        }
    }
 
    /**
     * @desc 获取猎头职位类别信息(会员中心)
     */
    function ajax_ltjobone_action()
    {
 
        include(PLUS_PATH . "ltjob.cache.php");
        $jobid  =   $_POST['str'];
        $data   =   "";
 
        if (isset($ltjob_type) && isset($ltjob_name) && is_array($ltjob_type[$jobid])) {
            foreach ($ltjob_type[$jobid] as $v) {
 
                $data .= "<li> <a onclick=\"selectjobtwo('" . $v . "','jobtwo','" . $ltjob_name[$v] . "','jobtype');\" href=\"javascript:;\"> " . $ltjob_name[$v] . "</a> </li>";
            }
        }
 
        echo $data;
    }
 
    /**
     * @desc 邮箱认证,发送邮件(会员中心)
     */
    function emailcert_action()
    {
 
        $CookieM    =   $this->MODEL('cookie');
 
        $ComapnyM   =   $this->MODEL('company');
 
        $CookieM->SetCookie('delay', '', time() - 60);
 
        session_start();
 
        if (md5(strtolower($_POST['authcode'])) != $_SESSION['authcode'] || empty($_SESSION['authcode'])) {
 
            echo 4;
            die;
        }
 
        $data       =   array(
 
            'usertype'  =>  $this->usertype,
            'did'       =>  $this->userid,
            'email'     =>  $_POST['email']
        );
 
        $errCode    =   $ComapnyM->sendCertEmail(array('uid' => $this->uid, 'type' => '1'), $data);
 
        echo $errCode;
        die;
    }
 
 
    /**
     * @desc 手机认证,发送短信(会员中心)
     */
    function mobliecert_action()
    {
 
        $noticeM    =   $this->MODEL('notice');
 
        $result     =   $noticeM->jycheck($_POST['pcode'], '');
 
        if (!empty($result)) {
 
            $this->layer_msg($result['msg'], 9, 0, '', 2, $result['error']);
        }
 
        if (!$this->uid || !$this->username) {
 
            $this->layer_msg('请先登录', 9, 0, '', 2, 110);
        } else {
 
            $shell  =   $this->GET_user_shell($this->uid, $_COOKIE['shell']);
 
            if (!is_array($shell)) {
 
                $this->layer_msg('登录有误', 9, 0, '', 2, 111);
            }
 
            $moblie =   $_POST['str'];
 
            $user   =   array(
                'uid'       =>  $this->uid,
                'usertype'  =>  $this->usertype
            );
 
            $result =   $noticeM->sendCode($moblie, 'cert', 1, $user);
            $logM   =   $this->MODEL('log');
            $logM->addMemberLog($user['uid'], $user['usertype'], '手机认证验证码,认证手机号:' . $moblie, 13, 1);
 
            echo json_encode($result);
            exit();
        }
    }
 
    /**
     * @desc 获取参与招聘会的公司(会员中心)
     */
    function getzphcom_action()
    {
 
        $jobM   =   $this->MODEL('job');
        $zphM   =   $this->MODEL('zph');
 
        $_GET['jobid']  =   pylode(',', @explode(',', $_GET['jobid']));
 
        $jobwhere       =   array(
            'id'        =>  array('in', $_GET['jobid']),
            'uid'       =>  $this->uid,
            'r_status'  =>  1,
            'status'    =>  0
        );
 
        $listA  =   $jobM->getList($jobwhere, array('field' => "`name`"));
        $row    =   $listA['list'];
 
        $space  =   $zphM->getZphSpaceList("");
        $zph    =   $zphM->getInfo(array('id' => intval($_GET['zid'])), array('field' => '`title`,`address`,`starttime`,`endtime`'));
        $com    =   $zphM->getZphComInfo(array('zid' => intval($_GET['zid']), 'uid' => $this->uid));
 
        foreach ($row as $v) {
 
            $data[] = $v['name'];
        }
 
        $spaces =   array();
 
        foreach ($space as $val) {
            $spaces[$val['id']] = $val['name'];
        }
 
        $cname  =   @implode('、', $data);
 
        $arr    =   array();
 
        $arr['status']      =   1;
        $arr['content']     =   $cname;
        $arr['title']       =   $zph['title'];
        $arr['address']     =   $zph['address'];
        $arr['starttime']   =   $zph['starttime'];
        $arr['endtime']     =   $zph['endtime'];
 
        if ($spaces[$com['sid']]) {
 
            $arr['sid']     =   $spaces[$com['sid']];
        } else {
 
            $arr['sid']     =   '无';
        }
        $arr['bid']         =   $spaces[$com['bid']];
        $arr['cid']         =   $spaces[$com['cid']];
 
        echo json_encode($arr);
    }
 
    /**
     * @desc 获取猎头职位类别信息,添加猎头职位
     */
    function ajax_ltjob_action()
    {
 
        include(PLUS_PATH . "ltjob.cache.php");
        $jobid      =   $_POST['id'];
 
        if (isset($ltjob_type) && isset($ltjob_name) && is_array($ltjob_type[$jobid])) {
 
            $data   =   "<div class=\"m_post_job01\"><ul>";
            foreach ($ltjob_type[$jobid] as $v) {
                $data   .= "<li><a href=\"javascript:check_select('" . $v . "','" . $ltjob_name[$v] . "','jobtwo');\"> " . $ltjob_name[$v] . "</a></li>";
            }
            $data   .=  "</ul></div>";
        }
        echo $data;
    }
 
    /**
     * @desc 搜索器获取职位类别
     */
    function getjoblist_action()
    {
 
        include(PLUS_PATH . "job.cache.php");
        if (is_array($_POST[id])) {
 
            $jobid  =   $_POST[id][0];
        } else {
 
            $jobid  =   $_POST[id];
        }
 
        $data   =   "<option value=''>请选择</option>";
 
        if (isset($job_type) && isset($job_name) &&is_array($job_type[$jobid])) {
            foreach ($job_type[$jobid] as $v) {
                $data .= "<option value='$v'>" . $job_name[$v] . "</option>";
            }
        }
        echo $data;
    }
 
    /**
     * @desc 搜索器获取城市类别
     */
    function getcitylist_action()
    {
 
        if ($_POST['type'] == 'province') {
 
            $self   =   'cityid';
            $son    =   'three_cityid';
        } else {
 
            $self   =   'three_cityid';
            $son    =   '';
        }
        include(PLUS_PATH . "city.cache.php");
        $data       =   '';
        if (isset($city_type) && isset($city_name) && is_array($city_type[$_POST['id']])) {
            foreach ($city_type[$_POST['id']] as $v) {
                $data .= "<li><a href=\"javascript:void(0);\" onclick=\"getcitylist('" . $v . "','" . $self . "','" . $city_name[$v] . "','" . $son . "');\">" . $city_name[$v] . "</a></li>";
            }
        }
        echo $data;
        die;
    }
 
    /**
     * @desc 签到
     */
    function sign_action()
    {
 
        $IntegralM  =   $this->MODEL('integral');
        $userinfoM  =   $this->MODEL('userinfo');
 
        $date       =   date("Ymd");
 
        $member     =   $userinfoM->getInfo(array('uid' => $this->uid, 'usertype' => $_COOKIE['usertype']), array('field' => "`signday`,`signdays`"));
        $lastreg    =   $userinfoM->getMemberregInfo(array('uid' => $this->uid, 'usertype' => $_COOKIE['usertype'], 'orderby' => 'id,desc'));
 
        $lastregdate=   date("Ymd", $lastreg['ctime']);
 
        if ($lastregdate != $date) {
 
            $yesterday          =   date("Ymd", strtotime("-1 day"));
 
            if ($lastregdate == $yesterday && intval(date("d")) > 1) {
                if ($member['signday'] >= 5) {
 
                    $integral   =   $this->config['integral_signin'] * 2;
                } else {
 
                    $integral   =   $this->config['integral_signin'];
                }
 
                $signday        =   $member['signday'] + 1;
                $msg            =   '连续签到' . $signday . "天";
            } else {
 
                $signday        =   '1';
                $integral       =   $this->config['integral_signin'];
                $msg            =   '第一次签到';
            }
 
            $arr                =   array();
 
            $nid                =   $userinfoM->addMemberreg(array("uid" => $this->uid, "usertype" => $_COOKIE['usertype'], 'date' => $date, "ctime" => time(), 'ip' => fun_ip_get()));
 
            if (isset($nid)) {
 
                $IntegralM->company_invtal($this->uid, $this->usertype, $integral, true, $msg, true, 2, 'integral');
                $userinfoM->upInfo(array('uid' => $this->uid), array('signday' => $signday, 'signdays' => array('+', '1')));
                $arr['type']    =   date("j");
            } else {
 
                $arr['type']    =   -2;
            }
            $arr['integral']    =   $integral . $this->config['integral_pricename'];
            $arr['signday']     =   $signday;
            $arr['signdays']    =   $member['signdays'] + 1;
 
            echo json_encode($arr);
            die;
        }
    }
 
    function guwenZan_action()
    {
 
        $id     =   intval($_POST['id']);
        $atnM   =   $this->MODEL('atn');
        $zan    =   $atnM->getatnInfo(array('conid' => $id, 'uid' => $this->uid));
 
        if (empty($zan)) {
 
            $data['uid']        =   $this->uid;
            $data['time']       =   time();
            $data['usertype']   =   $this->usertype;
            $data['conid']      =   $id;
            $atnM->addAtnInfo($data);
 
            $adminM =   $this->MODEL('admin');
            $adminM->upInfo(array('zan' => array('+', 1)), array('uid' => $id));
 
            echo 1;
            die();
        } else {
            echo 2;
            die();
        }
    }
 
    /**
     * @desc 会员中心批量阅读
     */
    public function ajaxReadsys_action()
    {
        if ($_POST['ids']) {
 
            $sysM   =   $this->MODEL('sysmsg');
            $result =   $sysM->upInfo(array('id' => array('in', pylode(',', $_POST['ids']))), array('remind_status' => '1'));
            echo json_encode($result);
            die;
        }
    }
 
    /**
     * @desc 会员中心,系统消息全部标记为已读
     */
    public function ajaxRreadSysAll_action()
    {
        if ($_POST) {
 
            $sysM   =   $this->MODEL('sysmsg');
            $result =   $sysM->upInfo(array('fa_uid' => $this->uid, 'usertype' => $this->usertype, 'remind_status' => '0'), array('remind_status' => '1'));
 
            echo $result;
            die;
        }
    }
}
 
?>