reworked and refractured the way template sets work in eGW:

- virtual baseclass egw_framework in the API which each template extends
- replaces $api/footer.inc.php, $tpl/head.inc.php & $tpl/navbar.inc.php
- all existing phplib template sets just inherit the idots_framework, but can have own templates
- moved most html from navbar.inc.php into the navbar.tpl
--> idots & jerryr are reworked and working, all other template sets are disabled at the moment
--> The rework was done to add a selectbox to add all sorts of entries without the need to change to the app first. This is now implemented in the egw_framework class using the link-registry.
This commit is contained in:
Ralf Becker 2006-12-10 23:44:18 +00:00
parent 66dcb36337
commit a166bb0f57
14 changed files with 1409 additions and 1507 deletions

View File

@ -684,15 +684,14 @@
*/ */
function list_templates() function list_templates()
{ {
$list = array();
$d = dir(EGW_SERVER_ROOT . '/phpgwapi/templates'); $d = dir(EGW_SERVER_ROOT . '/phpgwapi/templates');
while ($entry=$d->read()) while (($entry=$d->read()))
{ {
if ($entry != '..' && is_file(EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry .'/setup/setup.inc.php') if ($entry != '..' && file_exists(EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry .'/class.'.$entry.'_framework.inc.php'))
)
{ {
$list[$entry]['name'] = $entry; $list[$entry]['name'] = $entry;
$f = EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry . '/setup/setup.inc.php'; if (file_exists ($f = EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry . '/setup/setup.inc.php'))
if (file_exists ($f))
{ {
include($f); include($f);
$list[$entry]['title'] = $GLOBALS['egw_info']['template'][$entry]['title']; $list[$entry]['title'] = $GLOBALS['egw_info']['template'][$entry]['title'];
@ -703,11 +702,9 @@
} }
} }
} }
//_debug_array($GLOBALS['egw_info'][template]);
//die();
$d->close(); $d->close();
ksort($list); ksort($list);
return $list; return $list;
} }
@ -715,10 +712,12 @@
* get template dir of an application * get template dir of an application
* *
* @param $appname appication name optional can be derived from $GLOBALS['egw_info']['flags']['currentapp']; * @param $appname appication name optional can be derived from $GLOBALS['egw_info']['flags']['currentapp'];
* @static
* @return string/boolean dir or false if no dir is found
*/ */
function get_tpl_dir($appname = '') function get_tpl_dir($appname = '')
{ {
if (! $appname) if (!$appname)
{ {
$appname = $GLOBALS['egw_info']['flags']['currentapp']; $appname = $GLOBALS['egw_info']['flags']['currentapp'];
} }
@ -744,12 +743,11 @@
{ {
$GLOBALS['egw_info']['server']['template_set'] = $GLOBALS['egw_info']['user']['preferences']['common']['template_set']; $GLOBALS['egw_info']['server']['template_set'] = $GLOBALS['egw_info']['user']['preferences']['common']['template_set'];
} }
elseif ($GLOBALS['egw_info']['server']['template_set'] == 'user_choice' || if (!file_exists(EGW_SERVER_ROOT.'/phpgwapi/templates/'.$GLOBALS['egw_info']['server']['template_set'].'/class.'.
!isset($GLOBALS['egw_info']['server']['template_set'])) $GLOBALS['egw_info']['server']['template_set'].'_framework.inc.php'))
{ {
$GLOBALS['egw_info']['server']['template_set'] = 'default'; $GLOBALS['egw_info']['server']['template_set'] = 'idots';
} }
$tpldir = EGW_SERVER_ROOT . '/' . $appname . '/templates/' . $GLOBALS['egw_info']['server']['template_set']; $tpldir = EGW_SERVER_ROOT . '/' . $appname . '/templates/' . $GLOBALS['egw_info']['server']['template_set'];
$tpldir_default = EGW_SERVER_ROOT . '/' . $appname . '/templates/default'; $tpldir_default = EGW_SERVER_ROOT . '/' . $appname . '/templates/default';
@ -871,6 +869,17 @@
} }
} }
/**
* Searches and image by a given search order (it maintains a cache of the existing images):
* - image dir of the application for the given template
* - image dir of the application for the default template
* - image dir of the API for the given template
* - image dir of the API for the default template
*
* @param string $appname
* @param string $image
* @return string url of the image
*/
function find_image($appname,$image) function find_image($appname,$image)
{ {
$imagedir = '/'.$appname.'/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/images'; $imagedir = '/'.$appname.'/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/images';
@ -993,6 +1002,15 @@
return $imgfile; return $imgfile;
} }
/**
* Searches a appname, template and maybe language and type-specific image
*
* @param string $appname
* @param string $image
* @param string $ext
* @param boolean $use_lang
* @return string url of the image
*/
function image($appname,$image='',$ext='',$use_lang=True) function image($appname,$image='',$ext='',$use_lang=True)
{ {
if (!is_array($image)) if (!is_array($image))
@ -1026,123 +1044,41 @@
return $image_found; return $image_found;
} }
/**
* Searches an image of a given type, if not found also without type/extension
*
* @param string $appname
* @param string $image
* @param string $extension
* @return string url of the image
*/
function image_on($appname,$image,$extension='_on') function image_on($appname,$image,$extension='_on')
{ {
$with_extension = $this->image($appname,$image,$extension); if (($with_extension = $this->image($appname,$image,$extension)))
$without_extension = $this->image($appname,$image);
if($with_extension != '')
{ {
return $with_extension; return $with_extension;
} }
elseif($without_extension != '') if(($without_extension = $this->image($appname,$image)))
{ {
return $without_extension; return $without_extension;
} }
else return '';
{
return '';
}
} }
/** /**
* none yet * prepare an array with variables used to render the navbar
* *
* *someone wanna add some detail here* * @deprecated inherit from egw_framework class in your template and use egw_framework::_navbar_vars()
*/ */
function navbar() function navbar()
{ {
$GLOBALS['egw_info']['navbar'] = $GLOBALS['egw']->framework->_get_navbar_vars();
list($first) = each($GLOBALS['egw_info']['user']['apps']);
if(is_array($GLOBALS['egw_info']['user']['apps']['admin']) && $first != 'admin')
{
$newarray['admin'] = $GLOBALS['egw_info']['user']['apps']['admin'];
foreach($GLOBALS['egw_info']['user']['apps'] as $index => $value)
{
if($index != 'admin')
{
$newarray[$index] = $value;
}
}
$GLOBALS['egw_info']['user']['apps'] = $newarray;
reset($GLOBALS['egw_info']['user']['apps']);
}
unset($index);
unset($value);
unset($newarray);
foreach($GLOBALS['egw_info']['user']['apps'] as $app => $data)
{
if (is_long($app))
{
continue;
}
if ($app == 'preferences' || $GLOBALS['egw_info']['apps'][$app]['status'] != 2 && $GLOBALS['egw_info']['apps'][$app]['status'] != 3)
{
$GLOBALS['egw_info']['navbar'][$app]['title'] = $GLOBALS['egw_info']['apps'][$app]['title'];
$GLOBALS['egw_info']['navbar'][$app]['url'] = $GLOBALS['egw']->link('/' . $app . '/index.php',$GLOBALS['egw_info']['flags']['params'][$app]);
$GLOBALS['egw_info']['navbar'][$app]['name'] = $app;
// create popup target
if ($data['status'] == 4)
{
$GLOBALS['egw_info']['navbar'][$app]['target'] = ' target="'.$app.'" onClick="'."if (this != '') { window.open(this+'".
(strstr($GLOBALS['egw_info']['navbar'][$app]['url'],'?') ||
ini_get('session.use_trans_sid') && substr($GLOBALS['egw_info']['server']['sessions_type'],0,4) == 'php4' ?'&':'?').
"referer='+encodeURI(location),this.target,'width=800,height=600,scrollbars=yes,resizable=yes'); return false; } else { return true; }".'"';
}
if ($app != $GLOBALS['egw_info']['flags']['currentapp'])
{
$GLOBALS['egw_info']['navbar'][$app]['icon'] = $this->image($app,Array('navbar','nonav'));
$GLOBALS['egw_info']['navbar'][$app]['icon_hover'] = $this->image_on($app,Array('navbar','nonav'),'-over');
}
else
{
$GLOBALS['egw_info']['navbar'][$app]['icon'] = $this->image_on($app,Array('navbar','nonav'),'-over');
$GLOBALS['egw_info']['navbar'][$app]['icon_hover'] = $this->image($app,Array('navbar','nonav'));
}
// if($GLOBALS['egw_info']['navbar'][$app]['icon'] == '')
// {
// $GLOBALS['egw_info']['navbar'][$app]['icon'] = $this->image('phpgwapi','nonav');
// }
}
}
if ($GLOBALS['egw_info']['flags']['currentapp'] == 'preferences' || $GLOBALS['egw_info']['flags']['currentapp'] == 'about')
{
$app = $app_title = 'eGroupWare';
}
else
{
$app = $GLOBALS['egw_info']['flags']['currentapp'];
$app_title = $GLOBALS['egw_info']['apps'][$app]['title'];
}
if ($GLOBALS['egw_info']['user']['apps']['preferences']) // preferences last
{
$prefs = $GLOBALS['egw_info']['navbar']['preferences'];
unset($GLOBALS['egw_info']['navbar']['preferences']);
$GLOBALS['egw_info']['navbar']['preferences'] = $prefs;
}
// We handle this here becuase its special
$GLOBALS['egw_info']['navbar']['about']['title'] = lang('About %1',$app_title);
$GLOBALS['egw_info']['navbar']['about']['url'] = $GLOBALS['egw']->link('/about.php','app='.$app);
$GLOBALS['egw_info']['navbar']['about']['icon'] = $this->image('phpgwapi',Array('about','nonav'));
$GLOBALS['egw_info']['navbar']['about']['icon_hover'] = $this->image_on('phpgwapi',Array('about','nonav'),'-over');
$GLOBALS['egw_info']['navbar']['logout']['title'] = lang('Logout');
$GLOBALS['egw_info']['navbar']['logout']['url'] = $GLOBALS['egw']->link('/logout.php');
$GLOBALS['egw_info']['navbar']['logout']['icon'] = $this->image('phpgwapi',Array('logout','nonav'));
$GLOBALS['egw_info']['navbar']['logout']['icon_hover'] = $this->image_on('phpgwapi',Array('logout','nonav'),'-over');
} }
/** /**
* load header.inc.php for an application * load header.inc.php for an application
* *
* @deprecated
*/ */
function app_header() function app_header()
{ {
@ -1153,195 +1089,61 @@
} }
/** /**
* load the phpgw header * load the eGW header
* *
* @deprecated use egw_framework::header(), $GLOBALS['egw']->framework->navbar() or better egw_framework::render($content)
*/ */
function egw_header() function egw_header()
{ {
// add a content-type header to overwrite an existing default charset in apache (AddDefaultCharset directiv) echo $GLOBALS['egw']->framework->header();
header('Content-type: text/html; charset='.$GLOBALS['egw']->translation->charset());
if (!$GLOBALS['egw_info']['flags']['nonavbar'])
ob_end_flush();
include_once(EGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['egw_info']['server']['template_set']
. '/head.inc.php');
$this->navbar(False);
include_once(EGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['egw_info']['server']['template_set']
. '/navbar.inc.php');
if (!@$GLOBALS['egw_info']['flags']['nonavbar'] && !@$GLOBALS['egw_info']['flags']['navbar_target'])
{ {
echo parse_navbar(); echo $GLOBALS['egw']->framework->navbar();
} }
} }
/**
* load the eGW footer
*
* @deprecated use egw_framework::footer() or egw_framework::render($content)
*/
function egw_footer() function egw_footer()
{ {
if (!defined('EGW_FOOTER')) echo $GLOBALS['egw']->framework->footer();
{
define('EGW_FOOTER',True);
if (!isset($GLOBALS['egw_info']['flags']['nofooter']) || !$GLOBALS['egw_info']['flags']['nofooter'])
{
include(EGW_API_INC . '/footer.inc.php');
}
}
} }
/** /**
* Used by template headers for including CSS in the header * Used by template headers for including CSS in the header
* *
* This first loads up the basic global CSS definitions, which support * @deprecated use framework::_get_css()
* the selected user theme colors. Next we load up the app CSS. This is * @return string
* all merged into the selected theme's css.tpl file.
*
* @author Dave Hall (*based* on verdilak? css inclusion code)
*/ */
function get_css() function get_css()
{ {
$tpl =& CreateObject('phpgwapi.Template', $this->get_tpl_dir('phpgwapi')); return $GLOBALS['egw']->framework->_get_css();
$tpl->set_file('css', 'css.tpl');
$tpl->set_var($GLOBALS['egw_info']['theme']);
$app_css = '';
if(@isset($_GET['menuaction']))
{
list($app,$class,$method) = explode('.',$_GET['menuaction']);
if(is_array($GLOBALS[$class]->public_functions) &&
$GLOBALS[$class]->public_functions['css'])
{
$app_css .= $GLOBALS[$class]->css();
}
}
if (isset($GLOBALS['egw_info']['flags']['css']))
{
$app_css .= $GLOBALS['egw_info']['flags']['css'];
}
$tpl->set_var('app_css', $app_css);
// search for app specific css file
if(@isset($GLOBALS['egw_info']['flags']['currentapp']))
{
$appname = $GLOBALS['egw_info']['flags']['currentapp'];
if(file_exists(EGW_SERVER_ROOT . SEP . $appname . SEP
. 'templates' . SEP . $GLOBALS['egw_info']['server']['template_set']
. SEP . 'app.css')
)
{
$tpl->set_var('css_file', '<LINK href="'.$GLOBALS['egw_info']['server']['webserver_url']
. "/$appname/templates/".$GLOBALS['egw_info']['server']['template_set']
. "/app.css".'" type=text/css rel=StyleSheet>');
}
elseif(file_exists(EGW_SERVER_ROOT . SEP . $appname . SEP
. 'templates' . SEP . 'default'
. SEP . 'app.css')
)
{
$tpl->set_var('css_file', '<LINK href="'.$GLOBALS['egw_info']['server']['webserver_url']
."/$appname/templates/default/app.css".'" type=text/css rel=StyleSheet>');
}
}
return $tpl->subst('css');
} }
/** /**
* Used by the template headers for including javascript in the header * Used by the template headers for including javascript in the header
* *
* The method is included here to make it easier to change the js support * @deprecated use framework::_get_js()
* in phpgw. One change then all templates will support it (as long as they
* include a call to this method).
*
* @author Dave Hall (*vaguely based* on verdilak? css inclusion code)
* @return string the javascript to be included * @return string the javascript to be included
*/ */
function get_java_script() function get_java_script()
{ {
$java_script = ''; return $GLOBALS['egw']->framework->_get_js();
if(!@is_object($GLOBALS['egw']->js))
{
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
}
// always include javascript helper functions
$GLOBALS['egw']->js->validate_file('jsapi','jsapi');
//viniciuscb: in Concisus this condition is inexistent, and in all
//pages the javascript globals are inserted. Today, because
//filescenter needs these javascript globals, this
//include_jsbackend is a must to the javascript globals be
//included.
if ($GLOBALS['egw_info']['flags']['include_jsbackend'])
{
if (!$GLOBALS['egw_info']['flags']['nojsapi'])
{
$GLOBALS['egw']->js->validate_jsapi();
}
if(@is_object($GLOBALS['egw']->js))
{
$java_script .= $GLOBALS['egw']->js->get_javascript_globals();
}
}
if ($GLOBALS['egw']->acl->check('run',1,'notifications') && !$GLOBALS['egw_info']['user']['preferences']['notifications']['disable_ajaxpopup'])
{
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
}
if ($GLOBALS['egw_info']['flags']['include_xajax'])
{
require_once(EGW_SERVER_ROOT.'/phpgwapi/inc/xajax.inc.php');
$xajax =& new xajax($GLOBALS['egw']->link('/xajax.php'), 'xajax_', $GLOBALS['egw']->translation->charset());
$xajax->waitCursorOff();
$xajax->registerFunction("doXMLHTTP");
$java_script .= $xajax->getJavascript($GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/js/');
}
/* this flag is for all javascript code that has to be put before other jscode.
Think of conf vars etc... (pim@lingewoud.nl) */
if (isset($GLOBALS['egw_info']['flags']['java_script_thirst']))
{
$java_script .= $GLOBALS['egw_info']['flags']['java_script_thirst'] . "\n";
}
if(@is_object($GLOBALS['egw']->js))
{
$java_script .= $GLOBALS['egw']->js->get_script_links();
}
if(@isset($_GET['menuaction']))
{
list($app,$class,$method) = explode('.',$_GET['menuaction']);
if(is_array($GLOBALS[$class]->public_functions) &&
$GLOBALS[$class]->public_functions['java_script'])
{
$java_script .= $GLOBALS[$class]->java_script();
}
}
if (isset($GLOBALS['egw_info']['flags']['java_script']))
{
$java_script .= $GLOBALS['egw_info']['flags']['java_script'] . "\n";
}
return $java_script;
} }
/** /**
* Returns on(Un)Load attributes from js class * Returns on(Un)Load attributes from js class
* *
*@author Dave Hall - skwashd at egroupware.org * @deprecated use framework::_get_js()
*@returns string body attributes * @returns string body attributes
*/ */
function get_body_attribs() function get_body_attribs()
{ {
if(@is_object($GLOBALS['egw']->js)) return $GLOBALS['egw']->framework->_get_body_attribs();
{
return $GLOBALS['egw']->js->get_body_attribs();
}
else
{
return '';
}
} }
function hex2bin($data) function hex2bin($data)

View File

@ -136,7 +136,7 @@
$this->preferences =& CreateObject('phpgwapi.preferences'); $this->preferences =& CreateObject('phpgwapi.preferences');
$this->applications =& CreateObject('phpgwapi.applications'); $this->applications =& CreateObject('phpgwapi.applications');
$this->contenthistory =& CreateObject('phpgwapi.contenthistory'); $this->contenthistory =& CreateObject('phpgwapi.contenthistory');
$this->datetime =& CreateObject('phpgwapi.datetime'); $this->datetime =& CreateObject('phpgwapi.egw_datetime');
include_once(EGW_INCLUDE_ROOT.'/phpgwapi/inc/class.error.inc.php'); include_once(EGW_INCLUDE_ROOT.'/phpgwapi/inc/class.error.inc.php');
@ -146,9 +146,15 @@
{ {
$this->verify_session(); $this->verify_session();
$this->applications->read_installed_apps(); // to get translated app-titles, has to be after verify_session $this->applications->read_installed_apps(); // to get translated app-titles, has to be after verify_session
$this->define_egw_constants(); $this->define_egw_constants();
// setup the new eGW framework (template sets)
$class = $GLOBALS['egw_info']['server']['template_set'].'_framework';
require_once(EGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['egw_info']['server']['template_set'].
'/class.'.$class.'.inc.php');
$this->framework =& new $class;
$this->load_theme_info(); $this->load_theme_info();
$this->check_app_rights(); $this->check_app_rights();

View File

@ -0,0 +1,680 @@
<?php
/**
* eGW API - framework
*
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de> rewrite in 12/2006
* @author Pim Snel <pim@lingewoud.nl> author of the idots template set
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package api
* @subpackage framework
* @access public
* @version $Id$
*/
/**
* eGW API - framework: virtual base class for all template sets
*
* This class creates / renders the eGW framework:
* a) html header
* b) navbar
* c) sidebox menu
* d) main application area
* e) footer
* It replaces several methods in the common class and the diverse templates.
*
* Existing apps either set $GLOBALS['egw_info']['flags']['noheader'] and call $GLOBALS['egw']->common->egw_header() and
* (if $GLOBALS['egw_info']['flags']['nonavbar'] is true) parse_navbar() or it's done by the header.inc.php include.
* The app's hook_sidebox then calls the public function display_sidebox().
* And the app calls $GLOBALS['egw']->common->egw_footer().
*
* This are the authors (and their copyrights) of the original egw_header, egw_footer methods of the common class:
* This file written by Dan Kuykendall <seek3r@phpgroupware.org>
* and Joseph Engo <jengo@phpgroupware.org>
* and Mark Peters <skeeter@phpgroupware.org>
* and Lars Kneschke <lkneschke@linux-at-work.de>
* Copyright (C) 2000, 2001 Dan Kuykendall
* Copyright (C) 2003 Lars Kneschke
*/
class egw_framework
{
/**
* Name of the template set, eg. 'idots'
*
* @var string
*/
var $template;
/**
* Constructor
*
* The constructor instanciates the class in $GLOBALS['egw']->framework, from where it should be used
*
* @return egw_framework
*/
function egw_framework($template)
{
$this->template = $template;
if (!is_object($GLOBALS['egw']->framework))
{
$GLOBALS['egw']->framework =& $this;
}
}
/**
* Renders an applicaton page with the complete eGW framework (header, navigation and menu)
*
* This is the (new) prefered way to render a page in eGW!
*
* @param string $content html of the main application area
* @param string $app_header=null application header, default what's set in $GLOBALS['egw_info']['flags']['app_header']
* @param string $navbar=null show the navigation, default !$GLOBALS['egw_info']['flags']['nonavbar'], false gives a typical popu
*
*/
function render($content,$app_header=null,$navbar=null)
{
if (!is_null($app_header)) $GLOBALS['egw_info']['flags']['app_header'] = $app_header;
if (!is_null($navbar)) $GLOBALS['egw_info']['flags']['nonavbar'] = !$navbar;
echo $this->header();
if (!isset($GLOBALS['egw_info']['flags']['nonavbar']) || !$GLOBALS['egw_info']['flags']['nonavbar'])
{
echo $this->navbar();
}
echo $content;
echo $this->footer();
}
/**
* Returns the html-header incl. the opening body tag
*
* @return string with html
*/
function header()
{
die('virtual, need to be reimplemented in the template!!!');
}
/**
* Returns the html from the body-tag til the main application area (incl. opening div tag)
*
* @return string with html
*/
function navbar()
{
die('virtual, need to be reimplemented in the template!!!');
}
/**
* Returns the content of one sidebox
*
* @param string $appname
* @param string $menu_title
* @param array $file
*/
function sidebox($appname,$menu_title,$file)
{
die('virtual, need to be reimplemented in the template!!!');
}
/**
* Returns the html from the closing div of the main application area to the closing html-tag
*
* @return string
*/
function footer()
{
die('virtual, need to be reimplemented in the template!!!');
}
/**
* Get footer as array to eg. set as vars for a template (from idots' head.inc.php)
*
* @internal PHP5 protected
* @return array
*/
function _get_footer()
{
$var = Array(
'img_root' => $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$this->template.'/images',
'table_bg_color' => $GLOBALS['egw_info']['theme']['navbar_bg'],
'version' => $GLOBALS['egw_info']['server']['versions']['phpgwapi']
);
if($GLOBALS['egw_info']['user']['preferences']['common']['show_generation_time'])
{
$totaltime = sprintf('%4.2lf',perfgetmicrotime() - $GLOBALS['egw_info']['flags']['page_start_time']);
$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['egw_info']['server']['versions']['phpgwapi']);
$var['activate_tooltips'] = '<script src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/wz_tooltip/wz_tooltip.js" type="text/javascript"></script>';
return $var;
}
/**
* Get the (depricated) application footer
*
* @return string html
*/
function _get_app_footer()
{
ob_start();
// Include the apps footer files if it exists
if (EGW_APP_INC != EGW_API_INC && // this prevents an endless inclusion on the homepage
// (some apps set currentapp in hook_home => it's not releyable)
(file_exists (EGW_APP_INC . '/footer.inc.php') || isset($_GET['menuaction'])) &&
$GLOBALS['egw_info']['flags']['currentapp'] != 'home' &&
$GLOBALS['egw_info']['flags']['currentapp'] != 'login' &&
$GLOBALS['egw_info']['flags']['currentapp'] != 'logout' &&
!@$GLOBALS['egw_info']['flags']['noappfooter'])
{
list($app,$class,$method) = explode('.',(string)$_GET['menuaction']);
if ($class && is_object($GLOBALS[$class]) && is_array($GLOBALS[$class]->public_functions) &&
isset($GLOBALS[$class]->public_functions['footer']))
{
$GLOBALS[$class]->footer();
}
elseif(file_exists(EGW_APP_INC.'/footer.inc.php'))
{
include(EGW_APP_INC . '/footer.inc.php');
}
}
$content = ob_get_contents();
ob_end_clean();
return $content;
}
/**
* Get header as array to eg. set as vars for a template (from idots' head.inc.php)
*
* @internal PHP5 protected
* @return array
*/
function _get_header()
{
// get used language code
$lang_code = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];
$bodyheader = ' bgcolor="' . $GLOBALS['egw_info']['theme']['bg_color'] . '" alink="'
. $GLOBALS['egw_info']['theme']['alink'] . '" link="' . $GLOBALS['egw_info']['theme']['link'] . '" vlink="'
. $GLOBALS['egw_info']['theme']['vlink'] . '"';
if(!$GLOBALS['egw_info']['server']['htmlcompliant'])
{
$bodyheader .= '';
}
#_debug_array($GLOBALS['egw_info']['user']['preferences']['common']);
$theme_css = '/phpgwapi/templates/'.$this->template.'/css/'.$GLOBALS['egw_info']['user']['preferences']['common']['theme'].'.css';
if(!file_exists(EGW_SERVER_ROOT.$theme_css))
{
$theme_css = '/phpgwapi/templates/'.$this->template.'/css/'.$this->template.'.css';
}
$theme_css = $GLOBALS['egw_info']['server']['webserver_url'] . $theme_css;
$print_css = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$this->template.'/print.css';
//pngfix defaults to yes
if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_pngfix'])
{
$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 -->
<!--[if gte IE 5.5000]>
<script src="'.$pngfix_src.'" type="text/javascript">
</script>
<![endif]-->';
}
if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_slider_effects'])
{
$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">
</script>';
}
else
{
$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">
</script>';
}
if ($GLOBALS['egw_info']['flags']['app_header'])
{
$app = $GLOBALS['egw_info']['flags']['app_header'];
}
else
{
$app = $GLOBALS['egw_info']['flags']['currentapp'];
$app = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : lang($app);
}
if($app!='wiki') $robots ='<meta name="robots" content="none" />';
return array(
'img_icon' => EGW_IMAGES_DIR . '/favicon.ico',
'img_shortcut' => EGW_IMAGES_DIR . '/favicon.ico',
'pngfix' => $pngfix,
'slider_effects' => $slider_effects,
'simple_show_hide' => $simple_show_hide,
'lang_code' => $lang_code,
'charset' => $GLOBALS['egw']->translation->charset(),
'font_family' => $GLOBALS['egw_info']['theme']['font'],
'website_title' => strip_tags($GLOBALS['egw_info']['server']['site_title']. ($app ? " [$app]" : '')),
'body_tags' => $bodyheader .' '. $GLOBALS['egw']->common->get_body_attribs(),
'theme_css' => $theme_css,
'print_css' => $print_css,
'css' => $GLOBALS['egw']->common->get_css(),
'java_script' => $GLOBALS['egw']->common->get_java_script(),
'meta_robots' => $robots,
'dir_code' => lang('language_direction_rtl') != 'rtl' ? '' : ' dir="rtl"',
);
}
/**
* Get navbar as array to eg. set as vars for a template (from idots' navbar.inc.php)
*
* @internal PHP5 protected
* @param array $apps navbar apps from _get_navbar_apps
* @return array
*/
function _get_navbar($apps)
{
$var['img_root'] = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$this->template.'/images';
$var['table_bg_color'] = $GLOBALS['egw_info']['theme']['navbar_bg'];
if(isset($GLOBALS['egw_info']['flags']['app_header']))
{
$var['current_app_title'] = $GLOBALS['egw_info']['flags']['app_header'];
}
else
{
$var['current_app_title']=$apps[$GLOBALS['egw_info']['flags']['currentapp']]['title'];
}
// current users for admins
if(isset($apps['admin']) && $GLOBALS['egw_info']['user']['preferences']['common']['show_currentusers'])
{
$var['current_users'] = '<a href="'
. $GLOBALS['egw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">'
. lang('Current users') . ': ' . $GLOBALS['egw']->session->total() . '</a>';
}
// quick add selectbox
$var['quick_add'] = $this->_get_quick_add();
$now = time();
$var['user_info'] = '<b>'.$GLOBALS['egw']->common->display_fullname() .'</b>'. ' - '
. lang($GLOBALS['egw']->common->show_date($now,'l')) . ' '
. $GLOBALS['egw']->common->show_date($now,$GLOBALS['egw_info']['user']['preferences']['common']['dateformat']);
if($GLOBALS['egw_info']['user']['lastpasswd_change'] == 0)
{
$api_messages = lang('You are required to change your password during your first login').'<br />'.
lang('Click this image on the navbar: %1','<img src="'.$GLOBALS['egw']->common->image('preferences','navbar.gif').'">');
}
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);
}
// This is gonna change
if(isset($cd))
{
$var['messages'] = $api_messages . '<br />' . checkcode($cd);
}
if (substr($GLOBALS['egw_info']['server']['login_logo_file'],0,4) == 'http')
{
$var['logo_file'] = $GLOBALS['egw_info']['server']['login_logo_file'];
}
else
{
$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['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')
{
$var['logo_url'] = 'http://'.$var['logo_url'];
}
$var['logo_title'] = $GLOBALS['egw_info']['server']['login_logo_title']?$GLOBALS['egw_info']['server']['login_logo_title']:'www.eGroupWare.org';
return $var;
}
/**
* Prepare the quick add selectbox
*
* @return string
*/
function _get_quick_add()
{
if (!is_object($GLOBALS['egw']->link))
{
require_once(EGW_API_INC.'/class.bolink.inc.php');
$GLOBALS['egw']->link =& new bolink();
}
$apps = $GLOBALS['egw']->link->app_list('add');
asort($apps); // sort them alphabetic
$options = array(lang('Add').' ...');
foreach($apps as $app => $label)
{
$link = $GLOBALS['egw']->link('/index.php',$GLOBALS['egw']->link->add($app,$GLOBALS['egw_info']['flags']['currentapp'],$GLOBALS['egw_info']['flags']['currentid'])+
(is_array($GLOBALS['egw_info']['flags']['quick_add']) ? $GLOBALS['egw_info']['flags']['quick_add'] : array()));
if (($popup = $GLOBALS['egw']->link->is_popup($app,'add')))
{
list($w,$h) = explode('x',$popup);
$action = "window.open('$link','_blank','width=$w,height=$h,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes');";
}
else
{
$action = "location.href = '$link';";
}
$options[$action] = $label;
}
if (!is_object($GLOBALS['egw']->html))
{
require_once(EGW_API_INC.'/class.html.inc.php');
$GLOBALS['egw']->html =& new html();
}
return $GLOBALS['egw']->html->select('quick_add','',$options,true,$options=' onchange="eval(this.value); this.value=0; return false;"');
}
/**
* Prepare an array with apps used to render the navbar
*
* This is similar to the former common::navbar() method - though it returns the vars and does not place them in global scope.
*
* @internal PHP5 protected
* @static
* @return array
*/
function _get_navbar_apps()
{
list($first) = each($GLOBALS['egw_info']['user']['apps']);
if(is_array($GLOBALS['egw_info']['user']['apps']['admin']) && $first != 'admin')
{
$newarray['admin'] = $GLOBALS['egw_info']['user']['apps']['admin'];
foreach($GLOBALS['egw_info']['user']['apps'] as $index => $value)
{
if($index != 'admin')
{
$newarray[$index] = $value;
}
}
$GLOBALS['egw_info']['user']['apps'] = $newarray;
reset($GLOBALS['egw_info']['user']['apps']);
}
unset($index);
unset($value);
unset($newarray);
$apps = array();
foreach($GLOBALS['egw_info']['user']['apps'] as $app => $data)
{
if (is_long($app))
{
continue;
}
if ($app == 'preferences' || $GLOBALS['egw_info']['apps'][$app]['status'] != 2 && $GLOBALS['egw_info']['apps'][$app]['status'] != 3)
{
$apps[$app]['title'] = $GLOBALS['egw_info']['apps'][$app]['title'];
$apps[$app]['url'] = $GLOBALS['egw']->link('/' . $app . '/index.php',$GLOBALS['egw_info']['flags']['params'][$app]);
$apps[$app]['name'] = $app;
// create popup target
if ($data['status'] == 4)
{
$apps[$app]['target'] = ' target="'.$app.'" onClick="'."if (this != '') { window.open(this+'".
(strstr($apps[$app]['url'],'?') ||
ini_get('session.use_trans_sid') && substr($GLOBALS['egw_info']['server']['sessions_type'],0,4) == 'php4' ?'&':'?').
"referer='+encodeURI(location),this.target,'width=800,height=600,scrollbars=yes,resizable=yes'); return false; } else { return true; }".'"';
}
elseif(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
{
$apps[$app]['target'] = 'target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
}
else
{
$apps[$app]['target'] = '';
}
if ($app != $GLOBALS['egw_info']['flags']['currentapp'])
{
$apps[$app]['icon'] = $GLOBALS['egw']->common->image($app,Array('navbar','nonav'));
$apps[$app]['icon_hover'] = $GLOBALS['egw']->common->image_on($app,Array('navbar','nonav'),'-over');
}
else
{
$apps[$app]['icon'] = $GLOBALS['egw']->common->image_on($app,Array('navbar','nonav'),'-over');
$apps[$app]['icon_hover'] = $GLOBALS['egw']->common->image($app,Array('navbar','nonav'));
}
}
}
if ($GLOBALS['egw_info']['flags']['currentapp'] == 'preferences' || $GLOBALS['egw_info']['flags']['currentapp'] == 'about')
{
$app = $app_title = 'eGroupWare';
}
else
{
$app = $GLOBALS['egw_info']['flags']['currentapp'];
$app_title = $GLOBALS['egw_info']['apps'][$app]['title'];
}
if ($GLOBALS['egw_info']['user']['apps']['preferences']) // preferences last
{
$prefs = $apps['preferences'];
unset($apps['preferences']);
$apps['preferences'] = $prefs;
}
// We handle this here becuase its special
$apps['about']['title'] = lang('About %1',$app_title);
$apps['about']['url'] = $GLOBALS['egw']->link('/about.php','app='.$app);
$apps['about']['icon'] = $GLOBALS['egw']->common->image('phpgwapi',Array('about','nonav'));
$apps['about']['icon_hover'] = $GLOBALS['egw']->common->image_on('phpgwapi',Array('about','nonav'),'-over');
$apps['logout']['title'] = lang('Logout');
$apps['logout']['url'] = $GLOBALS['egw']->link('/logout.php');
$apps['logout']['icon'] = $GLOBALS['egw']->common->image('phpgwapi',Array('logout','nonav'));
$apps['logout']['icon_hover'] = $GLOBALS['egw']->common->image_on('phpgwapi',Array('logout','nonav'),'-over');
return $apps;
}
/**
* Used by template headers for including CSS in the header
*
* This first loads up the basic global CSS definitions, which support
* the selected user theme colors. Next we load up the app CSS. This is
* all merged into the selected theme's css.tpl file.
*
* @internal PHP5 protected
* @author Dave Hall (*based* on verdilak? css inclusion code)
*/
function _get_css()
{
$tpl =& CreateObject('phpgwapi.Template', common::get_tpl_dir('phpgwapi'));
$tpl->set_file('css', 'css.tpl');
$tpl->set_var($GLOBALS['egw_info']['theme']);
$app_css = '';
if(isset($_GET['menuaction']))
{
list($app,$class,$method) = explode('.',$_GET['menuaction']);
if(is_array($GLOBALS[$class]->public_functions) &&
$GLOBALS[$class]->public_functions['css'])
{
$app_css .= $GLOBALS[$class]->css();
}
}
if (isset($GLOBALS['egw_info']['flags']['css']))
{
$app_css .= $GLOBALS['egw_info']['flags']['css'];
}
$tpl->set_var('app_css', $app_css);
// search for app specific css file
if(@isset($GLOBALS['egw_info']['flags']['currentapp']))
{
$appname = $GLOBALS['egw_info']['flags']['currentapp'];
if(file_exists(EGW_SERVER_ROOT . SEP . $appname . SEP
. 'templates' . SEP . $GLOBALS['egw_info']['server']['template_set']
. SEP . 'app.css')
)
{
$tpl->set_var('css_file', '<LINK href="'.$GLOBALS['egw_info']['server']['webserver_url']
. "/$appname/templates/".$GLOBALS['egw_info']['server']['template_set']
. "/app.css".'" type=text/css rel=StyleSheet>');
}
elseif(file_exists(EGW_SERVER_ROOT . SEP . $appname . SEP
. 'templates' . SEP . 'default'
. SEP . 'app.css')
)
{
$tpl->set_var('css_file', '<LINK href="'.$GLOBALS['egw_info']['server']['webserver_url']
."/$appname/templates/default/app.css".'" type=text/css rel=StyleSheet>');
}
}
return $tpl->subst('css');
}
/**
* Used by the template headers for including javascript in the header
*
* The method is included here to make it easier to change the js support
* in eGW. One change then all templates will support it (as long as they
* include a call to this method).
*
* @internal PHP5 protected
* @author Dave Hall (*vaguely based* on verdilak? css inclusion code)
* @return string the javascript to be included
*/
function _get_js()
{
$java_script = '';
if(!@is_object($GLOBALS['egw']->js))
{
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
}
// always include javascript helper functions
$GLOBALS['egw']->js->validate_file('jsapi','jsapi');
//viniciuscb: in Concisus this condition is inexistent, and in all
//pages the javascript globals are inserted. Today, because
//filescenter needs these javascript globals, this
//include_jsbackend is a must to the javascript globals be
//included.
if ($GLOBALS['egw_info']['flags']['include_jsbackend'])
{
if (!$GLOBALS['egw_info']['flags']['nojsapi'])
{
$GLOBALS['egw']->js->validate_jsapi();
}
if(@is_object($GLOBALS['egw']->js))
{
$java_script .= $GLOBALS['egw']->js->get_javascript_globals();
}
}
if ($GLOBALS['egw']->acl->check('run',1,'notifications') && !$GLOBALS['egw_info']['user']['preferences']['notifications']['disable_ajaxpopup'])
{
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
}
if ($GLOBALS['egw_info']['flags']['include_xajax'])
{
require_once(EGW_SERVER_ROOT.'/phpgwapi/inc/xajax.inc.php');
$xajax =& new xajax($GLOBALS['egw']->link('/xajax.php'), 'xajax_', $GLOBALS['egw']->translation->charset());
$xajax->waitCursorOff();
$xajax->registerFunction("doXMLHTTP");
$java_script .= $xajax->getJavascript($GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/js/');
}
/* this flag is for all javascript code that has to be put before other jscode.
Think of conf vars etc... (pim@lingewoud.nl) */
if (isset($GLOBALS['egw_info']['flags']['java_script_thirst']))
{
$java_script .= $GLOBALS['egw_info']['flags']['java_script_thirst'] . "\n";
}
if(@is_object($GLOBALS['egw']->js))
{
$java_script .= $GLOBALS['egw']->js->get_script_links();
}
if(@isset($_GET['menuaction']))
{
list($app,$class,$method) = explode('.',$_GET['menuaction']);
if(is_array($GLOBALS[$class]->public_functions) &&
$GLOBALS[$class]->public_functions['java_script'])
{
$java_script .= $GLOBALS[$class]->java_script();
}
}
if (isset($GLOBALS['egw_info']['flags']['java_script']))
{
$java_script .= $GLOBALS['egw_info']['flags']['java_script'] . "\n";
}
return $java_script;
}
/**
* Returns on(Un)Load attributes from js class
*
* @internal PHP5 protected
* @author Dave Hall - skwashd at egroupware.org
* @returns string body attributes
*/
function _get_body_attribs()
{
if(@is_object($GLOBALS['egw']->js))
{
return $GLOBALS['egw']->js->get_body_attribs();
}
else
{
return '';
}
}
}
/**
* Public functions to be compatible with the exiting eGW framework
*/
if (!function_exists('parse_navbar'))
{
/**
* echo's out the navbar
*
* @deprecated use $GLOBALS['egw']->framework::navbar() or $GLOBALS['egw']->framework::render()
*/
function parse_navbar()
{
echo $GLOBALS['egw']->framework->navbar();
}
}
if (!function_exists('display_sidebox'))
{
/**
* echo's out a sidebox menu
*
* @deprecated use $GLOBALS['egw']->framework::sidebox()
*/
function display_sidebox($appname,$menu_title,$file)
{
$GLOBALS['egw']->framework->sidebox($appname,$menu_title,$file);
}
}

View File

@ -1,76 +0,0 @@
<?php
/**************************************************************************\
* eGroupWare API - phpgwapi footer *
* This file written by Dan Kuykendall <seek3r@phpgroupware.org> *
* and Joseph Engo <jengo@phpgroupware.org> *
* Closes out interface and db connections *
* Copyright (C) 2000, 2001 Dan Kuykendall *
* -------------------------------------------------------------------------*
* This library is part of the eGroupWare API *
* http://www.egroupware.org/api *
* ------------------------------------------------------------------------ *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation; either version 2.1 of the License, *
* or any later version. *
* This library is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU Lesser General Public License for more details. *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
\**************************************************************************/
/* $Id$ */
$d1 = strtolower(substr(PHPGW_APP_INC,0,3));
if($d1 == 'htt' || $d1 == 'ftp')
{
echo "Failed attempt to break in via an old Security Hole!<br>\n";
exit;
} unset($d1);
/**************************************************************************\
* Include the apps footer files if it exists *
\**************************************************************************/
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)
(file_exists (PHPGW_APP_INC . '/footer.inc.php') || isset($_GET['menuaction'])) &&
$GLOBALS['egw_info']['flags']['currentapp'] != 'home' &&
$GLOBALS['egw_info']['flags']['currentapp'] != 'login' &&
$GLOBALS['egw_info']['flags']['currentapp'] != 'logout' &&
!@$GLOBALS['egw_info']['flags']['noappfooter'])
{
if ($_GET['menuaction'])
{
list($app,$class,$method) = explode('.',$_GET['menuaction']);
if (is_array($GLOBALS[$class]->public_functions) && isset($GLOBALS[$class]->public_functions['footer']))
{
// eval("\$GLOBALS[$class]->footer();");
$GLOBALS[$class]->footer();
}
elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
{
include(PHPGW_APP_INC . '/footer.inc.php');
}
}
elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
{
include(PHPGW_APP_INC . '/footer.inc.php');
}
}
if ($GLOBALS['egw_info']['flags']['need_footer'])
{
echo $GLOBALS['egw_info']['flags']['need_footer'];
}
if(function_exists('parse_navbar_end'))
{
parse_navbar_end();
}
if (DEBUG_TIMER)
{
$totaltime = sprintf('%4.2lf',perfgetmicrotime() - $GLOBALS['egw_info']['flags']['page_start_time']);
echo lang('Page was generated in %1 seconds',$totaltime);
}

View File

@ -0,0 +1,415 @@
<?php
/**
* eGW idots template
*
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de> rewrite in 12/2006
* @author Pim Snel <pim@lingewoud.nl> author of the idots template set
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package api
* @subpackage framework
* @access public
* @version $Id$
*/
require_once(EGW_API_INC.'/class.egw_framework.inc.php');
require_once(EGW_API_INC.'/class.Template.inc.php');
/**
* eGW idots template
*
* The idots_framework class draws the default idots template. It's a phplib template based template-set.
*
* Other phplib template based template-sets should extend (not copy!) this class and reimplement methods they which to change.
*/
class idots_framework extends egw_framework
{
/**
* HTML of the sidebox menu, get's collected here by calls to $this->sidebox
*
* @var string
*/
var $sidebox_content = '';
/**
* Instance of the phplib Template class for the API's template dir (EGW_TEMPLATE_DIR)
*
* @var Template
*/
var $tpl;
/**
* Constructor
*
* @param string $template='idots' name of the template
* @return idots_framework
*/
function idots_framework($template='idots')
{
$this->egw_framework($template); // call the constructor of the extended class
$this->tpl =& new Template(EGW_TEMPLATE_DIR);
}
/**
* Returns the html-header incl. the opening body tag
*
* @return string with html
*/
function header()
{
// add a content-type header to overwrite an existing default charset in apache (AddDefaultCharset directiv)
header('Content-type: text/html; charset='.$GLOBALS['egw']->translation->charset());
// catch error echo'ed before the header, ob_start'ed in the header.inc.php
$content = ob_get_contents();
ob_end_clean();
$this->tpl->set_file(array('_head' => 'head.tpl'));
$this->tpl->set_block('_head','head');
$this->tpl->set_var($this->_get_header());
$content .= $this->tpl->fp('out','head');
return $content;
}
/**
* Returns the html from the body-tag til the main application area (incl. opening div tag)
*
* @return string with html
*/
function navbar()
{
// the navbar
$this->tpl->set_file(array('navbar' => 'navbar.tpl'));
$this->tpl->set_block('navbar','navbar_header','navbar_header');
$this->tpl->set_block('navbar','extra_blocks_header','extra_block_header');
$this->tpl->set_block('navbar','extra_block_row','extra_block_row');
$this->tpl->set_block('navbar','extra_block_row_raw','extra_block_row_raw');
$this->tpl->set_block('navbar','extra_block_row_no_link','extra_block_row_no_link');
$this->tpl->set_block('navbar','extra_block_spacer','extra_block_spacer');
$this->tpl->set_block('navbar','extra_blocks_footer','extra_blocks_footer');
$this->tpl->set_block('navbar','sidebox_hide_header','sidebox_hide_header');
$this->tpl->set_block('navbar','sidebox_hide_footer','sidebox_hide_footer');
$this->tpl->set_block('navbar','appbox','appbox');
$this->tpl->set_block('navbar','navbar_footer','navbar_footer');
$this->tpl->set_block('navbar','app_icon_block','app_icon_block');
$this->tpl->set_block('navbar','app_title_block','app_title_block');
$this->tpl->set_block('navbar','app_extra_block','app_extra_block');
$this->tpl->set_block('navbar','upper_tab_block','upper_tab_block');
$apps = $this->_get_navbar_apps();
$vars = $this->_get_navbar($apps);
$this->tpl->set_var($vars);
$content = $this->tpl->fp('out','navbar_header');
// general (app-unspecific) sidebox menu
$menu_title = lang('General Menu');
$file['Home'] = $apps['home']['url'];
if($GLOBALS['egw_info']['user']['apps']['preferences'])
{
$file['Preferences'] = $apps['preferences']['url'];
}
$file += array(
array(
'text' => lang('About %1',$GLOBALS['egw_info']['apps'][$GLOBALS['egw_info']['flags']['currentapp']]['title']),
'no_lang' => True,
'link' => $apps['about']['url']
),
$GLOBALS['egw_info']['user']['userid'] != 'anonymous' ? 'Logout' : 'Login' =>$apps['logout']['url']
);
$this->sidebox('',$menu_title,$file);
$GLOBALS['egw']->hooks->single('sidebox_menu',$GLOBALS['egw_info']['flags']['currentapp']);
if($GLOBALS['egw_info']['user']['preferences']['common']['auto_hide_sidebox'])
{
$this->tpl->set_var('lang_show_menu',lang('show menu'));
$content .= $this->tpl->parse('out','sidebox_hide_header');
$content .= $this->sidebox_content; // content from calls to $this->sidebox
$content .= $this->tpl->parse('out','sidebox_hide_footer');
$var['sideboxcolstart']='';
$this->tpl->set_var($var);
$content .= $this->tpl->parse('out','appbox');
$var['remove_padding'] = 'style="padding-left:0px;"';
$var['sideboxcolend'] = '';
}
else
{
$var['menu_link'] = '';
$var['sideboxcolstart'] = '<td id="tdSidebox" valign="top">';
$var['remove_padding'] = '';
$this->tpl->set_var($var);
$content .= $this->tpl->parse('out','appbox');
$content .= $this->sidebox_content;
$var['sideboxcolend'] = '</td>';
}
$this->tpl->set_var($var);
$content .= $this->tpl->parse('out','navbar_footer');
// depricated (!) application header, if not disabled
// ToDo: check if it can be removed
if(!@$GLOBALS['egw_info']['flags']['noappheader'] && @isset($_GET['menuaction']))
{
list($app,$class,$method) = explode('.',$_GET['menuaction']);
if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
{
ob_start();
$GLOBALS[$class]->header();
$content .= ob_get_contents();
ob_end_clean();
}
}
// hook after navbar
// ToDo: change it to return the content!
ob_start();
$GLOBALS['egw']->hooks->process('after_navbar');
$content .= ob_get_contents();
ob_end_clean();
return $content;
}
/**
* Get navbar as array to eg. set as vars for a template (from idots' navbar.inc.php)
*
* Reimplemented so set the vars for the navbar itself (uses $this->tpl and the blocks a and b)
*
* @internal PHP5 protected
* @param array $apps navbar apps from _get_navbar_apps
* @return array
*/
function _get_navbar($apps)
{
$var = parent::_get_navbar($apps);
if($GLOBALS['egw_info']['user']['preferences']['common']['click_or_onmouseover'] == 'onmouseover')
{
$var['show_menu_event'] = 'onMouseOver';
}
else
{
$var['show_menu_event'] = 'onClick';
}
if($GLOBALS['egw_info']['user']['userid'] == 'anonymous')
{
$cnf_reg =& CreateObject('phpgwapi.config','registration');
$cnf_reg->read_repository();
$config_reg = $cnf_reg->config_data;
unset($cnf_reg);
$this->tpl->set_var(array(
'url' => $GLOBALS['egw']->link('/logout.php'),
'title' => lang('Login'),
));
$this->tpl->fp('upper_tabs','upper_tab_block');
if ($config_reg[enable_registration]=='True' && $config_reg[register_link]=='True')
{
$this->tpl->set_var(array(
'url' => $GLOBALS['egw']->link('/registration/index.php'),
'title' => lang('Register'),
));
}
}
if (!($max_icons=$GLOBALS['egw_info']['user']['preferences']['common']['max_icons']))
{
$max_icons = 30;
}
if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons'] == 'no')
{
$tdwidth = 100 / $max_icons;
}
else
{
$tdwidth = 100 / ($max_icons+1); // +1 for logout
}
$this->tpl->set_var('tdwidth',round($tdwidth));
// not shown in the navbar
foreach($apps as $app => $app_data)
{
if ($app != 'preferences' && $app != 'about' && $app != 'logout' &&
($app != 'home' || $GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons'] != 'no'))
{
$this->tpl->set_var($app_data);
if($i < $max_icons)
{
$this->tpl->set_var($app_data);
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format'] != 'text')
{
$this->tpl->fp('app_icons','app_icon_block',true);
}
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format'] != 'icons')
{
$this->tpl->fp('app_titles','app_title_block',true);
}
}
else // generate extra icon layer shows icons and/or text
{
if($i == $max_icons)
{
$var['lang_close'] = lang('Close');
$var['lang_show_more_apps'] = lang('show_more_apps');
$this->tpl->set_block('navbar','app_extra_icons_div','app_extra_icons_div');
$this->tpl->set_block('navbar','app_extra_icons_icon','app_extra_icons_icon');
}
$this->tpl->fp('app_extra_icons','app_extra_block',true);
}
$i++;
}
}
if ($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons'] != 'no' &&
$GLOBALS['egw_info']['user']['userid'] != 'anonymous')
{
$this->tpl->set_var($apps['logout']);
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format'] != 'text')
{
$this->tpl->fp('app_icons','app_icon_block',true);
}
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format'] != 'icons')
{
$this->tpl->fp('app_titles','app_title_block',true);
}
}
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format'] == 'icons')
{
$var['app_titles'] = '<td colspan="'.$max_icons.'">&nbsp;</td>';
}
return $var;
}
/**
* Returns the html from the closing div of the main application area to the closing html-tag
*
* @return string html or null if no footer needed/wanted
*/
function footer()
{
static $footer_done;
if ($footer_done++) return; // prevent multiple footers, not sure we still need this (RalfBecker)
if (!isset($GLOBALS['egw_info']['flags']['nofooter']) || !$GLOBALS['egw_info']['flags']['nofooter'])
{
// get the (depricated) application footer
$content = $this->_get_app_footer();
// run the hook navbar_end
// ToDo: change to return the content
ob_start();
$GLOBALS['egw']->hooks->process('navbar_end');
$content .= ob_get_contents();
ob_end_clean();
// eg. javascript, which need to be at the end of the page
if ($GLOBALS['egw_info']['flags']['need_footer'])
{
$content .= $GLOBALS['egw_info']['flags']['need_footer'];
}
// do the template sets footer, former parse_navbar_end function
// this closes the application area AND renders the closing body- and html-tag
if (!isset($GLOBALS['egw_info']['flags']['nonavbar']) || !$GLOBALS['egw_info']['flags']['nonavbar'])
{
$this->tpl->set_file(array('footer' => 'footer.tpl'));
$this->tpl->set_var($this->_get_footer());
$content .= $this->tpl->fp('out','footer');
}
if (DEBUG_TIMER)
{
$totaltime = sprintf('%4.2lf',perfgetmicrotime() - $GLOBALS['egw_info']['flags']['page_start_time']);
$content .= lang('Page was generated in %1 seconds',$totaltime);
}
return $content;
}
}
/**
* Parses one sidebox menu and add's the html to $this->sidebox_content for later use by $this->navbar
*
* @param string $appname
* @param string $menu_title
* @param array $file
*/
function sidebox($appname,$menu_title,$file)
{
if(!$appname || ($appname==$GLOBALS['egw_info']['flags']['currentapp'] && $file))
{
$this->tpl->set_var('lang_title',$menu_title);
$this->sidebox_content .= $this->tpl->fp('out','extra_blocks_header');
foreach($file as $text => $url)
{
$this->sidebox_content .= $this->_sidebox_menu_item($url,$text);
}
$this->sidebox_content .= $this->tpl->parse('out','extra_blocks_footer');
}
}
/**
* Return a sidebox menu item
*
* @internal PHP5 protected
* @param string $item_link
* @param string $item_text
* @return string
*/
function _sidebox_menu_item($item_link='',$item_text='')
{
if($item_text === '_NewLine_' || $item_link === '_NewLine_')
{
return $this->tpl->parse('out','extra_block_spacer');
}
if (strtolower($item_text) == 'grant access' && $GLOBALS['egw_info']['server']['deny_user_grants_access'])
{
return;
}
$var['icon_or_star']='<img src="'.$GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$this->template.'/images'.'/orange-ball.png" width="9" height="9" alt="ball"/>';
$var['target'] = '';
if(is_array($item_link))
{
if(isset($item_link['icon']))
{
$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['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['item_link'] = $item_link['link'];
if ($item_link['target'])
{
$var['target'] = ' target="' . $item_link['target'] . '"';
}
}
else
{
$var['lang_item'] = lang($item_text);
$var['item_link'] = $item_link;
}
$this->tpl->set_var($var);
$block = 'extra_block_row';
if ($var['item_link'] === False)
{
$block .= $var['icon_or_star'] === False ? '_raw' : '_no_link';
}
return $this->tpl->parse('out',$block);
}
}

View File

@ -277,7 +277,6 @@ body {
#divAppIconBar #divAppIconBar
{ {
/*margin-top: 15px;*/
background-color:silver; background-color:silver;
border:solid 1px #9c9c9c; border:solid 1px #9c9c9c;
background-image: url(../images/background-icon-bar.png); background-image: url(../images/background-icon-bar.png);
@ -293,9 +292,9 @@ body {
#divStatusBar #divStatusBar
{ {
background-color:white; background-color:white;
height:15px; height:18px;
padding-left:10px; padding-left:3px;
margin-top: 13px; margin-top: 10px;
} }
#tdSidebox #tdSidebox
@ -377,12 +376,6 @@ body {
border-bottom: #cccccc 1px solid border-bottom: #cccccc 1px solid
} }
#admin_info
{
position:relative;
text-align:right;
}
#divGenTime,#divPoweredBy #divGenTime,#divPoweredBy
{ {

View File

@ -1,98 +0,0 @@
<?php
/**************************************************************************\
* eGroupWare *
* http://www.egroupware.org *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
// get used language code
$lang_code = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];
$bodyheader = ' bgcolor="' . $GLOBALS['egw_info']['theme']['bg_color'] . '" alink="'
. $GLOBALS['egw_info']['theme']['alink'] . '" link="' . $GLOBALS['egw_info']['theme']['link'] . '" vlink="'
. $GLOBALS['egw_info']['theme']['vlink'] . '"';
if(!$GLOBALS['egw_info']['server']['htmlcompliant'])
{
$bodyheader .= '';
}
#_debug_array($GLOBALS['egw_info']['user']['preferences']['common']);
$theme_css = '/phpgwapi/templates/idots/css/'.$GLOBALS['egw_info']['user']['preferences']['common']['theme'].'.css';
if(!file_exists(EGW_SERVER_ROOT.$theme_css))
{
$theme_css = '/phpgwapi/templates/idots/css/idots.css';
}
$theme_css = $GLOBALS['egw_info']['server']['webserver_url'] . $theme_css;
$print_css = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/print.css';
//pngfix defaults to yes
if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_pngfix'])
{
$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 -->
<!--[if gte IE 5.5000]>
<script src="'.$pngfix_src.'" type="text/javascript">
</script>
<![endif]-->';
}
if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_slider_effects'])
{
$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">
</script>';
}
else
{
$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">
</script>';
}
$tpl = CreateObject('phpgwapi.Template',EGW_TEMPLATE_DIR);
$tpl->set_unknowns('remove');
$tpl->set_file(array('_head' => 'head.tpl'));
$tpl->set_block('_head','head');
if ($GLOBALS['egw_info']['flags']['app_header'])
{
$app = $GLOBALS['egw_info']['flags']['app_header'];
}
else
{
$app = $GLOBALS['egw_info']['flags']['currentapp'];
$app = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : lang($app);
}
if($app!='wiki') $robots ='<meta name="robots" content="none" />';
$var = Array(
'img_icon' => EGW_IMAGES_DIR . '/favicon.ico',
'img_shortcut' => EGW_IMAGES_DIR . '/favicon.ico',
'pngfix' => $pngfix,
'slider_effects' => $slider_effects,
'simple_show_hide' => $simple_show_hide,
'lang_code' => $lang_code,
'charset' => $GLOBALS['egw']->translation->charset(),
'font_family' => $GLOBALS['egw_info']['theme']['font'],
'website_title' => strip_tags($GLOBALS['egw_info']['server']['site_title']. ($app ? " [$app]" : '')),
'body_tags' => $bodyheader .' '. $GLOBALS['egw']->common->get_body_attribs(),
'theme_css' => $theme_css,
'print_css' => $print_css,
'css' => $GLOBALS['egw']->common->get_css(),
'java_script' => $GLOBALS['egw']->common->get_java_script(),
'meta_robots' => $robots,
'dir_code' => lang('language_direction_rtl') != 'rtl' ? '' : ' dir="rtl"',
);
$tpl->set_var($var);
$tpl->pfp('out','head');
unset($tpl);
?>

View File

@ -1,6 +1,5 @@
<!-- BEGIN head --><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- BEGIN head --><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="{lang_code}" xmlns="http://www.w3.org/1999/xhtml"{dir_code}> <html xml:lang="{lang_code}" xmlns="http://www.w3.org/1999/xhtml"{dir_code}>
<head> <head>
<title>{website_title}</title> <title>{website_title}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}" /> <meta http-equiv="content-type" content="text/html; charset={charset}" />

View File

@ -1,422 +0,0 @@
<?php
/**************************************************************************\
* eGroupWare *
* http://www.egroupware.org *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
function parse_navbar($force = False)
{
$GLOBALS['idots_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
$GLOBALS['idots_tpl']->set_file(
array(
'navbar' => 'navbar.tpl'
)
);
$GLOBALS['idots_tpl']->set_block('navbar','navbar_header','navbar_header');
$GLOBALS['idots_tpl']->set_block('navbar','extra_blocks_header','extra_block_header');
$GLOBALS['idots_tpl']->set_block('navbar','extra_block_row','extra_block_row');
$GLOBALS['idots_tpl']->set_block('navbar','extra_block_row_raw','extra_block_row_raw');
$GLOBALS['idots_tpl']->set_block('navbar','extra_block_row_no_link','extra_block_row_no_link');
$GLOBALS['idots_tpl']->set_block('navbar','extra_block_spacer','extra_block_spacer');
$GLOBALS['idots_tpl']->set_block('navbar','extra_blocks_footer','extra_blocks_footer');
$GLOBALS['idots_tpl']->set_block('navbar','sidebox_hide_header','sidebox_hide_header');
$GLOBALS['idots_tpl']->set_block('navbar','sidebox_hide_footer','sidebox_hide_footer');
$GLOBALS['idots_tpl']->set_block('navbar','appbox','appbox');
$GLOBALS['idots_tpl']->set_block('navbar','navbar_footer','navbar_footer');
$var['img_root'] = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images';
$var['table_bg_color'] = $GLOBALS['egw_info']['theme']['navbar_bg'];
if($GLOBALS['egw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover')
{
$show_menu_event = 'onMouseOver';
}
else
{
$show_menu_event = 'onClick';
}
if($GLOBALS['egw_info']['user']['userid'] == 'anonymous')
{
$cnf_reg =& CreateObject('phpgwapi.config','registration');
$cnf_reg->read_repository();
$config_reg = $cnf_reg->config_data;
$GLOBALS['idots_tpl']->set_var('upper_tabs','
<ul>
<li><a href="'.$GLOBALS['egw']->link('/logout.php').'">'.lang('Login').'</a></li>'.
( ($config_reg[enable_registration]=='True' && $config_reg[register_link]=='True') ? '<li><a href="'.$GLOBALS['egw']->link('/registration/index.php').'">'.lang('Register').'</a></li>' : '').'
</ul>
');
}
$applications = '';
// == 'icons_and_text')
$max_icons=$GLOBALS['egw_info']['user']['preferences']['common']['max_icons'];
if(!$max_icons)
{
$max_icons=200;
}
foreach($GLOBALS['egw_info']['navbar'] as $app => $app_data)
{
if($app != 'preferences' && $app != 'about' && $app != 'logout')
{
$title = $GLOBALS['egw_info']['apps'][$app]['title'];
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title . '" border="0" />';
if($app=='home')
{
$title = lang('home');
$icon = '<img src="' . $app_data['icon'] . '" alt="' . lang('home') . '" title="' . lang('home') . '" border="0" />';
}
if($i<$max_icons)
{
if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons']=='no')
{
$tdwidth = 100/($max_icons);
}
else
{
$tdwidth = 100/($max_icons+2);
}
$tdwidth=round($tdwidth);
$app_icons .= '<td width="'.$tdwidth.'%" align="center" style="text-align:center"><a href="' . $app_data['url'] . '"';
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
{
$app_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
}
$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'] . '"';
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
{
$app_titles .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
}
$app_titles .= $app_data['target'].'>' . $title . '</a></td>';
}
// else // generate extra icon layer | always shows icons and text
else // generate extra icon layer shows icons and/or text
{
// check for small icon version else use default and let the browser resize
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title . '" width="16" title="'. $title . '" border="0" />';
$app_extra_icons .= '<tr>';
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format']!='text')
{
$app_extra_icons .= '<td class="extraIconsRow"><a href="' . $app_data['url'] . '"';
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
{
$app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
}
$app_extra_icons .= $app_data['target'].' >' . $icon . '</a></td>';
}
// $app_extra_icons .= '<tr><td><a href="' . $app_data['url'] . '"';
// if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
// {
// $app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
// }
// $app_extra_icons .= '>' . $icon . '</a></td>';
$app_extra_icons .= '<td align="left" class="extraIconsRow" style=""><a href="'.$app_data['url'] . '"';
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
{
$app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
}
$app_extra_icons .= $app_data['target'].'>' . $title . '</a></td></tr>';
}
unset($icon);
unset($title);
$i++;
}
}
if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons']!='no' && $GLOBALS['egw_info']['user']['userid'] != 'anonymous')
{
$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['egw_info']['navbar']['logout']['url'].'">'.$GLOBALS['egw_info']['navbar']['logout']['title'].'</a></td>';
}
// $var['app_icons'] = $app_icons;
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format']!='text')
{
$var['app_icons'] = $app_icons;
}
if($i > $max_icons)
{
// table width=100% fixed layout bug (ndee130204)
$app_extra_icons_div = '
<script language="javascript">
new ypSlideOutMenu("menu1", "down", 10, 114, 160, 200,\'right\')
</script>
<div id="menu1Container">
<div id="menu1Content" style="position: relative; left: 0; text-align: left;">
<div id="extraIcons">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr><td colspan="2" nowrap="nowrap" align="right" style="background-color:#dddddd;padding:1px;">
<a href="#" '.$show_menu_event.'="ypSlideOutMenu.hide(\'menu1\')" title="'.lang('close').'">
<img style="" border="0" src="'.$var['img_root'].'/close.png"/></a></td></tr>
'.$app_extra_icons.'</table>
</div>
</div>
</div>
';
$var['app_extra_icons_div']= $app_extra_icons_div;
// $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="javascript:void(0);" onClick="HideShow(\'extraIcons\');"><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:20px;"><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['egw_info']['user']['preferences']['common']['navbar_format']!='icons')
{
$var['app_titles'] = $app_titles;
}
else
{
$var['app_titles'] = '<td colspan="'.$max_icons.'">&nbsp;</td>';
}
if(isset($GLOBALS['egw_info']['flags']['app_header']))
{
$var['current_app_title'] = $GLOBALS['egw_info']['flags']['app_header'];
}
else
{
$var['current_app_title']=$GLOBALS['egw_info']['navbar'][$GLOBALS['egw_info']['flags']['currentapp']]['title'];
}
if(isset($GLOBALS['egw_info']['navbar']['admin']) && $GLOBALS['egw_info']['user']['preferences']['common']['show_currentusers'])
{
$var['current_users'] = '<a href="'
. $GLOBALS['egw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">'
. lang('Current users') . ': ' . $GLOBALS['egw']->session->total() . '</a>';
}
$now = time();
$var['user_info'] = '<b>'.$GLOBALS['egw']->common->display_fullname() .'</b>'. ' - '
. lang($GLOBALS['egw']->common->show_date($now,'l')) . ' '
. $GLOBALS['egw']->common->show_date($now,$GLOBALS['egw_info']['user']['preferences']['common']['dateformat']);
if($GLOBALS['egw_info']['user']['lastpasswd_change'] == 0)
{
$api_messages = lang('You are required to change your password during your first login')
. '<br> Click this image on the navbar: <img src="'
. $GLOBALS['egw']->common->image('preferences','navbar.gif').'">';
}
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);
}
// This is gonna change
if(isset($cd))
{
$var['messages'] = $api_messages . '<br>' . checkcode($cd);
}
if (substr($GLOBALS['egw_info']['server']['login_logo_file'],0,4) == 'http')
{
$var['logo_file'] = $GLOBALS['egw_info']['server']['login_logo_file'];
}
else
{
$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['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')
{
$var['logo_url'] = 'http://'.$var['logo_url'];
}
$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']->pfp('out','navbar_header');
/******************************************************\
* The sidebox menu's *
\******************************************************/
$menu_title = lang('General Menu');
$file['Home'] = $GLOBALS['egw_info']['navbar']['home']['url'];
if($GLOBALS['egw_info']['user']['apps']['preferences'])
{
$file['Preferences'] = $GLOBALS['egw_info']['navbar']['preferences']['url'];
}
$file += array(
array(
'text' => lang('About %1',$GLOBALS['egw_info']['apps'][$GLOBALS['egw_info']['flags']['currentapp']]['title']),
'no_lang' => True,
'link' => $GLOBALS['egw_info']['navbar']['about']['url']
),
$GLOBALS['egw_info']['user']['userid'] != 'anonymous' ? 'Logout' : 'Login' =>$GLOBALS['egw_info']['navbar']['logout']['url']
);
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('lang_show_menu',lang('show menu'));
$GLOBALS['idots_tpl']->pparse('out','sidebox_hide_header');
display_sidebox('',$menu_title,$file);
$GLOBALS['egw']->hooks->single('sidebox_menu',$GLOBALS['egw_info']['flags']['currentapp']);
$GLOBALS['idots_tpl']->pparse('out','sidebox_hide_footer');
$var['sideboxcolstart']='';
$GLOBALS['idots_tpl']->set_var($var);
$GLOBALS['idots_tpl']->pparse('out','appbox');
$var['remove_padding'] = 'style="padding-left:0px;"';
$var['sideboxcolend'] = '';
}
else
{
$var['menu_link'] = '';
$var['sideboxcolstart'] = '<td id="tdSidebox" valign="top">';
$var['remove_padding'] = '';
$GLOBALS['idots_tpl']->set_var($var);
$GLOBALS['idots_tpl']->pparse('out','appbox');
display_sidebox('',$menu_title,$file);
$GLOBALS['egw']->hooks->single('sidebox_menu',$GLOBALS['egw_info']['flags']['currentapp']);
$var['sideboxcolend'] = '</td>';
}
$GLOBALS['idots_tpl']->set_var($var);
$GLOBALS['idots_tpl']->pparse('out','navbar_footer');
// If the application has a header include, we now include it
if(!@$GLOBALS['egw_info']['flags']['noappheader'] && @isset($_GET['menuaction']))
{
list($app,$class,$method) = explode('.',$_GET['menuaction']);
if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
{
$GLOBALS[$class]->header();
}
}
$GLOBALS['egw']->hooks->process('after_navbar');
return;
}
function display_sidebox($appname,$menu_title,$file)
{
if(!$appname || ($appname==$GLOBALS['egw_info']['flags']['currentapp'] && $file))
{
$var['lang_title']=$menu_title;//$appname.' '.lang('Menu');
$GLOBALS['idots_tpl']->set_var($var);
$GLOBALS['idots_tpl']->pfp('out','extra_blocks_header');
foreach($file as $text => $url)
{
sidebox_menu_item($url,$text);
}
$GLOBALS['idots_tpl']->pparse('out','extra_blocks_footer');
}
}
function sidebox_menu_item($item_link='',$item_text='')
{
if($item_text === '_NewLine_' || $item_link === '_NewLine_')
{
$GLOBALS['idots_tpl']->pparse('out','extra_block_spacer');
}
else
{
if (strtolower($item_text) == 'grant access' && $GLOBALS['egw_info']['server']['deny_user_grants_access']) {
return;
}
$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'] = '';
if(is_array($item_link))
{
if(isset($item_link['icon']))
{
$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['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['item_link'] = $item_link['link'];
if ($item_link['target'])
{
$var['target'] = ' target="' . $item_link['target'] . '"';
}
}
else
{
$var['lang_item'] = lang($item_text);
$var['item_link'] = $item_link;
}
$GLOBALS['idots_tpl']->set_var($var);
$block = 'extra_block_row';
if ($var['item_link'] === False)
{
$block .= $var['icon_or_star'] === False ? '_raw' : '_no_link';
}
$GLOBALS['idots_tpl']->pparse('out',$block);
}
}
function parse_navbar_end()
{
$GLOBALS['idots_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
$GLOBALS['idots_tpl']->set_file(
array(
'footer' => 'footer.tpl'
)
);
$var = Array(
'img_root' => $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images',
'table_bg_color' => $GLOBALS['egw_info']['theme']['navbar_bg'],
'version' => $GLOBALS['egw_info']['server']['versions']['phpgwapi']
);
$GLOBALS['egw']->hooks->process('navbar_end');
if($GLOBALS['egw_info']['user']['preferences']['common']['show_generation_time'])
{
$totaltime = sprintf('%4.2lf',perfgetmicrotime() - $GLOBALS['egw_info']['flags']['page_start_time']);
$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['egw_info']['server']['versions']['phpgwapi']);
$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']->pfp('out','footer');
}

View File

@ -3,10 +3,11 @@
{app_extra_icons_div} {app_extra_icons_div}
<div id="divMain"> <div id="divMain">
<div id="divUpperTabs"> <div id="divUpperTabs">
{upper_tabs} <ul>
{upper_tabs}
</ul>
</div> </div>
<div id="divAppIconBar"> <div id="divAppIconBar">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 7px"> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 7px">
@ -15,80 +16,87 @@
<td valign="bottom"> <td valign="bottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
{app_icons} {app_icons}
</tr> </tr>
<tr> <tr>
{app_titles} {app_titles}
</tr> </tr>
</table> </table>
</td> </td>
{app_extra_icons_icon}
{app_extra_icons_icon}
</tr> </tr>
</table> </table>
</div> </div>
<div id="divStatusBar"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td align="left" id="user_info">{user_info}</td><td align="right" id="admin_info">{current_users}</td></tr></table></div> <div id="divStatusBar"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr>
<td width="33%" align="left" id="user_info">{user_info}</td>
<td align="center" id="admin_info">{current_users}</td>
<td width="33%" align="right" id="quick_add">{quick_add}</td>
</tr></table></div>
<!-- END navbar_header --> <!-- END navbar_header -->
<!-- BEGIN upper_tab_block -->
<li><a href="{url}">{title}</a></li>
<!-- END upper_tab_block -->
<!-- BEGIN app_icon_block -->
<td width="{tdwidth}%" align="center" style="text-align:center"><a href="{url}" {target}><img src="{icon}" alt="{title}" title="{title}" border="0" /></a></td>
<!-- END app_icon_block -->
<!-- BEGIN app_title_block -->
<td align="center" valign="top" class="appTitles" style="text-align:center"><a href="{url}" {target}>{title}</a></td>
<!-- END app_title_block -->
<!-- BEGIN appbox --> <!-- BEGIN appbox -->
<div id="divSubContainer"> <div id="divSubContainer">
<table width="100%" cellspacing="0" cellpadding="0"> <table width="100%" cellspacing="0" cellpadding="0">
<tr> <tr>
<!-- Sidebox Column --> <!-- Sidebox Column -->
{sideboxcolstart} {sideboxcolstart}
<!-- <td id="{tdsiteboxid}" valign="top">-->
<!-- END appbox --> <!-- END appbox -->
<!-- BEGIN sidebox_hide_header --> <!-- BEGIN sidebox_hide_header -->
<!--<script language="javascript" src="SlideOut.js"></script>-->
<script language="javascript"> <script language="javascript">
new ypSlideOutMenu("menu2", "right", 0, 165, 160, 200) new ypSlideOutMenu("menu2", "right", 0, 165, 160, 200)
</script> </script>
<div id="sideboxdragarea" style="position:absolute;left:0px;top:175px"> <div id="sideboxdragarea" style="position:absolute;left:0px;top:175px">
<a href="#" {show_menu_event}="ypSlideOutMenu.showMenu('menu2')" onmouseover="//ypSlideOutMenu.showMenu('menu2')" title="{lang_show_menu}"><img src="{img_root}/dragarea_right.png" /></a> <a href="#" {show_menu_event}="ypSlideOutMenu.showMenu('menu2')" title="{lang_show_menu}"><img src="{img_root}/dragarea_right.png" /></a>
</div> </div>
<div id="menu2Container"> <div id="menu2Container">
<div id="menu2Content" style="position: relative; left: 0; text-align: left;"> <div id="menu2Content" style="position: relative; left: 0; text-align: left;">
<table cellspacing="0" cellpadding="0"> <table cellspacing="0" cellpadding="0">
<tr><td> <tr><td>
<div style="background-color:#ffffff;border: #9c9c9c 1px solid;padding:5px;">
<div style="background-color:#ffffff;border: #9c9c9c 1px solid;padding:5px;">
<!-- END sidebox_hide_header --> <!-- END sidebox_hide_header -->
<!-- BEGIN sidebox_hide_footer --> <!-- BEGIN sidebox_hide_footer -->
</div> </div>
</td><td style="padding-top:10px" valign="top"> </td><td style="padding-top:10px" valign="top">
<a href="#" onClick="ypSlideOutMenu.hide('menu2')" ><img src="{img_root}/dragarea_left.png" align="right" /></a> <a href="#" onclick="ypSlideOutMenu.hide('menu2')" ><img src="{img_root}/dragarea_left.png" align="right" /></a>
</td></tr></table> </td>
</div> </tr></table>
</div> </div>
</div>
<!-- END sidebox_hide_footer --> <!-- END sidebox_hide_footer -->
<!-- BEGIN navbar_footer --> <!-- BEGIN navbar_footer -->
{sideboxcolend} {sideboxcolend}
<!-- End Sidebox Column --> <!-- End Sidebox Column -->
<!-- Applicationbox Column --> <!-- Applicationbox Column -->
<td id="tdAppbox" valign="top" {remove_padding}> <td id="tdAppbox" valign="top" {remove_padding}>
<div id="divAppboxHeader">{current_app_title}</div> <div id="divAppboxHeader">{current_app_title}</div>
<div id="divAppbox"> <div id="divAppbox">
<table width="100%" cellpadding="0" cellspacing="0"> <table width="100%" cellpadding="0" cellspacing="0">
<tr><td> <tr><td>
<!-- END navbar_footer --> <!-- END navbar_footer -->
@ -101,35 +109,73 @@
<!-- BEGIN extra_blocks_footer --> <!-- BEGIN extra_blocks_footer -->
</table> </table>
</div> </div>
</div> </div>
<div class="sideboxSpace"></div> <div class="sideboxSpace"></div>
<!-- END extra_blocks_footer --> <!-- END extra_blocks_footer -->
<!-- BEGIN extra_block_row --> <!-- BEGIN extra_block_row -->
<tr class="divSideboxEntry"> <tr class="divSideboxEntry">
<td width="20" align="center" valign="middle" class="textSidebox">{icon_or_star}</td><td class="textSidebox"><a class="textSidebox" href="{item_link}"{target}>{lang_item}</a></td> <td width="20" align="center" valign="middle" class="textSidebox">{icon_or_star}</td><td class="textSidebox"><a class="textSidebox" href="{item_link}"{target}>{lang_item}</a></td>
</tr> </tr>
<!-- END extra_block_row --> <!-- END extra_block_row -->
<!-- BEGIN extra_block_row_raw --> <!-- BEGIN extra_block_row_raw -->
<tr class="divSideboxEntry"> <tr class="divSideboxEntry">
<td colspan="2" class="textSidebox">{lang_item}</td> <td colspan="2" class="textSidebox">{lang_item}</td>
</tr> </tr>
<!-- END extra_block_row_raw --> <!-- END extra_block_row_raw -->
<!-- BEGIN extra_block_row_no_link --> <!-- BEGIN extra_block_row_no_link -->
<tr class="divSideboxEntry"> <tr class="divSideboxEntry">
<td width="20" align="center" valign="middle" class="textSidebox">{icon_or_star}</td><td class="textSidebox">{lang_item}</td> <td width="20" align="center" valign="middle" class="textSidebox">{icon_or_star}</td><td class="textSidebox">{lang_item}</td>
</tr> </tr>
<!-- END extra_block_row_no_link --> <!-- END extra_block_row_no_link -->
<!-- BEGIN extra_block_spacer --> <!-- BEGIN extra_block_spacer -->
<tr class="divSideboxEntry"> <tr class="divSideboxEntry">
<td colspan="2" height="8" class="textSidebox">&nbsp;</td> <td colspan="2" height="8" class="textSidebox">&nbsp;</td>
</tr> </tr>
<!-- END extra_block_spacer --> <!-- END extra_block_spacer -->
<!-- BEGIN app_extra_icons_div -->
<script language="javascript">
new ypSlideOutMenu("menu1", "down", 10, 114, 160, 200,'right');
</script>
<div id="menu1Container">
<div id="menu1Content" style="position: relative; left: 0; text-align: left;">
<div id="extraIcons">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td colspan="2" nowrap="nowrap" align="right" style="background-color:#dddddd; padding:1px;">
<a href="#" {show_menu_event}="ypSlideOutMenu.hide('menu1')" title="{lang_close}"><img style="" border="0" src="{img_root}/close.png"/></a>
</td>
</tr>
{app_extra_icons}
</table>
</div>
</div>
</div>
<!-- END app_extra_icons_div -->
<!-- BEGIN app_extra_block -->
<tr>
<td class="extraIconsRow"><a href="{url}" {target}><img src="{icon}" alt="{title}" title="{title}" width="16" border="0" /></a></td>
<td align="left" class="extraIconsRow"><a href="{url}" {target}>{title}</a></td>
</tr>
<!-- END app_extra_block -->
<!-- BEGIN app_extra_icons_icon -->
<td width="26" valign="top" align="right" style="padding-right:3px; padding-top:20px;">
<a title="{lang_show_more_apps}" href="#" {show_menu_event}="ypSlideOutMenu.showMenu('menu1')"><img src="{img_root}/extra_icons.png" border="0" /></a>
</td>
<!-- END app_extra_icons_icon -->

View File

@ -0,0 +1,32 @@
<?php
/**
* eGW jerryr template
*
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de> rewrite in 12/2006
* @author Pim Snel <pim@lingewoud.nl> author of the idots template set
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package api
* @subpackage framework
* @access public
* @version $Id$
*/
require_once(EGW_SERVER_ROOT.'/phpgwapi/templates/idots/class.idots_framework.inc.php');
/**
* eGW jerryr template
*/
class jerryr_framework extends idots_framework
{
/**
* Constructor, calls the contstructor of the extended class
*
* @param string $template='jerryr'
* @return jerryr_framework
*/
function jerryr_framework($template='jerryr')
{
$this->idots_framework($template);
}
}

View File

@ -1,98 +0,0 @@
<?php
/**************************************************************************\
* eGroupWare *
* http://www.egroupware.org *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
// get used language code
$lang_code = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];
$bodyheader = ' bgcolor="' . $GLOBALS['egw_info']['theme']['bg_color'] . '" alink="'
. $GLOBALS['egw_info']['theme']['alink'] . '" link="' . $GLOBALS['egw_info']['theme']['link'] . '" vlink="'
. $GLOBALS['egw_info']['theme']['vlink'] . '"';
if(!$GLOBALS['egw_info']['server']['htmlcompliant'])
{
$bodyheader .= '';
}
#_debug_array($GLOBALS['egw_info']['user']['preferences']['common']);
$theme_css = '/phpgwapi/templates/jerryr/css/'.$GLOBALS['egw_info']['user']['preferences']['common']['theme'].'.css';
if(!file_exists(EGW_SERVER_ROOT.$theme_css))
{
$theme_css = '/phpgwapi/templates/jerryr/css/jerryr.css';
}
$theme_css = $GLOBALS['egw_info']['server']['webserver_url'] . $theme_css;
$print_css = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/print.css';
//pngfix defaults to yes
if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_pngfix'])
{
$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 -->
<!--[if gte IE 5.5000]>
<script src="'.$pngfix_src.'" type="text/javascript">
</script>
<![endif]-->';
}
if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_slider_effects'])
{
$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">
</script>';
}
else
{
$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">
</script>';
}
$tpl = CreateObject('phpgwapi.Template',EGW_TEMPLATE_DIR);
$tpl->set_unknowns('remove');
$tpl->set_file(array('_head' => 'head.tpl'));
$tpl->set_block('_head','head');
if ($GLOBALS['egw_info']['flags']['app_header'])
{
$app = $GLOBALS['egw_info']['flags']['app_header'];
}
else
{
$app = $GLOBALS['egw_info']['flags']['currentapp'];
$app = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : lang($app);
}
if($app!='wiki') $robots ='<meta name="robots" content="none" />';
$var = Array(
'img_icon' => EGW_IMAGES_DIR . '/favicon.ico',
'img_shortcut' => EGW_IMAGES_DIR . '/favicon.ico',
'pngfix' => $pngfix,
'slider_effects' => $slider_effects,
'simple_show_hide' => $simple_show_hide,
'lang_code' => $lang_code,
'charset' => $GLOBALS['egw']->translation->charset(),
'font_family' => $GLOBALS['egw_info']['theme']['font'],
'website_title' => strip_tags($GLOBALS['egw_info']['server']['site_title']. ($app ? " [$app]" : '')),
'body_tags' => $bodyheader .' '. $GLOBALS['egw']->common->get_body_attribs(),
'theme_css' => $theme_css,
'print_css' => $print_css,
'css' => $GLOBALS['egw']->common->get_css(),
'java_script' => $GLOBALS['egw']->common->get_java_script(),
'meta_robots' => $robots,
'dir_code' => lang('language_direction_rtl') != 'rtl' ? '' : ' dir="rtl"',
);
$tpl->set_var($var);
$tpl->pfp('out','head');
unset($tpl);
?>

View File

@ -1,422 +0,0 @@
<?php
/**************************************************************************\
* eGroupWare *
* http://www.egroupware.org *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
function parse_navbar($force = False)
{
$GLOBALS['jerryr_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
$GLOBALS['jerryr_tpl']->set_file(
array(
'navbar' => 'navbar.tpl'
)
);
$GLOBALS['jerryr_tpl']->set_block('navbar','navbar_header','navbar_header');
$GLOBALS['jerryr_tpl']->set_block('navbar','extra_blocks_header','extra_block_header');
$GLOBALS['jerryr_tpl']->set_block('navbar','extra_block_row','extra_block_row');
$GLOBALS['jerryr_tpl']->set_block('navbar','extra_block_row_raw','extra_block_row_raw');
$GLOBALS['jerryr_tpl']->set_block('navbar','extra_block_row_no_link','extra_block_row_no_link');
$GLOBALS['jerryr_tpl']->set_block('navbar','extra_block_spacer','extra_block_spacer');
$GLOBALS['jerryr_tpl']->set_block('navbar','extra_blocks_footer','extra_blocks_footer');
$GLOBALS['jerryr_tpl']->set_block('navbar','sidebox_hide_header','sidebox_hide_header');
$GLOBALS['jerryr_tpl']->set_block('navbar','sidebox_hide_footer','sidebox_hide_footer');
$GLOBALS['jerryr_tpl']->set_block('navbar','appbox','appbox');
$GLOBALS['jerryr_tpl']->set_block('navbar','navbar_footer','navbar_footer');
$var['img_root'] = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/images';
$var['table_bg_color'] = $GLOBALS['egw_info']['theme']['navbar_bg'];
if($GLOBALS['egw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover')
{
$show_menu_event = 'onMouseOver';
}
else
{
$show_menu_event = 'onClick';
}
if($GLOBALS['egw_info']['user']['userid'] == 'anonymous')
{
$cnf_reg =& CreateObject('phpgwapi.config','registration');
$cnf_reg->read_repository();
$config_reg = $cnf_reg->config_data;
$GLOBALS['jerryr_tpl']->set_var('upper_tabs','
<ul>
<li><a href="'.$GLOBALS['egw']->link('/logout.php').'">'.lang('Login').'</a></li>'.
( ($config_reg[enable_registration]=='True' && $config_reg[register_link]=='True') ? '<li><a href="'.$GLOBALS['egw']->link('/registration/index.php').'">'.lang('Register').'</a></li>' : '').'
</ul>
');
}
$applications = '';
// == 'icons_and_text')
$max_icons=$GLOBALS['egw_info']['user']['preferences']['common']['max_icons'];
if(!$max_icons)
{
$max_icons=200;
}
foreach($GLOBALS['egw_info']['navbar'] as $app => $app_data)
{
if($app != 'preferences' && $app != 'about' && $app != 'logout')
{
$title = $GLOBALS['egw_info']['apps'][$app]['title'];
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title . '" border="0" />';
if($app=='home')
{
$title = lang('home');
$icon = '<img src="' . $app_data['icon'] . '" alt="' . lang('home') . '" title="' . lang('home') . '" border="0" />';
}
if($i<$max_icons)
{
if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons']=='no')
{
$tdwidth = 100/($max_icons);
}
else
{
$tdwidth = 100/($max_icons+2);
}
$tdwidth=round($tdwidth);
$app_icons .= '<td width="'.$tdwidth.'%" align="center" class="iconBack" onmouseover="this.className=\'iconBackHover\'" onmouseout="this.className=\'iconBack\'" ><a href="' . $app_data['url'] . '"';
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
{
$app_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
}
$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'] . '"';
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
{
$app_titles .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
}
$app_titles .= $app_data['target'].'>' . $title . '</a></td>';
}
// else // generate extra icon layer | always shows icons and text
else // generate extra icon layer shows icons and/or text
{
// check for small icon version else use default and let the browser resize
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title . '" width="16" title="'. $title . '" border="0" />';
$app_extra_icons .= '<tr>';
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format']!='text')
{
$app_extra_icons .= '<td class="extraIconsRow"><a href="' . $app_data['url'] . '"';
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
{
$app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
}
$app_extra_icons .= $app_data['target'].' >' . $icon . '</a></td>';
}
// $app_extra_icons .= '<tr><td><a href="' . $app_data['url'] . '"';
// if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
// {
// $app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
// }
// $app_extra_icons .= '>' . $icon . '</a></td>';
$app_extra_icons .= '<td align="left" class="extraIconsRow" style=""><a href="'.$app_data['url'] . '"';
if(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
{
$app_extra_icons .= ' target="' . $GLOBALS['egw_info']['flags']['navbar_target'] . '"';
}
$app_extra_icons .= $app_data['target'].'>' . $title . '</a></td></tr>';
}
unset($icon);
unset($title);
$i++;
}
}
if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons']!='no' && $GLOBALS['egw_info']['user']['userid'] != 'anonymous')
{
$app_icons .= '<td width="'.$tdwidth.'%" height="36" 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['egw_info']['navbar']['logout']['url'].'">'.$GLOBALS['egw_info']['navbar']['logout']['title'].'</a></td>';
}
// $var['app_icons'] = $app_icons;
if($GLOBALS['egw_info']['user']['preferences']['common']['navbar_format']!='text')
{
$var['app_icons'] = $app_icons;
}
if($i > $max_icons)
{
// table width=100% fixed layout bug (ndee130204)
$app_extra_icons_div = '
<script language="javascript">
new ypSlideOutMenu("menu1", "left",19, 109, 160, 300,\'right\')
</script>
<div id="menu1Container">
<div id="menu1Content" style="position: relative; left: 0; text-align: left;">
<div id="extraIcons">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr><td colspan="2" nowrap="nowrap" align="right" style="background-color:#dddddd;padding:1px;">
<a href="#" '.$show_menu_event.'="ypSlideOutMenu.hide(\'menu1\')" title="'.lang('close').'">
<img style="" border="0" src="'.$var['img_root'].'/close.png"/></a></td></tr>
'.$app_extra_icons.'</table>
</div>
</div>
</div>
';
$var['app_extra_icons_div']= $app_extra_icons_div;
// $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="javascript:void(0);" onClick="HideShow(\'extraIcons\');"><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:20px;"><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['egw_info']['user']['preferences']['common']['navbar_format']!='icons')
{
$var['app_titles'] = $app_titles;
}
else
{
$var['app_titles'] = '<td colspan="'.$max_icons.'">&nbsp;</td>';
}
if(isset($GLOBALS['egw_info']['flags']['app_header']))
{
$var['current_app_title'] = $GLOBALS['egw_info']['flags']['app_header'];
}
else
{
$var['current_app_title']=$GLOBALS['egw_info']['navbar'][$GLOBALS['egw_info']['flags']['currentapp']]['title'];
}
if(isset($GLOBALS['egw_info']['navbar']['admin']) && $GLOBALS['egw_info']['user']['preferences']['common']['show_currentusers'])
{
$var['current_users'] = '<a href="'
. $GLOBALS['egw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">'
. lang('Current users') . ': ' . $GLOBALS['egw']->session->total() . '</a>';
}
$now = time();
$var['user_info'] = '<b>'.$GLOBALS['egw']->common->display_fullname() .'</b>'. ' - '
. lang($GLOBALS['egw']->common->show_date($now,'l')) . ' '
. $GLOBALS['egw']->common->show_date($now,$GLOBALS['egw_info']['user']['preferences']['common']['dateformat']);
if($GLOBALS['egw_info']['user']['lastpasswd_change'] == 0)
{
$api_messages = lang('You are required to change your password during your first login')
. '<br> Click this image on the navbar: <img src="'
. $GLOBALS['egw']->common->image('preferences','navbar.gif').'">';
}
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);
}
// This is gonna change
if(isset($cd))
{
$var['messages'] = $api_messages . '<br>' . checkcode($cd);
}
if (substr($GLOBALS['egw_info']['server']['login_logo_file'],0,4) == 'http')
{
$var['logo_file'] = $GLOBALS['egw_info']['server']['login_logo_file'];
}
else
{
$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['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')
{
$var['logo_url'] = 'http://'.$var['logo_url'];
}
$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']->pfp('out','navbar_header');
/******************************************************\
* The sidebox menu's *
\******************************************************/
$menu_title = lang('General Menu');
$file['Home'] = $GLOBALS['egw_info']['navbar']['home']['url'];
if($GLOBALS['egw_info']['user']['apps']['preferences'])
{
$file['Preferences'] = $GLOBALS['egw_info']['navbar']['preferences']['url'];
}
$file += array(
array(
'text' => lang('About %1',$GLOBALS['egw_info']['apps'][$GLOBALS['egw_info']['flags']['currentapp']]['title']),
'no_lang' => True,
'link' => $GLOBALS['egw_info']['navbar']['about']['url']
),
$GLOBALS['egw_info']['user']['userid'] != 'anonymous' ? 'Logout' : 'Login' =>$GLOBALS['egw_info']['navbar']['logout']['url']
);
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('lang_show_menu',lang('show menu'));
$GLOBALS['jerryr_tpl']->pparse('out','sidebox_hide_header');
display_sidebox('',$menu_title,$file);
$GLOBALS['egw']->hooks->single('sidebox_menu',$GLOBALS['egw_info']['flags']['currentapp']);
$GLOBALS['jerryr_tpl']->pparse('out','sidebox_hide_footer');
$var['sideboxcolstart']='';
$GLOBALS['jerryr_tpl']->set_var($var);
$GLOBALS['jerryr_tpl']->pparse('out','appbox');
$var['remove_padding'] = 'style="padding-left:0px;"';
$var['sideboxcolend'] = '';
}
else
{
$var['menu_link'] = '';
$var['sideboxcolstart'] = '<td id="tdSidebox" valign="top">';
$var['remove_padding'] = '';
$GLOBALS['jerryr_tpl']->set_var($var);
$GLOBALS['jerryr_tpl']->pparse('out','appbox');
display_sidebox('',$menu_title,$file);
$GLOBALS['egw']->hooks->single('sidebox_menu',$GLOBALS['egw_info']['flags']['currentapp']);
$var['sideboxcolend'] = '</td>';
}
$GLOBALS['jerryr_tpl']->set_var($var);
$GLOBALS['jerryr_tpl']->pparse('out','navbar_footer');
// If the application has a header include, we now include it
if(!@$GLOBALS['egw_info']['flags']['noappheader'] && @isset($_GET['menuaction']))
{
list($app,$class,$method) = explode('.',$_GET['menuaction']);
if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
{
$GLOBALS[$class]->header();
}
}
$GLOBALS['egw']->hooks->process('after_navbar');
return;
}
function display_sidebox($appname,$menu_title,$file)
{
if(!$appname || ($appname==$GLOBALS['egw_info']['flags']['currentapp'] && $file))
{
$var['lang_title']=$menu_title;//$appname.' '.lang('Menu');
$GLOBALS['jerryr_tpl']->set_var($var);
$GLOBALS['jerryr_tpl']->pfp('out','extra_blocks_header');
foreach($file as $text => $url)
{
sidebox_menu_item($url,$text);
}
$GLOBALS['jerryr_tpl']->pparse('out','extra_blocks_footer');
}
}
function sidebox_menu_item($item_link='',$item_text='')
{
if($item_text === '_NewLine_' || $item_link === '_NewLine_')
{
$GLOBALS['jerryr_tpl']->pparse('out','extra_block_spacer');
}
else
{
if (strtolower($item_text) == 'grant access' && $GLOBALS['egw_info']['server']['deny_user_grants_access']) {
return;
}
$var['icon_or_star']='<img src="'.$GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/images'.'/orange-ball.png" width="0" height="0" alt="ball"/>';
$var['target'] = '';
if(is_array($item_link))
{
if(isset($item_link['icon']))
{
$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['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['item_link'] = $item_link['link'];
if ($item_link['target'])
{
$var['target'] = ' target="' . $item_link['target'] . '"';
}
}
else
{
$var['lang_item'] = lang($item_text);
$var['item_link'] = $item_link;
}
$GLOBALS['jerryr_tpl']->set_var($var);
$block = 'extra_block_row';
if ($var['item_link'] === False)
{
$block .= $var['icon_or_star'] === False ? '_raw' : '_no_link';
}
$GLOBALS['jerryr_tpl']->pparse('out',$block);
}
}
function parse_navbar_end()
{
$GLOBALS['jerryr_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
$GLOBALS['jerryr_tpl']->set_file(
array(
'footer' => 'footer.tpl'
)
);
$var = Array(
'img_root' => $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/images',
'table_bg_color' => $GLOBALS['egw_info']['theme']['navbar_bg'],
'version' => $GLOBALS['egw_info']['server']['versions']['phpgwapi']
);
$GLOBALS['egw']->hooks->process('navbar_end');
if($GLOBALS['egw_info']['user']['preferences']['common']['show_generation_time'])
{
$totaltime = sprintf('%4.2lf',perfgetmicrotime() - $GLOBALS['egw_info']['flags']['page_start_time']);
$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['egw_info']['server']['versions']['phpgwapi']);
$var['activate_tooltips'] = '<script src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/wz_tooltip/wz_tooltip.js" type="text/javascript"></script>';
$GLOBALS['jerryr_tpl']->set_var($var);
$GLOBALS['jerryr_tpl']->pfp('out','footer');
}

View File

@ -3,92 +3,101 @@
{app_extra_icons_div} {app_extra_icons_div}
<div id="divMain"> <div id="divMain">
<div id="divUpperTabs"> <div id="divUpperTabs">
{upper_tabs} <ul>
{upper_tabs}
</ul>
</div> </div>
<div id="divAppIconBar"> <div id="divAppIconBar">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 0px"> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 0px">
<tr> <tr>
<td width="180"></td> <td width="180"></td>
<td valign="bottom"> <td valign="bottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
{app_icons} {app_icons}
</tr> </tr>
<tr> <tr>
{app_titles} {app_titles}
</tr> </tr>
</table> </table>
</td> </td>
{app_extra_icons_icon} {app_extra_icons_icon}
</tr> </tr>
</table> </table>
</div> </div>
<div id="divStatusBar"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td align="left" id="user_info">{user_info}</td><td align="right" id="admin_info">{current_users}</td></tr></table></div> <div id="divStatusBar"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr>
<td width="33%" align="left" id="user_info">{user_info}</td>
<td align="center" id="admin_info">{current_users}</td>
<td width="33%" align="right" id="quick_add">{quick_add}</td>
</tr></table></div>
<!-- END navbar_header --> <!-- END navbar_header -->
<!-- BEGIN upper_tab_block -->
<li><a href="{url}">{title}</a></li>
<!-- END upper_tab_block -->
<!-- BEGIN app_icon_block -->
<td width="{tdwidth}%" align="center" class="iconBack" onmouseover="this.className='iconBackHover'" onmouseout="this.className='iconBack'"><a href="{url}" {target}><img src="{icon}" alt="{title}" title="{title}" border="0" /></a></td>
<!-- END app_icon_block -->
<!-- BEGIN app_title_block -->
<td align="center" valign="top" class="appTitles" style="text-align:center"><a href="{url}" {target}>{title}</a></td>
<!-- END app_title_block -->
<!-- BEGIN appbox --> <!-- BEGIN appbox -->
<div id="divSubContainer"> <div id="divSubContainer">
<table width="100%" cellspacing="0" cellpadding="0"> <table width="100%" cellspacing="0" cellpadding="0">
<tr> <tr>
<!-- Sidebox Column --> <!-- Sidebox Column -->
{sideboxcolstart} {sideboxcolstart}
<!-- <td id="{tdsiteboxid}" valign="top">-->
<!-- END appbox --> <!-- END appbox -->
<!-- BEGIN sidebox_hide_header --> <!-- BEGIN sidebox_hide_header -->
<!--<script language="javascript" src="SlideOut.js"></script>-->
<script language="javascript"> <script language="javascript">
new ypSlideOutMenu("menu2", "right", 0, 103, 160, 200) new ypSlideOutMenu("menu2", "right", 0, 103, 160, 200)
</script> </script>
<div id="sideboxdragarea" style="position:absolute;left:0px;top:113px"> <div id="sideboxdragarea" style="position:absolute;left:0px;top:113px">
<a href="#" {show_menu_event}="ypSlideOutMenu.showMenu('menu2')" onmouseover="//ypSlideOutMenu.showMenu('menu2')" title="{lang_show_menu}"><img src="{img_root}/dragarea_right.png" /></a> <a href="#" {show_menu_event}="ypSlideOutMenu.showMenu('menu2')" onmouseover="//ypSlideOutMenu.showMenu('menu2')" title="{lang_show_menu}"><img src="{img_root}/dragarea_right.png" /></a>
</div> </div>
<div id="menu2Container"> <div id="menu2Container">
<div id="menu2Content" style="position: relative; left: 0; text-align: left;"> <div id="menu2Content" style="position: relative; left: 0; text-align: left;">
<table cellspacing="0" cellpadding="0"> <table cellspacing="0" cellpadding="0">
<tr><td> <tr><td>
<div style="background-color:#ffffff;border: #17202b 1px solid;padding:5px;">
<div style="background-color:#ffffff;border: #17202b 1px solid;padding:5px;">
<!-- END sidebox_hide_header --> <!-- END sidebox_hide_header -->
<!-- BEGIN sidebox_hide_footer --> <!-- BEGIN sidebox_hide_footer -->
</div> </div>
</td><td style="padding-top:10px" valign="top"> </td><td style="padding-top:10px" valign="top">
<a href="#" onClick="ypSlideOutMenu.hide('menu2')" ><img src="{img_root}/dragarea_left.png" align="right" /></a> <a href="#" onClick="ypSlideOutMenu.hide('menu2')" ><img src="{img_root}/dragarea_left.png" align="right" /></a>
</td></tr></table> </td></tr>
</div> </table>
</div> </div>
</div>
<!-- END sidebox_hide_footer --> <!-- END sidebox_hide_footer -->
<!-- BEGIN navbar_footer --> <!-- BEGIN navbar_footer -->
{sideboxcolend} {sideboxcolend}
<!-- End Sidebox Column --> <!-- End Sidebox Column -->
<!-- Applicationbox Column --> <!-- Applicationbox Column -->
<td id="tdAppbox" valign="top" {remove_padding}> <td id="tdAppbox" valign="top" {remove_padding}>
<div id="divAppboxHeader">{current_app_title}</div> <div id="divAppboxHeader">{current_app_title}</div>
<div id="divAppbox"> <div id="divAppbox">
<table width="100%" cellpadding="0" cellspacing="0"> <table width="100%" cellpadding="0" cellspacing="0">
<tr><td> <tr><td>
<!-- END navbar_footer --> <!-- END navbar_footer -->
@ -101,35 +110,71 @@
<!-- BEGIN extra_blocks_footer --> <!-- BEGIN extra_blocks_footer -->
</table> </table>
</div> </div>
</div> </div>
<div class="sideboxSpace"></div> <div class="sideboxSpace"></div>
<!-- END extra_blocks_footer --> <!-- END extra_blocks_footer -->
<!-- BEGIN extra_block_row --> <!-- BEGIN extra_block_row -->
<tr class="divSideboxEntry"> <tr class="divSideboxEntry">
<td width="20" align="center" valign="middle" class="textSideboxStar">{icon_or_star}</td><td class="textSidebox" onmouseover="this.className='textSideboxHover'" onmouseout="this.className='textSidebox'"><a class="textSidebox" href="{item_link}"{target}>{lang_item}</a></td> <td width="20" align="center" valign="middle" class="textSideboxStar">{icon_or_star}</td><td class="textSidebox" onmouseover="this.className='textSideboxHover'" onmouseout="this.className='textSidebox'"><a class="textSidebox" href="{item_link}"{target}>{lang_item}</a></td>
</tr> </tr>
<!-- END extra_block_row --> <!-- END extra_block_row -->
<!-- BEGIN extra_block_row_raw --> <!-- BEGIN extra_block_row_raw -->
<tr class="divSideboxEntry"> <tr class="divSideboxEntry">
<td colspan="2">{lang_item}</td> <td colspan="2">{lang_item}</td>
</tr> </tr>
<!-- END extra_block_row_raw --> <!-- END extra_block_row_raw -->
<!-- BEGIN extra_block_row_no_link --> <!-- BEGIN extra_block_row_no_link -->
<tr class="divSideboxEntry"> <tr class="divSideboxEntry">
<td width="20" align="center" valign="middle" class="textSideboxStar">{icon_or_star}</td><td class="textSideboxSpacer">{lang_item}</td> <td width="20" align="center" valign="middle" class="textSideboxStar">{icon_or_star}</td><td class="textSideboxSpacer">{lang_item}</td>
</tr> </tr>
<!-- END extra_block_row_no_link --> <!-- END extra_block_row_no_link -->
<!-- BEGIN extra_block_spacer --> <!-- BEGIN extra_block_spacer -->
<tr class="divSideboxEntry"> <tr class="divSideboxEntry">
<td width="20" align="center" valign="middle" class="textSideboxStar">{icon_or_star}</td><td height="8" class="textSideboxSpacer">&nbsp;</td> <td width="20" align="center" valign="middle" class="textSideboxStar">{icon_or_star}</td><td height="8" class="textSideboxSpacer">&nbsp;</td>
</tr> </tr>
<!-- END extra_block_spacer --> <!-- END extra_block_spacer -->
<!-- BEGIN app_extra_icons_div -->
<script language="javascript">
new ypSlideOutMenu("menu1", "left", 19, 109, 160, 300,'right');
</script>
<div id="menu1Container">
<div id="menu1Content" style="position: relative; left: 0; text-align: left;">
<div id="extraIcons">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr><td colspan="2" nowrap="nowrap" align="right" style="background-color:#dddddd; padding:1px;">
<a href="#" {show_menu_event}="ypSlideOutMenu.hide('menu1')" title="{lang_close}"><img style="" border="0" src="{img_root}/close.png"/></a>
</td></tr>
{app_extra_icons}
</table>
</div>
</div>
</div>
<!-- END app_extra_icons_div -->
<!-- BEGIN app_extra_block -->
<tr>
<td class="extraIconsRow"><a href="{url}" {target}><img src="{icon}" alt="{title}" title="{title}" width="16" border="0" /></a></td>
<td align="left" class="extraIconsRow"><a href="{url}" {target}>{title}</a></td>
</tr>
<!-- END app_extra_block -->
<!-- BEGIN app_extra_icons_icon -->
<td width="26" valign="top" align="right" style="padding-right:3px; padding-top:20px;">
<a title="{lang_show_more_apps}" href="#" {show_menu_event}="ypSlideOutMenu.showMenu('menu1')"><img src="{img_root}/extra_icons.png" border="0" /></a>
</td>
<!-- END app_extra_icons_icon -->