active_menu_name; $inc_file = $obj_menu->active_path; $level1 = $obj_menu->active_act_name; /*$titleimg = ''; if (file_exists('img/headers/'.$level3.'.gif')) $titleimg = 'img/headers/'.$level3.'.gif'; elseif (file_exists('img/headers/'.$level2.'.gif')) $titleimg = 'img/headers/'.$level2.'.gif'; elseif (file_exists('img/headers/'.$level1.'.gif')) $titleimg = 'img/headers/'.$level1.'.gif'; else if (file_exists('img/headers/about.gif')) $titleimg = 'img/headers/about.gif'; */ $TITLE = strip_tags($TITLE); $TITLE_CASTR = htmlspecialchars($TITLE); /*if (!empty($titleimg)){ $width = getimagesize($titleimg); $HEADER = ''.$TITLE_CASTR.''; } else { $HEADER = $TITLE;}*/ $HEADER = $TITLE; if ($level1 == 'main') $template_file = 'main.html'; else $template_file = 'inner.html'; if (!empty($inc_file)) if (file_exists('inc/'.$inc_file)) include('inc/'.$inc_file); if (file_exists("t/".$template_file)) $page = read_template ("t/".$template_file); if ($OUT == '') $OUT = 'Приносим свои извинения, данный раздел в настоящее время пуст!'; $LinkToEmail = 'Обратная связь'; // Block's if(file_exists(ROOT_DIR."/inc/load_blocks.php")) include(ROOT_DIR."/inc/load_blocks.php"); //if($level1 == 'main') $OUT .= '

Весь текст

'; if($level1 == 'main') $HEADER = ''; if($level1 !== 'catalog') $path = ''; $page = str_replace("{MAIN_OUT}", $OUT, $page); $page = str_replace("{HEADER}", $HEADER, $page); $page = str_replace("{PATH}", $path, $page); $page = str_replace("{TITLE}", $TITLE, $page); $page = str_replace("{SUBMENU}", $SUBMENU, $page); $page = str_replace("{NEWS_BLOCK}", $NEWS_BLOCK, $page); $page = str_replace("{CATALOG_BLOCK}", $CATALOG_BLOCK, $page); $page = str_replace("{LinkToEmail}", $LinkToEmail, $page); if (empty($DESCRIPTION)) $DESCRIPTION = NAME_SITE; $page = str_replace("{DESCRIPTION}", $DESCRIPTION, $page); $page = str_replace("{MAIN_HTTP_PATH}", $MAIN_HTTP_PATH, $page); $page = str_replace("{NAME_SITE}", NAME_SITE, $page); $page = str_replace("{MAIN_EMAIL}", MAIN_EMAIL, $page); $page = str_replace("{COPYRIGHT}", COPYRIGHT, $page); $page = str_replace("{ADDRESS}", ADDRESS, $page); $page = str_replace("{PHONE_MAIN}", PHONE_MAIN, $page); $page = str_replace("/css/", $MAIN_HTTP_PATH.'/css/', $page); $page = str_replace("/uploads/", $MAIN_HTTP_PATH.'/uploads/', $page); $page = str_replace('href="/', 'href="'.$MAIN_HTTP_PATH.'/', $page); $page = str_replace("/img/", $MAIN_HTTP_PATH.'/img/', $page); $page = str_replace("/flash/", $MAIN_HTTP_PATH.'/flash/', $page); $page = str_replace("/js/", $MAIN_HTTP_PATH.'/js/', $page); $obj_db->sql_close(); echo $page; ?>