Changed the call to use the execmethod() in /index.php.

This commit is contained in:
skeeter 2001-09-17 02:18:32 +00:00
parent 57fb69f726
commit 73b04851cc
10 changed files with 57 additions and 53 deletions

View File

@ -51,9 +51,11 @@
} }
$GLOBALS['obj'] = CreateObject(sprintf('%s.%s',$app,$class)); $GLOBALS['obj'] = CreateObject(sprintf('%s.%s',$app,$class));
if ((is_array($GLOBALS['obj']->public_functions) && $GLOBALS['obj']->public_functions[$method]) && ! $invalid_data) $GLOBALS[$class] = $GLOBALS['obj'];
if ((is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions[$method]) && ! $invalid_data)
{ {
eval("\$GLOBALS['obj']->$method();"); // eval("\$GLOBALS['obj']->$method();");
execmethod($GLOBALS['HTTP_GET_VARS']['menuaction']);
} }
else else
{ {

View File

@ -34,7 +34,7 @@
/**************************************************************************\ /**************************************************************************\
* Include the apps footer files if it exists * * Include the apps footer files if it exists *
\**************************************************************************/ \**************************************************************************/
if (file_exists (PHPGW_APP_INC . '/footer.inc.php') && if ((file_exists (PHPGW_APP_INC . '/footer.inc.php') || isset($GLOBALS['HTTP_GET_VARS'])) &&
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' && $GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' &&
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'login' && $GLOBALS['phpgw_info']['flags']['currentapp'] != 'login' &&
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'logout' && $GLOBALS['phpgw_info']['flags']['currentapp'] != 'logout' &&
@ -42,23 +42,16 @@
{ {
if ($GLOBALS['HTTP_GET_VARS']['menuaction']) if ($GLOBALS['HTTP_GET_VARS']['menuaction'])
{ {
// list($app,$class,$method) = explode('.',$menuaction); list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
// if ($app && $class && $method) if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['footer'])
// { {
// $GLOBALS['obj'] = CreateObject(sprintf('%s.%s',$GLOBALS['app'],$GLOBALS['class'])); // eval("\$GLOBALS[$class]->footer();");
if (is_array($GLOBALS['obj']->public_functions) && $GLOBALS['obj']->public_functions['footer']) $GLOBALS[$class]->footer();
{ }
eval("\$GLOBALS['obj']->footer();"); elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
} {
elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php')) include(PHPGW_APP_INC . '/footer.inc.php');
{ }
include(PHPGW_APP_INC . '/footer.inc.php');
}
// }
// elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
// {
// include(PHPGW_APP_INC . '/footer.inc.php');
// }
} }
elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php')) elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
{ {

View File

@ -11,17 +11,19 @@
/* $Id$ */ /* $Id$ */
if($GLOBALS['menuaction'] && is_array($GLOBALS['obj']->public_functions) && $GLOBALS['obj']->public_functions['css']) $app_css = '';
if(isset($GLOBALS['HTTP_GET_VARS']['menuaction'])
{ {
eval("\$app_css = \$GLOBALS['obj']->css();"); list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
} if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['css'])
else {
{ $app_css = $GLOBALS[$class]->css();
$app_css = ''; }
} }
$bodyheader = 'BGCOLOR="'.$GLOBALS['phpgw_info']['theme']['bg_color'].'"'; $bodyheader = 'BGCOLOR="'.$GLOBALS['phpgw_info']['theme']['bg_color'].'"';
if ($GLOBALS['phpgw_info']['server']['htmlcompliant']) { if ($GLOBALS['phpgw_info']['server']['htmlcompliant'])
{
$bodyheader .= ' ALINK="'.$GLOBALS['phpgw_info']['theme']['alink'].'" LINK="'.$GLOBALS['phpgw_info']['theme']['link'].'" VLINK="'.$GLOBALS['phpgw_info']['theme']['vlink'].'"'; $bodyheader .= ' ALINK="'.$GLOBALS['phpgw_info']['theme']['alink'].'" LINK="'.$GLOBALS['phpgw_info']['theme']['link'].'" VLINK="'.$GLOBALS['phpgw_info']['theme']['vlink'].'"';
} }

View File

@ -112,9 +112,10 @@
// If the application has a header include, we now include it // If the application has a header include, we now include it
if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && $GLOBALS['HTTP_GET_VARS']['menuaction']) if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && $GLOBALS['HTTP_GET_VARS']['menuaction'])
{ {
if (is_array($GLOBALS['obj']->public_functions) && $GLOBALS['obj']->public_functions['header']) list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
{ {
eval("\$GLOBALS['obj']->header();"); $GLOBALS[$class]->header();
} }
} }
$GLOBALS['phpgw']->common->hook('after_navbar'); $GLOBALS['phpgw']->common->hook('after_navbar');

View File

@ -22,13 +22,14 @@
$csshover = ''; $csshover = '';
} }
if($GLOBALS['menuaction'] && is_array($GLOBALS['obj']->public_functions) && $GLOBALS['obj']->public_functions['css']) $app_css = '';
if($GLOBALS['HTTP_GET_VARS']['menuaction'])
{ {
eval("\$app_css = \$GLOBALS['obj']->css();"); list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
} if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['css'])
else {
{ $app_css = $GLOBALS[$class]->css();
$app_css = ''; }
} }
$bodyheader = 'bgcolor="'.$GLOBALS['phpgw_info']['theme']['bg_color'].'" alink="'.$GLOBALS['phpgw_info']['theme']['alink'].'" link="'.$GLOBALS['phpgw_info']['theme']['link'].'" vlink="'.$GLOBALS['phpgw_info']['theme']['vlink'].'"'; $bodyheader = 'bgcolor="'.$GLOBALS['phpgw_info']['theme']['bg_color'].'" alink="'.$GLOBALS['phpgw_info']['theme']['alink'].'" link="'.$GLOBALS['phpgw_info']['theme']['link'].'" vlink="'.$GLOBALS['phpgw_info']['theme']['vlink'].'"';

View File

@ -141,9 +141,10 @@
// If the application has a header include, we now include it // If the application has a header include, we now include it
if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && $GLOBALS['HTTP_GET_VARS']['menuaction']) if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && $GLOBALS['HTTP_GET_VARS']['menuaction'])
{ {
if (is_array($GLOBALS['obj']->public_functions) && $GLOBALS['obj']->public_functions['header']) list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
{ {
eval("\$GLOBALS['obj']->header();"); $GLOBALS[$class]->header();
} }
} }
$GLOBALS['phpgw']->common->hook('after_navbar'); $GLOBALS['phpgw']->common->hook('after_navbar');

