global $config, $template, $user; $template->assign_vars(array( 'QUANTIVE_BG_LEVEL' => "{$config['quantive_bg_level']}", 'QUANTIVE_BG_STYLE' => "{$config['quantive_bg_style']}", 'QUANTIVE_BODY_LEVEL' => "{$config['quantive_body_level']}", 'QUANTIVE_BODY_STYLE' => "{$config['quantive_body_style']}", 'QUANTIVE_CSS_STYLE' => "{$config['quantive_css_style']}", 'QUANTIVE_LINK_COLOR' => "{$config['quantive_link_color']}", 'QUANTIVE_LOGO_STYLE' => "{$config['quantive_logo_style']}", 'QUANTIVE_FONTFACE' => "{$config['quantive_fontface']}", 'QUANTIVE_ARTICLE_SURROUND_STYLE' => "{$config['quantive_article_surround_style']}", )); $current_theme = $user->theme['theme_path']; $easy_theme = $_GET['ntheme']; $bg_level = $_GET['bg_level']; if(!isset($_COOKIE[$current_theme."-tstyle"])) { $color_variation = $config['quantive_style']; } if(!empty($easy_theme)) { ob_start(); setcookie($current_theme."-tstyle", $easy_theme, time()+31536000); /* Expires in a year */ setcookie($current_theme."-bg_level", $bg_level, time()+31536000); /* Expires in a year */ header("Location: ". $_SERVER['PHP_SELF']); exit; ob_end_flush(); } if(isset($_COOKIE[$current_theme."-tstyle"])) { $color_variation = $_COOKIE[$current_theme."-tstyle"]; } if(isset($_COOKIE[$current_theme."-bg_level"])) { $bg_level = $_COOKIE[$current_theme."-bg_level"]; } switch ($_COOKIE[$current_theme."-tstyle"]) { case style1: $color_variation = "style1"; $template->assign_vars(array( 'QUANTIVE_BG_LEVEL' => "high", 'QUANTIVE_BG_STYLE' => "style1", 'QUANTIVE_BODY_LEVEL' => "high", 'QUANTIVE_BODY_STYLE' => "light", 'QUANTIVE_CSS_STYLE' => "style1", 'QUANTIVE_LINK_COLOR' => "#83AD46", 'QUANTIVE_LOGO_STYLE' => "light", 'QUANTIVE_FONTFACE' => "helvetica", 'QUANTIVE_ARTICLE_SURROUND_STYLE' => "default", )); break; case style2: $color_variation = "style2"; $template->assign_vars(array( 'QUANTIVE_BG_LEVEL' => "high", 'QUANTIVE_BG_STYLE' => "style2", 'QUANTIVE_BODY_LEVEL' => "high", 'QUANTIVE_BODY_STYLE' => "light", 'QUANTIVE_CSS_STYLE' => "style2", 'QUANTIVE_LINK_COLOR' => "#C38B3D", 'QUANTIVE_LOGO_STYLE' => "light", 'QUANTIVE_FONTFACE' => "helvetica", 'QUANTIVE_ARTICLE_SURROUND_STYLE' => "default", )); break; case style3: $color_variation = "style3"; $template->assign_vars(array( 'QUANTIVE_BG_LEVEL' => "high", 'QUANTIVE_BG_STYLE' => "style3", 'QUANTIVE_BODY_LEVEL' => "high", 'QUANTIVE_BODY_STYLE' => "light", 'QUANTIVE_CSS_STYLE' => "style3", 'QUANTIVE_LINK_COLOR' => "#1284B9", 'QUANTIVE_LOGO_STYLE' => "light", 'QUANTIVE_FONTFACE' => "helvetica", 'QUANTIVE_ARTICLE_SURROUND_STYLE' => "default", )); break; case style4: $color_variation = "style4"; $template->assign_vars(array( 'QUANTIVE_BG_LEVEL' => "high", 'QUANTIVE_BG_STYLE' => "style4", 'QUANTIVE_BODY_LEVEL' => "high", 'QUANTIVE_BODY_STYLE' => "light", 'QUANTIVE_CSS_STYLE' => "style4", 'QUANTIVE_LINK_COLOR' => "#9AA206", 'QUANTIVE_LOGO_STYLE' => "light", 'QUANTIVE_FONTFACE' => "helvetica", 'QUANTIVE_ARTICLE_SURROUND_STYLE' => "default", )); break; case style5: $color_variation = "style5"; $template->assign_vars(array( 'QUANTIVE_BG_LEVEL' => "high", 'QUANTIVE_BG_STYLE' => "style5", 'QUANTIVE_BODY_LEVEL' => "high", 'QUANTIVE_BODY_STYLE' => "light", 'QUANTIVE_CSS_STYLE' => "style5", 'QUANTIVE_LINK_COLOR' => "#C00A15", 'QUANTIVE_LOGO_STYLE' => "light", 'QUANTIVE_FONTFACE' => "helvetica", 'QUANTIVE_ARTICLE_SURROUND_STYLE' => "default", )); break; case style6: $color_variation = "style6"; $template->assign_vars(array( 'QUANTIVE_BG_LEVEL' => "high", 'QUANTIVE_BG_STYLE' => "style6", 'QUANTIVE_BODY_LEVEL' => "high", 'QUANTIVE_BODY_STYLE' => "light", 'QUANTIVE_CSS_STYLE' => "style6", 'QUANTIVE_LINK_COLOR' => "#009D93", 'QUANTIVE_LOGO_STYLE' => "dark", 'QUANTIVE_FONTFACE' => "helvetica", 'QUANTIVE_ARTICLE_SURROUND_STYLE' => "default", )); break; case style7: $color_variation = "style7"; $template->assign_vars(array( 'QUANTIVE_BG_LEVEL' => "high", 'QUANTIVE_BG_STYLE' => "style7", 'QUANTIVE_BODY_LEVEL' => "high", 'QUANTIVE_BODY_STYLE' => "dark", 'QUANTIVE_CSS_STYLE' => "style2", 'QUANTIVE_LINK_COLOR' => "#D232D1", 'QUANTIVE_LOGO_STYLE' => "dark", 'QUANTIVE_FONTFACE' => "helvetica", 'QUANTIVE_ARTICLE_SURROUND_STYLE' => "default", )); break; case style8: $color_variation = "style8"; $template->assign_vars(array( 'QUANTIVE_BG_LEVEL' => "high", 'QUANTIVE_BG_STYLE' => "style8", 'QUANTIVE_BODY_LEVEL' => "high", 'QUANTIVE_BODY_STYLE' => "light", 'QUANTIVE_CSS_STYLE' => "style8", 'QUANTIVE_LINK_COLOR' => "#9BB025", 'QUANTIVE_LOGO_STYLE' => "dark", 'QUANTIVE_FONTFACE' => "helvetica", 'QUANTIVE_ARTICLE_SURROUND_STYLE' => "default", )); break; case style9: $color_variation = "style9"; $template->assign_vars(array( 'QUANTIVE_BG_LEVEL' => "high", 'QUANTIVE_BG_STYLE' => "style5", 'QUANTIVE_BODY_LEVEL' => "high", 'QUANTIVE_BODY_STYLE' => "dark", 'QUANTIVE_CSS_STYLE' => "style5", 'QUANTIVE_LINK_COLOR' => "#F09014", 'QUANTIVE_LOGO_STYLE' => "light", 'QUANTIVE_FONTFACE' => "helvetica", 'QUANTIVE_ARTICLE_SURROUND_STYLE' => "default", )); break; case style10: $color_variation = "style10"; $template->assign_vars(array( 'QUANTIVE_BG_LEVEL' => "high", 'QUANTIVE_BG_STYLE' => "style1", 'QUANTIVE_BODY_LEVEL' => "high", 'QUANTIVE_BODY_STYLE' => "dark", 'QUANTIVE_CSS_STYLE' => "style1", 'QUANTIVE_LINK_COLOR' => "#91BF4B", 'QUANTIVE_LOGO_STYLE' => "light", 'QUANTIVE_FONTFACE' => "helvetica", 'QUANTIVE_ARTICLE_SURROUND_STYLE' => "default", )); break; } $delete_cookies = $_GET['delete_cookies']; if($delete_cookies == 'true') { ob_start(); setcookie($current_theme."-tstyle", "", time()-31536000); setcookie($current_theme."-bg_level", "", time()-31536000); header("Location: ". $_SERVER['PHP_SELF']); exit; ob_end_flush(); }