'; } // no personal theme or check failed, check default-theme if (isset($cfg["default_theme"])) { // either no theme set or we are in login if (@is_dir("themes/".$cfg["default_theme"]) === true) return $cfg["default_theme"]; else echo 'The default theme (-> Login-Theme) does not exist any more. Contact the System Administrator.
'; } // failure, use default return 'default'; } /** * Get the default theme that is avaible and can be used * * @return string */ function CheckandSetDefaultTheme() { global $cfg; if( isset($cfg["default_theme"]) && is_dir("themes/".$cfg["default_theme"])) { $theme = $cfg["default_theme"]; } elseif ( is_dir("themes/default") ) { $theme = "default"; $msg = "The default theme does not exist any more. System Administrator has to change default theme."; } else die("Fatal Error: No suitable theme could be found and included.
Please check your Files."); // This complettely breaks theme validation, but i haven't found a quick solution to get // an error message displayed on all sites. I think we first need to change the theme-engine to be more flexible. -danez if( isset($msg) ) echo $msg; return $theme; } ?>