Changeset 5042 for trunk/home.php


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/home.php

    r3435 r5042  
    3636        ); 
    3737        include('header.inc.php'); 
     38         
     39        //detect browser 
     40        require_once('phpgwapi/inc/class.browser.inc.php'); 
     41         
     42        $ifMobile       = false; 
     43        $browser        = new browser(); 
     44         
     45         
     46        switch( $browser->get_platform() ) 
     47        { 
     48                case browser::PLATFORM_IPHONE: 
     49                case browser::PLATFORM_IPOD: 
     50                case browser::PLATFORM_IPAD: 
     51                case browser::PLATFORM_BLACKBERRY: 
     52                case browser::PLATFORM_ANDROID:                                          
     53                        $ifMobile = false; 
     54                        break;                   
     55        } 
     56         
     57        if( $ifMobile ) 
     58        { 
     59                if( $_GET['dont_redirect_if_moble'] != 1 ) 
     60                { 
     61                        $GLOBALS['phpgw']->redirect('/mobile/index.php'); 
     62                        exit;                    
     63                } 
     64        }  
     65         
     66         
    3867        $GLOBALS['phpgw_info']['flags']['app_header']=lang('home'); 
    3968 
Note: See TracChangeset for help on using the changeset viewer.