Example #1
0
 public function index()
 {
     if (IS_POST) {
         parent::page(array('size' => PUT('size', 10), 'page' => PUT('p'), 'orderby' => 'id desc'));
     } else {
         $this->display();
     }
 }
Example #2
0
 /**
  * 数据列表
  */
 public function lists()
 {
     if (IS_POST) {
         $title = PUT('title');
         $map = array();
         // $map['title']   = array('like',"%$title%");
         parent::page(array('size' => PUT('size', 10), 'page' => PUT('p'), 'where' => $map, 'orderby' => 'id asc'));
     } else {
         $this->display();
     }
 }
Example #3
0
 /**
  * 数据列表
  */
 public function lists()
 {
     if (IS_POST) {
         $title = PUT('title');
         $map = array();
         $map['type'] = 1;
         $map['title'] = array('like', "%{$title}%");
         parent::page(array('after_select' => 'after_select', 'size' => PUT('size', 10), 'page' => PUT('p'), 'where' => $map, 'orderby' => 'sort desc,id desc'));
     } else {
         $this->display();
     }
 }
Example #4
0
 /**
  * 数据列表
  */
 public function lists()
 {
     if (IS_POST) {
         $username = PUT('username');
         $role_id = PUT('role_id');
         $map = array();
         $map['username'] = array('like', "%{$username}%");
         if ($role_id) {
             $map['role_id'] = $role_id;
         }
         parent::page(array('size' => PUT('size', 10), 'page' => PUT('p'), 'rel' => true, 'where' => $map, 'orderby' => 'id'));
     } else {
         $this->display();
     }
 }
Example #5
0
 public function _initialize()
 {
     parent::_initialize();
     $this->model = D('User');
 }
Example #6
0
 protected function display()
 {
     parent::display('index');
 }
Example #7
0
 public function _initialize()
 {
     parent::_initialize();
 }
Example #8
0
 public function _initialize()
 {
     parent::_initialize();
     $this->model = D('Db', 'Logic');
 }