def_content_id = DEFAULT_CONTENT; $content->def_language_id = DEFAULT_LANGUAGE; //get content_id if (!isset($_GET["cid"])){ $content_id = DEFAULT_CONTENT; }else{ $content_id = $_GET["cid"]; } //get modules if (isset($_GET["module"])){ $module = $_GET["module"]; } //get language_id if (isset($_GET["lid"])){ $language_id = $_GET["lid"]; }elseif (isset($_SESSION["language_id"])){ $language_id = $_SESSION["language_id"]; }else{ $language_id = DEFAULT_LANGUAGE; } //get content (+ images + references) if (isset($module)){ switch ($module){ case "brush_configurator": require("brush_configurator.php"); if ($module->language_id != $language_id) $language_id = $module->language_id; break; default: unset($module); break; } } //set variables in class $content->content_id = $content_id; $content->language_id = $language_id; if (!isset($_GET["editor"])) $content->check_activity(); $content->get_language_constants(); //get menu_tree $content->get_menu_tree(); $content->get_menu_tree_top(); //get languages $content->get_languages(); if (!isset($module)){ $content->get_content(); } if ($content->search == 1 && isset($_POST["search"]) && $_POST["search"] != ""){ $content->set_search_term($_POST["search"]); $content->get_search_results(); } if ($content->contact == 1){ $contact = new Smarty_CMS; $contact->assign('language', $content->language_constants); $contact->assign('language_id', $content->language_id); $contact->assign('home', $content->def_content_id); $contact->assign('text', $content->text); $contact = $contact->fetch("contact.tpl"); $content->text = $contact; $contact = true; }else{ $contact = false; } $content->text = str_replace(DOMAIN_2REPLACE, DOMAIN_BASE, $content->text); header("Content-type: text/html; charset=" . $content->charset); $smarty = new Smarty_CMS; $smarty->assign('content_id', $content->content_id); $smarty->assign('parent_id', $content->parent_id); $smarty->assign('menu', $content->menu); $smarty->assign('with_files', $content->with_files); $smarty->assign('choose_language', $content->choose_language); $smarty->assign('contact', $contact); $smarty->assign('search', $content->search); $smarty->assign('search_string', $content->search_string); $smarty->assign('search_count', $content->search_count); $smarty->assign('search_results', $content->search_results); $smarty->assign('language_id', $content->language_id); $smarty->assign('default_lid_files', DEFAULT_LANGUAGE_FILES); $smarty->assign('language', $content->language_constants); $smarty->assign('languages', $content->languages); $smarty->assign('charset', $content->charset); $smarty->assign('state_date', $content->state_date); $smarty->assign('menu_tree', $content->menu_tree); $smarty->assign('menu_tree_top', $content->menu_tree_top); $smarty->assign('topic', $content->topic); $smarty->assign('text', $content->text); $smarty->assign('images', $content->images); $smarty->assign('gallery', $content->gallery); $smarty->assign('files', $content->files); $smarty->assign('references', $content->references); $smarty->assign('reference_count', $content->reference_count); $smarty->assign('reference_first_id', $content->reference_first_id); $smarty->assign('content_path', $content->content_path); $smarty->assign('home', $content->def_content_id); //echo "
" . var_export($content, true) . "
"; $page_content = $smarty->fetch("main.tpl"); //$page_content = str_replace("index.php", "entwurf.php", $page_content); echo $page_content; //echo "test"; ?>