diff options
author | Chad Little <clittle@users.sourceforge.net> | 2002-09-29 01:17:08 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2002-09-29 01:17:08 +0000 |
commit | ce366dcff1289fbd3246536dd8cd2215faaa4dd1 (patch) | |
tree | 1ce8937b1659bf94eff8a3f76895b38aaa1a526c /functions/list_months.php | |
parent | 5bd586da84b58f171263a1b69a145c505e97fd28 (diff) | |
download | phpicalendar-ce366dcff1289fbd3246536dd8cd2215faaa4dd1.tar.gz phpicalendar-ce366dcff1289fbd3246536dd8cd2215faaa4dd1.tar.bz2 phpicalendar-ce366dcff1289fbd3246536dd8cd2215faaa4dd1.zip |
Stage one of redesign.
Diffstat (limited to 'functions/list_months.php')
-rw-r--r-- | functions/list_months.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/functions/list_months.php b/functions/list_months.php new file mode 100644 index 0000000..c532984 --- /dev/null +++ b/functions/list_months.php @@ -0,0 +1,27 @@ +<?php + +ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2); +$this_day = $day_array2[3]; +$this_month = $day_array2[2]; +$this_year = $day_array2[1]; + +print "<form>\n<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value);\">\n"; +$i = 0; +$month_time = mktime (0,0,0,1,$this_day,$this_year); +echo "$this_day, $this_year"; +// build the <option> tags +while ($i != 12) { + $monthdate = date ("Ymd", $month_time); + $select_month = strftime($dateFormat_month, $month_time); + if ($monthdate == $getdate) { + print "<option value=\"month.php?cal=$cal&getdate=$monthdate\" selected>$select_month</option>\n"; + } else { + print "<option value=\"month.php?cal=$cal&getdate=$monthdate\">$select_month</option>\n"; + } + $month_time = strtotime ("+1 month", $month_time); + $i++; +} + +// finish <select> +print "</select>\n</form>"; +?>
\ No newline at end of file |