From b245c05cc2113e6348801a5663bcddbb71948746 Mon Sep 17 00:00:00 2001 From: Christian Paminger Date: Tue, 26 Feb 2008 15:09:00 +0000 Subject: [PATCH] --- include/wochenplan.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/wochenplan.class.php b/include/wochenplan.class.php index 4127fb4c9..e987e7160 100644 --- a/include/wochenplan.class.php +++ b/include/wochenplan.class.php @@ -21,6 +21,7 @@ require_once('lehrstunde.class.php'); require_once('ferien.class.php'); require_once('benutzerberechtigung.class.php'); +require_once('datum.class.php'); class wochenplan { @@ -462,6 +463,7 @@ class wochenplan */ function draw_week($user_uid='') { + $o_datum=new datum(); // Stundentafel abfragen $sql_query="SELECT stunde, beginn, ende FROM lehre.tbl_stunde ORDER BY stunde"; if(!$result_stunde=pg_exec($this->conn, $sql_query)) @@ -489,8 +491,8 @@ class wochenplan echo ' '.$this->crlf; // Von Montag bis Samstag $datum_now=mktime(); - $datum_res_lektor_start=jump_day($datum_now,RES_TAGE_LEKTOR_MIN); - $datum_res_lektor_ende=jump_day($datum_now,RES_TAGE_LEKTOR_MAX); + $datum_res_lektor_start=jump_day($datum_now,(RES_TAGE_LEKTOR_MIN)-1); + $datum_res_lektor_ende=$o_datum->mktime_fromdate(RES_TAGE_LEKTOR_BIS); //jump_day($datum_now,RES_TAGE_LEKTOR_MAX); if (!date("w",$this->datum)) $this->datum=jump_day($this->datum,1); $datum=$this->datum; @@ -627,7 +629,7 @@ class wochenplan else { echo '
'; - if ($this->user=='lektor' && $this->type=='ort' && ($datum>$datum_res_lektor_start && $datum<=$datum_res_lektor_ende)) + if ($this->user=='lektor' && $this->type=='ort' && ($datum>=$datum_res_lektor_start && $datum<=$datum_res_lektor_ende)) echo ''; //&& $datum>=$datum_now echo ''.$this->crlf; } @@ -636,7 +638,7 @@ class wochenplan $datum=jump_day($datum, 1); } echo ' '.$this->crlf; - if ($this->user=='lektor' && $this->type=='ort' && ($datum>=$datum_now && $datum>$datum_res_lektor_start && $datum<=$datum_res_lektor_ende)) + if ($this->user=='lektor' && $this->type=='ort' && ($datum>=$datum_now && $datum>=$datum_res_lektor_start && $datum<=$datum_res_lektor_ende)) { echo '
Titel: '.$this->crlf; echo ' Beschreibung: '.$this->crlf;