dench1k

add project files

Showing 1000 changed files with 5055 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

.idea/
system/cache/*
system/storage/cache/*
/config_db.php
/config.php
/admin/config.php
*.log
admin/price/*
image/cache/*
/.htaccess
robots.txt
\ No newline at end of file
<?php
// HTTP
define('HTTP_SERVER', 'http://' . $_SERVER['HTTP_HOST'] . '/admin/');
define('HTTP_CATALOG', 'http://' . $_SERVER['HTTP_HOST'] . '/');
// HTTPS
define('HTTPS_SERVER', 'http://' . $_SERVER['HTTP_HOST'] . '/admin/');
define('HTTPS_CATALOG', 'http://' . $_SERVER['HTTP_HOST'] . '/');
// DIR
define('DIR_APPLICATION', $_SERVER['DOCUMENT_ROOT'] . '/admin/');
define('DIR_SYSTEM', $_SERVER['DOCUMENT_ROOT'] . '/system/');
define('DIR_IMAGE', $_SERVER['DOCUMENT_ROOT'] . '/image/');
define('DIR_LANGUAGE', $_SERVER['DOCUMENT_ROOT'] . '/admin/language/');
define('DIR_TEMPLATE', $_SERVER['DOCUMENT_ROOT'] . '/admin/view/template/');
define('DIR_CONFIG', $_SERVER['DOCUMENT_ROOT'] . '/system/config/');
define('DIR_CACHE', $_SERVER['DOCUMENT_ROOT'] . '/system/storage/cache/');
define('DIR_DOWNLOAD', $_SERVER['DOCUMENT_ROOT'] . '/system/storage/download/');
define('DIR_LOGS', $_SERVER['DOCUMENT_ROOT'] . '/system/storage/logs/');
define('DIR_MODIFICATION', $_SERVER['DOCUMENT_ROOT'] . '/system/storage/modification/');
define('DIR_UPLOAD', $_SERVER['DOCUMENT_ROOT'] . '/system/storage/upload/');
define('DIR_CATALOG', $_SERVER['DOCUMENT_ROOT'] . '/catalog/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', '');
define('DB_PASSWORD', '');
define('DB_DATABASE', '');
define('DB_PORT', '3306');
define('DB_PREFIX', '');
<?php
class ControllerAnalyticsGoogleAnalytics extends Controller {
private $error = array();
public function index() {
$this->load->language('analytics/google_analytics');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('google_analytics', $this->request->post, $this->request->get['store_id']);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/analytics', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['text_signup'] = $this->language->get('text_signup');
$data['entry_code'] = $this->language->get('entry_code');
$data['entry_status'] = $this->language->get('entry_status');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
if (isset($this->error['code'])) {
$data['error_code'] = $this->error['code'];
} else {
$data['error_code'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_analytics'),
'href' => $this->url->link('extension/analytics', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('analytics/google_analytics', 'token=' . $this->session->data['token'], true)
);
$data['action'] = $this->url->link('analytics/google_analytics', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/analytics', 'token=' . $this->session->data['token'], true);
$data['token'] = $this->session->data['token'];
if (isset($this->request->post['google_analytics_code'])) {
$data['google_analytics_code'] = $this->request->post['google_analytics_code'];
} else {
$data['google_analytics_code'] = $this->config->get('google_analytics_code');
}
if (isset($this->request->post['google_analytics_status'])) {
$data['google_analytics_status'] = $this->request->post['google_analytics_status'];
} else {
$data['google_analytics_status'] = $this->config->get('google_analytics_status');
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('analytics/google_analytics', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'analytics/google_analytics')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if (!$this->request->post['google_analytics_code']) {
$this->error['code'] = $this->language->get('error_code');
}
return !$this->error;
}
}
<?php
class ControllerCaptchaBasicCaptcha extends Controller {
private $error = array();
public function index() {
$this->load->language('captcha/basic_captcha');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('basic_captcha', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/captcha', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['entry_status'] = $this->language->get('entry_status');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_captcha'),
'href' => $this->url->link('extension/captcha', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('captcha/basic_captcha', 'token=' . $this->session->data['token'], true)
);
$data['action'] = $this->url->link('captcha/basic_captcha', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/captcha', 'token=' . $this->session->data['token'], true);
if (isset($this->request->post['basic_captcha_status'])) {
$data['basic_captcha_status'] = $this->request->post['basic_captcha_status'];
} else {
$data['basic_captcha_status'] = $this->config->get('basic_captcha_status');
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('captcha/basic_captcha', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'captcha/basic_captcha')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
<?php
class ControllerCaptchaGoogleCaptcha extends Controller {
private $error = array();
public function index() {
$this->load->language('captcha/google_captcha');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('google_captcha', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/captcha', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['text_signup'] = $this->language->get('text_signup');
$data['entry_key'] = $this->language->get('entry_key');
$data['entry_secret'] = $this->language->get('entry_secret');
$data['entry_status'] = $this->language->get('entry_status');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
if (isset($this->error['key'])) {
$data['error_key'] = $this->error['key'];
} else {
$data['error_key'] = '';
}
if (isset($this->error['secret'])) {
$data['error_secret'] = $this->error['secret'];
} else {
$data['error_secret'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_captcha'),
'href' => $this->url->link('extension/captcha', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('captcha/google_captcha', 'token=' . $this->session->data['token'], true)
);
$data['action'] = $this->url->link('captcha/google_captcha', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/captcha', 'token=' . $this->session->data['token'], true);
if (isset($this->request->post['google_captcha_key'])) {
$data['google_captcha_key'] = $this->request->post['google_captcha_key'];
} else {
$data['google_captcha_key'] = $this->config->get('google_captcha_key');
}
if (isset($this->request->post['google_captcha_secret'])) {
$data['google_captcha_secret'] = $this->request->post['google_captcha_secret'];
} else {
$data['google_captcha_secret'] = $this->config->get('google_captcha_secret');
}
if (isset($this->request->post['google_captcha_status'])) {
$data['google_captcha_status'] = $this->request->post['google_captcha_status'];
} else {
$data['google_captcha_status'] = $this->config->get('google_captcha_status');
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('captcha/google_captcha', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'captcha/google_captcha')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if (!$this->request->post['google_captcha_key']) {
$this->error['key'] = $this->language->get('error_key');
}
if (!$this->request->post['google_captcha_secret']) {
$this->error['secret'] = $this->language->get('error_secret');
}
return !$this->error;
}
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
<?php
class ControllerCommonColumnLeft extends Controller {
public function index() {
if (isset($this->request->get['token']) && isset($this->session->data['token']) && ($this->request->get['token'] == $this->session->data['token'])) {
$data['profile'] = $this->load->controller('common/profile');
$data['menu'] = $this->load->controller('common/menu');
$data['stats'] = $this->load->controller('common/stats');
return $this->load->view('common/column_left', $data);
}
}
}
\ No newline at end of file
<?php
class ControllerCommonDashboard extends Controller {
public function index() {
$this->load->language('common/dashboard');
$this->document->setTitle($this->language->get('heading_title'));
$data['heading_title'] = $this->language->get('heading_title');
$data['text_sale'] = $this->language->get('text_sale');
$data['text_map'] = $this->language->get('text_map');
$data['text_activity'] = $this->language->get('text_activity');
$data['text_recent'] = $this->language->get('text_recent');
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
// Check install directory exists
if (is_dir(dirname(DIR_APPLICATION) . '/install')) {
$data['error_install'] = $this->language->get('error_install');
} else {
$data['error_install'] = '';
}
$data['token'] = $this->session->data['token'];
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['order'] = $this->load->controller('dashboard/order');
$data['sale'] = $this->load->controller('dashboard/sale');
$data['customer'] = $this->load->controller('dashboard/customer');
$data['online'] = $this->load->controller('dashboard/online');
$data['map'] = $this->load->controller('dashboard/map');
$data['chart'] = $this->load->controller('dashboard/chart');
$data['activity'] = $this->load->controller('dashboard/activity');
$data['recent'] = $this->load->controller('dashboard/recent');
$data['footer'] = $this->load->controller('common/footer');
// Run currency update
if ($this->config->get('config_currency_auto')) {
$this->load->model('localisation/currency');
$this->model_localisation_currency->refresh();
}
$this->response->setOutput($this->load->view('common/dashboard', $data));
}
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
<?php
class ControllerCommonFooter extends Controller {
public function index() {
$this->load->language('common/footer');
$data['text_footer'] = $this->language->get('text_footer');
if ($this->user->isLogged() && isset($this->request->get['token']) && ($this->request->get['token'] == $this->session->data['token'])) {
$data['text_version'] = sprintf($this->language->get('text_version'), VERSION);
} else {
$data['text_version'] = '';
}
return $this->load->view('common/footer', $data);
}
}
<?php
class ControllerCommonForgotten extends Controller {
private $error = array();
public function index() {
if ($this->user->isLogged() && isset($this->request->get['token']) && ($this->request->get['token'] == $this->session->data['token'])) {
$this->response->redirect($this->url->link('common/dashboard', '', true));
}
if (!$this->config->get('config_password')) {
$this->response->redirect($this->url->link('common/login', '', true));
}
$this->load->language('common/forgotten');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('user/user');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->load->language('mail/forgotten');
$code = token(40);
$this->model_user_user->editCode($this->request->post['email'], $code);
$subject = sprintf($this->language->get('text_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'));
$message = sprintf($this->language->get('text_greeting'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8')) . "\n\n";
$message .= $this->language->get('text_change') . "\n\n";
$message .= $this->url->link('common/reset', 'code=' . $code, true) . "\n\n";
$message .= sprintf($this->language->get('text_ip'), $this->request->server['REMOTE_ADDR']) . "\n\n";
$mail = new Mail();
$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
$mail->smtp_username = $this->config->get('config_mail_smtp_username');
$mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
$mail->smtp_port = $this->config->get('config_mail_smtp_port');
$mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');
$mail->setTo($this->request->post['email']);
$mail->setFrom($this->config->get('config_email'));
$mail->setSender(html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'));
$mail->setSubject(html_entity_decode($subject, ENT_QUOTES, 'UTF-8'));
$mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
$mail->send();
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('common/login', '', true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_your_email'] = $this->language->get('text_your_email');
$data['text_email'] = $this->language->get('text_email');
$data['entry_email'] = $this->language->get('entry_email');
$data['button_reset'] = $this->language->get('button_reset');
$data['button_cancel'] = $this->language->get('button_cancel');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', '', true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('common/forgotten', 'token=' . '', true)
);
$data['action'] = $this->url->link('common/forgotten', '', true);
$data['cancel'] = $this->url->link('common/login', '', true);
if (isset($this->request->post['email'])) {
$data['email'] = $this->request->post['email'];
} else {
$data['email'] = '';
}
$data['header'] = $this->load->controller('common/header');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('common/forgotten', $data));
}
protected function validate() {
if (!isset($this->request->post['email'])) {
$this->error['warning'] = $this->language->get('error_email');
} elseif (!$this->model_user_user->getTotalUsersByEmail($this->request->post['email'])) {
$this->error['warning'] = $this->language->get('error_email');
}
return !$this->error;
}
}
<?php
class ControllerCommonHeader extends Controller {
public function index() {
$data['title'] = $this->document->getTitle();
if ($this->request->server['HTTPS']) {
$data['base'] = HTTPS_SERVER;
} else {
$data['base'] = HTTP_SERVER;
}
$data['description'] = $this->document->getDescription();
$data['keywords'] = $this->document->getKeywords();
$data['links'] = $this->document->getLinks();
$data['styles'] = $this->document->getStyles();
$data['scripts'] = $this->document->getScripts();
$data['lang'] = $this->language->get('code');
$data['direction'] = $this->language->get('direction');
$this->load->language('common/header');
$data['heading_title'] = $this->language->get('heading_title');
$data['text_order'] = $this->language->get('text_order');
$data['text_processing_status'] = $this->language->get('text_processing_status');
$data['text_complete_status'] = $this->language->get('text_complete_status');
$data['text_return'] = $this->language->get('text_return');
$data['text_customer'] = $this->language->get('text_customer');
$data['text_online'] = $this->language->get('text_online');
$data['text_approval'] = $this->language->get('text_approval');
$data['text_product'] = $this->language->get('text_product');
$data['text_stock'] = $this->language->get('text_stock');
$data['text_review'] = $this->language->get('text_review');
$data['text_affiliate'] = $this->language->get('text_affiliate');
$data['text_store'] = $this->language->get('text_store');
$data['text_front'] = $this->language->get('text_front');
$data['text_help'] = $this->language->get('text_help');
$data['text_homepage'] = $this->language->get('text_homepage');
$data['text_documentation'] = $this->language->get('text_documentation');
$data['text_support'] = $this->language->get('text_support');
$data['text_logged'] = sprintf($this->language->get('text_logged'), $this->user->getUserName());
$data['text_logout'] = $this->language->get('text_logout');
if (!isset($this->request->get['token']) || !isset($this->session->data['token']) || ($this->request->get['token'] != $this->session->data['token'])) {
$data['logged'] = '';
$data['home'] = $this->url->link('common/dashboard', '', true);
} else {
$data['logged'] = true;
$data['home'] = $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true);
$data['logout'] = $this->url->link('common/logout', 'token=' . $this->session->data['token'], true);
// Orders
$this->load->model('sale/order');
// Processing Orders
$data['processing_status_total'] = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $this->config->get('config_processing_status'))));
$data['processing_status'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'] . '&filter_order_status=' . implode(',', $this->config->get('config_processing_status')), true);
// Complete Orders
$data['complete_status_total'] = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $this->config->get('config_complete_status'))));
$data['complete_status'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'] . '&filter_order_status=' . implode(',', $this->config->get('config_complete_status')), true);
// Returns
$this->load->model('sale/return');
$return_total = $this->model_sale_return->getTotalReturns(array('filter_return_status_id' => $this->config->get('config_return_status_id')));
$data['return_total'] = $return_total;
$data['return'] = $this->url->link('sale/return', 'token=' . $this->session->data['token'], true);
// Customers
$this->load->model('report/customer');
$data['online_total'] = $this->model_report_customer->getTotalCustomersOnline();
$data['online'] = $this->url->link('report/customer_online', 'token=' . $this->session->data['token'], true);
$this->load->model('customer/customer');
$customer_total = $this->model_customer_customer->getTotalCustomers(array('filter_approved' => false));
$data['customer_total'] = $customer_total;
$data['customer_approval'] = $this->url->link('customer/customer', 'token=' . $this->session->data['token'] . '&filter_approved=0', true);
// Products
$this->load->model('catalog/product');
$product_total = $this->model_catalog_product->getTotalProducts(array('filter_quantity' => 0));
$data['product_total'] = $product_total;
$data['product'] = $this->url->link('catalog/product', 'token=' . $this->session->data['token'] . '&filter_quantity=0', true);
// Reviews
$this->load->model('catalog/review');
$review_total = $this->model_catalog_review->getTotalReviews(array('filter_status' => false));
$data['review_total'] = $review_total;
$data['review'] = $this->url->link('catalog/review', 'token=' . $this->session->data['token'] . '&filter_status=0', true);
// Affliate
$this->load->model('marketing/affiliate');
$affiliate_total = $this->model_marketing_affiliate->getTotalAffiliates(array('filter_approved' => false));
$data['affiliate_total'] = $affiliate_total;
$data['affiliate_approval'] = $this->url->link('marketing/affiliate', 'token=' . $this->session->data['token'] . '&filter_approved=1', true);
$data['alerts'] = $customer_total + $product_total + $review_total + $return_total + $affiliate_total;
// Online Stores
$data['stores'] = array();
$data['stores'][] = array(
'name' => $this->config->get('config_name'),
'href' => HTTP_CATALOG
);
$this->load->model('setting/store');
$results = $this->model_setting_store->getStores();
foreach ($results as $result) {
$data['stores'][] = array(
'name' => $result['name'],
'href' => $result['url']
);
}
}
return $this->load->view('common/header', $data);
}
}
<?php
class ControllerCommonLogin extends Controller {
private $error = array();
public function index() {
$this->load->language('common/login');
$this->document->setTitle($this->language->get('heading_title'));
if ($this->user->isLogged() && isset($this->request->get['token']) && ($this->request->get['token'] == $this->session->data['token'])) {
$this->response->redirect($this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true));
}
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->session->data['token'] = token(32);
if (isset($this->request->post['redirect']) && (strpos($this->request->post['redirect'], HTTP_SERVER) === 0 || strpos($this->request->post['redirect'], HTTPS_SERVER) === 0)) {
$this->response->redirect($this->request->post['redirect'] . '&token=' . $this->session->data['token']);
} else {
$this->response->redirect($this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true));
}
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_login'] = $this->language->get('text_login');
$data['text_forgotten'] = $this->language->get('text_forgotten');
$data['entry_username'] = $this->language->get('entry_username');
$data['entry_password'] = $this->language->get('entry_password');
$data['button_login'] = $this->language->get('button_login');
if ((isset($this->session->data['token']) && !isset($this->request->get['token'])) || ((isset($this->request->get['token']) && (isset($this->session->data['token']) && ($this->request->get['token'] != $this->session->data['token']))))) {
$this->error['warning'] = $this->language->get('error_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'] = '';
}
$data['action'] = $this->url->link('common/login', '', true);
if (isset($this->request->post['username'])) {
$data['username'] = $this->request->post['username'];
} else {
$data['username'] = '';
}
if (isset($this->request->post['password'])) {
$data['password'] = $this->request->post['password'];
} else {
$data['password'] = '';
}
if (isset($this->request->get['route'])) {
$route = $this->request->get['route'];
unset($this->request->get['route']);
unset($this->request->get['token']);
$url = '';
if ($this->request->get) {
$url .= http_build_query($this->request->get);
}
$data['redirect'] = $this->url->link($route, $url, true);
} else {
$data['redirect'] = '';
}
if ($this->config->get('config_password')) {
$data['forgotten'] = $this->url->link('common/forgotten', '', true);
} else {
$data['forgotten'] = '';
}
$data['header'] = $this->load->controller('common/header');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('common/login', $data));
}
protected function validate() {
if (!isset($this->request->post['username']) || !isset($this->request->post['password']) || !$this->user->login($this->request->post['username'], html_entity_decode($this->request->post['password'], ENT_QUOTES, 'UTF-8'))) {
$this->error['warning'] = $this->language->get('error_login');
}
return !$this->error;
}
}
<?php
class ControllerCommonLogout extends Controller {
public function index() {
$this->user->logout();
unset($this->session->data['token']);
$this->response->redirect($this->url->link('common/login', '', true));
}
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
<?php
class ControllerCommonProfile extends Controller {
public function index() {
$this->load->language('common/menu');
$this->load->model('user/user');
$this->load->model('tool/image');
$user_info = $this->model_user_user->getUser($this->user->getId());
if ($user_info) {
$data['firstname'] = $user_info['firstname'];
$data['lastname'] = $user_info['lastname'];
$data['username'] = $user_info['username'];
$data['user_group'] = $user_info['user_group'] ;
if (is_file(DIR_IMAGE . $user_info['image'])) {
$data['image'] = $this->model_tool_image->resize($user_info['image'], 45, 45);
} else {
$data['image'] = '';
}
} else {
$data['username'] = '';
$data['image'] = '';
}
return $this->load->view('common/profile', $data);
}
}
<?php
class ControllerCommonReset extends Controller {
private $error = array();
public function index() {
if ($this->user->isLogged() && isset($this->request->get['token']) && ($this->request->get['token'] == $this->session->data['token'])) {
$this->response->redirect($this->url->link('common/dashboard', '', true));
}
if (!$this->config->get('config_password')) {
$this->response->redirect($this->url->link('common/login', '', true));
}
if (isset($this->request->get['code'])) {
$code = $this->request->get['code'];
} else {
$code = '';
}
$this->load->model('user/user');
$user_info = $this->model_user_user->getUserByCode($code);
if ($user_info) {
$this->load->language('common/reset');
$this->document->setTitle($this->language->get('heading_title'));
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_user_user->editPassword($user_info['user_id'], $this->request->post['password']);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('common/login', '', true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_password'] = $this->language->get('text_password');
$data['entry_password'] = $this->language->get('entry_password');
$data['entry_confirm'] = $this->language->get('entry_confirm');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', '', true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('common/reset', '', true)
);
if (isset($this->error['password'])) {
$data['error_password'] = $this->error['password'];
} else {
$data['error_password'] = '';
}
if (isset($this->error['confirm'])) {
$data['error_confirm'] = $this->error['confirm'];
} else {
$data['error_confirm'] = '';
}
$data['action'] = $this->url->link('common/reset', 'code=' . $code, true);
$data['cancel'] = $this->url->link('common/login', '', true);
if (isset($this->request->post['password'])) {
$data['password'] = $this->request->post['password'];
} else {
$data['password'] = '';
}
if (isset($this->request->post['confirm'])) {
$data['confirm'] = $this->request->post['confirm'];
} else {
$data['confirm'] = '';
}
$data['header'] = $this->load->controller('common/header');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('common/reset', $data));
} else {
$this->load->model('setting/setting');
$this->model_setting_setting->editSettingValue('config', 'config_password', '0');
return new Action('common/login');
}
}
protected function validate() {
if ((utf8_strlen($this->request->post['password']) < 4) || (utf8_strlen($this->request->post['password']) > 20)) {
$this->error['password'] = $this->language->get('error_password');
}
if ($this->request->post['confirm'] != $this->request->post['password']) {
$this->error['confirm'] = $this->language->get('error_confirm');
}
return !$this->error;
}
}
\ No newline at end of file
<?php
class ControllerCommonStats extends Controller {
public function index() {
$this->load->language('common/stats');
$data['text_complete_status'] = $this->language->get('text_complete_status');
$data['text_processing_status'] = $this->language->get('text_processing_status');
$data['text_other_status'] = $this->language->get('text_other_status');
$this->load->model('sale/order');
$order_total = $this->model_sale_order->getTotalOrders();
$complete_total = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $this->config->get('config_complete_status'))));
if ($complete_total) {
$data['complete_status'] = round(($complete_total / $order_total) * 100);
} else {
$data['complete_status'] = 0;
}
$processing_total = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $this->config->get('config_processing_status'))));
if ($processing_total) {
$data['processing_status'] = round(($processing_total / $order_total) * 100);
} else {
$data['processing_status'] = 0;
}
$this->load->model('localisation/order_status');
$order_status_data = array();
$results = $this->model_localisation_order_status->getOrderStatuses();
foreach ($results as $result) {
if (!in_array($result['order_status_id'], array_merge($this->config->get('config_complete_status'), $this->config->get('config_processing_status')))) {
$order_status_data[] = $result['order_status_id'];
}
}
$other_total = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $order_status_data)));
if ($other_total) {
$data['other_status'] = round(($other_total / $order_total) * 100);
} else {
$data['other_status'] = 0;
}
return $this->load->view('common/stats', $data);
}
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
<?php
class ControllerDashboardActivity extends Controller {
public function index() {
$this->load->language('dashboard/activity');
$data['heading_title'] = $this->language->get('heading_title');
$data['text_no_results'] = $this->language->get('text_no_results');
$data['token'] = $this->session->data['token'];
$data['activities'] = array();
$this->load->model('report/activity');
$results = $this->model_report_activity->getActivities();
foreach ($results as $result) {
$comment = vsprintf($this->language->get('text_' . $result['key']), json_decode($result['data'], true));
$find = array(
'customer_id=',
'order_id=',
'affiliate_id=',
'return_id='
);
$replace = array(
$this->url->link('customer/customer/edit', 'token=' . $this->session->data['token'] . '&customer_id=', true),
$this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=', true),
$this->url->link('marketing/affiliate/edit', 'token=' . $this->session->data['token'] . '&affiliate_id=', true),
$this->url->link('sale/return/edit', 'token=' . $this->session->data['token'] . '&return_id=', true)
);
$data['activities'][] = array(
'comment' => str_replace($find, $replace, $comment),
'date_added' => date($this->language->get('datetime_format'), strtotime($result['date_added']))
);
}
return $this->load->view('dashboard/activity', $data);
}
}
<?php
class ControllerDashboardChart extends Controller {
public function index() {
$this->load->language('dashboard/chart');
$data['heading_title'] = $this->language->get('heading_title');
$data['text_day'] = $this->language->get('text_day');
$data['text_week'] = $this->language->get('text_week');
$data['text_month'] = $this->language->get('text_month');
$data['text_year'] = $this->language->get('text_year');
$data['text_view'] = $this->language->get('text_view');
$data['token'] = $this->session->data['token'];
return $this->load->view('dashboard/chart', $data);
}
public function chart() {
$this->load->language('dashboard/chart');
$json = array();
$this->load->model('report/sale');
$this->load->model('report/customer');
$json['order'] = array();
$json['customer'] = array();
$json['xaxis'] = array();
$json['order']['label'] = $this->language->get('text_order');
$json['customer']['label'] = $this->language->get('text_customer');
$json['order']['data'] = array();
$json['customer']['data'] = array();
if (isset($this->request->get['range'])) {
$range = $this->request->get['range'];
} else {
$range = 'day';
}
switch ($range) {
default:
case 'day':
$results = $this->model_report_sale->getTotalOrdersByDay();
foreach ($results as $key => $value) {
$json['order']['data'][] = array($key, $value['total']);
}
$results = $this->model_report_customer->getTotalCustomersByDay();
foreach ($results as $key => $value) {
$json['customer']['data'][] = array($key, $value['total']);
}
for ($i = 0; $i < 24; $i++) {
$json['xaxis'][] = array($i, $i);
}
break;
case 'week':
$results = $this->model_report_sale->getTotalOrdersByWeek();
foreach ($results as $key => $value) {
$json['order']['data'][] = array($key, $value['total']);
}
$results = $this->model_report_customer->getTotalCustomersByWeek();
foreach ($results as $key => $value) {
$json['customer']['data'][] = array($key, $value['total']);
}
$date_start = strtotime('-' . date('w') . ' days');
for ($i = 0; $i < 7; $i++) {
$date = date('Y-m-d', $date_start + ($i * 86400));
$json['xaxis'][] = array(date('w', strtotime($date)), date('D', strtotime($date)));
}
break;
case 'month':
$results = $this->model_report_sale->getTotalOrdersByMonth();
foreach ($results as $key => $value) {
$json['order']['data'][] = array($key, $value['total']);
}
$results = $this->model_report_customer->getTotalCustomersByMonth();
foreach ($results as $key => $value) {
$json['customer']['data'][] = array($key, $value['total']);
}
for ($i = 1; $i <= date('t'); $i++) {
$date = date('Y') . '-' . date('m') . '-' . $i;
$json['xaxis'][] = array(date('j', strtotime($date)), date('d', strtotime($date)));
}
break;
case 'year':
$results = $this->model_report_sale->getTotalOrdersByYear();
foreach ($results as $key => $value) {
$json['order']['data'][] = array($key, $value['total']);
}
$results = $this->model_report_customer->getTotalCustomersByYear();
foreach ($results as $key => $value) {
$json['customer']['data'][] = array($key, $value['total']);
}
for ($i = 1; $i <= 12; $i++) {
$json['xaxis'][] = array($i, date('M', mktime(0, 0, 0, $i)));
}
break;
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
}
\ No newline at end of file
<?php
class ControllerDashboardCustomer extends Controller {
public function index() {
$this->load->language('dashboard/customer');
$data['heading_title'] = $this->language->get('heading_title');
$data['text_view'] = $this->language->get('text_view');
$data['token'] = $this->session->data['token'];
// Total Orders
$this->load->model('customer/customer');
$today = $this->model_customer_customer->getTotalCustomers(array('filter_date_added' => date('Y-m-d', strtotime('-1 day'))));
$yesterday = $this->model_customer_customer->getTotalCustomers(array('filter_date_added' => date('Y-m-d', strtotime('-2 day'))));
$difference = $today - $yesterday;
if ($difference && $today) {
$data['percentage'] = round(($difference / $today) * 100);
} else {
$data['percentage'] = 0;
}
$customer_total = $this->model_customer_customer->getTotalCustomers();
if ($customer_total > 1000000000000) {
$data['total'] = round($customer_total / 1000000000000, 1) . 'T';
} elseif ($customer_total > 1000000000) {
$data['total'] = round($customer_total / 1000000000, 1) . 'B';
} elseif ($customer_total > 1000000) {
$data['total'] = round($customer_total / 1000000, 1) . 'M';
} elseif ($customer_total > 1000) {
$data['total'] = round($customer_total / 1000, 1) . 'K';
} else {
$data['total'] = $customer_total;
}
$data['customer'] = $this->url->link('customer/customer', 'token=' . $this->session->data['token'], true);
return $this->load->view('dashboard/customer', $data);
}
}
\ No newline at end of file
<?php
class ControllerDashboardMap extends Controller {
public function index() {
$this->load->language('dashboard/map');
$data['heading_title'] = $this->language->get('heading_title');
$data['text_order'] = $this->language->get('text_order');
$data['text_sale'] = $this->language->get('text_sale');
$data['token'] = $this->session->data['token'];
return $this->load->view('dashboard/map', $data);
}
public function map() {
$json = array();
$this->load->model('report/sale');
$results = $this->model_report_sale->getTotalOrdersByCountry();
foreach ($results as $result) {
$json[strtolower($result['iso_code_2'])] = array(
'total' => $result['total'],
'amount' => $this->currency->format($result['amount'], $this->config->get('config_currency'))
);
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
}
\ No newline at end of file
<?php
class ControllerDashboardOnline extends Controller {
public function index() {
$this->load->language('dashboard/online');
$data['heading_title'] = $this->language->get('heading_title');
$data['text_view'] = $this->language->get('text_view');
$data['token'] = $this->session->data['token'];
// Total Orders
$this->load->model('report/customer');
// Customers Online
$online_total = $this->model_report_customer->getTotalCustomersOnline();
if ($online_total > 1000000000000) {
$data['total'] = round($online_total / 1000000000000, 1) . 'T';
} elseif ($online_total > 1000000000) {
$data['total'] = round($online_total / 1000000000, 1) . 'B';
} elseif ($online_total > 1000000) {
$data['total'] = round($online_total / 1000000, 1) . 'M';
} elseif ($online_total > 1000) {
$data['total'] = round($online_total / 1000, 1) . 'K';
} else {
$data['total'] = $online_total;
}
$data['online'] = $this->url->link('report/customer_online', 'token=' . $this->session->data['token'], true);
return $this->load->view('dashboard/online', $data);
}
}
\ No newline at end of file
<?php
class ControllerDashboardOrder extends Controller {
public function index() {
$this->load->language('dashboard/order');
$data['heading_title'] = $this->language->get('heading_title');
$data['text_view'] = $this->language->get('text_view');
$data['token'] = $this->session->data['token'];
// Total Orders
$this->load->model('sale/order');
$today = $this->model_sale_order->getTotalOrders(array('filter_date_added' => date('Y-m-d', strtotime('-1 day'))));
$yesterday = $this->model_sale_order->getTotalOrders(array('filter_date_added' => date('Y-m-d', strtotime('-2 day'))));
$difference = $today - $yesterday;
if ($difference && $today) {
$data['percentage'] = round(($difference / $today) * 100);
} else {
$data['percentage'] = 0;
}
$order_total = $this->model_sale_order->getTotalOrders();
if ($order_total > 1000000000000) {
$data['total'] = round($order_total / 1000000000000, 1) . 'T';
} elseif ($order_total > 1000000000) {
$data['total'] = round($order_total / 1000000000, 1) . 'B';
} elseif ($order_total > 1000000) {
$data['total'] = round($order_total / 1000000, 1) . 'M';
} elseif ($order_total > 1000) {
$data['total'] = round($order_total / 1000, 1) . 'K';
} else {
$data['total'] = $order_total;
}
$data['order'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'], true);
return $this->load->view('dashboard/order', $data);
}
}
\ No newline at end of file
<?php
class ControllerDashboardRecent extends Controller {
public function index() {
$this->load->language('dashboard/recent');
$data['heading_title'] = $this->language->get('heading_title');
$data['text_no_results'] = $this->language->get('text_no_results');
$data['column_order_id'] = $this->language->get('column_order_id');
$data['column_customer'] = $this->language->get('column_customer');
$data['column_status'] = $this->language->get('column_status');
$data['column_date_added'] = $this->language->get('column_date_added');
$data['column_total'] = $this->language->get('column_total');
$data['column_action'] = $this->language->get('column_action');
$data['button_view'] = $this->language->get('button_view');
$data['token'] = $this->session->data['token'];
// Last 5 Orders
$data['orders'] = array();
$filter_data = array(
'sort' => 'o.date_added',
'order' => 'DESC',
'start' => 0,
'limit' => 5
);
$results = $this->model_sale_order->getOrders($filter_data);
foreach ($results as $result) {
$data['orders'][] = array(
'order_id' => $result['order_id'],
'customer' => $result['customer'],
'status' => $result['order_status'],
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']),
'view' => $this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'], true),
);
}
return $this->load->view('dashboard/recent', $data);
}
}
\ No newline at end of file
<?php
class ControllerDashboardSale extends Controller {
public function index() {
$this->load->language('dashboard/sale');
$data['heading_title'] = $this->language->get('heading_title');
$data['text_view'] = $this->language->get('text_view');
$data['token'] = $this->session->data['token'];
$this->load->model('report/sale');
$today = $this->model_report_sale->getTotalSales(array('filter_date_added' => date('Y-m-d', strtotime('-1 day'))));
$yesterday = $this->model_report_sale->getTotalSales(array('filter_date_added' => date('Y-m-d', strtotime('-2 day'))));
$difference = $today - $yesterday;
if ($difference && (int)$today) {
$data['percentage'] = round(($difference / $today) * 100);
} else {
$data['percentage'] = 0;
}
$sale_total = $this->model_report_sale->getTotalSales();
if ($sale_total > 1000000000000) {
$data['total'] = round($sale_total / 1000000000000, 1) . 'T';
} elseif ($sale_total > 1000000000) {
$data['total'] = round($sale_total / 1000000000, 1) . 'B';
} elseif ($sale_total > 1000000) {
$data['total'] = round($sale_total / 1000000, 1) . 'M';
} elseif ($sale_total > 1000) {
$data['total'] = round($sale_total / 1000, 1) . 'K';
} else {
$data['total'] = round($sale_total);
}
$data['sale'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'], true);
return $this->load->view('dashboard/sale', $data);
}
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
<?php
class ControllerErrorNotFound extends Controller {
public function index() {
$this->load->language('error/not_found');
$this->document->setTitle($this->language->get('heading_title'));
$data['heading_title'] = $this->language->get('heading_title');
$data['text_not_found'] = $this->language->get('text_not_found');
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('error/not_found', 'token=' . $this->session->data['token'], true)
);
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('error/not_found', $data));
}
}
\ No newline at end of file
<?php
class ControllerErrorPermission extends Controller {
public function index() {
$this->load->language('error/permission');
$this->document->setTitle($this->language->get('heading_title'));
$data['heading_title'] = $this->language->get('heading_title');
$data['text_permission'] = $this->language->get('text_permission');
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('error/permission', 'token=' . $this->session->data['token'], true)
);
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('error/permission', $data));
}
}
<?php
class ControllerEventTheme extends Controller {
public function index(&$view, &$data) {
// This is only here for compatibility with old templates
if (substr($view, -4) == '.tpl') {
$view = substr($view, 0, -4);
}
}
}
<?php
class ControllerExtensionAnalytics extends Controller {
private $error = array();
public function index() {
$this->load->language('extension/analytics');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->getList();
}
public function install() {
$this->load->language('extension/analytics');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->install('analytics', $this->request->get['extension']);
$this->load->model('user/user_group');
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'analytics/' . $this->request->get['extension']);
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'analytics/' . $this->request->get['extension']);
// Call install method if it exsits
$this->load->controller('analytics/' . $this->request->get['extension'] . '/install');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/analytics', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function uninstall() {
$this->load->language('extension/analytics');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->uninstall('analytics', $this->request->get['extension']);
// Call uninstall method if it exsits
$this->load->controller('analytics/' . $this->request->get['extension'] . '/uninstall');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/analytics', 'token=' . $this->session->data['token'], true));
}
}
public function getList() {
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('extension/analytics', 'token=' . $this->session->data['token'], true)
);
$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_edit'] = $this->language->get('button_edit');
$data['button_install'] = $this->language->get('button_install');
$data['button_uninstall'] = $this->language->get('button_uninstall');
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'] = '';
}
$extensions = $this->model_extension_extension->getInstalled('analytics');
foreach ($extensions as $key => $value) {
if (!file_exists(DIR_APPLICATION . 'controller/analytics/' . $value . '.php')) {
$this->model_extension_extension->uninstall('analytics', $value);
unset($extensions[$key]);
}
}
$this->load->model('setting/setting');
$this->load->model('setting/store');
$stores = $this->model_setting_store->getStores();
$data['extensions'] = array();
$files = glob(DIR_APPLICATION . 'controller/analytics/*.php');
if ($files) {
foreach ($files as $file) {
$extension = basename($file, '.php');
$this->load->language('analytics/' . $extension);
$store_data = array();
$store_data[] = array(
'name' => $this->config->get('config_name'),
'edit' => $this->url->link('analytics/' . $extension, 'token=' . $this->session->data['token'] . '&store_id=0', true),
'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled')
);
foreach ($stores as $store) {
$store_data[] = array(
'name' => $store['name'],
'edit' => $this->url->link('analytics/' . $extension, 'token=' . $this->session->data['token'] . '&store_id=' . $store['store_id'], true),
'status' => $this->model_setting_setting->getSettingValue($extension . '_status', $store['store_id']) ? $this->language->get('text_enabled') : $this->language->get('text_disabled')
);
}
$data['extensions'][] = array(
'name' => $this->language->get('heading_title'),
'install' => $this->url->link('extension/analytics/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'uninstall' => $this->url->link('extension/analytics/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'installed' => in_array($extension, $extensions),
'store' => $store_data
);
}
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('extension/analytics', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'extension/analytics')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
<?php
class ControllerExtensionCaptcha extends Controller {
private $error = array();
public function index() {
$this->load->language('extension/captcha');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->getList();
}
public function install() {
$this->load->language('extension/captcha');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->install('captcha', $this->request->get['extension']);
$this->load->model('user/user_group');
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'captcha/' . $this->request->get['extension']);
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'captcha/' . $this->request->get['extension']);
// Call install method if it exsits
$this->load->controller('captcha/' . $this->request->get['extension'] . '/install');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/captcha', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function uninstall() {
$this->load->language('extension/captcha');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->uninstall('captcha', $this->request->get['extension']);
// Call uninstall method if it exsits
$this->load->controller('captcha/' . $this->request->get['extension'] . '/uninstall');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/captcha', 'token=' . $this->session->data['token'], true));
}
}
public function getList() {
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('extension/captcha', 'token=' . $this->session->data['token'], true)
);
$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_edit'] = $this->language->get('button_edit');
$data['button_install'] = $this->language->get('button_install');
$data['button_uninstall'] = $this->language->get('button_uninstall');
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'] = '';
}
$extensions = $this->model_extension_extension->getInstalled('captcha');
foreach ($extensions as $key => $value) {
if (!file_exists(DIR_APPLICATION . 'controller/captcha/' . $value . '.php')) {
$this->model_extension_extension->uninstall('captcha', $value);
unset($extensions[$key]);
}
}
$data['extensions'] = array();
$files = glob(DIR_APPLICATION . 'controller/captcha/*.php');
if ($files) {
foreach ($files as $file) {
$extension = basename($file, '.php');
$this->load->language('captcha/' . $extension);
$data['extensions'][] = array(
'name' => $this->language->get('heading_title') . (($extension == $this->config->get('config_captcha')) ? $this->language->get('text_default') : null),
'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'),
'install' => $this->url->link('extension/captcha/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'uninstall' => $this->url->link('extension/captcha/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'installed' => in_array($extension, $extensions),
'edit' => $this->url->link('captcha/' . $extension, 'token=' . $this->session->data['token'], true)
);
}
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('extension/captcha', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'extension/captcha')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
<?php
class ControllerExtensionFeed extends Controller {
private $error = array();
public function index() {
$this->load->language('extension/feed');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->getList();
}
public function install() {
$this->load->language('extension/feed');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->install('feed', $this->request->get['extension']);
$this->load->model('user/user_group');
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'feed/' . $this->request->get['extension']);
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'feed/' . $this->request->get['extension']);
// Call install method if it exsits
$this->load->controller('feed/' . $this->request->get['extension'] . '/install');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/feed', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function uninstall() {
$this->load->language('extension/feed');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->uninstall('feed', $this->request->get['extension']);
// Call uninstall method if it exsits
$this->load->controller('feed/' . $this->request->get['extension'] . '/uninstall');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/feed', 'token=' . $this->session->data['token'], true));
}
}
public function getList() {
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('extension/feed', 'token=' . $this->session->data['token'], true)
);
$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_edit'] = $this->language->get('button_edit');
$data['button_install'] = $this->language->get('button_install');
$data['button_uninstall'] = $this->language->get('button_uninstall');
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'] = '';
}
$extensions = $this->model_extension_extension->getInstalled('feed');
foreach ($extensions as $key => $value) {
if (!file_exists(DIR_APPLICATION . 'controller/feed/' . $value . '.php')) {
$this->model_extension_extension->uninstall('feed', $value);
unset($extensions[$key]);
}
}
$data['extensions'] = array();
$files = glob(DIR_APPLICATION . 'controller/feed/*.php');
if ($files) {
foreach ($files as $file) {
$extension = basename($file, '.php');
$this->load->language('feed/' . $extension);
$data['extensions'][] = array(
'name' => $this->language->get('heading_title'),
'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'),
'install' => $this->url->link('extension/feed/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'uninstall' => $this->url->link('extension/feed/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'installed' => in_array($extension, $extensions),
'edit' => $this->url->link('feed/' . $extension, 'token=' . $this->session->data['token'], true)
);
}
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('extension/feed', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'extension/feed')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
\ No newline at end of file
<?php
class ControllerExtensionFraud extends Controller {
private $error = array();
public function index() {
$this->load->language('extension/fraud');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->getList();
}
public function install() {
$this->load->language('extension/fraud');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->install('fraud', $this->request->get['extension']);
$this->load->model('user/user_group');
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'fraud/' . $this->request->get['extension']);
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'fraud/' . $this->request->get['extension']);
// Call install method if it exsits
$this->load->controller('fraud/' . $this->request->get['extension'] . '/install');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/fraud', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function uninstall() {
$this->load->language('extension/fraud');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->uninstall('fraud', $this->request->get['extension']);
// Call uninstall method if it exsits
$this->load->controller('fraud/' . $this->request->get['extension'] . '/uninstall');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/fraud', 'token=' . $this->session->data['token'], true));
}
}
public function getList() {
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('extension/fraud', 'token=' . $this->session->data['token'], true)
);
$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_edit'] = $this->language->get('button_edit');
$data['button_install'] = $this->language->get('button_install');
$data['button_uninstall'] = $this->language->get('button_uninstall');
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'] = '';
}
$extensions = $this->model_extension_extension->getInstalled('fraud');
foreach ($extensions as $key => $value) {
if (!file_exists(DIR_APPLICATION . 'controller/fraud/' . $value . '.php')) {
$this->model_extension_extension->uninstall('fraud', $value);
unset($extensions[$key]);
}
}
$data['extensions'] = array();
$files = glob(DIR_APPLICATION . 'controller/fraud/*.php');
if ($files) {
foreach ($files as $file) {
$extension = basename($file, '.php');
$this->load->language('fraud/' . $extension);
$data['extensions'][] = array(
'name' => $this->language->get('heading_title'),
'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'),
'install' => $this->url->link('extension/fraud/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'uninstall' => $this->url->link('extension/fraud/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'installed' => in_array($extension, $extensions),
'edit' => $this->url->link('fraud/' . $extension, 'token=' . $this->session->data['token'], true)
);
}
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('extension/fraud', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'extension/fraud')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
<?php
class ControllerExtensionModule extends Controller {
private $error = array();
public function index() {
$this->load->language('extension/module');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->load->model('extension/module');
$this->getList();
}
public function install() {
$this->load->language('extension/module');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->load->model('extension/module');
if ($this->validate()) {
$this->model_extension_extension->install('module', $this->request->get['extension']);
$this->load->model('user/user_group');
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'module/' . $this->request->get['extension']);
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'module/' . $this->request->get['extension']);
// Call install method if it exsits
$this->load->controller('module/' . $this->request->get['extension'] . '/install');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function uninstall() {
$this->load->language('extension/module');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->load->model('extension/module');
if ($this->validate()) {
$this->model_extension_extension->uninstall('module', $this->request->get['extension']);
$this->model_extension_module->deleteModulesByCode($this->request->get['extension']);
// Call uninstall method if it exsits
$this->load->controller('module/' . $this->request->get['extension'] . '/uninstall');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function delete() {
$this->load->language('extension/module');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->load->model('extension/module');
if (isset($this->request->get['module_id']) && $this->validateDelete()) {
$this->model_extension_module->deleteModule($this->request->get['module_id']);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function getList() {
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], true)
);
$data['heading_title'] = $this->language->get('heading_title');
$data['text_layout'] = sprintf($this->language->get('text_layout'), $this->url->link('design/layout', 'token=' . $this->session->data['token'], true));
$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_action'] = $this->language->get('column_action');
$data['button_edit'] = $this->language->get('button_edit');
$data['button_delete'] = $this->language->get('button_delete');
$data['button_install'] = $this->language->get('button_install');
$data['button_uninstall'] = $this->language->get('button_uninstall');
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'] = '';
}
$data['delete'] = $this->url->link('extension/module/delete', 'token=' . $this->session->data['token'], true);
$extensions = $this->model_extension_extension->getInstalled('module');
foreach ($extensions as $key => $value) {
if (!file_exists(DIR_APPLICATION . 'controller/module/' . $value . '.php')) {
$this->model_extension_extension->uninstall('module', $value);
unset($extensions[$key]);
$this->model_extension_module->deleteModulesByCode($value);
}
}
$data['extensions'] = array();
$files = glob(DIR_APPLICATION . 'controller/module/*.php');
if ($files) {
foreach ($files as $file) {
$extension = basename($file, '.php');
$this->load->language('module/' . $extension);
$module_data = array();
$modules = $this->model_extension_module->getModulesByCode($extension);
foreach ($modules as $module) {
$module_data[] = array(
'module_id' => $module['module_id'],
'name' => $module['name'],
'edit' => $this->url->link('module/' . $extension, 'token=' . $this->session->data['token'] . '&module_id=' . $module['module_id'], true),
'delete' => $this->url->link('extension/module/delete', 'token=' . $this->session->data['token'] . '&module_id=' . $module['module_id'], true)
);
}
$data['extensions'][] = array(
'name' => $this->language->get('heading_title'),
'module' => $module_data,
'install' => $this->url->link('extension/module/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'uninstall' => $this->url->link('extension/module/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'installed' => in_array($extension, $extensions),
'edit' => $this->url->link('module/' . $extension, 'token=' . $this->session->data['token'], true)
);
}
}
$sort_order = array();
foreach ($data['extensions'] as $key => $value) {
$sort_order[$key] = $value['name'];
}
array_multisort($sort_order, SORT_ASC, $data['extensions']);
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('extension/module', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'extension/module')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
protected function validateDelete() {
if (!$this->user->hasPermission('modify', 'extension/module')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
This diff is collapsed. Click to expand it.
<?php
class ControllerExtensionPayment extends Controller {
private $error = array();
public function index() {
$this->load->language('extension/payment');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->getList();
}
public function install() {
$this->load->language('extension/payment');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->install('payment', $this->request->get['extension']);
$this->load->model('user/user_group');
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'payment/' . $this->request->get['extension']);
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'payment/' . $this->request->get['extension']);
// Call install method if it exsits
$this->load->controller('payment/' . $this->request->get['extension'] . '/install');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/payment', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function uninstall() {
$this->load->language('extension/payment');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->uninstall('payment', $this->request->get['extension']);
// Call uninstall method if it exsits
$this->load->controller('payment/' . $this->request->get['extension'] . '/uninstall');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/payment', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function getList() {
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('extension/payment', 'token=' . $this->session->data['token'], true)
);
$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_sort_order'] = $this->language->get('column_sort_order');
$data['column_action'] = $this->language->get('column_action');
$data['button_edit'] = $this->language->get('button_edit');
$data['button_install'] = $this->language->get('button_install');
$data['button_uninstall'] = $this->language->get('button_uninstall');
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'] = '';
}
$this->load->model('extension/extension');
$extensions = $this->model_extension_extension->getInstalled('payment');
foreach ($extensions as $key => $value) {
if (!file_exists(DIR_APPLICATION . 'controller/payment/' . $value . '.php')) {
$this->model_extension_extension->uninstall('payment', $value);
unset($extensions[$key]);
}
}
$data['extensions'] = array();
$files = glob(DIR_APPLICATION . 'controller/payment/*.php');
if ($files) {
foreach ($files as $file) {
$extension = basename($file, '.php');
$this->load->language('payment/' . $extension);
$text_link = $this->language->get('text_' . $extension);
if ($text_link != 'text_' . $extension) {
$link = $this->language->get('text_' . $extension);
} else {
$link = '';
}
$data['extensions'][] = array(
'name' => $this->language->get('heading_title'),
'link' => $link,
'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'),
'sort_order' => $this->config->get($extension . '_sort_order'),
'install' => $this->url->link('extension/payment/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'uninstall' => $this->url->link('extension/payment/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'installed' => in_array($extension, $extensions),
'edit' => $this->url->link('payment/' . $extension, 'token=' . $this->session->data['token'], true)
);
}
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('extension/payment', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'extension/payment')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
<?php
class ControllerExtensionShipping extends Controller {
private $error = array();
public function index() {
$this->load->language('extension/shipping');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->getList();
}
public function install() {
$this->load->language('extension/shipping');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->install('shipping', $this->request->get['extension']);
$this->load->model('user/user_group');
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'shipping/' . $this->request->get['extension']);
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'shipping/' . $this->request->get['extension']);
// Call install method if it exsits
$this->load->controller('shipping/' . $this->request->get['extension'] . '/install');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/shipping', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function uninstall() {
$this->load->language('extension/shipping');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->uninstall('shipping', $this->request->get['extension']);
// Call uninstall method if it exsits
$this->load->controller('shipping/' . $this->request->get['extension'] . '/uninstall');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/shipping', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function getList() {
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('extension/shipping', 'token=' . $this->session->data['token'], true)
);
$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_sort_order'] = $this->language->get('column_sort_order');
$data['column_action'] = $this->language->get('column_action');
$data['button_edit'] = $this->language->get('button_edit');
$data['button_install'] = $this->language->get('button_install');
$data['button_uninstall'] = $this->language->get('button_uninstall');
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'] = '';
}
$this->load->model('extension/extension');
$extensions = $this->model_extension_extension->getInstalled('shipping');
foreach ($extensions as $key => $value) {
if (!file_exists(DIR_APPLICATION . 'controller/shipping/' . $value . '.php')) {
$this->model_extension_extension->uninstall('shipping', $value);
unset($extensions[$key]);
}
}
$data['extensions'] = array();
$files = glob(DIR_APPLICATION . 'controller/shipping/*.php');
if ($files) {
foreach ($files as $file) {
$extension = basename($file, '.php');
$this->load->language('shipping/' . $extension);
$data['extensions'][] = array(
'name' => $this->language->get('heading_title'),
'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'),
'sort_order' => $this->config->get($extension . '_sort_order'),
'install' => $this->url->link('extension/shipping/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'uninstall' => $this->url->link('extension/shipping/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'installed' => in_array($extension, $extensions),
'edit' => $this->url->link('shipping/' . $extension, 'token=' . $this->session->data['token'], true)
);
}
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('extension/shipping', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'extension/shipping')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
\ No newline at end of file
<?php
class ControllerExtensionTheme extends Controller {
private $error = array();
public function index() {
$this->load->language('extension/theme');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->getList();
}
public function install() {
$this->load->language('extension/theme');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->install('theme', $this->request->get['extension']);
$this->load->model('user/user_group');
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'theme/' . $this->request->get['extension']);
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'theme/' . $this->request->get['extension']);
// Call install method if it exsits
$this->load->controller('theme/' . $this->request->get['extension'] . '/install');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/theme', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function uninstall() {
$this->load->language('extension/theme');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->uninstall('theme', $this->request->get['extension']);
// Call uninstall method if it exsits
$this->load->controller('theme/' . $this->request->get['extension'] . '/uninstall');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/theme', 'token=' . $this->session->data['token'], true));
}
}
public function getList() {
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('extension/theme', 'token=' . $this->session->data['token'], true)
);
$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_edit'] = $this->language->get('button_edit');
$data['button_install'] = $this->language->get('button_install');
$data['button_uninstall'] = $this->language->get('button_uninstall');
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'] = '';
}
$extensions = $this->model_extension_extension->getInstalled('theme');
foreach ($extensions as $key => $value) {
if (!file_exists(DIR_APPLICATION . 'controller/theme/' . $value . '.php')) {
$this->model_extension_extension->uninstall('theme', $value);
unset($extensions[$key]);
}
}
$this->load->model('setting/setting');
$this->load->model('setting/store');
$stores = $this->model_setting_store->getStores();
$data['extensions'] = array();
$files = glob(DIR_APPLICATION . 'controller/theme/*.php');
if ($files) {
foreach ($files as $file) {
$extension = basename($file, '.php');
$this->load->language('theme/' . $extension);
$store_data = array();
$store_data[] = array(
'name' => $this->config->get('config_name'),
'edit' => $this->url->link('theme/' . $extension, 'token=' . $this->session->data['token'] . '&store_id=0', true),
'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled')
);
foreach ($stores as $store) {
$store_data[] = array(
'name' => $store['name'],
'edit' => $this->url->link('theme/' . $extension, 'token=' . $this->session->data['token'] . '&store_id=' . $store['store_id'], true),
'status' => $this->model_setting_setting->getSettingValue($extension . '_status', $store['store_id']) ? $this->language->get('text_enabled') : $this->language->get('text_disabled')
);
}
$data['extensions'][] = array(
'name' => $this->language->get('heading_title'),
'install' => $this->url->link('extension/theme/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'uninstall' => $this->url->link('extension/theme/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'installed' => in_array($extension, $extensions),
'store' => $store_data
);
}
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('extension/theme', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'extension/theme')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
\ No newline at end of file
<?php
class ControllerExtensionTotal extends Controller {
private $error = array();
public function index() {
$this->load->language('extension/total');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
$this->getList();
}
public function install() {
$this->load->language('extension/total');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->install('total', $this->request->get['extension']);
$this->load->model('user/user_group');
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'total/' . $this->request->get['extension']);
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'total/' . $this->request->get['extension']);
$this->load->controller('total/' . $this->request->get['extension'] . '/install');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/total', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function uninstall() {
$this->load->language('extension/total');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/extension');
if ($this->validate()) {
$this->model_extension_extension->uninstall('total', $this->request->get['extension']);
$this->load->controller('total/' . $this->request->get['extension'] . '/uninstall');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/total', 'token=' . $this->session->data['token'], true));
}
$this->getList();
}
public function getList() {
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('extension/total', 'token=' . $this->session->data['token'], true)
);
$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_sort_order'] = $this->language->get('column_sort_order');
$data['column_action'] = $this->language->get('column_action');
$data['button_edit'] = $this->language->get('button_edit');
$data['button_install'] = $this->language->get('button_install');
$data['button_uninstall'] = $this->language->get('button_uninstall');
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'] = '';
}
$this->load->model('extension/extension');
$extensions = $this->model_extension_extension->getInstalled('total');
foreach ($extensions as $key => $value) {
if (!file_exists(DIR_APPLICATION . 'controller/total/' . $value . '.php')) {
$this->model_extension_extension->uninstall('total', $value);
unset($extensions[$key]);
}
}
$data['extensions'] = array();
$files = glob(DIR_APPLICATION . 'controller/total/*.php');
if ($files) {
foreach ($files as $file) {
$extension = basename($file, '.php');
$this->load->language('total/' . $extension);
$data['extensions'][] = array(
'name' => $this->language->get('heading_title'),
'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'),
'sort_order' => $this->config->get($extension . '_sort_order'),
'install' => $this->url->link('extension/total/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'uninstall' => $this->url->link('extension/total/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true),
'installed' => in_array($extension, $extensions),
'edit' => $this->url->link('total/' . $extension, 'token=' . $this->session->data['token'], true)
);
}
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('extension/total', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'extension/total')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
\ No newline at end of file
<?php
class ControllerFeedGoogleBase extends Controller {
private $error = array();
public function index() {
$this->load->language('feed/google_base');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('google_base', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/feed', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['text_import'] = $this->language->get('text_import');
$data['entry_google_category'] = $this->language->get('entry_google_category');
$data['entry_category'] = $this->language->get('entry_category');
$data['entry_data_feed'] = $this->language->get('entry_data_feed');
$data['entry_status'] = $this->language->get('entry_status');
$data['button_import'] = $this->language->get('button_import');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
$data['button_category_add'] = $this->language->get('button_category_add');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_feed'),
'href' => $this->url->link('extension/feed', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('feed/google_base', 'token=' . $this->session->data['token'], true)
);
$data['action'] = $this->url->link('feed/google_base', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/feed', 'token=' . $this->session->data['token'], true);
$data['token'] = $this->session->data['token'];
$data['data_feed'] = HTTP_CATALOG . 'index.php?route=feed/google_base';
if (isset($this->request->post['google_base_status'])) {
$data['google_base_status'] = $this->request->post['google_base_status'];
} else {
$data['google_base_status'] = $this->config->get('google_base_status');
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('feed/google_base', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'feed/google_base')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
public function install() {
$this->load->model('feed/google_base');
$this->model_feed_google_base->install();
}
public function uninstall() {
$this->load->model('feed/google_base');
$this->model_feed_google_base->uninstall();
}
public function import() {
$this->load->language('feed/google_base');
$json = array();
// Check user has permission
if (!$this->user->hasPermission('modify', 'feed/google_base')) {
$json['error'] = $this->language->get('error_permission');
}
if (!$json) {
if (!empty($this->request->files['file']['name']) && is_file($this->request->files['file']['tmp_name'])) {
// Sanitize the filename
$filename = basename(html_entity_decode($this->request->files['file']['name'], ENT_QUOTES, 'UTF-8'));
// Allowed file extension types
if (utf8_strtolower(utf8_substr(strrchr($filename, '.'), 1)) != 'txt') {
$json['error'] = $this->language->get('error_filetype');
}
// Allowed file mime types
if ($this->request->files['file']['type'] != 'text/plain') {
$json['error'] = $this->language->get('error_filetype');
}
// Return any upload error
if ($this->request->files['file']['error'] != UPLOAD_ERR_OK) {
$json['error'] = $this->language->get('error_upload_' . $this->request->files['file']['error']);
}
} else {
$json['error'] = $this->language->get('error_upload');
}
}
if (!$json) {
$json['success'] = $this->language->get('text_success');
$this->load->model('feed/google_base');
// Get the contents of the uploaded file
$content = file_get_contents($this->request->files['file']['tmp_name']);
$this->model_feed_google_base->import($content);
unlink($this->request->files['file']['tmp_name']);
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
public function category() {
$this->load->language('feed/google_base');
$data['text_no_results'] = $this->language->get('text_no_results');
$data['text_loading'] = $this->language->get('text_loading');
$data['column_google_category'] = $this->language->get('column_google_category');
$data['column_category'] = $this->language->get('column_category');
$data['column_action'] = $this->language->get('column_action');
$data['button_remove'] = $this->language->get('button_remove');
if (isset($this->request->get['page'])) {
$page = $this->request->get['page'];
} else {
$page = 1;
}
$data['google_base_categories'] = array();
$this->load->model('feed/google_base');
$results = $this->model_feed_google_base->getCategories(($page - 1) * 10, 10);
foreach ($results as $result) {
$data['google_base_categories'][] = array(
'google_base_category_id' => $result['google_base_category_id'],
'google_base_category' => $result['google_base_category'],
'category_id' => $result['category_id'],
'category' => $result['category']
);
}
$category_total = $this->model_feed_google_base->getTotalCategories();
$pagination = new Pagination();
$pagination->total = $category_total;
$pagination->page = $page;
$pagination->limit = 10;
$pagination->url = $this->url->link('feed/google_base/category', 'token=' . $this->session->data['token'] . '&page={page}', true);
$data['pagination'] = $pagination->render();
$data['results'] = sprintf($this->language->get('text_pagination'), ($category_total) ? (($page - 1) * 10) + 1 : 0, ((($page - 1) * 10) > ($category_total - 10)) ? $category_total : ((($page - 1) * 10) + 10), $category_total, ceil($category_total / 10));
$this->response->setOutput($this->load->view('feed/google_base_category', $data));
}
public function addCategory() {
$this->load->language('feed/google_base');
$json = array();
if (!$this->user->hasPermission('modify', 'sale/order')) {
$json['error'] = $this->language->get('error_permission');
} elseif (!empty($this->request->post['google_base_category_id']) && !empty($this->request->post['category_id'])) {
$this->load->model('feed/google_base');
$this->model_feed_google_base->addCategory($this->request->post);
$json['success'] = $this->language->get('text_success');
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
public function removeCategory() {
$this->load->language('feed/google_base');
$json = array();
if (!$this->user->hasPermission('modify', 'sale/order')) {
$json['error'] = $this->language->get('error_permission');
} else {
$this->load->model('feed/google_base');
$this->model_feed_google_base->deleteCategory($this->request->post['category_id']);
$json['success'] = $this->language->get('text_success');
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
public function autocomplete() {
$json = array();
if (isset($this->request->get['filter_name'])) {
$this->load->model('feed/google_base');
if (isset($this->request->get['filter_name'])) {
$filter_name = $this->request->get['filter_name'];
} else {
$filter_name = '';
}
$filter_data = array(
'filter_name' => html_entity_decode($filter_name, ENT_QUOTES, 'UTF-8'),
'start' => 0,
'limit' => 5
);
$results = $this->model_feed_google_base->getGoogleBaseCategories($filter_data);
foreach ($results as $result) {
$json[] = array(
'google_base_category_id' => $result['google_base_category_id'],
'name' => strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8'))
);
}
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
}
<?php
class ControllerFeedGoogleSitemap extends Controller {
private $error = array();
public function index() {
$this->load->language('feed/google_sitemap');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('google_sitemap', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/feed', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['entry_status'] = $this->language->get('entry_status');
$data['entry_data_feed'] = $this->language->get('entry_data_feed');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
$data['tab_general'] = $this->language->get('tab_general');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_feed'),
'href' => $this->url->link('extension/feed', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('feed/google_sitemap', 'token=' . $this->session->data['token'], true)
);
$data['action'] = $this->url->link('feed/google_sitemap', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/feed', 'token=' . $this->session->data['token'], true);
if (isset($this->request->post['google_sitemap_status'])) {
$data['google_sitemap_status'] = $this->request->post['google_sitemap_status'];
} else {
$data['google_sitemap_status'] = $this->config->get('google_sitemap_status');
}
$data['data_feed'] = HTTP_CATALOG . 'index.php?route=feed/google_sitemap';
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('feed/google_sitemap', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'feed/google_sitemap')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
\ No newline at end of file
<?php
class ControllerFeedOpenbaypro extends Controller {
private $error = array();
public function index() {
$this->load->language('feed/openbaypro');
$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/dashboard', 'token=' . $this->session->data['token'], true),
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/feed', 'token=' . $this->session->data['token'], true),
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('feed/openbay', 'token=' . $this->session->data['token'], true),
);
$data['cancel'] = $this->url->link('extension/feed', 'token=' . $this->session->data['token'], true);
$data['heading_title'] = $this->language->get('heading_title');
$data['button_cancel'] = $this->language->get('button_cancel');
$data['text_installed'] = $this->language->get('text_installed');
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('feed/openbaypro', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'module/openbaypro')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
public function install() {
$this->load->model('setting/setting');
$this->load->model('extension/event');
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'extension/openbay');
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'extension/openbay');
$settings = $this->model_setting_setting->getSetting('openbaypro');
$settings['openbaypro_menu'] = 1;
$settings['openbaypro_status'] = 1;
$this->model_setting_setting->editSetting('openbaypro', $settings);
$this->model_extension_event->addEvent('openbay', 'admin/model/catalog/product/deleteProduct/after', 'extension/openbay/eventDeleteProduct');
$this->model_extension_event->addEvent('openbay', 'admin/model/catalog/product/editProduct/after', 'extension/openbay/eventEditProduct');
}
public function uninstall() {
$this->load->model('setting/setting');
$this->load->model('extension/event');
$settings = $this->model_setting_setting->getSetting('openbaypro');
$settings['openbaypro_menu'] = 0;
$settings['openbaypro_status'] = 0;
$this->model_setting_setting->editSetting('openbaypro', $settings);
$this->model_extension_event->deleteEvent('openbay');
}
}
This diff is collapsed. Click to expand it.
<?php
class ControllerFraudIp extends Controller {
private $error = array();
public function index() {
$this->load->language('fraud/ip');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('ip', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/fraud', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['text_ip_add'] = $this->language->get('text_ip_add');
$data['text_ip_list'] = $this->language->get('text_ip_list');
$data['text_loading'] = $this->language->get('text_loading');
$data['entry_ip'] = $this->language->get('entry_ip');
$data['entry_order_status'] = $this->language->get('entry_order_status');
$data['entry_status'] = $this->language->get('entry_status');
$data['help_ip'] = $this->language->get('help_ip');
$data['help_order_status'] = $this->language->get('help_order_status');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
$data['button_ip_add'] = $this->language->get('button_ip_add');
$data['tab_general'] = $this->language->get('tab_general');
$data['tab_ip'] = $this->language->get('tab_ip');
$data['token'] = $this->session->data['token'];
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_fraud'),
'href' => $this->url->link('extension/fraud', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('fraud/ip', 'token=' . $this->session->data['token'], true)
);
$data['action'] = $this->url->link('fraud/ip', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/fraud', 'token=' . $this->session->data['token'], true);
if (isset($this->request->post['ip_order_status_id'])) {
$data['ip_order_status_id'] = $this->request->post['ip_order_status_id'];
} else {
$data['ip_order_status_id'] = $this->config->get('ip_order_status_id');
}
$this->load->model('localisation/order_status');
$data['order_statuses'] = $this->model_localisation_order_status->getOrderStatuses();
if (isset($this->request->post['ip_status'])) {
$data['ip_status'] = $this->request->post['ip_status'];
} else {
$data['ip_status'] = $this->config->get('ip_status');
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('fraud/ip', $data));
}
public function install() {
$this->load->model('fraud/ip');
$this->model_fraud_ip->install();
}
public function uninstall() {
$this->load->model('fraud/ip');
$this->model_fraud_ip->uninstall();
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'fraud/ip')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
public function ip() {
$this->load->language('fraud/ip');
$this->load->model('fraud/ip');
$this->load->model('customer/customer');
$data['text_no_results'] = $this->language->get('text_no_results');
$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');
$data['button_remove'] = $this->language->get('button_remove');
if (isset($this->request->get['page'])) {
$page = $this->request->get['page'];
} else {
$page = 1;
}
$data['ips'] = array();
$results = $this->model_fraud_ip->getIps(($page - 1) * 10, 10);
foreach ($results as $result) {
$data['ips'][] = array(
'ip' => $result['ip'],
'total' => $this->model_customer_customer->getTotalCustomersByIp($result['ip']),
'date_added' => date('d/m/y', strtotime($result['date_added'])),
'filter_ip' => $this->url->link('customer/customer', 'token=' . $this->session->data['token'] . '&filter_ip=' . $result['ip'], true)
);
}
$ip_total = $this->model_fraud_ip->getTotalIps();
$pagination = new Pagination();
$pagination->total = $ip_total;
$pagination->page = $page;
$pagination->limit = 10;
$pagination->url = $this->url->link('fraud/ip/ip', 'token=' . $this->session->data['token'] . '&page={page}', true);
$data['pagination'] = $pagination->render();
$data['results'] = sprintf($this->language->get('text_pagination'), ($ip_total) ? (($page - 1) * 10) + 1 : 0, ((($page - 1) * 10) > ($ip_total - 10)) ? $ip_total : ((($page - 1) * 10) + 10), $ip_total, ceil($ip_total / 10));
$this->response->setOutput($this->load->view('fraud/ip_ip', $data));
}
public function addIp() {
$this->load->language('fraud/ip');
$json = array();
if (!$this->user->hasPermission('modify', 'fraud/ip')) {
$json['error'] = $this->language->get('error_permission');
} else {
$this->load->model('fraud/ip');
if (!$this->model_fraud_ip->getTotalIpsByIp($this->request->post['ip'])) {
$this->model_fraud_ip->addIp($this->request->post['ip']);
}
$json['success'] = $this->language->get('text_success');
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
public function removeIp() {
$this->load->language('fraud/ip');
$json = array();
if (!$this->user->hasPermission('modify', 'fraud/ip')) {
$json['error'] = $this->language->get('error_permission');
} else {
$this->load->model('fraud/ip');
$this->model_fraud_ip->removeIp($this->request->post['ip']);
$json['success'] = $this->language->get('text_success');
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
<?php
class ControllerMarketingContact extends Controller {
private $error = array();
public function index() {
$this->load->language('marketing/contact');
$this->document->setTitle($this->language->get('heading_title'));
$data['heading_title'] = $this->language->get('heading_title');
$data['text_default'] = $this->language->get('text_default');
$data['text_newsletter'] = $this->language->get('text_newsletter');
$data['text_customer_all'] = $this->language->get('text_customer_all');
$data['text_customer'] = $this->language->get('text_customer');
$data['text_customer_group'] = $this->language->get('text_customer_group');
$data['text_affiliate_all'] = $this->language->get('text_affiliate_all');
$data['text_affiliate'] = $this->language->get('text_affiliate');
$data['text_product'] = $this->language->get('text_product');
$data['text_loading'] = $this->language->get('text_loading');
$data['entry_store'] = $this->language->get('entry_store');
$data['entry_to'] = $this->language->get('entry_to');
$data['entry_customer_group'] = $this->language->get('entry_customer_group');
$data['entry_customer'] = $this->language->get('entry_customer');
$data['entry_affiliate'] = $this->language->get('entry_affiliate');
$data['entry_product'] = $this->language->get('entry_product');
$data['entry_subject'] = $this->language->get('entry_subject');
$data['entry_message'] = $this->language->get('entry_message');
$data['help_customer'] = $this->language->get('help_customer');
$data['help_affiliate'] = $this->language->get('help_affiliate');
$data['help_product'] = $this->language->get('help_product');
$data['button_send'] = $this->language->get('button_send');
$data['button_cancel'] = $this->language->get('button_cancel');
$data['token'] = $this->session->data['token'];
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('marketing/contact', 'token=' . $this->session->data['token'], true)
);
$data['cancel'] = $this->url->link('marketing/contact', 'token=' . $this->session->data['token'], true);
$this->load->model('setting/store');
$data['stores'] = $this->model_setting_store->getStores();
$this->load->model('customer/customer_group');
$data['customer_groups'] = $this->model_customer_customer_group->getCustomerGroups();
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('marketing/contact', $data));
}
public function send() {
$this->load->language('marketing/contact');
$json = array();
if ($this->request->server['REQUEST_METHOD'] == 'POST') {
if (!$this->user->hasPermission('modify', 'marketing/contact')) {
$json['error']['warning'] = $this->language->get('error_permission');
}
if (!$this->request->post['subject']) {
$json['error']['subject'] = $this->language->get('error_subject');
}
if (!$this->request->post['message']) {
$json['error']['message'] = $this->language->get('error_message');
}
if (!$json) {
$this->load->model('setting/store');
$store_info = $this->model_setting_store->getStore($this->request->post['store_id']);
if ($store_info) {
$store_name = $store_info['name'];
} else {
$store_name = $this->config->get('config_name');
}
$this->load->model('setting/setting');
$setting = $this->model_setting_setting->getSetting('config', $this->request->post['store_id']);
$store_email = isset($setting['config_email']) ? $setting['config_email'] : $this->config->get('config_email');
$this->load->model('customer/customer');
$this->load->model('customer/customer_group');
$this->load->model('marketing/affiliate');
$this->load->model('sale/order');
if (isset($this->request->get['page'])) {
$page = $this->request->get['page'];
} else {
$page = 1;
}
$email_total = 0;
$emails = array();
switch ($this->request->post['to']) {
case 'newsletter':
$customer_data = array(
'filter_newsletter' => 1,
'start' => ($page - 1) * 10,
'limit' => 10
);
$email_total = $this->model_customer_customer->getTotalCustomers($customer_data);
$results = $this->model_customer_customer->getCustomers($customer_data);
foreach ($results as $result) {
$emails[] = $result['email'];
}
break;
case 'customer_all':
$customer_data = array(
'start' => ($page - 1) * 10,
'limit' => 10
);
$email_total = $this->model_customer_customer->getTotalCustomers($customer_data);
$results = $this->model_customer_customer->getCustomers($customer_data);
foreach ($results as $result) {
$emails[] = $result['email'];
}
break;
case 'customer_group':
$customer_data = array(
'filter_customer_group_id' => $this->request->post['customer_group_id'],
'start' => ($page - 1) * 10,
'limit' => 10
);
$email_total = $this->model_customer_customer->getTotalCustomers($customer_data);
$results = $this->model_customer_customer->getCustomers($customer_data);
foreach ($results as $result) {
$emails[$result['customer_id']] = $result['email'];
}
break;
case 'customer':
if (!empty($this->request->post['customer'])) {
foreach ($this->request->post['customer'] as $customer_id) {
$customer_info = $this->model_customer_customer->getCustomer($customer_id);
if ($customer_info) {
$emails[] = $customer_info['email'];
}
}
}
break;
case 'affiliate_all':
$affiliate_data = array(
'start' => ($page - 1) * 10,
'limit' => 10
);
$email_total = $this->model_marketing_affiliate->getTotalAffiliates($affiliate_data);
$results = $this->model_marketing_affiliate->getAffiliates($affiliate_data);
foreach ($results as $result) {
$emails[] = $result['email'];
}
break;
case 'affiliate':
if (!empty($this->request->post['affiliate'])) {
foreach ($this->request->post['affiliate'] as $affiliate_id) {
$affiliate_info = $this->model_marketing_affiliate->getAffiliate($affiliate_id);
if ($affiliate_info) {
$emails[] = $affiliate_info['email'];
}
}
}
break;
case 'product':
if (isset($this->request->post['product'])) {
$email_total = $this->model_sale_order->getTotalEmailsByProductsOrdered($this->request->post['product']);
$results = $this->model_sale_order->getEmailsByProductsOrdered($this->request->post['product'], ($page - 1) * 10, 10);
foreach ($results as $result) {
$emails[] = $result['email'];
}
}
break;
}
if ($emails) {
$start = ($page - 1) * 10;
$end = $start + 10;
if ($end < $email_total) {
$json['success'] = sprintf($this->language->get('text_sent'), $start, $email_total);
} else {
$json['success'] = $this->language->get('text_success');
}
if ($end < $email_total) {
$json['next'] = str_replace('&amp;', '&', $this->url->link('marketing/contact/send', 'token=' . $this->session->data['token'] . '&page=' . ($page + 1), true));
} else {
$json['next'] = '';
}
$message = '<html dir="ltr" lang="en">' . "\n";
$message .= ' <head>' . "\n";
$message .= ' <title>' . $this->request->post['subject'] . '</title>' . "\n";
$message .= ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' . "\n";
$message .= ' </head>' . "\n";
$message .= ' <body>' . html_entity_decode($this->request->post['message'], ENT_QUOTES, 'UTF-8') . '</body>' . "\n";
$message .= '</html>' . "\n";
foreach ($emails as $email) {
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
$mail = new Mail();
$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
$mail->smtp_username = $this->config->get('config_mail_smtp_username');
$mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
$mail->smtp_port = $this->config->get('config_mail_smtp_port');
$mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');
$mail->setTo($email);
$mail->setFrom($store_email);
$mail->setSender(html_entity_decode($store_name, ENT_QUOTES, 'UTF-8'));
$mail->setSubject(html_entity_decode($this->request->post['subject'], ENT_QUOTES, 'UTF-8'));
$mail->setHtml($message);
$mail->send();
}
}
}
}
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
<?php
class ControllerModuleAccount extends Controller {
private $error = array();
public function index() {
$this->load->language('module/account');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('account', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['entry_status'] = $this->language->get('entry_status');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/account', 'token=' . $this->session->data['token'], true)
);
$data['action'] = $this->url->link('module/account', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], true);
if (isset($this->request->post['account_status'])) {
$data['account_status'] = $this->request->post['account_status'];
} else {
$data['account_status'] = $this->config->get('account_status');
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('module/account', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'module/account')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
\ No newline at end of file
<?php
class ControllerModuleAffiliate extends Controller {
private $error = array();
public function index() {
$this->load->language('module/affiliate');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('affiliate', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['entry_status'] = $this->language->get('entry_status');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/affiliate', 'token=' . $this->session->data['token'], true)
);
$data['action'] = $this->url->link('module/affiliate', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], true);
if (isset($this->request->post['affiliate_status'])) {
$data['affiliate_status'] = $this->request->post['affiliate_status'];
} else {
$data['affiliate_status'] = $this->config->get('affiliate_status');
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('module/affiliate', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'module/affiliate')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
\ No newline at end of file
<?php
class ControllerModuleAmazonLogin extends Controller {
private $error = array();
public function index() {
$this->load->language('module/amazon_login');
$this->load->model('setting/setting');
$this->load->model('design/layout');
$this->document->setTitle($this->language->get('heading_title'));
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('amazon_login', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['text_content_top'] = $this->language->get('text_content_top');
$data['text_content_bottom'] = $this->language->get('text_content_bottom');
$data['text_column_left'] = $this->language->get('text_column_left');
$data['text_column_right'] = $this->language->get('text_column_right');
$data['text_lwa_button'] = $this->language->get('text_lwa_button');
$data['text_login_button'] = $this->language->get('text_login_button');
$data['text_a_button'] = $this->language->get('text_a_button');
$data['text_gold_button'] = $this->language->get('text_gold_button');
$data['text_darkgray_button'] = $this->language->get('text_darkgray_button');
$data['text_lightgray_button'] = $this->language->get('text_lightgray_button');
$data['text_small_button'] = $this->language->get('text_small_button');
$data['text_medium_button'] = $this->language->get('text_medium_button');
$data['text_large_button'] = $this->language->get('text_large_button');
$data['text_x_large_button'] = $this->language->get('text_x_large_button');
$data['entry_button_type'] = $this->language->get('entry_button_type');
$data['entry_button_colour'] = $this->language->get('entry_button_colour');
$data['entry_button_size'] = $this->language->get('entry_button_size');
$data['entry_layout'] = $this->language->get('entry_layout');
$data['entry_position'] = $this->language->get('entry_position');
$data['entry_status'] = $this->language->get('entry_status');
$data['entry_sort_order'] = $this->language->get('entry_sort_order');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
$data['button_module_add'] = $this->language->get('button_module_add');
$data['button_remove'] = $this->language->get('button_remove');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true),
'separator' => false
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], true),
'separator' => ' :: '
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/amazon_login', 'token=' . $this->session->data['token'], true),
'separator' => ' :: '
);
$data['action'] = $this->url->link('module/amazon_login', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], true);
$data['token'] = $this->session->data['token'];
if (isset($this->request->post['amazon_login_button_type'])) {
$data['amazon_login_button_type'] = $this->request->post['amazon_login_button_type'];
} elseif ($this->config->get('amazon_login_button_type')) {
$data['amazon_login_button_type'] = $this->config->get('amazon_login_button_type');
} else {
$data['amazon_login_button_type'] = 'LwA';
}
if (isset($this->request->post['amazon_login_button_colour'])) {
$data['amazon_login_button_colour'] = $this->request->post['amazon_login_button_colour'];
} elseif ($this->config->get('amazon_login_button_colour')) {
$data['amazon_login_button_colour'] = $this->config->get('amazon_login_button_colour');
} else {
$data['amazon_login_button_colour'] = 'gold';
}
if (isset($this->request->post['amazon_login_button_size'])) {
$data['amazon_login_button_size'] = $this->request->post['amazon_login_button_size'];
} elseif ($this->config->get('amazon_login_button_size')) {
$data['amazon_login_button_size'] = $this->config->get('amazon_login_button_size');
} else {
$data['amazon_login_button_size'] = 'medium';
}
if (isset($this->request->post['amazon_login_status'])) {
$data['amazon_login_status'] = $this->request->post['amazon_login_status'];
} else {
$data['amazon_login_status'] = $this->config->get('amazon_login_status');
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('module/amazon_login', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'module/amazon_login')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if (!$this->error) {
return true;
} else {
return false;
}
}
public function install() {
$this->load->model('extension/event');
$this->model_extension_event->addEvent('amazon_login', 'catalog/controller/account/logout/after', 'module/amazon_login/logout');
}
public function uninstall() {
$this->load->model('extension/event');
$this->model_extension_event->deleteEvent('amazon_login');
}
}
<?php
class ControllerModuleAmazonPay extends Controller {
private $error = array();
public function index() {
$this->load->language('module/amazon_pay');
$this->load->model('setting/setting');
$this->load->model('design/layout');
$this->document->setTitle($this->language->get('heading_title'));
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('amazon_pay', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['text_content_top'] = $this->language->get('text_content_top');
$data['text_content_bottom'] = $this->language->get('text_content_bottom');
$data['text_column_left'] = $this->language->get('text_column_left');
$data['text_column_right'] = $this->language->get('text_column_right');
$data['text_pwa_button'] = $this->language->get('text_pwa_button');
$data['text_pay_button'] = $this->language->get('text_pay_button');
$data['text_a_button'] = $this->language->get('text_a_button');
$data['text_gold_button'] = $this->language->get('text_gold_button');
$data['text_darkgray_button'] = $this->language->get('text_darkgray_button');
$data['text_lightgray_button'] = $this->language->get('text_lightgray_button');
$data['text_small_button'] = $this->language->get('text_small_button');
$data['text_medium_button'] = $this->language->get('text_medium_button');
$data['text_large_button'] = $this->language->get('text_large_button');
$data['text_x_large_button'] = $this->language->get('text_x_large_button');
$data['entry_button_type'] = $this->language->get('entry_button_type');
$data['entry_button_colour'] = $this->language->get('entry_button_colour');
$data['entry_button_size'] = $this->language->get('entry_button_size');
$data['entry_layout'] = $this->language->get('entry_layout');
$data['entry_position'] = $this->language->get('entry_position');
$data['entry_status'] = $this->language->get('entry_status');
$data['entry_sort_order'] = $this->language->get('entry_sort_order');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
$data['button_module_add'] = $this->language->get('button_module_add');
$data['button_remove'] = $this->language->get('button_remove');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true),
'separator' => false
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], true),
'separator' => ' :: '
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/amazon_pay', 'token=' . $this->session->data['token'], true),
'separator' => ' :: '
);
$data['action'] = $this->url->link('module/amazon_pay', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], true);
$data['token'] = $this->session->data['token'];
if (isset($this->request->post['amazon_pay_button_type'])) {
$data['amazon_pay_button_type'] = $this->request->post['amazon_pay_button_type'];
} elseif ($this->config->get('amazon_pay_button_type')) {
$data['amazon_pay_button_type'] = $this->config->get('amazon_pay_button_type');
} else {
$data['amazon_pay_button_type'] = 'PwA';
}
if (isset($this->request->post['amazon_pay_button_colour'])) {
$data['amazon_pay_button_colour'] = $this->request->post['amazon_pay_button_colour'];
} elseif ($this->config->get('amazon_pay_button_colour')) {
$data['amazon_pay_button_colour'] = $this->config->get('amazon_pay_button_colour');
} else {
$data['amazon_pay_button_colour'] = 'gold';
}
if (isset($this->request->post['amazon_pay_button_size'])) {
$data['amazon_pay_button_size'] = $this->request->post['amazon_pay_button_size'];
} elseif ($this->config->get('amazon_pay_button_size')) {
$data['amazon_pay_button_size'] = $this->config->get('amazon_pay_button_size');
} else {
$data['amazon_pay_button_size'] = 'medium';
}
if (isset($this->request->post['amazon_pay_status'])) {
$data['amazon_pay_status'] = $this->request->post['amazon_pay_status'];
} else {
$data['amazon_pay_status'] = $this->config->get('amazon_pay_status');
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('module/amazon_pay', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'module/amazon_pay')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if (!$this->error) {
return true;
} else {
return false;
}
}
public function install() {
$this->load->model('extension/event');
$this->model_extension_event->addEvent('amazon_pay', 'catalog/controller/account/logout/after', 'module/amazon_pay/logout');
}
public function uninstall() {
$this->load->model('extension/event');
$this->model_extension_event->deleteEvent('amazon_pay');
}
}
<?php
class ControllerModuleBanner extends Controller {
private $error = array();
public function index() {
$this->load->language('module/banner');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/module');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
if (!isset($this->request->get['module_id'])) {
$this->model_extension_module->addModule('banner', $this->request->post);
} else {
$this->model_extension_module->editModule($this->request->get['module_id'], $this->request->post);
}
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['entry_name'] = $this->language->get('entry_name');
$data['entry_banner'] = $this->language->get('entry_banner');
$data['entry_width'] = $this->language->get('entry_width');
$data['entry_height'] = $this->language->get('entry_height');
$data['entry_status'] = $this->language->get('entry_status');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
if (isset($this->error['name'])) {
$data['error_name'] = $this->error['name'];
} else {
$data['error_name'] = '';
}
if (isset($this->error['width'])) {
$data['error_width'] = $this->error['width'];
} else {
$data['error_width'] = '';
}
if (isset($this->error['height'])) {
$data['error_height'] = $this->error['height'];
} else {
$data['error_height'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], true)
);
if (!isset($this->request->get['module_id'])) {
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/banner', 'token=' . $this->session->data['token'], true)
);
} else {
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/banner', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], true)
);
}
if (!isset($this->request->get['module_id'])) {
$data['action'] = $this->url->link('module/banner', 'token=' . $this->session->data['token'], true);
} else {
$data['action'] = $this->url->link('module/banner', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], true);
}
$data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], true);
if (isset($this->request->get['module_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {
$module_info = $this->model_extension_module->getModule($this->request->get['module_id']);
}
if (isset($this->request->post['name'])) {
$data['name'] = $this->request->post['name'];
} elseif (!empty($module_info)) {
$data['name'] = $module_info['name'];
} else {
$data['name'] = '';
}
if (isset($this->request->post['banner_id'])) {
$data['banner_id'] = $this->request->post['banner_id'];
} elseif (!empty($module_info)) {
$data['banner_id'] = $module_info['banner_id'];
} else {
$data['banner_id'] = '';
}
$this->load->model('design/banner');
$data['banners'] = $this->model_design_banner->getBanners();
if (isset($this->request->post['width'])) {
$data['width'] = $this->request->post['width'];
} elseif (!empty($module_info)) {
$data['width'] = $module_info['width'];
} else {
$data['width'] = '';
}
if (isset($this->request->post['height'])) {
$data['height'] = $this->request->post['height'];
} elseif (!empty($module_info)) {
$data['height'] = $module_info['height'];
} else {
$data['height'] = '';
}
if (isset($this->request->post['status'])) {
$data['status'] = $this->request->post['status'];
} elseif (!empty($module_info)) {
$data['status'] = $module_info['status'];
} else {
$data['status'] = '';
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('module/banner', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'module/banner')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 64)) {
$this->error['name'] = $this->language->get('error_name');
}
if (!$this->request->post['width']) {
$this->error['width'] = $this->language->get('error_width');
}
if (!$this->request->post['height']) {
$this->error['height'] = $this->language->get('error_height');
}
return !$this->error;
}
}
\ No newline at end of file
<?php
class ControllerModuleBestSeller extends Controller {
private $error = array();
public function index() {
$this->load->language('module/bestseller');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/module');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
if (!isset($this->request->get['module_id'])) {
$this->model_extension_module->addModule('bestseller', $this->request->post);
} else {
$this->model_extension_module->editModule($this->request->get['module_id'], $this->request->post);
}
$this->cache->delete('product');
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['entry_name'] = $this->language->get('entry_name');
$data['entry_limit'] = $this->language->get('entry_limit');
$data['entry_width'] = $this->language->get('entry_width');
$data['entry_height'] = $this->language->get('entry_height');
$data['entry_status'] = $this->language->get('entry_status');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
if (isset($this->error['name'])) {
$data['error_name'] = $this->error['name'];
} else {
$data['error_name'] = '';
}
if (isset($this->error['width'])) {
$data['error_width'] = $this->error['width'];
} else {
$data['error_width'] = '';
}
if (isset($this->error['height'])) {
$data['error_height'] = $this->error['height'];
} else {
$data['error_height'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], true)
);
if (!isset($this->request->get['module_id'])) {
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/bestseller', 'token=' . $this->session->data['token'], true)
);
} else {
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/bestseller', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], true)
);
}
if (!isset($this->request->get['module_id'])) {
$data['action'] = $this->url->link('module/bestseller', 'token=' . $this->session->data['token'], true);
} else {
$data['action'] = $this->url->link('module/bestseller', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], true);
}
$data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], true);
if (isset($this->request->get['module_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {
$module_info = $this->model_extension_module->getModule($this->request->get['module_id']);
}
if (isset($this->request->post['name'])) {
$data['name'] = $this->request->post['name'];
} elseif (!empty($module_info)) {
$data['name'] = $module_info['name'];
} else {
$data['name'] = '';
}
if (isset($this->request->post['limit'])) {
$data['limit'] = $this->request->post['limit'];
} elseif (!empty($module_info)) {
$data['limit'] = $module_info['limit'];
} else {
$data['limit'] = 5;
}
if (isset($this->request->post['width'])) {
$data['width'] = $this->request->post['width'];
} elseif (!empty($module_info)) {
$data['width'] = $module_info['width'];
} else {
$data['width'] = 200;
}
if (isset($this->request->post['height'])) {
$data['height'] = $this->request->post['height'];
} elseif (!empty($module_info)) {
$data['height'] = $module_info['height'];
} else {
$data['height'] = 200;
}
if (isset($this->request->post['status'])) {
$data['status'] = $this->request->post['status'];
} elseif (!empty($module_info)) {
$data['status'] = $module_info['status'];
} else {
$data['status'] = '';
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('module/bestseller', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'module/bestseller')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 64)) {
$this->error['name'] = $this->language->get('error_name');
}
if (!$this->request->post['width']) {
$this->error['width'] = $this->language->get('error_width');
}
if (!$this->request->post['height']) {
$this->error['height'] = $this->language->get('error_height');
}
return !$this->error;
}
}
<?php
class ControllerModuleCarousel extends Controller {
private $error = array();
public function index() {
$this->load->language('module/carousel');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('extension/module');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
if (!isset($this->request->get['module_id'])) {
$this->model_extension_module->addModule('carousel', $this->request->post);
} else {
$this->model_extension_module->editModule($this->request->get['module_id'], $this->request->post);
}
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['entry_name'] = $this->language->get('entry_name');
$data['entry_banner'] = $this->language->get('entry_banner');
$data['entry_width'] = $this->language->get('entry_width');
$data['entry_height'] = $this->language->get('entry_height');
$data['entry_status'] = $this->language->get('entry_status');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
if (isset($this->error['name'])) {
$data['error_name'] = $this->error['name'];
} else {
$data['error_name'] = '';
}
if (isset($this->error['width'])) {
$data['error_width'] = $this->error['width'];
} else {
$data['error_width'] = '';
}
if (isset($this->error['height'])) {
$data['error_height'] = $this->error['height'];
} else {
$data['error_height'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], true)
);
if (!isset($this->request->get['module_id'])) {
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/carousel', 'token=' . $this->session->data['token'], true)
);
} else {
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/carousel', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], true)
);
}
if (!isset($this->request->get['module_id'])) {
$data['action'] = $this->url->link('module/carousel', 'token=' . $this->session->data['token'], true);
} else {
$data['action'] = $this->url->link('module/carousel', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], true);
}
$data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], true);
if (isset($this->request->get['module_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {
$module_info = $this->model_extension_module->getModule($this->request->get['module_id']);
}
if (isset($this->request->post['name'])) {
$data['name'] = $this->request->post['name'];
} elseif (!empty($module_info)) {
$data['name'] = $module_info['name'];
} else {
$data['name'] = '';
}
if (isset($this->request->post['banner_id'])) {
$data['banner_id'] = $this->request->post['banner_id'];
} elseif (!empty($module_info)) {
$data['banner_id'] = $module_info['banner_id'];
} else {
$data['banner_id'] = '';
}
$this->load->model('design/banner');
$data['banners'] = $this->model_design_banner->getBanners();
if (isset($this->request->post['width'])) {
$data['width'] = $this->request->post['width'];
} elseif (!empty($module_info)) {
$data['width'] = $module_info['width'];
} else {
$data['width'] = 130;
}
if (isset($this->request->post['height'])) {
$data['height'] = $this->request->post['height'];
} elseif (!empty($module_info)) {
$data['height'] = $module_info['height'];
} else {
$data['height'] = 100;
}
if (isset($this->request->post['status'])) {
$data['status'] = $this->request->post['status'];
} elseif (!empty($module_info)) {
$data['status'] = $module_info['status'];
} else {
$data['status'] = '';
}
$this->load->model('design/banner');
$data['banners'] = $this->model_design_banner->getBanners();
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('module/carousel', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'module/carousel')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 64)) {
$this->error['name'] = $this->language->get('error_name');
}
if (!$this->request->post['width']) {
$this->error['width'] = $this->language->get('error_width');
}
if (!$this->request->post['height']) {
$this->error['height'] = $this->language->get('error_height');
}
return !$this->error;
}
}
\ No newline at end of file
<?php
class ControllerModuleCategory extends Controller {
private $error = array();
public function index() {
$this->load->language('module/category');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('category', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['entry_status'] = $this->language->get('entry_status');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], true)
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/category', 'token=' . $this->session->data['token'], true)
);
$data['action'] = $this->url->link('module/category', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], true);
if (isset($this->request->post['category_status'])) {
$data['category_status'] = $this->request->post['category_status'];
} else {
$data['category_status'] = $this->config->get('category_status');
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('module/category', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'module/category')) {
$this->error['warning'] = $this->language->get('error_permission');
}
return !$this->error;
}
}
\ No newline at end of file
<?php
class ControllerModuleEbayListing extends Controller {
private $error = array();
public function index() {
$this->load->language('module/ebay_listing');
$this->document->setTitle($this->language->get('heading_title'));
$this->document->addScript('view/javascript/openbay/js/faq.js');
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('ebay_listing', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->cache->delete('ebay');
$this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], true));
}
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_register'] = $this->language->get('text_register');
$data['text_about'] = $this->language->get('text_about');
$data['text_yes'] = $this->language->get('text_yes');
$data['text_no'] = $this->language->get('text_no');
$data['text_latest'] = $this->language->get('text_latest');
$data['text_random'] = $this->language->get('text_random');
$data['text_disabled'] = $this->language->get('text_disabled');
$data['text_enabled'] = $this->language->get('text_enabled');
$data['entry_limit'] = $this->language->get('entry_limit');
$data['entry_width'] = $this->language->get('entry_width');
$data['entry_height'] = $this->language->get('entry_height');
$data['entry_username'] = $this->language->get('entry_username');
$data['entry_keywords'] = $this->language->get('entry_keywords');
$data['entry_description'] = $this->language->get('entry_description');
$data['entry_site'] = $this->language->get('entry_site');
$data['entry_sort'] = $this->language->get('entry_sort');
$data['entry_status'] = $this->language->get('entry_status');
$data['button_save'] = $this->language->get('button_save');
$data['button_cancel'] = $this->language->get('button_cancel');
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
if (isset($this->error['width'])) {
$data['error_width'] = $this->error['width'];
} else {
$data['error_width'] = '';
}
if (isset($this->error['height'])) {
$data['error_height'] = $this->error['height'];
} else {
$data['error_height'] = '';
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true),
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], true),
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/ebay_listing', 'token=' . $this->session->data['token'], true)
);
$data['action'] = $this->url->link('module/ebay_listing', 'token=' . $this->session->data['token'], true);
$data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], true);
if (isset($this->request->post['ebay_listing_username'])) {
$data['ebay_listing_username'] = $this->request->post['ebay_listing_username'];
} else {
$data['ebay_listing_username'] = $this->config->get('ebay_listing_username');
}
if (isset($this->request->post['ebay_listing_keywords'])) {
$data['ebay_listing_keywords'] = $this->request->post['ebay_listing_keywords'];
} else {
$data['ebay_listing_keywords'] = $this->config->get('ebay_listing_keywords');
}
if (isset($this->request->post['ebay_listing_description'])) {
$data['ebay_listing_description'] = $this->request->post['ebay_listing_description'];
} else {
$data['ebay_listing_description'] = $this->config->get('ebay_listing_description');
}
if (isset($this->request->post['ebay_listing_limit'])) {
$data['ebay_listing_limit'] = $this->request->post['ebay_listing_limit'];
} elseif ($this->config->has('ebay_listing_limit')) {
$data['ebay_listing_limit'] = $this->config->get('ebay_listing_limit');
} else {
$data['ebay_listing_limit'] = 5;
}
if (isset($this->request->post['ebay_listing_width'])) {
$data['ebay_listing_width'] = $this->request->post['width'];
} elseif ($this->config->has('ebay_listing_width')) {
$data['ebay_listing_width'] = $this->config->get('ebay_listing_width');
} else {
$data['ebay_listing_width'] = 200;
}
if (isset($this->request->post['ebay_listing_height'])) {
$data['ebay_listing_height'] = $this->request->post['ebay_listing_height'];
} elseif ($this->config->has('ebay_listing_height')) {
$data['ebay_listing_height'] = $this->config->get('ebay_listing_height');
} else {
$data['ebay_listing_height'] = 200;
}
if (isset($this->request->post['ebay_listing_sort'])) {
$data['ebay_listing_sort'] = $this->request->post['ebay_listing_sort'];
} elseif ($this->config->has('ebay_listing_sort')) {
$data['ebay_listing_sort'] = $this->config->get('ebay_listing_sort');
} else {
$data['ebay_listing_sort'] = 'StartTimeNewest';
}
if (isset($this->request->post['ebay_listing_site'])) {
$data['ebay_listing_site'] = $this->request->post['ebay_listing_site'];
} else {
$data['ebay_listing_site'] = $this->config->get('ebay_listing_site');
}
$data['sites'] = array();
$data['sites'][] = array(
'text' => 'USA',
'value' => 0
);
$data['sites'][] = array(
'text' => 'UK',
'value' => 3
);
$data['sites'][] = array(
'text' => 'Australia',
'value' => 15
);
$data['sites'][] = array(
'text' => 'Canada (English)',
'value' => 2
);
$data['sites'][] = array(
'text' => 'France',
'value' => 71
);
$data['sites'][] = array(
'text' => 'Germany',
'value' => 77
);
$data['sites'][] = array(
'text' => 'Italy',
'value' => 101
);
$data['sites'][] = array(
'text' => 'Spain',
'value' => 186
);
$data['sites'][] = array(
'text' => 'Ireland',
'value' => 205
);
$data['sites'][] = array(
'text' => 'Austria',
'value' => 16
);
$data['sites'][] = array(
'text' => 'Netherlands',
'value' => 146
);
$data['sites'][] = array(
'text' => 'Belgium (French)',
'value' => 23
);
$data['sites'][] = array(
'text' => 'Belgium (Dutch)',
'value' => 123
);
if (isset($this->request->post['ebay_listing_status'])) {
$data['ebay_listing_status'] = $this->request->post['ebay_listing_status'];
} else {
$data['ebay_listing_status'] = $this->config->get('ebay_listing_status');
}
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('module/ebay_listing', $data));
}
protected function validate() {
if (!$this->user->hasPermission('modify', 'module/ebay_listing')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if (!$this->request->post['ebay_listing_width']) {
$this->error['width'] = $this->language->get('error_width');
}
if (!$this->request->post['ebay_listing_height']) {
$this->error['height'] = $this->language->get('error_height');
}
return !$this->error;
}
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.