2007-05-07 09:14:52 +02:00
|
|
|
<?php
|
2010-06-24 01:01:57 +02:00
|
|
|
/**
|
|
|
|
* eGroupWare - Calendar planner block for sitemgr
|
|
|
|
*
|
|
|
|
* @link http://www.egroupware.org
|
|
|
|
* @package calendar
|
|
|
|
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
|
|
* @version $Id$
|
|
|
|
*/
|
2007-05-07 09:14:52 +02:00
|
|
|
|
2010-06-24 01:01:57 +02:00
|
|
|
/**
|
|
|
|
* Calendar day selection for sitemgr
|
|
|
|
*/
|
2007-05-07 09:14:52 +02:00
|
|
|
class module_calendar extends Module
|
|
|
|
{
|
|
|
|
function module_calendar()
|
|
|
|
{
|
2009-08-03 11:51:35 +02:00
|
|
|
$this->arguments = array(
|
|
|
|
'redirect' => array(
|
|
|
|
'type' => 'textfield',
|
|
|
|
'label' => lang('Specify where URL of the day links to'),
|
|
|
|
),
|
|
|
|
);
|
2007-05-07 09:14:52 +02:00
|
|
|
|
|
|
|
$this->title = lang('Calendar');
|
|
|
|
$this->description = lang('This module displays the current month');
|
|
|
|
}
|
|
|
|
|
|
|
|
function get_content(&$arguments,$properties)
|
|
|
|
{
|
2009-08-03 11:51:35 +02:00
|
|
|
$date = (int) (strtotime(get_var('date',array('POST','GET'))));
|
|
|
|
$redirect = $arguments['redirect'] ? $arguments['redirect'] : '#';
|
2010-06-24 01:01:57 +02:00
|
|
|
|
|
|
|
return $GLOBALS['egw']->jscalendar->get_javascript().
|
|
|
|
$GLOBALS['egw']->jscalendar->flat($redirect,$date);
|
2007-05-07 09:14:52 +02:00
|
|
|
}
|
|
|
|
}
|