\n"; foreach ($this->externalgraphicsormarks as $externalgraphicormark) { $temp .= $externalgraphicormark->generateXml($offset." "); } if ($this->opacity != "") $temp .= $offset." ".htmlspecialchars($this->opacity)."\n"; if ($this->size != "") $temp .= $offset." ".htmlspecialchars($this->size)."\n"; if ($this->rotation != "") $temp .= $offset." ".htmlspecialchars($this->rotation)."\n"; $temp .= $offset."\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."\n"; $temp .= $offset."Graphic:\n"; $temp .= $offset."\n"; $temp .= $offset."
\n"; $temp .= $offset."\n"; $temp .= $offset."parent."\">"; $temp .= $offset."Rule löschen löschen"; $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." \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." Opacity:\n"; $temp .= $offset." \n"; $temp .= $offset." opacity)."\">\n"; $temp .= $offset."
\n"; $temp .= $offset." Size:\n"; $temp .= $offset." \n"; $temp .= $offset." size)."\">\n"; $temp .= $offset."
\n"; $temp .= $offset." Rotation:\n"; $temp .= $offset." \n"; $temp .= $offset." rotation)."\">\n"; $temp .= $offset."
\n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset."  \n"; $temp .= $offset."
\n"; $externalgraphicormark_id = 0; foreach ($this->externalgraphicsormarks as $externalgraphicormark) { $temp .= $externalgraphicormark->generateHtmlForm($id."_externalgraphicormark_".$externalgraphicormark_id, $offset.""); $externalgraphicormark_id++; } $temp .= $offset."
\n"; $temp .= $offset."\n"; $temp .= $offset." \n"; $temp .= $offset."  \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 = "") { $countExternalGraphicsOrMarks = 0; while (isset($_REQUEST[$id."_externalgraphicormark_".$countExternalGraphicsOrMarks])) { $externalgraphicormark = ""; if ($_REQUEST[$id."_externalgraphicormark_".$countExternalGraphicsOrMarks] == "mark") { $externalgraphicormark = new Mark(); } else if ($_REQUEST[$id."_externalgraphicormark_".$countExternalGraphicsOrMarks] == "externalgraphic") { $externalgraphicormark = new ExternalGraphic(); } $externalgraphicormark->generateObjectFromPost($id."_externalgraphicormark_".$countExternalGraphicsOrMarks); $this->externalgraphicsormarks[] = $externalgraphicormark; $countExternalGraphicsOrMarks++; } if (isset($_REQUEST[$id."_opacity"])) { $this->opacity = $_REQUEST[$id."_opacity"]; } if (isset($_REQUEST[$id."_size"])) { $this->size = $_REQUEST[$id."_size"]; } if (isset($_REQUEST[$id."_rotation"])) { $this->rotation = $_REQUEST[$id."_rotation"]; } } function addExternalGraphicOrMark($externalgraphicormark) { if ($externalgraphicormark == "externalgraphic") { $this->externalgraphicsormarks[] = new ExternalGraphic(); } else if ($externalgraphicormark == "mark") { $test = new Mark(); $this->externalgraphicsormarks[] = $test; } } function deleteExternalGraphicOrMark($index) { array_splice($this->externalgraphicsormarks, $index, 1); } } ?>