- $act = ""; $wht = "";
- if (!empty($GLOBALS['action'])) $act = SQL_ESCAPE($GLOBALS['action']);
- if (!empty($GLOBALS['what'])) $wht = SQL_ESCAPE($GLOBALS['what']);
- $OUT = THEME_SELECTION_BOX("login", $act, $wht, $result_themes);
-} elseif (($num_themes == 1) || ((!IS_ADMIN()) && ($num_themes == 0))) {
- // If there's only one just print it's name
- global $THEME_NAME;
- define('__THEME_NAME', $THEME_NAME);
- $OUT = LOAD_TEMPLATE("theme_one", true);
-} elseif (IS_ADMIN()) {
+ $OUT = generateThemeSelectionBox();
+} elseif (($num_themes == 1) || ((!isAdmin()) && ($num_themes == 0))) {
+ // If there's only one just output it's name
+ $OUT = loadTemplate('theme_one', true, getCurrentThemeName());
+} elseif (isAdmin()) {