mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
new header-template to:
1) correct the displayed page-generation-time for idots and jerry 2) use ob_start to get rid of "Header could not be sent, output started at ..." errors 3) changing from $GLOBALS['phpgw_info'] to $GLOBALS['egw_info'], the phpgw one is now a reference to the new egw one, to allow a soft migration
This commit is contained in:
parent
bdbb84975a
commit
d7f1458d1a
@ -18,11 +18,23 @@
|
|||||||
* the absolute path to fit your site, and you should be up and running. *
|
* the absolute path to fit your site, and you should be up and running. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
|
// allow to migrate from phpgw_info to egw_info
|
||||||
|
if (isset($GLOBALS['egw_info']))
|
||||||
|
{
|
||||||
|
$GLOBALS['phpgw_info'] =& $GLOBALS['egw_info'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$GLOBALS['egw_info'] =& $GLOBALS['phpgw_info'];
|
||||||
|
}
|
||||||
|
|
||||||
|
define('EGW_SERVER_ROOT','{SERVER_ROOT}');
|
||||||
|
define('EGW_INCLUDE_ROOT','{INCLUDE_ROOT}');
|
||||||
define('PHPGW_SERVER_ROOT','{SERVER_ROOT}');
|
define('PHPGW_SERVER_ROOT','{SERVER_ROOT}');
|
||||||
define('PHPGW_INCLUDE_ROOT','{INCLUDE_ROOT}');
|
define('PHPGW_INCLUDE_ROOT','{INCLUDE_ROOT}');
|
||||||
$GLOBALS['phpgw_info']['server']['header_admin_user'] = '{HEADER_ADMIN_USER}';
|
$GLOBALS['egw_info']['server']['header_admin_user'] = '{HEADER_ADMIN_USER}';
|
||||||
$GLOBALS['phpgw_info']['server']['header_admin_password'] = '{HEADER_ADMIN_PASSWORD}';
|
$GLOBALS['egw_info']['server']['header_admin_password'] = '{HEADER_ADMIN_PASSWORD}';
|
||||||
$GLOBALS['phpgw_info']['server']['setup_acl'] = '{SETUP_ACL}';
|
$GLOBALS['egw_info']['server']['setup_acl'] = '{SETUP_ACL}';
|
||||||
|
|
||||||
/* eGroupWare domain-specific db settings */{domains}
|
/* eGroupWare domain-specific db settings */{domains}
|
||||||
/*
|
/*
|
||||||
@ -31,9 +43,9 @@
|
|||||||
** Note: This is only for virtual domain support, default domain users can login only using
|
** Note: This is only for virtual domain support, default domain users can login only using
|
||||||
** there loginid.
|
** there loginid.
|
||||||
*/
|
*/
|
||||||
$GLOBALS['phpgw_info']['server']['show_domain_selectbox'] = {DOMAIN_SELECTBOX};
|
$GLOBALS['egw_info']['server']['show_domain_selectbox'] = {DOMAIN_SELECTBOX};
|
||||||
|
|
||||||
$GLOBALS['phpgw_info']['server']['db_persistent'] = {DB_PERSISTENT};
|
$GLOBALS['egw_info']['server']['db_persistent'] = {DB_PERSISTENT};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** eGroupWare can handle session management using the database or
|
** eGroupWare can handle session management using the database or
|
||||||
@ -41,15 +53,15 @@
|
|||||||
** performance.
|
** performance.
|
||||||
** Your choices are 'db' or 'php4'
|
** Your choices are 'db' or 'php4'
|
||||||
*/
|
*/
|
||||||
$GLOBALS['phpgw_info']['server']['sessions_type'] = '{SESSIONS_TYPE}';
|
$GLOBALS['egw_info']['server']['sessions_type'] = '{SESSIONS_TYPE}';
|
||||||
|
|
||||||
/* Select which login template set you want, most people will use default */
|
/* Select which login template set you want, most people will use default */
|
||||||
$GLOBALS['phpgw_info']['login_template_set'] = 'idots';
|
$GLOBALS['egw_info']['login_template_set'] = 'idots';
|
||||||
|
|
||||||
/* This is used to control mcrypt's use */
|
/* This is used to control mcrypt's use */
|
||||||
$GLOBALS['phpgw_info']['server']['mcrypt_enabled'] = {ENABLE_MCRYPT};
|
$GLOBALS['egw_info']['server']['mcrypt_enabled'] = {ENABLE_MCRYPT};
|
||||||
/* Set this to 'old' for versions < 2.4, otherwise the exact mcrypt version you use. */
|
/* Set this to 'old' for versions < 2.4, otherwise the exact mcrypt version you use. */
|
||||||
$GLOBALS['phpgw_info']['server']['versions']['mcrypt'] = '{MCRYPT_VERSION}';
|
$GLOBALS['egw_info']['server']['versions']['mcrypt'] = '{MCRYPT_VERSION}';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This is a random string used as the initialization vector for mcrypt
|
** This is a random string used as the initialization vector for mcrypt
|
||||||
@ -57,9 +69,9 @@
|
|||||||
** but you must not change it after that point!
|
** but you must not change it after that point!
|
||||||
** It should be around 30 bytes in length.
|
** It should be around 30 bytes in length.
|
||||||
*/
|
*/
|
||||||
$GLOBALS['phpgw_info']['server']['mcrypt_iv'] = '{MCRYPT_IV}';
|
$GLOBALS['egw_info']['server']['mcrypt_iv'] = '{MCRYPT_IV}';
|
||||||
|
|
||||||
if(!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol'])
|
if(!isset($GLOBALS['egw_info']['flags']['nocachecontrol']) || !$GLOBALS['egw_info']['flags']['nocachecontrol'])
|
||||||
{
|
{
|
||||||
header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1
|
header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1
|
||||||
header('Pragma: no-cache'); // HTTP/1.0
|
header('Pragma: no-cache'); // HTTP/1.0
|
||||||
@ -83,34 +95,32 @@
|
|||||||
list($usec, $sec) = explode(' ',microtime());
|
list($usec, $sec) = explode(' ',microtime());
|
||||||
return ((float)$usec + (float)$sec);
|
return ((float)$usec + (float)$sec);
|
||||||
}
|
}
|
||||||
|
$GLOBALS['egw_info']['flags']['page_start_time'] = perfgetmicrotime();
|
||||||
if (DEBUG_TIMER)
|
|
||||||
{
|
|
||||||
$GLOBALS['debug_timer_start'] = perfgetmicrotime();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* Do not edit these lines *
|
* Do not edit these lines *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
define('PHPGW_API_INC',PHPGW_INCLUDE_ROOT.'/phpgwapi/inc');
|
define('EGW_API_INC',EGW_INCLUDE_ROOT.'/phpgwapi/inc');
|
||||||
include(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php');
|
define('PHPGW_API_INC',EGW_INCLUDE_ROOT.'/phpgwapi/inc');
|
||||||
$GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
|
include(EGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php');
|
||||||
$GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
|
$GLOBALS['egw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
|
||||||
|
$GLOBALS['egw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
|
||||||
unset($setup_info);
|
unset($setup_info);
|
||||||
$GLOBALS['phpgw_info']['server']['versions']['header'] = '1.27';
|
$GLOBALS['egw_info']['server']['versions']['header'] = '1.28';
|
||||||
/* This is a fix for NT */
|
/* This is a fix for NT */
|
||||||
if(!isset($GLOBALS['phpgw_info']['flags']['noapi']) || !$GLOBALS['phpgw_info']['flags']['noapi'] == True)
|
if(!isset($GLOBALS['egw_info']['flags']['noapi']) || !$GLOBALS['egw_info']['flags']['noapi'] == True)
|
||||||
{
|
{
|
||||||
include(PHPGW_API_INC . '/functions.inc.php');
|
ob_start(); // to prevent error messages to be send before our headers
|
||||||
include(PHPGW_API_INC . '/xml_functions.inc.php');
|
include(EGW_API_INC . '/functions.inc.php');
|
||||||
include(PHPGW_API_INC . '/soap_functions.inc.php');
|
include(EGW_API_INC . '/xml_functions.inc.php');
|
||||||
|
include(EGW_API_INC . '/soap_functions.inc.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Leave off the final php closing tag, some editors will add
|
Leave off the final php closing tag, some editors will add
|
||||||
a \n or space after which will mess up cookies later on
|
a \n or space after which will mess up cookies later on
|
||||||
*/<!-- BEGIN domain -->
|
*/<!-- BEGIN domain -->
|
||||||
$GLOBALS['phpgw_domain']['{DB_DOMAIN}'] = array(
|
$GLOBALS['egw_domain']['{DB_DOMAIN}'] = array(
|
||||||
'db_host' => '{DB_HOST}',
|
'db_host' => '{DB_HOST}',
|
||||||
'db_port' => '{DB_PORT}',
|
'db_port' => '{DB_PORT}',
|
||||||
'db_name' => '{DB_NAME}',
|
'db_name' => '{DB_NAME}',
|
||||||
|
139
login.php
139
login.php
@ -13,14 +13,15 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info = array();
|
|
||||||
$submit = False; // set to some initial value
|
$submit = False; // set to some initial value
|
||||||
|
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
$GLOBALS['egw_info'] = array(
|
||||||
'disable_Template_class' => True,
|
'flags' => array(
|
||||||
'login' => True,
|
'disable_Template_class' => True,
|
||||||
'currentapp' => 'login',
|
'login' => True,
|
||||||
'noheader' => True
|
'currentapp' => 'login',
|
||||||
|
'noheader' => True,
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(file_exists('./header.inc.php'))
|
if(file_exists('./header.inc.php'))
|
||||||
@ -28,7 +29,7 @@
|
|||||||
include('./header.inc.php');
|
include('./header.inc.php');
|
||||||
if(function_exists('CreateObject'))
|
if(function_exists('CreateObject'))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->session = CreateObject('phpgwapi.sessions',array_keys($GLOBALS['phpgw_domain']));
|
$GLOBALS['egw']->session = CreateObject('phpgwapi.sessions',array_keys($GLOBALS['egw_domain']));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -42,15 +43,15 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['phpgw_info']['server']['template_dir'] = PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['login_template_set'];
|
$GLOBALS['egw_info']['server']['template_dir'] = PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['egw_info']['login_template_set'];
|
||||||
$tmpl = CreateObject('phpgwapi.Template', $GLOBALS['phpgw_info']['server']['template_dir']);
|
$tmpl = CreateObject('phpgwapi.Template', $GLOBALS['egw_info']['server']['template_dir']);
|
||||||
|
|
||||||
|
|
||||||
// read the images from the login-template-set, not the (maybe not even set) users template-set
|
// read the images from the login-template-set, not the (maybe not even set) users template-set
|
||||||
$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] = $GLOBALS['phpgw_info']['login_template_set'];
|
$GLOBALS['egw_info']['user']['preferences']['common']['template_set'] = $GLOBALS['egw_info']['login_template_set'];
|
||||||
|
|
||||||
// This is used for system downtime, to prevent new logins.
|
// This is used for system downtime, to prevent new logins.
|
||||||
if($GLOBALS['phpgw_info']['server']['deny_all_logins'])
|
if($GLOBALS['egw_info']['server']['deny_all_logins'])
|
||||||
{
|
{
|
||||||
$deny_msg=lang('Oops! You caught us in the middle of system maintainance.<br/>
|
$deny_msg=lang('Oops! You caught us in the middle of system maintainance.<br/>
|
||||||
Please, check back with us shortly.');
|
Please, check back with us shortly.');
|
||||||
@ -73,17 +74,17 @@
|
|||||||
|
|
||||||
// whoooo scaring
|
// whoooo scaring
|
||||||
/*
|
/*
|
||||||
if($GLOBALS['phpgw_info']['server']['usecookies'] == True)
|
if($GLOBALS['egw_info']['server']['usecookies'] == True)
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie('eGroupWareLoginTime', time());
|
$GLOBALS['egw']->session->phpgw_setcookie('eGroupWareLoginTime', time());
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
if($_GET['cd'] != 10 && $GLOBALS['phpgw_info']['server']['usecookies'] == False)
|
if($_GET['cd'] != 10 && $GLOBALS['egw_info']['server']['usecookies'] == False)
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->session->setcookie('sessionid');
|
$GLOBALS['egw']->session->setcookie('sessionid');
|
||||||
$GLOBALS['phpgw']->session->setcookie('kp3');
|
$GLOBALS['egw']->session->setcookie('kp3');
|
||||||
$GLOBALS['phpgw']->session->setcookie('domain');
|
$GLOBALS['egw']->session->setcookie('domain');
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -120,14 +121,14 @@
|
|||||||
return '<font color="FF0000">' . lang('Blocked, too many attempts') . '</font>';
|
return '<font color="FF0000">' . lang('Blocked, too many attempts') . '</font>';
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie('sessionid');
|
$GLOBALS['egw']->session->phpgw_setcookie('sessionid');
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie('kp3');
|
$GLOBALS['egw']->session->phpgw_setcookie('kp3');
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie('domain');
|
$GLOBALS['egw']->session->phpgw_setcookie('domain');
|
||||||
|
|
||||||
//fix for bug php4 expired sessions bug
|
//fix for bug php4 expired sessions bug
|
||||||
if($GLOBALS['phpgw_info']['server']['sessions_type'] == 'php4')
|
if($GLOBALS['egw_info']['server']['sessions_type'] == 'php4')
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie(PHPGW_PHPSESSID);
|
$GLOBALS['egw']->session->phpgw_setcookie(PHPGW_PHPSESSID);
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<font color="#FF0000">' . lang('Your session could not be verified.') . '</font>';
|
return '<font color="#FF0000">' . lang('Your session could not be verified.') . '</font>';
|
||||||
@ -139,7 +140,7 @@
|
|||||||
|
|
||||||
/* Program starts here */
|
/* Program starts here */
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['server']['auth_type'] == 'http' && isset($_SERVER['PHP_AUTH_USER']))
|
if($GLOBALS['egw_info']['server']['auth_type'] == 'http' && isset($_SERVER['PHP_AUTH_USER']))
|
||||||
{
|
{
|
||||||
$submit = True;
|
$submit = True;
|
||||||
$login = $_SERVER['PHP_AUTH_USER'];
|
$login = $_SERVER['PHP_AUTH_USER'];
|
||||||
@ -154,7 +155,7 @@
|
|||||||
|
|
||||||
# Apache + mod_ssl style SSL certificate authentication
|
# Apache + mod_ssl style SSL certificate authentication
|
||||||
# Certificate (chain) verification occurs inside mod_ssl
|
# Certificate (chain) verification occurs inside mod_ssl
|
||||||
if($GLOBALS['phpgw_info']['server']['auth_type'] == 'sqlssl' && isset($_SERVER['SSL_CLIENT_S_DN']) && !isset($_GET['cd']))
|
if($GLOBALS['egw_info']['server']['auth_type'] == 'sqlssl' && isset($_SERVER['SSL_CLIENT_S_DN']) && !isset($_GET['cd']))
|
||||||
{
|
{
|
||||||
# an X.509 subject looks like:
|
# an X.509 subject looks like:
|
||||||
# /CN=john.doe/OU=Department/O=Company/C=xx/Email=john@comapy.tld/L=City/
|
# /CN=john.doe/OU=Department/O=Company/C=xx/Email=john@comapy.tld/L=City/
|
||||||
@ -191,11 +192,11 @@
|
|||||||
if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' &&
|
if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' &&
|
||||||
!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN']))
|
!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN']))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/login.php','cd=5'));
|
$GLOBALS['egw']->redirect($GLOBALS['egw']->link('/login.php','cd=5'));
|
||||||
}
|
}
|
||||||
#if(!isset($_COOKIE['eGroupWareLoginTime']))
|
#if(!isset($_COOKIE['eGroupWareLoginTime']))
|
||||||
#{
|
#{
|
||||||
# $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/login.php','cd=4'));
|
# $GLOBALS['egw']->redirect($GLOBALS['egw']->link('/login.php','cd=4'));
|
||||||
#}
|
#}
|
||||||
|
|
||||||
// don't get login data again when $submit is true
|
// don't get login data again when $submit is true
|
||||||
@ -211,7 +212,7 @@
|
|||||||
if (count($login_parts) > 1)
|
if (count($login_parts) > 1)
|
||||||
{
|
{
|
||||||
//Last part of login string, when separated by @, is a domain name
|
//Last part of login string, when separated by @, is a domain name
|
||||||
if (array_key_exists(array_pop($login_parts),$GLOBALS['phpgw_domain']))
|
if (array_key_exists(array_pop($login_parts),$GLOBALS['egw_domain']))
|
||||||
{
|
{
|
||||||
$got_login = true;
|
$got_login = true;
|
||||||
}
|
}
|
||||||
@ -223,28 +224,28 @@
|
|||||||
{
|
{
|
||||||
$login .= '@' . $_POST['logindomain'];
|
$login .= '@' . $_POST['logindomain'];
|
||||||
}
|
}
|
||||||
elseif(!isset($GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['user']['domain']]))
|
elseif(!isset($GLOBALS['egw_domain'][$GLOBALS['egw_info']['user']['domain']]))
|
||||||
{
|
{
|
||||||
$login .= '@'.$GLOBALS['phpgw_info']['server']['default_domain'];
|
$login .= '@'.$GLOBALS['egw_info']['server']['default_domain'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$GLOBALS['sessionid'] = $GLOBALS['phpgw']->session->create($login,$passwd,$passwd_type,'u');
|
$GLOBALS['sessionid'] = $GLOBALS['egw']->session->create($login,$passwd,$passwd_type,'u');
|
||||||
|
|
||||||
if(!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid'])
|
if(!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid'])
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'] . '/login.php?cd=' . $GLOBALS['phpgw']->session->cd_reason);
|
$GLOBALS['egw']->redirect($GLOBALS['egw_info']['server']['webserver_url'] . '/login.php?cd=' . $GLOBALS['egw']->session->cd_reason);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($_POST['lang'] && preg_match('/^[a-z]{2}(-[a-z]{2}){0,1}$/',$_POST['lang']) &&
|
if ($_POST['lang'] && preg_match('/^[a-z]{2}(-[a-z]{2}){0,1}$/',$_POST['lang']) &&
|
||||||
$_POST['lang'] != $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'])
|
$_POST['lang'] != $GLOBALS['egw_info']['user']['preferences']['common']['lang'])
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->preferences->add('common','lang',$_POST['lang'],'session');
|
$GLOBALS['egw']->preferences->add('common','lang',$_POST['lang'],'session');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$GLOBALS['phpgw_info']['server']['disable_autoload_langfiles'])
|
if(!$GLOBALS['egw_info']['server']['disable_autoload_langfiles'])
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->translation->autoload_changed_langfiles();
|
$GLOBALS['egw']->translation->autoload_changed_langfiles();
|
||||||
}
|
}
|
||||||
$forward = isset($_GET['phpgw_forward']) ? urldecode($_GET['phpgw_forward']) : @$_POST['phpgw_forward'];
|
$forward = isset($_GET['phpgw_forward']) ? urldecode($_GET['phpgw_forward']) : @$_POST['phpgw_forward'];
|
||||||
if (!$forward)
|
if (!$forward)
|
||||||
@ -256,8 +257,8 @@
|
|||||||
{
|
{
|
||||||
list($forward,$extra_vars) = explode('?',$forward,2);
|
list($forward,$extra_vars) = explode('?',$forward,2);
|
||||||
}
|
}
|
||||||
//echo "redirecting to ".$GLOBALS['phpgw']->link($forward,$extra_vars);
|
//echo "redirecting to ".$GLOBALS['egw']->link($forward,$extra_vars);
|
||||||
$GLOBALS['phpgw']->redirect_link($forward,$extra_vars);
|
$GLOBALS['egw']->redirect_link($forward,$extra_vars);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -272,12 +273,12 @@
|
|||||||
|
|
||||||
if($prefs->account_id)
|
if($prefs->account_id)
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw_info']['user']['preferences'] = $prefs->read_repository();
|
$GLOBALS['egw_info']['user']['preferences'] = $prefs->read_repository();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($_GET['lang'])
|
if ($_GET['lang'])
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $_GET['lang'];
|
$GLOBALS['egw_info']['user']['preferences']['common']['lang'] = $_GET['lang'];
|
||||||
}
|
}
|
||||||
elseif(!isset($_COOKIE['last_loginid']) || !$prefs->account_id)
|
elseif(!isset($_COOKIE['last_loginid']) || !$prefs->account_id)
|
||||||
{
|
{
|
||||||
@ -288,16 +289,16 @@
|
|||||||
{
|
{
|
||||||
$lang = substr($lang,0,2);
|
$lang = substr($lang,0,2);
|
||||||
}
|
}
|
||||||
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $lang;
|
$GLOBALS['egw_info']['user']['preferences']['common']['lang'] = $lang;
|
||||||
}
|
}
|
||||||
#print 'LANG:' . $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] . '<br>';
|
#print 'LANG:' . $GLOBALS['egw_info']['user']['preferences']['common']['lang'] . '<br>';
|
||||||
|
|
||||||
$GLOBALS['phpgw']->translation->init(); // this will set the language according to the (new) set prefs
|
$GLOBALS['egw']->translation->init(); // this will set the language according to the (new) set prefs
|
||||||
$GLOBALS['phpgw']->translation->add_app('login');
|
$GLOBALS['egw']->translation->add_app('login');
|
||||||
$GLOBALS['phpgw']->translation->add_app('loginscreen');
|
$GLOBALS['egw']->translation->add_app('loginscreen');
|
||||||
if(lang('loginscreen_message') == 'loginscreen_message*')
|
if(lang('loginscreen_message') == 'loginscreen_message*')
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->translation->add_app('loginscreen','en'); // trying the en one
|
$GLOBALS['egw']->translation->add_app('loginscreen','en'); // trying the en one
|
||||||
}
|
}
|
||||||
if(lang('loginscreen_message') != 'loginscreen_message*')
|
if(lang('loginscreen_message') != 'loginscreen_message*')
|
||||||
{
|
{
|
||||||
@ -309,10 +310,10 @@
|
|||||||
$domain_select = ' ';
|
$domain_select = ' ';
|
||||||
$lang_domain_select = ' ';
|
$lang_domain_select = ' ';
|
||||||
$last_loginid = $_COOKIE['last_loginid'];
|
$last_loginid = $_COOKIE['last_loginid'];
|
||||||
if($GLOBALS['phpgw_info']['server']['show_domain_selectbox'])
|
if($GLOBALS['egw_info']['server']['show_domain_selectbox'])
|
||||||
{
|
{
|
||||||
$domain_select = "<select name=\"logindomain\">\n";
|
$domain_select = "<select name=\"logindomain\">\n";
|
||||||
foreach($GLOBALS['phpgw_domain'] as $domain_name => $domain_vars)
|
foreach($GLOBALS['egw_domain'] as $domain_name => $domain_vars)
|
||||||
{
|
{
|
||||||
$domain_select .= '<option value="' . $domain_name . '"';
|
$domain_select .= '<option value="' . $domain_name . '"';
|
||||||
|
|
||||||
@ -327,8 +328,8 @@
|
|||||||
}
|
}
|
||||||
elseif($last_loginid !== '')
|
elseif($last_loginid !== '')
|
||||||
{
|
{
|
||||||
reset($GLOBALS['phpgw_domain']);
|
reset($GLOBALS['egw_domain']);
|
||||||
list($default_domain) = each($GLOBALS['phpgw_domain']);
|
list($default_domain) = each($GLOBALS['egw_domain']);
|
||||||
|
|
||||||
if($_COOKIE['last_domain'] != $default_domain && !empty($_COOKIE['last_domain']))
|
if($_COOKIE['last_domain'] != $default_domain && !empty($_COOKIE['last_domain']))
|
||||||
{
|
{
|
||||||
@ -338,7 +339,7 @@
|
|||||||
$tmpl->set_var('lang_select_domain',$lang_domain_select);
|
$tmpl->set_var('lang_select_domain',$lang_domain_select);
|
||||||
$tmpl->set_var('select_domain',$domain_select);
|
$tmpl->set_var('select_domain',$domain_select);
|
||||||
|
|
||||||
if(!$GLOBALS['phpgw_info']['server']['show_domain_selectbox'])
|
if(!$GLOBALS['egw_info']['server']['show_domain_selectbox'])
|
||||||
{
|
{
|
||||||
/* trick to make domain selection disappear */
|
/* trick to make domain selection disappear */
|
||||||
$tmpl->set_var('domain_selection','');
|
$tmpl->set_var('domain_selection','');
|
||||||
@ -388,7 +389,7 @@
|
|||||||
$tmpl->set_var('lostpassword_link',$lostpw_link);
|
$tmpl->set_var('lostpassword_link',$lostpw_link);
|
||||||
$tmpl->set_var('lostid_link',$lostid_link) ;
|
$tmpl->set_var('lostid_link',$lostid_link) ;
|
||||||
|
|
||||||
//$tmpl->set_var('registration_url',$GLOBALS['phpgw_info']['server']['webserver_url'] . '/registration/');
|
//$tmpl->set_var('registration_url',$GLOBALS['egw_info']['server']['webserver_url'] . '/registration/');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -399,13 +400,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add a content-type header to overwrite an existing default charset in apache (AddDefaultCharset directiv)
|
// add a content-type header to overwrite an existing default charset in apache (AddDefaultCharset directiv)
|
||||||
header('Content-type: text/html; charset='.$GLOBALS['phpgw']->translation->charset());
|
header('Content-type: text/html; charset='.$GLOBALS['egw']->translation->charset());
|
||||||
|
|
||||||
$GLOBALS['phpgw_info']['server']['template_set'] = $GLOBALS['phpgw_info']['login_template_set'];
|
$GLOBALS['egw_info']['server']['template_set'] = $GLOBALS['egw_info']['login_template_set'];
|
||||||
|
|
||||||
$tmpl->set_var('charset',$GLOBALS['phpgw']->translation->charset());
|
$tmpl->set_var('charset',$GLOBALS['egw']->translation->charset());
|
||||||
$tmpl->set_var('login_url', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/login.php' . $extra_vars);
|
$tmpl->set_var('login_url', $GLOBALS['egw_info']['server']['webserver_url'] . '/login.php' . $extra_vars);
|
||||||
$tmpl->set_var('version',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']);
|
$tmpl->set_var('version',$GLOBALS['egw_info']['server']['versions']['phpgwapi']);
|
||||||
$tmpl->set_var('cd',check_logoutcode($_GET['cd']));
|
$tmpl->set_var('cd',check_logoutcode($_GET['cd']));
|
||||||
$tmpl->set_var('cookie',$last_loginid);
|
$tmpl->set_var('cookie',$last_loginid);
|
||||||
|
|
||||||
@ -413,37 +414,37 @@
|
|||||||
$tmpl->set_var('lang_password',lang('password'));
|
$tmpl->set_var('lang_password',lang('password'));
|
||||||
$tmpl->set_var('lang_login',lang('login'));
|
$tmpl->set_var('lang_login',lang('login'));
|
||||||
|
|
||||||
$tmpl->set_var('website_title', $GLOBALS['phpgw_info']['server']['site_title']);
|
$tmpl->set_var('website_title', $GLOBALS['egw_info']['server']['site_title']);
|
||||||
$tmpl->set_var('template_set',$GLOBALS['phpgw_info']['login_template_set']);
|
$tmpl->set_var('template_set',$GLOBALS['egw_info']['login_template_set']);
|
||||||
$tmpl->set_var('bg_color',($GLOBALS['phpgw_info']['server']['login_bg_color']?$GLOBALS['phpgw_info']['server']['login_bg_color']:'FFFFFF'));
|
$tmpl->set_var('bg_color',($GLOBALS['egw_info']['server']['login_bg_color']?$GLOBALS['egw_info']['server']['login_bg_color']:'FFFFFF'));
|
||||||
$tmpl->set_var('bg_color_title',($GLOBALS['phpgw_info']['server']['login_bg_color_title']?$GLOBALS['phpgw_info']['server']['login_bg_color_title']:'486591'));
|
$tmpl->set_var('bg_color_title',($GLOBALS['egw_info']['server']['login_bg_color_title']?$GLOBALS['egw_info']['server']['login_bg_color_title']:'486591'));
|
||||||
|
|
||||||
if (substr($GLOBALS['phpgw_info']['server']['login_logo_file'],0,4) == 'http')
|
if (substr($GLOBALS['egw_info']['server']['login_logo_file'],0,4) == 'http')
|
||||||
{
|
{
|
||||||
$var['logo_file'] = $GLOBALS['phpgw_info']['server']['login_logo_file'];
|
$var['logo_file'] = $GLOBALS['egw_info']['server']['login_logo_file'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$var['logo_file'] = $GLOBALS['phpgw']->common->image('phpgwapi',$GLOBALS['phpgw_info']['server']['login_logo_file']?$GLOBALS['phpgw_info']['server']['login_logo_file']:'logo');
|
$var['logo_file'] = $GLOBALS['egw']->common->image('phpgwapi',$GLOBALS['egw_info']['server']['login_logo_file']?$GLOBALS['egw_info']['server']['login_logo_file']:'logo');
|
||||||
}
|
}
|
||||||
$var['logo_url'] = $GLOBALS['phpgw_info']['server']['login_logo_url']?$GLOBALS['phpgw_info']['server']['login_logo_url']:'http://www.eGroupWare.org';
|
$var['logo_url'] = $GLOBALS['egw_info']['server']['login_logo_url']?$GLOBALS['egw_info']['server']['login_logo_url']:'http://www.eGroupWare.org';
|
||||||
if (substr($var['logo_url'],0,4) != 'http')
|
if (substr($var['logo_url'],0,4) != 'http')
|
||||||
{
|
{
|
||||||
$var['logo_url'] = 'http://'.$var['logo_url'];
|
$var['logo_url'] = 'http://'.$var['logo_url'];
|
||||||
}
|
}
|
||||||
$var['logo_title'] = $GLOBALS['phpgw_info']['server']['login_logo_title']?$GLOBALS['phpgw_info']['server']['login_logo_title']:'www.eGroupWare.org';
|
$var['logo_title'] = $GLOBALS['egw_info']['server']['login_logo_title']?$GLOBALS['egw_info']['server']['login_logo_title']:'www.eGroupWare.org';
|
||||||
$tmpl->set_var($var);
|
$tmpl->set_var($var);
|
||||||
|
|
||||||
|
|
||||||
/* language section if activated in site config */
|
/* language section if activated in site config */
|
||||||
if (@$GLOBALS['phpgw_info']['server']['login_show_language_selection'])
|
if (@$GLOBALS['egw_info']['server']['login_show_language_selection'])
|
||||||
{
|
{
|
||||||
$select_lang = '<select name="lang" onchange="'."if (this.form.login.value && this.form.passwd.value) this.form.submit(); else location.href=location.href+(location.search?'&':'?')+'lang='+this.value".'">';
|
$select_lang = '<select name="lang" onchange="'."if (this.form.login.value && this.form.passwd.value) this.form.submit(); else location.href=location.href+(location.search?'&':'?')+'lang='+this.value".'">';
|
||||||
$langs = $GLOBALS['phpgw']->translation->get_installed_langs();
|
$langs = $GLOBALS['egw']->translation->get_installed_langs();
|
||||||
uasort($langs,'strcasecmp');
|
uasort($langs,'strcasecmp');
|
||||||
foreach ($langs as $key => $name) // if we have a translation use it
|
foreach ($langs as $key => $name) // if we have a translation use it
|
||||||
{
|
{
|
||||||
$select_lang .= "\n\t".'<option value="'.$key.'"'.($key == $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] ? ' selected="1"' : '').'>'.$name.'</option>';
|
$select_lang .= "\n\t".'<option value="'.$key.'"'.($key == $GLOBALS['egw_info']['user']['preferences']['common']['lang'] ? ' selected="1"' : '').'>'.$name.'</option>';
|
||||||
}
|
}
|
||||||
$select_lang .= "\n</select>\n";
|
$select_lang .= "\n</select>\n";
|
||||||
$tmpl->set_var(array(
|
$tmpl->set_var(array(
|
||||||
@ -458,7 +459,7 @@
|
|||||||
$tmpl->set_var('language_select','');
|
$tmpl->set_var('language_select','');
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmpl->set_var('autocomplete', ($GLOBALS['phpgw_info']['server']['autocomplete_login'] ? 'autocomplete="off"' : ''));
|
$tmpl->set_var('autocomplete', ($GLOBALS['egw_info']['server']['autocomplete_login'] ? 'autocomplete="off"' : ''));
|
||||||
|
|
||||||
$tmpl->pfp('loginout','login_form');
|
$tmpl->pfp('loginout','login_form');
|
||||||
?>
|
?>
|
||||||
|
@ -37,10 +37,10 @@
|
|||||||
if (PHPGW_APP_INC != PHPGW_API_INC && // this prevents an endless inclusion on the homepage
|
if (PHPGW_APP_INC != PHPGW_API_INC && // this prevents an endless inclusion on the homepage
|
||||||
// (some apps set currentapp in hook_home => it's not releyable)
|
// (some apps set currentapp in hook_home => it's not releyable)
|
||||||
(file_exists (PHPGW_APP_INC . '/footer.inc.php') || isset($_GET['menuaction'])) &&
|
(file_exists (PHPGW_APP_INC . '/footer.inc.php') || isset($_GET['menuaction'])) &&
|
||||||
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' &&
|
$GLOBALS['egw_info']['flags']['currentapp'] != 'home' &&
|
||||||
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'login' &&
|
$GLOBALS['egw_info']['flags']['currentapp'] != 'login' &&
|
||||||
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'logout' &&
|
$GLOBALS['egw_info']['flags']['currentapp'] != 'logout' &&
|
||||||
!@$GLOBALS['phpgw_info']['flags']['noappfooter'])
|
!@$GLOBALS['egw_info']['flags']['noappfooter'])
|
||||||
{
|
{
|
||||||
if ($_GET['menuaction'])
|
if ($_GET['menuaction'])
|
||||||
{
|
{
|
||||||
@ -60,9 +60,9 @@
|
|||||||
include(PHPGW_APP_INC . '/footer.inc.php');
|
include(PHPGW_APP_INC . '/footer.inc.php');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($GLOBALS['phpgw_info']['flags']['need_footer'])
|
if ($GLOBALS['egw_info']['flags']['need_footer'])
|
||||||
{
|
{
|
||||||
echo $GLOBALS['phpgw_info']['flags']['need_footer'];
|
echo $GLOBALS['egw_info']['flags']['need_footer'];
|
||||||
}
|
}
|
||||||
if(function_exists('parse_navbar_end'))
|
if(function_exists('parse_navbar_end'))
|
||||||
{
|
{
|
||||||
@ -70,6 +70,7 @@
|
|||||||
}
|
}
|
||||||
if (DEBUG_TIMER)
|
if (DEBUG_TIMER)
|
||||||
{
|
{
|
||||||
$GLOBALS['debug_timer_stop'] = perfgetmicrotime();
|
$totaltime = sprintf('%4.2lf',perfgetmicrotime() - $GLOBALS['egw_info']['flags']['page_start_time']);
|
||||||
echo 'Page loaded in ' . ($GLOBALS['debug_timer_stop'] - $GLOBALS['debug_timer_start']) . ' seconds.';
|
|
||||||
|
echo lang('Page was generated in %1 seconds',$totaltime);
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
$setup_info['phpgwapi']['name'] = 'phpgwapi';
|
$setup_info['phpgwapi']['name'] = 'phpgwapi';
|
||||||
$setup_info['phpgwapi']['title'] = 'phpgwapi';
|
$setup_info['phpgwapi']['title'] = 'phpgwapi';
|
||||||
$setup_info['phpgwapi']['version'] = '1.0.1.004';
|
$setup_info['phpgwapi']['version'] = '1.0.1.004';
|
||||||
$setup_info['phpgwapi']['versions']['current_header'] = '1.27';
|
$setup_info['phpgwapi']['versions']['current_header'] = '1.28';
|
||||||
$setup_info['phpgwapi']['enable'] = 3;
|
$setup_info['phpgwapi']['enable'] = 3;
|
||||||
$setup_info['phpgwapi']['app_order'] = 1;
|
$setup_info['phpgwapi']['app_order'] = 1;
|
||||||
|
|
||||||
|
@ -11,38 +11,30 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time'])
|
|
||||||
{
|
|
||||||
$mtime = microtime();
|
|
||||||
$mtime = explode(' ',$mtime);
|
|
||||||
$mtime = $mtime[1] + $mtime[0];
|
|
||||||
$GLOBALS['page_start_time'] = $mtime;
|
|
||||||
}
|
|
||||||
|
|
||||||
// get used language code
|
// get used language code
|
||||||
$lang_code = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
|
$lang_code = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];
|
||||||
|
|
||||||
$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="'
|
$bodyheader = ' bgcolor="' . $GLOBALS['egw_info']['theme']['bg_color'] . '" alink="'
|
||||||
. $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="'
|
. $GLOBALS['egw_info']['theme']['alink'] . '" link="' . $GLOBALS['egw_info']['theme']['link'] . '" vlink="'
|
||||||
. $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
|
. $GLOBALS['egw_info']['theme']['vlink'] . '"';
|
||||||
|
|
||||||
if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
|
if(!$GLOBALS['egw_info']['server']['htmlcompliant'])
|
||||||
{
|
{
|
||||||
$bodyheader .= '';
|
$bodyheader .= '';
|
||||||
}
|
}
|
||||||
|
|
||||||
#_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']);
|
#_debug_array($GLOBALS['egw_info']['user']['preferences']['common']);
|
||||||
$theme_css = '/phpgwapi/templates/idots/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
|
$theme_css = '/phpgwapi/templates/idots/css/'.$GLOBALS['egw_info']['user']['preferences']['common']['theme'].'.css';
|
||||||
if(!file_exists(PHPGW_SERVER_ROOT.$theme_css))
|
if(!file_exists(EGW_SERVER_ROOT.$theme_css))
|
||||||
{
|
{
|
||||||
$theme_css = '/phpgwapi/templates/idots/css/idots.css';
|
$theme_css = '/phpgwapi/templates/idots/css/idots.css';
|
||||||
}
|
}
|
||||||
$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . $theme_css;
|
$theme_css = $GLOBALS['egw_info']['server']['webserver_url'] . $theme_css;
|
||||||
|
|
||||||
//pngfix defaults to yes
|
//pngfix defaults to yes
|
||||||
if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_pngfix'])
|
if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_pngfix'])
|
||||||
{
|
{
|
||||||
$pngfix_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/pngfix.js';
|
$pngfix_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/pngfix.js';
|
||||||
$pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher -->
|
$pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher -->
|
||||||
<!--[if gte IE 5.5000]>
|
<!--[if gte IE 5.5000]>
|
||||||
<script src="'.$pngfix_src.'" type="text/javascript">
|
<script src="'.$pngfix_src.'" type="text/javascript">
|
||||||
@ -50,15 +42,15 @@
|
|||||||
<![endif]-->';
|
<![endif]-->';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'])
|
if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_slider_effects'])
|
||||||
{
|
{
|
||||||
$slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/slidereffects.js';
|
$slider_effects_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/slidereffects.js';
|
||||||
$slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
|
$slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
|
||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/simple_show_hide.js';
|
$simple_show_hide_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/simple_show_hide.js';
|
||||||
$simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
|
$simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
|
||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
@ -68,14 +60,14 @@
|
|||||||
$tpl->set_file(array('_head' => 'head.tpl'));
|
$tpl->set_file(array('_head' => 'head.tpl'));
|
||||||
$tpl->set_block('_head','head');
|
$tpl->set_block('_head','head');
|
||||||
|
|
||||||
if ($GLOBALS['phpgw_info']['flags']['app_header'])
|
if ($GLOBALS['egw_info']['flags']['app_header'])
|
||||||
{
|
{
|
||||||
$app = $GLOBALS['phpgw_info']['flags']['app_header'];
|
$app = $GLOBALS['egw_info']['flags']['app_header'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
|
$app = $GLOBALS['egw_info']['flags']['currentapp'];
|
||||||
$app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app);
|
$app = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : lang($app);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -89,8 +81,8 @@
|
|||||||
'simple_show_hide' => $simple_show_hide,
|
'simple_show_hide' => $simple_show_hide,
|
||||||
'lang_code' => $lang_code,
|
'lang_code' => $lang_code,
|
||||||
'charset' => $GLOBALS['phpgw']->translation->charset(),
|
'charset' => $GLOBALS['phpgw']->translation->charset(),
|
||||||
'font_family' => $GLOBALS['phpgw_info']['theme']['font'],
|
'font_family' => $GLOBALS['egw_info']['theme']['font'],
|
||||||
'website_title' => strip_tags($GLOBALS['phpgw_info']['server']['site_title']. ($app ? " [$app]" : '')),
|
'website_title' => strip_tags($GLOBALS['egw_info']['server']['site_title']. ($app ? " [$app]" : '')),
|
||||||
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
|
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
|
||||||
'theme_css' => $theme_css,
|
'theme_css' => $theme_css,
|
||||||
'css' => $GLOBALS['phpgw']->common->get_css(),
|
'css' => $GLOBALS['phpgw']->common->get_css(),
|
||||||
|
@ -33,10 +33,10 @@
|
|||||||
$GLOBALS['idots_tpl']->set_block('navbar','appbox','appbox');
|
$GLOBALS['idots_tpl']->set_block('navbar','appbox','appbox');
|
||||||
$GLOBALS['idots_tpl']->set_block('navbar','navbar_footer','navbar_footer');
|
$GLOBALS['idots_tpl']->set_block('navbar','navbar_footer','navbar_footer');
|
||||||
|
|
||||||
$var['img_root'] = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images';
|
$var['img_root'] = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images';
|
||||||
$var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg'];
|
$var['table_bg_color'] = $GLOBALS['egw_info']['theme']['navbar_bg'];
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover')
|
||||||
{
|
{
|
||||||
$show_menu_event = 'onMouseOver';
|
$show_menu_event = 'onMouseOver';
|
||||||
}
|
}
|
||||||
@ -50,17 +50,17 @@
|
|||||||
|
|
||||||
// == 'icons_and_text')
|
// == 'icons_and_text')
|
||||||
|
|
||||||
$max_icons=$GLOBALS['phpgw_info']['user']['preferences']['common']['max_icons'];
|
$max_icons=$GLOBALS['egw_info']['user']['preferences']['common']['max_icons'];
|
||||||
if(!$max_icons)
|
if(!$max_icons)
|
||||||
{
|
{
|
||||||
$max_icons=200;
|
$max_icons=200;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data)
|
foreach($GLOBALS['egw_info']['navbar'] as $app => $app_data)
|
||||||
{
|
{
|
||||||
if($app != 'preferences' && $app != 'about' && $app != 'logout')
|
if($app != 'preferences' && $app != 'about' && $app != 'logout')
|
||||||
{
|
{
|
||||||
$title = $GLOBALS['phpgw_info']['apps'][$app]['title'];
|
$title = $GLOBALS['egw_info']['apps'][$app]['title'];
|
||||||
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title . '" border="0" />';
|
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title . '" border="0" />';
|
||||||
|
|
||||||
|
|
||||||
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
if($i<$max_icons)
|
if($i<$max_icons)
|
||||||
{
|
{
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']=='no')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons']=='no')
|
||||||
{
|
{
|
||||||
$tdwidth = 100/($max_icons);
|
$tdwidth = 100/($max_icons);
|
||||||
}
|
}
|
||||||
@ -84,18 +84,18 @@
|
|||||||
|
|
||||||
$app_icons .= '<td width="'.$tdwidth.'%" height="66" valign="bottom" align="center" style="text-align:center"><a href="' . $app_data['url'] . '"';
|
$app_icons .= '<td width="'.$tdwidth.'%" height="66" valign="bottom" align="center" style="text-align:center"><a href="' . $app_data['url'] . '"';
|
||||||
|
|
||||||
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
|
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
|
||||||
{
|
{
|
||||||
$app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
|
$app_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$app_icons .= $app_data['target'].'>' . $icon . '</a></td>';
|
$app_icons .= $app_data['target'].'>' . $icon . '</a></td>';
|
||||||
|
|
||||||
$app_titles .= '<td align="center" valign="top" class="appTitles" style="text-align:center"><a href="'.$app_data['url'] . '"';
|
$app_titles .= '<td align="center" valign="top" class="appTitles" style="text-align:center"><a href="'.$app_data['url'] . '"';
|
||||||
|
|
||||||
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
|
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
|
||||||
{
|
{
|
||||||
$app_titles .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
|
$app_titles .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$app_titles .= $app_data['target'].'>' . $title . '</a></td>';
|
$app_titles .= $app_data['target'].'>' . $title . '</a></td>';
|
||||||
@ -108,13 +108,13 @@
|
|||||||
|
|
||||||
$app_extra_icons .= '<tr>';
|
$app_extra_icons .= '<tr>';
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='text')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format']!='text')
|
||||||
{
|
{
|
||||||
$app_extra_icons .= '<td class="extraIconsRow"><a href="' . $app_data['url'] . '"';
|
$app_extra_icons .= '<td class="extraIconsRow"><a href="' . $app_data['url'] . '"';
|
||||||
|
|
||||||
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
|
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
|
||||||
{
|
{
|
||||||
$app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
|
$app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$app_extra_icons .= ' >' . $icon . '</a></td>';
|
$app_extra_icons .= ' >' . $icon . '</a></td>';
|
||||||
@ -124,18 +124,18 @@
|
|||||||
|
|
||||||
// $app_extra_icons .= '<tr><td><a href="' . $app_data['url'] . '"';
|
// $app_extra_icons .= '<tr><td><a href="' . $app_data['url'] . '"';
|
||||||
|
|
||||||
// if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
|
// if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
|
||||||
// {
|
// {
|
||||||
// $app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
|
// $app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// $app_extra_icons .= '>' . $icon . '</a></td>';
|
// $app_extra_icons .= '>' . $icon . '</a></td>';
|
||||||
|
|
||||||
$app_extra_icons .= '<td align="left" class="extraIconsRow" style=""><a href="'.$app_data['url'] . '"';
|
$app_extra_icons .= '<td align="left" class="extraIconsRow" style=""><a href="'.$app_data['url'] . '"';
|
||||||
|
|
||||||
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
|
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
|
||||||
{
|
{
|
||||||
$app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
|
$app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$app_extra_icons .= '>' . $title . '</a></td></tr>';
|
$app_extra_icons .= '>' . $title . '</a></td></tr>';
|
||||||
@ -147,14 +147,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']!='no')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons']!='no')
|
||||||
{
|
{
|
||||||
$app_icons .= '<td width="'.$tdwidth.'%" height="32" valign="bottom" align="center" style="text-align:center"><a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBALS['phpgw_info']['navbar']['logout']['icon'].'" title="'.$GLOBALS['phpgw_info']['navbar']['logout']['title'].'" alt="'.$GLOBALS['phpgw_info']['navbar']['logout']['title'].'"></a></td>';
|
$app_icons .= '<td width="'.$tdwidth.'%" height="32" valign="bottom" align="center" style="text-align:center"><a href="'.$GLOBALS['egw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBALS['egw_info']['navbar']['logout']['icon'].'" title="'.$GLOBALS['egw_info']['navbar']['logout']['title'].'" alt="'.$GLOBALS['egw_info']['navbar']['logout']['title'].'"></a></td>';
|
||||||
$app_titles .= '<td align="center" valign="top" class="appTitles" style="text-align:center"><a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'.$GLOBALS['phpgw_info']['navbar']['logout']['title'].'</a></td>';
|
$app_titles .= '<td align="center" valign="top" class="appTitles" style="text-align:center"><a href="'.$GLOBALS['egw_info']['navbar']['logout']['url'].'">'.$GLOBALS['egw_info']['navbar']['logout']['title'].'</a></td>';
|
||||||
|
|
||||||
}
|
}
|
||||||
// $var['app_icons'] = $app_icons;
|
// $var['app_icons'] = $app_icons;
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='text')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format']!='text')
|
||||||
{
|
{
|
||||||
$var['app_icons'] = $app_icons;
|
$var['app_icons'] = $app_icons;
|
||||||
}
|
}
|
||||||
@ -187,7 +187,7 @@
|
|||||||
$var['app_extra_icons_icon']= '<td width="26" valign="top" align="right" style="padding-right:3px;padding-top:50px;"><a title="'.lang('show_more_apps').'" href="#" '.$show_menu_event.'="ypSlideOutMenu.showMenu(\'menu1\')"><img src="'.$var['img_root'].'/extra_icons.png" border="0" /></a></td>';
|
$var['app_extra_icons_icon']= '<td width="26" valign="top" align="right" style="padding-right:3px;padding-top:50px;"><a title="'.lang('show_more_apps').'" href="#" '.$show_menu_event.'="ypSlideOutMenu.showMenu(\'menu1\')"><img src="'.$var['img_root'].'/extra_icons.png" border="0" /></a></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='icons')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format']!='icons')
|
||||||
{
|
{
|
||||||
$var['app_titles'] = $app_titles;
|
$var['app_titles'] = $app_titles;
|
||||||
}
|
}
|
||||||
@ -195,33 +195,33 @@
|
|||||||
{
|
{
|
||||||
$var['app_titles'] = '<td colspan="'.$max_icons.'"> </td>';
|
$var['app_titles'] = '<td colspan="'.$max_icons.'"> </td>';
|
||||||
}
|
}
|
||||||
if(isset($GLOBALS['phpgw_info']['flags']['app_header']))
|
if(isset($GLOBALS['egw_info']['flags']['app_header']))
|
||||||
{
|
{
|
||||||
$var['current_app_title'] = $GLOBALS['phpgw_info']['flags']['app_header'];
|
$var['current_app_title'] = $GLOBALS['egw_info']['flags']['app_header'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$var['current_app_title']=$GLOBALS['phpgw_info']['navbar'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title'];
|
$var['current_app_title']=$GLOBALS['egw_info']['navbar'][$GLOBALS['egw_info']['flags']['currentapp']]['title'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($GLOBALS['phpgw_info']['navbar']['admin']) && $GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers'])
|
if(isset($GLOBALS['egw_info']['navbar']['admin']) && $GLOBALS['egw_info']['user']['preferences']['common']['show_currentusers'])
|
||||||
{
|
{
|
||||||
$var['current_users'] = '<a href="'
|
$var['current_users'] = '<a href="'
|
||||||
. $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">'
|
. $GLOBALS['egw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">'
|
||||||
. lang('Current users') . ': ' . $GLOBALS['phpgw']->session->total() . '</a>';
|
. lang('Current users') . ': ' . $GLOBALS['egw']->session->total() . '</a>';
|
||||||
}
|
}
|
||||||
$now = time();
|
$now = time();
|
||||||
$var['user_info'] = '<b>'.$GLOBALS['phpgw']->common->display_fullname() .'</b>'. ' - '
|
$var['user_info'] = '<b>'.$GLOBALS['egw']->common->display_fullname() .'</b>'. ' - '
|
||||||
. lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' '
|
. lang($GLOBALS['egw']->common->show_date($now,'l')) . ' '
|
||||||
. $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
|
. $GLOBALS['egw']->common->show_date($now,$GLOBALS['egw_info']['user']['preferences']['common']['dateformat']);
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == 0)
|
if($GLOBALS['egw_info']['user']['lastpasswd_change'] == 0)
|
||||||
{
|
{
|
||||||
$api_messages = lang('You are required to change your password during your first login')
|
$api_messages = lang('You are required to change your password during your first login')
|
||||||
. '<br> Click this image on the navbar: <img src="'
|
. '<br> Click this image on the navbar: <img src="'
|
||||||
. $GLOBALS['phpgw']->common->image('preferences','navbar.gif').'">';
|
. $GLOBALS['egw']->common->image('preferences','navbar.gif').'">';
|
||||||
}
|
}
|
||||||
elseif($GLOBALS['phpgw_info']['user']['lastpasswd_change'] < time() - (86400*30))
|
elseif($GLOBALS['egw_info']['user']['lastpasswd_change'] < time() - (86400*30))
|
||||||
{
|
{
|
||||||
$api_messages = lang('it has been more then %1 days since you changed your password',30);
|
$api_messages = lang('it has been more then %1 days since you changed your password',30);
|
||||||
}
|
}
|
||||||
@ -232,20 +232,20 @@
|
|||||||
$var['messages'] = $api_messages . '<br>' . checkcode($cd);
|
$var['messages'] = $api_messages . '<br>' . checkcode($cd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (substr($GLOBALS['phpgw_info']['server']['login_logo_file'],0,4) == 'http')
|
if (substr($GLOBALS['egw_info']['server']['login_logo_file'],0,4) == 'http')
|
||||||
{
|
{
|
||||||
$var['logo_file'] = $GLOBALS['phpgw_info']['server']['login_logo_file'];
|
$var['logo_file'] = $GLOBALS['egw_info']['server']['login_logo_file'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$var['logo_file'] = $GLOBALS['phpgw']->common->image('phpgwapi',$GLOBALS['phpgw_info']['server']['login_logo_file']?$GLOBALS['phpgw_info']['server']['login_logo_file']:'logo');
|
$var['logo_file'] = $GLOBALS['egw']->common->image('phpgwapi',$GLOBALS['egw_info']['server']['login_logo_file']?$GLOBALS['egw_info']['server']['login_logo_file']:'logo');
|
||||||
}
|
}
|
||||||
$var['logo_url'] = $GLOBALS['phpgw_info']['server']['login_logo_url']?$GLOBALS['phpgw_info']['server']['login_logo_url']:'http://www.eGroupWare.org';
|
$var['logo_url'] = $GLOBALS['egw_info']['server']['login_logo_url']?$GLOBALS['egw_info']['server']['login_logo_url']:'http://www.eGroupWare.org';
|
||||||
if (substr($var['logo_url'],0,4) != 'http')
|
if (substr($var['logo_url'],0,4) != 'http')
|
||||||
{
|
{
|
||||||
$var['logo_url'] = 'http://'.$var['logo_url'];
|
$var['logo_url'] = 'http://'.$var['logo_url'];
|
||||||
}
|
}
|
||||||
$var['logo_title'] = $GLOBALS['phpgw_info']['server']['login_logo_title']?$GLOBALS['phpgw_info']['server']['login_logo_title']:'www.eGroupWare.org';
|
$var['logo_title'] = $GLOBALS['egw_info']['server']['login_logo_title']?$GLOBALS['egw_info']['server']['login_logo_title']:'www.eGroupWare.org';
|
||||||
|
|
||||||
$GLOBALS['idots_tpl']->set_var($var);
|
$GLOBALS['idots_tpl']->set_var($var);
|
||||||
$GLOBALS['idots_tpl']->pfp('out','navbar_header');
|
$GLOBALS['idots_tpl']->pfp('out','navbar_header');
|
||||||
@ -256,28 +256,28 @@
|
|||||||
|
|
||||||
$menu_title = lang('General Menu');
|
$menu_title = lang('General Menu');
|
||||||
|
|
||||||
$file['Home'] = $GLOBALS['phpgw_info']['navbar']['home']['url'];
|
$file['Home'] = $GLOBALS['egw_info']['navbar']['home']['url'];
|
||||||
if($GLOBALS['phpgw_info']['user']['apps']['preferences'])
|
if($GLOBALS['egw_info']['user']['apps']['preferences'])
|
||||||
{
|
{
|
||||||
$file['Preferences'] = $GLOBALS['phpgw_info']['navbar']['preferences']['url'];
|
$file['Preferences'] = $GLOBALS['egw_info']['navbar']['preferences']['url'];
|
||||||
}
|
}
|
||||||
$file += array(
|
$file += array(
|
||||||
array(
|
array(
|
||||||
'text' => lang('About %1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title']),
|
'text' => lang('About %1',$GLOBALS['egw_info']['apps'][$GLOBALS['egw_info']['flags']['currentapp']]['title']),
|
||||||
'no_lang' => True,
|
'no_lang' => True,
|
||||||
'link' => $GLOBALS['phpgw_info']['navbar']['about']['url']
|
'link' => $GLOBALS['egw_info']['navbar']['about']['url']
|
||||||
),
|
),
|
||||||
'Logout'=>$GLOBALS['phpgw_info']['navbar']['logout']['url']
|
'Logout'=>$GLOBALS['egw_info']['navbar']['logout']['url']
|
||||||
);
|
);
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['auto_hide_sidebox']==1)
|
if($GLOBALS['egw_info']['user']['preferences']['common']['auto_hide_sidebox']==1)
|
||||||
{
|
{
|
||||||
$GLOBALS['idots_tpl']->set_var('show_menu_event',$show_menu_event);
|
$GLOBALS['idots_tpl']->set_var('show_menu_event',$show_menu_event);
|
||||||
$GLOBALS['idots_tpl']->set_var('lang_show_menu',lang('show menu'));
|
$GLOBALS['idots_tpl']->set_var('lang_show_menu',lang('show menu'));
|
||||||
$GLOBALS['idots_tpl']->pparse('out','sidebox_hide_header');
|
$GLOBALS['idots_tpl']->pparse('out','sidebox_hide_header');
|
||||||
|
|
||||||
display_sidebox('',$menu_title,$file);
|
display_sidebox('',$menu_title,$file);
|
||||||
$GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']);
|
$GLOBALS['egw']->hooks->single('sidebox_menu',$GLOBALS['egw_info']['flags']['currentapp']);
|
||||||
|
|
||||||
$GLOBALS['idots_tpl']->pparse('out','sidebox_hide_footer');
|
$GLOBALS['idots_tpl']->pparse('out','sidebox_hide_footer');
|
||||||
|
|
||||||
@ -297,7 +297,7 @@
|
|||||||
$GLOBALS['idots_tpl']->pparse('out','appbox');
|
$GLOBALS['idots_tpl']->pparse('out','appbox');
|
||||||
|
|
||||||
display_sidebox('',$menu_title,$file);
|
display_sidebox('',$menu_title,$file);
|
||||||
$GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']);
|
$GLOBALS['egw']->hooks->single('sidebox_menu',$GLOBALS['egw_info']['flags']['currentapp']);
|
||||||
|
|
||||||
$var['sideboxcolend'] = '</td>';
|
$var['sideboxcolend'] = '</td>';
|
||||||
}
|
}
|
||||||
@ -306,7 +306,7 @@
|
|||||||
$GLOBALS['idots_tpl']->pparse('out','navbar_footer');
|
$GLOBALS['idots_tpl']->pparse('out','navbar_footer');
|
||||||
|
|
||||||
// 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'] && @isset($_GET['menuaction']))
|
if(!@$GLOBALS['egw_info']['flags']['noappheader'] && @isset($_GET['menuaction']))
|
||||||
{
|
{
|
||||||
list($app,$class,$method) = explode('.',$_GET['menuaction']);
|
list($app,$class,$method) = explode('.',$_GET['menuaction']);
|
||||||
if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
|
if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
|
||||||
@ -314,13 +314,13 @@
|
|||||||
$GLOBALS[$class]->header();
|
$GLOBALS[$class]->header();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$GLOBALS['phpgw']->hooks->process('after_navbar');
|
$GLOBALS['egw']->hooks->process('after_navbar');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function display_sidebox($appname,$menu_title,$file)
|
function display_sidebox($appname,$menu_title,$file)
|
||||||
{
|
{
|
||||||
if(!$appname || ($appname==$GLOBALS['phpgw_info']['flags']['currentapp'] && $file))
|
if(!$appname || ($appname==$GLOBALS['egw_info']['flags']['currentapp'] && $file))
|
||||||
{
|
{
|
||||||
$var['lang_title']=$menu_title;//$appname.' '.lang('Menu');
|
$var['lang_title']=$menu_title;//$appname.' '.lang('Menu');
|
||||||
$GLOBALS['idots_tpl']->set_var($var);
|
$GLOBALS['idots_tpl']->set_var($var);
|
||||||
@ -343,14 +343,14 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$var['icon_or_star']='<img src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images'.'/orange-ball.png" width="9" height="9" alt="ball"/>';
|
$var['icon_or_star']='<img src="'.$GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images'.'/orange-ball.png" width="9" height="9" alt="ball"/>';
|
||||||
$var['target'] = '';
|
$var['target'] = '';
|
||||||
if(is_array($item_link))
|
if(is_array($item_link))
|
||||||
{
|
{
|
||||||
if(isset($item_link['icon']))
|
if(isset($item_link['icon']))
|
||||||
{
|
{
|
||||||
$app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['phpgw_info']['flags']['currentapp'];
|
$app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['egw_info']['flags']['currentapp'];
|
||||||
$var['icon_or_star'] = $item_link['icon'] ? '<img style="margin:0px 2px 0px 2px" src="'.$GLOBALS['phpgw']->common->image($app,$item_link['icon']).'"/>' : False;
|
$var['icon_or_star'] = $item_link['icon'] ? '<img style="margin:0px 2px 0px 2px" src="'.$GLOBALS['egw']->common->image($app,$item_link['icon']).'"/>' : False;
|
||||||
}
|
}
|
||||||
$var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']);
|
$var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']);
|
||||||
$var['item_link'] = $item_link['link'];
|
$var['item_link'] = $item_link['link'];
|
||||||
@ -385,25 +385,21 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$var = Array(
|
$var = Array(
|
||||||
'img_root' => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images',
|
'img_root' => $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images',
|
||||||
'table_bg_color' => $GLOBALS['phpgw_info']['theme']['navbar_bg'],
|
'table_bg_color' => $GLOBALS['egw_info']['theme']['navbar_bg'],
|
||||||
'version' => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi']
|
'version' => $GLOBALS['egw_info']['server']['versions']['phpgwapi']
|
||||||
);
|
);
|
||||||
$GLOBALS['phpgw']->hooks->process('navbar_end');
|
$GLOBALS['egw']->hooks->process('navbar_end');
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time'])
|
if($GLOBALS['egw_info']['user']['preferences']['common']['show_generation_time'])
|
||||||
{
|
{
|
||||||
$mtime = microtime();
|
$totaltime = sprintf('%4.2lf',perfgetmicrotime() - $GLOBALS['egw_info']['flags']['page_start_time']);
|
||||||
$mtime = explode(' ',$mtime);
|
|
||||||
$mtime = $mtime[1] + $mtime[0];
|
|
||||||
$tend = $mtime;
|
|
||||||
$totaltime = ($tend - $GLOBALS['page_start_time']);
|
|
||||||
|
|
||||||
$var['page_generation_time'] = '<div id="divGenTime"><br/><span>'.lang('Page was generated in %1 seconds',$totaltime).'</span></div>';
|
$var['page_generation_time'] = '<div id="divGenTime"><br/><span>'.lang('Page was generated in %1 seconds',$totaltime).'</span></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$var['powered_by'] = lang('Powered by eGroupWare version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']);
|
$var['powered_by'] = lang('Powered by eGroupWare version %1',$GLOBALS['egw_info']['server']['versions']['phpgwapi']);
|
||||||
$var['activate_tooltips'] = '<script src="'.$GLOBALS['phpgw_info']['server']['webserver_url'].'/phpgwapi/js/wz_tooltip/wz_tooltip.js" type="text/javascript"></script>';
|
$var['activate_tooltips'] = '<script src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/wz_tooltip/wz_tooltip.js" type="text/javascript"></script>';
|
||||||
$GLOBALS['idots_tpl']->set_var($var);
|
$GLOBALS['idots_tpl']->set_var($var);
|
||||||
$GLOBALS['idots_tpl']->pfp('out','footer');
|
$GLOBALS['idots_tpl']->pfp('out','footer');
|
||||||
}
|
}
|
||||||
|
@ -11,37 +11,29 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time'])
|
|
||||||
{
|
|
||||||
$mtime = microtime();
|
|
||||||
$mtime = explode(' ',$mtime);
|
|
||||||
$mtime = $mtime[1] + $mtime[0];
|
|
||||||
$GLOBALS['page_start_time'] = $mtime;
|
|
||||||
}
|
|
||||||
|
|
||||||
// get used language code
|
// get used language code
|
||||||
$lang_code = 'en';
|
$lang_code = 'en';
|
||||||
|
|
||||||
$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="'
|
$bodyheader = ' bgcolor="' . $GLOBALS['egw_info']['theme']['bg_color'] . '" alink="'
|
||||||
. $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="'
|
. $GLOBALS['egw_info']['theme']['alink'] . '" link="' . $GLOBALS['egw_info']['theme']['link'] . '" vlink="'
|
||||||
. $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
|
. $GLOBALS['egw_info']['theme']['vlink'] . '"';
|
||||||
|
|
||||||
if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
|
if(!$GLOBALS['egw_info']['server']['htmlcompliant'])
|
||||||
{
|
{
|
||||||
$bodyheader .= '';
|
$bodyheader .= '';
|
||||||
}
|
}
|
||||||
|
|
||||||
#_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']);
|
#_debug_array($GLOBALS['egw_info']['user']['preferences']['common']);
|
||||||
$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
|
$theme_css = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/css/'.$GLOBALS['egw_info']['user']['preferences']['common']['theme'].'.css';
|
||||||
if(!file_exists($theme_css))
|
if(!file_exists($theme_css))
|
||||||
{
|
{
|
||||||
$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
|
$theme_css = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/css/'.$GLOBALS['egw_info']['user']['preferences']['common']['theme'].'.css';
|
||||||
}
|
}
|
||||||
|
|
||||||
//pngfix defaults to yes
|
//pngfix defaults to yes
|
||||||
if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_pngfix'])
|
if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_pngfix'])
|
||||||
{
|
{
|
||||||
$pngfix_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/js/pngfix.js';
|
$pngfix_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/js/pngfix.js';
|
||||||
$pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher -->
|
$pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher -->
|
||||||
<!--[if gte IE 5.5000]>
|
<!--[if gte IE 5.5000]>
|
||||||
<script src="'.$pngfix_src.'" type="text/javascript">
|
<script src="'.$pngfix_src.'" type="text/javascript">
|
||||||
@ -49,22 +41,22 @@
|
|||||||
<![endif]-->';
|
<![endif]-->';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'])
|
if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_slider_effects'])
|
||||||
{
|
{
|
||||||
$slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/js/slidereffects.js';
|
$slider_effects_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/js/slidereffects.js';
|
||||||
$slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
|
$slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
|
||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/js/simple_show_hide.js';
|
$simple_show_hide_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/js/simple_show_hide.js';
|
||||||
$simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
|
$simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
|
||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 030204 ndee for calling foldertree
|
// 030204 ndee for calling foldertree
|
||||||
|
|
||||||
$foldertree_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/js/foldertree/foldertree.js';
|
$foldertree_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/js/foldertree/foldertree.js';
|
||||||
$js_foldertree = '<script src="'.$foldertree_src.'" type="text/javascript"></script>';
|
$js_foldertree = '<script src="'.$foldertree_src.'" type="text/javascript"></script>';
|
||||||
|
|
||||||
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||||
@ -72,14 +64,14 @@
|
|||||||
$tpl->set_file(array('_head' => 'head.tpl'));
|
$tpl->set_file(array('_head' => 'head.tpl'));
|
||||||
$tpl->set_block('_head','head');
|
$tpl->set_block('_head','head');
|
||||||
|
|
||||||
if ($GLOBALS['phpgw_info']['flags']['app_header'])
|
if ($GLOBALS['egw_info']['flags']['app_header'])
|
||||||
{
|
{
|
||||||
$app = $GLOBALS['phpgw_info']['flags']['app_header'];
|
$app = $GLOBALS['egw_info']['flags']['app_header'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
|
$app = $GLOBALS['egw_info']['flags']['currentapp'];
|
||||||
$app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app);
|
$app = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : lang($app);
|
||||||
}
|
}
|
||||||
$var = Array(
|
$var = Array(
|
||||||
'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico',
|
'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico',
|
||||||
@ -89,8 +81,8 @@
|
|||||||
'simple_show_hide'=> $simple_show_hide,
|
'simple_show_hide'=> $simple_show_hide,
|
||||||
'lang_code'=> $lang_code,
|
'lang_code'=> $lang_code,
|
||||||
'charset' => $GLOBALS['phpgw']->translation->charset(),
|
'charset' => $GLOBALS['phpgw']->translation->charset(),
|
||||||
'font_family' => $GLOBALS['phpgw_info']['theme']['font'],
|
'font_family' => $GLOBALS['egw_info']['theme']['font'],
|
||||||
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . ($app ? " [$app]" : ''),
|
'website_title' => $GLOBALS['egw_info']['server']['site_title'] . ($app ? " [$app]" : ''),
|
||||||
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
|
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
|
||||||
'theme_css' => $theme_css,
|
'theme_css' => $theme_css,
|
||||||
'css' => $GLOBALS['phpgw']->common->get_css(),
|
'css' => $GLOBALS['phpgw']->common->get_css(),
|
||||||
|
@ -31,10 +31,10 @@
|
|||||||
$GLOBALS['jerryr_tpl']->set_block('navbar','appbox','appbox');
|
$GLOBALS['jerryr_tpl']->set_block('navbar','appbox','appbox');
|
||||||
$GLOBALS['jerryr_tpl']->set_block('navbar','navbar_footer','navbar_footer');
|
$GLOBALS['jerryr_tpl']->set_block('navbar','navbar_footer','navbar_footer');
|
||||||
|
|
||||||
$var['img_root'] = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/images';
|
$var['img_root'] = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/images';
|
||||||
$var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg'];
|
$var['table_bg_color'] = $GLOBALS['egw_info']['theme']['navbar_bg'];
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover')
|
||||||
{
|
{
|
||||||
$show_menu_event = 'onMouseOver';
|
$show_menu_event = 'onMouseOver';
|
||||||
}
|
}
|
||||||
@ -48,17 +48,17 @@
|
|||||||
|
|
||||||
// == 'icons_and_text')
|
// == 'icons_and_text')
|
||||||
|
|
||||||
$max_icons=$GLOBALS['phpgw_info']['user']['preferences']['common']['max_icons'];
|
$max_icons=$GLOBALS['egw_info']['user']['preferences']['common']['max_icons'];
|
||||||
if(!$max_icons)
|
if(!$max_icons)
|
||||||
{
|
{
|
||||||
$max_icons=200;
|
$max_icons=200;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data)
|
foreach($GLOBALS['egw_info']['navbar'] as $app => $app_data)
|
||||||
{
|
{
|
||||||
if($app != 'preferences' && $app != 'about' && $app != 'logout')
|
if($app != 'preferences' && $app != 'about' && $app != 'logout')
|
||||||
{
|
{
|
||||||
$title = $GLOBALS['phpgw_info']['apps'][$app]['title'];
|
$title = $GLOBALS['egw_info']['apps'][$app]['title'];
|
||||||
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title . '" border="0" />';
|
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title . '" border="0" />';
|
||||||
|
|
||||||
if($app=='home')
|
if($app=='home')
|
||||||
@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
if($i<$max_icons)
|
if($i<$max_icons)
|
||||||
{
|
{
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']=='no')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons']=='no')
|
||||||
{
|
{
|
||||||
$tdwidth = 100/($max_icons);
|
$tdwidth = 100/($max_icons);
|
||||||
}
|
}
|
||||||
@ -80,18 +80,18 @@
|
|||||||
|
|
||||||
$app_icons .= '<td height="40" valign="bottom" align="center"><a href="' . $app_data['url'] . '"';
|
$app_icons .= '<td height="40" valign="bottom" align="center"><a href="' . $app_data['url'] . '"';
|
||||||
|
|
||||||
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
|
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
|
||||||
{
|
{
|
||||||
$app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
|
$app_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$app_icons .= $app_data['target'] . '>' . $icon . '</a></td>';
|
$app_icons .= $app_data['target'] . '>' . $icon . '</a></td>';
|
||||||
|
|
||||||
$app_titles .= '<td align=center valign="top" class="appTitles"><a href="'.$app_data['url'] . '"';
|
$app_titles .= '<td align=center valign="top" class="appTitles"><a href="'.$app_data['url'] . '"';
|
||||||
|
|
||||||
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
|
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
|
||||||
{
|
{
|
||||||
$app_titles .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
|
$app_titles .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$app_titles .= $app_data['target'] . '>' . $title . '</a></td>';
|
$app_titles .= $app_data['target'] . '>' . $title . '</a></td>';
|
||||||
@ -104,13 +104,13 @@
|
|||||||
|
|
||||||
$app_extra_icons .= '<tr>';
|
$app_extra_icons .= '<tr>';
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='text')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format']!='text')
|
||||||
{
|
{
|
||||||
$app_extra_icons .= '<td class="extraIconsRow"><a href="' . $app_data['url'] . '"';
|
$app_extra_icons .= '<td class="extraIconsRow"><a href="' . $app_data['url'] . '"';
|
||||||
|
|
||||||
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
|
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
|
||||||
{
|
{
|
||||||
$app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
|
$app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$app_extra_icons .= ' >' . $icon . '</a></td>';
|
$app_extra_icons .= ' >' . $icon . '</a></td>';
|
||||||
@ -120,18 +120,18 @@
|
|||||||
|
|
||||||
// $app_extra_icons .= '<tr><td><a href="' . $app_data['url'] . '"';
|
// $app_extra_icons .= '<tr><td><a href="' . $app_data['url'] . '"';
|
||||||
|
|
||||||
// if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
|
// if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
|
||||||
// {
|
// {
|
||||||
// $app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
|
// $app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// $app_extra_icons .= '>' . $icon . '</a></td>';
|
// $app_extra_icons .= '>' . $icon . '</a></td>';
|
||||||
|
|
||||||
$app_extra_icons .= '<td align="left" class="extraIconsRow" style=""><a href="'.$app_data['url'] . '"';
|
$app_extra_icons .= '<td align="left" class="extraIconsRow" style=""><a href="'.$app_data['url'] . '"';
|
||||||
|
|
||||||
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
|
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
|
||||||
{
|
{
|
||||||
$app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
|
$app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$app_extra_icons .= '>' . $title . '</a></td></tr>';
|
$app_extra_icons .= '>' . $title . '</a></td></tr>';
|
||||||
@ -143,15 +143,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']!='no')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons']!='no')
|
||||||
{
|
{
|
||||||
$app_icons .= '<td width="'.$tdwidth.'%" height="32" valign="bottom" align="center" style="text-align:center"><a
|
$app_icons .= '<td width="'.$tdwidth.'%" height="32" valign="bottom" align="center" style="text-align:center"><a
|
||||||
href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBALS['phpgw_info']['navbar']['logout']['icon'].'" title="'.$GLOBALS['phpgw_info']['navbar']['logout']['title'].'" alt="'.$GLOBALS['phpgw_info']['navbar']['logout']['title'].'"></a></td>';
|
href="'.$GLOBALS['egw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBALS['egw_info']['navbar']['logout']['icon'].'" title="'.$GLOBALS['egw_info']['navbar']['logout']['title'].'" alt="'.$GLOBALS['egw_info']['navbar']['logout']['title'].'"></a></td>';
|
||||||
$app_titles .= '<td align="center" valign="top" class="appTitles" style="text-align:center"><a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'.$GLOBALS['phpgw_info']['navbar']['logout']['title'].'</a></td>';
|
$app_titles .= '<td align="center" valign="top" class="appTitles" style="text-align:center"><a href="'.$GLOBALS['egw_info']['navbar']['logout']['url'].'">'.$GLOBALS['egw_info']['navbar']['logout']['title'].'</a></td>';
|
||||||
|
|
||||||
}
|
}
|
||||||
// $var['app_icons'] = $app_icons;
|
// $var['app_icons'] = $app_icons;
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='text')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format']!='text')
|
||||||
{
|
{
|
||||||
$var['app_icons'] = $app_icons;
|
$var['app_icons'] = $app_icons;
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
|
|||||||
$var['app_extra_icons_icon']= '<td width="26" valign="top" align="right" style="padding-right:3px;padding-top:30px;"><a title="'.lang('show_more_apps').'" href="#" '.$show_menu_event.'="ypSlideOutMenu.showMenu(\'menu1\')"><img src="'.$var['img_root'].'/extra_icons.png" border="0" /></a></td>';
|
$var['app_extra_icons_icon']= '<td width="26" valign="top" align="right" style="padding-right:3px;padding-top:30px;"><a title="'.lang('show_more_apps').'" href="#" '.$show_menu_event.'="ypSlideOutMenu.showMenu(\'menu1\')"><img src="'.$var['img_root'].'/extra_icons.png" border="0" /></a></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='icons')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format']!='icons')
|
||||||
{
|
{
|
||||||
$var['app_titles'] = $app_titles;
|
$var['app_titles'] = $app_titles;
|
||||||
}
|
}
|
||||||
@ -190,16 +190,16 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
|
|||||||
{
|
{
|
||||||
$var['app_titles'] = '<td colspan="'.$max_icons.'"> </td>';
|
$var['app_titles'] = '<td colspan="'.$max_icons.'"> </td>';
|
||||||
}
|
}
|
||||||
if(isset($GLOBALS['phpgw_info']['flags']['app_header']))
|
if(isset($GLOBALS['egw_info']['flags']['app_header']))
|
||||||
{
|
{
|
||||||
$var['current_app_title'] = $GLOBALS['phpgw_info']['flags']['app_header'];
|
$var['current_app_title'] = $GLOBALS['egw_info']['flags']['app_header'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$var['current_app_title']=$GLOBALS['phpgw_info']['navbar'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title'];
|
$var['current_app_title']=$GLOBALS['egw_info']['navbar'][$GLOBALS['egw_info']['flags']['currentapp']]['title'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($GLOBALS['phpgw_info']['navbar']['admin']) && $GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers'])
|
if(isset($GLOBALS['egw_info']['navbar']['admin']) && $GLOBALS['egw_info']['user']['preferences']['common']['show_currentusers'])
|
||||||
{
|
{
|
||||||
$var['current_users'] = '<a href="'
|
$var['current_users'] = '<a href="'
|
||||||
. $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">'
|
. $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">'
|
||||||
@ -208,15 +208,15 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
|
|||||||
$now = time();
|
$now = time();
|
||||||
$var['user_info'] = '<b>'.$GLOBALS['phpgw']->common->display_fullname() .'</b>'. ' - '
|
$var['user_info'] = '<b>'.$GLOBALS['phpgw']->common->display_fullname() .'</b>'. ' - '
|
||||||
. lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' '
|
. lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' '
|
||||||
. $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
|
. $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['egw_info']['user']['preferences']['common']['dateformat']);
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == 0)
|
if($GLOBALS['egw_info']['user']['lastpasswd_change'] == 0)
|
||||||
{
|
{
|
||||||
$api_messages = lang('You are required to change your password during your first login')
|
$api_messages = lang('You are required to change your password during your first login')
|
||||||
. '<br> Click this image on the navbar: <img src="'
|
. '<br> Click this image on the navbar: <img src="'
|
||||||
. $GLOBALS['phpgw']->common->image('preferences','navbar.gif').'">';
|
. $GLOBALS['phpgw']->common->image('preferences','navbar.gif').'">';
|
||||||
}
|
}
|
||||||
elseif($GLOBALS['phpgw_info']['user']['lastpasswd_change'] < time() - (86400*30))
|
elseif($GLOBALS['egw_info']['user']['lastpasswd_change'] < time() - (86400*30))
|
||||||
{
|
{
|
||||||
$api_messages = lang('it has been more then %1 days since you changed your password',30);
|
$api_messages = lang('it has been more then %1 days since you changed your password',30);
|
||||||
}
|
}
|
||||||
@ -227,20 +227,20 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
|
|||||||
$var['messages'] = $api_messages . '<br>' . checkcode($cd);
|
$var['messages'] = $api_messages . '<br>' . checkcode($cd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (substr($GLOBALS['phpgw_info']['server']['login_logo_file'],0,4) == 'http')
|
if (substr($GLOBALS['egw_info']['server']['login_logo_file'],0,4) == 'http')
|
||||||
{
|
{
|
||||||
$var['logo_file'] = $GLOBALS['phpgw_info']['server']['login_logo_file'];
|
$var['logo_file'] = $GLOBALS['egw_info']['server']['login_logo_file'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$var['logo_file'] = $GLOBALS['phpgw']->common->image('phpgwapi',$GLOBALS['phpgw_info']['server']['login_logo_file']?$GLOBALS['phpgw_info']['server']['login_logo_file']:'logo');
|
$var['logo_file'] = $GLOBALS['phpgw']->common->image('phpgwapi',$GLOBALS['egw_info']['server']['login_logo_file']?$GLOBALS['egw_info']['server']['login_logo_file']:'logo');
|
||||||
}
|
}
|
||||||
$var['logo_url'] = $GLOBALS['phpgw_info']['server']['login_logo_url']?$GLOBALS['phpgw_info']['server']['login_logo_url']:'http://www.eGroupWare.org';
|
$var['logo_url'] = $GLOBALS['egw_info']['server']['login_logo_url']?$GLOBALS['egw_info']['server']['login_logo_url']:'http://www.eGroupWare.org';
|
||||||
if (substr($var['logo_url'],0,4) != 'http')
|
if (substr($var['logo_url'],0,4) != 'http')
|
||||||
{
|
{
|
||||||
$var['logo_url'] = 'http://'.$var['logo_url'];
|
$var['logo_url'] = 'http://'.$var['logo_url'];
|
||||||
}
|
}
|
||||||
$var['logo_title'] = $GLOBALS['phpgw_info']['server']['login_logo_title']?$GLOBALS['phpgw_info']['server']['login_logo_title']:'www.eGroupWare.org';
|
$var['logo_title'] = $GLOBALS['egw_info']['server']['login_logo_title']?$GLOBALS['egw_info']['server']['login_logo_title']:'www.eGroupWare.org';
|
||||||
|
|
||||||
$GLOBALS['jerryr_tpl']->set_var($var);
|
$GLOBALS['jerryr_tpl']->set_var($var);
|
||||||
$GLOBALS['jerryr_tpl']->pfp('out','navbar_header');
|
$GLOBALS['jerryr_tpl']->pfp('out','navbar_header');
|
||||||
@ -251,27 +251,27 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
|
|||||||
|
|
||||||
$menu_title = lang('General Menu');
|
$menu_title = lang('General Menu');
|
||||||
|
|
||||||
$file['Home'] = $GLOBALS['phpgw_info']['navbar']['home']['url'];
|
$file['Home'] = $GLOBALS['egw_info']['navbar']['home']['url'];
|
||||||
if($GLOBALS['phpgw_info']['user']['apps']['preferences'])
|
if($GLOBALS['egw_info']['user']['apps']['preferences'])
|
||||||
{
|
{
|
||||||
$file['Preferences'] = $GLOBALS['phpgw_info']['navbar']['preferences']['url'];
|
$file['Preferences'] = $GLOBALS['egw_info']['navbar']['preferences']['url'];
|
||||||
}
|
}
|
||||||
$file += array(
|
$file += array(
|
||||||
array(
|
array(
|
||||||
'text' => lang('About %1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title']),
|
'text' => lang('About %1',$GLOBALS['egw_info']['apps'][$GLOBALS['egw_info']['flags']['currentapp']]['title']),
|
||||||
'no_lang' => True,
|
'no_lang' => True,
|
||||||
'link' => $GLOBALS['phpgw_info']['navbar']['about']['url']
|
'link' => $GLOBALS['egw_info']['navbar']['about']['url']
|
||||||
),
|
),
|
||||||
'Logout'=>$GLOBALS['phpgw_info']['navbar']['logout']['url']
|
'Logout'=>$GLOBALS['egw_info']['navbar']['logout']['url']
|
||||||
);
|
);
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['auto_hide_sidebox']==1)
|
if($GLOBALS['egw_info']['user']['preferences']['common']['auto_hide_sidebox']==1)
|
||||||
{
|
{
|
||||||
$GLOBALS['jerryr_tpl']->set_var('show_menu_event',$show_menu_event);
|
$GLOBALS['jerryr_tpl']->set_var('show_menu_event',$show_menu_event);
|
||||||
$GLOBALS['jerryr_tpl']->pparse('out','sidebox_hide_header');
|
$GLOBALS['jerryr_tpl']->pparse('out','sidebox_hide_header');
|
||||||
|
|
||||||
display_sidebox('',$menu_title,$file);
|
display_sidebox('',$menu_title,$file);
|
||||||
$GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']);
|
$GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['egw_info']['flags']['currentapp']);
|
||||||
|
|
||||||
$GLOBALS['jerryr_tpl']->pparse('out','sidebox_hide_footer');
|
$GLOBALS['jerryr_tpl']->pparse('out','sidebox_hide_footer');
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
|
|||||||
$GLOBALS['jerryr_tpl']->pparse('out','appbox');
|
$GLOBALS['jerryr_tpl']->pparse('out','appbox');
|
||||||
|
|
||||||
display_sidebox('',$menu_title,$file);
|
display_sidebox('',$menu_title,$file);
|
||||||
$GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']);
|
$GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['egw_info']['flags']['currentapp']);
|
||||||
|
|
||||||
$var['sideboxcolend'] = '</td>';
|
$var['sideboxcolend'] = '</td>';
|
||||||
}
|
}
|
||||||
@ -300,7 +300,7 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
|
|||||||
$GLOBALS['jerryr_tpl']->pparse('out','navbar_footer');
|
$GLOBALS['jerryr_tpl']->pparse('out','navbar_footer');
|
||||||
|
|
||||||
// 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'] && @isset($_GET['menuaction']))
|
if(!@$GLOBALS['egw_info']['flags']['noappheader'] && @isset($_GET['menuaction']))
|
||||||
{
|
{
|
||||||
list($app,$class,$method) = explode('.',$_GET['menuaction']);
|
list($app,$class,$method) = explode('.',$_GET['menuaction']);
|
||||||
if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
|
if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
|
||||||
@ -314,7 +314,7 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
|
|||||||
|
|
||||||
function display_sidebox($appname,$menu_title,$file)
|
function display_sidebox($appname,$menu_title,$file)
|
||||||
{
|
{
|
||||||
if(!$appname || ($appname==$GLOBALS['phpgw_info']['flags']['currentapp'] && $file))
|
if(!$appname || ($appname==$GLOBALS['egw_info']['flags']['currentapp'] && $file))
|
||||||
{
|
{
|
||||||
$var['lang_title']=$menu_title;//$appname.' '.lang('Menu');
|
$var['lang_title']=$menu_title;//$appname.' '.lang('Menu');
|
||||||
$GLOBALS['jerryr_tpl']->set_var($var);
|
$GLOBALS['jerryr_tpl']->set_var($var);
|
||||||
@ -337,13 +337,13 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$var['icon_or_star']='<img src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/images'.'/orange-ball.png" width="9" height="9" alt="ball"/>';
|
$var['icon_or_star']='<img src="'.$GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/images'.'/orange-ball.png" width="9" height="9" alt="ball"/>';
|
||||||
$var['target'] = '';
|
$var['target'] = '';
|
||||||
if(is_array($item_link))
|
if(is_array($item_link))
|
||||||
{
|
{
|
||||||
if(isset($item_link['icon']))
|
if(isset($item_link['icon']))
|
||||||
{
|
{
|
||||||
$app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['phpgw_info']['flags']['currentapp'];
|
$app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['egw_info']['flags']['currentapp'];
|
||||||
$var['icon_or_star'] = '<img src="'.$GLOBALS['phpgw']->common->image($app,$item_link['icon']).'"/>';
|
$var['icon_or_star'] = '<img src="'.$GLOBALS['phpgw']->common->image($app,$item_link['icon']).'"/>';
|
||||||
}
|
}
|
||||||
$var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']);
|
$var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']);
|
||||||
@ -373,25 +373,21 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$var = Array(
|
$var = Array(
|
||||||
'img_root' => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/images',
|
'img_root' => $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/images',
|
||||||
'table_bg_color' => $GLOBALS['phpgw_info']['theme']['navbar_bg'],
|
'table_bg_color' => $GLOBALS['egw_info']['theme']['navbar_bg'],
|
||||||
'version' => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi']
|
'version' => $GLOBALS['egw_info']['server']['versions']['phpgwapi']
|
||||||
);
|
);
|
||||||
$GLOBALS['phpgw']->hooks->process('navbar_end');
|
$GLOBALS['phpgw']->hooks->process('navbar_end');
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time'])
|
if($GLOBALS['egw_info']['user']['preferences']['common']['show_generation_time'])
|
||||||
{
|
{
|
||||||
$mtime = microtime();
|
$totaltime = sprintf('%4.2lf',perfgetmicrotime() - $GLOBALS['egw_info']['flags']['page_start_time']);
|
||||||
$mtime = explode(' ',$mtime);
|
|
||||||
$mtime = $mtime[1] + $mtime[0];
|
|
||||||
$tend = $mtime;
|
|
||||||
$totaltime = ($tend - $GLOBALS['page_start_time']);
|
|
||||||
|
|
||||||
$var['page_generation_time'] = '<div id="divGenTime"><br/><span>'.lang('Page was generated in %1 seconds',$totaltime).'</span></div>';
|
$var['page_generation_time'] = '<div id="divGenTime"><br/><span>'.lang('Page was generated in %1 seconds',$totaltime).'</span></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$var['powered_by'] = lang('Powered by eGroupWare version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']);
|
$var['powered_by'] = lang('Powered by eGroupWare version %1',$GLOBALS['egw_info']['server']['versions']['phpgwapi']);
|
||||||
$var['activate_tooltips'] = '<script src="'.$GLOBALS['phpgw_info']['server']['webserver_url'].'/phpgwapi/js/wz_tooltip/wz_tooltip.js" type="text/javascript"></script>';
|
$var['activate_tooltips'] = '<script src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/wz_tooltip/wz_tooltip.js" type="text/javascript"></script>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user