"€нвар€", "феврал€", "марта", "апрел€", "ма€", "июн€", "июл€", "августа", "сент€бр€", "окт€бр€", "но€бр€", "декабр€" ); $DAY = array( "понедельник", "вторник", "среда", "четверг", "п€тница", "суббота", "воскресенье", ); $sPATH = ""; include $sPATH . "system/classes/db/mysql.php"; include $sPATH . "system/config/db.php"; /** @var $db MySQL */ global $db; include("chpu_fix.php"); $_SERVER['REQUEST_URI'] = chpu_fix($_SERVER['REQUEST_URI']); $requesrUrl = ltrim(trim($_SERVER['REQUEST_URI']), '/'); if ($requesrUrl) { $groupUrls = array( mysql_real_escape_string($requesrUrl), mysql_real_escape_string('/' . $requesrUrl) ); $group = $db->SelectRecord( 'ea_goods_groups', 'id_ea_goods_groups as id, url', 'url IN ("' . implode('","', $groupUrls) . '")' ); if ($group) { $rUrl = preg_replace('/^\//', '', $_SERVER['REQUEST_URI']); $gUrl = preg_replace('/^\//', '', $group['url']); if ($rUrl != $gUrl) { header('Location: ' . '/' . $gUrl); exit; } $_SERVER['REQUEST_URI'] = '/group/options/' . $group['id'] . '/'; } } if (substr($_SERVER["REQUEST_URI"], -1) != "/" && empty($_SERVER["QUERY_STRING"])) { header('Location: /' . ltrim($_SERVER["REQUEST_URI"], '/') . '/'); exit; } include $sPATH . "system/config/config.php"; include $sPATH . "system/lib/functions.php"; if (is_file($sPATH . "templates/lib.php")) { include $sPATH . "templates/lib.php"; } $url = $_SERVER['REQUEST_URI']; $pos = strpos($url, '?'); if ($pos > 0) $url = substr($url, 0, $pos); /* echo $url."
"; $url = ereg_replace("/^/", "", $url); echo $url."
"; $url = ereg_replace("/$", "", $url); echo $url."
"; */ //if(substr($url, 0, 1) == "/") $url = substr($url, 1); //if(substr($url, -1, 1) == "/")$url = substr($url, 0, -1); $url = preg_replace('/\/$/', '', $url); $url = preg_replace('/^\//', '', $url); $dir = explode("/", $url); $PATH = str_repeat("../", count($dir) + 1); $is_values = false; $k = 1; for ($i = 0; $i < count($dir); $i++) { if ($dir[$i] == "options") { $is_values = true; continue; } if ($is_values) { $tmp = "id" . $k; $$tmp = antihacker($dir[$i]); $IDs[] = $$tmp; if ($i > 1) $path .= "/" . $dir[$i - 1]; if (preg_match('/,/', $$tmp)) { $para = array(); $para = explode(",", $$tmp); $$para[0] = antihacker($para[1]); } $k++; } else { $p[] = antihacker($dir[$i]); } } $dir = $p; unset($p); $path = substr($path, 1); $GET = strpos($path, "/?"); if ($GET > 0) { $path = substr($path, 0, $GET); } $path = antihacker($path); $LANG = "ru"; $LANGS = array($LANG => array( 'id_ea_languages' => '1', 'is_default' => 'yes', 'name' => '–усский', 'url' => 'ru', )); if (count($CHAPTERS) == 0) { $get = $db->SelectSet("ea_menu", null, null, "order by orders ASC"); foreach ($get as $value) { $CHAPTERS[$value[url]] = $value; } } $REQUEST_URI = antihacker($_SERVER["REQUEST_URI"]); if (!$NO_EA_PAGE) { if ($REQUEST_URI == "/" || $REQUEST_URI == "/" . $LANG . "/") { $get = $db->SelectSet("ea_pages", "ea_pages.*", "id_ea_languages=" . $LANGS[$LANG][id_ea_languages] . " AND ea_pages.is_start='yes'"); if (count($get) > 0 && ($LANGS[$LANG]['is_default'] != 'yes' || $REQUEST_URI == "/")) { $PAGE = $get[0]; if ($PAGE[page_type] == "dynamic") $MODULE = $PAGE[url]; } else { include ($sPATH . "templates/error.php"); exit; } } else { $get = array(); if (count($dir) > 0) foreach ($dir as $value) { $get[] = "ea_pages.url='" . $value . "'"; } $dir_sql = implode(" OR ", $get); $get = $db->SelectSet( " ea_pages INNER JOIN ea_menu ON (ea_menu.id_ea_menu=ea_pages.id_ea_menu) ", "ea_pages.id_ea_pages,ea_pages.parent,ea_pages.url,ea_pages.name,ea_pages.page_type", "ea_pages.id_ea_languages=" . $LANGS[$LANG][id_ea_languages] . " AND (" . $dir_sql . ")", "order by ea_pages.parent ASC, ea_pages.orders ASC" ); if ($db->count > 0) { foreach ($get as $value) { $pages[$value[id_ea_pages]] = $value; } $get = array(); foreach ($pages as $id => $value) { if ($value[url] == $dir[count($dir) - 1]) { $parent_now = $value[parent]; $id_now = $id; $get[] = $pages[$id_now]; $status = true; for ($i = count($dir) - 1; $i >= 0; $i--) { if ($status && $pages[$parent_now][url] == $dir[$i - 1]) { $id_now = $pages[$parent_now][id_ea_pages]; $parent_now = $pages[$parent_now][parent]; if ($pages[$id_now] != "") $get[] = $pages[$id_now]; } else $status = false; } if ($status == true) { break; } } } if (!$status) unset($id); } if (isset($id) && $get[0][url] != "") { $get = array_reverse($get); $p_url = ""; foreach ($get as $value) { $WAY[] = array( "id" => $value[id_ea_pages], "type" => $value[page_type], "name" => $value[name], "path" => $p_url . $value[url] . "/", ); $p_url .= $value[url] . "/"; } } $where = "id_ea_pages=" . $id; $get = $db->SelectSet("ea_pages", null, $where ); if (count($get) > 0) { $PAGE = $get[0]; if ($PAGE[page_type] == "dynamic") $MODULE = $PAGE[url]; } else { include ($sPATH . "templates/error.php"); exit; } } if ($MODULE != "") { ob_start(); if (trim(str_replace(" ", " ", strip_tags($PAGE[content_top]))) != "") echo '

