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


PHP Pagination::render方法代码示例

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


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

示例1: index

 public function index()
 {
     $this->load->model('news/news');
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     //$limit = PAGESIZE;
     $limit = 20;
     //get certificates
     $data = array('start' => ($page - 1) * $limit, 'limit' => $limit);
     $li = $this->data['li'] = $_GET['li'];
     $title = $this->data['title'] = $_GET['title'];
     $typeid = $data['typeid'] = $_GET['typeid'];
     $this->data['news'] = $this->model_news_news->getNewsList($data);
     $items_count = $this->model_news_news->getNewsCount($data);
     // var_dump($this->data['news']);
     $this->data['hotArr'] = $this->model_news_news->getIsHot();
     // var_dump($this->data['hotArr']);
     //pagination
     $route = $this->request->get['route'];
     $pagination = new Pagination();
     $pagination->total = $items_count;
     $pagination->page = $page;
     $pagination->limit = $limit;
     $pagination->url = $this->url->link($route, 'page={page}&&li=' . $li . '&&typeid=' . $typeid . '&&title=' . $title, 'SSL');
     $this->data['pagination'] = $pagination->render();
     // var_dump($this->data);
     $this->template = 'news/news.tpl';
     $this->children = array('common/footer', 'common/header', 'common/hot');
     $this->response->setOutput($this->render());
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:33,代码来源:news.php

示例2: index

 public function index()
 {
     if (isset($this->request->get['message_id']) && $this->request->get['message_id']) {
         if (isset($this->request->get['message_id'])) {
             $message_id = $this->request->get['message_id'];
         } else {
             $message_id = '';
         }
         //判断用户是否登陆
         if ($this->customer->isLogged()) {
             $this->data['logged'] = 1;
         } else {
             $this->data['logged'] = 0;
             $this->data['error_login'] = "";
             $this->data['action'] = $this->url->link('account/login', '', 'SSL');
             $this->data['register'] = $this->url->link('account/register', '', 'SSL');
             $this->data['forgotten'] = $this->url->link('account/forgotten', '', 'SSL');
             $this->data['email'] = '';
             $this->data['password'] = '';
             include_once DIR_SYSTEM . 'weibo/config.php';
             include_once DIR_SYSTEM . 'weibo/saetv2.ex.class.php';
             $o = new SaeTOAuthV2(WB_AKEY, WB_SKEY);
             $this->data['code_url'] = $o->getAuthorizeURL(WB_CALLBACK_URL);
         }
         $this->load->model('social/social');
         $message_info = $this->model_social_social->getMessageByid($message_id);
         if (isset($this->request->get['page'])) {
             $page = $this->request->get['page'];
             $this->data['page'] = $page;
         } else {
             $page = 1;
             $this->data['page'] = $page;
         }
         $limit = 20;
         $this->data['limit'] = $limit;
         $data = array('message_id' => $message_id, 'start' => ($page - 1) * $limit, 'limit' => $limit);
         $comment_info = $this->model_social_social->getComment($data);
         $comment_total = $this->model_social_social->getTotalComment($message_id);
         //回复的用户id
         $this->data['customer_id'] = $this->customer->getId();
         //回复的脸
         $this->data['face'] = $this->customer->getface();
         if (!$this->data['face']) {
             $this->data['face'] = "uploads/big/0b4a96400b2372d25da769647bfe4059.jpg";
         }
         $this->data['message'] = $message_info;
         $this->data['comment_info_all'] = $comment_info;
         $this->data['comment_total'] = $comment_total;
         $pagination = new Pagination();
         $pagination->total = $comment_total;
         $pagination->page = $page;
         $pagination->limit = $limit;
         $pagination->text = $this->language->get('text_pagination');
         $pagination->url = $this->url->link('social/comment', 'message_id=' . $message_id . '&page={page}', 'SSL');
         $this->data['pagination'] = $pagination->render();
         $this->template = $this->config->get('config_template') . '/template/social/comment_list.tpl';
         $this->children = array('common/footer', 'common/social_right', 'common/header_sns');
         $this->response->setOutput($this->render());
     }
 }
开发者ID:TheTypoMaster,项目名称:ACGStorm,代码行数:60,代码来源:comment.php

示例3: index

 public function index()
 {
     $this->load->model('sale/transaction');
     $this->template = 'common/transactions.tpl';
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $store_id = $this->session->data['store_id'];
     $data = array('start' => ($page - 1) * 10, 'limit' => 10, 'store_id' => $store_id);
     $this->data['transactions'] = array();
     foreach ($this->model_sale_transaction->getTransactions($data) as $tran) {
         $tran['money_in'] = $this->currency->format($tran['money_in']);
         $tran['money_out'] = $this->currency->format($tran['money_out']);
         $this->data['transactions'][] = $tran;
     }
     $transactions_total = $this->model_sale_transaction->getTotalTransactions($store_id);
     $this->data['total'] = $this->currency->format($this->model_sale_transaction->getTotal($store_id));
     $pagination = new Pagination();
     $pagination->total = $transactions_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_admin_limit');
     $pagination->text = $this->language->get('text_pagination');
     $pagination->url = $this->url->link('common/transactions', 'token=' . $this->session->data['postoken'] . '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->render();
     $this->data['empty'] = true;
     if ($transactions_total > 0) {
         $this->data['empty'] = false;
     }
     $this->response->setOutput($this->load->view($this->template, $this->data));
 }
开发者ID:mvnp,项目名称:nc_supplements,代码行数:32,代码来源:transactions.php

示例4: getList

 /**
  * the getList method is used to 
  * pupolate the listing table 
  */
 public function getList($id = "", $pg)
 {
     $purl = array();
     if (isset($_GET['url'])) {
         $purl = $_GET['url'];
         $purl = rtrim($purl);
         $purl = explode('/', $_GET['url']);
     } else {
         $purl = null;
     }
     if (!isset($purl['2'])) {
         $pn = 1;
     } else {
         $pn = $purl['2'];
     }
     $prodname = "";
     $clientname = "";
     $areaname = "";
     $regionname = "";
     $atmtype = "";
     $clientid = "";
     /**
      * of all the filter fields if only one field is set
      */
     $filterResult = "";
     if (isset($_REQUEST['prodname']) && !empty($_REQUEST['prodname'])) {
         $prodname .= " AND prod_name = '" . $_REQUEST['prodname'] . "' ";
     }
     if (isset($_REQUEST['prodname']) && !empty($_REQUEST['prodname'])) {
         $prodname .= " AND prod_name = '" . $_REQUEST['prodname'] . "' ";
     }
     if (isset($_REQUEST['clientid']) && !empty($_REQUEST['clientid'])) {
         $clientid .= " AND client_id ='" . $_REQUEST['clientid'] . "'";
     }
     if (isset($_REQUEST['clientname']) && !empty($_REQUEST['clientname'])) {
         $clientname .= " AND client_name='" . $_REQUEST['clientname'] . "' ";
     }
     if (isset($_REQUEST['areaname']) && !empty($_REQUEST['areaname'])) {
         $areaname .= " AND install_area='" . $_REQUEST['areaname'] . "' ";
     }
     if (isset($_REQUEST['location']) && !empty($_REQUEST['location'])) {
         $regionname .= " AND (install_city LIKE '%" . $_REQUEST['location'] . "%' OR install_address LIKE '%" . $_REQUEST['location'] . "%') ";
     }
     if (isset($_REQUEST['machine']) && !empty($_REQUEST['machine'])) {
         $atmtype .= " AND atm_type='" . $_REQUEST['machine'] . "' ";
     }
     $filterResult .= " WHERE id !='' " . $prodname . $clientname . $areaname . $regionname . $atmtype . $clientid;
     print_r($filterResult);
     global $database;
     $result = $database->db_query("SELECT * FROM client_product ");
     $resultEmployee = $database->db_query("SELECT * FROM client_product " . $filterResult);
     $pagin = new Pagination();
     //create the pagination object;
     $pagin->nr = $database->dbNumRows($resultEmployee);
     $pagin->itemsPerPage = 20;
     $pagin->totalRec = $database->dbNumRows($result);
     $myitems = Cproduct::find_by_sql("SELECT * FROM client_product " . $filterResult . " ORDER BY id DESC " . $pagin->pgLimit($pn));
     $index_array = array("clientproduct" => $myitems, "mypagin" => $pagin->render($pg));
     return $index_array;
 }
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:64,代码来源:clientproduct_model.php

示例5: review

 public function review()
 {
     $this->language->load('product/list');
     $this->load->model('catalog/review');
     $this->data['text_on'] = $this->language->get('text_on');
     $this->data['text_no_reviews'] = $this->language->get('text_no_reviews');
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $this->data['reviews'] = array();
     $review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']);
     $results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);
     foreach ($results as $result) {
         $this->data['reviews'][] = array('author' => $result['author'], 'text' => $result['text'], 'rating' => (int) $result['rating'], 'reviews' => sprintf($this->language->get('text_reviews'), (int) $review_total), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));
     }
     $pagination = new Pagination();
     $pagination->total = $review_total;
     $pagination->page = $page;
     $pagination->limit = 5;
     $pagination->text = $this->language->get('text_pagination');
     $pagination->url = $this->url->link('product/list/review', 'product_id=' . $this->request->get['product_id'] . '&page={page}');
     $this->data['pagination'] = $pagination->render();
     if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/review.tpl')) {
         $this->template = $this->config->get('config_template') . '/template/product/review.tpl';
     } else {
         $this->template = 'default/template/product/review.tpl';
     }
     $this->response->setOutput($this->render());
 }
