function generComplexDateField($name, $value, $labels, $values, $selected = 0) { global $lll; $s = "<table cellpadding='5' cellspacing='5'><tr><td valign='top'>"; $s .= "<select name='" . $name . "[relative]'>\n"; foreach ($labels as $key => $label) { $values[$key] = htmlspecialchars($values[$key]); $s .= "<option value=\"" . $values[$key] . "\""; if (gettype($selected) == "array" && $selected[$key] || $key == $selected) { $s .= " selected"; } $s .= ">{$label}</option>\n"; } $s .= "</select>,\n <br>{$lll['orSelectConcreteTime']}:</td><td>"; $s .= GenerDateWidget::generDateWidgett($name, $value, "vertical"); $s .= "</td></tr></table>\n"; return $s; }
function generTimeField($attr, $val) { return GenerDateWidget::generSimpleDateField($attr, $this->base->{$attr}, TRUE, $val); }