关于php:交友网站平台开发搭建-第十篇

34次阅读

共计 3639 个字符,预计需要花费 10 分钟才能阅读完成。


明天,还是跟以往的一样,接着把后盾的性能都记录下来,先上一些图片先。
如果有什么问题须要征询的,能够加我的扣 236-0248-666


 以后模块参数

public function _infoModule()

{
    $data = array(
        'info' => array(
            'name' => '金钱记录治理',
            'description' => '治理用户金钱变动记录',
        ),
        'menu' => array(
            array(
                'name' => '金钱记录列表',
                'url' => U('Admin/JinqianLog/index',array('type'=>1)),
                'icon' => 'list',
            ),
            array(
                'name' => '聊天变动列表',
                'url' => U('Admin/JinqianLog/index',array('type'=>2)),
                'icon' => 'list',
            ),
            array(
                'name' => '照片变动列表',
                'url' => U('Admin/JinqianLog/index',array('type'=>3)),
                'icon' => 'list',
            ),
            array(
                'name' => '签到变动列表',
                'url' => U('Admin/JinqianLog/index',array('type'=>4)),
                'icon' => 'list',
            )
        ),
       );
    return $data;
}

列表

public function index(){

    
    $type = I('get.type','');    
    $flag = I('request.flag','');    
                
    if($type == 1){$model = M("AccountMoneyLog");
        if(!empty($flag)) $where['type'] = $flag;
        $this -> assign('name','金钱变动');
        $breadCrumb = array('金钱记录列表' => U('index',array('type'=>1)));
    }elseif($type == 2){$model = M("AccountMoneyLogLt");    // 聊天
        $this -> assign('name','聊天变动');
        $breadCrumb = array('聊天变动列表' => U('index',array('type'=>2)));
    }elseif($type == 3){$model = M("AccountMoneyLogPhoto");  // 上传照片
        $this -> assign('name','照片变动');
        $breadCrumb = array('照片变动列表' => U('index',array('type'=>3)));
    }elseif($type == 4){$model = M("AccountMoneyLogQd");    // 签到
        $this -> assign('name','签到变动');
        $breadCrumb = array('签到变动列表' => U('index',array('type'=>4)));
    }
    
    $keyword = I('request.keyword','','trim');
    
    $pageMaps['keyword'] = $keyword;
       $pageMaps['type'] = $type;
    if(!empty($keyword)){$where['_string'] = 'uid ='.$keyword;
    } 
            
    $count = $model -> where($where) -> count();
    $limit = $this -> getPageLimit($count,19);  // 获取每页要显示的条数 
    $list = $model -> where($where) -> order('time desc') -> limit($limit) -> select();
    
    foreach($list as $k => $v){$ids[] = $v['uid'];
    }
    $ids = array_unique($ids);
    $ids = join($ids, ',');
    $result = D('Users') -> getNicename($ids);
    
    
    $this->assign('breadCrumb', $breadCrumb);        
    $this -> assign('niceName',$result);
    $this -> assign('page',$this->getPageShow($pageMaps));
    $this -> assign('list',$list);
    $this -> assign('type',$type);
           
    $this->adminDisplay();}

会员列表现金

public function index()

{$keyword = I('request.keyword','','trim');
    $type =I('request.type','','intval');
    $status =I('request.status','','intval');
    
    $breadCrumb = array('现金发放列表' => U());
    $this->assign('breadCrumb', $breadCrumb);
    //$this->assign('list', D('User')->loadData());
    
    $pageMaps = array();
    $pageMaps['keyword'] = $keyword;
    $pageMaps['type'] = $type;
    $pageMaps['status'] = $status;
     $where = array();
    if(!empty($keyword)){$where['_string'] = '(B.user_login like"%'.$keyword.'%") OR (A.uid ="'.$keyword.'")';
    }
    if(!empty($type)){$where['A.type'] = $type;
    }
    if(!empty($status)){$where['A.status'] = $status;
    }

   // $pageMaps['class_id'] = $classId;
   // $pageMaps['position_id'] = $positionId;
    // 查问数据
    
    $count = D('Tixian')->countList($where);
   
    $limit = $this->getPageLimit($count,20);
    //dump($limit);
    
   $list = D('Tixian')->loadList($where,$limit);
   $this->assign('pageMaps',$pageMaps);
     
  
   $type =array(
           1=>'微信',
           2=>'支付宝',
           3=>'话费充值',
   );
   $status =array(
           0=>'失败',
           1=>'胜利',
           2=>'审核中'
   );
   
    $this->assign('type',$type);
    $this->assign('page',$this->getPageShow($pageMaps));
    
    $this->assign('list',$list);
    $this->assign('status',$status);
    //print_r($list);
    $this->adminDisplay();}

批改

public function edit(){

    if(!IS_POST){$breadCrumb = array('列表'=>U('index'),'批改'=>U());
        $this->assign('breadCrumb',$breadCrumb);
        $Id = I('get.id','','intval');
        if(empty($Id)) $this->error('参数不能为空!');
        // 获取记录
        $info = M ('Tixian')->where ("id=$Id")->find ();
        
        if(!$info) $this->error('无数据!');
        $type =array(
                -1=>'后盾操作',
                1=>'分享文章送',
                2=>'关注送',
                3=>'分享好友送',
                4=>'提现',
                5=>'摇一摇',
        );
        $this->assign('info',$info);
        $this->assign('type',$type);
        $this->adminDisplay('info');
    }else{if(I('post.status')==1){$res = A('Home/Site')->new_tixian(I('post.id'));                
            if($res!= 1) $this->error($res);    
            
        }            
        if(D('Tixian')->saveData('edit')){$this->success('批改胜利!');
        }else{$msg = D('Tixian')->getError();
            if(empty($msg)){$this->error('批改失败');
            }else{$this->error($msg);
            }
        }
    }
}

正文完
 0