- Timestamp:
- 07/15/11 18:03:42 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/expressoMail1_2/MailArchiver/2.2/mobile/login.php
r4134 r4778 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 ) … … 35 40 $tmpl = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']); 36 41 $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 37 52 $tmpl->set_file(array('login_form' => 'login.tpl')); 38 53 $tmpl->set_block('login_form','page'); 39 54 $tmpl->set_block('login_form','success_message'); 40 55 $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 41 61 42 62 //verificando a mensagem erro ou sucesso … … 68 88 function check_logoutcode($code) { 69 89 switch($code) { 90 case 'logout_mobile': 70 91 case 1: 71 92 logout(); … … 94 115 } 95 116 return lang('Your session could not be verified.'); 117 96 118 default: 97 119 return ''; … … 108 130 elseif(get_var('lem',array('GET','COOKIE')) && get_var('pem',array('GET','COOKIE'))) 109 131 { 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 } 119 146 } 120 147 } … … 180 207 $tmpl->set_var('charset',$GLOBALS['phpgw']->translation->charset()); 181 208 $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'));185 209 $tmpl->set_var('lang_notices', lang('notices')); 186 210 $tmpl->set_var('website_title', $GLOBALS['phpgw_info']['server']['site_title']);
Note: See TracChangeset
for help on using the changeset viewer.