cat, $in_cats)) { $this->_sys_no_load = true; } } if (isset($loc_data['in_path'])) { $in_path = explode(',', $loc_data['in_path']); if (!array_intersect($in_path, $cat->path)) { $this->_sys_no_load = true; } } if (isset($loc_data['not_in_cat'])) { $in_cats = explode(',', $loc_data['not_in_cat']); if (in_array($cat->cat, $in_cats)) { $this->_sys_no_load = true; } } //pr($cat->path); if (isset($loc_data['not_in_path'])) { $in_path = explode(',', $loc_data['not_in_path']); if (array_intersect($in_path, $cat->path)) { $this->_sys_no_load = true; } } /* init vars */ foreach ($this->_get_vars as $k) { if (isset($_GET[$k])) { if (is_array($_GET[$k])) { $this->$k = $_GET[$k]; } else { $this->$k = addslashes($_GET[$k]); } } } foreach ($this->_post_vars as $k) { if (isset($_POST[$k])) { if (is_array($_POST[$k])) { $this->$k = $_POST[$k]; } else { $this->$k = addslashes($_POST[$k]); } } } foreach ($this->_loc_vars as $k) { if (isset($loc_data[$k])) { if (is_array($loc_data[$k])) { $this->$k = $loc_data[$k]; } else { $this->$k = $loc_data[$k]; } } } if (!$this->_init()) { cdie(); } } public function _init() { return true; } public function render($templ = '', $ajax = false) { $this->is_ajax = $ajax; if ($templ == 'body') { if ($ajax) { if (method_exists($this, '_ajax_' . $this->act)) { $render = '_ajax_' . $this->act; } else { $render = '_on_' . $this->act; } } else { $render = '_on_' . $this->act; } } else { if (method_exists($this, '_'.$templ.'_')) { $render = '_'.$templ.'_'; } else { $render = '_on_'; } } if (method_exists($this, $render)) { return $this->$render(); } else { if (!$this->url_parse()) { return $this->die404(); } else { return $this->url_parse(); } } } public function url_parse() { return false; } public function die404() { global $cat; $cat->addTitle('Страница не найдена'); Header("HTTP/1.0 404 Not Found", true, 404); $html = '