Changeset 5042 for trunk/phpgwapi


Ignore:
Timestamp:
09/05/11 18:52:58 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #2260 - Sincronismo do branch2.2(versão 2.2.8) para 2.4 ajustes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/templates/default/login_default.php

    r5036 r5042  
    5757                } 
    5858        } 
    59         function troca_espaco_por_mais($pem_data) 
    60         { 
    61             $begin = "CERTIFICATE-----"; 
    62             $end   = "-----END"; 
    63             $aux = substr($pem_data, strpos($pem_data, $begin)+strlen($begin)); 
    64             $aux = substr($aux, 0, strpos($aux, $end)); 
    65             $aux = strtr($aux,' ','+'); 
    66             $aux = '-----BEGIN CERTIFICATE-----'.$aux.'-----END CERTIFICATE-----'; 
    67             return $aux; 
    68         } 
    69         /* Program starts here */ 
    70          
     59         
     60        $ifMobile = false; 
     61        $browser = CreateObject('phpgwapi.browser'); 
     62        switch ( $browser->get_platform() ) 
     63        { 
     64                case browser::PLATFORM_IPHONE: 
     65                case browser::PLATFORM_IPOD: 
     66                case browser::PLATFORM_IPAD: 
     67                case browser::PLATFORM_BLACKBERRY: 
     68                case browser::PLATFORM_NOKIA: 
     69                case browser::PLATFORM_ANDROID: 
     70                        $ifMobile = true;                                                
     71                        break; 
     72        } 
     73         
     74        if( $ifMobile && $_GET['dont_redirect_if_moble'] != 1 )  
     75        { 
     76                $GLOBALS['phpgw']->redirect_link('/mobile/login.php'); 
     77        } 
     78        else 
     79        { 
     80        /* Program starts here */ 
    7181        if($GLOBALS['phpgw_info']['server']['auth_type'] == 'http' && isset($_SERVER['PHP_AUTH_USER'])) 
    7282        { 
     
    114124                unset($sslattributes); 
    115125        } 
    116         if(isset($_POST['certificado']) && $_POST['certificado']) 
    117         { 
    118             $_SESSION['login_certificate'] = troca_espaco_por_mais(str_replace(chr(0x0D).chr(0x0A),chr(0x0A),str_replace(chr(0x0A).chr(0x0A),chr(0x0A),$_POST['certificado']))); 
    119         } 
    120         if( isset( $_GET[ 'cd' ] ) && ( $_GET['cd']=='1' || $_GET['cd'] == 10 ) ) 
     126 
     127    if( isset( $_GET[ 'cd' ] ) && ( $_GET['cd']=='1' || $_GET['cd'] == 10 ) ) 
    121128        { 
    122129            $_SESSION['contador'] = 0; 
     
    210217                                list($forward,$extra_vars) = explode('?',$forward,2); 
    211218                        } 
    212  
    213219                if ($GLOBALS['phpgw_info']['server']['use_https'] != 2) 
    214220                        { 
     
    260266                        */ 
    261267                        $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $lang; 
    262  
    263                         if (!isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme'])) 
    264                         { 
    265                                 $prefs2 = CreateObject('phpgwapi.preferences'); 
    266                                 $temp_pref = $prefs2->read_repository(); 
    267                                 $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = $temp_pref['common']['theme']; 
    268                         } 
    269268                } 
    270269                #print 'LANG:' . $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] . '<br>'; 
     
    386385        $tmpl->set_var('website_title', $GLOBALS['phpgw_info']['server']['site_title']); 
    387386        $tmpl->set_var('template_set', $template); 
    388         $tmpl->set_var('compatIE8',lang("The compatibility mode for internet explorer 8 is active. Turn it of if you want to use the local mail functionality.")); 
    389387 
    390388        // loads the template's login.css 
Note: See TracChangeset for help on using the changeset viewer.