chengkun
2025-05-23 a6f7b382623096b6a00924f418447cf5204e825e
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
<?php
 
class rebates_controller extends user{
    //我推荐的悬赏列表
    function index_action(){
        $this->public_action();
        $where['uid']    =  $this->uid;
        $urlarr['c']    =    $_GET['c'];
        $urlarr['page']    =    '{{page}}';
        $pageurl        =    Url('member',$urlarr);
 
        $pageM            =    $this->MODEL('page');
        $pages            =    $pageM->pageList('rebates',$where,$pageurl,$_GET['page']);
        
        if($pages['total'] > 0){
            $where['orderby']        =    'id';
            $where['limit']            =    $pages['limit'];
            
            $lietouM  =  $this->MODEL('lietou');
            
            $List       =  $lietouM->getRebatesList($where);
        }
        $this->yunset("rows",$List);
        $this->user_tpl('rebates');
    }
    //删除我推荐的悬赏
    function del_action(){
        $id            =    (int)$_GET['id'];
        $ltM        =    $this -> MODEL('lietou');
        $result        =    $ltM -> delRebates($id,array('uid'=>$this->uid,'usertype'=>$this->usertype,'type'=>1));//type==1我推荐的人才
        $this -> layer_msg($result['msg'],$result['errcode'], $result['layertype'], $_SERVER['HTTP_REFERER']);
        
    }
}
?>