Changeset 5062
- Timestamp:
- 09/06/11 12:05:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/phpgwapi/templates/default/login_default.php
r3624 r5062 12 12 \**************************************************************************/ 13 13 14 function check_logoutcode($code)14 function check_logoutcode($code) 15 15 { 16 16 switch($code) … … 35 35 36 36 case 99: 37 37 return '<font color="FF0000">' . lang('Blocked, too many attempts(%1)! Retry in %2 minute(s)',$GLOBALS['phpgw_info']['server']['num_unsuccessful_id'],$GLOBALS['phpgw_info']['server']['block_time']) . '</font>'; 38 38 case 200: 39 39 //return '<font color="FF0000">' . lang('Invalid code') . '</font>'; 40 40 return '<font color="FF0000">' . lang('Bad login or password') . '</font>'; 41 41 break; 42 42 case 10: … … 57 57 } 58 58 } 59 59 60 $ifMobile = false; 61 $browser = CreateObject('phpgwapi.browser'); 62 switch ( $browser->get_platform() ) 63 { 64 case browser::PLATFORM_IPHONE: 65 case browser::PLATFORM_IPOD: 66 case browser::PLATFORM_IPAD: 67 case browser::PLATFORM_BLACKBERRY: 68 case browser::PLATFORM_NOKIA: 69 case browser::PLATFORM_ANDROID: 70 $ifMobile = true; 71 break; 72 } 73 74 if( $ifMobile && $_GET['dont_redirect_if_moble'] != 1 ) 75 { 76 $GLOBALS['phpgw']->redirect_link('/mobile/login.php'); 77 } 78 else 79 { 60 80 /* Program starts here */ 61 62 81 if($GLOBALS['phpgw_info']['server']['auth_type'] == 'http' && isset($_SERVER['PHP_AUTH_USER'])) 63 82 { … … 106 125 } 107 126 108 127 if( isset( $_GET[ 'cd' ] ) && ( $_GET['cd']=='1' || $_GET['cd'] == 10 ) ) 109 128 { 110 129 $_SESSION['contador'] = 0; … … 168 187 $login .= '@'.$GLOBALS['phpgw_info']['server']['default_domain']; 169 188 } 170 If(!$_GET['cd']) 171 $GLOBALS['sessionid'] = $GLOBALS['phpgw']->session->create(strtolower($login),$passwd,$passwd_type,'u'); 189 190 If(!$_GET['cd']) 191 $GLOBALS['sessionid'] = $GLOBALS['phpgw']->session->create(strtolower($login),$passwd,$passwd_type,'u'); 172 192 173 193 if(!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid']) 174 194 { 175 176 If(!$_GET['cd']) $_GET['cd'] = $GLOBALS['phpgw']->session->cd_reason; 195 If(!$_GET['cd']) $_GET['cd'] = $GLOBALS['phpgw']->session->cd_reason; 177 196 } 178 197 else … … 565 584 566 585 $tmpl->pfp('loginout','login_form'); 586 } 567 587 568 588 ?>
Note: See TracChangeset
for help on using the changeset viewer.