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
<?php
/* *
* $Author :PHPYUN开发团队
*
* 官网: http://www.phpyun.com
*
* 版权所有 2009-2021 宿迁鑫潮信息技术有限公司,并保留所有权利。
*
* 软件声明:未经授权前提下,不得用于商业运营、二次开发以及任何形式的再次发布。
*/
class jobadd_controller extends lietou{
    //职位 status -1为草稿,0为未审核 1为审核通过 2过期 3为未通过
    
    function index_action(){
         
        $ltM    =    $this -> MODEL('lietou');
        
        $row    =    $ltM -> getInfo(array('uid'=>$this->uid));
        
        $msg    =    array();
        
        $isallow_addjob    =    "1";
        
        if($this->config['lt_enforce_emailcert']=="1"){
            if($row['email_status']!="1"){
                $isallow_addjob    =    "0";
                $msg[]            =    "邮箱认证";
            }
        }
        if($this->config['lt_enforce_mobilecert']=="1"){
            if($row['moblie_status']!="1"){
                $isallow_addjob    =    "0";
                $msg[]            =    "手机认证";
            }
        }
        if($this->config['lt_enforce_licensecert']=="1"){
            $comM   =   $this->MODEL('company');
            $cert   =   $comM -> getCertInfo(array('uid'=>$this->uid,'type'=>4), array('field' => 'uid,status'));
 
            if($row['yyzz_status']!="1" && (empty($cert) || $cert['status'] == 2)){
                $isallow_addjob    =    "0";
                $msg[]            =    "职业资格认证";
            }
        }
         
        if($isallow_addjob=="0"){
            
            $this->ACT_msg('index.php?c=binding',"请先完成".implode("、",$msg)."!");
        }
        
        $info    =    $this->ltInfo;
        $this->yunset("info",$info);
         
        
        if($info['com_name']==''){
            $this->ACT_msg("index.php?c=info","请先完善基本资料!");
        }
        $static = $this->lt_satic();
        
        if($static['addltjobnum'] == 0){
            $this->ACT_msg("index.php?c=right","会员已到期!",8);
        }
        
        if( $static['addltjobnum'] == 2 ){
            if( $this->config['integral_job']!='0'){
                
                $this->ACT_msg("index.php?c=right","你的套餐已用完!",8);
            }else{
                
                $ltM -> upStatis(array('uid'=>$this->uid),array('lt_job_num'=>'1'));
            }
        } 
        $row['edate']=strtotime("+1 month");
        unset($row['provinceid']);
        unset($row['cityid']);
        unset($row['three_cityid']);
        unset($row['exp']);
        $this->yunset("row",$row);
        
        $this->public_action();
        $this->user_shell();
        
        $this->yunset($this->MODEL('cache')->GetCache(array('city','lt','ltjob','lthy','hy')));
        
        $this->lietou_tpl('jobadd');
    }
    function edit_action(){
        
        $info    =    $this->ltInfo;
        $this->yunset("info",$info);
        $row    =    $this -> MODEL('lietoujob') -> getInfo(array('id'=>(int)$_GET['id'],'uid'=>$this->uid));
        $this->yunset("row",$row);
        $this->yunset("part",$_GET['part']);
        
        $this->yunset($this->MODEL('cache')->GetCache(array('city','lt','ltjob','lthy','hy')));
 
        $this->user_shell();
        $this->public_action();
        $this->lietou_tpl('jobadd');
    }
    function save_action(){
        $ltjobM    =    $this -> MODEL('lietoujob');
        
        if($_POST['submit']){
            $info    =    $this->ltInfo;
            $rstatus    =    $info['r_status'];
            $_POST    =    $this->post_trim($_POST);
 
            $post    =     array(
                'job_name'        =>    $_POST['job_name'],
                
                'jobone'           =>    $_POST['jobone'],
                'jobtwo'           =>    $_POST['jobtwo'],
                
                'department'       =>    $_POST['department'],
                'report'           =>    $_POST['report'],
 
                'provinceid'      =>    $_POST['provinceid'],
                'cityid'           =>    $_POST['cityid'],
                'three_cityid'    =>    $_POST['three_cityid'],
 
                'minsalary'      =>    $_POST['minsalary'],
                'maxsalary'        =>    $_POST['maxsalary'],
 
                'constitute'       =>    pylode(',',$_POST['constitute']),
                'job_desc'        =>    $_POST['job_desc'],
                'age'             =>    $_POST['age'],
                'sex'             =>    $_POST['sex'],
                'exp'             =>    $_POST['exp'],
                'edu'             =>    $_POST['edu'],
                'eligible'        =>    $_POST['eligible'],
                'welfare'          =>    pylode(',',$_POST['welfare']),
                'language'         =>    pylode(',',$_POST['language']),
                'rebates'         =>    $_POST['rebates'],
                'other'          =>    $_POST['other'],
                'r_status'      =>    $rstatus,
                'com_name'        =>    $_POST['com_name'],
                'real_name'        =>    $_POST['real_name'],
                'pr'            =>    $_POST['pr'],
                'hy'            =>    $_POST['hyid'],
                'mun'            =>    $_POST['mun'],
                'desc'            =>    $_POST['desc'],
 
                'lastupdate'      =>    time(),
                'uid'           =>    $this->uid,
                'usertype'        =>    $this->usertype,
                'did'            =>    $this->userdid
            );
            $data    =    array(
                'post'    =>    $post,
                'id'    =>    (int)$_POST['id']
            );
            
            $return    =    $ltjobM->addLtJobInfo($data);
 
              if($return['url']){
                $this->ACT_layer_msg($return['msg'],$return['errcode'],$return['url']);
            }else{
                $this->ACT_layer_msg($return['msg'],$return['errcode']);
            }
        }
    }
    
    /**
     *  @desc 发布职位条件查询
     */
    function jobCheck_action()
    {
        
        $jobM   =   $this->MODEL('job');
        $statisM=   $this->MODEL('statis');
        
        $statis =   $statisM -> getInfo($this->uid, array('usertype' => 3, 'field' => '`integral`'));
        $result =   $jobM->getAddJobNeedLtInfo($this->uid, 1);
        
        $return =   array(
            
            'msgList'   =>  $result['pc'],
            'integral'  =>  (int)$statis['integral']
        );
        
        echo json_encode($return);
        
        die();
        
    }
}
?>