2001-07-15 23:42:17 +02:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
2004-08-09 13:43:57 +02:00
|
|
|
* eGroupWare - Info Log administration *
|
|
|
|
* 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$ */
|
|
|
|
|
2005-04-06 13:05:57 +02:00
|
|
|
$showevents = intval($GLOBALS['egw_info']['user']['preferences']['infolog']['homeShowEvents']);
|
2003-11-20 07:40:29 +01:00
|
|
|
if($showevents > 0)
|
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-02-05 11:23:19 +01:00
|
|
|
switch($showevents)
|
2003-11-20 07:40:29 +01:00
|
|
|
{
|
2005-02-05 11:23:19 +01:00
|
|
|
case 1:
|
|
|
|
$html = $infolog->index(array('nm' => array('filter' => 'own-open-today')),'','',0,False,True);
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
$html = ExecMethod('calendar.uicalendar.get_todos', array('', false));
|
|
|
|
break;
|
2003-11-20 07:40:29 +01:00
|
|
|
}
|
2003-07-06 22:12:27 +02:00
|
|
|
$title = lang('InfoLog').' - '.lang($infolog->filters['own-open-today']);
|
2005-02-05 11:23:19 +01:00
|
|
|
$xslt = $infolog->tmpl->xslt;
|
2003-07-06 22:12:27 +02:00
|
|
|
unset($infolog);
|
2001-07-15 23:42:17 +02:00
|
|
|
|
2005-02-05 11:23:19 +01:00
|
|
|
if(!$xslt) // .14/6
|
2003-07-06 22:12:27 +02:00
|
|
|
{
|
2005-04-06 13:05:57 +02:00
|
|
|
$portalbox =& CreateObject('phpgwapi.listbox',array(
|
2003-07-06 22:12:27 +02:00
|
|
|
'title' => $title,
|
2005-04-06 13:05:57 +02:00
|
|
|
'primary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
|
|
|
|
'secondary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
|
|
|
|
'tertiary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
|
2003-07-06 22:12:27 +02:00
|
|
|
'width' => '100%',
|
|
|
|
'outerborderwidth' => '0',
|
2005-04-06 13:05:57 +02:00
|
|
|
'header_background_image' => $GLOBALS['egw']->common->image('phpgwapi/templates/default','bg_filler')
|
2003-07-06 22:12:27 +02:00
|
|
|
));
|
|
|
|
foreach(array(
|
|
|
|
'up' => Array('url' => '/set_box.php', 'app' => $app_id),
|
|
|
|
'down' => Array('url' => '/set_box.php', 'app' => $app_id),
|
|
|
|
'close' => Array('url' => '/set_box.php', 'app' => $app_id),
|
|
|
|
'question' => Array('url' => '/set_box.php', 'app' => $app_id),
|
|
|
|
'edit' => Array('url' => '/set_box.php', 'app' => $app_id)
|
|
|
|
) as $key => $value)
|
|
|
|
{
|
|
|
|
$portalbox->set_controls($key,$value);
|
|
|
|
}
|
|
|
|
$portalbox->data = $data;
|
2002-05-14 14:04:15 +02:00
|
|
|
|
2003-07-06 22:12:27 +02:00
|
|
|
echo "\n<!-- BEGIN InfoLog info -->\n".$portalbox->draw($html)."\n<!-- END InfoLog info -->\n";
|
|
|
|
unset($portalbox);
|
|
|
|
}
|
|
|
|
else // HEAD / XSLT
|
|
|
|
{
|
2005-04-06 13:05:57 +02:00
|
|
|
$GLOBALS['egw']->portalbox->set_params(array(
|
2003-07-06 22:12:27 +02:00
|
|
|
'app_id' => $app_id,
|
|
|
|
'title' => $title
|
|
|
|
));
|
2005-04-06 13:05:57 +02:00
|
|
|
$GLOBALS['egw']->portalbox->draw($html);
|
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
|
|
|
?>
|