开发者ID:xwmario,项目名称:manga,代码行数:31,代码来源:list.php

示例6: index

 public function index()
 {
     $this->data['http'] = __WEBURL__;
     $this->assign('sitename', 'blog example');
     //在字符串情况下$this->data,$this->lable,$this->assign等效
     $this->data['form_list'] = array();
     $this->data['head_list'] = array();
     $this->model('blog/data');
     $test = $this->M['blog/data']->test();
     $page = isset($this->request->get['page']) ? $this->request->get['page'] : 1;
     $count = 3;
     $data = array('limit' => ($page - 1) * $count . ',' . $count);
     $this->data['form_list'] = $this->M['blog/data']->getFormList($data);
     $total = $this->M['blog/data']->getFormTotal();
     $pagination = new Pagination();
     $pagination->total = $total;
     $pagination->page = $page;
     $pagination->limit = $count;
     $pagination->text = "从 {start} 起到 {end} 页 总 {total}个 总 ({pages} 页)";
     $pagination->url = $this->url->link('home/index', '&page={page}');
     $this->data['pagination'] = $pagination->render();
     $this->language('blog/data');
     $sitename = $this->language->get('sitename');
     $this->lable('title', $sitename);
     $this->data['test'] = $test;
     //在模板中$this->data的健值即为变量名
     $this->data['header'] = $this->view('public/header');
     $this->data['footer'] = $this->view('public/footer');
     $this->data['right'] = $this->view('public/right');
     //调用右边的controller
     $this->display();
     //可指定模板,模认为当前controll的名字+方法
 }