View File

@ -11,13 +11,14 @@
/* $Id$ */ /* $Id$ */
if($GLOBALS['menuaction'] && is_array($GLOBALS['obj']->public_functions) && $GLOBALS['obj']->public_functions['css']) $app_css = '';
if($GLOBALS['menuaction'])
{ {
eval("\$app_css = \$GLOBALS['obj']->css();"); list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
} if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['css'])
else {
{ $app_css = $GLOBALS[$class]->css();
$app_css = ''; }
} }
$bodyheader = 'BGCOLOR="'.$GLOBALS['phpgw_info']['theme']['bg_color'].'"'; $bodyheader = 'BGCOLOR="'.$GLOBALS['phpgw_info']['theme']['bg_color'].'"';

View File

@ -116,9 +116,10 @@
// If the application has a header include, we now include it // If the application has a header include, we now include it
if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && $GLOBALS['HTTP_GET_VARS']['menuaction']) if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && $GLOBALS['HTTP_GET_VARS']['menuaction'])
{ {
if (is_array($GLOBALS['obj']->public_functions) && $GLOBALS['obj']->public_functions['header']) list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
{ {
eval("\$GLOBALS['obj']->header();"); $GLOBALS[$class]->header();
} }
} }
$GLOBALS['phpgw']->common->hook('after_navbar'); $GLOBALS['phpgw']->common->hook('after_navbar');

View File

@ -11,13 +11,14 @@
/* $Id$ */ /* $Id$ */
if($GLOBALS['menuaction'] && is_array($GLOBALS['obj']->public_functions) && $GLOBALS['obj']->public_functions['css']) $app_css = '';
if($GLOBALS['HTTP_GET_VARS']['menuaction'])
{ {
eval("\$app_css = \$GLOBALS['obj']->css();"); list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
} if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['css'])
else {
{ $app_css = $GLOBALS[$class]->css();
$app_css = ''; }
} }
$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="' $bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="'

View File

@ -123,9 +123,10 @@
// If the application has a header include, we now include it // If the application has a header include, we now include it
if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && $GLOBALS['HTTP_GET_VARS']['menuaction']) if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && $GLOBALS['HTTP_GET_VARS']['menuaction'])
{ {
if (is_array($GLOBALS['obj']->public_functions) && $GLOBALS['obj']->public_functions['header']) list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
{ {
eval("\$GLOBALS['obj']->header();"); $GLOBALS[$class]->header();
} }
} }
$GLOBALS['phpgw']->common->hook('after_navbar'); $GLOBALS['phpgw']->common->hook('after_navbar');