get planner working

This commit is contained in:
Ralf Becker 2002-05-12 07:50:58 +00:00
parent d0e66ba776
commit 5a73146b91

View File

@ -1311,10 +1311,8 @@
{ {
echo \'<!-- For Date : \'.$v.\' : Count of items : \'.count($daily).\' -->\'."\n"; echo \'<!-- For Date : \'.$v.\' : Count of items : \'.count($daily).\' -->\'."\n";
} }
for($g=0;$g<count($daily);$g++) while (list($nul,$event) = @each($daily))
{ {
$event = $daily[$g];
$view = $html->link(\'/index.php\', $view = $html->link(\'/index.php\',
array( array(
\'menuaction\' => \'calendar.uicalendar.view\', \'menuaction\' => \'calendar.uicalendar.view\',
@ -1322,31 +1320,46 @@
) )
); );
$start_cell = $intervals_per_day * ($event[\'start\'][\'mday\'] - 1); if ($event[\'start\'][\'month\'] == $this->bo->month &&
$start_cell += $interval[$event[\'start\'][\'hour\']]; $event[\'start\'][\'year\'] == $this->bo->year) // event starts in actual month ?
{
$end_cell = $intervals_per_day * ($event[\'end\'][\'mday\'] - 1); $start_cell = $intervals_per_day * ($event[\'start\'][\'mday\'] - 1);
$end_cell += $interval[$event[\'end\'][\'hour\']]; $start_cell += $interval[$event[\'start\'][\'hour\']];
}
else
{
$start_cell = 0;
}
if ($event[\'end\'][\'month\'] == $this->bo->month &&
$event[\'end\'][\'year\'] == $this->bo->year) // event ends in actual month ?
{
$end_cell = $intervals_per_day * ($event[\'end\'][\'mday\'] - 1);
$end_cell += $interval[$event[\'end\'][\'hour\']];
}
else
{
$end_cell = $last_cell;
}
if ($c = $event[\'category\'])
{
list($cat) = $this->planner_category($event[\'category\']);
if ($cat[\'parent\'])
{
list($pcat) = $this->planner_category($c = $cat[\'parent\']);
}
else
{
$pcat = $cat;
}
}
else
{
$cat = $pcat = array( \'name\' => lang(\'none\'));
}
$i = 0; // search for row of parent category $i = 0; // search for row of parent category
do { do {
++$i; ++$i;
if ($c = $event[\'category\'])
{
$cat = $this->planner_category($event[\'category\']);
if ($cat[\'parent\'])
{
$pcat = $this->planner_category($c = $cat[\'parent\']);
}
else
{
$pcat = $cat;
}
}
else
{
$cat = $pcat = array( \'name\' => lang(\'none\'));
}
$k = $c.\'_\'.$i; $k = $c.\'_\'.$i;
$ka = \'.nr_\'.$k; $ka = \'.nr_\'.$k;
if (!isset($rows[$k])) if (!isset($rows[$k]))
@ -1378,7 +1391,6 @@
{ {
$opt .= "colspan=".(1 + $end_cell - $start_cell); $opt .= "colspan=".(1 + $end_cell - $start_cell);
} }
if ($bgcolor=$cat[\'color\']) if ($bgcolor=$cat[\'color\'])
{ {
$opt .= \' bgcolor="\'.$bgcolor.\'"\'; $opt .= \' bgcolor="\'.$bgcolor.\'"\';