doLogout(); header("Location: ".$siteurl.$url_prefix); } if($_REQUEST['loginform'] == '1'){ $username = $_REQUEST['username']; $password = $_REQUEST['password']; $remember = (int)$_REQUEST['remember']; $success = $user->doLogin($username, $password, $remember); if (!$success) { $content['error'] = "Het inloggen is niet gelukt met de ingevulde gegevens."; } } $url = $_SERVER['REQUEST_URI']; if($url_prefix && $url_prefix != ""){ $url = str_replace($url_prefix,"",$url); } $menuArray = getMenuByUri($url); $breadcrumb = buildBreadcrumb($menuArray); $menu = buildMenu(); $children = getChildren($menuArray['target_id']); $content = getContentByMenuID($menuArray['target_id']); $pagetitle = buildPageTitle($menuArray); //check if formhandling is nescesary if($_REQUEST['action']=='handleform'){ //handle form (send form etc, set bodytext to confirmationtext $content = handleForm($content, $_REQUEST); } if(!$menuArray['target_id'] || $menuArray['target_id'] == '0'){ $isHomepage = 1; } else { $isHomepage = 0; } if($isHomepage != 0){ include ("templates/".getStyle($content['_style_id'])."/page_start.tpl.php"); include ("templates/".getStyle($content['_style_id'])."/page_home.tpl.php"); include ("templates/".getStyle($content['_style_id'])."/page_end.tpl.php"); } else { if($content['directopen'] == '1'){ include ("templates/".getStyle($content['_style_id'])."/directopen.tpl.php"); }else{ if(file_exists("templates/".getStyle($content['_style_id'])."/page_start.tpl.php")){ include ("templates/".getStyle($content['_style_id'])."/page_start.tpl.php"); } else { include ("templates/".getStyle(1)."/page_start.tpl.php"); } if(file_exists("templates/".getStyle($content['_style_id'])."/page_content.tpl.php")){ include ("templates/".getStyle($content['_style_id'])."/page_content.tpl.php"); } else { include ("templates/".getStyle(1)."/page_content.tpl.php"); } if(file_exists("templates/".getStyle($content['_style_id'])."/page_end.tpl.php")){ include ("templates/".getStyle($content['_style_id'])."/page_end.tpl.php"); } else { include ("templates/".getStyle(1)."/page_end.tpl.php"); } } } ?>