log->message('W-BadmenuactionVariable, menuaction missing or corrupt: %1',$menuaction);
//$phpgw->log->commit();
$app = 'home';
$invalid_data = True;
}
if($app == 'phpgwapi')
{
$app = 'home';
$api_requested = True;
}
$GLOBALS['phpgw_info']['flags'] = array(
'noheader' => True,
'nonavbar' => True,
'currentapp' => $app
);
include('./header.inc.php');
if (($GLOBALS['phpgw_info']['server']['use_https'] == 2) && ($_SERVER['HTTPS'] != 'on'))
{
Header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
exit;
}
if($app == 'home' && !$api_requested)
{
if( $_GET['dont_redirect_if_moble'] == 1 )
Header('Location: ' . $GLOBALS['phpgw']->link('/home.php?dont_redirect_if_moble=1'));
else
Header('Location: ' . $GLOBALS['phpgw']->link('/home.php'));
}
if($api_requested)
{
$app = 'phpgwapi';
}
$GLOBALS[$class] = CreateObject(sprintf('%s.%s',$app,$class));
if((is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions[$method]) && ! $invalid_data)
{
execmethod($_GET['menuaction']);
unset($app);
unset($class);
unset($method);
unset($invalid_data);
unset($api_requested);
}
else
{
if(!$app || !$class || !$method)
{
if(@is_object($GLOBALS['phpgw']->log))
{
if($menuaction)
{
$GLOBALS['phpgw']->log->message(array(
'text' => "W-BadmenuactionVariable, menuaction missing or corrupt: $menuaction",
'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))
{
if($menuaction)
{
$GLOBALS['phpgw']->log->message(array(
'text' => "W-BadmenuactionVariable, attempted to access private method: $method",
'p1' => $method,
'line' => __LINE__,
'file' => __FILE__
));
}
}
}
if(@is_object($GLOBALS['phpgw']->log))
{
$GLOBALS['phpgw']->log->commit();
}
if( $_GET['dont_redirect_if_moble'] == 1 )
Header('Location: ' . $GLOBALS['phpgw']->link('/home.php?dont_redirect_if_moble=1'));
else
Header('Location: ' . $GLOBALS['phpgw']->link('/home.php'));
//$GLOBALS['phpgw']->redirect_link('/home.php');
}
/*if(!isset($GLOBALS['phpgw_info']['nofooter']))
{
$GLOBALS['phpgw']->common->phpgw_footer();
}*/
if($_GET['menuaction']){
$modulo = explode('.', $_GET['menuaction']);
if($modulo[0] == 'expressoAdmin1_2' || $modulo[0] == 'calendar'){
echo '
';
if($modulo[0] == 'calendar')
echo '';
}
}
?>