chengkun
2025-04-27 1158f672536ba406cc4bef68aed19a6c05483ab4
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<?php
 
class jobpack_controller extends lietou{
    
    function index_action(){
        
        $this->public_action();
        include(CONFIG_PATH."db.data.php");
        
        $packM                    =    $this->MODEL('pack');
        
        $where['uid']            =    $this->uid;
        
        if($_GET['state']){
            
            $where['status']    =    array('in',pylode(',',$arr_data['rewardstate'][$_GET['state']]['state']));
            
            $urlarr['state']    =    $_GET['state'];
        }
        $pageurl    =    Url('member',$urlarr);
 
        $pageM        =    $this  -> MODEL('page');
        $pages        =    $pageM -> pageList('company_job_rewardlist',$where,$pageurl,$_GET['page'],$this->config['sy_listnum']);
        
        if($pages['total'] > 0){
            if($_GET['order'])
            {
                $where['orderby']        =    $_GET['t'].','.$_GET['order'];
                $urlarr['order']        =    $_GET['order'];
                $urlarr['t']            =    $_GET['t'];
            }else{
                $where['orderby']        =    'datetime';
            }
            $where['limit']    =    $pages['limit'];
             
            $List    =    $packM -> getJobRewardList($where,array('utype'=>'lietou'));
            
            $this->yunset("rows" , $List);
        }
        $this->yunset("StateList",$arr_data['rewardstate']);
        
        $this->lietou_tpl('jobpack');
    }
 
    function logstatus_action()
    {
    
        if($_POST){
 
            $M    =    $this->MODEL('pack');
 
            $_POST['port']    =    '1';
            $return    =    $M->logStatus((int)$_POST['rewardid'],(int)$_POST['status'],$this->uid,'1',$_POST);
 
            if($return['error']==''){
 
                //悬赏职位设定成功
                echo json_encode(array('error'=>'ok'));
            }else{
 
                //生成失败 返回具体原因
                echo json_encode(array('error'=>$return['error']));
            }
        }
    }
 
    function arb_action(){
        if($_POST){
 
            if(!$_POST['rewardid']){
                $this->ACT_layer_msg("请选择需要仲裁的赏单!",8,$_SERVER['HTTP_REFERER']);
            }
            if(!$_POST['content']){
                $this->ACT_layer_msg("请填写仲裁原因!",8,$_SERVER['HTTP_REFERER']);
            }else{
                $data['content'] = $_POST['content'];
            }
            
            $data['file']     = $_FILES['file'];
            $M        =    $this->MODEL('pack');
            $data['port']    =    '1';
            $return    =    $M->logStatus((int)$_POST['rewardid'], 26, $this->uid, '1', $data);
                
            if($return['error']==''){
                //悬赏职位设定成功
                $this->ACT_layer_msg("仲裁提交成功!",9,$_SERVER['HTTP_REFERER']);
                    
            }else{
                 //生成失败 返回具体原因
                $this->ACT_layer_msg($return['error'],8,$_SERVER['HTTP_REFERER']);
            }
        }
    
    
    }
    function loglist_action(){
        $packM        =    $this->MODEL('pack');
        
        $where['uid']    =    $this->uid;
        //分页链接
        $urlarr['page']    =    '{{page}}';
        $urlarr['act']    =    $_GET['act'];
        $urlarr['c']    =    $_GET['c'];
        $pageurl        =    Url('member',$urlarr);
        
        //提取分页
        $pageM            =    $this  -> MODEL('page');
        $pages            =    $pageM -> pageList('company_job_sharelog',$where,$pageurl,$_GET['page']);
        
        //分页数大于0的情况下 执行列表查询
        if($pages['total'] > 0){
            
            $where['orderby']        =    'time,desc';
            $where['limit']            =    $pages['limit'];
            
            $List                    =    $packM->getShareLogList($where);
            $this->yunset("rows",$List);
        }
        $this->getStatis('loglist');
        $this->public_action();
        $this->lietou_tpl('loglist');
    }
    //提现
    function withdraw_action(){
        //查询账户余额信息
        if($_POST['price']    &&    $_POST['real_name']){
            $packM    =    $this->MODEL('pack');
            
            $return    =    $packM->withDraw($this->uid,$this->usertype,$_POST['price'],$_POST['real_name']);
 
            if($return['errcode'] == 1){
                $this->ACT_layer_msg("提现成功,请关注微信账户提醒!",9,$_SERVER['HTTP_REFERER']);
                
            }else{
                $this->ACT_layer_msg($return['msg'],8,$_SERVER['HTTP_REFERER']);
            }
            
        }else{
            $userinfoM    =     $this -> MODEL('userinfo');
            $member        =   $userinfoM -> getInfo(array('uid'=> $this->uid),array('field'=>'`wxid`'));
            if(!$member['wxid']){
                $this -> ACT_msg("index.php?c=binding","请先绑定微信!");
            }
            
            $this->getStatis();
            $this->public_action();
            $this->lietou_tpl('withdraw');
        }
        
    }
    function change_action(){
        
        $orderM        =    $this->MODEL('companyorder');
        
        $nWhere['com_id']        =    $this->uid;
        $nWhere['usertype']        =    $this->usertype;
        $nWhere['pay_remark']    =    array('like', '转换'.$this->config['integral_pricename']);
        $nWhere['pay_time']        =    array('>=', strtotime(date("Y-m-d 00:00:00")));
        
        $changeNum     =     $orderM->getCompanyPayNum($nWhere);    
 
        $this->getStatis();
        
        $this->public_action();
        $this->yunset("changeNum",$changeNum);
        $this->lietou_tpl('change');
    }
    
