Example #1
0
 public function index()
 {
     $this->language->load('module/faq');
     $this->load->model('module/faq');
     $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('heading_title'), 'href' => $this->url->link('module/faq'));
     $url = '';
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $filter_data = array('page' => $page, 'limit' => 20, 'start' => 20 * ($page - 1));
     $total = $this->model_module_faq->getTotalFaq();
     $pagination = new \Core\Pagination();
     $pagination->text = $this->language->get('text_pagination');
     $pagination->total = $total;
     $pagination->page = $page;
     $pagination->limit = 20;
     $pagination->url = $this->url->link('information/faq', 'page={page}');
     $data['pagination'] = $pagination->render();
     $data['results'] = sprintf($this->language->get('text_pagination'), $total ? ($page - 1) * 10 + 1 : 0, ($page - 1) * 10 > $total - 10 ? $total : ($page - 1) * 10 + 10, $total, ceil($total / 10));
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_question'] = $this->language->get('text_question');
     $data['text_answer'] = $this->language->get('text_answer');
     $data['text_date'] = $this->language->get('text_date');
     $data['text_view'] = $this->language->get('text_view');
     $all_faq = $this->model_module_faq->getAllFaq($filter_data);
     $data['all_faq'] = array();
     foreach ($all_faq as $faq) {
         $data['all_faq'][] = array('question' => html_entity_decode($faq['question'], ENT_QUOTES, "UTF-8"), 'answer' => html_entity_decode($faq['answer'], ENT_QUOTES, "UTF-8"), 'view' => $this->url->link('extension/faq/faq', 'faq_id=' . $faq['faq_id']), 'date_added' => date($this->language->get('date_format_short'), strtotime($faq['date_added'])));
     }
     $this->children = array('common/column_top', 'common/column_bottom', 'common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header');
     $this->response->setoutput($this->render('module/faq_list.phtml', $data));
 }
