PHP Classes

File: monatsuebersicht.php4

Recommend this page to a friend!
  Classes of Jochen Kächelin   germandate_format   monatsuebersicht.php4   Download  
File: monatsuebersicht.php4
Role: ???
Content type: text/plain
Description: Zeigt den ausgewählten Monat als tabellarische Übersicht
Class: germandate_format
Author: By
Last change:
Date: 23 years ago
Size: 1,868 bytes
 

Contents

Class file image Download
<? require("germandate_format.php4"); function erster_wochentag($monat) { $tagnummer = date("w",mktime(0,0,0,date($monat),1,date("Y")) ); // Standardmäßig ist Sonntag Tag 0, Montag Tag 1 // Wir wollen jedoch, daß Sonntag Tag 7 ist if ($tagnummer==0) $tagnummer=7; return $tagnummer; } function monats_uebersicht($monat) { $datum = new timestamp_to_date; $datum->ttd(mktime(0,0,0,$monat,date("d"),date("Y"))); echo " <table border=1 cellpadding=0 cellsapcing=0 width=350 height=250 align=center bordercolorlight='#000000' bordercolordark='#000000' bordercolor='#000000'> <tr> <td colspan=7 align='center' height=40 bgcolor='#336633'><font color='#FFFFFF'>$datum->monatsname $datum->jahr</font></td> </tr> <tr> <td align='center' height=20 width=50>Mo</td><td align='center' width=50>Di</td><td align='center' width=50>Mi</td><td align='center' width=50>Do</td><td align='center' width=50>Fr</td><td align='center' width=50>Sa</td><td align='center' width=50>So</td> </tr>\n"; $feld=1; $tag = 1; $monatstag=1; $erster_wochentag = erster_wochentag($monat); $i=1; echo"<tr>\n"; while($i<$erster_wochentag) { echo"<td class='klein'>&nbsp;</td>"; $feld++; $i++; } $anzahl_der_monatstage = date("t",mktime(0,0,0,$monat,date("w"),date("Y"))); while($monatstag < $anzahl_der_monatstage+1) { $termin = mktime(0,0,0,$monat,$monatstag,date("Y")); echo "<td align='center'><a href='#?termin=$termin'>$monatstag</a></td>"; $feld++; if($feld==8 OR $feld==15 or $feld==22 or $feld==29 or $feld==36) { echo "</tr><tr>"; } $monatstag++; } echo "</table>\n"; } monats_uebersicht(date("m")); ?>