    function savechange_action(){
        
        
        $data['uid']            =    $this->uid;
        
        $data['usertype']        =    3;
        
        $data['changeprice']     =    $_POST['changeprice'];
        
        $data['changeintegral']    =    $_POST['changeintegral'];
        
        $packM                    =    $this    ->    MODEL('pack');
        $return                    =    $packM    ->    saveChange($data);
        
        echo json_encode($return);
    }
    
    function changelist_action(){
        $orderM            =    $this->MODEL('companyorder');
        
        $where['com_id']        =    $this->uid;
        $where['usertype']        =    $this->usertype;
        $where['pay_remark']    =    array('like','转换'.$this->config['integral_pricename']);
        
        //分页链接
        $urlarr['page']    =    '{{page}}';
        $urlarr['act']    =    "changelist";
        $urlarr['c']    =    "jobpack";
        $pageurl        =    Url('member',$urlarr);
        
        //提取分页
        $pageM            =    $this  -> MODEL('page');
        $pages            =    $pageM -> pageList('company_pay',$where,$pageurl,$_GET['page']);
        
        //分页数大于0的情况下 执行列表查询
        if($pages['total'] > 0){
            
            $where['orderby']    =    'pay_time,desc';
            $where['limit']        =    $pages['limit'];
            
            $List                =    $orderM->getPayList($where);
            $this->yunset("rows",$List);
        }
        $this->getStatis();
        $this->public_action();
        $this->lietou_tpl('changelist');
    }
    
    function withdrawlist_action(){
        $packM            =    $this->MODEL('pack');
        
        $where['uid']    =    $this->uid;
        
        //分页链接
        $urlarr['page']    =    '{{page}}';
        $urlarr['c']    =    "jobpack";
        $urlarr["act"]    =    "withdrawlist";
        $pageurl        =    Url('member',$urlarr);
        
        //提取分页
        $pageM            =    $this  -> MODEL('page');
        $pages            =    $pageM -> pageList('member_withdraw',$where,$pageurl,$_GET['page']);
        
        //分页数大于0的情况下 执行列表查询
        if($pages['total'] > 0){
            
            $where['orderby']        =    'id,desc';
            $where['limit']            =    $pages['limit'];
            
            $List                    =    $packM->getList($where);
            $this->yunset("rows",$List);
        }
        $this->getStatis('');
        $this->public_action();
        $this->lietou_tpl('withdrawlist');
    }
    
    function getStatis($type = ''){
        $statisM      =     $this->MODEL('statis');
        
        $statis        =     $statisM->getInfo($this->uid,array('usertype'=>3));
        
        if($type=='loglist'){
            $statis['freeze'] = sprintf("%.2f", $statis['freeze']);
        }
        
        $this->yunset("statis",$statis);
    }
}
?>