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 )
{
$target = 'home.php';
if ( $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] && $GLOBALS['phpgw_info']['user']['apps'][$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']])
$target = $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] . '/index.php';
$target = '( function( ){ var target = window.location.hash; target = ('
. '( arguments.length && ( target && target.length > 1 ) ) ?'
. 'URL_SERVER + target.substr( 1 ) : "' . $GLOBALS[ 'phpgw' ] -> link( $target ). '" ); ExpressoLivre.link( target ); } )';
if ( array_key_exists( 'HTTP_BACKGROUNDREQUEST', $_SERVER ) || array_key_exists( 'BackgroundRequest', $_GET ) )
$target = "{$target}( );";
else
$target = "XEvents.add( window, 'onload', {$target} );";
echo "";
exit;
}
if($api_requested)
{
$app = 'phpgwapi';
}
$GLOBALS[$class] = CreateObject(sprintf('%s.%s',$app,$class));
if ( is_object( $GLOBALS[ $class ] ) && ( ( ! property_exists( $class, 'public_functions' ) ) || (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions[$method]) && ! $invalid_data ) )
{
echo execmethod( $_GET[ 'menuaction' ], $_REQUEST );
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;
}
?>