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
<?php
 
class rebates_controller extends train{
    //返利列表
    function index_action(){
 
        $LietoutM    =    $this->MODEL('lietou');
        
        $where['uid']    =    $this->uid;
 
        $urlarr['c']    =    "rebates";
        $urlarr['page']    =    "{{page}}";
        $pageurl        =    Url('member',$urlarr);
        $pageM            =    $this  -> MODEL('page');       
        $pages            =    $pageM -> pageList('rebates',$where,$pageurl,$_GET['page']);
    
        $where['limit']        =    $pages['limit'];
        $where['orderby']    =    array('id,desc');
        $rows    =    $LietoutM->getRebatesList($where);
 
        $this->yunset("rows",$rows); 
 
        $this->train_satic();
        
        $this->train_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']);
    }
}
?>