当前位置: 首页>>代码示例>>PHP>>正文


PHP Paging::pagination方法代码示例

本文整理汇总了PHP中Paging::pagination方法的典型用法代码示例。如果您正苦于以下问题:PHP Paging::pagination方法的具体用法?PHP Paging::pagination怎么用?PHP Paging::pagination使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Paging的用法示例。


在下文中一共展示了Paging::pagination方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: exeAlbum

 function exeAlbum()
 {
     if (Session::get('user') != null) {
         Document::setTitle('Album ảnh');
         Document::setJs(array('image', 'jquery.form'));
         $data = array();
         $display = 15;
         $totalPage = ceil($this->model->total("`username` = '" . Session::get('user')['username'] . "'") / $display);
         if ((int) Request::get('page') > 0) {
             $page = Request::get('page');
             if ($totalPage < $page) {
                 $page = $totalPage;
             }
         } else {
             $page = 1;
         }
         $pageLink = new Paging($page, $totalPage);
         $data['pagination'] = $pageLink->pagination('?');
         $data['images'] = $this->model->selectUser(Session::get('user')['username'], ($page - 1) * $display, $display);
         $data['url'] = BASE_URL . '/';
         $data['action'] = BASE_URL . '/image/add';
         $this->view->render('album', $data);
     } else {
         Until::redirectTo();
     }
 }
开发者ID:noikiy,项目名称:lovetolove,代码行数:26,代码来源:Image.php

示例2: exeDefault

 public function exeDefault()
 {
     Document::setTitle('Quản lý ảnh');
     Document::setJs(array('jquery-1.8.3.min', 'image-admin'));
     $data = array();
     $keySearch = Request::get('keySearch');
     $data['keySearch'] = $keySearch;
     $condition = '';
     if ($keySearch == null) {
         $link = '?';
     } else {
         $link = '?keySearch=' . $keySearch . '&';
         $condition = 'LOWER(`username`)="' . strtolower($keySearch) . '"';
     }
     $display = 20;
     $totalPage = ceil($this->model->total($condition) / $display);
     if ((int) Request::get('page') > 0) {
         $page = Request::get('page');
         if ($totalPage < $page) {
             $page = $totalPage;
         }
     } else {
         $page = 1;
     }
     $pageLink = new Paging($page, $totalPage);
     $data['title'] = BASE_URL_ADMIN . '/image';
     $data['pagination'] = $pageLink->pagination($link);
     $data['images'] = $this->model->selectAll(($page - 1) * $display, $display, $condition);
     $data['ajax'] = BASE_URL_ADMIN . '/image/load';
     $data['imageLoad'] = BASE_URL . '/public/css/images/loading.gif';
     $data['url'] = BASE_URL . '/';
     $this->view->render('index', $data);
 }
开发者ID:noikiy,项目名称:lovetolove,代码行数:33,代码来源:Image.php

示例3: exeDefault

 function exeDefault()
 {
     Document::setTitle('Liên hệ');
     Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery', 'jquery.msgBox'));
     $data = array();
     $keySearch = Request::get('keySearch');
     $find = Request::get('find');
     $searchName = '';
     $searchEmail = '';
     if ($find == 'name') {
         $searchName = 'selected="selected"';
     } elseif ($find == 'email') {
         $searchEmail = 'selected="selected"';
     }
     $data['searchName'] = $searchName;
     $data['searchEmail'] = $searchEmail;
     $data['keySearch'] = $keySearch;
     $condition = '';
     if ($keySearch == null) {
         $link = '?';
     } else {
         $link = '?keySearch=' . $keySearch . '&';
         if ($searchEmail != '') {
             $condition = "LOWER(`email`) like '%" . strtolower($keySearch) . "%'";
         } else {
             $condition = "LOWER(`fullname`) like '%" . strtolower($keySearch) . "%'";
         }
         if ($find == 'email') {
             $link .= 'find=' . $find . '&';
         }
     }
     $display = 15;
     $totalPage = ceil($this->model->total($condition) / $display);
     if ((int) Request::get('page') > 0) {
         $page = Request::get('page');
         if ($totalPage < $page) {
             $page = $totalPage;
         }
     } else {
         $page = 1;
     }
     $pageLink = new Paging($page, $totalPage);
     $data['title'] = BASE_URL_ADMIN . '/feedback';
     $data['pagination'] = $pageLink->pagination($link);
     $data['actionDelete'] = BASE_URL_ADMIN . '/feedback/delete';
     $data['delete'] = BASE_URL_ADMIN . '/feedback/delete?id=';
     $data['detail'] = BASE_URL_ADMIN . '/feedback/detail?id=';
     $data['imageDelete'] = BASE_URL . '/public/css/images/trash.png';
     $data['feedback'] = $this->model->selectAll(($page - 1) * $display, $display, $condition);
     $this->view->render('index', $data);
 }
开发者ID:noikiy,项目名称:lovetolove,代码行数:51,代码来源:Feedback.php

