Ignore:
Timestamp:
07/15/11 18:03:42 (13 years ago)
Author:
fernando-alberto
Message:

Ticket #1269 - Mergiando revisoes do branch22 de rev4644 ate rev4755

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/expressoMail1_2/MailArchiver/2.2/mobile/inc/class.mobiletemplate.inc.php

    r4188 r4778  
    1919                        if( $template == "mini_desktop" ) 
    2020                        { 
     21                                $url_expresso = $this->getUrlExpresso() . "index.php"; 
     22                                 
    2123                                $this->template->set_file(array('home_t' => 'pc_template.tpl')); 
    2224                                $this->template->set_file(array('home_t_search_bar' => 'search_bar.tpl')); 
    2325                                $this->template->set_block('home_t_search_bar','search_bar'); 
    2426                                $this->template->set_var('search',$this->template->fp('out','search_bar')); 
     27                                $this->template->set_var('url_expresso',$url_expresso); 
    2528                                $this->template->set_var('lang_mini_mobile', lang('mini mobile')); 
    2629                                $this->template->set_var('lang_search_error_message',lang("need choose one option")); 
     
    133136                         
    134137                        $this->template->set_var('global_title', lang('expresso mini')); 
    135                         // button logout 
    136                         if( isset($_COOKIE['lem']) && isset($_COOKIE['pem']) ) 
    137                         { 
    138                                 $this->template->set_var('style_1','padding-left:65%;'); 
    139                                 $this->template->set_var('style_2','position:relative; float: right; display: none'); 
    140                         } 
    141                         else 
    142                         { 
    143                                 $this->template->set_var('style_1','position:absolute; float: left;'); 
    144                                 $this->template->set_var('style_2','position:relative; float: right; display: block'); 
    145                         } 
    146  
    147                         if( isset($_SESSION['mobile']['displayIOS']) && $_SESSION['mobile']['displayIOS'] == "true" ) 
    148                                 $this->template->set_var('display_IOS', "none"); 
    149                         else 
    150                                 $this->template->set_var('display_IOS', "block"); 
    151                                  
     138                        $this->template->set_var('style_1','position:absolute; float: left;'); 
     139                        $this->template->set_var('style_2','position:relative; float: right; display: block'); 
    152140                        $this->template->set_var('lang_tips', lang('Tips')); 
    153141                        $this->template->set_var('lang_logout', lang('logout')); 
    154142                        $this->template->set_var('lang_search', lang('search')); 
    155143                         
    156                         $this->template->set_var('href_logout', 'login.php?cd=1'); 
     144                        if( isset($_SESSION['mobile']['displayIOS']) && $_SESSION['mobile']['displayIOS'] == "true" ) 
     145                        { 
     146                                $this->template->set_var('display_IOS', "none"); 
     147                        } 
     148                        else 
     149                        { 
     150                                $this->template->set_var('display_IOS', "block"); 
     151                        } 
     152 
     153                        if( isset($_COOKIE['lem']) && isset($_COOKIE['pem']) ) 
     154                        { 
     155                                $this->template->set_var('href_logout', 'login.php?cd=logout_mobile'); 
     156                        } 
     157                        else 
     158                        { 
     159                                $this->template->set_var('href_logout', 'login.php?cd=1'); 
     160                        } 
    157161                } 
    158162                 
     
    249253                        return $url; 
    250254                } 
     255                 
     256                private function getUrlExpresso() 
     257                { 
     258                        $url_expresso = $GLOBALS['phpgw_info']['server']['webserver_url']; 
     259                        $url_expresso = ( !empty($url_expresso) ) ? $url_expresso : '/'; 
     260         
     261                        if(strrpos($url_expresso,'/') === false || strrpos($url_expresso,'/') != (strlen($url_expresso)-1)) 
     262                        { 
     263                                $url_expresso .= '/'; 
     264                        } 
     265 
     266                        return $url_expresso; 
     267                } 
    251268 
    252269                function get_back_link(){ 
Note: See TracChangeset for help on using the changeset viewer.