linea21-utils
[ class tree: linea21-utils ] [ index: linea21-utils ] [ all elements ]

Source for file css_style.php

Documentation is available at css_style.php

  1. <?php
  2. /**
  3.  * @package linea21.utils
  4.  * @subpackage lib
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. function GetCurrentCssStyle({
  12.   return $current_css_style!isset($_COOKIE['linea21_style']'default' $_COOKIE['linea21_style'];
  13. }
  14.  
  15.  
  16. function StyleIt({
  17.  
  18.   switch(GetCurrentCssStyle()) {
  19.     case 'nostyle':
  20.       $content'';
  21.       $content .= '<link rel="alternate stylesheet" type="text/css" title="'.$GLOBALS['lang']['css_switcher']['minimal'].'" href="' .THEME_PUBLIC_PATH'css/minimal.css" media="screen" />'.END_LINE;
  22.       $content .= '<link rel="alternate stylesheet" type="text/css" title="'.$GLOBALS['lang']['css_switcher']['default'].'" href="' .THEME_PUBLIC_PATH'css/public.css" media="screen" />'.END_LINE;
  23.       $content .= '<link rel="alternate stylesheet" type="text/css" title="'.$GLOBALS['lang']['css_switcher']['darkstyle'].'" href="' .THEME_PUBLIC_PATH'css/darkstyle.css" media="screen" />'.END_LINE;      
  24.       break;
  25.     case 'darkstyle':
  26.       $content  '<link rel="alternate stylesheet" type="text/css" title="'.$GLOBALS['lang']['css_switcher']['minimal'].'" href="' .THEME_PUBLIC_PATH'css/minimal.css" media="screen" />'.END_LINE;
  27.       $content .= '<link rel="alternate stylesheet" type="text/css" title="'.$GLOBALS['lang']['css_switcher']['default'].'" href="' .THEME_PUBLIC_PATH'css/public.css" media="screen" />'.END_LINE;
  28.       $content .= '<link rel="stylesheet" type="text/css" href="' .THEME_PUBLIC_PATH'css/darkstyle.css" />'.END_LINE;
  29.       break;
  30.     case 'minimal':
  31.       $content  '<link rel="alternate stylesheet" type="text/css" title="'.$GLOBALS['lang']['css_switcher']['darkstyle'].'" href="' .THEME_PUBLIC_PATH'css/darkstyle.css" media="screen" />'.END_LINE;
  32.       $content .= '<link rel="alternate stylesheet" type="text/css" title="'.$GLOBALS['lang']['css_switcher']['default'].'" href="' .THEME_PUBLIC_PATH'css/public.css" media="screen" />'.END_LINE;
  33.       $content .= '<link rel="stylesheet" type="text/css" href="' .THEME_PUBLIC_PATH'css/minimal.css" />'.END_LINE;
  34.       break;
  35.     default:
  36.       $content  '<link rel="alternate stylesheet" type="text/css" title="'.$GLOBALS['lang']['css_switcher']['minimal'].'" href="' .THEME_PUBLIC_PATH'css/minimal.css" media="screen" />'.END_LINE;
  37.       $content .= '<link rel="alternate stylesheet" type="text/css" title="'.$GLOBALS['lang']['css_switcher']['darkstyle'].'" href="' .THEME_PUBLIC_PATH'css/darkstyle.css" media="screen" />'.END_LINE;
  38.       $content .= '<link rel="stylesheet" type="text/css" href="' .THEME_PUBLIC_PATH'css/public.css" media="screen" />'.END_LINE;
  39.       $content .= '<link rel="stylesheet" type="text/css" href="' .THEME_PUBLIC_PATH'css/public_' .LANGUAGE'.css" media="screen" />'.END_LINE;
  40.   }
  41.   return $content;
  42. }
  43.  
  44.  
  45.  
  46. function FooterStyleSwitcher({
  47.  
  48.   $all_styles array ($GLOBALS['lang']['css_switcher']['nostyle'=> 'nostyle',
  49.                 $GLOBALS['lang']['css_switcher']['default']  => 'default',
  50.                 $GLOBALS['lang']['css_switcher']['minimal']  => 'minimal',
  51.                 $GLOBALS['lang']['css_switcher']['darkstyle'=> 'darkstyle');
  52.  
  53.   $array=array_diff $all_stylesarray(GetCurrentCssStyle()));
  54.   $sep='';
  55.   $content='';
  56.   foreach ($array as $key => $value{
  57.     $linkarray('rub'=> $GLOBALS['links'][LANGUAGE]['css-switch']['linkvalue']'id' => $value'rewrite_override' => true);
  58.     $content.=$sep.'<a href="'.HrefMaker($link).'" title="'.$key.'">'.$key.'</a>'.END_LINE;
  59.     $sep=' - ';
  60.   }
  61.   return $content;
  62. }
  63.  
  64. ?>

Documentation generated on Fri, 16 Oct 2009 09:31:01 +0200 by phpDocumentor 1.4.1