示例4: exeDefault

 function exeDefault()
 {
     Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery', 'role', 'type_user'));
     Document::setTitle('Quản lý thành viên');
     $data = array();
     $keySearch = Request::get('keySearch');
     $find = Request::get('find');
     $searchName = '';
     $searchEmail = '';
     if ($find == 'name') {
         $searchName = 'selected="selected"';
     } elseif ($find == 'email') {
         $searchEmail = 'selected="selected"';
     }
     $data['title'] = BASE_URL_ADMIN . '/user';
     $data['searchName'] = $searchName;
     $data['searchEmail'] = $searchEmail;
     $data['keySearch'] = $keySearch;
     $condition = '';
     if ($keySearch == null) {
         $link = '?';
     } else {
         $link = '?keySearch=' . $keySearch . '&';
         if ($searchEmail != '') {
             $condition = "LOWER(`email`) like '%" . strtolower($keySearch) . "%'";
         } else {
             $condition = "LOWER(`username`) like '%" . strtolower($keySearch) . "%'";
         }
         if ($find == 'email') {
             $link .= 'find=' . $find . '&';
         }
     }
     $display = 20;
     $totalPage = ceil($this->model->total($condition) / $display);
     if ((int) Request::get('page') > 0) {
         $page = Request::get('page');
         if ($totalPage < $page) {
             $page = $totalPage;
         }
     } else {
         $page = 1;
     }
     $pageLink = new Paging($page, $totalPage);
     $data['pagination'] = $pageLink->pagination($link);
     $data['user'] = $this->model->selectAll(($page - 1) * $display, $display, $condition);
     $data['action'] = '';
     $this->view->render('index', $data);
 }
开发者ID:noikiy,项目名称:lovetolove,代码行数:48,代码来源:User.php

示例5: exeDefault

 function exeDefault()
 {
     Document::setTitle('Hoá đơn');
     Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery'));
     $data = array();
     $keySearch = Request::get('keySearch');
     $data['keySearch'] = $keySearch;
     $condition = '';
     if ($keySearch == null) {
         $link = '?';
     } else {
         $link = '?keySearch=' . $keySearch . '&';
         $condition = 'LOWER(`username`)="' . strtolower($keySearch) . '"';
     }
     $display = 20;
     $totalPage = ceil($this->model->total($condition) / $display);
     if ((int) Request::get('page') > 0) {
         $page = Request::get('page');
         if ($totalPage < $page) {
             $page = $totalPage;
         }
     } else {
         $page = 1;
     }
     $pageLink = new Paging($page, $totalPage);
     $data['pagination'] = $pageLink->pagination($link);
     $data['title'] = BASE_URL_ADMIN . '/bill';
     $recharge = $this->LoadRecharge();
     $data['recharge'] = $recharge->selectAll();
     $data['actionDelete'] = BASE_URL_ADMIN . '/bill/delete';
     $data['delete'] = BASE_URL_ADMIN . '/bill/delete?id=';
     $data['detail'] = BASE_URL_ADMIN . '/bill/detail?id=';
     $data['imageDelete'] = BASE_URL . '/public/css/images/trash.png';
     $data['detailRecharge'] = BASE_URL_ADMIN . '/recharge';
     $data['bill'] = $this->model->selectAll(($page - 1) * $display, $display, $condition);
     $this->view->render('index', $data);
 }
开发者ID:noikiy,项目名称:lovetolove,代码行数:37,代码来源:Bill.php

示例6: exeDefault


