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
<?php
 
class finder_controller extends user{
    //职位搜索器列表
    function index_action(){        
        $this->public_action();
     $finderM    =    $this -> MODEL('finder');
      $where['uid']    =    $this -> uid;
        $urlarr['c']    =    $_GET['c'];
          $urlarr['page']    =    '{{page}}';
        $pageurl        =    Url('member',$urlarr);
 
        $pageM            =    $this   ->  MODEL('page');
        $pages            =    $pageM  ->  pageList('finder',$where,$pageurl,$_GET['page']);
        
        if($pages['total'] > 0){
            $where['orderby']    =    'id';
            $where['limit']        =    $pages['limit'];
            
           
            
            $List        =    $finderM  ->  getList($where);
            
            $this -> yunset("finder",$List);
        }
        if($this->config['user_finder'] && $this->config['user_finder']>count($List)){
            $this->yunset("syfinder",$this->config['user_finder']-count($List));
        }
        $this->yunset("js_def",3);
        $this->user_tpl('finder');
    }
    //保存职位搜索器
    function save_action(){
        $finderM    =    $this -> MODEL('finder');
      $para=array();
      if($_POST['submitBtn']){
        
            $_POST        =    $this->post_trim($_POST);
            $data=array(
                'uid'            =>    $this->uid,
                'usertype'        =>    $this->usertype,
                'id'            =>    intval($_POST['id']),
                'name'            =>    $_POST['name'],
                'keyword'        =>    $_POST['keyword'],
                'hy'            =>    intval($_POST['hy']),
                'job1'            =>    intval($_POST['job1']),
                'job1_son'        =>    intval($_POST['job1_son']),
                'job_post'        =>    intval($_POST['job_post']),
                'provinceid'    =>    intval($_POST['provinceid']),
                'cityid'        =>    intval($_POST['cityid']),
                'three_cityid'    =>    intval($_POST['three_cityid']),
                'minsalary'        =>    $_POST['minsalary'],
                'maxsalary'        =>    $_POST['maxsalary'],
                'edu'            =>    intval($_POST['edu']),
                'exp'            =>    intval($_POST['exp']),
                'sex'            =>    intval($_POST['sex']),
                'report'        =>    intval($_POST['report']),
                'uptime'        =>    $_POST['uptime']
            );
            $return   =  $finderM  ->  addInfo($data);
        
            $this->ACT_layer_msg($return['msg'],$return['errcode'],$return['url']);
        }
    }
    //删除职位搜索器
    function del_action(){
    $finderM    =    $this->MODEL('finder');
        if($_GET['id']){
            $id            =    intval($_GET['id']);
            $return        =    $finderM -> delInfo($id,array('uid'=>$this->uid,'usertype'=>$this->usertype));
            $this -> layer_msg($return['msg'],$return['errcode'],$return['layertype'],$_SERVER['HTTP_REFERER']);
        }
    }
    //修改或者添加职位搜索器
    function edit_action(){
    $finderM    =    $this -> MODEL('finder');
        $id            =    intval($_GET['id']);
        $list        =    $finderM  ->  getInfo(array('id'=>$id,'uid'=>$this->uid));
        
        if($list['info']['para']){ 
            $this->yunset("parav",$list['parav']);
        }
        $this->yunset("info",$list['info']); 
        $this->yunset($list['cache']);
        $this->public_action();
        $this->user_tpl('finderinfo');
    }
}
?>