Changeset 1851 for trunk/mobile/login.php
- Timestamp:
- 12/16/09 15:37:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mobile/login.php
r623 r1851 11 11 'noheader' => True 12 12 ); 13 14 include('../header.inc.php'); 15 include('./mobile_header.inc.php'); 13 14 include('../header.inc.php'); 15 include('./mobile_header.inc.php'); 16 16 $GLOBALS['sessionid'] = @$_GET['sessionid'] ? $_GET['sessionid'] : @$_COOKIE['sessionid']; 17 17 18 18 if(isset($GLOBALS['sessionid']) && $_GET['cd'] != 10 && $_GET['cd'] != 1) 19 start_prefered_app(); 19 start_prefered_app(); 20 20 if ($GLOBALS['phpgw_info']['server']['use_https'] > 0) { 21 if ($_SERVER['HTTPS'] != 'on') { 22 Header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 21 if ($_SERVER['HTTPS'] != 'on') 22 { 23 $proxies=explode(',',$_SERVER['HTTP_X_FORWARDED_HOST']); 24 $fwConstruct = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $proxies[0] : $_SERVER['HTTP_HOST']; 25 Header('Location: https://' . $fwConstruct . '/' . $_SERVER['REQUEST_URI']); 23 26 exit; 24 27 } 25 28 } 26 27 $GLOBALS['phpgw']->session = CreateObject('phpgwapi.sessions'); 28 $GLOBALS['phpgw_info']['server']['template_dir'] = PHPGW_SERVER_ROOT.$GLOBALS['phpgw_info']['flags']['currentdir'].'/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']; 29 30 $GLOBALS['phpgw']->session = CreateObject('phpgwapi.sessions'); 31 $GLOBALS['phpgw_info']['server']['template_dir'] = PHPGW_SERVER_ROOT.$GLOBALS['phpgw_info']['flags']['currentdir'].'/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']; 29 32 $tmpl = CreateObject('phpgwapi.Template', $GLOBALS['phpgw_info']['server']['template_dir']); 30 33 $GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] = $GLOBALS['phpgw_info']['login_template_set']; 31 34 $tmpl->set_file(array('login_form' => 'login.tpl')); 32 35 $tmpl->set_var('cd',check_logoutcode($_GET['cd'])); 33 36 34 37 function check_logoutcode($code) { 35 38 switch($code) { … … 95 98 $GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'] .$GLOBALS['phpgw_info']['flags']['currentdir'].'/login.php?cd=' . $GLOBALS['phpgw']->session->cd_reason); 96 99 } 97 else{ 100 else{ 98 101 start_prefered_app(); 99 102 } … … 115 118 $tmpl->set_var('lang_username',"Usuário"); 116 119 $tmpl->set_var('lang_password',"Senha"); 117 $tmpl->set_var('lang_login',"Login"); 120 $tmpl->set_var('lang_login',"Login"); 118 121 $tmpl->set_var('website_title', $GLOBALS['phpgw_info']['server']['site_title']); 119 122 $tmpl->set_var('template_set',$GLOBALS['phpgw_info']['login_template_set']); … … 123 126 $tmpl->pfp('loginout','login_form'); 124 127 125 function logout(){ 128 function logout(){ 126 129 $verified = $GLOBALS['phpgw']->session->verify(); 127 130 if ($verified)
Note: See TracChangeset
for help on using the changeset viewer.