$cat = $_GET["cat"]; } else { $cat = 0; } $tree = new Category($LANGCODE); $cat_from_id = -1; if (is_numeric($id) && $id > 0) { $cat_from_id = $tree->getCategoryIdFromArticle($id); } if ($cat_from_id != -1 && $cat == 0) { $cat = $cat_from_id; } $tree->transform(0); $tree->collapseAll(); if ($cat != 0) { $tree->expandTo($cat); } if (isset($cat) && $cat != 0 && $id == '' && isset($tree->categoryName[$cat])) { $title = ' - ' . $tree->categoryName[$cat]['name']; } // found an action request? if (isset($_REQUEST["action"]) && !preg_match("=/=", $_REQUEST["action"]) && isset($allowedVariables[$_REQUEST["action"]])) { $action = trim($_REQUEST["action"]); } else { $action = "main"; } /* select the template for the requested page */ if ($action != "main") { $inc_tpl = "template/" . $action . ".tpl"; $inc_php = $action . ".php"; $writeLangAdress = $_SERVER['PHP_SELF'] . "?" . str_replace("&", "&", $_SERVER["QUERY_STRING"]);