开发者ID:sayi21cn,项目名称:kyphp2.0,代码行数:33,代码来源:index.php

示例7: index

 public function index()
 {
     if (!$this->customer->isLogged()) {
         $this->session->data['redirect'] = $this->url->link('account/order', '', 'SSL');
         $this->response->redirect($this->url->link('account/login', '', 'SSL'));
     }
     $this->load->language('account/order');
     $this->document->setTitle($this->language->get('heading_title'));
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_account'), 'href' => $this->url->link('account/account', '', 'SSL'));
     $url = '';
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('account/order', $url, 'SSL'));
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_empty'] = $this->language->get('text_empty');
     $data['column_order_id'] = $this->language->get('column_order_id');
     $data['column_status'] = $this->language->get('column_status');
     $data['column_date_added'] = $this->language->get('column_date_added');
     $data['column_customer'] = $this->language->get('column_customer');
     $data['column_product'] = $this->language->get('column_product');
     $data['column_total'] = $this->language->get('column_total');
     $data['button_view'] = $this->language->get('button_view');
     $data['button_continue'] = $this->language->get('button_continue');
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $data['orders'] = array();
     $this->load->model('account/order');
     $order_total = $this->model_account_order->getTotalOrders();
     $results = $this->model_account_order->getOrders(($page - 1) * 10, 10);
     foreach ($results as $result) {
         $product_total = $this->model_account_order->getTotalOrderProductsByOrderId($result['order_id']);
         $voucher_total = $this->model_account_order->getTotalOrderVouchersByOrderId($result['order_id']);
         $data['orders'][] = array('order_id' => $result['order_id'], 'name' => $result['firstname'] . ' ' . $result['lastname'], 'status' => $result['status'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'products' => $product_total + $voucher_total, 'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']), 'href' => $this->url->link('account/order/info', 'order_id=' . $result['order_id'], 'SSL'));
     }
     $pagination = new Pagination();
     $pagination->total = $order_total;
     $pagination->page = $page;
     $pagination->limit = 10;
     $pagination->url = $this->url->link('account/order', 'page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['results'] = sprintf($this->language->get('text_pagination'), $order_total ? ($page - 1) * 10 + 1 : 0, ($page - 1) * 10 > $order_total - 10 ? $order_total : ($page - 1) * 10 + 10, $order_total, ceil($order_total / 10));
     $data['continue'] = $this->url->link('account/account', '', 'SSL');
     $data['column_left'] = $this->load->controller('common/column_left');
     $data['column_right'] = $this->load->controller('common/column_right');
     $data['content_top'] = $this->load->controller('common/content_top');
     $data['content_bottom'] = $this->load->controller('common/content_bottom');
     $data['footer'] = $this->load->controller('common/footer');
     $data['header'] = $this->load->controller('common/header');
     if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/account/order_list.tpl')) {
         $this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/account/order_list.tpl', $data));
     } else {
         $this->response->setOutput($this->load->view('default/template/account/order_list.tpl', $data));
     }
 }
