diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index 44edba2ba..4f231441d 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -55,6 +55,29 @@ else $focusWindow = true; xhtmlHeaders( __FILE__, translate('Options') ); + +# Have to do this stuff up here before including header.php because fof the cookie setting +$skin_options = array_map( 'basename', glob('skins/*',GLOB_ONLYDIR) ); +if($tab == 'skins') { + $current_skin = $_COOKIE['zmSkin']; + $reload = false; + if ( isset($_GET['skin-choice']) && ( $_GET['skin-choice'] != $current_skin ) ) { + setcookie('zmSkin',$_GET['skin-choice'], time()+3600*24*30*12*10 ); + //header("Location: index.php?view=options&tab=skins&reset_parent=1"); + $reload = true; + } + $current_css = $_COOKIE['zmCSS']; +Error("Current css $current_css"); + if ( isset($_GET['css-choice']) and ( $_GET['css-choice'] != $current_css ) ) { +Error("setting css $current_css to " . $_GET['css-choice']); + setcookie('zmCSS',$_GET['css-choice'], time()+3600*24*30*12*10 ); + //header("Location: index.php?view=options&tab=skins&reset_parent=1"); + $reload = true; + } + if ( $reload ) + echo ""; +} # end if tab == skins + ?> @@ -65,43 +88,16 @@ xhtmlHeaders( __FILE__, translate('Options') ); $value ) { - if ( $tab == $name ) - { ?> -
  • + > -
  • -
    window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\""; - ?>