echo ">$text\n";
}
+ function datepicker($name, $value = null, $past = true, $past_picker = null, $future = true, $future_picker = null) {
+ $id = "datepicker_$name";
+ echo "<script>\n $(function() {\n";
+ echo " $(\"#$id\").datepicker({\n";
+ /*
+ If this is the "to" picker in a date range, restrict the end date of the
+ "from" picker to be the date selected by this picker.
+ */
+ if (isset($past_picker)) {
+ echo " onClose: function(selectedDate) {\n";
+ echo " $(\"#datepicker_$past_picker\").datepicker(\"option\", \"maxDate\", selectedDate);\n";
+ echo " },\n";
+ }
+ /*
+ If this is the "from" picker in a date range, restrict the start date of
+ the "to" picker to be the date selected by this picker.
+ */
+ if (isset($future_picker)) {
+ echo " onClose: function(selectedDate) {\n";
+ echo " $(\"#datepicker_$future_picker\").datepicker(\"option\", \"minDate\", selectedDate);\n";
+ echo " },\n";
+ }
+ echo " changeMonth: true,\n";
+ echo " changeYear: true,\n";
+ echo " dateFormat: 'yy-mm-dd',\n";
+ /* Are we allowed to show dates earlier than today? */
+ if (! $past) echo " minDate: 0,\n";
+ /* Are we allowed to show dates later than today? */
+ if (! $future) echo " maxDate: 0,\n";
+ echo " showButtonPanel: true\n";
+ echo " });\n });</script>";
+ echo "<input name=\"$name\" id=\"$id\"";
+ echo " maxlength=10 size=10";
+ if (isset($value)) echo " value=\"$value\"";
+ else echo " value=\"" . $_POST[$name] . "\"";
+ echo "><em class=\"small\">(Y-m-d)</em>";
+ }
+
?>
<head>
<link rel="stylesheet" type="text/css" href="/style.css">
<title><?php echo "$charity"; if ($module) echo " - $module"; ?></title>
+<?php
+ echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css\">\n";
+ echo "<script src=\"$http://code.jquery.com/jquery-1.9.1.js\"></script>\n";
+ echo "<script src=\"$http://code.jquery.com/ui/1.10.3/jquery-ui.js\"></script>\n";
+?>
</head>
<body>
else $module = strtolower($module);
#echo "request: $request; module: $module; params: " . print_r($parameters, true);
+ $http = (isset($_SERVER['HTTPS'])) ? "https" : "http";
$username = $_SERVER['REMOTE_USER'];
include_once("$lib_root/constants.php");
include_once("$lib_root/functions.php");