0) { if ($_SERVER['HTTPS'] != 'on') { Header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); exit; } } /* This is the menuaction driver for the multi-layered design */ if(isset($_GET['menuaction'])) { list($mobileapp,$class,$method) = explode('.',@$_GET['menuaction']); if(! $mobileapp || ! $class || ! $method) { $invalid_data = True; } } else { //$phpgw->log->message('W-BadmenuactionVariable, menuaction missing or corrupt: %1',$menuaction); //$phpgw->log->commit(); $mobileapp = 'home'; $invalid_data = True; } $GLOBALS['phpgw_info']['flags'] = array( 'noheader' => True, 'nonavbar' => True, 'currentapp' => 'mobile', 'mobileapp' => $mobileapp, ); include('../header.inc.php'); include('./mobile_header.inc.php'); if($mobileapp == 'home') { Header('Location: ' . $GLOBALS['phpgw']->link('/mobile/home.php')); } $GLOBALS[$class] = CreateObject(sprintf('%s.%s','mobile',$class)); $public_functions = $GLOBALS[$class]->public_functions; if((is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions[$method]) && ! $invalid_data) //if((is_array($public_functions) && $public_functions[$method]) && ! $invalid_data) { execmethod($_GET['menuaction']); print_header(); print_footer(); unset($mobileapp); unset($class); unset($method); unset($invalid_data); } else { if(!$mobileapp || !$class || !$method) { if(@is_object($GLOBALS['phpgw']->log)) { $GLOBALS['phpgw']->log->message(array( 'text' => 'W-BadmenuactionVariable, menuaction missing or corrupt: %1', 'p1' => $menuaction, 'line' => __LINE__, 'file' => __FILE__ )); } } if(!is_array($GLOBALS[$class]->public_functions) || ! $GLOBALS[$class]->public_functions[$method] && $method) { if(@is_object($GLOBALS['phpgw']->log)) { $GLOBALS['phpgw']->log->message(array( 'text' => 'W-BadmenuactionVariable, attempted to access private method: %1', 'p1' => $method, 'line' => __LINE__, 'file' => __FILE__ )); } } if(@is_object($GLOBALS['phpgw']->log)) { $GLOBALS['phpgw']->log->commit(); } $GLOBALS['phpgw']->redirect_link('/mobile/home.php'); } ?>