diff --git a/phplib/of_checkbox.inc b/phplib/of_checkbox.inc
index a20aab9..e04b948 100644
--- a/phplib/of_checkbox.inc
+++ b/phplib/of_checkbox.inc
@@ -1,90 +1,90 @@
setup_element($a);
}
function self_get($val, $which, &$count) {
$str = "";
if ($this->multiple) {
$n = $this->name . "[]";
$str .= "value)) {
reset($this->value);
while (list($k,$v) = each($this->value)) {
if ($v==$val) {
$str .= " checked";
break;
}
}
}
} else {
$str .= "checked)
$str .= " checked";
}
if ($this->extrahtml)
$str .= " $this->extrahtml";
$str .= ">\n";
$count = 1;
return $str;
}
function self_get_frozen($val, $which, &$count) {
$str = "";
$x = 0;
$t="";
if ($this->multiple) {
$n = $this->name . "[]";
if (is_array($this->value)) {
reset($this->value);
while (list($k,$v) = each($this->value)) {
if ($v==$val) {
$x = 1;
$str .= "\n";
$t =" bgcolor=#333333";
break;
}
}
}
} else {
if ($this->checked) {
$x = 1;
$t = " bgcolor=#333333";
$str .= "multiple)
$this->value = $val;
elseif (isset($val) && (!$this->value || $val==$this->value))
$this->checked=1;
else
$this->checked=0;
}
} // end CHECKBOX
?>
diff --git a/phplib/of_file.inc b/phplib/of_file.inc
index 41dce81..859195d 100644
--- a/phplib/of_file.inc
+++ b/phplib/of_file.inc
@@ -1,31 +1,31 @@
setup_element($a);
}
function self_get($val,$which, &$count) {
$str = "";
$str .= "size>\n";
$str .= "extrahtml)
$str .= " $this->extrahtml";
$str .= ">";
$count = 2;
return $str;
}
} // end FILE
diff --git a/phplib/of_radio.inc b/phplib/of_radio.inc
index 9fbdb83..45eeaac 100644
--- a/phplib/of_radio.inc
+++ b/phplib/of_radio.inc
@@ -1,75 +1,75 @@
setup_element($a);
}
function self_get($val, $which, &$count) {
$str = "";
$str .= "extrahtml)
$str .= " $this->extrahtml";
if ($this->value==$val)
$str .= " checked";
$str .= ">";
$count = 1;
return $str;
}
function self_get_frozen($val,$which, &$count) {
$str = "";
$x = 0;
if ($this->value==$val) {
$x = 1;
$str .= "\n";
$str .= "
";
} else {
$str .= "\n";
$count = $x;
return $str;
}
function self_get_js($ndx_array) {
$str = "";
if ($this->valid_e) {
$n = $this->name;
- $str .= "var l = f.${n}.length;\n";
+ $str .= "var l = f.$n.length;\n";
$str .= "var radioOK = false;\n";
$str .= "for (i=0; ivalid_e\");\n";
$str .= " return(false);\n";
$str .= "}\n";
}
}
function self_validate($val) {
if ($this->valid_e && !isset($val)) return $this->valid_e;
return false;
}
} // end RADIO
?>
diff --git a/phplib/of_select.inc b/phplib/of_select.inc
index 5756eae..efe7b9f 100644
--- a/phplib/of_select.inc
+++ b/phplib/of_select.inc
@@ -1,114 +1,110 @@
setup_element($a);
if ($a["type"]=="select multiple") $this->multiple=1;
}
function self_get($val,$which, &$count) {
$str = "";
if ($this->multiple) {
$n = $this->name . "[]";
$t = "select multiple";
} else {
$n = $this->name;
$t = "select";
}
$str .= "<$t name='$n'";
if ($this->size)
$str .= " size='$this->size'";
if ($this->multiple)
$str .= "multiple='multiple'";
if ($this->extrahtml)
$str .= " $this->extrahtml";
$str .= ">";
- reset($this->options);
- while (list($k,$o) = each($this->options)) {
+ foreach ($this->options as $k=>$o) {
$str .= "
\n";
$count = 1;
return $str;
}
} // end TEXTAREA
?>