chengkun
2025-05-26 4462855c0033970c39ac8d0da704b7dc41eabbfe
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
<?php
 
 
 
class wap_controller extends common
{
 
    public $resumeInfo  =   array();
    public $comInfo     =   array();
    public $ltInfo      =   array();
    public $pxInfo      =   array();
 
    function __construct($tpl, $db, $def = '', $model = 'index', $m = '')
    {
 
        $this->common($tpl, $db, $def, $model, $m);
 
        if ($this->usertype == 1) {
 
            //判断是否强制创建简历(等同于企业强制完善基本资料)
            $resumeM    =   $this->MODEL('resume');
 
            if ($this->config['user_resume_status'] == '1') {
                if (!in_array($_GET['c'], array('addresume', 'userLog', 'kresume', 'binding'))) {
 
                    $expectnum  =   $resumeM->getExpectNum(array('uid' => $this->uid));
 
                    if ($expectnum < 1) {
 
                        $this->yunset('header_title', '创建简历');
                        $this->yunset("remind", array('info' => '请先创建一份简历!', 'url' => 'index.php?c=addresume', 'btn' => '立即创建'));
                        $this->yuntpl(array('wap/member/user/addresume'));
                    }
                }
            } else {
 
                $this->resumeInfo =   $resumeM->getResumeInfo(array('uid' => $this->uid));
                if (!$this->resumeInfo['uid']) {
 
                    $isActivUser    =   1;
                    $activuid       =   $this->uid;
                }
            }
        } elseif ($this->usertype == 2) {
 
            if (!empty($this->spid) && in_array($_GET['c'], array('info', 'rating', 'time', 'added', 'pay', 'payment', 'integral', 'set', 'loglist', 'usercard', 'withdraw', 'change', 'jobpack', 'rewardpay'))) {
 
                $this->Act_msg_wap(Url('wap', '', 'member'), '操作错误!', 2, 5);
            }
 
            $this->yunset('todayStart', strtotime('today'));
 
            $CompanyM       =   $this->MODEL("company");
            $this->comInfo  =   $CompanyM->getInfo($this->uid, array('info' => '1', 'edit' => '1', 'logo' => '1', 'utype' => 'user'));
            $this->yunset('info', $this->comInfo);
 
            if (!in_array($_GET['c'], array('photo', 'info', 'userLog', 'ajaxCheckInfo'))) {
 
                // 强制完善基本资料
                if ($this->config['com_enforce_info'] == 1) {
                    if (!$this->comInfo['info']['name'] || !$this->comInfo['info']['provinceid'] || !$this->comInfo['info']['linktel']) {
 
                        $this->yunset('header_title', '基本信息');
                        $this->yunset("remind", array('info' => '请先完善信息!', 'url' => 'index.php?c=info', 'btn' => '立即完善'));
                        $this->yuntpl(array('wap/member/com/info'));
                    }
                } elseif (!$this->comInfo['info']['uid']) {
 
                    $isActivUser    =   1;
                    $activuid       =   $this->uid;
                }
            }
        } elseif ($this->usertype == 3) {
 
            $LietouM        =   $this->MODEL('lietou');
            $this->ltInfo   =   $LietouM->getInfo(array('uid' => $this->uid));
 
            $this->yunset('todayStart', strtotime('today'));
 
            if (!in_array($_GET['c'], array('info', 'uppic', 'userLog'))) {
                if ($this->config['lt_enforce_info'] == 1) {
                    // 强制完善基本资料
                    if (!$this->ltInfo['realname'] || !$this->ltInfo['com_name'] || !$this->ltInfo['provinceid'] || !$this->ltInfo['moblie']) {
 
                        $this->yunset("remind", array('info' => '请先完善信息!', 'url' => 'index.php?c=info', 'btn' => '立即完善'));
                        $this->yunset('header_title', '基本信息');
                        $this->yuntpl(array('wap/member/lietou/info'));
                    }
                } elseif (!$this->comInfo['info']['uid']) {
 
                    $isActivUser    =   1;
                    $activuid       =   $this->uid;
                }
 
            }
        } elseif ($this->usertype == 4) {
 
            $TrainM         =   $this->MODEL('train');
            $this->pxInfo   =   $TrainM->getInfo(array('uid' => $this->uid));
 
            $this->yunset('info', $this->pxInfo);
 
            if (!in_array($_GET['c'], array('info', 'userLog'))) {
                // 强制完善基本资料
                if ($this->config['px_enforce_info'] == 1) {
                    if (!$this->pxInfo['name'] || !$this->pxInfo['linktel']) {
 
                        $this->yunset("remind", array('info' => '请先完善信息!', 'url' => 'index.php?c=info', 'btn' => '立即完善'));
                        $this->yunset('header_title', '基本信息');
                        $this->yuntpl(array('wap/member/train/info'));
                    }
                } elseif (!$this->pxInfo['uid']) {
 
                    $isActivUser    =   1;
                    $activuid       =   $this->uid;
                }
            }
        }
 
        //容错机制,前期强制完善资料,后期开放,防止部分数据无uid 又可以直接操作会员中心
        if ($isActivUser == 1) {
 
            $userinfoM  =   $this->MODEL("userinfo");
            $userinfoM->activUser($activuid, $this->usertype);
        }
 
        include PLUS_PATH . 'tplmoblie.cache.php';
        $this->yunset('tplmoblie', $tplmoblie);
    }
 
    function waplayer_msg($msg, $url = '1', $tm = 2)
    {
 
        $msg    =   preg_replace('/\([^\)]+?\)/x', "", str_replace(array("(", ")"), array("(", ")"), $msg));
 
        $layer_msg['msg']   =   $msg;
        $layer_msg['url']   =   $url;
        $layer_msg['tm']    =   $tm;
 
        $msg    =   json_encode($layer_msg);
        echo $msg;
        die();
    }
}
 
?>