- if($ymax > $ymin) {
- for($x = $ymax; $x >= $ymin; $x --) {
- $sel = (($x == $y) ? " selected=\"selected\" " : "");
- $o .= "<option value=\"$x\" $sel>$x</option>";
- }
- }
- else {
- for($x = $ymax; $x <= $ymin; $x ++) {
- $sel = (($x == $y) ? " selected=\"selected\" " : "");
- $o .= "<option value=\"$x\" $sel>$x</option>";
- }
- }
+ if(strlen($f)) {
+ for($z = 0; $z < strlen($f); $z ++) {
+ if($f[$z] === 'y') {
+
+ $o .= "<select name=\"{$pre}year\" class=\"{$pre}year\" size=\"1\">";
+ if($allow_blank) {
+ $sel = (($y == '0000') ? " selected=\"selected\" " : "");
+ $o .= "<option value=\"0000\" $sel ></option>";
+ }
+
+ if($ymax > $ymin) {
+ for($x = $ymax; $x >= $ymin; $x --) {
+ $sel = (($x == $y) ? " selected=\"selected\" " : "");
+ $o .= "<option value=\"$x\" $sel>$x</option>";
+ }
+ }
+ else {
+ for($x = $ymax; $x <= $ymin; $x ++) {
+ $sel = (($x == $y) ? " selected=\"selected\" " : "");
+ $o .= "<option value=\"$x\" $sel>$x</option>";
+ }
+ }
+ }
+ elseif($f[$z] == 'm') {