Changeset 1851 for trunk/mobile/index.php
- Timestamp:
- 12/16/09 15:37:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mobile/index.php
r623 r1851 4 4 $phpgw_info = array(); 5 5 $GLOBALS['sessionid'] = isset($_GET['sessionid']) ? $_GET['sessionid'] : @$_COOKIE['sessionid']; 6 6 7 $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['cellShow'] = true; 8 9 $proxies=explode(',',$_SERVER['HTTP_X_FORWARDED_HOST']); 10 $fwConstruct = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $proxies[0] : $_SERVER['HTTP_HOST']; 11 7 12 if(!$GLOBALS['sessionid']) 8 { 9 $location = 'Location: login.php'; 10 Header($location); 13 { 14 //$location = 'Location: ' . $fwConstruct . 'login.php'; 15 if ($_SERVER['HTTPS'] != 'on') 16 { 17 $aux = 'http://'; 18 } 19 else 20 { 21 $aux = 'https://'; 22 } 23 Header('Location: ' . $aux . $fwConstruct . '/mobile/login.php'); 11 24 exit; 12 25 } … … 14 27 if ($GLOBALS['phpgw_info']['server']['use_https'] > 0) { 15 28 if ($_SERVER['HTTPS'] != 'on') { 16 Header('Location: https://' . $ _SERVER['HTTP_HOST']. $_SERVER['REQUEST_URI']);29 Header('Location: https://' . $fwConstruct . '/' . $_SERVER['REQUEST_URI']); 17 30 exit; 18 31 } … … 37 50 } 38 51 39 52 40 53 $GLOBALS['phpgw_info']['flags'] = array( 41 54 'noheader' => True, … … 47 60 include('../header.inc.php'); 48 61 include('./mobile_header.inc.php'); 49 62 50 63 if($mobileapp == 'home') 51 64 { 52 65 start_prefered_app(); 53 66 } 54 67 55 68 $GLOBALS[$class] = CreateObject(sprintf('%s.%s','mobile',$class)); 56 69 $public_functions = $GLOBALS[$class]->public_functions; 57 70 if((is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions[$method]) && ! $invalid_data) 58 { 59 $GLOBALS['phpgw_info']['mobiletemplate'] = CreateObject("mobile.mobiletemplate"); 60 $GLOBALS['phpgw_info']['mobiletemplate'] -> print_page($class,$method); 71 { 72 $GLOBALS['phpgw_info']['mobiletemplate'] = CreateObject("mobile.mobiletemplate"); 73 $GLOBALS['phpgw_info']['mobiletemplate'] -> print_page($class,$method); 61 74 unset($mobileapp); 62 75 unset($class); … … 95 108 { 96 109 $GLOBALS['phpgw']->log->commit(); 97 } 110 } 98 111 start_prefered_app(); 99 112 }
Note: See TracChangeset
for help on using the changeset viewer.