chengkun
2025-04-30 6ab292fb7415be124651e312ec4f21c594568f17
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
<?php
 
 
 
class partadd_controller extends company
{
    function index_action()
    {
 
        $company    =   $this->comInfo['info'];
 
        if (!$company['name'] || !$company['provinceid'] || (!$company['linktel'] && !$company['linkphone'])) {
 
            $this->ACT_msg('index.php?c=info', '请先完善基本资料!');
        }
        $this->yunset('company', $company);
 
        // 身份认证信息,强制邮箱、手机、企业资质认证配置--start
        $msg        =   array();
 
        $isallow_addjob =   '1';
 
        $url        =   $this->spid ? 'index.php' : 'index.php?c=binding';
 
        if ($this->config['com_enforce_emailcert'] == '1') {
            if ($company['email_status'] != '1') {
 
                $isallow_addjob =   '0';
                $msg[]          =   '邮箱认证';
            }
        }
        if ($this->config['com_enforce_mobilecert'] == '1') {
            if ($company['moblie_status'] != '1') {
 
                $isallow_addjob =   '0';
                $msg[]          =   '手机认证';
            }
        }
 
        if ($this->config['com_enforce_licensecert'] == '1') {
 
            $comM   =   $this->MODEL('company');
            $cert   =   $comM->getCertInfo(array('uid' => $this->uid, 'type' => 3), array('field' => '`uid`,`status`'));
 
            if ($company['yyzz_status'] != '1' && (empty($cert) || $cert['status'] == 2)) {
 
                $isallow_addjob =   '0';
                $msg[]          =   '企业资质认证';
            }
        }
 
        if ($isallow_addjob == '0') {
            if ($this->spid) {
 
                $this->ACT_msg($url, '请联系主账号,先完成' . implode('、', $msg) . '!');
            } else {
 
                $this->ACT_msg($url, '请先完成' . implode('、', $msg) . '!');
            }
        }
 
        if ($this->config['com_enforce_setposition'] == '1') {
            if (empty($company['x']) || empty($company['y'])) {
                $this->ACT_msg('index.php?c=map', '请先完成地图设置!');
            }
        }
 
        if ($this->config['com_gzgzh'] == '1') {
 
            $userinfoM  =   $this->MODEL('userinfo');
            $uInfo      =   $userinfoM->getInfo(array('uid' => $this->uid), array('field' => '`wxid`,`unionid`'));
            if (empty($uInfo['wxid']) && empty($uInfo['unionid'])) {
 
                $this->cookie->SetCookie('gzh', '', (strtotime('today') - 86400));
                $this->ACT_msg('index.php', '请先关注公众号!');
            }
        }
 
        $partM      =   $this->MODEL('part');
        $statisM    =   $this->MODEL('statis');
 
        $id         =   intval($_GET['id']);
 
        if ($id) {
            $row    =   $partM->getInfo(array('uid' => $this->uid, 'id' => $id));
 
            $row['info']['workcishu']   =   count($row['info']['worktime_n']);
            $this->yunset('row', $row['info']);
        } else {
 
            $statics    =   $this->company_satic();
 
            if ($statics['addjobnum'] == 0) {//会员过期
                if ($this->spid) {
 
                    $this->ACT_msg('index.php', '当前账号会员已到期,请联系主账号进行升级!', 8);
                } else {
 
                    $this->ACT_msg("index.php?c=right", "你的会员已到期!", 8);
                }
            }
            if ($statics['addjobnum'] == 2) {//套餐会员,发布兼职套餐为0
                if ($this->config['integral_job'] != '0') {
                    if ($this->spid) {
 
                        $this->ACT_msg('index.php', '您的套餐已用完,请联系主账号进行分配!', 8);
                    } else {
 
                        $this->ACT_msg("index.php?c=right", "你的套餐已用完!", 8);
                    }
                } else {
                    if ($this->spid) {
 
                        $statisM->upInfo(array('job_num' => 1), array('uid' => $this->spid, 'usertype' => $this->usertype));
                    } else {
 
                        $statisM->upInfo(array('job_num' => 1), array('uid' => $this->uid, 'usertype' => $this->usertype));
                    }
 
                }
            }
        }
 
        $this->yunset($this->MODEL('cache')->GetCache(array('city', 'part')));
 
        $this->company_satic();
        $this->public_action();
        $this->yunset("today", date("Y-m-d"));
 
        $this->com_tpl('partadd');
    }
 
    function save_action()
    {
 
        if ($_POST['submit']) {
 
            $_POST['r_status']  =   $this->comInfo['info']['r_status'];
 
            $partM              =   $this->MODEL('part');
 
            $this->cookie->SetCookie('delay', "", time() - 60);
 
            if ($_POST['timetype']) {
 
                $_POST['edate'] =   "";
            } else {
 
                $_POST['edate'] =   strtotime($_POST['edate']);
            }
 
            $data               =   $_POST;
 
            $data['uid']        =   $this->uid;
            $data['spid']       =   $this->spid;
            $data['usertype']   =   $this->usertype;
            $data['utype']      =   'user';
 
            $return =   $partM->upPartInfo($data);
            $toUrl  =   $return['errcode'] == 9 ? 'index.php?c=part' : '';
            $this->ACT_layer_msg($return['msg'], $return['errcode'], $toUrl);
        }
    }
}
 
?>