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; }
public function getCMSHTML() { $Template = new Template($this->A->TemplateID); if ($Template->getA() == null) { emoFatalError("multiCMS kann die Seite leider nicht erzeugen", "Das ausgewählte Domain-Template wurde nicht gefunden.<br />Bitte wählen Sie ein neues Template bei der Domain " . $this->A("url") . " (" . $this->A("title") . ") aus", "multiCMS", "./multiCMS"); } #die("The selected domain-template does not exist."); $html = $Template->getA()->html; $navi = new mNavigationGUI(); $Seite = new SeiteGUI($this->seite != 0 ? $this->seite : $this->A->startseite); #$Scripts = new ScriptsGUI(); $Seite->loadMe(); if ($Seite->A("permalink") != "" and !isset($_GET["permalink"]) and $this->A->startseite != $Seite->getID()) { $ex = explode("\n", $this->A("url")); header("HTTP/1.1 301 Moved Permanently"); header("Location: http" . ((isset($_SERVER["HTTPS"]) and $_SERVER["HTTPS"] == "on") ? "s" : "") . "://{$ex['0']}/" . $this->A("permalinkPrefix") . $Seite->A("permalink")); header("Connection: close"); exit; } if ($Seite->getA() == null) { header("HTTP/1.0 404 Not Found"); emoFatalError("Die gesuchte Seite kann leider nicht gefunden werden", "Die Seite, die Sie suchen, existiert nicht (mehr).<br />Vielleicht möchten Sie die Suche auf der <a href=\"/\">Startseite</a> fortsetzen.", "multiCMS", "./multiCMS"); } if (strpos($html, "%%%SEITE%%%") === false) { $html = str_replace("%%%PAGE%%%", $Seite->getCMSHTML($this->A->startseite, $this->ID), $html); } else { $html = str_replace("%%%SEITE%%%", $Seite->getCMSHTML($this->A->startseite, $this->ID), $html); } $metaTagDesc = $Seite->A("metaTagDescription"); if ($metaTagDesc == "") { $StartSeite = new Seite($this->A->startseite); $StartSeite->loadMe(); $metaTagDesc = $StartSeite->A("metaTagDescription"); } $html = str_replace("%%%NAVIGATION%%%", $navi->getCMSHTML(0, $this->seite != 0 ? $this->seite : $this->A->startseite, $this->ID), $html); $html = str_replace("%%%HEADER%%%", $this->A->header, $html); $html = str_replace("%%%TITLE%%%", ($this->A->title != "" ? $this->A->title . " - " : "") . $Seite->A("header"), $html); #$html = str_replace("%%%SCRIPTS%%%",$Scripts->getCMSHTML($this->ID), $html); $html = str_replace("%%%DESCRIPTION%%%", $metaTagDesc, $html); $html = SeiteGUI::replaceFunctionCalls($html, $this); if (isset($_GET["contentOnly"])) { echo $Seite->getCMSHTML($this->A->startseite, $this->ID); } else { echo $html; } }