2001-07-15 23:42:17 +02:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
2005-11-27 19:24:30 +01:00
|
|
|
* eGroupWare - Info Log on Homepage *
|
|
|
|
* http://www.egroupware.org *
|
2001-07-15 23:42:17 +02:00
|
|
|
* -------------------------------------------- *
|
|
|
|
* 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$ */
|
|
|
|
|
2006-04-09 07:34:59 +02:00
|
|
|
if (($showevents = $GLOBALS['egw_info']['user']['preferences']['infolog']['homeShowEvents']))
|
2001-07-15 23:42:17 +02:00
|
|
|
{
|
2005-04-06 13:05:57 +02:00
|
|
|
$save_app = $GLOBALS['egw_info']['flags']['currentapp'];
|
|
|
|
$GLOBALS['egw_info']['flags']['currentapp'] = 'infolog';
|
2001-07-15 23:42:17 +02:00
|
|
|
|
2005-04-06 13:05:57 +02:00
|
|
|
$GLOBALS['egw']->translation->add_app('infolog');
|
2001-07-15 23:42:17 +02:00
|
|
|
|
2005-04-06 13:05:57 +02:00
|
|
|
$app_id = $GLOBALS['egw']->applications->name2id('infolog');
|
2002-05-14 14:04:15 +02:00
|
|
|
$GLOBALS['portal_order'][] = $app_id;
|
|
|
|
|
2005-04-06 13:05:57 +02:00
|
|
|
$infolog =& CreateObject('infolog.uiinfolog');
|
2005-07-14 09:35:11 +02:00
|
|
|
$infolog->called_by = 'home';
|
|
|
|
|
2006-04-09 07:34:59 +02:00
|
|
|
if (in_array($showevents,array('1','2'))) $showevents = 'own-open-today';
|
|
|
|
$html = $infolog->index(array('nm' => array('filter' => $showevents)),'','',0,False,True);
|
2003-07-06 22:12:27 +02:00
|
|
|
$title = lang('InfoLog').' - '.lang($infolog->filters['own-open-today']);
|
|
|
|
unset($infolog);
|
2001-07-15 23:42:17 +02:00
|
|
|
|
2005-11-27 19:24:30 +01:00
|
|
|
$portalbox =& CreateObject('phpgwapi.listbox',array(
|
|
|
|
'title' => $title,
|
|
|
|
'primary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
|
|
|
|
'secondary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
|
|
|
|
'tertiary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
|
|
|
|
'width' => '100%',
|
|
|
|
'outerborderwidth' => '0',
|
|
|
|
'header_background_image' => $GLOBALS['egw']->common->image('phpgwapi/templates/default','bg_filler')
|
|
|
|
));
|
|
|
|
foreach(array('up','down','close','question','edit') as $key)
|
2003-07-06 22:12:27 +02:00
|
|
|
{
|
2005-11-27 19:24:30 +01:00
|
|
|
$portalbox->set_controls($key,Array('url' => '/set_box.php', 'app' => $app_id));
|
2003-07-06 22:12:27 +02:00
|
|
|
}
|
2005-11-27 19:24:30 +01:00
|
|
|
$portalbox->data = $data;
|
|
|
|
|
|
|
|
if (!file_exists(EGW_SERVER_ROOT.($css_file ='/infolog/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/app.css')))
|
2003-07-06 22:12:27 +02:00
|
|
|
{
|
2005-11-27 19:24:30 +01:00
|
|
|
$css_file = '/infolog/templates/default/app.css';
|
2003-07-06 22:12:27 +02:00
|
|
|
}
|
2005-11-27 19:24:30 +01:00
|
|
|
echo '
|
|
|
|
<!-- BEGIN InfoLog info -->
|
|
|
|
<style type="text/css">
|
|
|
|
<!--
|
|
|
|
@import url('.$GLOBALS['egw_info']['server']['webserver_url'].$css_file.');
|
|
|
|
-->
|
|
|
|
</style>
|
|
|
|
'. $portalbox->draw($html)."\n<!-- END InfoLog info -->\n";
|
|
|
|
|
|
|
|
unset($portalbox);
|
2003-07-06 22:12:27 +02:00
|
|
|
unset($html);
|
2005-04-06 13:05:57 +02:00
|
|
|
$GLOBALS['egw_info']['flags']['currentapp'] = $save_app;
|
2001-07-15 23:42:17 +02:00
|
|
|
}
|
2003-11-20 07:40:29 +01:00
|
|
|
unset($showevents);
|
2002-10-26 02:33:22 +02:00
|
|
|
?>
|