chengkun
2025-05-22 1a8aea45ebb1582c9f65d9e8dcd520002f83ae12
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
<?php
 
 
class part_controller extends company
{
 
    function index_action()
    {
        $partM  =   $this->MODEL('part');
 
        include PLUS_PATH . 'part.cache.php';
 
        $uid    =   $this -> uid;
 
        $where['uid']   =   $uid;
 
        if ($_GET['keyword']) {
 
            $keyword            =   trim($_GET['keyword']);
 
            $where['name']      =   array( 'like', $keyword);
 
            $urlarr['keyword']  =   $keyword;
        }
        
        $pageurl        =   Url('member', $urlarr);
 
        $pageM          =   $this->MODEL('page');
 
        $pages          =   $pageM->pageList('partjob', $where, $pageurl, $_GET['page']);
 
        if ($pages['total'] > 0) {
            $where['orderby']   =   'lastupdate,desc';
            $where['limit'] =   $pages['limit'];
            
            $rows           =   $partM -> getList($where);
            
            $this->yunset('rows', $rows);
        }
         
        $this -> public_action();
        $this -> company_satic();
        $this -> com_tpl('partlist');
    }
 
    function del_action()
    {
        $partM  =   $this->MODEL('part');
 
        $delID  =   is_array($_GET['del']) ? $_GET['del'] : $_GET['id'];
 
        $delRes =   $partM->delPart($delID,array('uid' => $this->uid, 'usertype' => $this->usertype));
 
        $this -> layer_msg($delRes['msg'], $delRes['errcode'], $delRes['layertype'], $_SERVER['HTTP_REFERER']);
    }
 
    function opera_action()
    {
        $this->part();
    }
 
    // 刷新兼职职位
    function refresh_part_action()
    {
        if ($_POST) {
 
            $comtcM             =   $this->MODEL('comtc');
 
            $_POST['uid']       =   $this->uid;
            $_POST['usertype']  =   $this->usertype;
            $_POST['port']      =   1;
 
            $return =   $comtcM->refresh_part($_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' => '参数错误,请重试!'
            ));
        }
    }
}
?>