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="minimal" href="../gfx/' .THEME_PUBLIC'/css/minimal.css" media="screen" />'.END_LINE;
  22.       $content .= '<link rel="alternate stylesheet" type="text/css" title="classique" href="../gfx/' .THEME_PUBLIC'/css/public.css" media="screen" />'.END_LINE;
  23.       $content .= '<link rel="alternate stylesheet" type="text/css" title="blanc sur noir" href="../gfx/' .THEME_PUBLIC'/css/darkstyle.css" media="screen" />'.END_LINE;
  24.       break;
  25.     case 'darkstyle':
  26.       $content  '<link rel="alternate stylesheet" type="text/css" title="minimal" href="../gfx/' .THEME_PUBLIC'/css/minimal.css" media="screen" />'.END_LINE;
  27.       $content .= '<link rel="alternate stylesheet" type="text/css" title="classique" href="../gfx/' .THEME_PUBLIC'/css/public.css" media="screen" />'.END_LINE;
  28.       $content .= '<link rel="stylesheet" type="text/css" href="../gfx/' .THEME_PUBLIC'/css/darkstyle.css" />'.END_LINE;
  29.       break;
  30.     case 'minimal':
  31.       $content  '<link rel="alternate stylesheet" type="text/css" title="blanc sur noir" href="../gfx/' .THEME_PUBLIC'/css/darkstyle.css" media="screen" />'.END_LINE;
  32.       $content .= '<link rel="alternate stylesheet" type="text/css" title="classique" href="../gfx/' .THEME_PUBLIC'/css/public.css" media="screen" />'.END_LINE;
  33.       $content .= '<link rel="stylesheet" type="text/css" href="../gfx/' .THEME_PUBLIC'/css/minimal.css" />'.END_LINE;
  34.       break;
  35.     default:
  36.       $content  '<link rel="alternate stylesheet" type="text/css" title="minimal" href="../gfx/' .THEME_PUBLIC'/css/minimal.css" media="screen" />'.END_LINE;
  37.       $content .= '<link rel="alternate stylesheet" type="text/css" title="blanc sur noir" href="../gfx/' .THEME_PUBLIC'/css/darkstyle.css" media="screen" />'.END_LINE;
  38.       $content .= '<link rel="stylesheet" type="text/css" href="../gfx/' .THEME_PUBLIC'/css/public.css" media="screen" />'.END_LINE;
  39.       $content .= '<link rel="stylesheet" type="text/css" href="../gfx/' .THEME_PUBLIC'/css/public_' .LANGUAGE'.css" media="screen" />'.END_LINE;
  40.   }
  41.   return $content;
  42. }
  43.  
  44.  
  45.  
  46. function FooterStyleSwitcher({
  47.  
  48.   $all_styles array ('aucun style' => 'nostyle',
  49.                 'classique'  => 'default',
  50.                 'minimal'  => 'minimal',
  51.                 'blanc sur noir' => '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).'">'.$key.'</a>'.END_LINE;
  59.     $sep=' - ';
  60.   }
  61.   return $content;
  62. }
  63.  
  64. ?>

Documentation generated on Sat, 08 Nov 2008 14:51:42 +0100 by phpDocumentor 1.4.1