Revision 25 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?phprequire("include/common.php");$smarty->assign("title","Wochenübersicht - Druckausgabe");$d=intval(isset($_GET["tag"])?$_GET["tag"]:date("d"));$m=intval(isset($_GET["monat"])?$_GET["monat"]:date("m"));$y=intval(isset($_GET["jahr"])?$_GET["jahr"]:date("Y"));$w=new Calendar_Week($y,$m,$d);$w->build();setLocale(LC_ALL,"de_DE");$mode=(isset($_GET["mode"]))?$_GET["mode"]:"";$smarty->assign("mode",$mode);$Month = new Calendar_Month_Weekdays($y, $m);$m_d=new Calendar_Decorator_Textual($Month);$u_d=new Calendar_Decorator_Uri($w);$u_d->setFragments("jahr", "monat", "tag");$nw=$w->nextWeek('array');$pw=$w->prevWeek('array');$cal="<center><table width='75%'>";$cal.="<tr><th colspan=8>".$m_d->thisMonthName()." $y </th></tr>";$tage=Calendar_Decorator_Textual::weekdayNames();$cal.="<tr><th>KW#</th>";$kw=$w->thisWeek('n_in_year');for ($tag=1; $tag < 8; $tag++){$cal.="<th>".$tage[$tag %7]."</th>";}$cal.="</tr><tr><td width='10'>$kw</td>";while ($Day = $w->fetch()){if ($Day->isEmpty()){$cal.="<td> </td>";}else{$cal.='<td width="14%" valign="top"><b>'.$Day->thisDay()."</b>";$termine=Termin::Liste(date("Y-m-d",mktime(0,0,0,$Day->thisMonth(),$Day->thisDay(),$Day->thisYear())));if (is_array($termine)){foreach ($termine as $termin){$cal.="<br>".$termin["an"]." bei <br>" . $termin["firma"]."<br>";}}$cal.="</td>";}if ($Day->isLast()){$cal.="</tr>";}}$cal.="</table></center>";$smarty->assign("cal",$cal);$smarty->display("print.tpl");?>