chengkun
2025-04-27 cc0f23e36407bd75f9fa45a63b7b68e69cf9c769
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
<?php
 
 
 
class index_controller extends part_controller
{
    //兼职列表
    function index_action()
    {
 
        $cacheM =   $this->MODEL('cache');
        $cache  =   $cacheM->GetCache(array('city', 'part'));
        $this->yunset($cache);
 
        if ($_GET['city']) {
 
            $city                   =   explode("_", $_GET['city']);
            $_GET['provinceid']     =   $city[0];
            $_GET['cityid']         =   $city[1];
            $_GET['three_cityid']   =   $city[2];
        }
        if ($this->config['province']) {
            $_GET['provinceid']     =   $this->config['province'];
        }
        if ($this->config['cityid']) {
            $_GET['cityid']         =   $this->config['cityid'];
        }
        if ($this->config['three_cityid']) {
            $_GET['three_cityid']   =   $this->config['three_cityid'];
        }
        if ($_GET['part_type']) {
            $search[]               =   $cache['partclass_name'][$_GET['part_type']];
        }
        if ($_GET['cycle']) {
            $search[]               =   $cache['partclass_name'][$_GET['cycle']];
        }
        if ($_GET['provinceid']) {
            $search[]               =   $cache['city_name'][$_GET['provinceid']];
        }
        if ($_GET['cityid']) {
            $search[]               =   $cache['city_name'][$_GET['cityid']];
        }
        if ($_GET['three_cityid']) {
            $search[]               =   $cache['city_name'][$_GET['three_cityid']];
        }
        if ($_GET['keyword']) {
            $search[]               =   $_GET['keyword'];
        }
        if (!empty($search)) {
            $data['seacrh_class']   =   @implode("-", $search);
            $this->data = $data;
        }
        $partKeyword                =   array();
        include PLUS_PATH."keyword.cache.php";
        if (isset($keyword) && is_array($keyword)) {
            foreach ($keyword as $k => $v) {
                if ($v['type'] == '2' && $v['tuijian'] == '1') {
 
                    $partKeyword[]  =   $v;
                }
            }
        }
        $this->yunset("partkeyword", $partKeyword);
        $this->seo('part_index');
        $this->yun_tpl(array('index'));
    }
 
    //兼职详情
    function show_action()
    {
 
        $partM      =   $this->MODEL("part");
        if ($_GET['id']) {
 
            $id     =   (int)$_GET['id'];
            $info   =   $partM->getInfo(array('id' => $id), array('cache' => 1, 'com' => 1, 'uid' => $this->uid, 'usertype' => $this->usertype));
            $job    =   $info['info'];
            $this->yunset($info['cache']);
 
            if ($job['uid'] != $this->uid && ($job['id'] == '' || $job['state'] == 0 || $job['state'] == 3)) {
                $this->ACT_msg($this->config['sy_weburl'], '该兼职暂无法展示!');
            }
 
            $partM->upInfo(array('hits' => array('+', 1)), array('id' => $id));
 
            if ($this->usertype == 1) {
 
                $apply      =   $partM->getPartSqInfo(array("uid" => $this->uid, "jobid" => $id));
                $this->yunset('apply', $apply);
 
                $collect    =   $partM->getPartCollectInfo(array("uid" => $this->uid, "jobid" => $id));
                $this->yunset('collect', $collect);
            }
            $this->yunset('job', $job);
            $this->yunset('ComInfo', $info['com']);
 
        }
        $data['part_name']  =   $job['name'];
        $this->data         =   $data;
        $this->seo('part_show');
        $this->yun_tpl(array('show'));
    }
 
    //兼职报名
    function partapply_action()
    {
 
        $partM  =   $this->MODEL('part');
 
        $data   =   array(
            'uid'       =>  $this->uid,
            'usertype'  =>  $this->usertype,
            'jobid'     =>  (int)$_POST['jobid'],
            'port'      =>  '1'
        );
        $return =   $partM->addPartSq($data);
        echo json_encode($return);
        die;
    }
 
    //兼职收藏
    function partcollect_action()
    {
 
        $partM  =   $this->MODEL("part");
 
        $data   =   array(
            'uid'       =>  $this->uid,
            'usertype'  =>  $this->usertype,
            'jobid'     =>  (int)$_POST['jobid'],
            'comid'     =>  (int)$_POST['comid'],
 
        );
        $return =   $partM->addPartCollect($data);
        echo json_encode($return);
        die;
    }
 
    //微信扫码查看联系方式
    function telQrcode_action()
    {
 
        $WxM    = $this->MODEL('weixin');
        $qrcode = $WxM->pubWxQrcode('parttel', $_GET['id']);
 
        if (isset($qrcode)) {
 
            $imgStr = CurlGet($qrcode);
            header("Content-Type:image/png");
            echo $imgStr;
        }
    }
}
 
?>