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(
'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 )
{
echo '';
exit;
}
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();
}
echo '';
exit;
}
?>