//.........这里部分代码省略.........
     $data['educations'] = $educations->selectAll();
     $jobs = $this->loadJob();
     $data['jobs'] = $jobs->selectAll();
     $provinces = $this->loadProvince();
     $data['provinces'] = $provinces->selectAll();
     $data['action'] = BASE_URL . '/user';
     $data['js'] = '';
     $link = '?';
     if ($ageFrom != 0 || $ageFrom != 0 || $province != 0 || $gender != null || $weightFrom != 0 || $weightTo != 0 || $heightFrom != 0 || $heightTo != 0 || $job != 0 || $education != 0 || $salary != 0) {
         $data['js'] = '<script type="text/javascript"> $(document).ready(function(){ $("#searchEnhance").removeClass("none"); })</script>';
         $link = '?' . substr($_SERVER['QUERY_STRING'], 9);
         if ($ageFrom > 0) {
             $year = getdate()['year'] - $ageFrom;
             if ($condition == '') {
                 $condition .= ' YEAR(`born`) <= "' . $year . '"';
             } else {
                 $condition .= ' AND YEAR(`born`) <= "' . $year . '"';
             }
         }
         if ($ageTo > 0) {
             $year = getdate()['year'] - $ageTo;
             if ($condition == '') {
                 $condition .= ' YEAR(`born`) >= "' . $year . '"';
             } else {
                 $condition .= ' AND YEAR(`born`) >= "' . $year . '"';
             }
         }
         if ($weightFrom > 0) {
             if ($condition == '') {
                 $condition .= ' `weight` >= "' . $weightFrom . '"';
             } else {
                 $condition .= ' AND `weight` >= "' . $weightFrom . '"';
             }
         }
         if ($weightTo > 0) {
             if ($condition == '') {
                 $condition .= ' `weight` <= "' . $weightTo . '"';
             } else {
                 $condition .= ' AND `weight` <= "' . $weightTo . '"';
             }
         }
         if ($heightFrom > 0) {
             if ($condition == '') {
                 $condition .= ' `height` >= "' . $heightFrom . '"';
             } else {
                 $condition .= ' AND `height` >= "' . $heightFrom . '"';
             }
         }
         if ($heightTo > 0) {
             if ($condition == '') {
                 $condition .= ' `height` <= "' . $heightTo . '"';
             } else {
                 $condition .= ' AND `height` <= "' . $heightTo . '"';
             }
         }
         if ($job > 0) {
             if ($condition == '') {
                 $condition .= ' `job` like "%' . $job . '%"';
             } else {
                 $condition .= ' AND `job` like "%' . $job . '%"';
             }
         }
         if ($education > 0) {
             if ($condition == '') {
                 $condition .= ' `education` >= "' . $education . '"';
             } else {
                 $condition .= ' AND `education` >= "' . $education . '"';
             }
         }
         if ($salary > 0) {
             if ($condition == '') {
                 $condition .= ' `salary` >= "' . $salary . '"';
             } else {
                 $condition .= ' AND `salary` >= "' . $salary . '"';
             }
         }
     }
     $display = 16;
     if (Session::get('user') != null) {
         if ($condition == '') {
             $condition = "`id` != '" . Session::get('user')['id'] . "'";
         } else {
             $condition .= " AND `id` != '" . Session::get('user')['id'] . "'";
         }
     }
     $totalPage = ceil($this->model->total($condition) / $display);
     if ((int) Request::get('page') > 0) {
         $page = Request::get('page');
         if ($totalPage < $page) {
             $page = $totalPage;
         }
     } else {
         $page = 1;
     }
     $pageLink = new Paging($page, $totalPage);
     $data['pagination'] = $pageLink->pagination($link);
     $data['users'] = $this->model->selectAllDetail(($page - 1) * $display, $display, $condition);
     $data['detail'] = BASE_URL . '/user/detail?user=';
     $this->view->render('index', $data);
 }
开发者ID:noikiy,项目名称:lovetolove,代码行数:101,代码来源:User.php

示例7: exeService

 public function exeService()
 {
     if ((int) Request::get('id') > 0) {
         $service = $this->LoadService();
         $sv = $service->SelectOne((int) Request::get('id'));
         if (empty($sv)) {
             Until::redirectTo('error');
         } else {
             $data = array();
             $data['services'] = $sv['feature'];
             $id = $sv['id'];
             $data['id'] = $id;
             $data['title'] = BASE_URL_ADMIN . '/article/service?id=' . $id;
             Document::setTitle($sv['feature']);
             Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery'));
             $condition = "`service_id`='" . $id . "'";
             $keySearch = Request::get('keySearch');
             $find = Request::get('find');
             $searchTitle = '';
             $searchAuthor = '';
             if ($find == 'title') {
                 $searchTitle = 'selected="selected"';
             } elseif ($find == 'author') {
                 $searchAuthor = 'selected="selected"';
             }
             $link = '?id=' . $id . '&';
             $data['searchTitle'] = $searchTitle;
             $data['searchAuthor'] = $searchAuthor;
             $data['keySearch'] = $keySearch;
             if ($keySearch != null) {
                 $link = 'keySearch=' . $keySearch . '&';
                 if ($searchTitle != '') {
                     $condition .= " AND LOWER(`title`) like '%" . strtolower($keySearch) . "%'";
                 } else {
                     $condition .= "AND LOWER(`author`) like '%" . strtolower($keySearch) . "%'";
                 }
                 if ($find == 'author') {
                     $link .= 'find=' . $find . '&';
                 }
             }
             $display = 20;
             $totalPage = ceil($this->model->total($condition) / $display);
             if ((int) Request::get('page') > 0) {
                 $page = Request::get('page');
                 if ($totalPage < $page) {
                     $page = $totalPage;
                 }
             } else {
                 $page = 1;
             }
             $pageLink = new Paging($page, $totalPage);
             $data['pagination'] = $pageLink->pagination($link);
             $data['article'] = $this->model->selectAll(($page - 1) * $display, $display, $condition);
             $data['add'] = BASE_URL_ADMIN . '/article/add?service=' . $id;
             $data['actionDelete'] = BASE_URL_ADMIN . '/article/delete';
             $data['detail'] = BASE_URL_ADMIN . '/article/detail?id=';
             $data['edit'] = BASE_URL_ADMIN . '/article/edit?id=';
             $data['imageEdit'] = BASE_URL . '/public/css/images/white_edit.png';
             $data['delete'] = BASE_URL_ADMIN . '/article/delete?id=';
             $data['imageDelete'] = BASE_URL . '/public/css/images/trash.png';
             $this->view->render('service', $data);
         }
     } else {
         Until::redirectTo('error');
     }
 }
开发者ID:noikiy,项目名称:lovetolove,代码行数:66,代码来源:Article.php


注:本文中的Paging::pagination方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。