Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

OlgaLisa

Newbie
  
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

785 profile views

OlgaLisa's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Как я понимаю за это отвечает эта часть кода protected function getChild($child, $args = array()) { $action = new Action($child, $args); if (file_exists($action->getFile())) { require_once($action->getFile()); $class = $action->getClass(); $controller = new $class($this->registry); $controller->{$action->getMethod()}($action->getArgs()); return $controller->output; } else { trigger_error('Error: Could not load controller ' . $child . '!'); exit(); } } Весь код контроллера <?php abstract class Controller { protected $registry; protected $id; protected $layout; protected $template; protected $children = array(); protected $data = array(); protected $output; public function __construct($registry) { $this->registry = $registry; } public function __get($key) { return $this->registry->get($key); } public function __set($key, $value) { $this->registry->set($key, $value); } protected function forward($route, $args = array()) { return new Action($route, $args); } protected function redirect($url, $status = 302) { header('Status: ' . $status); header('Location: ' . str_replace(array('&', "\n", "\r"), array('&', '', ''), $url)); exit(); } protected function getChild($child, $args = array()) { $action = new Action($child, $args); if (file_exists($action->getFile())) { require_once($action->getFile()); $class = $action->getClass(); $controller = new $class($this->registry); $controller->{$action->getMethod()}($action->getArgs()); return $controller->output; } else { trigger_error('Error: Could not load controller ' . $child . '!'); exit(); } } protected function render() { foreach ($this->children as $child) { $this->data[basename($child)] = $this->getChild($child); } if (file_exists(DIR_TEMPLATE . $this->template)) { extract($this->data); ob_start(); require(DIR_TEMPLATE . $this->template); $this->output = ob_get_contents(); ob_end_clean(); return $this->output; } else { trigger_error('Error: Could not load template ' . DIR_TEMPLATE . $this->template . '!'); exit(); } } } ?>
  2. Скрипт в файле Категорий под вывод последних новинок, выдает ошибку в журнале в сроке 99 PHP Notice: Undefined variable: jcats in /var/www/u0072430/data/www/kult.su/catalog/view/theme/oxy/template/module/category.tpl on line 99 register_globals = Off; Как правильно прописать? <script> $(document).ready(function(){ var click_ids = ['<?=$jcats?>']; jQuery.each(click_ids, function() { $('#cat-' + this).css('font-weight','bold'); $('#cat-' + this).click(); var link = $('#cat-' + this); var closest_ul = link.closest("ul"); var closest_plus = link.find(".cat-plus"); var closest_minus = link.find(".cat-minus"); var parallel_active_links = closest_ul.find(".active") var closest_li = link.closest("li"); var link_status = closest_li.hasClass("active"); var count = 0; $("#accordian .cat-minus").hide(); $("#accordian .cat-plus").show(); closest_ul.find("ul").slideUp(function(){ if(++count == closest_ul.find("ul").length) parallel_active_links.removeClass("active"); }); if(!link_status) { closest_li.children("ul").slideDown(); closest_li.addClass("active"); closest_plus.toggle(); closest_minus.toggle(); } }); $("#accordian a").click(function(){ var link = $(this); var closest_ul = link.closest("ul"); var closest_plus = link.find(".cat-plus"); var closest_minus = link.find(".cat-minus"); var parallel_active_links = closest_ul.find(".active") var closest_li = link.closest("li"); var link_status = closest_li.hasClass("active"); var count = 0; $("#accordian .cat-minus").hide(); $("#accordian .cat-plus").show(); // if (closest_plus.is(':visible')) closest_plus.hide(); // if (closest_minus.is(':hidden')) closest_minus.show(); // closest_plus.toggle(); // closest_minus.toggle(); closest_ul.find("ul").slideUp(function(){ if(++count == closest_ul.find("ul").length) parallel_active_links.removeClass("active"); }); if(!link_status) { closest_li.children("ul").slideDown(); closest_li.addClass("active"); closest_plus.toggle(); closest_minus.toggle(); } if ($(this).hasClass('clickable')) { } else return false; }) }) </script>
  3. catalog/Controller/module/latest.php да и этот файл я проверяла, для обеих они идентичны в каждом корне есть еще latest.php с таки содержанием <?php // Heading $_['heading_title'] = 'Новинки'; // Text $_['text_reviews'] = 'На основании %s отзывов.'; ?>
  4. Добрый вечер. Хелп ми! Не работает модуль вывода на главную последних добавленных товаров на сайт. Пишет ошибку Fatal error: Class 'Controllermodulelatest' not found in /var/www/u0072430/data/www/kult.su/system/engine/controller.php on line 41 к серверу прикреплено два идентичных сайта http://www.kult.su/ и http://www.light-inside.ru/ на одном работает на втором нет, все файлы вроде пересмотрела. Там где выдает ошибку: <?php abstract class Controller { protected $registry; protected $id; protected $layout; protected $template; protected $children = array(); protected $data = array(); protected $output; public function __construct($registry) { $this->registry = $registry; } public function __get($key) { return $this->registry->get($key); } public function __set($key, $value) { $this->registry->set($key, $value); } protected function forward($route, $args = array()) { return new Action($route, $args); } protected function redirect($url, $status = 302) { header('Status: ' . $status); header('Location: ' . str_replace(array('&', "\n", "\r"), array('&', '', ''), $url)); exit(); } protected function getChild($child, $args = array()) { $action = new Action($child, $args); if (file_exists($action->getFile())) { require_once($action->getFile()); $class = $action->getClass(); $controller = new $class($this->registry); $controller->{$action->getMethod()}($action->getArgs()); return $controller->output; } else { trigger_error('Error: Could not load controller ' . $child . '!'); exit(); } } protected function render() { foreach ($this->children as $child) { $this->data[basename($child)] = $this->getChild($child); } if (file_exists(DIR_TEMPLATE . $this->template)) { extract($this->data); ob_start(); require(DIR_TEMPLATE . $this->template); $this->output = ob_get_contents(); ob_end_clean(); return $this->output; } else { trigger_error('Error: Could not load template ' . DIR_TEMPLATE . $this->template . '!'); exit(); } } } ?> 41 строка - $controller = new $class($this->registry); файлы для обеих сайтов идентичны, но на одном идет такой сбой. С чем это может быть связано? Буду признательна за подсказка и помощь в решении этого вопроса.
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.