From 406dd23d55ab12a7aae96c21a23bb8a5d61e7760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Tue, 23 Feb 2010 07:55:21 +0000 Subject: [PATCH] Tempus zeigt Tooltips bei Ferien an --- include/ferien.class.php | 17 +++++++++++++++++ include/wochenplan.class.php | 16 +++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/include/ferien.class.php b/include/ferien.class.php index dc6767d4b..953130a08 100644 --- a/include/ferien.class.php +++ b/include/ferien.class.php @@ -205,5 +205,22 @@ class ferien extends basis_db return true; return false; } + + /** + * Liefert ein Array mit den Ferien zum angegebenen Datum + * + * @param $timestamp + * @return array + */ + public function getFerien($timestamp) + { + $ret = array(); + + foreach ($this->ferien AS $f) + if ($timestamp>=$f->vontimestamp && $timestamp<=$f->bistimestamp) + $ret[]=$f->bezeichnung; + + return $ret; + } } ?> \ No newline at end of file diff --git a/include/wochenplan.class.php b/include/wochenplan.class.php index 9d2b2d11a..6b101c6fe 100644 --- a/include/wochenplan.class.php +++ b/include/wochenplan.class.php @@ -937,8 +937,22 @@ class wochenplan extends basis_db $index=1; $bgcolor=$cfgStdBgcolor[$index+3]; if ($isferien) + { $bgcolor='#FFFF55'; - echo 'getFerien($datum) as $bezeichnung) + { + if($ferienbezeichnung!='') + $ferienbezeichnung.=', '; + $ferienbezeichnung .= $bezeichnung; + } + } + echo '