$ page = $page
";};
if (!$page) {$page="index";};
db_connect();
// get configuration parameters
loadsettings();
///// add in pagecontent to $page_content
// check for multi-language and if so then change page to = langselect
$new_page=multi_language();
if ($new_page) {$page=$new_page;};
if ($GLOBALS["deflanguage"] <> 0) {
if($debug) {echo "DEBUG> new_page ok
\n\n";};
if ($_REQUEST["lang"]) {generatemenus($page,load_langid($_REQUEST["lang"])); };
} else {
if($debug) {echo "DEBUG> new_page not ok
\n\n";};
generatemenus($page,'');
};
// pagetype is either db/function/file depending on how to get this page read into the system.
$pagetype=check_page_exists($page);
// open local template into the $output_html global variable
if (!$_REQUEST["plainpage"]) {
readtemplate($page);
} else {
$output_html=file("$sitepath/web/template/plain.lyt");
};
getpagedata($page,$pagetype,load_langid($_REQUEST["lang"]));
rightpageblock($page."right");
$output_rightblock_html=right_parse_tags($right_block_html,get_defined_vars());
// $output_rightblock_html=parse_tags($right_block_html,get_defined_vars());
///// end of main pagecontent completion
// parse the html content for the %% replacements
$output_html=parse_tags($output_html,get_defined_vars());
if($debug) {echo "DEBUG> End of debug. Passing to browser HTML
\n