public static function SeiteParser($w, $l, $p) { $Seite = new Seite($w); $Seite->loadMe(); $aC = new anyC(); $aC->setCollectionOf("Seite"); $aC->setFieldsV3(array("IF(name = '', header, name) AS name")); $aC->addAssocV3("DomainID", "=", $p); $select = "\n\t\t<ul style=\"list-style-image:none;list-style-type:none;\">"; #$select .= NavigationGUI::getOption(-1, "Neue Seite erstellen", $w, "./images/i2/new.gif"); $select .= NavigationGUI::getOption(0, "Keine Seite", $w, "./images/i2/stop.png", "margin-bottom:5px;"); while ($s = $aC->getNextEntry()) { $select .= NavigationGUI::getOption($s->getID(), $s->A("name"), $w); } $label = $Seite->A("name") == "" ? $Seite->A("header") : $Seite->A("name"); if ($Seite->getA() == null) { $label = "Seite unbekannt"; } #if($w == -1) $label = "Neue Seite erstellen"; if ($w == 0) { $label = "Keine Seite"; } $select .= "\n\t\t</ul>"; $html = "\n\t\t<input type=\"hidden\" value=\"{$w}\" name=\"SeiteID\" />\n\t\t\n\t\t<div onclick=\"if(\$('pageSelection').style.display == 'none') new Effect.BlindDown('pageSelection', { duration: 0.3 }); else new Effect.BlindUp('pageSelection', { duration: 0.3 });\"\n\t\t\tstyle=\"background-image:url(./images/i2/go-down.png);background-repeat:no-repeat;background-position:99% 2px;width:246px;padding:3px;border-bottom-style:dotted;border-bottom-width:1px;\" class=\"borderColor1 backgroundColor0\">\n\t\t\t<span id=\"selectedPage\">{$label}</span>\n\t\t</div>\n\t\t<div id=\"pageSelection\" class=\"backgroundColor0 borderColor1\" style=\"border-width:1px;border-style:solid;border-top-width:0px;position:absolute;display:none;width:250px;\">\n\t\t\t<div style=\"overflow:auto;height:150px;\">\n\t\t\t{$select}\n\t\t\t</div>\n\t\t</div>"; return $html; }