hooks->single('about',$app))) { function about_app() { global $app; $icon = $GLOBALS['phpgw']->common->image($app,array('navbar','nonav')); include (PHPGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php"); $info = $setup_info[$app]; $info['title'] = $GLOBALS['phpgw_info']['apps'][$app]['title']; return about_display($info); } $api_only = !($included = file_exists(PHPGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php")); } } else { $api_only = True; } $tpl = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi')); $tpl->set_file(array( 'phpgw_about' => 'about.tpl', 'phpgw_about_unknown' => 'about_unknown.tpl' )); $title = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : 'eGroupWare'; $GLOBALS['phpgw_info']['flags']['app_header'] = lang('About %1',$title); $GLOBALS['phpgw']->common->phpgw_header(); $tpl->set_block('phpgw_about', 'egroupware','egroupware'); $tpl->set_block('phpgw_about', 'application','application'); if ($included) { $tpl->set_var('phpgw_app_about', about_app()); $tpl->pparse('phpgw_about', 'application', True); } else { if ($api_only) { $tpl->set_var('phpgw_logo',$GLOBALS['phpgw']->common->image('phpgwapi','logo.gif')); $tpl->set_var('phpgw_version',lang('eGroupWare API version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi'])); $tpl->set_var('phpgw_message',lang('%1eGroupWare%2 is a multi-user, web-based groupware suite written in %3PHP%4.', '','','','')); $tpl->pparse('out', 'egroupware'); $tpl->set_var('phpgw_app_about',about_template()); $tpl->pparse('phpgw_about', 'application', True); } else { $tpl->set_var('app_header',$app); $tpl->pparse('out','phpgw_about_unknown'); } } $GLOBALS['phpgw']->common->phpgw_footer(); function about_template() { $template = $GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi'); include ($template . "/settings/settings.inc.php"); $s = ""; foreach($template_info as $info) { $s .= about_display($info); } return $s; } function about_display($info) { $other_infos = array( 'author' => lang('Author'), 'maintainer' => lang('Maintainer'), 'version' => lang('Version'), 'license' => lang('License'), ); if($info[icon]) { $icon = $info[icon]; } $s = "\n"; if(trim($icon) != "") { $s.= ""; } else { $s .= ""; } if ($info['description']) { $info['description'] = lang($info['description']); $s .= "\n"; if ($info['note']) { $info['note'] = lang($info['note']); $s .= "\n"; } } foreach ($other_infos as $key => $val) { if (isset($info[$key])) { $s .= "\n"; } } if ($info['extra_untranslated']) { $s .= "\n"; } $s .= "
\"$info[title]\"

$info[title]

$info[title]

$info[description]
$info[note]
$val"; $infos = $info[$key]; for ($n = 0; is_array($info[$key][$n]) && ($infos = $info[$key][$n]) || !$n; ++$n) { if (!is_array($infos) && isset($info[$key.'_email'])) { $infos = array('email' => $info[$key.'_email'],'name' => $infos); } elseif(!is_array($infos) && isset($info[$key.'_url'])) { $infos = array('url' => $info[$key.'_url'],'name' => $infos); } if (is_array($infos)) { if ($infos['email']) { $names = explode('
',$infos['name']); $emails = split('@|
',$infos['email']); if (count($names) < count($emails)/2) { $names = ''; } $infos = ''; while (list($user,$domain) = $emails) { if ($infos) $infos .= '
'; $name = $names ? array_shift($names) : $user; $infos .= "$name"; array_shift($emails); array_shift($emails); } } elseif($infos['url']) { $img = $info[$key.'_img']; if ($img) { $img_url = $GLOBALS['phpgw']->common->image('phpgwapi',$img); if (!$img_url) { $img_url = $GLOBALS['phpgw']->common->image($info['name'],$img); } $infos = '

'.$infos['name'].'
'; } else { $infos = ''.$infos['name'].''; } } } $s .= ($n ? '
' : '') . $infos; } $s .= "
$info[extra_untranslated]
\n"; return $s; } ?>