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


PHP Pagination::renderAdmin方法代码示例

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


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

示例1: getList

 protected function getList()
 {
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SALES_DASHBOARD'), 'href' => $this->url->link('sale/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SUPPLIER_DASHBOARD')));
     $this->data = array_merge($this->data, array('creditors' => array(), 'insert' => $this->url->link('sale/creditor/insert', 'token=' . $this->session->data['token'], 'SSL'), 'delete' => $this->url->link('sale/creditor/delete', 'token=' . $this->session->data['token'], 'SSL')));
     // Initiate pagination
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $data = array('start' => ($page - 1) * 25, 'limit' => 25);
     $creditorTotal = $this->model_sale_creditor->getTotalCreditors();
     foreach ($this->model_sale_creditor->getCreditors($data) as $creditor) {
         $this->data['creditors'][] = array_merge($creditor, array('update' => $this->url->link('sale/creditor/update', 'token=' . $this->session->data['token'] . '&creditor_id=' . $creditor['creditor_id'], 'SSL')));
     }
     $pagination = new Pagination();
     $pagination->total = $creditorTotal;
     $pagination->page = $page;
     $pagination->limit = 25;
     $pagination->text = '';
     $pagination->url = $this->url->link('sale/creditor', 'token=' . $this->session->data['token'] . '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->renderAdmin();
     $this->template = 'sale/creditor_list.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:27,代码来源:creditor.php

示例2: index

 public function index()
 {
     $this->document->setTitle(Language::getVar('SUMO_ADMIN_SALE_ORDER'));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SALES_DASHBOARD'), 'href' => $this->url->link('sale/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SALE_ORDER')));
     $this->load->model('sale/orders');
     $filters = array();
     $page = 1;
     if (!empty($this->request->get['page'])) {
         $page = (int) $this->request->get['page'];
     }
     $total = $this->model_sale_orders->getOrdersTotal();
     $filters['start'] = ($page - 1) * 25;
     $filters['limit'] = 25;
     $this->data['orders'] = $this->model_sale_orders->getOrders($filters);
     $pagination = new Pagination();
     $pagination->total = $total;
     $pagination->page = $page;
     $pagination->limit = 25;
     $pagination->text = '';
     $pagination->url = $this->url->link('sale/orders', 'token=' . $this->session->data['token'] . '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->renderAdmin();
     $this->template = 'sale/orders/list.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:26,代码来源:orders.php

示例3: getList

 protected function getList()
 {
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_CATALOG_DASHBOARD'), 'href' => $this->url->link('catalog/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_CATALOG_SPECIAL')));
     $this->data = array_merge($this->data, array('delete' => $this->url->link('catalog/special/delete', 'token=' . $this->session->data['token'], 'SSL'), 'specials' => array(), 'error' => isset($this->data['error']) ? $this->data['error'] : ''));
     // Initiate pagination
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $data = array('start' => ($page - 1) * 25, 'limit' => 25);
     $special_total = $this->model_catalog_special->getTotalSpecials();
     foreach ($this->model_catalog_special->getSpecials($data) as $special) {
         $this->data['specials'][] = array_merge($special, array('product_special_no' => 'SID.' . str_pad($special['product_special_id'], 5, 0, STR_PAD_LEFT), 'price' => Formatter::currency($special['price']), 'product_price' => Formatter::currency($special['product_price']), 'edit' => $this->url->link('catalog/special/update', 'token=' . $this->session->data['token'] . '&product_special_id=' . $special['product_special_id'], 'SSL')));
     }
     $pagination = new Pagination();
     $pagination->total = $special_total;
     $pagination->page = $page;
     $pagination->limit = 25;
     $pagination->text = '';
     $pagination->url = $this->url->link('catalog/special', 'token=' . $this->session->data['token'] . '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->renderAdmin();
     $this->getForm();
     $this->template = 'catalog/special.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:28,代码来源:special.php

示例4: getList

 protected function getList()
 {
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_CATALOG_DASHBOARD'), 'href' => $this->url->link('catalog/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_REVIEW')));
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $data = array('start' => ($page - 1) * $this->config->get('admin_limit'), 'limit' => $this->config->get('admin_limit'));
     $reviewTotal = $this->model_catalog_review->getTotalReviews();
     $pagination = new Pagination();
     $pagination->total = $reviewTotal;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('admin_limit');
     $pagination->text = '';
     $pagination->url = $this->url->link('catalog/review', 'token=' . $this->session->data['token'] . '&page={page}', 'SSL');
     $this->data = array_merge($this->data, array('reviews' => array(), 'insert' => $this->url->link('catalog/review/insert', 'token=' . $this->session->data['token'], 'SSL'), 'delete' => $this->url->link('catalog/review/delete', 'token=' . $this->session->data['token'], 'SSL'), 'pagination' => $pagination->renderAdmin()));
     foreach ($this->model_catalog_review->getReviews($data) as $result) {
         $this->data['reviews'][] = array_merge($result, array('status' => $result['status'] ? Language::getVar('SUMO_NOUN_ENABLED') : Language::getVar('SUMO_NOUN_DISABLED'), 'date_added' => Formatter::date($result['date_added']), 'edit' => $this->url->link('catalog/review/update', 'token=' . $this->session->data['token'] . '&review_id=' . $result['review_id'], 'SSL')));
     }
     $this->template = 'catalog/review_list.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:25,代码来源:review.php

示例5: getList

 protected function getList()
 {
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SETTINGS_DASHBOARD'), 'href' => $this->url->link('settings/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_USERS_OVERVIEW')));
     // Initiate pagination
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $data = array('start' => ($page - 1) * 25, 'limit' => 25);
     $user_total = $this->model_user_user->getTotalUsers();
     foreach ($this->model_user_user->getUsers($data) as $result) {
         $this->data['users'][] = array_merge($result, array('status' => $result['status'] ? Language::getVar('SUMO_NOUN_ENABLED') : Language::getVar('SUMO_NOUN_DISABLED'), 'date_added' => Formatter::date($result['date_added']), 'date_last_seen' => $result['date_last_seen'] != '0000-00-00 00:00:00' ? Formatter::date($result['date_last_seen']) : '—', 'edit' => $this->url->link('user/user/update', 'token=' . $this->session->data['token'] . '&user_id=' . $result['user_id'], 'SSL')));
     }
     $pagination = new Pagination();
     $pagination->total = $user_total;
     $pagination->page = $page;
     $pagination->limit = 25;
     $pagination->text = '';
     $pagination->url = $this->url->link('sale/return', 'token=' . $this->session->data['token'] . '&page={page}', 'SSL');
     $this->data = array_merge($this->data, array('pagination' => $pagination->renderAdmin(), 'insert' => $this->url->link('user/user/insert', 'token=' . $this->session->data['token'], 'SSL'), 'delete' => $this->url->link('user/user/delete', 'token=' . $this->session->data['token'], 'SSL'), 'u_users' => $this->url->link('user/user', 'token=' . $this->session->data['token'], 'SSL'), 'u_permissions' => $this->url->link('user/user_permission', 'token=' . $this->session->data['token'], 'SSL')));
     $this->template = 'user/user_list.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:26,代码来源:user.php

示例6: getList

 protected function getList()
 {
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SALES_DASHBOARD'), 'href' => $this->url->link('sale/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SALES_COUPONS')));
     $data = array('start' => ($page - 1) * 25, 'limit' => 25);
     $pagination = new Pagination();
     $pagination->total = $this->model_sale_coupon->getTotalCoupons();
     $pagination->page = $page;
     $pagination->limit = 25;
     $pagination->text = '';
     $pagination->url = $this->url->link('sale/coupon', 'token=' . $this->session->data['token'] . '&page={page}', 'SSL');
     $this->data = array_merge($this->data, array('insert' => $this->url->link('sale/coupon/insert', 'token=' . $this->session->data['token'], 'SSL'), 'delete' => $this->url->link('sale/coupon/delete', 'token=' . $this->session->data['token'], 'SSL'), 'pagination' => $pagination->renderAdmin(), 'coupons' => array()));
     foreach ($this->model_sale_coupon->getCoupons($data) as $result) {
         if ($result['status']) {
             if (strtotime($result['date_start']) >= time()) {
                 // Inactive
                 $status = Language::getVar('SUMO_NOUN_COUPON_NOT_ACTIVE_YET');
             } else {
                 if ($result['date_end'] != '0000-00-00' && strtotime($result['date_end']) <= time()) {
                     // Expired
                     $status = Language::getVar('SUMO_NOUN_COUPON_EXPIRED');
                 } else {
                     // Active / Enabled
                     $status = Language::getVar('SUMO_NOUN_ENABLED');
                 }
             }
         } else {
             // Hard-disabled
             $status = Language::getVar('SUMO_NOUN_DISABLED');
         }
         $this->data['coupons'][] = array_merge($result, array('date_start' => $result['date_start'] == '0000-00-00' ? '&mdash;' : Formatter::date($result['date_start']), 'date_end' => $result['date_end'] == '0000-00-00' ? '&mdash;' : Formatter::date($result['date_end']), 'status' => $status, 'selected' => isset($this->request->post['selected']) && in_array($result['coupon_id'], $this->request->post['selected']), 'edit' => $this->url->link('sale/coupon/update', 'token=' . $this->session->data['token'] . '&coupon_id=' . $result['coupon_id'], 'SSL')));
     }
     $this->template = 'sale/coupon_list.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:41,代码来源:coupon.php

示例7: getList

 protected function getList()
 {
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_CATALOG_DASHBOARD'), 'href' => $this->url->link('catalog/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_CATALOG_DOWNLOADS')));
     if (isset($this->request->get['sort'])) {
         $sort = $this->request->get['sort'];
     } else {
         $sort = 'dd.name';
     }
     if (isset($this->request->get['order'])) {
         $order = $this->request->get['order'];
     } else {
         $order = 'ASC';
     }
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $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['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $this->data['insert'] = $this->url->link('catalog/download/insert', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $this->data['delete'] = $this->url->link('catalog/download/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $this->data['downloads'] = array();
     $data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * 25, 'limit' => 25);
     $download_total = $this->model_catalog_download->getTotalDownloads();
     $results = $this->model_catalog_download->getDownloads($data);
     foreach ($results as $result) {
         $action = array();
         $action[] = array('href' => $this->url->link('catalog/download/update', 'token=' . $this->session->data['token'] . '&download_id=' . $result['download_id'] . $url, 'SSL'));
         $this->data['downloads'][] = array('download_id' => $result['download_id'], 'name' => $result['name'], 'remaining' => $result['remaining'], 'selected' => isset($this->request->post['selected']) && in_array($result['download_id'], $this->request->post['selected']), 'action' => $action);
     }
     $this->data['error_warning'] = '';
     if (isset($this->error['warning'])) {
         $this->data['error_warning'] = $this->error['warning'];
     }
     $this->data['success'] = '';
     if (isset($this->session->data['success'])) {
         $this->data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     }
     $url = '';
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $this->data['sort_name'] = $this->url->link('catalog/download', 'token=' . $this->session->data['token'] . '&sort=dd.name' . $url, 'SSL');
     $this->data['sort_remaining'] = $this->url->link('catalog/download', 'token=' . $this->session->data['token'] . '&sort=d.remaining' . $url, 'SSL');
     $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'];
     }
     $pagination = new Pagination();
     $pagination->total = $download_total;
     $pagination->page = $page;
     $pagination->limit = 25;
     $pagination->text = '';
     $pagination->url = $this->url->link('catalog/download', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->renderAdmin();
     $this->data['token'] = $this->session->data['token'];
     $this->getForm();
     $this->document->addScript('view/js/pages/download_list.js');
     $this->template = 'catalog/download_list.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:81,代码来源:download.php

示例8: getList

 protected function getList()
 {
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SALES_DASHBOARD'), 'href' => $this->url->link('sale/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SALES_RETURN')));
     $this->data = array_merge($this->data, array('insert' => $this->url->link('sale/return/insert', 'token=' . $this->session->data['token'], 'SSL'), 'delete' => $this->url->link('sale/return/delete', 'token=' . $this->session->data['token'], 'SSL'), 'returns' => array(), 'token' => $this->session->data['token']));
     // Initiate pagination
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $data = array('start' => ($page - 1) * 25, 'limit' => 25);
     $return_total = $this->model_sale_return->getTotalReturns($data);
     foreach ($this->model_sale_return->getReturns($data) as $result) {
         $this->data['returns'][] = array('return_id' => $result['return_id'], 'order_id' => $result['order_id'], 'customer' => $result['customer'], 'product' => $result['product'], 'model' => $result['model'], 'status' => $result['status'], 'date_added' => Formatter::date($result['date_added']), 'date_modified' => Formatter::date($result['date_modified']), 'edit' => $this->url->link('sale/return/update', 'token=' . $this->session->data['token'] . '&return_id=' . $result['return_id'], 'SSL'), 'info' => $this->url->link('sale/return/info', 'token=' . $this->session->data['token'] . '&return_id=' . $result['return_id'], 'SSL'));
     }
     $pagination = new Pagination();
     $pagination->total = $return_total;
     $pagination->page = $page;
     $pagination->limit = 25;
     $pagination->text = '';
     $pagination->url = $this->url->link('sale/return', 'token=' . $this->session->data['token'] . '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->renderAdmin();
     $this->template = 'sale/return_list.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:27,代码来源:return.php

示例9: getList

 protected function getList()
 {
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_CATALOG_DASHBOARD'), 'href' => $this->url->link('catalog/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_CATALOG_ATTRIBUTES')));
     $this->data['heading_title'] = Language::getVar('SUMO_NOUN_CATALOG_ATTRIBUTES');
     $this->data['attribute_groups'] = array();
     // Some basic filtering
     $page = 1;
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     }
     $data = array('start' => ($page - 1) * 25, 'limit' => 25);
     foreach ($this->model_catalog_attribute->getAttributeGroups($data) as $attribute_group) {
         // Get attributes
         $attributes = $this->model_catalog_attribute->getAttributes(array('filter_attribute_group_id' => $attribute_group['attribute_group_id']));
         $group_attributes = array();
         // Barnacles! array_column is only available since PHP 5.5
         foreach ($attributes as $attribute) {
             $group_attributes[] = $attribute['name'];
         }
         $this->data['attribute_groups'][] = array('attribute_group_id' => $attribute_group['attribute_group_id'], 'name' => $attribute_group['name'], 'attributes' => implode(', ', $group_attributes), 'edit' => $this->url->link('catalog/attribute/update', 'token=' . $this->session->data['token'] . '&attribute_group_id=' . $attribute_group['attribute_group_id'], 'SSL'));
     }
     // All view-variables gather here please..
     $this->data['insert'] = $this->url->link('catalog/attribute/insert', 'token=' . $this->session->data['token'], 'SSL');
     $this->data['delete'] = $this->url->link('catalog/attribute/delete', 'token=' . $this->session->data['token'], 'SSL');
     $this->data['cancel'] = $this->url->link('catalog/attribute', 'token=' . $this->session->data['token'], 'SSL');
     $this->document->addScript('view/js/pages/attribute_list.js');
     $this->getForm();
     $pagination = new Pagination();
     $pagination->total = $this->model_catalog_attribute->getTotalAttributeGroups();
     $pagination->page = $page;
     $pagination->limit = 25;
     $pagination->text = '';
     $pagination->url = $this->url->link('catalog/attribute', 'token=' . $this->session->data['token'] . '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->renderAdmin();
     $this->template = 'catalog/attribute_list.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:39,代码来源:attribute.php

示例10: getList

 protected function getList()
 {
     $this->document->setTitle(Language::getVar('SUMO_ADMIN_CATALOG_BRANDS'));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_CATALOG_DASHBOARD'), 'href' => $this->url->link('catalog/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_CATALOG_BRANDS')));
     if (isset($this->request->get['sort'])) {
         $sort = $this->request->get['sort'];
     } else {
         $sort = 'name';
     }
     if (isset($this->request->get['order'])) {
         $order = $this->request->get['order'];
     } else {
         $order = 'ASC';
     }
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $url = '';
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $this->data['insert'] = $this->url->link('catalog/manufacturer/insert', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $this->data['delete'] = $this->url->link('catalog/manufacturer/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $this->data['cancel'] = $this->url->link('catalog/manufacturer', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $this->data['manufacturers'] = array();
     $data = array('start' => ($page - 1) * $this->config->get('admin_limit'), 'limit' => $this->config->get('admin_limit'));
     $manufacturer_total = $this->model_catalog_manufacturer->getTotalManufacturers();
     $results = $this->model_catalog_manufacturer->getManufacturers($data);
     foreach ($results as $result) {
         // Get keyword
         $manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($result['manufacturer_id']);
         $this->data['manufacturers'][] = array('manufacturer_id' => $result['manufacturer_id'], 'name' => $result['name'], 'image' => $result['image'], 'keyword' => $manufacturer_info['keyword'], 'sort_order' => $result['sort_order'], 'selected' => isset($this->request->post['selected']) && in_array($result['manufacturer_id'], $this->request->post['selected']), 'edit' => $this->url->link('catalog/manufacturer/update', 'token=' . $this->session->data['token'] . '&manufacturer_id=' . $result['manufacturer_id'] . $url, 'SSL'));
     }
     if (isset($this->error['warning'])) {
         $this->data['error_warning'] = $this->error['warning'];
     } else {
         $this->data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $this->data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $this->data['success'] = '';
     }
     $url = '';
     $pagination = new Pagination();
     $pagination->total = $manufacturer_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('admin_limit');
     $pagination->text = '';
     $pagination->url = $this->url->link('catalog/manufacturer', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->renderAdmin();
     $this->getForm();
     $this->data['token'] = $this->session->data['token'];
     $this->document->addScript('view/js/jquery/jquery.ajaxupload.js');
     $this->document->addScript('view/js/pages/manufacturer_list.js');
     $this->document->addStyle('view/css/pages/uploader.css');
     $this->template = 'catalog/manufacturer_list.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:64,代码来源:manufacturer.php

示例11: getList

 private function getList()
 {
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SALES_DASHBOARD'), 'href' => $this->url->link('sale/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SALES_INVOICES')));
     // Find invoices
     $allowedFilters = array('concept', 'sent', 'partially_paid', 'paid', 'credit', 'expired');
     if (isset($this->request->get['filter']) && in_array($this->request->get['filter'], $allowedFilters)) {
         $status = mb_strtoupper($this->request->get['filter']);
     } else {
         $status = array('CONCEPT', 'SENT', 'PARTIALLY_PAID', 'PAID', 'CREDIT');
     }
     $limit = 20;
     $page_total_ex = $page_total_in = 0;
     $page = isset($this->request->get['page']) ? $this->request->get['page'] : 1;
     $filter = array('status' => $status, 'limit' => $limit, 'start' => ($page - 1) * $limit);
     foreach ($this->model_sale_invoice->getInvoices($filter) as $invoice) {
         // Customer is corporate or private?
         if (!empty($invoice['customer_company_name'])) {
             $customer = $invoice['customer_company_name'];
         } else {
             $customer = $invoice['customer_name'];
         }
         // Sent to the view
         $this->data['invoices'][] = array('invoice_id' => $invoice['invoice_id'], 'invoice_no' => $invoice['invoice_no'], 'customer' => $customer, 'date' => Formatter::date($invoice['invoice_date']), 'amount' => Formatter::currency($invoice['total_amount']), 'status' => $invoice['status'], 'send' => $this->url->link('sale/invoice/send', 'token=' . $this->session->data['token'] . '&invoice_id=' . $invoice['invoice_id'], 'SSL'), 'view' => $this->url->link('sale/invoice/view', 'token=' . $this->session->data['token'] . '&invoice_id=' . $invoice['invoice_id'], 'SSL'), 'download' => $this->url->link('sale/invoice/download', 'token=' . $this->session->data['token'] . '&invoice_id=' . $invoice['invoice_id'], 'SSL'), 'update' => $this->url->link('sale/invoice/update', 'token=' . $this->session->data['token'] . '&invoice_id=' . $invoice['invoice_id'], 'SSL'));
         $page_total_ex += $invoice['amount'] - $invoice['tax'];
         $page_total_in += $invoice['amount'];
     }
     // In need of pagination?
     $invoiceTotal = $this->model_sale_invoice->getTotalInvoices($filter);
     if ($invoiceTotal > $limit) {
         $pagination = new Pagination();
         $pagination->total = $product_total;
         $pagination->limit = $limit;
         $pagination->page = $page;
         $pagination->url = $this->url->link('sale/invoice', 'token=' . $this->session->data['token'] . '&page={page}' . (!is_array($status) ? '&status=' . $status : ''));
         $this->data['pagination'] = $pagination->renderAdmin();
     } else {
         $this->data['pagination'] = false;
     }
     $this->data = array_merge($this->data, array('page_total_ex' => Formatter::currency($page_total_ex), 'page_total_in' => Formatter::currency($page_total_in), 'status' => !is_array($status) ? Language::getVar('SUMO_NOUN_' . mb_strtoupper($status)) : Language::getVar('SUMO_NOUN_DEFAULT'), 'delete' => $this->url->link('sale/invoice/delete', 'token=' . $this->session->data['token'], 'SSL'), 'insert' => $this->url->link('sale/invoice/insert', 'token=' . $this->session->data['token'], 'SSL'), 'filter' => $this->url->link('sale/invoice', 'token=' . $this->session->data['token'] . '&filter=', 'SSL'), 'overview' => $this->url->link('sale/invoice', 'token=' . $this->session->data['token'], 'SSL')));
     $this->template = 'sale/invoice_list.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:44,代码来源:invoice.php

示例12: generateData


//.........这里部分代码省略.........
             }
             break;
         case 'sales':
             $title = Language::getVar('SUMO_ADMIN_REPORT_SALES');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_DATE_START');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_DATE_END');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_ORDERS');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_PRODUCTS');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_TAX_AMOUNT');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_TOTAL');
             $this->load->model('localisation/order_status');
             foreach ($this->model_localisation_order_status->getOrderStatuses() as $list) {
                 $this->data['statuses'][] = array('status_id' => $list['order_status_id'], 'name' => $list['name']);
             }
             break;
         case 'returns':
             $title = Language::getVar('SUMO_ADMIN_REPORT_RETURNS');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_DATE_START');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_DATE_END');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_RETURNS');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_STATUS');
             $this->load->model('localisation/return_status');
             foreach ($this->model_localisation_return_status->getReturnStatuses() as $list) {
                 $this->data['statuses'][] = array('status_id' => $list['return_status_id'], 'name' => $list['name']);
             }
             break;
         case 'coupons':
             $title = Language::getVar('SUMO_ADMIN_REPORT_COUPONS');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_DATE_START');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_DATE_END');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_NAME');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_COUPON_CODE');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_ORDERS');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_TOTAL');
             break;
         case 'products_viewed':
             $title = Language::getVar('SUMO_ADMIN_REPORT_PRODUCTS_VIEWED');
             $this->data['disable_dates'] = true;
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_NAME');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_MODEL');
             $this->data['table_head'][] = Language::getvar('SUMO_NOUN_VIEWS');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_PERCENTAGE');
             $this->data['statuses'][] = array('status_id' => 1, 'name' => Language::getVar('SUMO_NOUN_PRODUCT_ACTIVE'));
             $this->data['statuses'][] = array('status_id' => 2, 'name' => Language::getVar('SUMO_NOUN_PRODUCT_INACTIVE'));
             break;
         case 'products_sales':
             $title = Language::getVar('SUMO_ADMIN_REPORT_PRODUCTS_SALES');
             $this->data['disable_group'] = true;
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_NAME');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_MODEL');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_VIEWS');
             $this->data['table_head'][] = Language::getvar('SUMO_NOUN_ORDERS');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_TOTAL');
             $this->data['table_head'][] = Language::getVar('SUMO_NOUN_PERCENTAGE');
             break;
     }
     $this->document->setTitle($title);
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_REPORT_DASHBOARD'), 'href' => $this->url->link('report/dashboard')));
     $this->document->addBreadcrumbs(array('text' => $title));
     // Load required models
     $this->load->model('report/generate');
     // Setup filters and vars
     $this->data['groups'] = array(array('text' => Language::getVar('SUMO_NOUN_YEAR'), 'value' => 'year'), array('text' => Language::getVar('SUMO_NOUN_MONTH'), 'value' => 'month'), array('text' => Language::getVar('SUMO_NOUN_WEEK'), 'value' => 'week'), array('text' => Language::getVar('SUMO_NOUN_DAY'), 'value' => 'day'));
     $filter = array();
     $filter['date_start'] = Formatter::date(strtotime('first day of this month'));
     $filter['date_end'] = Formatter::date(strtotime('last day of this month'));
     $filter['group'] = 'week';
     $filter['status_id'] = 0;
     $filter['page'] = 0;
     $url = '';
     foreach ($filter as $key => $value) {
         if (!empty($this->request->get[$key]) && $key != 'page') {
             $filter[$key] = $this->request->get[$key];
             $url .= '&' . $key . '=' . $this->request->get[$key];
         }
     }
     foreach ($filter as $key => $value) {
         $this->data[$key] = $value;
     }
     $total = $this->model_report_generate->getTotal($type, $filter);
     $filter['page'] = !empty($this->request->get['page']) ? (int) $this->request->get['page'] : 1;
     $filter['start'] = ($filter['page'] - 1) * 25;
     $filter['limit'] = 25;
     // Generate pagination before applying the page to the url string
     $pagination = new Pagination();
     $pagination->total = $total;
     $pagination->page = $filter['page'];
     $pagination->limit = 25;
     $pagination->text = '';
     $pagination->url = $this->url->link('report/generate/' . str_replace('_', '', $type), 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->renderAdmin();
     $this->data['reset'] = $this->url->link('report/generate/' . str_replace('_', '', $type), 'token=' . $this->session->data['token'], 'SSL');
     $this->data['items'] = array();
     foreach ($this->model_report_generate->getData($type, $filter) as $time => $list) {
         $this->data['items'][$time] = $list;
     }
     $this->template = 'report/generate.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:101,代码来源:generate.php

示例13: getList


//.........这里部分代码省略.........
     $this->data['delete'] = $this->url->link('catalog/product/delete', 'token=' . $this->session->data['token'] . '&' . $filterURL, 'SSL');
     $this->data['url_sort_order'] = $this->url->link('catalog/product/order', 'token=' . $this->session->data['token'], 'SSL');
     $this->data['token'] = $this->session->data['token'];
     $this->data['products'] = $this->data['stores'] = $this->data['categories'] = array();
     // Read limit from url (if present)
     // if not, read from session save
     // in session if different from it
     $limit = 25;
     if (isset($this->request->get['limit'])) {
         $limit = $this->request->get['limit'];
     } elseif (isset($this->session->data['limit'])) {
         $limit = $this->session->data['limit'];
     }
     // Save limit in session and store for TPL
     $this->session->data['limit'] = $limit;
     $this->data['limit'] = $limit;
     $start = ($page - 1) * $limit;
     $data = array('filter_name' => '', 'filter_model' => '', 'filter_price_from' => '', 'filter_price_to' => '', 'filter_stock_from' => '', 'filter_stock_to' => '', 'filter_stock' => '', 'filter_category' => '', 'filter_brand' => '', 'filter_store' => 0, 'filter_model_supplier' => '');
     $this->data['advanced_search'] = false;
     foreach ($data as $filter => $default) {
         $data[$filter] = isset($this->request->get[$filter]) ? $this->request->get[$filter] : $default;
         $this->data[$filter] = $data[$filter];
         if (!empty($data[$filter])) {
             if ($filter != 'filter_store' && $filter != 'filter_category') {
                 // Show advanced search form
                 $this->data['advanced_search'] = true;
             }
         }
     }
     // Find correct store with category_id (if selected)
     if (!empty($data['filter_category'])) {
         $categoryInfo = $this->model_catalog_category->getCategory($data['filter_category']);
         // Overwrite the already filled data-filters
         $data['filter_store'] = $this->data['filter_store'] = $this->request->get['filter_store'] = (int) $categoryInfo['store_id'];
         $filterURL = $this->getFilterURL();
     }
     // Special add-on for stock-filter
     if (!empty($data['filter_stock_from'])) {
         $this->data['filter_stock_control'] = 'stock_from';
         $this->data['filter_stock'] = $this->data['filter_stock_from'];
     } elseif (!empty($data['filter_stock_to'])) {
         $this->data['filter_stock_control'] = 'stock_to';
         $this->data['filter_stock'] = $this->data['filter_stock_to'];
     } else {
         $this->data['filter_stock_control'] = 'stock';
     }
     if (!$this->data['advanced_search']) {
         $search = !empty($this->request->get['search']) ? $this->request->get['search'] : false;
         if ($search) {
             $this->data['search'] = $search;
             $data['filter_name'] = $search;
         }
     }
     foreach ($this->model_settings_stores->getStores() as $list) {
         $this->data['stores'][] = array_merge($list, array('total' => $this->model_catalog_product->getTotalProducts(array('filter_store' => $list['store_id'])), 'store_link' => $this->url->link('catalog/product', 'token=' . $this->session->data['token'] . '&filter_store=' . $list['store_id'])));
     }
     foreach ($this->model_catalog_category->getCategoriesAsList() as $list) {
         // Indent the name for a subcategory
         for ($i = 0; $i < $list['level']; $i++) {
             $list['name'] = '&nbsp;&nbsp;&nbsp;' . $list['name'];
         }
         $this->data['categories'][$list['store_id']][] = $list;
     }
     $data['limit'] = $limit;
     $data['start'] = $start;
     $products = $this->model_catalog_product->getProducts($data);
     $totalProducts = $this->model_catalog_product->getTotalProducts($data);
     // List products
     foreach ($products as $product) {
         $image = $this->model_tool_image->resize('no_image.jpg', 60, 60);
         if ($product['image'] && file_exists(DIR_IMAGE . $product['image'])) {
             $image = $this->model_tool_image->resize($product['image'], 60, 60);
         }
         $special = 0;
         $productSpecials = $this->model_catalog_product->getProductSpecials($product['product_id']);
         foreach ($productSpecials as $productSpecial) {
             if (($productSpecial['date_start'] == '0000-00-00' || $productSpecial['date_start'] < date('Y-m-d')) && ($productSpecial['date_end'] == '0000-00-00' || $productSpecial['date_end'] > date('Y-m-d'))) {
                 $special = $productSpecial['price'];
                 break;
             }
         }
         $this->data['products'][] = array_merge($product, array('model' => !empty($product['model_2']) ? $product['model_2'] : $product['model'], 'price_in' => $product['price'] * (1 + $product['tax_percentage'] / 100), 'special' => !empty($special) ? Formatter::currency($special) : '', 'special_in' => !empty($special) ? Formatter::currency($special * (1 + $product['tax_percentage'] / 100)) : '', 'image' => $image, 'options' => $this->model_catalog_product->getProductOptions($product['product_id']), 'edit' => $this->url->link('catalog/product/update', 'token=' . $this->session->data['token'] . '&product_id=' . $product['product_id'] . '&' . $filterURL, 'SSL')));
     }
     $pagination = new Pagination();
     $pagination->total = $totalProducts;
     $pagination->limit = $limit;
     $pagination->page = $page;
     $pagination->url = $this->url->link('catalog/product', 'token=' . $this->session->data['token'] . '&page={page}&' . $filterURL);
     $this->data['pagination'] = $pagination->renderAdmin();
     $this->data['filter_url'] = $this->url->link('catalog/product', 'token=' . $this->session->data['token'] . (!empty($filterURL) ? '&' . $filterURL : ''));
     // Get brands
     $this->load->model('catalog/manufacturer');
     $this->data['manufacturers'] = $this->model_catalog_manufacturer->getManufacturers();
     $this->document->addStyle('view/css/pages/product.css');
     $this->document->addScript('view/js/pages/product_list.js');
     $this->template = 'catalog/product_list.tpl';
     $this->children = array('common/header', 'common/footer');
     $output = $this->render();
     $this->response->setOutput($output);
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:101,代码来源:product.php

示例14: getList

 protected function getList()
 {
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_SALES_DASHBOARD'), 'href' => $this->url->link('sale/dashboard')));
     $this->document->addBreadcrumbs(array('text' => Language::getVar('SUMO_ADMIN_CUSTOMER_DASHBOARD')));
     $data = array('filter_name' => '', 'filter_email' => '', 'filter_ip' => '', 'filter_date_added' => '', 'filter_newsletter' => '', 'filter_customer_group' => '', 'filter_status' => null, 'filter_newsletter' => null, 'filter_approved' => null);
     $this->data['advanced_search'] = false;
     foreach ($data as $filter => $default) {
         $data[$filter] = isset($this->request->get[$filter]) && $this->request->get[$filter] != '' ? $this->request->get[$filter] : $default;
         $this->data[$filter] = $data[$filter];
         if (!empty($data[$filter])) {
             $this->data['advanced_search'] = true;
         }
     }
     if (!$this->data['advanced_search']) {
         $search = !empty($this->request->get['search']) ? $this->request->get['search'] : false;
         if ($search) {
             $this->data['search'] = $search;
             $data['filter_name'] = $search;
         }
     }
     $this->load->model('sale/customer_group');
     $this->data = array_merge($this->data, array('cancel' => $this->url->link('sale/customer', 'token=' . $this->session->data['token'], 'SSL'), 'current_url' => $this->url->link('sale/customer', 'token=' . $this->session->data['token'], 'SSL'), 'customer_groups' => $this->model_sale_customer_group->getCustomerGroups(), 'approve' => $this->url->link('sale/customer/approve', 'token=' . $this->session->data['token'], 'SSL'), 'insert' => $this->url->link('sale/customer/insert', 'token=' . $this->session->data['token'], 'SSL'), 'delete' => $this->url->link('sale/customer/delete', 'token=' . $this->session->data['token'], 'SSL'), 'token' => $this->session->data['token'], 'stores' => array(), 'customers' => array()));
     // Initiate pagination
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $data = array_merge($data, array('start' => ($page - 1) * 25, 'limit' => 25));
     $customer_total = $this->model_sale_customer->getTotalCustomers($data);
     $results = $this->model_sale_customer->getCustomers($data);
     foreach ($results as $result) {
         $this->data['customers'][] = array_merge($result, array('date_added' => Formatter::date($result['date_added']), 'edit' => $this->url->link('sale/customer/update', 'token=' . $this->session->data['token'] . '&customer_id=' . $result['customer_id'], 'SSL'), 'login' => $this->url->link('sale/customer/login', 'token=' . $this->session->data['token'] . '&customer_id=' . $result['customer_id'] . '&store_id=', 'SSL')));
     }
     $pagination = new Pagination();
     $pagination->total = $customer_total;
     $pagination->page = $page;
     $pagination->limit = 25;
     $pagination->text = '';
     $pagination->url = $this->url->link('sale/customer', 'token=' . $this->session->data['token'] . '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->renderAdmin();
     $this->load->model('settings/stores');
     foreach ($this->model_settings_stores->getStores() as $list) {
         $this->data['stores'][] = $list;
     }
     $this->template = 'sale/customer_list.tpl';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:49,代码来源:customer.php


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