. **/ if(!isset($BOM)){ require_once("../config/config.php"); } function loadPart($view, $backend=false){ global $lm, $lang, $db, $BOM, $config, $schoolyear; if($lm->validateLogin()){ if($view!="" && $view!="users" && $view!="classes" && $view!="subjects" && $view!="contests" && $view!="phases" && $view!="register" && $view!="wizard" && $view!="profile" && $view!="admin"){ functions::setError(404); $view=""; } if(($view=="users") && $_SESSION['accesslevel']<3){ functions::setError(401); $view=""; } else if(($view=="classes" || $view=="subjects" || $view=="contests" || $view=="phases" || $view=="register" || $view=="wizard") && $_SESSION['accesslevel']<1){ functions::setError(401); $view=""; } else if(($view=="admin") && $_SESSION['accesslevel']<4){ functions::setError(401); $view=""; } } if($backend){ include("part/".$view."_backend.php"); } else{ include("part/".$view.".php"); } } if(isset($_GET['load'])){ loadPart($_GET['load'], isset($_GET['backend'])); }