color != "") $temp.= " color=\"".htmlspecialchars($this->color)."\""; if ($this->opacity != "") $temp.= " opacity=\"".htmlspecialchars($this->opacity)."\""; if ($this->quantity != "") $temp.= " quantity=\"".htmlspecialchars($this->quantity)."\""; if ($this->label != "") $temp.= " label=\"".htmlspecialchars($this->label)."\""; $temp .= " />\n"; return $temp; } /** * creates the html-form-fragment for this object * * @param $id string containing a prefix that should be used to identify this * object's html fields. This must be done, so that the generateObjectFromPost(...) * function can address the fields belonging to this object in the http-post. * * @param string $offset string used for formatting the output * @return string containing the html-form-fragment */ function generateHtmlForm($id, $offset = "") { $temp = ""; $temp .= $offset."\n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset."
\n"; $temp .= $offset." ColormapEntry
\n"; $number = split("_", $id); $number = $number[count($number)-1]; $temp .= $offset." parent."&number=".$number."\">löschen\n"; $temp .= $offset." \n"; $temp .= $offset."
\n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." color).";\" "; $temp .= "onClick=\"window.open('sld_pick_color.php?id=".$id."_color','Farbauswahl','width=299, height=194, resizable=no');\">\n"; $temp .= $offset." color)."\">\n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset."
\n"; $temp .= $offset." Color:\n"; $temp .= $offset."
\n"; $temp .= $offset." Opacity:\n"; $temp .= $offset." \n"; $temp .= $offset." opacity)."\">\n"; $temp .= $offset."
\n"; $temp .= $offset." Quantity:\n"; $temp .= $offset." \n"; $temp .= $offset." quantity)."\">\n"; $temp .= $offset."
\n"; $temp .= $offset." Label:\n"; $temp .= $offset." \n"; $temp .= $offset." label)."\">\n"; $temp .= $offset."
\n"; $temp .= $offset."
\n"; return $temp; } /** * populates the member fields of a new object from the data in the http-post-request * to rebuild the object after the submission of the html-form. * * creates its own child objects from the post parameters and calls their * generateObjectFromPost(...) function * * @param string $id string that contains a prefix for the html-form-fields * that is common to all of the fields belonging to this object */ function generateObjectFromPost($id = "") { if (isset($_REQUEST[$id."_color"])) { $this->color = $_REQUEST[$id."_color"]; } if (isset($_REQUEST[$id."_opacity"])) { $this->opacity = $_REQUEST[$id."_opacity"]; } if (isset($_REQUEST[$id."_quantity"])) { $this->quantity = $_REQUEST[$id."_quantity"]; } if (isset($_REQUEST[$id."_label"])) { $this->label = $_REQUEST[$id."_label"]; } } } ?>