2000-08-18 05:24:22 +02:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare - Calendar *
|
|
|
|
* http://www.phpgroupware.org *
|
|
|
|
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
|
|
|
* http://www.radix.net/~cknudsen *
|
|
|
|
* -------------------------------------------- *
|
|
|
|
* This program is free software; you can redistribute it and/or modify it *
|
|
|
|
* under the terms of the GNU General Public License as published by the *
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
|
|
|
* option) any later version. *
|
|
|
|
\**************************************************************************/
|
|
|
|
|
2000-12-24 04:37:10 +01:00
|
|
|
/* $Id$ */
|
|
|
|
|
2000-11-10 23:49:48 +01:00
|
|
|
if (isset($friendly) && $friendly){
|
|
|
|
$phpgw->common->phpgw_footer();
|
2000-12-24 01:30:41 +01:00
|
|
|
$phpgw->common->phpgw_exit();
|
2000-08-18 05:24:22 +02:00
|
|
|
}
|
2001-01-13 22:15:11 +01:00
|
|
|
?>
|
2000-10-12 19:36:47 +02:00
|
|
|
<BR CLEAR="all">
|
|
|
|
<HR CLEAR="all">
|
|
|
|
<FONT SIZE="-1">
|
|
|
|
|
|
|
|
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
2001-01-21 15:15:42 +01:00
|
|
|
<FORM ACTION="<?php echo $phpgw->link("month.php"); ?>" method="post" name="SelectMonth">
|
2000-10-12 19:36:47 +02:00
|
|
|
<TR>
|
|
|
|
<TD VALIGN="top" WIDTH=33%><FONT SIZE="-1">
|
|
|
|
<B><?php echo lang("Month"); ?>:</B>
|
|
|
|
<SELECT NAME="date" ONCHANGE="document.SelectMonth.submit()">
|
|
|
|
<?php
|
2001-01-13 22:15:11 +01:00
|
|
|
if ($phpgw->calendar->tempyear && $phpgw->calendar->tempmonth) {
|
|
|
|
$m = $phpgw->calendar->tempmonth;
|
|
|
|
$y = $phpgw->calendar->tempyear;
|
2000-10-12 19:36:47 +02:00
|
|
|
} else {
|
|
|
|
$m = date("m");
|
|
|
|
$y = date("Y");
|
|
|
|
}
|
|
|
|
$d_time = mktime(0,0,0,$m,1,$y);
|
|
|
|
$thisdate = date("Ymd", $d_time);
|
|
|
|
$y--;
|
|
|
|
for ($i = 0; $i < 25; $i++) {
|
|
|
|
$m++;
|
|
|
|
if ($m > 12) {
|
|
|
|
$m = 1;
|
|
|
|
$y++;
|
|
|
|
}
|
|
|
|
$d = mktime(0,0,0,$m,1,$y);
|
2001-01-13 22:15:11 +01:00
|
|
|
echo'"<option value="' . date("Ymd", $d) . '"';
|
2000-10-12 19:36:47 +02:00
|
|
|
if (date("Ymd", $d) == $thisdate)
|
|
|
|
echo " SELECTED";
|
|
|
|
echo ">" . lang(date("F", $d)) . strftime(" %Y", $d) . "</option>\n";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</SELECT>
|
|
|
|
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang("Go!"); ?>"></NOSCRIPT></FONT>
|
|
|
|
</TD>
|
|
|
|
</FORM>
|
|
|
|
<FORM ACTION="<?php echo $phpgw->link("week.php"); ?>" method="post" name="SelectWeek">
|
|
|
|
<TD VALIGN="top" align="center" WIDTH=33%><FONT SIZE="-1"><B><?php echo lang("Week"); ?>:</B>
|
|
|
|
|
|
|
|
<SELECT NAME="date" ONCHANGE="document.SelectWeek.submit()">
|
|
|
|
<?php
|
2001-01-13 22:15:11 +01:00
|
|
|
if ($phpgw->calendar->tempyear && $phpgw->calendar->tempmonth) {
|
|
|
|
$m = $phpgw->calendar->tempmonth;
|
|
|
|
$y = $phpgw->calendar->tempyear;
|
2000-10-12 19:36:47 +02:00
|
|
|
} else {
|
|
|
|
$m = date("m");
|
|
|
|
$y = date("Y");
|
|
|
|
}
|
|
|
|
if ($thisday) {
|
|
|
|
$d = $thisday;
|
|
|
|
} else {
|
|
|
|
$d = date ("d");
|
|
|
|
}
|
2001-02-17 15:22:33 +01:00
|
|
|
$thisdate = $phpgw->calendar->makegmttime(0,0,0,$m,$d,$y);
|
|
|
|
$sun = $phpgw->calendar->get_weekday_start($y,$m,$d) -
|
|
|
|
((60 * 60) * intval($phpgw_info['user']['preferences']['common']['tz_offset']));
|
2000-10-12 19:36:47 +02:00
|
|
|
for ($i = -7; $i <= 7; $i++) {
|
2001-02-17 15:22:33 +01:00
|
|
|
$begin = $sun + (3600 * 24 * 7 * $i);
|
|
|
|
$end = $begin + (3600 * 24 * 6);
|
|
|
|
echo "<OPTION VALUE=\"" . $phpgw->common->show_date($begin,"Ymd") . "\"";
|
|
|
|
if ($begin <= $thisdate['raw'] && $end >= $thisdate['raw'])
|
2000-10-12 19:36:47 +02:00
|
|
|
echo " SELECTED";
|
2001-02-17 15:22:33 +01:00
|
|
|
echo ">" . lang($phpgw->common->show_date($begin,"F")) . " " . $phpgw->common->show_date($begin,"d") . "-"
|
|
|
|
. lang($phpgw->common->show_date($end,"F")) . " " . $phpgw->common->show_date($end,"d");
|
2000-10-12 19:36:47 +02:00
|
|
|
echo "</option>\n";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</SELECT>
|
|
|
|
|
|
|
|
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang("Go!"); ?>"></NOSCRIPT></FONT>
|
|
|
|
</TD>
|
|
|
|
</FORM>
|
2000-08-18 05:24:22 +02:00
|
|
|
|
|
|
|
<FONT SIZE="-1">
|
|
|
|
|
2000-09-04 16:43:12 +02:00
|
|
|
<FORM ACTION="<?php echo $phpgw->link("year.php"); ?>" method="post" name="SelectYear">
|
2000-08-18 05:24:22 +02:00
|
|
|
|
|
|
|
<TD VALIGN="top" align="right" WIDTH=33%><FONT SIZE="-1">
|
2000-09-07 22:49:55 +02:00
|
|
|
<B><?php echo lang("Year"); ?>:</B>
|
2000-08-18 05:24:22 +02:00
|
|
|
|
|
|
|
<SELECT NAME="year" ONCHANGE="document.SelectYear.submit()">
|
|
|
|
<?php
|
2001-01-13 22:15:11 +01:00
|
|
|
if ($phpgw->calendar->tempyear) {
|
|
|
|
$y = $phpgw->calendar->tempyear;
|
2000-08-18 05:24:22 +02:00
|
|
|
} else {
|
|
|
|
$y = date("Y");
|
|
|
|
}
|
|
|
|
for ($i = ($y - 3); $i < ($y + 3); $i++) {
|
|
|
|
echo "<OPTION VALUE=\"" . $i . "\"";
|
|
|
|
if ($i == $y)
|
|
|
|
echo " SELECTED";
|
|
|
|
echo ">" . $i . "</option>\n";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</SELECT>
|
|
|
|
|
2000-09-07 22:49:55 +02:00
|
|
|
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang("Go!"); ?>"></NOSCRIPT>
|
2000-08-18 05:24:22 +02:00
|
|
|
</FONT></TD>
|
|
|
|
</FORM>
|
|
|
|
|
|
|
|
</TR>
|
|
|
|
</TABLE>
|