public function getCMSHTML($startseite = 0, $DomainID = null) { $this->loadMe(); try { $test = new MultiLanguage(-1); $Dom = new Domain($DomainID); $contentLanguage = $Dom->A("DomainDefaultSpracheID"); $userLang = CCMultiLanguage::getUserLanguage(); if ($userLang != null and $userLang->getID() != null and $userLang->getID() != $Dom->A("DomainDefaultSpracheID")) { $contentLanguage = $userLang->getID(); $mL = MultiLanguage::getTranslation($userLang->getID(), "Seite", $this->getID(), "header"); if ($mL != null) { $this->changeA("header", $mL); } } } catch (ClassNotFoundException $e) { } try { new Tracker(-1); Tracker::trackUser($this->ID, $this->A->DomainID, "page"); Tracker::trackPage($this->ID, $this->A->DomainID); } catch (ClassNotFoundException $e) { } $Template = new Template($this->A->TemplateID); $html = $Template->getA()->html; $html = str_replace("%%%HEADER%%%", $this->A("header"), $html); $html = str_replace("%%%DOMAIN%%%", strtolower($_SERVER["HTTP_HOST"]), $html); $html = SeiteGUI::replaceFunctionCalls($html, $this); $Contents = new mContentGUI(); $Contents->addOrderV3("sort", "ASC"); $Contents->addAssocV3("SeiteID", "=", $this->ID); $Contents->addAssocV3("ContentSpracheID", "=", "0", "AND", "2"); if (isset($contentLanguage)) { $Contents->addAssocV3("ContentSpracheID", "=", $contentLanguage, "OR", "2"); } $Contents->lCV3(); $content = ""; while ($C = $Contents->getNextEntry()) { $CGUI = $C->getGUIClass(); $content .= $CGUI->getCMSHTML($this); } if (!isset($_GET["contentOnly"])) { $html = str_replace("%%%CONTENT%%%", $content, $html); } else { $html = $content; } if ($Contents->numLoaded() == 0) { $nS = new SeiteGUI($startseite); } return $Contents->numLoaded() != 0 ? $html : $nS->getCMSHTML(); }