Example #2
0
 protected function getList()
 {
     if (isset($this->request->get['sort'])) {
         $sort = $this->request->get['sort'];
     } else {
         $sort = 'c.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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('localisation/zone', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     $data['add'] = $this->url->link('localisation/zone/add', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('localisation/zone/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['zones'] = array();
     $filter_data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $zone_total = $this->model_localisation_zone->getTotalZones();
     $results = $this->model_localisation_zone->getZones($filter_data);
     foreach ($results as $result) {
         $data['zones'][] = array('zone_id' => $result['zone_id'], 'country' => $result['country'], 'name' => $result['name'] . ($result['zone_id'] == $this->config->get('config_zone_id') ? $this->language->get('text_default') : null), 'code' => $result['code'], 'edit' => $this->url->link('localisation/zone/edit', 'token=' . $this->session->data['token'] . '&zone_id=' . $result['zone_id'] . $url, 'SSL'));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_country'] = $this->language->get('column_country');
     $data['column_name'] = $this->language->get('column_name');
     $data['column_code'] = $this->language->get('column_code');
     $data['column_action'] = $this->language->get('column_action');
     $data['button_add'] = $this->language->get('button_add');
     $data['button_edit'] = $this->language->get('button_edit');
     $data['button_delete'] = $this->language->get('button_delete');
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['sort_country'] = $this->url->link('localisation/zone', 'token=' . $this->session->data['token'] . '&sort=c.name' . $url, 'SSL');
     $data['sort_name'] = $this->url->link('localisation/zone', 'token=' . $this->session->data['token'] . '&sort=z.name' . $url, 'SSL');
     $data['sort_code'] = $this->url->link('localisation/zone', 'token=' . $this->session->data['token'] . '&sort=z.code' . $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 \Core\Pagination();
     $pagination->text = $this->language->get('text_pagination');
     $pagination->total = $zone_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('localisation/zone', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['sort'] = $sort;
     $data['order'] = $order;
     $data['header'] = $this->getChild('common/header');
     $data['footer'] = $this->getChild('common/footer');
     $this->response->setOutput($this->render('localisation/zone_list.phtml', $data));
 }
Example #3
0
 public function index()
 {
     $this->load->language('report/customer_online');
     $this->document->setTitle($this->language->get('heading_title'));
     if (isset($this->request->get['filter_ip'])) {
         $filter_ip = $this->request->get['filter_ip'];
     } else {
         $filter_ip = null;
     }
     if (isset($this->request->get['filter_customer'])) {
         $filter_customer = $this->request->get['filter_customer'];
     } else {
         $filter_customer = null;
     }
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $url = '';
     if (isset($this->request->get['filter_customer'])) {
         $url .= '&filter_customer=' . urlencode($this->request->get['filter_customer']);
     }
     if (isset($this->request->get['filter_ip'])) {
         $url .= '&filter_ip=' . $this->request->get['filter_ip'];
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'), 'text' => $this->language->get('text_home'));
     $data['breadcrumbs'][] = array('href' => $this->url->link('report/customer_online', 'token=' . $this->session->data['token'] . $url, 'SSL'), 'text' => $this->language->get('heading_title'));
     $this->load->model('report/customer');
     $this->load->model('sale/customer');
     $data['customers'] = array();
     $filter_data = array('filter_ip' => $filter_ip, 'filter_customer' => $filter_customer, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $customer_total = $this->model_report_customer->getTotalCustomersOnline($filter_data);
     $results = $this->model_report_customer->getCustomersOnline($filter_data);
     foreach ($results as $result) {
         $customer_info = $this->model_sale_customer->getCustomer($result['customer_id']);
         if ($customer_info) {
             $customer = $customer_info['firstname'] . ' ' . $customer_info['lastname'];
         } else {
             $customer = $this->language->get('text_guest');
         }
         $data['customers'][] = array('customer_id' => $result['customer_id'], 'ip' => $result['ip'], 'customer' => $customer, 'url' => $result['url'], 'referer' => $result['referer'], 'date_added' => date($this->language->get('date_time_format_long'), strtotime($result['date_added'])), 'edit' => $this->url->link('sale/customer/edit', 'token=' . $this->session->data['token'] . '&customer_id=' . $result['customer_id'], 'SSL'));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_ip'] = $this->language->get('column_ip');
     $data['column_customer'] = $this->language->get('column_customer');
     $data['column_url'] = $this->language->get('column_url');
     $data['column_referer'] = $this->language->get('column_referer');
     $data['column_date_added'] = $this->language->get('column_date_added');
     $data['column_action'] = $this->language->get('column_action');
     $data['entry_ip'] = $this->language->get('entry_ip');
     $data['entry_customer'] = $this->language->get('entry_customer');
     $data['button_edit'] = $this->language->get('button_edit');
     $data['button_filter'] = $this->language->get('button_filter');
     $data['token'] = $this->session->data['token'];
     $url = '';
     if (isset($this->request->get['filter_customer'])) {
         $url .= '&filter_customer=' . urlencode($this->request->get['filter_customer']);
     }
     if (isset($this->request->get['filter_ip'])) {
         $url .= '&filter_ip=' . $this->request->get['filter_ip'];
     }
     $pagination = new \Core\Pagination();
     $pagination->total = $customer_total;
     $pagination->page = $page;
     $pagination->text = $this->language->get('text_pagination');
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('report/customer_online', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['filter_customer'] = $filter_customer;
     $data['filter_ip'] = $filter_ip;
     $this->template = 'report/customer_online.phtml';
     $this->data = $data;
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
Example #4
0
 protected function getList()
 {
     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['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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('cms/download', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     $data['add'] = $this->url->link('cms/download/add', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('cms/download/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['downloads'] = array();
     $filter_data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $download_total = $this->model_cms_download->getTotalDownloads();
     $results = $this->model_cms_download->getDownloads($filter_data);
     foreach ($results as $result) {
         $data['downloads'][] = array('download_id' => $result['download_id'], 'name' => $result['name'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'edit' => $this->url->link('cms/download/edit', 'token=' . $this->session->data['token'] . '&download_id=' . $result['download_id'] . $url, 'SSL'));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_name'] = $this->language->get('column_name');
     $data['column_date_added'] = $this->language->get('column_date_added');
     $data['column_action'] = $this->language->get('column_action');
     $data['button_add'] = $this->language->get('button_add');
     $data['button_edit'] = $this->language->get('button_edit');
     $data['button_delete'] = $this->language->get('button_delete');
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['sort_name'] = $this->url->link('cms/download', 'token=' . $this->session->data['token'] . '&sort=name' . $url, 'SSL');
     $data['sort_date_added'] = $this->url->link('cms/download', 'token=' . $this->session->data['token'] . '&sort=date_added' . $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 \Core\Pagination();
     $pagination->total = $download_total;
     $pagination->page = $page;
     $pagination->text = $this->language->get('text_pagination');
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('cms/download', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['sort'] = $sort;
     $data['order'] = $order;
     $this->template = 'cms/download_list.phtml';
     $this->data = $data;
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
Example #5
0
 public function ip()
 {
     $this->load->language('sale/customer');
     $this->load->model('sale/customer');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_add_ban_ip'] = $this->language->get('text_add_ban_ip');
     $data['text_remove_ban_ip'] = $this->language->get('text_remove_ban_ip');
     $data['text_loading'] = $this->language->get('text_loading');
     $data['column_ip'] = $this->language->get('column_ip');
     $data['column_total'] = $this->language->get('column_total');
     $data['column_date_added'] = $this->language->get('column_date_added');
     $data['column_action'] = $this->language->get('column_action');
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $data['ips'] = array();
     $results = $this->model_sale_customer->getIps($this->request->get['customer_id'], ($page - 1) * 10, 10);
     foreach ($results as $result) {
         $ban_ip_total = $this->model_sale_customer->getTotalBanIpsByIp($result['ip']);
         $data['ips'][] = array('ip' => $result['ip'], 'total' => $this->model_sale_customer->getTotalCustomersByIp($result['ip']), 'date_added' => date('d/m/y', strtotime($result['date_added'])), 'filter_ip' => $this->url->link('sale/customer', 'token=' . $this->session->data['token'] . '&filter_ip=' . $result['ip'], 'SSL'), 'ban_ip' => $ban_ip_total);
     }
     $ip_total = $this->model_sale_customer->getTotalIps($this->request->get['customer_id']);
     $pagination = new \Core\Pagination();
     $pagination->total = $ip_total;
     $pagination->page = $page;
     $pagination->limit = 10;
     $pagination->text = $this->language->get('text_pagination');
     $pagination->url = $this->url->link('sale/customer/ip', 'token=' . $this->session->data['token'] . '&customer_id=' . $this->request->get['customer_id'] . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $this->template = 'sale/customer_ip.phtml';
     $this->data = $data;
     $this->response->setOutput($this->render());
 }
Example #6
0
 public function index()
 {
     $this->load->language('report/customer_activity');
     $this->document->setTitle($this->language->get('heading_title'));
     if (isset($this->request->get['filter_customer'])) {
         $filter_customer = $this->request->get['filter_customer'];
     } else {
         $filter_customer = null;
     }
     if (isset($this->request->get['filter_ip'])) {
         $filter_ip = $this->request->get['filter_ip'];
     } else {
         $filter_ip = null;
     }
     if (isset($this->request->get['filter_date_start'])) {
         $filter_date_start = $this->request->get['filter_date_start'];
     } else {
         $filter_date_start = '';
     }
     if (isset($this->request->get['filter_date_end'])) {
         $filter_date_end = $this->request->get['filter_date_end'];
     } else {
         $filter_date_end = '';
     }
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $url = '';
     if (isset($this->request->get['filter_customer'])) {
         $url .= '&filter_customer=' . urlencode($this->request->get['filter_customer']);
     }
     if (isset($this->request->get['filter_ip'])) {
         $url .= '&filter_ip=' . $this->request->get['filter_ip'];
     }
     if (isset($this->request->get['filter_date_start'])) {
         $url .= '&filter_date_start=' . $this->request->get['filter_date_start'];
     }
     if (isset($this->request->get['filter_date_end'])) {
         $url .= '&filter_date_end=' . $this->request->get['filter_date_end'];
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'), 'text' => $this->language->get('text_home'));
     $data['breadcrumbs'][] = array('href' => $this->url->link('report/customer_activity', 'token=' . $this->session->data['token'] . $url, 'SSL'), 'text' => $this->language->get('heading_title'));
     $this->load->model('report/customer');
     $data['activities'] = array();
     $filter_data = array('filter_customer' => $filter_customer, 'filter_ip' => $filter_ip, 'filter_date_start' => $filter_date_start, 'filter_date_end' => $filter_date_end, 'start' => ($page - 1) * 20, 'limit' => 20);
     $activity_total = $this->model_report_customer->getTotalCustomerActivities($filter_data);
     $results = $this->model_report_customer->getCustomerActivities($filter_data);
     foreach ($results as $result) {
         $comment = vsprintf($this->language->get('text_' . $result['key']), unserialize($result['data']));
         $find = array('customer_id=', 'order_id=');
         $replace = array($this->url->link('sale/customer/edit', 'token=' . $this->session->data['token'] . '&customer_id=', 'SSL'));
         $data['activities'][] = array('comment' => str_replace($find, $replace, $comment), 'ip' => $result['ip'], 'date_added' => date($this->language->get('date_time_format_long'), strtotime($result['date_added'])));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_comment'] = $this->language->get('column_comment');
     $data['column_ip'] = $this->language->get('column_ip');
     $data['column_date_added'] = $this->language->get('column_date_added');
     $data['entry_customer'] = $this->language->get('entry_customer');
     $data['entry_ip'] = $this->language->get('entry_ip');
     $data['entry_date_start'] = $this->language->get('entry_date_start');
     $data['entry_date_end'] = $this->language->get('entry_date_end');
     $data['button_filter'] = $this->language->get('button_filter');
     $data['token'] = $this->session->data['token'];
     $url = '';
     if (isset($this->request->get['filter_customer'])) {
         $url .= '&filter_customer=' . urlencode($this->request->get['filter_customer']);
     }
     if (isset($this->request->get['filter_ip'])) {
         $url .= '&filter_ip=' . $this->request->get['filter_ip'];
     }
     if (isset($this->request->get['filter_date_start'])) {
         $url .= '&filter_date_start=' . $this->request->get['filter_date_start'];
     }
     if (isset($this->request->get['filter_date_end'])) {
         $url .= '&filter_date_end=' . $this->request->get['filter_date_end'];
     }
     $pagination = new \Core\Pagination();
     $pagination->total = $activity_total;
     $pagination->page = $page;
     $pagination->text = $this->language->get('text_pagination');
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('report/customer_activity', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['filter_customer'] = $filter_customer;
     $data['filter_ip'] = $filter_ip;
     $data['filter_date_start'] = $filter_date_start;
     $data['filter_date_end'] = $filter_date_end;
     $this->document->addScript('view/plugins/datetimepicker/moment.min.js');
     $this->document->addScript('view/plugins/datetimepicker/bootstrap-datetimepicker.min.js');
     $this->document->addStyle('view/plugins/datetimepicker/bootstrap-datetimepicker.min.css');
     $this->document->addScript('//code.jquery.com/ui/1.11.4/jquery-ui.min.js');
     $this->data = $data;
     $this->template = 'report/customer_activity.phtml';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
Example #7
0
 protected function getList()
 {
     if (isset($this->request->get['sort'])) {
         $sort = $this->request->get['sort'];
     } else {
         $sort = 'username';
     }
     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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('user/api', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     $data['insert'] = $this->url->link('user/api/add', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('user/api/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['apis'] = array();
     $filter_data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $user_total = $this->model_user_api->getTotalApis();
     $results = $this->model_user_api->getApis($filter_data);
     foreach ($results as $result) {
         $data['apis'][] = array('api_id' => $result['api_id'], 'username' => $result['username'], 'status' => $result['status'] ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'edit' => $this->url->link('user/api/edit', 'token=' . $this->session->data['token'] . '&api_id=' . $result['api_id'] . $url, 'SSL'));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_username'] = $this->language->get('column_username');
     $data['column_status'] = $this->language->get('column_status');
     $data['column_date_added'] = $this->language->get('column_date_added');
     $data['column_action'] = $this->language->get('column_action');
     $data['button_insert'] = $this->language->get('button_insert');
     $data['button_edit'] = $this->language->get('button_edit');
     $data['button_delete'] = $this->language->get('button_delete');
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['sort_username'] = $this->url->link('user/api', 'token=' . $this->session->data['token'] . '&sort=username' . $url, 'SSL');
     $data['sort_status'] = $this->url->link('user/api', 'token=' . $this->session->data['token'] . '&sort=status' . $url, 'SSL');
     $data['sort_date_added'] = $this->url->link('user/api', 'token=' . $this->session->data['token'] . '&sort=date_added' . $url, 'SSL');
     $data['sort_date_modified'] = $this->url->link('user/api', 'token=' . $this->session->data['token'] . '&sort=date_modified' . $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 \Core\Pagination();
     $pagination->total = $user_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('user/api', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $pagination->text = $this->language->get('text_pagination');
     $data['pagination'] = $pagination->render();
     $data['sort'] = $sort;
     $data['order'] = $order;
     $data['header'] = $this->getChild('common/header');
     $data['footer'] = $this->getChild('common/footer');
     $this->response->setOutput($this->render('user/api_list.phtml', $data));
 }
Example #8
0
 protected function getList()
 {
     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['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['breadcrumbs'] = array();
     $this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'), 'separator' => false);
     $this->data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('design/layout', 'token=' . $this->session->data['token'] . $url, 'SSL'), 'separator' => ' :: ');
     $this->data['insert'] = $this->url->link('design/layout/insert', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $this->data['delete'] = $this->url->link('design/layout/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $this->data['layouts'] = array();
     $data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $layout_total = $this->model_design_layout->getTotalLayouts();
     $results = $this->model_design_layout->getLayouts($data);
     foreach ($results as $result) {
         $action = array();
         $action[] = array('text' => $this->language->get('text_edit'), 'href' => $this->url->link('design/layout/update', 'token=' . $this->session->data['token'] . '&layout_id=' . $result['layout_id'] . $url, 'SSL'));
         $this->data['layouts'][] = array('layout_id' => $result['layout_id'], 'name' => $result['name'], 'selected' => isset($this->request->post['selected']) && in_array($result['layout_id'], $this->request->post['selected']), 'action' => $action);
     }
     $this->data['heading_title'] = $this->language->get('heading_title');
     $this->data['text_no_results'] = $this->language->get('text_no_results');
     $this->data['column_name'] = $this->language->get('column_name');
     $this->data['column_action'] = $this->language->get('column_action');
     $this->data['button_insert'] = $this->language->get('button_insert');
     $this->data['button_delete'] = $this->language->get('button_delete');
     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 = '';
     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('design/layout', 'token=' . $this->session->data['token'] . '&sort=name' . $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 \Core\Pagination();
     $pagination->total = $layout_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->text = $this->language->get('text_pagination');
     $pagination->url = $this->url->link('design/layout', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $this->data['pagination'] = $pagination->render();
     $this->data['sort'] = $sort;
     $this->data['order'] = $order;
     $this->template = 'design/layout_list.phtml';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
Example #9
0
 protected function getList()
 {
     if (isset($this->request->get['sort'])) {
         $sort = $this->request->get['sort'];
     } else {
         $sort = 'create_date';
     }
     if (isset($this->request->get['order'])) {
         $order = $this->request->get['order'];
     } else {
         $order = 'DESC';
     }
     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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('marketing/newsletter/newsletter', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     $data['add'] = $this->url->link('marketing/newsletter/newsletter/add', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('marketing/newsletter/newsletter/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['newsletters'] = array();
     $filter_data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $newsletters_total = $this->model_marketing_newsletter->getTotalNewsletters($filter_data);
     $results = $this->model_marketing_newsletter->getNewsletters($filter_data);
     foreach ($results as $result) {
         $result['sends'] = $this->model_marketing_newsletter->getSendCount($result['newsletter_id']);
         $result['opens'] = $this->model_marketing_newsletter->getOpenCount($result['newsletter_id']);
         $result['unsubscribes'] = $this->model_marketing_newsletter->getUnsubscribeCount($result['newsletter_id']);
         $result['bounces'] = $this->model_marketing_newsletter->getBounceCount($result['newsletter_id']);
         $result['edit'] = $this->url->link('marketing/newsletter/newsletter/edit', 'token=' . $this->session->data['token'] . '&newsletter_id=' . $result['newsletter_id'] . $url, 'SSL');
         $result['send'] = $this->url->link('marketing/newsletter/send', 'token=' . $this->session->data['token'] . '&newsletter_id=' . $result['newsletter_id'] . $url, 'SSL');
         $result['stats'] = $this->url->link('marketing/newsletter/newsletter/stats', 'token=' . $this->session->data['token'] . '&newsletter_id=' . $result['newsletter_id'] . $url, 'SSL');
         $data['newsletters'][] = $result;
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_name'] = $this->language->get('column_name');
     $data['column_subject'] = $this->language->get('column_subject');
     $data['column_created'] = $this->language->get('column_created');
     $data['column_action'] = $this->language->get('column_action');
     $data['button_insert'] = $this->language->get('button_insert');
     $data['button_edit'] = $this->language->get('button_edit');
     $data['button_delete'] = $this->language->get('button_delete');
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['sort_date'] = $this->url->link('marketing/newsletter/newsletter', 'token=' . $this->session->data['token'] . '&sort=create_date' . $url, 'SSL');
     $data['sort_name'] = $this->url->link('marketing/newsletter/newsletter', 'token=' . $this->session->data['token'] . '&sort=name' . $url, 'SSL');
     $data['sort_subject'] = $this->url->link('marketing/newsletter/newsletter', 'token=' . $this->session->data['token'] . '&sort=subject' . $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 \Core\Pagination();
     $pagination->total = $newsletters_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('marketing/newsletter/newsletter', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $pagination->text = $this->language->get('text_pagination');
     $data['pagination'] = $pagination->render();
     $data['sort'] = $sort;
     $data['order'] = $order;
     $this->children = array('common/header', 'common/footer');
     $this->data = $data;
     $this->template = 'marketing/newsletter_list.phtml';
     $this->response->setOutput($this->render());
 }
Example #10
0
 protected function getList()
 {
     if (isset($this->request->get['filter_email'])) {
         $filter_email = $this->request->get['filter_email'];
     } else {
         $filter_email = null;
     }
     if (isset($this->request->get['filter_firstname'])) {
         $filter_firstname = $this->request->get['filter_firstname'];
     } else {
         $filter_firstname = null;
     }
     if (isset($this->request->get['filter_lastname'])) {
         $filter_lastname = $this->request->get['filter_lastname'];
     } else {
         $filter_lastname = null;
     }
     if (isset($this->request->get['filter_date_added'])) {
         $filter_date_added = $this->request->get['filter_date_added'];
     } else {
         $filter_date_added = null;
     }
     if (isset($this->request->get['sort'])) {
         $sort = $this->request->get['sort'];
     } else {
         $sort = 'date_created';
     }
     if (isset($this->request->get['order'])) {
         $order = $this->request->get['order'];
     } else {
         $order = 'DESC';
     }
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $url = '';
     if (isset($this->request->get['filter_email'])) {
         $url .= '&filter_email=' . urlencode(html_entity_decode($this->request->get['filter_email'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_firstname'])) {
         $url .= '&filter_firstname=' . urlencode(html_entity_decode($this->request->get['filter_firstname'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_lastname'])) {
         $url .= '&filter_lastname=' . urlencode(html_entity_decode($this->request->get['filter_lastname'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_date_added'])) {
         $url .= '&filter_date_added=' . $this->request->get['filter_date_added'];
     }
     if (isset($this->request->get['sort'])) {
         $url .= '&sort=' . $this->request->get['sort'];
     }
     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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('marketing/newsletter/subscriber', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     $data['add'] = $this->url->link('marketing/newsletter/subscriber/add', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('marketing/newsletter/subscriber/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['subscribers'] = array();
     $filter_data = array('filter_email' => $filter_email, 'filter_date_added' => $filter_date_added, 'filter_firstname' => $filter_firstname, 'filter_lastname' => $filter_lastname, 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $subscriber_total = $this->model_marketing_newsletter_subscriber->getTotalSubscribers($filter_data);
     $results = $this->model_marketing_newsletter_subscriber->getSubscribers($filter_data);
     foreach ($results as $result) {
         $result['opt_in'] = $result['unsubscribe_date'] ? $this->language->get('text_yes') : $this->language->get('text_no');
         $result['date_added'] = date($this->language->get('date_format_short'), strtotime($result['date_created']));
         $result['edit'] = $this->url->link('marketing/newsletter/subscriber/edit', 'token=' . $this->session->data['token'] . '&subscriber_id=' . $result['subscriber_id'] . $url, 'SSL');
         $result['sent'] = 0;
         $result['opened'] = 0;
         $result['bounced'] = 0;
         $data['subscribers'][] = $result;
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_groups'] = $this->language->get('column_groups');
     $data['column_campaigns'] = $this->language->get('column_campaigns');
     $data['column_sent'] = $this->language->get('column_sent');
     $data['column_opened'] = $this->language->get('column_opened');
     $data['column_bounced'] = $this->language->get('column_bounced');
     $data['column_firstname'] = $this->language->get('column_firstname');
     $data['column_lastname'] = $this->language->get('column_lastname');
     $data['column_email'] = $this->language->get('column_email');
     $data['column_ip'] = $this->language->get('column_ip');
     $data['column_opt_in'] = $this->language->get('column_opt_in');
     $data['column_date_added'] = $this->language->get('column_date_added');
     $data['column_action'] = $this->language->get('column_action');
     $data['entry_email'] = $this->language->get('entry_email');
     $data['entry_date_created'] = $this->language->get('entry_date_created');
     $data['button_add'] = $this->language->get('button_add');
     $data['button_edit'] = $this->language->get('button_edit');
     $data['button_delete'] = $this->language->get('button_delete');
     $data['button_filter'] = $this->language->get('button_filter');
     $data['token'] = $this->session->data['token'];
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     if (isset($this->request->get['filter_email'])) {
         $url .= '&filter_email=' . urlencode(html_entity_decode($this->request->get['filter_email'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_firstname'])) {
         $url .= '&filter_firstname=' . urlencode(html_entity_decode($this->request->get['filter_firstname'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_lastname'])) {
         $url .= '&filter_lastname=' . urlencode(html_entity_decode($this->request->get['filter_lastname'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_date_added'])) {
         $url .= '&filter_date_added=' . $this->request->get['filter_date_added'];
     }
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['sort_firstname'] = $this->url->link('marketing/newsletter/subscriber', 'token=' . $this->session->data['token'] . '&sort=firstname' . $url, 'SSL');
     $data['sort_lastname'] = $this->url->link('marketing/newsletter/subscriber', 'token=' . $this->session->data['token'] . '&sort=lastname' . $url, 'SSL');
     $data['sort_email'] = $this->url->link('marketing/newsletter/subscriber', 'token=' . $this->session->data['token'] . '&sort=email' . $url, 'SSL');
     $data['sort_ip'] = $this->url->link('marketing/newsletter/subscriber', 'token=' . $this->session->data['token'] . '&sort=ip_address' . $url, 'SSL');
     $data['sort_date_added'] = $this->url->link('marketing/newsletter/subscriber', 'token=' . $this->session->data['token'] . '&sort=date_created' . $url, 'SSL');
     $url = '';
     if (isset($this->request->get['filter_email'])) {
         $url .= '&filter_email=' . urlencode(html_entity_decode($this->request->get['filter_email'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_firstname'])) {
         $url .= '&filter_firstname=' . urlencode(html_entity_decode($this->request->get['filter_firstname'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_lastname'])) {
         $url .= '&filter_lastname=' . urlencode(html_entity_decode($this->request->get['filter_lastname'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_date_added'])) {
         $url .= '&filter_date_added=' . $this->request->get['filter_date_added'];
     }
     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 \Core\Pagination();
     $pagination->text = $this->language->get('text_pagination');
     $pagination->total = $subscriber_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('marketing/newsletter/subscriber', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['filter_email'] = $filter_email;
     $data['filter_date_added'] = $filter_date_added;
     $data['filter_firstname'] = $filter_firstname;
     $data['filter_lastname'] = $filter_lastname;
     $data['sort'] = $sort;
     $data['order'] = $order;
     $data['header'] = $this->getChild('common/header');
     $data['footer'] = $this->getChild('common/footer');
     $this->document->addScript('view/plugins/datetimepicker/moment.min.js');
     $this->document->addScript('view/plugins/datetimepicker/bootstrap-datetimepicker.min.js');
     $this->document->addStyle('view/plugins/datetimepicker/bootstrap-datetimepicker.min.css');
     $this->response->setOutput($this->render('marketing/newsletter/subscriber_list.phtml', $data));
 }
Example #11
0
 protected function getList()
 {
     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['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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('cms/banner', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     $data['insert'] = $this->url->link('cms/banner/add', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('cms/banner/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['banners'] = array();
     $filter_data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $banner_total = $this->model_cms_banner->getTotalBanners();
     $results = $this->model_cms_banner->getBanners($filter_data);
     foreach ($results as $result) {
         $data['banners'][] = array('banner_id' => $result['banner_id'], 'name' => $result['name'], 'status' => $result['status'] ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'edit' => $this->url->link('cms/banner/edit', 'token=' . $this->session->data['token'] . '&banner_id=' . $result['banner_id'] . $url, 'SSL'));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_name'] = $this->language->get('column_name');
     $data['column_status'] = $this->language->get('column_status');
     $data['column_action'] = $this->language->get('column_action');
     $data['button_insert'] = $this->language->get('button_insert');
     $data['button_edit'] = $this->language->get('button_edit');
     $data['button_delete'] = $this->language->get('button_delete');
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['sort_name'] = $this->url->link('cms/banner', 'token=' . $this->session->data['token'] . '&sort=name' . $url, 'SSL');
     $data['sort_status'] = $this->url->link('cms/banner', 'token=' . $this->session->data['token'] . '&sort=status' . $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 \Core\Pagination();
     $pagination->total = $banner_total;
     $pagination->page = $page;
     $pagination->text = $this->language->get('text_pagination');
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('cms/banner', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['results'] = sprintf($this->language->get('text_pagination'), $banner_total ? ($page - 1) * $this->config->get('config_limit_admin') + 1 : 0, ($page - 1) * $this->config->get('config_limit_admin') > $banner_total - $this->config->get('config_limit_admin') ? $banner_total : ($page - 1) * $this->config->get('config_limit_admin') + $this->config->get('config_limit_admin'), $banner_total, ceil($banner_total / $this->config->get('config_limit_admin')));
     $data['sort'] = $sort;
     $data['order'] = $order;
     $this->template = 'cms/banner_list.phtml';
     $this->data = $data;
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
Example #12
0
 protected function getList()
 {
     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['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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/modification', 'token=' . $this->session->data['token'], 'SSL'));
     $data['refresh'] = $this->url->link('extension/modification/refresh', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['clear'] = $this->url->link('extension/modification/clear', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('extension/modification/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['modifications'] = array();
     $filter_data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $modification_total = $this->model_extension_modification->getTotalModifications();
     $results = $this->model_extension_modification->getModifications($filter_data);
     foreach ($results as $result) {
         $data['modifications'][] = array('modification_id' => $result['modification_id'], 'name' => $result['name'], 'author' => $result['author'], 'version' => $result['version'], 'status' => $result['status'] ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'link' => $result['link'], 'enable' => $this->url->link('extension/modification/enable', 'token=' . $this->session->data['token'] . '&modification_id=' . $result['modification_id'], 'SSL'), 'disable' => $this->url->link('extension/modification/disable', 'token=' . $this->session->data['token'] . '&modification_id=' . $result['modification_id'], 'SSL'), 'enabled' => $result['status']);
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['text_refresh'] = $this->language->get('text_refresh');
     $data['column_name'] = $this->language->get('column_name');
     $data['column_author'] = $this->language->get('column_author');
     $data['column_version'] = $this->language->get('column_version');
     $data['column_status'] = $this->language->get('column_status');
     $data['column_date_added'] = $this->language->get('column_date_added');
     $data['column_action'] = $this->language->get('column_action');
     $data['button_refresh'] = $this->language->get('button_refresh');
     $data['button_clear'] = $this->language->get('button_clear');
     $data['button_delete'] = $this->language->get('button_delete');
     $data['button_link'] = $this->language->get('button_link');
     $data['button_enable'] = $this->language->get('button_enable');
     $data['button_disable'] = $this->language->get('button_disable');
     $data['tab_general'] = $this->language->get('tab_general');
     $data['tab_log'] = $this->language->get('tab_log');
     $data['token'] = $this->session->data['token'];
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['sort_name'] = $this->url->link('extension/modification', 'token=' . $this->session->data['token'] . '&sort=name' . $url, 'SSL');
     $data['sort_author'] = $this->url->link('extension/modification', 'token=' . $this->session->data['token'] . '&sort=author' . $url, 'SSL');
     $data['sort_version'] = $this->url->link('extension/version', 'token=' . $this->session->data['token'] . '&sort=author' . $url, 'SSL');
     $data['sort_status'] = $this->url->link('extension/modification', 'token=' . $this->session->data['token'] . '&sort=status' . $url, 'SSL');
     $data['sort_date_added'] = $this->url->link('extension/modification', 'token=' . $this->session->data['token'] . '&sort=date_added' . $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 \Core\Pagination();
     $pagination->total = $modification_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->text = $this->language->get('text_pagination');
     $pagination->url = $this->url->link('extension/modification', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['sort'] = $sort;
     $data['order'] = $order;
     // Log
     $file = DIR_LOGS . 'cmsmods.log';
     if (file_exists($file)) {
         $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null));
     } else {
         $data['log'] = '';
     }
     $data['clear_log'] = $this->url->link('extension/modification/clearlog', 'token=' . $this->session->data['token'], 'SSL');
     $this->data = $data;
     $this->template = 'extension/modification.phtml';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
     //  $this->response->setOutput($this->load->view('extension/modification.tpl', $data));
 }
Example #13
0
 protected function getList()
 {
     if (isset($this->request->get['sort'])) {
         $sort = $this->request->get['sort'];
     } else {
         $sort = 'cfd.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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('sale/custom_field', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     $data['add'] = $this->url->link('sale/custom_field/add', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('sale/custom_field/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['custom_fields'] = array();
     $filter_data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $custom_field_total = $this->model_sale_custom_field->getTotalCustomFields();
     $results = $this->model_sale_custom_field->getCustomFields($filter_data);
     foreach ($results as $result) {
         $type = '';
         switch ($result['type']) {
             case 'select':
                 $type = $this->language->get('text_select');
                 break;
             case 'radio':
                 $type = $this->language->get('text_radio');
                 break;
             case 'checkbox':
                 $type = $this->language->get('text_checkbox');
                 break;
             case 'input':
                 $type = $this->language->get('text_input');
                 break;
             case 'text':
                 $type = $this->language->get('text_text');
                 break;
             case 'textarea':
                 $type = $this->language->get('text_textarea');
                 break;
             case 'file':
                 $type = $this->language->get('text_file');
                 break;
             case 'date':
                 $type = $this->language->get('text_date');
                 break;
             case 'datetime':
                 $type = $this->language->get('text_datetime');
                 break;
             case 'time':
                 $type = $this->language->get('text_time');
                 break;
         }
         $data['custom_fields'][] = array('custom_field_id' => $result['custom_field_id'], 'name' => $result['name'], 'location' => $this->language->get('text_' . $result['location']), 'type' => $type, 'status' => $result['status'], 'sort_order' => $result['sort_order'], 'edit' => $this->url->link('sale/custom_field/edit', 'token=' . $this->session->data['token'] . '&custom_field_id=' . $result['custom_field_id'] . $url, 'SSL'));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_name'] = $this->language->get('column_name');
     $data['column_location'] = $this->language->get('column_location');
     $data['column_type'] = $this->language->get('column_type');
     $data['column_status'] = $this->language->get('column_status');
     $data['column_sort_order'] = $this->language->get('column_sort_order');
     $data['column_action'] = $this->language->get('column_action');
     $data['button_add'] = $this->language->get('button_add');
     $data['button_edit'] = $this->language->get('button_edit');
     $data['button_delete'] = $this->language->get('button_delete');
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['sort_name'] = $this->url->link('sale/custom_field', 'token=' . $this->session->data['token'] . '&sort=cfd.name' . $url, 'SSL');
     $data['sort_location'] = $this->url->link('sale/custom_field', 'token=' . $this->session->data['token'] . '&sort=cf.location' . $url, 'SSL');
     $data['sort_type'] = $this->url->link('sale/custom_field', 'token=' . $this->session->data['token'] . '&sort=cf.type' . $url, 'SSL');
     $data['sort_status'] = $this->url->link('sale/custom_field', 'token=' . $this->session->data['token'] . '&sort=cf.status' . $url, 'SSL');
     $data['sort_sort_order'] = $this->url->link('sale/custom_field', 'token=' . $this->session->data['token'] . '&sort=cf.sort_order' . $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 \Core\Pagination();
     $pagination->text = $this->language->get('text_pagination');
     $pagination->total = $custom_field_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('sale/custom_field', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['sort'] = $sort;
     $data['order'] = $order;
     $data['header'] = $this->getChild('common/header');
     $data['footer'] = $this->getChild('common/footer');
     $this->response->setOutput($this->render('sale/custom_field_list.phtml', $data));
 }
Example #14
0
 public function get_revisions()
 {
     $this->language->load('cms/page');
     $ams_page_id = $this->request->get['ams_page_id'];
     $page = isset($this->request->get['page']) ? $this->request->get['page'] : 1;
     $start = ($page - 1) * 20;
     $countq = $this->db->query("select count(*) as total from #__ams_revisions where ams_page_id = '" . (int) $ams_page_id . "'");
     $total = $countq->row['total'];
     $q = $this->db->query("select r.*, u.firstname, u.lastname from #__ams_revisions r left join #__user u on u.user_id = r.user_id where r.ams_page_id = '" . (int) $ams_page_id . "' order by r.ams_revision_id desc limit {$start}, 20");
     $this->data['histories'] = array();
     foreach ($q->rows as $row) {
         $row['author'] = $row['firstname'] . ' ' . $row['lastname'];
         $row['date_added'] = date("l dS F Y h:i:s A", $row['created']);
         $row['autosave'] = $row['autosave'] ? 'Yes' : 'No';
         if ($this->request->get['ams_page_id']) {
             $row['action'] = $this->url->link($this->_namespace . '/update', 'token=' . $this->session->data['token'] . '&ams_page_id=' . $this->request->get['ams_page_id'] . '&revision_id=' . $row['ams_revision_id'], 'SSL');
         } else {
             $row['action'] = $this->url->link($this->_namespace . '/insert', 'token=' . $this->session->data['token'] . '&revision_id=' . $row['ams_revision_id'], 'SSL');
         }
         $this->data['histories'][] = $row;
     }
     $pagination = new \Core\Pagination();
     $pagination->total = $total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link($this->_namespace . '/get_revisions', 'token=' . $this->session->data['token'] . '&ams_page_id=' . $this->request->get['ams_page_id'] . '&page={page}', 'SSL');
     $pagination->text = $this->language->get('text_pagination');
     $this->data['pagination'] = $pagination->render();
     $this->template = 'cms/partial/history.phtml';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
Example #15
0
 public function index()
 {
     $this->language->load('extension/faq');
     $this->load->model('extension/faq');
     $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', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/faq', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->error['warning'])) {
         $data['error'] = $this->error['warning'];
         unset($this->error['warning']);
     } else {
         $data['error'] = '';
     }
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     if (isset($this->request->get['filter_name'])) {
         $filter_name = $this->request->get['filter_name'];
         $data['filter_name'] = $this->request->get['filter_name'];
         //for template
     } else {
         $filter_name = null;
         $data['filter_name'] = '';
         //for template
     }
     if (isset($this->request->get['filter_date_added'])) {
         $filter_date_added = $this->request->get['filter_date_added'];
         $data['filter_date_added'] = $this->request->get['filter_date_added'];
         //for template
     } else {
         $filter_date_added = null;
         $data['filter_date_added'] = '';
         //for template
     }
     $url = '';
     $filter_data = array('filter_name' => $filter_name, 'filter_date_added' => $filter_date_added, 'page' => $page, 'limit' => $this->config->get('config_limit_admin'), 'start' => $this->config->get('config_limit_admin') * ($page - 1));
     $total = $this->model_extension_faq->getTotalfaq($filter_data);
     $pagination = new \Core\Pagination();
     $pagination->total = $total;
     $pagination->page = $page;
     $pagination->text = $this->language->get('text_pagination');
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('extension/faq', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['heading_title'] = $this->language->get('heading_title');
     $data['entry_name'] = $this->language->get('entry_name');
     $data['entry_date_added'] = $this->language->get('entry_date_added');
     $data['button_filter'] = $this->language->get('button_filter');
     $data['button_view_all_faq'] = $this->language->get('button_view_all_faq');
     $data['text_title'] = $this->language->get('text_title');
     $data['text_question'] = $this->language->get('text_question');
     $data['text_answer'] = $this->language->get('text_answer');
     $data['text_date'] = $this->language->get('text_date');
     $data['text_action'] = $this->language->get('text_action');
     $data['text_edit'] = $this->language->get('text_edit');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['button_add'] = $this->language->get('button_add');
     $data['button_delete'] = $this->language->get('button_delete');
     $data['token'] = $this->session->data['token'];
     $url = '';
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['add'] = $this->url->link('extension/faq/insert', '&token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('extension/faq/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['all_faq'] = array();
     $all_faq = $this->model_extension_faq->getAllfaq($filter_data);
     foreach ($all_faq as $faq) {
         $data['all_faq'][] = array('faq_id' => $faq['faq_id'], 'question' => $faq['question'], 'date_added' => date($this->language->get('date_format_short'), strtotime($faq['date_added'])), 'edit' => $this->url->link('extension/faq/edit', 'faq_id=' . $faq['faq_id'] . '&token=' . $this->session->data['token'] . $url, 'SSL'));
     }
     $data['header'] = $this->getChild('common/header');
     $data['footer'] = $this->getChild('common/footer');
     $this->document->addScript('view/plugins/datetimepicker/moment.min.js');
     $this->document->addScript('view/plugins/datetimepicker/bootstrap-datetimepicker.min.js');
     $this->document->addStyle('view/plugins/datetimepicker/bootstrap-datetimepicker.min.css');
     $this->document->addScript('//code.jquery.com/ui/1.11.4/jquery-ui.min.js');
     $this->response->setOutput($this->render('extension/faq_list.phtml', $data));
 }
Example #16
0
 public function comment()
 {
     $this->load->model('setting/rights');
     if (isset($this->request->get['page_id']) && $this->model_setting_rights->getRight($this->request->get['page_id'], 'ams_page')) {
         $this->load->language('cms/comment');
         $this->load->model('cms/comment');
         $data['text_no_reviews'] = $this->language->get('text_no_reviews');
         $data['button_place_comment'] = $this->language->get('button_place_comment');
         if (isset($this->request->get['page'])) {
             $page = $this->request->get['page'];
         } else {
             $page = 1;
         }
         $data['comments'] = array();
         $comment_total = $this->model_cms_comment->countComments($this->request->get['page_id']);
         $results = $this->model_cms_comment->getComments($this->request->get['page_id'], ($page - 1) * 5, 5);
         foreach ($results as $result) {
             $data['comments'][] = array('author' => $result['author'], 'text' => nl2br($result['text']), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])));
         }
         $pagination = new \Core\Pagination();
         $pagination->total = $comment_total;
         $pagination->page = $page;
         $pagination->limit = 5;
         $pagination->url = $this->url->link('cms/page/comment', 'page_id=' . $this->request->get['page_id'] . '&page={page}');
         $this->text = $this->language->get('text_pagination');
         $data['pagination'] = $pagination->render();
         $this->data = $data;
         $this->template = 'cms/comments.phtml';
         $this->response->setOutput($this->render());
     }
 }
Example #17
0
 protected function getList()
 {
     if (isset($this->request->get['sort'])) {
         $sort = $this->request->get['sort'];
     } else {
         $sort = 'ip';
     }
     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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('sale/customer_ban_ip', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     $data['insert'] = $this->url->link('sale/customer_ban_ip/add', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('sale/customer_ban_ip/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['customer_ban_ips'] = array();
     $filter_data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $customer_ban_ip_total = $this->model_sale_customer_ban_ip->getTotalCustomerBanIps($filter_data);
     $results = $this->model_sale_customer_ban_ip->getCustomerBanIps($filter_data);
     foreach ($results as $result) {
         $data['customer_ban_ips'][] = array('customer_ban_ip_id' => $result['customer_ban_ip_id'], 'ip' => $result['ip'], 'total' => $result['total'], 'customer' => $this->url->link('sale/customer', 'token=' . $this->session->data['token'] . '&filter_ip=' . $result['ip'], 'SSL'), 'edit' => $this->url->link('sale/customer_ban_ip/edit', 'token=' . $this->session->data['token'] . '&customer_ban_ip_id=' . $result['customer_ban_ip_id'] . $url, 'SSL'));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_ip'] = $this->language->get('column_ip');
     $data['column_customer'] = $this->language->get('column_customer');
     $data['column_action'] = $this->language->get('column_action');
     $data['button_insert'] = $this->language->get('button_insert');
     $data['button_edit'] = $this->language->get('button_edit');
     $data['button_delete'] = $this->language->get('button_delete');
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['sort_ip'] = $this->url->link('sale/customer_ban_ip', 'token=' . $this->session->data['token'] . '&sort=ip' . $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 \Core\Pagination();
     $pagination->total = $customer_ban_ip_total;
     $pagination->page = $page;
     $pagination->text = $this->language->get('text_pagination');
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('sale/customer_ban_ip', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['sort'] = $sort;
     $data['order'] = $order;
     $this->children = array('common/header', 'common/footer');
     $this->data = $data;
     $this->template = 'sale/customer_ban_ip_list.phtml';
     $this->response->setOutput($this->render());
 }
Example #18
0
 protected function getList()
 {
     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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('marketing/newsletter/group', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     $data['add'] = $this->url->link('marketing/newsletter/group/add', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('marketing/newsletter/group/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['groups'] = array();
     $filter_data = array('start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $groups_total = $this->model_marketing_newsletter_group->getTotalGroups();
     $results = $this->model_marketing_newsletter_group->getGroups($filter_data);
     foreach ($results as $result) {
         $result['group_name'] = html_entity_decode($result['group_name'], ENT_QUOTES, "UTF-8");
         $result['public'] = $result['public'] ? $this->language->get('text_yes') : $this->language->get('text_no');
         $result['edit'] = $this->url->link('marketing/newsletter/group/edit', 'token=' . $this->session->data['token'] . '&group_id=' . $result['group_id'] . $url, 'SSL');
         $result['member_count'] = $this->model_marketing_newsletter_group->getSubscriberCount($result['group_id']);
         $data['groups'][] = $result;
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_group_name'] = $this->language->get('column_group_name');
     $data['column_public'] = $this->language->get('column_public');
     $data['column_action'] = $this->language->get('column_action');
     $data['button_add'] = $this->language->get('button_add');
     $data['button_edit'] = $this->language->get('button_edit');
     $data['button_delete'] = $this->language->get('button_delete');
     $data['token'] = $this->session->data['token'];
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     $pagination = new \Core\Pagination();
     $pagination->text = $this->language->get('text_pagination');
     $pagination->total = $groups_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('marketing/newsletter/group', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['header'] = $this->getChild('common/header');
     $data['footer'] = $this->getChild('common/footer');
     $this->response->setOutput($this->render('marketing/newsletter/group_list.phtml', $data));
 }
Example #19
0
 protected function getList()
 {
     if (isset($this->request->get['filter_page'])) {
         $filter_page = $this->request->get['filter_page'];
     } else {
         $filter_page = null;
     }
     if (isset($this->request->get['filter_author'])) {
         $filter_author = $this->request->get['filter_author'];
     } else {
         $filter_author = null;
     }
     if (isset($this->request->get['filter_status'])) {
         $filter_status = $this->request->get['filter_status'];
     } else {
         $filter_status = null;
     }
     if (isset($this->request->get['filter_date_added'])) {
         $filter_date_added = $this->request->get['filter_date_added'];
     } else {
         $filter_date_added = null;
     }
     if (isset($this->request->get['sort'])) {
         $sort = $this->request->get['sort'];
     } else {
         $sort = 'r.date_added';
     }
     if (isset($this->request->get['order'])) {
         $order = $this->request->get['order'];
     } else {
         $order = 'DESC';
     }
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $url = '';
     if (isset($this->request->get['filter_page'])) {
         $url .= '&filter_page=' . urlencode(html_entity_decode($this->request->get['filter_page'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_author'])) {
         $url .= '&filter_author=' . urlencode(html_entity_decode($this->request->get['filter_author'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_status'])) {
         $url .= '&filter_status=' . $this->request->get['filter_status'];
     }
     if (isset($this->request->get['filter_date_added'])) {
         $url .= '&filter_date_added=' . $this->request->get['filter_date_added'];
     }
     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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('cms/comment', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     $data['add'] = $this->url->link('cms/comment/add', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['delete'] = $this->url->link('cms/comment/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['comments'] = array();
     $filter_data = array('filter_page' => $filter_page, 'filter_author' => $filter_author, 'filter_status' => $filter_status, 'filter_date_added' => $filter_date_added, 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $comment_total = $this->model_cms_comment->getTotalComments($filter_data);
     $results = $this->model_cms_comment->getComments($filter_data);
     foreach ($results as $result) {
         $data['comments'][] = array('comment_id' => $result['comment_id'], 'name' => html_entity_decode($result['name']), 'author' => $result['author'], 'rating' => $result['rating'], 'status' => $result['status'] ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'edit' => $this->url->link('cms/comment/edit', 'token=' . $this->session->data['token'] . '&comment_id=' . $result['comment_id'] . $url, 'SSL'));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['text_enabled'] = $this->language->get('text_enabled');
     $data['text_disabled'] = $this->language->get('text_disabled');
     $data['column_page'] = $this->language->get('column_page');
     $data['column_author'] = $this->language->get('column_author');
     $data['column_rating'] = $this->language->get('column_rating');
     $data['column_status'] = $this->language->get('column_status');
     $data['column_date_added'] = $this->language->get('column_date_added');
     $data['column_action'] = $this->language->get('column_action');
     $data['entry_page'] = $this->language->get('entry_page');
     $data['entry_author'] = $this->language->get('entry_author');
     $data['entry_rating'] = $this->language->get('entry_rating');
     $data['entry_status'] = $this->language->get('entry_status');
     $data['entry_date_added'] = $this->language->get('entry_date_added');
     $data['button_add'] = $this->language->get('button_add');
     $data['button_edit'] = $this->language->get('button_edit');
     $data['button_delete'] = $this->language->get('button_delete');
     $data['button_filter'] = $this->language->get('button_filter');
     $data['token'] = $this->session->data['token'];
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['sort_page'] = $this->url->link('cms/comment', 'token=' . $this->session->data['token'] . '&sort=id.name' . $url, 'SSL');
     $data['sort_author'] = $this->url->link('cms/comment', 'token=' . $this->session->data['token'] . '&sort=r.author' . $url, 'SSL');
     $data['sort_rating'] = $this->url->link('cms/comment', 'token=' . $this->session->data['token'] . '&sort=r.rating' . $url, 'SSL');
     $data['sort_status'] = $this->url->link('cms/comment', 'token=' . $this->session->data['token'] . '&sort=r.status' . $url, 'SSL');
     $data['sort_date_added'] = $this->url->link('cms/comment', 'token=' . $this->session->data['token'] . '&sort=r.date_added' . $url, 'SSL');
     $url = '';
     if (isset($this->request->get['filter_page'])) {
         $url .= '&filter_page=' . urlencode(html_entity_decode($this->request->get['filter_page'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_author'])) {
         $url .= '&filter_author=' . urlencode(html_entity_decode($this->request->get['filter_author'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_status'])) {
         $url .= '&filter_status=' . $this->request->get['filter_status'];
     }
     if (isset($this->request->get['filter_date_added'])) {
         $url .= '&filter_date_added=' . $this->request->get['filter_date_added'];
     }
     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 \Core\Pagination();
     $pagination->total = $comment_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('cms/comment', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $pagination->text = $this->language->get('text_pagination');
     $data['pagination'] = $pagination->render();
     $data['filter_page'] = $filter_page;
     $data['filter_author'] = $filter_author;
     $data['filter_status'] = $filter_status;
     $data['filter_date_added'] = $filter_date_added;
     $data['sort'] = $sort;
     $data['order'] = $order;
     $this->document->addScript('view/plugins/datetimepicker/moment.min.js');
     $this->document->addScript('view/plugins/datetimepicker/bootstrap-datetimepicker.min.js');
     $this->document->addStyle('view/plugins/datetimepicker/bootstrap-datetimepicker.min.css');
     $this->document->addScript('//code.jquery.com/ui/1.11.4/jquery-ui.min.js');
     $this->data = $data;
     $this->template = 'cms/comment_list.phtml';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
Example #20
0
 protected function getList()
 {
     $this->document->addScript('view/plugins/datetimepicker/moment.min.js');
     $this->document->addScript('view/plugins/datetimepicker/bootstrap-datetimepicker.min.js');
     $this->document->addStyle('view/plugins/datetimepicker/bootstrap-datetimepicker.min.css');
     if (isset($this->request->get['filter_name'])) {
         $filter_name = $this->request->get['filter_name'];
     } else {
         $filter_name = null;
     }
     if (isset($this->request->get['filter_date_added'])) {
         $filter_date_added = $this->request->get['filter_date_added'];
     } else {
         $filter_date_added = null;
     }
     if (isset($this->request->get['sort'])) {
         $sort = $this->request->get['sort'];
     } else {
         $sort = 'date_added';
     }
     if (isset($this->request->get['order'])) {
         $order = $this->request->get['order'];
     } else {
         $order = 'DESC';
     }
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $url = '';
     if (isset($this->request->get['filter_name'])) {
         $url .= '&filter_name=' . urlencode(html_entity_decode($this->request->get['filter_name'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_date_added'])) {
         $url .= '&filter_date_added=' . $this->request->get['filter_date_added'];
     }
     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'];
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('tool/upload', 'token=' . $this->session->data['token'] . $url, 'SSL'));
     $data['delete'] = $this->url->link('tool/upload/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $data['uploads'] = array();
     $filter_data = array('filter_name' => $filter_name, 'filter_date_added' => $filter_date_added, 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_limit_admin'), 'limit' => $this->config->get('config_limit_admin'));
     $upload_total = $this->model_tool_upload->getTotalUploads($filter_data);
     $results = $this->model_tool_upload->getUploads($filter_data);
     foreach ($results as $result) {
         $data['uploads'][] = array('upload_id' => $result['upload_id'], 'name' => $result['name'], 'filename' => $result['filename'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'download' => $this->url->link('tool/upload/download', 'token=' . $this->session->data['token'] . '&code=' . $result['code'] . $url, 'SSL'));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_list'] = $this->language->get('text_list');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['column_name'] = $this->language->get('column_name');
     $data['column_filename'] = $this->language->get('column_filename');
     $data['column_date_added'] = $this->language->get('column_date_added');
     $data['column_action'] = $this->language->get('column_action');
     $data['entry_name'] = $this->language->get('entry_name');
     $data['entry_date_added'] = $this->language->get('entry_date_added');
     $data['button_download'] = $this->language->get('button_download');
     $data['button_delete'] = $this->language->get('button_delete');
     $data['button_filter'] = $this->language->get('button_filter');
     $data['token'] = $this->session->data['token'];
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     if (isset($this->request->post['selected'])) {
         $data['selected'] = (array) $this->request->post['selected'];
     } else {
         $data['selected'] = array();
     }
     $url = '';
     if ($order == 'ASC') {
         $url .= '&order=DESC';
     } else {
         $url .= '&order=ASC';
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $data['sort_name'] = $this->url->link('tool/upload', 'token=' . $this->session->data['token'] . '&sort=name' . $url, 'SSL');
     $data['sort_filename'] = $this->url->link('tool/upload', 'token=' . $this->session->data['token'] . '&sort=filename' . $url, 'SSL');
     $data['sort_date_added'] = $this->url->link('tool/upload', 'token=' . $this->session->data['token'] . '&sort=date_added' . $url, 'SSL');
     $url = '';
     if (isset($this->request->get['filter_name'])) {
         $url .= '&filter_name=' . urlencode(html_entity_decode($this->request->get['filter_name'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_date_added'])) {
         $url .= '&filter_date_added=' . $this->request->get['filter_date_added'];
     }
     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 \Core\Pagination();
     $pagination->text = $this->language->get('text_pagination');
     $pagination->total = $upload_total;
     $pagination->page = $page;
     $pagination->limit = $this->config->get('config_limit_admin');
     $pagination->url = $this->url->link('tool/upload', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $data['results'] = sprintf($this->language->get('text_pagination'), $upload_total ? ($page - 1) * $this->config->get('config_limit_admin') + 1 : 0, ($page - 1) * $this->config->get('config_limit_admin') > $upload_total - $this->config->get('config_limit_admin') ? $upload_total : ($page - 1) * $this->config->get('config_limit_admin') + $this->config->get('config_limit_admin'), $upload_total, ceil($upload_total / $this->config->get('config_limit_admin')));
     $data['filter_name'] = $filter_name;
     $data['filter_date_added'] = $filter_date_added;
     $data['sort'] = $sort;
     $data['order'] = $order;
     $data['header'] = $this->getChild('common/header');
     $data['footer'] = $this->getChild('common/footer');
     $this->response->setOutput($this->render('tool/upload.phtml', $data));
 }
Example #21
0
 public function index()
 {
     $this->load->language('common/filemanager');
     if (isset($this->request->get['ckeditor'])) {
         $this->data['ckeditor'] = $this->request->get['ckeditor'];
     } else {
         $this->data['ckeditor'] = false;
     }
     if (isset($this->request->get['filter_name'])) {
         $filter_name = rtrim(str_replace(array('../', '..\\', '..', '*'), '', $this->request->get['filter_name']), '/');
     } else {
         $filter_name = null;
     }
     // Make sure we have the correct directory
     if (isset($this->request->get['directory'])) {
         $directory = rtrim(DIR_IMAGE . 'uploads/' . str_replace(array('../', '..\\', '..'), '', $this->request->get['directory']), '/');
     } else {
         $directory = DIR_IMAGE . 'uploads';
     }
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $data['images'] = array();
     $this->load->model('tool/image');
     // Get directories
     $directories = glob($directory . '/' . $filter_name . '*', GLOB_ONLYDIR);
     if (!$directories) {
         $directories = array();
     }
     // Get files
     $files = glob($directory . '/' . $filter_name . '*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}', GLOB_BRACE);
     if (!$files) {
         $files = array();
     }
     // Merge directories and files
     $images = array_merge($directories, $files);
     // Get total number of files and directories
     $image_total = count($images);
     // Split the array based on current page number and max number of items per page of 10
     $images = array_splice($images, ($page - 1) * 16, 16);
     foreach ($images as $image) {
         $name = basename($image);
         if (is_dir($image)) {
             $url = '';
             if (isset($this->request->get['target'])) {
                 $url .= '&target=' . $this->request->get['target'];
             }
             if (isset($this->request->get['thumb'])) {
                 $url .= '&thumb=' . $this->request->get['thumb'];
             }
             if (isset($this->request->get['ckeditor'])) {
                 $url .= '&ckeditor=' . $this->request->get['ckeditor'];
             }
             $data['images'][] = array('thumb' => '', 'name' => $name, 'type' => 'directory', 'path' => utf8_substr($image, utf8_strlen(DIR_IMAGE)), 'href' => $this->url->link('common/filemanager', 'token=' . $this->session->data['token'] . '&directory=' . urlencode(utf8_substr($image, utf8_strlen(DIR_IMAGE . 'uploads/'))) . $url, 'SSL'));
         } elseif (is_file($image)) {
             // Find which protocol to use to pass the full image link back
             /*  if ($this->request->server['HTTPS']) {
                     $server = HTTPS_CATALOG;
                 } else {
                     $server = HTTP_CATALOG;
                 }*/
             if (isset($this->request->server['HTTPS']) && ($this->request->server['HTTPS'] == 'on' || $this->request->server['HTTPS'] == '1')) {
                 $server = HTTPS_CATALOG;
             } else {
                 $server = HTTP_CATALOG;
             }
             $data['images'][] = array('thumb' => $this->model_tool_image->resizeExact(utf8_substr($image, utf8_strlen(DIR_IMAGE)), 100, 100), 'name' => $name, 'type' => 'image', 'path' => utf8_substr($image, utf8_strlen(DIR_IMAGE)), 'href' => $server . 'img/' . utf8_substr($image, utf8_strlen(DIR_IMAGE)));
         }
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_no_results'] = $this->language->get('text_no_results');
     $data['text_confirm'] = $this->language->get('text_confirm');
     $data['entry_search'] = $this->language->get('entry_search');
     $data['entry_folder'] = $this->language->get('entry_folder');
     $data['button_parent'] = $this->language->get('button_parent');
     $data['button_refresh'] = $this->language->get('button_refresh');
     $data['button_upload'] = $this->language->get('button_upload');
     $data['button_folder'] = $this->language->get('button_folder');
     $data['button_delete'] = $this->language->get('button_delete');
     $data['button_search'] = $this->language->get('button_search');
     $data['token'] = $this->session->data['token'];
     if (isset($this->request->get['directory'])) {
         $data['directory'] = urlencode($this->request->get['directory']);
     } else {
         $data['directory'] = '';
     }
     if (isset($this->request->get['filter_name'])) {
         $data['filter_name'] = $this->request->get['filter_name'];
     } else {
         $data['filter_name'] = '';
     }
     // Return the target ID for the file manager to set the value
     if (isset($this->request->get['target'])) {
         $data['target'] = $this->request->get['target'];
     } else {
         $data['target'] = '';
     }
     if (isset($this->request->get['ckeditor'])) {
         $data['ckeditor'] = $this->request->get['ckeditor'];
     } else {
         $data['ckeditor'] = '';
     }
     // Return the thumbnail for the file manager to show a thumbnail
     if (isset($this->request->get['thumb'])) {
         $data['thumb'] = $this->request->get['thumb'];
     } else {
         $data['thumb'] = '';
     }
     // Parent
     $url = '';
     if (isset($this->request->get['directory'])) {
         $pos = strrpos($this->request->get['directory'], '/');
         if ($pos) {
             $url .= '&directory=' . urlencode(substr($this->request->get['directory'], 0, $pos));
         }
     }
     if (isset($this->request->get['target'])) {
         $url .= '&target=' . $this->request->get['target'];
     }
     if (isset($this->request->get['thumb'])) {
         $url .= '&thumb=' . $this->request->get['thumb'];
     }
     if (isset($this->request->get['ckeditor'])) {
         $url .= '&ckeditor=' . $this->request->get['ckeditor'];
     }
     $data['parent'] = $this->url->link('common/filemanager', 'token=' . $this->session->data['token'] . $url, 'SSL');
     // Refresh
     $url = '';
     if (isset($this->request->get['directory'])) {
         $url .= '&directory=' . urlencode($this->request->get['directory']);
     }
     if (isset($this->request->get['target'])) {
         $url .= '&target=' . $this->request->get['target'];
     }
     if (isset($this->request->get['thumb'])) {
         $url .= '&thumb=' . $this->request->get['thumb'];
     }
     if (isset($this->request->get['ckeditor'])) {
         $url .= '&ckeditor=' . $this->request->get['ckeditor'];
     }
     $data['refresh'] = $this->url->link('common/filemanager', 'token=' . $this->session->data['token'] . $url, 'SSL');
     $url = '';
     if (isset($this->request->get['directory'])) {
         $url .= '&directory=' . urlencode(html_entity_decode($this->request->get['directory'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['filter_name'])) {
         $url .= '&filter_name=' . urlencode(html_entity_decode($this->request->get['filter_name'], ENT_QUOTES, 'UTF-8'));
     }
     if (isset($this->request->get['target'])) {
         $url .= '&target=' . $this->request->get['target'];
     }
     if (isset($this->request->get['thumb'])) {
         $url .= '&thumb=' . $this->request->get['thumb'];
     }
     if (isset($this->request->get['ckeditor'])) {
         $url .= '&ckeditor=' . $this->request->get['ckeditor'];
     }
     $pagination = new \Core\Pagination();
     $pagination->total = $image_total;
     $pagination->page = $page;
     $pagination->limit = 16;
     $pagination->url = $this->url->link('common/filemanager', 'token=' . $this->session->data['token'] . $url . '&page={page}', 'SSL');
     $data['pagination'] = $pagination->render();
     $this->data = $data;
     $this->template = 'common/filemanager.phtml';
     $this->response->setOutput($this->render());
 }