Index: /trunk/www/dch/dates.php
===================================================================
--- /trunk/www/dch/dates.php	(revision 15405)
+++ /trunk/www/dch/dates.php	(revision 15405)
@@ -0,0 +1,45 @@
+<script type="text/javascript">
+function change (wert)
+{
+    document.formular.date.value=wert;
+}
+</script>
+<?php
+
+function GetDates($date, $name)
+{
+    if (!empty($_GET["date"]))
+        $date=date("Y-m-d", strtotime($_GET["date"]));
+    else
+        $date=date("Y-m-d");
+
+    $plusoneday=date("Y-m-d", strtotime($date." +1 day"));
+    $minusoneday=date("Y-m-d", strtotime($date." -1 day"));
+    $plusoneweek=date("Y-m-d", strtotime($date." +1 week"));
+    $minusoneweek=date("Y-m-d", strtotime($date." -1 week"));
+    $plustwoweeks=date("Y-m-d", strtotime($date." +2 week"));
+    $minustwoweeks=date("Y-m-d", strtotime($date." -2 week"));
+    $plusonemonth=date("Y-m-d", strtotime($date." +1 month"));
+    $minusonemonth=date("Y-m-d", strtotime($date." -1 month"));
+    $plusoneyear=date("Y-m-d", strtotime($date." +1 year"));
+    $minusoneyear=date("Y-m-d", strtotime($date." -1 year"));
+    $today=date("Y-m-d",mktime(0,0,0,date("m"), date("d"), date("Y")));
+
+    printf("<input name='date' type='text' size='10' maxlength='10' value='%s'>\n", $date);
+    echo "<input type='submit' value='Show'>\n";
+    printf("<input type='button' value='Today' onClick='change(\"%s\");submit()'>\n", $today);
+    printf("<input type='button' value='+1Day' onClick='change(\"%s\");submit()'>\n", $plusoneday);
+    printf("<input type='button' value='-1Day' onClick='change(\"%s\");submit()'>\n", $minusoneday);
+    printf("<input type='button' value='+1Week' onClick='change(\"%s\");submit()'>\n", $plusoneweek);
+    printf("<input type='button' value='-1Week' onClick='change(\"%s\");submit()'>\n", $minusoneweek);
+    printf("<input type='button' value='+2Weeks' onClick='change(\"%s\");submit()'>\n", $plustwoweeks);
+    printf("<input type='button' value='-2Weeks' onClick='change(\"%s\");submit()'>\n", $minustwoweeks);
+    printf("<input type='button' value='+1Month' onClick='change(\"%s\");submit()'>\n", $plusonemonth);
+    printf("<input type='button' value='-1Month' onClick='change(\"%s\");submit()'>\n", $minusonemonth);
+    printf("<input type='button' value='+1Year' onClick='change(\"%s\");submit()'>\n", $plusoneyear);
+    printf("<input type='button' value='-1Year' onClick='change(\"%s\");submit()'>\n", $minusoneyear);
+
+    return $date;
+}
+
+?>
