Changeset 3553 for branches/2.2/mobile/login.php
- Timestamp:
- 12/02/10 09:35:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/mobile/login.php
r3492 r3553 19 19 if(isset($GLOBALS['sessionid']) && $_GET['cd'] != 10 && $_GET['cd'] != 1) 20 20 start_prefered_app(); 21 if ($GLOBALS['phpgw_info']['server']['use_https'] > 0) {22 if ($_SERVER['HTTPS'] != 'on')23 24 25 21 22 if ($GLOBALS['phpgw_info']['server']['use_https'] > 0) { 23 if ($_SERVER['HTTPS'] != 'on') { 24 $proxies=explode(',',$_SERVER['HTTP_X_FORWARDED_HOST']); 25 $fwConstruct = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $proxies[0] : $_SERVER['HTTP_HOST']; 26 26 Header('Location: https://' . $fwConstruct . '/' . $_SERVER['REQUEST_URI']); 27 27 exit; 28 28 } 29 29 } 30 30 … … 34 34 $GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] = $GLOBALS['phpgw_info']['login_template_set']; 35 35 $tmpl->set_file(array('login_form' => 'login.tpl')); 36 $tmpl->set_var('cd',check_logoutcode($_GET['cd'])); 36 $tmpl->set_block('login_form','page'); 37 $tmpl->set_block('login_form','success_message'); 38 $tmpl->set_block('login_form','error_message'); 39 40 //verificando a mensagem erro ou sucesso 41 $cd = check_logoutcode($_GET['cd']); 42 $tmpl->set_var('cd', $cd); 43 44 if(trim($cd) != "") 45 $tmpl->parse('message_box', (($_GET['cd'] == 1) ? 'success_message' : 'error_message') ,True); 46 37 47 $tmpl->set_var('css',CreateObject("mobile.mobiletemplate")->get_mobile_css()); 38 39 48 40 49 function check_logoutcode($code) { … … 43 52 logout(); 44 53 return lang('You have been successfully logged out'); 45 46 54 case 2: 47 55 return lang('Sorry, your login has expired'); 48 49 56 case 4: 50 57 return lang('Cookies are required to login to this site.'); 51 52 58 case 5: 53 return '<font color="FF0000">' . lang('Bad login or password') . '</font>'; 54 59 return lang('Bad login or password'); 55 60 case 6: 56 return '<font color="FF0000">' . lang('Your password has expired, and you do not have access to change it') . '</font>'; 57 61 return lang('Your password has expired, and you do not have access to change it'); 58 62 case 98: 59 return '<font color="FF0000">' . lang('Account is expired') . '</font>'; 60 63 return lang('Account is expired'); 61 64 case 99: 62 return '<font color="FF0000">' . lang('Blocked, too many attempts') . '</font>'; 63 65 return lang('Blocked, too many attempts'); 64 66 case 10: 65 67 $GLOBALS['phpgw']->session->phpgw_setcookie('sessionid'); … … 69 71 $GLOBALS['phpgw']->session->phpgw_setcookie(PHPGW_PHPSESSID); 70 72 } 71 return '<font color="#FF0000">' . lang('Your session could not be verified.') . '</font>'; 72 73 return lang('Your session could not be verified.'); 73 74 default: 74 return ' ';75 return ''; 75 76 } 76 77 } … … 115 116 $tmpl->set_var('charset',$GLOBALS['phpgw']->translation->charset()); 116 117 $tmpl->set_var('cookie',$last_loginid); 117 $tmpl->set_var('lang_username',lang('username')); 118 $tmpl->set_var('lang_password',lang('password')); 119 $tmpl->set_var('lang_login',lang('login')); 118 $tmpl->set_var('lang_username', lang('username')); 119 $tmpl->set_var('lang_password', lang('password')); 120 $tmpl->set_var('lang_login', lang('login')); 121 $tmpl->set_var('lang_notices', lang('notices')); 120 122 $tmpl->set_var('website_title', $GLOBALS['phpgw_info']['server']['site_title']); 121 123 $tmpl->set_var('template_set',$GLOBALS['phpgw_info']['login_template_set']); … … 123 125 $tmpl->set_var($var); 124 126 $tmpl->set_block('login_form','language_select'); 125 $tmpl->pfp('loginout',' login_form');127 $tmpl->pfp('loginout','page'); 126 128 127 129 function logout(){
Note: See TracChangeset
for help on using the changeset viewer.