0) { $var = $match[1]; } $text .= $var; } } function PGVRTitleSHandler() { // @deprecated // global $report_array, $text; global $text; $text = ""; } function PGVRTitleEHandler() { global $report_array, $text; $report_array["title"] = $text; $text = ""; } function PGVRDescriptionEHandler() { global $report_array, $text; $report_array["description"] = $text; $text = ""; } function PGVRInputSHandler($attrs) { global $input, $text; $text =""; $input = array(); $input["name"] = ""; $input["type"] = ""; $input["lookup"] = ""; $input["default"] = ""; $input["value"] = ""; $input["options"] = ""; if (isset($attrs["name"])) { $input["name"] = $attrs["name"]; } if (isset($attrs["type"])) { $input["type"] = $attrs["type"]; } if (isset($attrs["lookup"])) { $input["lookup"] = $attrs["lookup"]; } if (isset($attrs["default"])) { if ($attrs["default"]=="NOW") { $input["default"] = date("d M Y"); } else { $match = array(); if (preg_match("/NOW\s*([+\-])\s*(\d+)/", $attrs['default'], $match)>0) { $plus = 1; if ($match[1]=="-") { $plus = -1; } $input["default"] = date("d M Y", time()+$plus*60*60*24*$match[2]); } else { $input["default"] = $attrs["default"]; } } } if (isset($attrs["options"])) { $input["options"] = $attrs["options"]; } } function PGVRInputEHandler() { global $report_array, $text, $input; $input["value"] = $text; if (!isset($report_array["inputs"])) { $report_array["inputs"] = array(); } $report_array["inputs"][] = $input; $text = ""; } ?>