chengkun
2025-05-23 a6f7b382623096b6a00924f418447cf5204e825e
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
<?php
 
 
class job_controller extends lietou
{
 
    function index_action()
    {
        
        $this -> public_action();
        
        $where          =   array();
        
        $where['uid']   =   $this->uid;
        $where['usertype']   =   $this->usertype;
        
        if ($_GET['zp_status'] == 1) {
 
            $where['zp_status']     =   '1';
 
            $urlarr['zp_status']    =   $_GET['zp_status'];
        } else {
 
            if ($_GET['s']) {
 
                $where['status']    =   $_GET['s'];
 
                $where['zp_status'] =   '0';
 
                $urlarr['s']        =   $_GET['s'];
            } else {
 
                $where['status']    =   '0';
 
                $where['zp_status'] =   '0';
 
                $urlarr['s']        =   0;
            }
        }
        $urlarr['c']    =   'job';
 
        $urlarr['page'] =   '{{page}}';
 
        $pageurl        =   Url('member', $urlarr);
 
        $pageM          =   $this->MODEL('page');
 
        $pages          =   $pageM->pageList('lt_job', $where, $pageurl, $_GET['page'], $this->config['sy_listnum']);
 
        if ($pages['total'] > 0) {
            
            if ($_GET['order']) {
            
                $where['orderby']   =   $_GET['t'].','.$_GET['order'];
 
                $urlarr['order']    =   $_GET['order'];
 
                $urlarr['t']        =   $_GET['t'];
            } else {
 
                $where['orderby']   =   'lastupdate';
            }
            
            $where['limit']         =   $pages['limit'];
 
            $ltjobM                 =   $this->MODEL('lietoujob');
 
            $List                   =   $ltjobM->getList($where);
 
            $this->yunset('joblist', $List);
        }
 
        $this->yunset('s', $_GET['s']);
 
        $this->yunset('zp_status', $_GET['zp_status']);
 
        $this->lietou_tpl('job');
    }
 
    function del_action()
    {
        
        if ($_GET['del'] != '' || $_GET['id']) {
 
            $ltjobM     =   $this->MODEL('lietoujob');
 
            if (is_array($_GET['del'])) {
 
                $del    =   pylode(",", $_GET['del']);
            } else {
 
                $del    =   (int) $_GET['id'];
            }
            $return     =   $ltjobM->delLietouJob($del);
 
            if ($return['id']) {
                
                $this->MODEL('log')->addMemberLog($this->uid, $this->usertype, "删除猎头职位", 10, 3); // 会员日志
            }
            
            $this->layer_msg($return['msg'], $return['errcode'], $return['layertype'], $_SERVER['HTTP_REFERER']);
            
        } else {
 
            $this->layer_msg('请选择要删除的职位!', 8, 2, $_SERVER['HTTP_REFERER']);
        }
    }
 
    function jobset_action()
    {
        if ($_GET['id']) {
 
            $nid    =   $this->MODEL('lietoujob')->upInfo(array('id' => intval($_GET['id']), 'uid' => $this->uid), array('zp_status' => (int) $_GET['zp']));
 
            if ($nid) {
 
                $this->MODEL('log')->addMemberLog($this->uid, $this->usertype, '设置猎头职位招聘状态', 10, 2); // 会员日志
 
                $this->layer_msg('操作成功!', 9, 0, $_SERVER['HTTP_REFERER']);
            } else {
 
                $this->layer_msg('操作失败!', 8, 0, $_SERVER['HTTP_REFERER']);
            }
        }
    }
 
    function ltRefreshJob_action()
    {
        
        if ($_POST) {
            
            $_POST['uid']        =    $this->uid;
            $_POST['usertype']    =    $this->usertype;
            $_POST['port']        =   1;
 
            $comtcM =   $this->MODEL('comtc');
 
            $return =   $comtcM->ltRefreshJob($_POST);
 
            if ($return['status'] == 1) {// 猎头职位刷新成功
                
                echo json_encode(array(
                    'error' =>  1,
                    'msg'   =>  $return['msg']
                ));
            } else if ($return['status'] == 2) {// 套餐不足,金额消费
                
                echo json_encode(array(
                    'error'     =>  2,
                    'pro'       =>  $return['pro'],
                    'online'    =>  $return['online'],
                    'integral'  =>  $return['integral'],
                    'jifen'     =>  $return['jifen'],
                    'price'     =>  $return['price']
                ));
            } else {// 猎头职位刷新失败
                
                echo json_encode(array(
                    'error' =>  3,
                    'msg'   =>  $return['msg'],
                    'url'   =>  $return['url']
                ));
            }
        } else {
            
            echo json_encode(array(
                'error' =>  3,
                'msg'   =>  '参数错误,请重试!'
            ));
        }
    }
}
?>