*
* http://www.radix.net/~cknudsen *
* -------------------------------------------- *
* 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$ */
if (isset($friendly) && $friendly)
{
$phpgw->common->phpgw_footer();
$phpgw->common->phpgw_exit();
}
if(floor($PHP_VERSION) == 4)
{
global $phpgw_info, $thisday, $thismonth, $thisyear;
}
$p = CreateObject('phpgwapi.Template',$phpgw->calendar->template_dir);
$templates = Array(
'footer' => 'footer.tpl',
'footer_column' => 'footer_column.tpl'
);
$p->set_file($templates);
if ($phpgw->calendar->tempyear && $phpgw->calendar->tempmonth)
{
$m = $phpgw->calendar->tempmonth;
$y = $phpgw->calendar->tempyear;
}
else
{
$m = date('m');
$y = date('Y');
}
$d_time = mktime(0,0,0,$m,1,$y);
$thisdate = date('Ymd', $d_time);
$y--;
$str = '';
for ($i = 0; $i < 25; $i++)
{
$m++;
if ($m > 12)
{
$m = 1;
$y++;
}
$d = mktime(0,0,0,$m,1,$y);
$str .= ''."\n";
}
$var = Array(
'action_url' => $phpgw->link('/calendar/week.php','owner='.$owner),
'form_name' => 'SelectWeek',
'label' => lang('Week'),
'form_label' => 'date',
'form_onchange' => 'document.SelectWeek.submit()',
'row' => $str,
'go' => lang('Go!')
);
$p->set_var($var);
$p->parse('output','footer_column',True);
if ($phpgw->calendar->tempyear)
{
$y = $phpgw->calendar->tempyear;
}
else
{
$y = date('Y');
}
$str = '';
for ($i = ($y - 3); $i < ($y + 3); $i++)
{
$str .= '