// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
-global $CurrTheme;
+global $currTheme;
// Check for selected themes
$SEL = 0;
// Set session
set_session("mxchange_theme", $POST['default_theme']);
+ // Set it in config and current theme as well
+ $currTheme = $POST['default_theme'];
+ $_CONFIG['default_theme'] = $POST['default_theme'];
+
// Save theme
ADMIN_SAVE_SETTINGS($POST);
}
// Is the loaded theme name != current theme name?
$LINK = $unix;
- if ($unix != $CurrTheme) $LINK = "<A href=\"".URL."/modules.php?module=admin&what=theme_edit&default_theme=".$unix."\" title=\"".ADMIN_SET_AS_NEW_THEME."\">".$unix."</A>";
+ if ($unix != $currTheme) $LINK = "<A href=\"".URL."/modules.php?module=admin&what=theme_edit&default_theme=".$unix."\" title=\"".ADMIN_SET_AS_NEW_THEME."\">".$unix."</A>";
// Prepare data for the row template
$content = array(
UPDATE_ONLINE_LIST(get_session('PHPSESSID'), $GLOBALS['module'], $GLOBALS['action'], $GLOBALS['what']);
// Load theme name
- $CurrTheme = GET_CURR_THEME();
+ $currTheme = GET_CURR_THEME();
// Set default 'what' value
//* DEBUG */ echo "-".$GLOBALS['module']."/".$GLOBALS['what']."-<br />\n";
function THEME_SELECTION_BOX($mod, $act, $wht, $result)
{
// Construction URL
- global $CurrTheme;
+ global $currTheme;
$FORM = URL."/modules.php?module=".$mod;
if (!empty($act)) $FORM .= "&action=".$act;
if (!empty($wht)) $FORM .= "&what=".$wht;
foreach ($THEMES['theme_unix'] as $key=>$theme)
{
$OUT .= " <OPTION value=\"".$theme."\"";
- if ($theme == $CurrTheme) $OUT .= " selected=\"selected\"";
+ if ($theme == $currTheme) $OUT .= " selected=\"selected\"";
$OUT .= ">".$THEMES['theme_name'][$key]."</OPTION>\n";
}
}
// Initialize variables
-$CurrTheme = GET_CURR_THEME();
+$currTheme = GET_CURR_THEME();
if (empty($_POST['new_theme'])) $_POST['new_theme'] = "";
// Check if new theme is selcted
-if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $CurrTheme))
+if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $currTheme))
{
// Set new theme for guests
$NewTheme = $_POST['new_theme'];
set_session("mxchange_theme", $NewTheme);
// Remove current from array and set new
- $theme = PATH."theme/".$CurrTheme."/theme.php";
+ $theme = PATH."theme/".$currTheme."/theme.php";
unset($INC_POOL[array_search($theme, $INC_POOL)]);
$INC_POOL[] = PATH."theme/".$NewTheme."/theme.php";
}