<?php
namespace member\controller;

/**
 * 106云盘自动发卡平台网盘系统
 * ============================================================================
 * 版权所有 2016-2028 扎兰屯市姝妍计算机服务有限公司，并保留所有权利。
 * 网站地址: http://www.106ym.com
 * ----------------------------------------------------------------------------
 * 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
 * ============================================================================
 */
class Developer extends Member {
	

	// 管理列表
	public function index(){

		$this->display();
    }
	
	
	// 管理列表
	public function lists(){
		// 记录当前列表页的cookie
		cookie('lists',U('lists',$_REQUEST));
		
		$m=D($this->model);
		$where=array();
		$order=$this->pk." desc";
		$count=$m->where($where)->count();
		$page       = new \source\Page($count,20); //3.2
		$nowPage = I("p",1);
		$this->page  = $page->show();
		$this->list=$m->order($order)->where($where)->page($nowPage.','.$page->listRows)->select();
		$this->display();
		
		
    }
	
	
	
	//添加
	public function xufei(){
		$this->display();
	}
	
	//修改
	public function mod($id){
		$m = D($this->model);
		if(IS_POST){
			if($m->create() && $m->save()){
				$this->success('修改成功',Cookie('__forward__'));
			}else{
				$this->error($m->getError());
			}
		}else{
			$this->modval = $m->find($id);
			$this->display();
		}
	}
	
	//删除
	public function del($ids){
		//数据准备
		$m = D($this->model);
		$where[$this->pk]=array('in',$ids);
		$m->where($where)->delete();
		$this->success('删除成功',Cookie('__forward__'));
	}

}