| Server IP : 45.40.142.9 / Your IP : 216.73.216.250 Web Server : Apache System : Linux s45-40-142-9.secureserver.net 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : bayspec ( 506) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/bayspec/public_html/system/modification/catalog/controller/common/ |
Upload File : |
<?php
class ControllerCommonContentTop extends Controller {
public function index() {
$this->load->model('design/layout');
if (isset($this->request->get['route'])) {
$route = (string)$this->request->get['route'];
} else {
$route = 'common/home';
}
$layout_id = 0;
if ($route == 'blog/blog' && isset($this->request->get['blog_id'])) { $this->load->model('blog/blog');
$layout_id = $this->model_blog_blog->getBlogLayoutId($this->request->get['blog_id']);}
if ($route == 'blog/category' && isset($this->request->get['blogpath'])) { $this->load->model('blog/blog_category');
$layout_id = $this->model_blog_blog_category->getBlogCategoryLayoutId($this->request->get['blogpath']);}
if ($route == 'product/category' && isset($this->request->get['path'])) {
$this->load->model('catalog/category');
$path = explode('_', (string)$this->request->get['path']);
$layout_id = $this->model_catalog_category->getCategoryLayoutId(end($path));
}
if ($route == 'product/product' && isset($this->request->get['product_id'])) {
$this->load->model('catalog/product');
$layout_id = $this->model_catalog_product->getProductLayoutId($this->request->get['product_id']);
}
if ($route == 'information/information' && isset($this->request->get['information_id'])) {
$this->load->model('catalog/information');
$layout_id = $this->model_catalog_information->getInformationLayoutId($this->request->get['information_id']);
}
if (!$layout_id) {
$layout_id = $this->model_design_layout->getLayout($route);
}
if (!$layout_id) {
$layout_id = $this->config->get('config_layout_id');
}
$data['modules'] = array();
$modules = $this->model_design_layout->getLayoutModules($layout_id, 'content_top');
foreach ($modules as $module) {
$part = explode('.', $module['code']);
if (isset($part[0]) && $this->config->get($part[0] . '_status')) {
$data['modules'][] = $this->load->controller('module/' . $part[0]);
}
if (isset($part[1])) {
$setting_info = $this->model_extension_module->getModule($part[1]);
if ($setting_info && $setting_info['status']) {
$data['modules'][] = $this->load->controller('module/' . $part[0], $setting_info);
}
}
}
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/content_top.tpl')) {
return $this->load->view($this->config->get('config_template') . '/template/common/content_top.tpl', $data);
} else {
return $this->load->view('default/template/common/content_top.tpl', $data);
}
}
}