' . $PAGE[content_top] . '

'; $CONTENT_TOP = ob_get_contents(); ob_end_clean(); ob_start(); if (trim(str_replace(" ", " ", strip_tags($PAGE[content_bottom]))) != "") echo '

' . $PAGE[content_bottom] . '

'; $CONTENT_BOTTOM = ob_get_contents(); ob_end_clean(); } $get_fragments = $db->SelectSet("ea_parts", "txt,url"); foreach ($get_fragments as $value) { $FRAGMENTS[$value[url]] = $value[txt]; } $SELF = $PATH . $LANG . "/" . @implode("/", $dir) . "/"; ob_start(); if ($MODULE != "") { include "modules/" . clearpath($MODULE) . '.php'; }else{echo $PAGE[content];} $MODULE_WORK = ob_get_contents(); ob_end_clean(); if (!$NO_SHOW) { $MODULE_WORK = $CONTENT_TOP . $MODULE_WORK . $CONTENT_BOTTOM; } if (empty($MODULE_WORK)) { $MODULE_WORK = $FRAGMENTS['empty_page']; } } if ($TEMPLATE[foldername] == "") { $template = $db->SelectSet("ea_group_templates", null, "id_ea_group_templates=" . $PAGE[id_ea_group_templates]); $TEMPLATE = $template[0]; } ?>
Notice: Use of undefined constant foldername - assumed 'foldername' in /home/vlad/web/house-dekor.ru/public_html/index.php on line 26

Notice: Undefined variable: TEMPLATE in /home/vlad/web/house-dekor.ru/public_html/index.php on line 26

Notice: Use of undefined constant need_page - assumed 'need_page' in /home/vlad/web/house-dekor.ru/public_html/index.php on line 27

Notice: Undefined variable: MODULES in /home/vlad/web/house-dekor.ru/public_html/index.php on line 27

Notice: Undefined variable: MODULE in /home/vlad/web/house-dekor.ru/public_html/index.php on line 27

Notice: Undefined variable: db in /home/vlad/web/house-dekor.ru/public_html/index.php on line 27

Fatal error: Call to a member function SelectSet() on null in /home/vlad/web/house-dekor.ru/public_html/index.php on line 27