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

Location:
sandbox/expressoMail1_2/MailArchiver/2.2/mobile
Files:
6 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(){ 
  • sandbox/expressoMail1_2/MailArchiver/2.2/mobile/login.php

    r4134 r4778  
    1717        $GLOBALS['sessionid'] = @$_GET['sessionid'] ? $_GET['sessionid'] : @$_COOKIE['sessionid']; 
    1818         
    19         if(isset($GLOBALS['sessionid']) && $_GET['cd'] != 10 && $_GET['cd'] != 1) 
    20                 start_prefered_app(); 
     19        if( isset($GLOBALS['sessionid']) ) 
     20        { 
     21                if( $_GET['cd'] != 10 && $_GET['cd'] != 1 && $_GET['cd'] !== 'logout_mobile' ) 
     22                { 
     23                        start_prefered_app(); 
     24                } 
     25        } 
    2126                 
    2227        if ( $GLOBALS['phpgw_info']['server']['use_https'] > 0 ) 
     
    3540        $tmpl = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']); 
    3641        $GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] = $GLOBALS['phpgw_info']['login_template_set']; 
     42         
     43        //URL Expresso 
     44        $url_expresso = $GLOBALS['phpgw_info']['server']['webserver_url']; 
     45        $url_expresso = ( !empty($url_expresso) ) ? $url_expresso : '/'; 
     46         
     47        if(strrpos($url_expresso,'/') === false || strrpos($url_expresso,'/') != (strlen($url_expresso)-1)) 
     48        { 
     49                $url_expresso .= '/'; 
     50        } 
     51         
    3752        $tmpl->set_file(array('login_form' => 'login.tpl')); 
    3853        $tmpl->set_block('login_form','page'); 
    3954        $tmpl->set_block('login_form','success_message'); 
    4055        $tmpl->set_block('login_form','error_message'); 
     56        $tmpl->set_var('url_expresso', $url_expresso); 
     57        $tmpl->set_var('lang_username', lang('username')); 
     58        $tmpl->set_var('lang_password', lang('password')); 
     59        $tmpl->set_var('lang_login', lang('login')); 
     60         
    4161         
    4262        //verificando a mensagem erro ou sucesso 
     
    6888        function check_logoutcode($code) { 
    6989                switch($code) { 
     90                        case 'logout_mobile':  
    7091                        case 1: 
    7192                                logout(); 
     
    94115                                } 
    95116                                return lang('Your session could not be verified.'); 
     117                         
    96118                        default: 
    97119                                return ''; 
     
    108130        elseif(get_var('lem',array('GET','COOKIE')) && get_var('pem',array('GET','COOKIE'))) 
    109131        { 
    110                 if(!$_GET['cd'] || $_GET['cd'] == '1' || $_GET['cd'] == '10') {  
    111                         $submit = True; 
    112                         $login  = base64_decode(get_var('lem',array('GET','COOKIE'))); 
    113                         $passwd = base64_decode(get_var('pem',array('GET','COOKIE'))); 
    114                         $passwd_type = 'text'; 
    115                 } 
    116                 else { 
    117                         $GLOBALS['phpgw']->session->phpgw_setcookie('lem'); 
    118                         $GLOBALS['phpgw']->session->phpgw_setcookie('pem'); 
     132                if( $_GET['cd'] !== 'logout_mobile' ) 
     133                { 
     134                        if(!$_GET['cd'] || $_GET['cd'] == '1' || $_GET['cd'] == '10') 
     135                        {  
     136                                $submit = True; 
     137                                $login  = base64_decode(get_var('lem',array('GET','COOKIE'))); 
     138                                $passwd = base64_decode(get_var('pem',array('GET','COOKIE'))); 
     139                                $passwd_type = 'text'; 
     140                        } 
     141                        else 
     142                        { 
     143                                $GLOBALS['phpgw']->session->phpgw_setcookie('lem'); 
     144                                $GLOBALS['phpgw']->session->phpgw_setcookie('pem'); 
     145                        } 
    119146                } 
    120147        } 
     
    180207        $tmpl->set_var('charset',$GLOBALS['phpgw']->translation->charset()); 
    181208        $tmpl->set_var('cookie',$last_loginid); 
    182         $tmpl->set_var('lang_username', lang('username')); 
    183         $tmpl->set_var('lang_password', lang('password')); 
    184         $tmpl->set_var('lang_login', lang('login')); 
    185209        $tmpl->set_var('lang_notices', lang('notices')); 
    186210        $tmpl->set_var('website_title', $GLOBALS['phpgw_info']['server']['site_title']); 
  • sandbox/expressoMail1_2/MailArchiver/2.2/mobile/setup/phpgw_pt-br.lang

    r4051 r4778  
    6464This message don't have attachment(s)   mobile  pt-br   Este e-mail não possui anexo(s) 
    6565This message has the follow attachments:        mobile  pt-br   Esta mensagem possui anexo: 
     66Tips    mobile  pt-br   Dicas 
    6667Catalog mobile  pt-br   Catálogo 
    6768Phone   mobile  pt-br   Telefone 
  • sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/login.tpl

    r4200 r4778  
    6363 
    6464                <div class="rodape">Projeto ExpressoLivre 2004 - 2010 :: Licen&ccedil;a de Software</div> 
    65                 <div class="rodape center"><a href="/login.php?dont_redirect_if_moble=1">Versão Clássica</a></div> 
     65                <div class="rodape center"><a href="{url_expresso}login.php?dont_redirect_if_moble=1">Versão Clássica</a></div> 
    6666        </body> 
    6767</html> 
  • sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/pc_template.tpl

    r4200 r4778  
    9595                        <p>Projeto ExpressoLivre 2004 - 2010 :: Licen&ccedil;a de Software</p> 
    9696                        <p><a href="index.php?menuaction=mobile.ui_home.change_template&template=mini_mobile">{lang_mini_mobile}</a></p> 
    97                         <p><a href="/index.php">Versão Clássica</a></p> 
     97                        <p><a href="{url_expresso}">Versão Clássica</a></p> 
    9898                </div> 
    9999        </body> 
  • sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/template.tpl

    r4149 r4778  
    1313                        <div style="position:absolute; float:left; width:50%;"> 
    1414                                <div style="position:relative; float:left;"> 
    15                                         <h1 onclick="window.location='index.php?menuaction=mobile.ui_home.index'">{global_title}</h1> 
     15                                        <h1 onclick="document.location='index.php?menuaction=mobile.ui_home.index'">{global_title}</h1> 
    1616                                </div> 
    1717                        </div> 
     
    1919                        <div style="position:relative; float:right; width:50%; margin:2px;"> 
    2020                                <div style="{style_1}"> 
    21                                         <h1 onclick="window.location='index.php?menuaction=mobile.ui_home.dicas'">Dicas</h1> 
     21                                        <h1 onclick="document.location='index.php?menuaction=mobile.ui_home.dicas'">{lang_tips}</h1> 
    2222                                </div> 
    2323                                 
    2424                                <div style="{style_2}"> 
    25                                         <h1 onclick="window.location='{href_logout}'">{lang_logout}</h1> 
     25                                        <h1 onclick="document.location='{href_logout}'">{lang_logout}</h1> 
    2626                                </div> 
    2727                        </div> 
Note: See TracChangeset for help on using the changeset viewer.