- Timestamp:
- 07/14/11 15:18:41 (13 years ago)
- Location:
- branches/2.2/mobile
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/mobile/inc/class.mobiletemplate.inc.php
r4694 r4744 19 19 if( $template == "mini_desktop" ) 20 20 { 21 $url_expresso = $GLOBALS['phpgw_info']['server']['webserver_url']; 22 $url_expresso = ( !empty($url_expresso) ) ? $url_expresso : '/'; 23 24 if(strrpos($url_expresso,'/') === false || strrpos($url_expresso,'/') != (strlen($url_expresso)-1)) 25 { 26 $url_expresso .= '/'; 27 } 28 29 $url_expresso .= "index.php"; 21 $url_expresso = $this->getUrlExpresso() . "index.php"; 30 22 31 23 $this->template->set_file(array('home_t' => 'pc_template.tpl')); … … 144 136 145 137 $this->template->set_var('global_title', lang('expresso mini')); 146 // button logout 147 if( isset($_COOKIE['lem']) && isset($_COOKIE['pem']) ) 148 { 149 $this->template->set_var('style_1','padding-left:65%;'); 150 $this->template->set_var('style_2','position:relative; float: right; display: none'); 151 } 152 else 153 { 154 $this->template->set_var('style_1','position:absolute; float: left;'); 155 $this->template->set_var('style_2','position:relative; float: right; display: block'); 156 } 157 158 if( isset($_SESSION['mobile']['displayIOS']) && $_SESSION['mobile']['displayIOS'] == "true" ) 159 $this->template->set_var('display_IOS', "none"); 160 else 161 $this->template->set_var('display_IOS', "block"); 162 138 $this->template->set_var('style_1','position:absolute; float: left;'); 139 $this->template->set_var('style_2','position:relative; float: right; display: block'); 163 140 $this->template->set_var('lang_tips', lang('Tips')); 164 141 $this->template->set_var('lang_logout', lang('logout')); 165 142 $this->template->set_var('lang_search', lang('search')); 166 143 167 $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 } 168 161 } 169 162 … … 260 253 return $url; 261 254 } 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 } 262 268 263 269 function get_back_link(){ -
branches/2.2/mobile/login.php
r4695 r4744 17 17 $GLOBALS['sessionid'] = @$_GET['sessionid'] ? $_GET['sessionid'] : @$_COOKIE['sessionid']; 18 18 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 } 21 26 22 27 if ( $GLOBALS['phpgw_info']['server']['use_https'] > 0 ) … … 83 88 function check_logoutcode($code) { 84 89 switch($code) { 90 case 'logout_mobile': 85 91 case 1: 86 92 logout(); … … 109 115 } 110 116 return lang('Your session could not be verified.'); 117 111 118 default: 112 119 return ''; … … 123 130 elseif(get_var('lem',array('GET','COOKIE')) && get_var('pem',array('GET','COOKIE'))) 124 131 { 125 if(!$_GET['cd'] || $_GET['cd'] == '1' || $_GET['cd'] == '10') { 126 $submit = True; 127 $login = base64_decode(get_var('lem',array('GET','COOKIE'))); 128 $passwd = base64_decode(get_var('pem',array('GET','COOKIE'))); 129 $passwd_type = 'text'; 130 } 131 else { 132 $GLOBALS['phpgw']->session->phpgw_setcookie('lem'); 133 $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 } 134 146 } 135 147 } -
branches/2.2/mobile/setup/phpgw_pt-br.lang
r4051 r4744 64 64 This message don't have attachment(s) mobile pt-br Este e-mail não possui anexo(s) 65 65 This message has the follow attachments: mobile pt-br Esta mensagem possui anexo: 66 Tips mobile pt-br Dicas 66 67 Catalog mobile pt-br Catálogo 67 68 Phone mobile pt-br Telefone -
branches/2.2/mobile/templates/default/template.tpl
r4149 r4744 13 13 <div style="position:absolute; float:left; width:50%;"> 14 14 <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> 16 16 </div> 17 17 </div> … … 19 19 <div style="position:relative; float:right; width:50%; margin:2px;"> 20 20 <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> 22 22 </div> 23 23 24 24 <div style="{style_2}"> 25 <h1 onclick=" window.location='{href_logout}'">{lang_logout}</h1>25 <h1 onclick="document.location='{href_logout}'">{lang_logout}</h1> 26 26 </div> 27 27 </div>
Note: See TracChangeset
for help on using the changeset viewer.