chengkun
2025-05-26 8f3df543230cd4403368b39b9bbe5726d11a0284
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
<?php
 
 
 
class part_controller extends common
{
 
    function index_action()
    {
        $this->get_moblie();
 
        if ($this->config['sy_part_web'] == '2') {
 
            $this->ACT_msg_wap('index.php', '很抱歉!该模块已关闭!', 1, 3);
        }
 
        $CacheM     =   $this->MODEL('cache');
        $CacheArr   =   $CacheM->GetCache(array('part', 'city'));
        $this->yunset($CacheArr);
 
        $searchurl  =   array();
        $searchUrlObj = array();
 
        foreach ($_GET as $k => $v) {
            if ($k != '') {
                $searchurl[]    =   $k.'='.$v;
                $searchUrlObj[$k]    = $v;
            }
        }
        $searchurl  =   @implode('&', $searchurl);
        $this->yunset('searchurl', $searchurl);
        $this->yunset('searchUrlObj',json_encode($searchUrlObj));
 
        $this->yunset('backurl', Url('wap'));
        $this->seo('part_index');
        $this->yunset('topplaceholder', '请输入关键字');
        $this->yunset('headertitle', "兼职");
        $this->yuntpl(array('wap/part'));
    }
 
    function show_action()
    {
 
        if ($this->config['sy_part_web'] == '2') {
            $this->ACT_msg_wap('index.php', '很抱歉!该模块已关闭!', 1, 3);
        }
 
        $this->get_moblie();
 
        if (!empty($_GET['id'])) {
 
            $id     =   (int)$_GET['id'];
            $partM  =   $this->MODEL('part');
            $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['id']) {
 
                $job['com_name']    =   $info['com']['name'];
                $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);
            } else {
 
                $this->ACT_msg_wap('index.php', '该兼职暂无法展示!', 1, 3);
            }
        }
 
        $data['part_name']  =   $job['name'];
        $this->data         =   $data;
 
        $this->seo('part_show');
        $this->yunset('headertitle', '兼职');
        $this->yuntpl(array('wap/part_show'));
    }
 
    /**
     * @desc 收藏兼职
     */
    function collect_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();
    }
 
    /**
     * @desc   报名兼职
     */
    function apply_action()
    {
 
        $partM  =   $this->MODEL('part');
 
        $data   =   array(
            'uid'       =>  $this->uid,
            'usertype'  =>  $this->usertype,
            'jobid'     =>  (int)$_POST['jobid'],
            'port'      =>  '2'
        );
        $return =   $partM->addPartSq($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;
        }
    }
}
 
?>