开发者ID:RobinSmit,项目名称:opencart,代码行数:60,代码来源:order.php

示例8: index

 /**
  * this index is a little differnt from normal, it will filter the results by the group params and show the
  * page with only thoes values, further more 
  * @param $group
  */
 public function index($group = NULL)
 {
     if ($this->access->allowed('news', 'read')) {
         $this->breadcrumbs->add()->url('news/index/' . $group)->title('News');
         // add the group filter to the crumb
         $news = ORM::factory('news')->where('status !=', 'deleted');
         if ($group != NULL) {
             $news->where('group', $group);
         }
         $paging = new Pagination(array('total_items' => $news->count_all()));
         $view = new view(url::location());
         // re add the clauses we need
         $news->where('status !=', 'deleted');
         if ($group != NULL) {
             $news->where('group', $group);
         }
         $view->news = $news->find_all($paging->items_per_page, $paging->sql_offset);
         $view->group = $group;
         // used tos end to the add page so we know what group to return to.
         $view->pagination = $paging->render();
         $view->page_number = $paging->page_number();
         $this->template->title = 'News';
         $this->template->content = $view;
     } else {
         Kohana::log('debug', 'User failed constructor security check');
         url::failed();
     }
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:33,代码来源:news.php

示例9: index

 public function index()
 {
     $this->load->model('common/all');
     $gallery_string = html_entity_decode($this->model_common_all->getGallery());
     $galleries_array = json_decode($gallery_string);
     $galleries_array_total = count($galleries_array);
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $limit = 12;
     $page_begin = ($page - 1) * $limit;
     $page_end = $galleries_array_total > $page * $limit ? $page * $limit : $galleries_array_total;
     $this->data['galleries'] = array();
     for ($i = $page_begin; $i < $page_end; $i++) {
         $this->data['galleries'][] = $galleries_array[$i];
     }
     $pagination = new Pagination();
     $pagination->total = $galleries_array_total;
     $pagination->page = $page;
     $pagination->limit = $limit;
     $pagination->url = $this->url->link('common/gallery', '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->render();
     if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/gallery.tpl')) {
         $this->template = $this->config->get('config_template') . '/template/common/gallery.tpl';
     } else {
         $this->template = 'default/template/common/gallery.tpl';
     }
     $this->children = array('common/right', 'common/footer', 'common/header');
     $this->response->setOutput($this->render());
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:32,代码来源:gallery.php

示例10: getList

 public function getList($id = "", $pg)
 {
     $purl = array();
     if (isset($_GET['url'])) {
         $purl = $_GET['url'];
         $purl = rtrim($purl);
         $purl = explode('/', $_GET['url']);
     } else {
         $purl = null;
     }
     if (!isset($purl['2'])) {
         $pn = 1;
     } else {
         $pn = $purl['2'];
     }
     global $database;
     $resultUser = $database->db_query("SELECT * FROM users_client");
     $pagin = new Pagination();
     $pagin->nr = $database->dbNumRows($resultUser);
     $pagin->itemsPerPage = 20;
     $users = User::find_by_sql("SELECT * FROM users_client WHERE company_id=" . $_SESSION['client_ident'] . " " . $pagin->pgLimit($pn));
     $index_array = array("myusers" => $users, "mypagin" => $pagin->render($pg));
     return $index_array;
     return $index_array;
 }
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:25,代码来源:users_model.php

示例11: review

 public function review()
 {
     $this->load->language('review/store_review');
     $this->load->model('review/store_review');
     $data['text_no_reviews'] = $this->language->get('text_no_reviews');
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $data['reviews'] = array();
     $review_total = $this->model_review_store_review->getTotalReviews();
     $results = $this->model_review_store_review->getReviews(($page - 1) * 5, 5);
     foreach ($results as $result) {
         $data['reviews'][] = array('author' => $result['author'], 'text' => nl2br($result['text']), 'rating' => (int) $result['rating'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));
     }
     $pagination = new Pagination();
     $pagination->total = $review_total;
     $pagination->page = $page;
     $pagination->limit = 5;
     $pagination->url = $this->url->link('review/store_review/review', '&page={page}');
     $data['pagination'] = $pagination->render();
     $data['results'] = sprintf($this->language->get('text_pagination'), $review_total ? ($page - 1) * 5 + 1 : 0, ($page - 1) * 5 > $review_total - 5 ? $review_total : ($page - 1) * 5 + 5, $review_total, ceil($review_total / 5));
     if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/review/store_review_list.tpl')) {
         $this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/review/store_review_list.tpl', $data));
     } else {
         $this->response->setOutput($this->load->view('default/template/review/store_review_list.tpl', $data));
     }
 }
开发者ID:reachoutsanjay,项目名称:Projects,代码行数:29,代码来源:store_review.php

示例12: index

 public function index()
 {
     $this->document->setTitle("ÂÃÓÎ×ÊѶ");
     $this->load->model('informations/informations');
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $limit = 10;
     //get informations
     $data = array('start' => ($page - 1) * $limit, 'limit' => $limit);
     $this->data['informations'] = $this->model_informations_informations->getInformations($data);
     $items_count = $this->model_informations_informations->getInformationsCount();
     //pagination
     $route = $this->request->get['route'];
     $pagination = new Pagination();
     $pagination->total = $items_count;
     $pagination->page = $page;
     $pagination->limit = $limit;
     $pagination->url = $this->url->link($route, 'page={page}', 'SSL');
     $this->data['pagination'] = $pagination->render();
     $this->template = 'informations/informations.tpl';
     $this->children = array('common/footer', 'common/header', 'common/column_left_information');
     $this->response->setOutput($this->render());
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:26,代码来源:informations.php

示例13: index

 public function index()
 {
     if (!$this->customer->isLogged()) {
         $this->session->data['redirect'] = $this->url->link('account/order', '', 'SSL');
         $this->redirect($this->url->link('account/login', '', 'SSL'));
     }
     $this->language->load('account/recurring');
     $this->document->setTitle($this->language->get('heading_title'));
     // Breadcrumbs
     $this->data['breadcrumbs'] = array();
     $this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home'), 'separator' => false);
     $this->data['breadcrumbs'][] = array('text' => $this->language->get('text_account'), 'href' => $this->url->link('account/account', '', 'SSL'), 'separator' => $this->language->get('text_separator'));
     $url = '';
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $this->data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('account/recurring', $url, 'SSL'), 'separator' => $this->language->get('text_separator'));
     $this->data['heading_title'] = $this->language->get('heading_title');
     $this->data['column_created'] = $this->language->get('column_created');
     $this->data['column_status'] = $this->language->get('column_status');
     $this->data['column_product'] = $this->language->get('column_product');
     $this->data['column_action'] = $this->language->get('column_action');
     $this->data['column_profile_id'] = $this->language->get('column_profile_id');
     $this->data['text_empty'] = $this->language->get('text_empty');
     $this->data['button_view'] = $this->language->get('button_view');
     $this->data['button_continue'] = $this->language->get('button_continue');
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $this->data['orders'] = array();
     $this->load->model('account/recurring');
     $recurring_total = $this->model_account_recurring->getTotalRecurring();
     $results = $this->model_account_recurring->getAllProfiles(($page - 1) * 10, 10);
     $this->data['profiles'] = array();
     if ($results) {
         foreach ($results as $result) {
             $this->data['profiles'][] = array('id' => $result['order_recurring_id'], 'name' => $result['product_name'], 'status' => $result['status'], 'created' => date($this->language->get('date_format_short'), strtotime($result['created'])), 'href' => $this->url->link('account/recurring/info', 'recurring_id=' . $result['order_recurring_id'], 'SSL'));
         }
     }
     $this->data['status_types'] = array(1 => $this->language->get('text_status_inactive'), 2 => $this->language->get('text_status_active'), 3 => $this->language->get('text_status_suspended'), 4 => $this->language->get('text_status_cancelled'), 5 => $this->language->get('text_status_expired'), 6 => $this->language->get('text_status_pending'));
     $pagination = new Pagination();
     $pagination->total = $recurring_total;
     $pagination->page = $page;
     $pagination->limit = 10;
     $pagination->text = $this->language->get('text_pagination');
     $pagination->url = $this->url->link('account/recurring', 'page={page}', 'SSL');
     $this->data['pagination'] = $pagination->render();
     $this->data['continue'] = $this->url->link('account/account', '', 'SSL');
     // Theme
     $this->data['template'] = $this->config->get('config_template');
     if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/account/recurring_list.tpl')) {
         $this->template = $this->config->get('config_template') . '/template/account/recurring_list.tpl';
     } else {
         $this->template = 'default/template/account/recurring_list.tpl';
     }
     $this->children = array('common/column_left', 'common/column_right', 'common/content_header', 'common/content_top', 'common/content_bottom', 'common/content_footer', 'common/footer', 'common/header');
     $this->response->setOutput($this->render());
 }
