本文整理汇总了PHP中Pagination::getPagePrev方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::getPagePrev方法的具体用法?PHP Pagination::getPagePrev怎么用?PHP Pagination::getPagePrev使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pagination
的用法示例。
在下文中一共展示了Pagination::getPagePrev方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/return', '', 'SSL');
$this->response->redirect($this->url->link('account/login', '', 'SSL'));
}
$this->load->language('account/return');
$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/return', $url, 'SSL'));
$data['heading_title'] = $this->language->get('heading_title');
$data['text_empty'] = $this->language->get('text_empty');
$data['column_return_id'] = $this->language->get('column_return_id');
$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['button_view'] = $this->language->get('button_view');
$data['button_continue'] = $this->language->get('button_continue');
$this->load->model('account/return');
if (isset($this->request->get['page'])) {
$page = $this->request->get['page'];
} else {
$page = 1;
}
$data['returns'] = array();
$return_total = $this->model_account_return->getTotalReturns();
$results = $this->model_account_return->getReturns(($page - 1) * 10, 10);
foreach ($results as $result) {
$data['returns'][] = array('return_id' => $result['return_id'], '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'])), 'href' => $this->url->link('account/return/info', 'return_id=' . $result['return_id'] . $url, 'SSL'));
}
$pagination = new Pagination();
$pagination->total = $return_total;
$pagination->page = $page;
$pagination->limit = $this->config->get('config_product_limit');
$pagination->url = $this->url->link('account/return', 'page={page}', 'SSL');
$data['pagination'] = $pagination->render();
$this->document->setPagePrev($pagination->getPagePrev());
$this->document->setPageNext($pagination->getPageNext());
$data['results'] = sprintf($this->language->get('text_pagination'), $return_total ? ($page - 1) * $this->config->get('config_product_limit') + 1 : 0, ($page - 1) * $this->config->get('config_product_limit') > $return_total - $this->config->get('config_product_limit') ? $return_total : ($page - 1) * $this->config->get('config_product_limit') + $this->config->get('config_product_limit'), $return_total, ceil($return_total / $this->config->get('config_product_limit')));
$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/return_list.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/account/return_list.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/account/return_list.tpl', $data));
}
}
示例2: index
public function index()
{
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/transaction', '', 'SSL');
$this->response->redirect($this->url->link('account/login', '', 'SSL'));
}
$this->load->language('account/transaction');
$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'));
$data['breadcrumbs'][] = array('text' => $this->language->get('text_transaction'), 'href' => $this->url->link('account/transaction', '', 'SSL'));
$this->load->model('account/transaction');
$data['heading_title'] = $this->language->get('heading_title');
$data['column_date_added'] = $this->language->get('column_date_added');
$data['column_description'] = $this->language->get('column_description');
$data['column_amount'] = sprintf($this->language->get('column_amount'), $this->config->get('config_currency'));
$data['text_total'] = $this->language->get('text_total');
$data['text_empty'] = $this->language->get('text_empty');
$data['button_continue'] = $this->language->get('button_continue');
if (isset($this->request->get['page'])) {
$page = $this->request->get['page'];
} else {
$page = 1;
}
$data['transactions'] = array();
$filter_data = array('sort' => 'date_added', 'order' => 'DESC', 'start' => ($page - 1) * 10, 'limit' => 10);
$transaction_total = $this->model_account_transaction->getTotalTransactions();
$results = $this->model_account_transaction->getTransactions($filter_data);
foreach ($results as $result) {
$data['transactions'][] = array('amount' => $this->currency->format($result['amount'], $this->config->get('config_currency')), 'description' => $result['description'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));
}
$pagination = new Pagination();
$pagination->total = $transaction_total;
$pagination->page = $page;
$pagination->limit = 10;
$pagination->url = $this->url->link('account/transaction', 'page={page}', 'SSL');
$data['pagination'] = $pagination->render();
$this->document->setPagePrev($pagination->getPagePrev());
$this->document->setPageNext($pagination->getPageNext());
$data['results'] = sprintf($this->language->get('text_pagination'), $transaction_total ? ($page - 1) * 10 + 1 : 0, ($page - 1) * 10 > $transaction_total - 10 ? $transaction_total : ($page - 1) * 10 + 10, $transaction_total, ceil($transaction_total / 10));
$data['total'] = $this->currency->format($this->customer->getBalance());
$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/transaction.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/account/transaction.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/account/transaction.tpl', $data));
}
}
示例3: index
//.........这里部分代码省略.........
}
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('product/special', $url));
$data['heading_title'] = $this->language->get('heading_title');
$data['text_empty'] = $this->language->get('text_empty');
$data['text_quantity'] = $this->language->get('text_quantity');
$data['text_manufacturer'] = $this->language->get('text_manufacturer');
$data['text_model'] = $this->language->get('text_model');
$data['text_price'] = $this->language->get('text_price');
$data['text_tax'] = $this->language->get('text_tax');
$data['text_points'] = $this->language->get('text_points');
$data['text_compare'] = sprintf($this->language->get('text_compare'), isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0);
$data['text_sort'] = $this->language->get('text_sort');
$data['text_limit'] = $this->language->get('text_limit');
$data['button_cart'] = $this->language->get('button_cart');
$data['button_wishlist'] = $this->language->get('button_wishlist');
$data['button_compare'] = $this->language->get('button_compare');
$data['button_list'] = $this->language->get('button_list');
$data['button_grid'] = $this->language->get('button_grid');
$data['button_continue'] = $this->language->get('button_continue');
$data['compare'] = $this->url->link('product/compare');
$prods = array();
$filter_data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $limit, 'limit' => $limit);
$product_total = $this->model_catalog_product->getTotalProductSpecials();
$results = $this->model_catalog_product->getProductSpecials($filter_data);
$column_left = $this->load->controller('common/column_left');
$params['products'] = $results;
$params['list'] = true;
if ($column_left) {
$params['qtd_column'] = 3;
} else {
$params['qtd_column'] = 4;
}
$data['products'] = $this->load->controller('product/product_built_list', $params);
$url = '';
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$data['sorts'] = array();
$data['sorts'][] = array('text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/special', 'sort=p.sort_order&order=ASC' . $url));
$data['sorts'][] = array('text' => $this->language->get('text_name_asc'), 'value' => 'pd.name-ASC', 'href' => $this->url->link('product/special', 'sort=pd.name&order=ASC' . $url));
$data['sorts'][] = array('text' => $this->language->get('text_name_desc'), 'value' => 'pd.name-DESC', 'href' => $this->url->link('product/special', 'sort=pd.name&order=DESC' . $url));
$data['sorts'][] = array('text' => $this->language->get('text_price_asc'), 'value' => 'ps.price-ASC', 'href' => $this->url->link('product/special', 'sort=ps.price&order=ASC' . $url));
$data['sorts'][] = array('text' => $this->language->get('text_price_desc'), 'value' => 'ps.price-DESC', 'href' => $this->url->link('product/special', 'sort=ps.price&order=DESC' . $url));
if ($this->config->get('config_review_status')) {
$data['sorts'][] = array('text' => $this->language->get('text_rating_desc'), 'value' => 'rating-DESC', 'href' => $this->url->link('product/special', 'sort=rating&order=DESC' . $url));
$data['sorts'][] = array('text' => $this->language->get('text_rating_asc'), 'value' => 'rating-ASC', 'href' => $this->url->link('product/special', 'sort=rating&order=ASC' . $url));
}
$data['sorts'][] = array('text' => $this->language->get('text_model_asc'), 'value' => 'p.model-ASC', 'href' => $this->url->link('product/special', 'sort=p.model&order=ASC' . $url));
$data['sorts'][] = array('text' => $this->language->get('text_model_desc'), 'value' => 'p.model-DESC', 'href' => $this->url->link('product/special', 'sort=p.model&order=DESC' . $url));
$url = '';
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
$data['limits'] = array();
$limits = array_unique(array($this->config->get('config_product_limit'), 24, 48, 76, 100));
sort($limits);
foreach ($limits as $value) {
$data['limits'][] = array('text' => $value, 'value' => $value, 'href' => $this->url->link('product/special', $url . '&limit=' . $value));
}
$url = '';
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$pagination = new Pagination();
$pagination->total = $product_total;
$pagination->page = $page;
$pagination->limit = $limit;
$pagination->url = $this->url->link('product/special', $url . '&page={page}');
$data['pagination'] = $pagination->render();
$this->document->setPagePrev($pagination->getPagePrev());
$this->document->setPageNext($pagination->getPageNext());
$data['results'] = sprintf($this->language->get('text_pagination'), $product_total ? ($page - 1) * $limit + 1 : 0, ($page - 1) * $limit > $product_total - $limit ? $product_total : ($page - 1) * $limit + $limit, $product_total, ceil($product_total / $limit));
$data['sort'] = $sort;
$data['order'] = $order;
$data['limit'] = $limit;
$data['continue'] = $this->url->link('common/home');
$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/product/special.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/product/special.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/product/special.tpl', $data));
}
}
示例4: index
//.........这里部分代码省略.........
}
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
$data['limits'] = array();
$limits = array_unique(array($this->config->get('config_product_limit'), 24, 48, 76, 100));
sort($limits);
foreach ($limits as $value) {
$data['limits'][] = array('text' => $value, 'value' => $value, 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=' . $value));
}
$url = '';
if (isset($this->request->get['filter'])) {
$url .= '&filter=' . $this->request->get['filter'];
}
if (isset($this->request->get['price'])) {
$url .= '&price=' . $this->request->get['price'];
}
foreach ($filter_modules as $filter_module) {
$setting_option = unserialize($filter_module['setting']);
if (isset($this->request->get[$setting_option['param']])) {
$url .= '&' . $setting_option['param'] . '=' . $this->request->get[$setting_option['param']];
}
}
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$pagination = new Pagination();
$pagination->total = $product_total;
$pagination->page = $page;
$pagination->limit = $limit;
$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');
$data['pagination'] = $pagination->render();
$this->document->setPagePrev($pagination->getPagePrev());
$this->document->setPageNext($pagination->getPageNext());
$limit = $limit == 0 ? 1 : $limit;
$data['results'] = sprintf($this->language->get('text_pagination'), $product_total ? ($page - 1) * $limit + 1 : 0, ($page - 1) * $limit > $product_total - $limit ? $product_total : ($page - 1) * $limit + $limit, $product_total, ceil($product_total / $limit));
$data['sort'] = $sort;
$data['order'] = $order;
$data['limit'] = $limit;
$data['continue'] = $this->url->link('common/home');
$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/product/category.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/product/category.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/product/category.tpl', $data));
}
} else {
$url = '';
if (isset($this->request->get['path'])) {
$url .= '&path=' . $this->request->get['path'];
}
if (isset($this->request->get['filter'])) {
$url .= '&filter=' . $this->request->get['filter'];
}
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$data['breadcrumbs'][] = array('text' => $this->language->get('text_error'), 'href' => $this->url->link('product/category', $url));
$this->document->setTitle($this->language->get('text_error'));
$data['heading_title'] = $this->language->get('text_error');
$data['text_error'] = $this->language->get('text_error');
$data['button_continue'] = $this->language->get('button_continue');
$data['continue'] = $this->url->link('common/home');
$this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found');
$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/error/not_found.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/error/not_found.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/error/not_found.tpl', $data));
}
}
}
示例5: 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->language->load('account/recurring');
$this->load->model('account/recurring');
$this->document->setTitle($this->language->get('heading_title'));
$url = '';
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
$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'));
$data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('account/recurring', $url, 'SSL'));
$data['heading_title'] = $this->language->get('heading_title');
$data['column_date_added'] = $this->language->get('column_date_added');
$data['column_status'] = $this->language->get('column_status');
$data['column_product'] = $this->language->get('column_product');
$data['column_action'] = $this->language->get('column_action');
$data['column_recurring_id'] = $this->language->get('column_recurring_id');
$data['text_empty'] = $this->language->get('text_empty');
$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();
$recurring_total = $this->model_account_recurring->getTotalRecurring();
$results = $this->model_account_recurring->getAllProfiles(($page - 1) * 10, 10);
$data['recurrings'] = array();
if ($results) {
foreach ($results as $result) {
$data['recurrings'][] = array('id' => $result['order_recurring_id'], 'name' => $result['product_name'], 'status' => $result['status'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'href' => $this->url->link('account/recurring/info', 'recurring_id=' . $result['order_recurring_id'], 'SSL'));
}
}
$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');
$data['pagination'] = $pagination->render();
$this->document->setPagePrev($pagination->getPagePrev());
$this->document->setPageNext($pagination->getPageNext());
$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/recurring_list.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/account/recurring_list.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/account/recurring_list.tpl', $data));
}
}
示例6: index
public function index()
{
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/download', '', 'SSL');
$this->response->redirect($this->url->link('account/login', '', 'SSL'));
}
$this->load->language('account/download');
$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'));
$data['breadcrumbs'][] = array('text' => $this->language->get('text_downloads'), 'href' => $this->url->link('account/download', '', 'SSL'));
$this->load->model('account/download');
$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_name'] = $this->language->get('column_name');
$data['column_size'] = $this->language->get('column_size');
$data['column_date_added'] = $this->language->get('column_date_added');
$data['button_download'] = $this->language->get('button_download');
$data['button_continue'] = $this->language->get('button_continue');
if (isset($this->request->get['page'])) {
$page = $this->request->get['page'];
} else {
$page = 1;
}
$data['downloads'] = array();
$download_total = $this->model_account_download->getTotalDownloads();
$results = $this->model_account_download->getDownloads(($page - 1) * $this->config->get('config_product_limit'), $this->config->get('config_product_limit'));
foreach ($results as $result) {
if (file_exists(DIR_DOWNLOAD . $result['filename'])) {
$size = filesize(DIR_DOWNLOAD . $result['filename']);
$i = 0;
$suffix = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
while ($size / 1024 > 1) {
$size = $size / 1024;
$i++;
}
$data['downloads'][] = array('order_id' => $result['order_id'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'name' => $result['name'], 'size' => round(substr($size, 0, strpos($size, '.') + 4), 2) . $suffix[$i], 'href' => $this->url->link('account/download/download', 'download_id=' . $result['download_id'], 'SSL'));
}
}
$pagination = new Pagination();
$pagination->total = $download_total;
$pagination->page = $page;
$pagination->limit = $this->config->get('config_product_limit');
$pagination->url = $this->url->link('account/download', 'page={page}', 'SSL');
$data['pagination'] = $pagination->render();
$this->document->setPagePrev($pagination->getPagePrev());
$this->document->setPageNext($pagination->getPageNext());
$data['results'] = sprintf($this->language->get('text_pagination'), $download_total ? ($page - 1) * $this->config->get('config_product_limit') + 1 : 0, ($page - 1) * $this->config->get('config_product_limit') > $download_total - $this->config->get('config_product_limit') ? $download_total : ($page - 1) * $this->config->get('config_product_limit') + $this->config->get('config_product_limit'), $download_total, ceil($download_total / $this->config->get('config_product_limit')));
$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/download.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/account/download.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/account/download.tpl', $data));
}
}
示例7: index
//.........这里部分代码省略.........
}
if (isset($this->request->get['price'])) {
$url .= '&price=' . $this->request->get['price'];
}
if (isset($this->request->get['path'])) {
$url .= '&path=' . $this->request->get['path'];
}
if (isset($this->request->get['sub_category'])) {
$url .= '&sub_category=' . $this->request->get['sub_category'];
}
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
$data['limits'] = array();
$limits = array_unique(array($this->config->get('config_product_limit'), 24, 48, 76, 100));
sort($limits);
foreach ($limits as $value) {
$data['limits'][] = array('text' => $value, 'value' => $value, 'href' => $server . URL_SEARCH . $url . '&limit=' . $value);
}
$url = '';
if (isset($this->request->get['search'])) {
$url .= '&search=' . urlencode(html_entity_decode($this->request->get['search'], ENT_QUOTES, 'UTF-8'));
}
if (isset($this->request->get['tag'])) {
$url .= '&tag=' . urlencode(html_entity_decode($this->request->get['tag'], ENT_QUOTES, 'UTF-8'));
}
if (isset($this->request->get['description'])) {
$url .= '&description=' . $this->request->get['description'];
}
if (isset($this->request->get['filter'])) {
$url .= '&filter=' . $this->request->get['filter'];
}
if (isset($this->request->get['category_id'])) {
$url .= '&category_id=' . $this->request->get['category_id'];
}
foreach ($filter_modules as $filter_module) {
$setting_option = unserialize($filter_module['setting']);
if (isset($this->request->get[$setting_option['param']])) {
$url .= '&' . $setting_option['param'] . '=' . $this->request->get[$setting_option['param']];
}
}
if (isset($this->request->get['price'])) {
$url .= '&price=' . $this->request->get['price'];
}
if (isset($this->request->get['path'])) {
$url .= '&path=' . $this->request->get['path'];
}
if (isset($this->request->get['sub_category'])) {
$url .= '&sub_category=' . $this->request->get['sub_category'];
}
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$pagination = new Pagination();
$pagination->total = $product_total;
$pagination->page = $page;
$pagination->limit = $limit;
$pagination->url = $server . URL_SEARCH . $url . '&page={page}';
$data['pagination'] = $pagination->render();
$this->document->setPagePrev($pagination->getPagePrev());
$this->document->setPageNext($pagination->getPageNext());
$limit = $limit == 0 ? 1 : $limit;
$data['results'] = sprintf($this->language->get('text_pagination'), $product_total ? ($page - 1) * $limit + 1 : 0, ($page - 1) * $limit > $product_total - $limit ? $product_total : ($page - 1) * $limit + $limit, $product_total, ceil($product_total / $limit));
}
$data['search'] = $search;
$data['price'] = $price;
foreach ($filter_modules as $filter_module) {
$setting_option = unserialize($filter_module['setting']);
$data[$setting_option['param']] = ${$setting_option}['param'];
$data['param'] = $setting_option['param'];
}
$data['path'] = $path;
$data['description'] = $description;
$data['category_id'] = $category_id;
$data['sub_category'] = $sub_category;
$data['filter'] = $filter;
$data['sort'] = $sort;
$data['order'] = $order;
$data['limit'] = $limit;
$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/product/search.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/product/search.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/product/search.tpl', $data));
}
}