交友网站平台开发搭建 第十篇

今天,还是跟以往的一样,接着把后台的功能都记录下来,先上一些图片先。

​如果有什么问题需要咨询的,可以加我的扣236-0248-666

交友网站平台开发搭建 第十篇_第1张图片

交友网站平台开发搭建 第十篇_第2张图片 

 当前模块参数

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);
    			}
    		}
    	}
    }

你可能感兴趣的:(婚恋交友网站开发制作,婚恋交友微信公众号版开发制作,html5,机器学习,html)