开发者ID:ahmatjan,项目名称:OpenCart-Overclocked,代码行数:60,代码来源:recurring.php

示例14: action_default

 public function action_default()
 {
     $this->quick_menu = array('administrator/add' => '添加管理员', 'administrator/group/' => '权限组列表', 'administrator/group/add' => '添加权限组');
     $view = new View('admin/administrator/list');
     $model_administrator = new Model_Admin_Administrator();
     $only_list_self_group_user = false;
     $is_super = $this->session()->member()->perm()->is_super_perm();
     if ($is_super) {
         $project = null;
         $list_groups = null;
     } else {
         $project = Core::$project;
         if (!$this->session()->member()->perm()->is_own('administrator.view_user_info')) {
             $list_groups = $this->session()->member()->has_own_perm_groups('view_users')->ids();
             if (!count($list_groups)) {
                 $this->message('您不具备此权限', -1);
             }
         }
     }
     if ($_GET['k']) {
         # 搜索模式
         $list = $model_administrator->search_aministrator_list($project, $list_groups, $_GET['k']);
         $view->list = $list;
     } else {
         $list_type = null;
         if ($is_super && $_GET['list']) {
             if ($_GET['list'] == 'supadmin') {
                 $list_type = 1;
             } elseif ($_GET['list'] == 'groupmanager') {
                 $list_type = 2;
             } elseif ($_GET['list'] == 'zdy') {
                 $list_type = 3;
             }
         } else {
             if (isset($_GET['group_id'])) {
                 $group_id = (int) $_GET['group_id'];
             }
             if (!$group_id > 0) {
                 $group_id = 0;
             }
             if ($group_id > 0) {
                 if (!$this->session()->member()->is_own_group_perm($group_id, 'view_users')) {
                     $this->message('您不具备查看此权限组用户的权限', -1);
                 }
                 $list_groups = array($group_id);
             }
         }
         $count = $model_administrator->total_count($project, $list_groups, $list_type);
         if ($count) {
             $pageconfig = Core::config('admin/pagination');
             $pageconfig['total_items'] = $count;
             $pagination = new Pagination($pageconfig);
             $list = $model_administrator->get_aministrator_list($project, $list_groups, $pagination->get_offset(), $pagination->get_items_per_page(), $list_type);
             $view->list = $list;
             $view->pagehtml = $pagination->render();
         }
     }
     $view->is_super = $is_super;
     $view->render();
 }
开发者ID:google2013,项目名称:myqeecms,代码行数:60,代码来源:index.controller.php

示例15: getList

 /**
  * the getList method is used to 
  * pupolate the listing table 
  */
 public function getList($id = "", $pg)
 {
     $purl = array();
     if (isset($_GET['url'])) {
         $purl = $_GET['url'];
         $purl = rtrim($purl);
         $purl = explode('/', $_GET['url']);
     } else {
         $purl = null;
     }
     if (!isset($purl['2'])) {
         $pn = 1;
     } else {
         $pn = $purl['2'];
     }
     global $database;
     $resultEmployee = $database->db_query("SELECT * FROM vendors");
     $pagin = new Pagination();
     //create the pagination object;
     $pagin->nr = $database->dbNumRows($resultEmployee);
     $pagin->itemsPerPage = 20;
     $myitems = Vendor::find_by_sql("SELECT * FROM vendors " . $pagin->pgLimit($pn));
     $index_array = array("vendors" => $myitems, "mypagin" => $pagin->render($pg));
     return $index_array;
     return $index_array;
 }
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:30,代码来源:vendors_model.php


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