Subversion-Projekte lars-tiefland.niewerth

Revision

Revision 2 | Revision 4 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 2 Revision 3
Zeile 67... Zeile 67...
67
		}
67
		}
68
		$page_string.="</tr></table><br><br>";
68
		$page_string.="</tr></table><br><br>";
Zeile 69... Zeile 69...
69
 
69
 
70
		return $page_string;
70
		return $page_string;
-
 
71
	}
-
 
72
	
-
 
73
	function calendar($an_id, $f_id, $y=0, $m=0)
-
 
74
	{
-
 
75
		if ($y===0)
-
 
76
		{
-
 
77
			$y=date("Y");
-
 
78
		}
-
 
79
		if ($m===0)
-
 
80
		{
-
 
81
			$m=date("n");
-
 
82
		}
-
 
83
		global $smarty;
-
 
84
		require_once 'Calendar/Month/Weekdays.php';
-
 
85
		require_once 'Calendar/Decorator/Textual.php';
-
 
86
		require_once 'Calendar/Decorator/Uri.php';
-
 
87
		$smarty->assign("title","Termine Schritt 2 - Kalender");
-
 
88
		setLocale(LC_ALL,"de_DE");
-
 
89
		$mode=(isset($_GET["mode"]))?$_GET["mode"]:"";
-
 
90
		$smarty->assign("mode",$mode);
-
 
91
		$Month = new Calendar_Month_Weekdays($y, $m);
-
 
92
		$m_d=new Calendar_Decorator_Textual($Month);
-
 
93
		$u_d=new Calendar_Decorator_Uri($Month);
-
 
94
		$u_d->setFragments("jahr", "monat", "tag");
-
 
95
		$Month->build();
-
 
96
 
-
 
97
		$cal="<table>";
-
 
98
		$cal.="<tr><th colspan=7>
-
 
99
		<form action=termine.php>
-
 
100
			<input type='hidden' name='mode' value='calendar'>
-
 
101
			<input type='hidden' name='an_id' value='$an_id'>
-
 
102
			<input type='hidden' name='f_id' value='$f_id'>
-
 
103
			<input type='hidden' name='monat' value='$m'>
-
 
104
			<input type='hidden' name='jahr' value='".$u_d->prevYear()."'>
-
 
105
			<input class='liteoption' type='submit' value='<<'>
-
 
106
		</form>
-
 
107
		
-
 
108
		<form action=termine.php>
-
 
109
			<input type='hidden' name='mode' value='calendar'>
-
 
110
			<input type='hidden' name='an_id' value='$an_id'>
-
 
111
			<input type='hidden' name='f_id' value='$f_id'>
-
 
112
			<input type='hidden' name='monat' value='".$u_d->prevMonth()."'>
-
 
113
			<input type='hidden' name='jahr' value='".(($m==1)?$u_d->prevYear():$y)."'>
-
 
114
			<input class='liteoption' type='submit' value='<'>
-
 
115
		</form>
-
 
116
		&nbsp;&nbsp;".$m_d->thisMonthName()." ".$y."&nbsp;&nbsp;
-
 
117
		<form action=termine.php>
-
 
118
			<input type='hidden' name='mode' value='calendar'>
-
 
119
			<input type='hidden' name='an_id' value='$an_id'>
-
 
120
			<input type='hidden' name='f_id' value='$f_id'>
-
 
121
			<input type='hidden' name='monat' value='".$u_d->nextMonth()."'>
-
 
122
			<input type='hidden' name='jahr' value='".(($m==12)?$u_d->nextYear():$y)."'>
-
 
123
			<input class='liteoption' type='submit' value='>'>
-
 
124
		</form>
-
 
125
		
-
 
126
		<form action=termine.php>
-
 
127
			<input type='hidden' name='mode' value='calendar'>
-
 
128
			<input type='hidden' name='an_id' value='$an_id'>
-
 
129
			<input type='hidden' name='f_id' value='$f_id'>
-
 
130
			<input type='hidden' name='monat' value='$m'>
-
 
131
			<input type='hidden' name='jahr' value='".$u_d->nextYear()."'>
-
 
132
			<input class='liteoption' type='submit' value='>>'>
-
 
133
		</form>
-
 
134
		</th></tr>";
-
 
135
		$cal.="<tr><th>Mo</th><th>Di</th><th>Mi</th><th>Do</th><th>Fr</th><th>Sa</th><th>So</th></tr>";
-
 
136
		while ($Day = $Month->fetch()) 
-
 
137
		{
-
 
138
			if ($Day->isFirst()) 
-
 
139
			{
-
 
140
				$cal.="<tr>";
-
 
141
			}	
-
 
142
 
-
 
143
			if ($Day->isEmpty()) 
-
 
144
			{
-
 
145
				$cal.="<td>&nbsp;</td>";
-
 
146
			}
-
 
147
			else
-
 
148
			{
-
 
149
				$cal.='<td>'."<a href='termine.php?mode=end&an_id=$an_id&f_id=$f_id&jahr=".$Month->thisYear()."&monat=".$Month->thisMonth()."&tag=".$Day->thisDay()."'>".$Day->thisDay()."</a></td>";
-
 
150
			}
-
 
151
 
-
 
152
			if ($Day->isLast()) 
-
 
153
			{
-
 
154
				$cal.="</tr>";
-
 
155
			}
-
 
156
		}
-
 
157
 
-
 
158
		$cal.="</table>";
-
 
159
		$smarty->assign("cal",$cal);
-
 
160
		$smarty->display("calendar.tpl");
71
	}
161
	}