Ignore:
Timestamp:
10/25/10 17:46:06 (14 years ago)
Author:
rafaelraymundo
Message:

Ticket #1309 - Escolha automática do tema, em função da url do cliente.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/phpgwapi/inc/functions.inc.php

    r3052 r3410  
    6464        } 
    6565 
     66        function get_theme() 
     67        { 
     68 
     69            $test_cookie = get_var('THEME', 'COOKIE'); 
     70 
     71            // se o cookie foi definido coloca tema na sessão 
     72            if (!empty($test_cookie)) 
     73            { 
     74                $_SESSION['THEME'] = $test_cookie; 
     75            } 
     76 
     77            // se tema não estiver definido na sessão retorna $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] 
     78            if (!$_SESSION['THEME']) 
     79            { 
     80                return $GLOBALS['phpgw_info']['user']['preferences']['common']['theme']; 
     81            } 
     82             
     83            // senão retorna o tema definido na sessão 
     84            return $_SESSION['THEME']; 
     85        } 
     86 
    6687        /* Make sure the header.inc.php is current. */ 
    6788        if ($GLOBALS['phpgw_info']['server']['versions']['header'] < $GLOBALS['phpgw_info']['server']['versions']['current_header']) 
Note: See TracChangeset for help on using the changeset viewer.