Exemple #1
0
 public function getHTML($id)
 {
     $this->addOrderV3("name");
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $singularLanguageClass = $this->loadLanguageClass("Userdata");
     $text = $singularLanguageClass != null ? $singularLanguageClass->getText() : "";
     $gui = new HTMLGUI();
     $gui->setName("Benutzereinschränkungen");
     if ($this->collector != null) {
         $gui->setAttributes($this->collector);
     }
     $gui->hideAttribute("UserID");
     $gui->hideAttribute("wert");
     $gui->hideAttribute("UserdataID");
     $gui->hideAttribute("typ");
     $gui->setDeleteInDisplayMode(true);
     $gui->setCollectionOf($this->collectionOf);
     $gui->setIsDisplayMode(true);
     $gui->setParser("name", "mUserdataGUI::nameParser", array("\$sc->wert"));
     $html = "\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td class=\"backgroundColor3\"><input type=\"button\" style=\"background-image:url(./images/navi/seiten.png);\" class=\"bigButton backgroundColor2\" value=\"" . (isset($text["copy"]) ? $text["copy"] : "von Benutzer\nkopieren") . "\" onclick=\"phynxContextMenu.start(this, 'mUserdata','copyFromUser','kopieren:', 'right', 'up');\" /></td>\n\t\t\t</tr>\n\t\t</table>";
     $gui->addRowAfter("1", "addRestriction");
     $gui->setParser("addRestriction", "mUserdataGUI::addRestrictionParser");
     $gui->setJSEvent("onDelete", "function(){ contentManager.reloadFrame('contentLeft'); }");
     try {
         return "<div class=\"prettyTitle\">Rechte</div>" . $gui->getBrowserHTML($id) . ($this->numLoaded() == 0 ? $html : "");
     } catch (Exception $e) {
         echo $e;
     }
 }
 function getHTML($id, $page)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck("Templates");
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     if ($U == null) {
         $t = new HTMLTable(1);
         $t->addRow("Sie haben keine Domain ausgewählt.<br /><br />Bitte wählen Sie eine Domain im Domain-Plugin, indem Sie auf das graue Kästchen in der Liste auf der rechten Seite klicken.");
         return $t->getHTML();
     }
     $this->addAssocV3("TemplateDomainID", "=", $U);
     $this->addAssocV3("TemplateDomainID", "=", "0", "OR");
     $this->addOrderV3("templateType", "ASC");
     #if($this->A == null) $this->lCV3($id);
     $gui->showFilteredCategoriesWarning($this->filterCategories(), $this->getClearClass());
     $gesamt = $this->loadMultiPageMode($id, $page, 0);
     $gui->setMultiPageMode($gesamt, $page, 0, "contentRight", str_replace("GUI", "", get_class($this)));
     $gui->setName("Template");
     if ($this->collector != null) {
         $gui->setAttributes($this->collector);
     }
     $gui->setShowAttributes(array("aktiv", "name"));
     $gui->setParser("aktiv", "TemplatesGUI::aktivParser", array("\$aid"));
     $gui->setColWidth("aktiv", "20px");
     $gui->setDisplayGroup("templateType", $this->getAvailableCategories());
     $gui->setCollectionOf($this->collectionOf);
     try {
         return $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
Exemple #3
0
 public function getHTML($id, $page)
 {
     $this->addAssocV3("DateiClassID", "=", $this->classID);
     $this->addAssocV3("DateiClass", "=", $this->className);
     $this->lCV3($id);
     $gui = new HTMLGUI();
     $gui->setName("Dateien");
     $gui->setAttributes($this->collector);
     $gui->setCollectionOf($this->collectionOf);
     $gui->setShowAttributes(array("DateiName"));
     $gui->setParser("DateiName", "mDateiGUI::nameParser", array("\$DateiPath", "\$DateiIsDir", "\$DateiSize"));
     $gui->setIsDisplayMode(true);
     if (!$this->viewOnly) {
         $gui->setDeleteInDisplayMode(true);
     }
     $t = new HTMLTable(1);
     if ($this->classID != null and !$this->viewOnly) {
         $B = new Button("Datei\nhinzufügen", "computer");
         $B->select(true, "mFile", $this->onAddClass != null ? $this->onAddClass : "'+lastLoadedLeftPlugin+'", $this->classID, "addFile");
         $B->customSelect("contentRight", $this->classID, "mFile", "{$this->onAddClass}.addFile");
         $t->addRow($B);
         #$t->addRow(array("<input onclick=\"loadFrameV2('contentRight','mFile','mFileGUI;selectionMode:multiSelection,".($this->onAddClass != null ? $this->onAddClass : "'+lastLoadedLeftPlugin+'").",$this->classID,addFile,'+lastLoadedRightPlugin+',".($this->onReloadFrame != null ? $this->onReloadFrame : "contentLeft").",".($this->onReloadClass != null ? $this->onReloadClass : "'+lastLoadedLeftPlugin+'").",".($this->onReloadID != null ? $this->onReloadID : $this->classID)."');\" type=\"button\" class=\"backgroundColor3 bigButton\" style=\"background-image:url(./images/navi/computer.png);\" value=\"Datei\nhinzufügen\" />"));
     }
     $gui->setJSEvent("onDelete", $this->onDeleteFunction == null ? "function() { contentManager.reloadFrame('contentLeft'); }" : $this->onDeleteFunction);
     try {
         if ($this->viewOnly and $this->numLoaded() == 0) {
             return "";
         }
         return $t->getHTML() . $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
Exemple #4
0
 public function getHTML($id)
 {
     $gui = new HTMLGUI();
     $this->addOrderV3("FhemEventID");
     $this->lCV3($id);
     $gui->setName("Presets");
     $gui->setObject($this);
     $gui->setShowAttributes(array("FhemName", "FhemEventAction"));
     $gui->setIsDisplayMode(true);
     $gui->setDeleteInDisplayMode(true);
     $gui->setJSEvent("onDelete", "function(){ contentManager.reloadFrameLeft(); }");
     #$gui->addColStyle("FhemEventNightOnly","width:20px;");
     $gui->setParser("FhemEventAction", "mFhemEventGUI::ActionParser", array("\$FhemEventID", "\$FhemID", "\$FhemEventFhemID"));
     $gui->setParser("FhemName", "mFhemEventGUI::nameParser", array("\$FhemEventFhemID"));
     #$gui->setParser("FhemEventNightOnly","mFhemEventGUI::NightParser",array("\$FhemEventKategorieID"));
     try {
         return $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
 public function getHTML($id)
 {
     $allowedUsers = Environment::getS("allowedUsers", null);
     $this->addOrderV3("name");
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $up = new anyC();
     $up->setCollectionOf("User");
     $up->addAssocV3("password", "!=", ";;;-1;;;");
     $up->lCV3();
     if ($up->numLoaded() > 0 and $id == -1) {
         return "\n\t\t<table>\n\t\t\t<colgroup>\n\t\t\t\t<col class=\"backgroundColor3\" />\n\t\t\t</colgroup>\n\t\t\t<tr>\n\t\t\t\t<td><input onclick=\"rme('Users','','convertPasswords','','contentManager.reloadFrameRight();');\" type=\"button\" style=\"float:right;background-image:url(./images/navi/keys.png);\" class=\"bigButton backgroundColor2\" value=\"Passwörter\nkonvertieren\" />In Ihrer Datenbank befinden sich noch unkonvertierte Passwörter.</td>\n\t\t\t</tr>\n\t\t</table>";
     }
     $T = new HTMLTable(1, "Application Server");
     $I = new HTMLInput("AppServer", "text", mUserdata::getGlobalSettingValue("AppServer", ""));
     $I->onEnter("contentManager.rmePCR('Users', '-1', 'saveAppServer', [this.value], ' ');");
     if ($allowedUsers === null) {
         $T->addRow($I . "<br /><small>Wenn Sie einen Application Server bertreiben, tragen Sie hier bitte die URL ein, um die Benutzer mit diesem Server zu authorisieren.</small>");
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Benutzer");
     $gui->setCollectionOf($this->collectionOf, "Benutzer");
     #$gui->setObject($this);
     $gui->setParser("isAdmin", "UsersGUI::isAdminParser");
     $gui->setColWidth("isAdmin", "20px");
     #$gui->hideAttribute("password");
     #$gui->hideAttribute("SHApassword");
     #$gui->hideAttribute("language");
     $gui->setShowAttributes(array("name", "username", "isAdmin"));
     $g = "";
     if (strstr($_SERVER["SCRIPT_FILENAME"], "demo")) {
         $UA = $_SESSION["S"]->getCurrentUser()->getA();
         if ($UA->name != "Installations-Benutzer") {
             $g = "In der Demo können keine Benutzer geändert werden!";
             $gui->setIsDisplayMode(true);
         }
     }
     $TR = new HTMLTable(1);
     if ($allowedUsers !== null and $id == -1) {
         $B = new Button("", "notice", "icon");
         $B->style("float:left;margin-right:10px;");
         $TR->addRow(array($B . "Bitte beachten Sie: Sie können insgesamt {$allowedUsers} Benutzer ohne Admin-Rechte anlegen."));
     }
     $gui->customize($this->customizer);
     return $TR . $g . $gui->getBrowserHTML($id) . ($id == -1 ? $T : "");
 }
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Domain");
     if ($id != -1) {
         $Seiten = new SeitenGUI();
         $Seiten->addAssocV3("DomainID", "=", $this->getID());
         $Seiten->setFieldsV3(array("SeiteID", "IF(name = '', header , name) AS name"));
         $gui->selectWithCollection("startseite", $Seiten, "name");
     } else {
         $gui->setParser("startseite", "DomainGUI::startseiteParser");
     }
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "domainTemplate");
     $gui->selectWithCollection("TemplateID", $T, "name");
     $gui->setStandardSaveButton($this);
     #$gui->setSaveButtonValues(get_parent_class($this),$this->ID,"Domains");
     $gui->setShowAttributes(array("TemplateID", "url", "DomainDefaultSpracheID", "startseite", "title", "header", "umleitung", "permalinkPrefix", "horizontalNav"));
     if (Session::isPluginLoaded("mSprache")) {
         $mS = new anyC();
         $mS->setCollectionOf("Sprache");
         $gui->selectWithCollection("DomainDefaultSpracheID", $mS, "SpracheIdentifier", "keine Auswahl");
     } else {
         $gui->setType("DomainDefaultSpracheID", "hidden");
     }
     $gui->setLabel("DomainDefaultSpracheID", "Sprache");
     $gui->setLabel("url", "Domains");
     $gui->setLabel("title", "Titelzeile");
     $gui->setLabel("header", "Header");
     $gui->setLabel("permalinkPrefix", "Permalink-Präfix");
     $gui->setLabel("horizontalNav", "horizontale Navigation");
     $gui->setType("horizontalNav", "checkbox");
     $gui->setFieldDescription("horizontalNav", "Subkategorien in der Navigation werden nicht zwischen den Einträgen angezeigt sondern am Ende angehängt.");
     $gui->setFieldDescription("umleitung", "<b>www-Umleitung</b><br />Anfragen an Adressen ohne www-Subdomain werden auf die www-subdomain umgeleitet. Also es würde http://example.com an http://www.example.com umgeleitet. Nicht jedoch http://test.example.com<br /><br /><b>erster Eintrag</b><br />Alle Anfragen werden auf den ersten Eintrag der Liste umgeleitet.");
     $gui->setType("umleitung", "select");
     $gui->setOptions("umleitung", array("0", "1", "2"), array("keine", "www-Umleitung", "erster Eintrag"));
     $gui->setType("url", "textarea");
     $gui->setFieldDescription("url", "geben Sie eine Domain pro Zeile an oder * für eine beliebige Domain");
     $tab = new HTMLTable(1);
     $tab->addRow("Das Permalink-Präfix wird vor den Permalink geschrieben, wenn er für eine Seite eingetragen wurde.<br /><br />Wenn Sie also \"page-\" als Präfix angeben, wird der Permalink für die Startseite so aussehen (wenn der Permalink für die Startseite \"Startseite\" lautet) page-Startseite.<br /><br />Sie müssen diesen Permalink dann noch mit mod_rewrite umschreiben. Mit präfix \"page-\" dann zum Beispiel:<pre style=\"font-size:9px;\">RewriteEngine on\nRewriteRule ^page-([a-zA-Z0-9-_]*)\$ ?permalink=\$1</pre>");
     return $gui->getEditHTML() . $tab;
 }
 function getHTML($id)
 {
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $gui = new HTMLGUI();
     $gui->VersionCheck("Domains");
     $gui->setObject($this);
     $gui->setName("Domains");
     #if($this->collector != null) $gui->setAttributes($this->collector);
     $gui->setShowAttributes(array("url"));
     $gui->setCollectionOf($this->collectionOf);
     $gui->setParser("url", "DomainsGUI::urlParser", array("\$aid"));
     $gui->customize($this->customizer);
     try {
         return $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
 function getHTML($id)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck("Seiten");
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     if ($U == null) {
         $t = new HTMLTable(1);
         $t->addRow("Sie haben keine Domain ausgewählt.<br /><br />Bitte wählen Sie eine Domain im Domain-Plugin, indem Sie auf das graue Kästchen in der Liste auf der rechten Seite klicken.");
         return $t->getHTML();
     }
     $this->addOrderV3("TemplateID");
     $this->addOrderV3("SeiteID");
     if ($U != null) {
         $this->addAssocV3("DomainID", "=", $U);
     }
     $this->addAssocV3("DomainID", "=", "0", "OR");
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $gui->setName("Seite");
     $gui->setObject($this);
     $gui->setShowAttributes(array("SeiteID", "name"));
     $gui->setJSEvent("onNew", "function() { contentManager.reloadFrameRight(); }");
     $gui->addColStyle("SeiteID", "width:40px;text-align:right;");
     $gui->setParser("name", "SeitenGUI::nameParser", array("\$aid", "\$header"));
     $gui->setDisplayGroup("TemplateID");
     $gui->setDisplayGroupParser("SeitenGUI::DGParser");
     $gui->setCollectionOf($this->collectionOf);
     $gui->customize($this->customizer);
     try {
         return $gui->getBrowserHTML($id);
     } catch (Exception $e) {
         print_r($e);
     }
 }
 function getHTML($id)
 {
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     $this->loadMeOrEmpty();
     if ($id == -1 and $U != null) {
         $this->A->DomainID = $U;
         $this->A->sort = -1;
         $this->A->SeiteID = -1;
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Navigation");
     $N = new mNavigation();
     $N->addAssocV3("NavigationID", "!=", $this->ID);
     $N->addAssocV3("DomainID", "=", $U);
     //$gui->selectWithCollection("DomainID", new Domains(), "url");
     $gui->selectWithCollection("parentID", $N, "name", "kein übergeordnetes Element");
     #$gui->setType("parentID","hidden");
     #$gui->selectWithCollection("SeiteID", $aC, "name");
     /*$aC = new anyC();
     		$aC->setCollectionOf("Seite");
     		$aC->setFieldsV3(array("IF(name = '', header, name) AS name"));
     		$aC->addAssocV3("DomainID","=",$this->A->DomainID);
     		
     		$pages = array();
     		while($s = $aC->getNextEntry()){
     			$pages[$s->getID()] = $s->A("name");
     		}
     
     		$gui->setType("SeiteID","select");
     		$gui->setOptions("SeiteID", array_keys($pages), array_values($pages));*/
     $gui->setParser("SeiteID", "NavigationGUI::SeiteParser", array($this->A->DomainID));
     $gui->setType("DomainID", "hidden");
     $gui->insertSpaceAbove("activeTemplateID");
     $gui->insertSpaceAbove("linkType");
     $gui->insertSpaceAbove("hidden", "Optionen", true);
     $gui->setType("sort", "hidden");
     $gui->setLabel("httpsLink", "Https-Link?");
     $gui->setType("httpsLink", "checkbox");
     $gui->setLabel("activeTemplateID", "Link aktiv");
     $gui->setLabel("inactiveTemplateID", "Link inaktiv");
     $gui->setLabel("DomainID", "Domain");
     $gui->setLabel("SeiteID", "Seite");
     $gui->setLabel("parentID", "Vaterelement");
     /*if($this->A->linkType == "cmsPage" OR $id == -1)
     			$gui->setLineStyle("linkURL","display:none;");
     		else*/
     $gui->setLineStyle("SeiteID", "display:none;");
     $gui->setLineStyle("linkURL", "display:none;");
     $gui->setLineStyle("inactiveTemplateID", "display:none;");
     $gui->setLineStyle("activeTemplateID", "display:none;");
     if ($this->A->linkType == "cmsPage" or $id == -1) {
         $gui->setLineStyle("SeiteID", "");
         $gui->setLineStyle("inactiveTemplateID", "");
         $gui->setLineStyle("activeTemplateID", "");
     } else {
         if ($this->A->linkType == 'url') {
             $gui->setLineStyle("linkURL", "");
             $gui->setLineStyle("inactiveTemplateID", "");
         } else {
             if ($this->A->linkType == 'HTML') {
                 $gui->setLineStyle("activeTemplateID", "");
             } else {
                 if ($this->A->linkType == 'separator') {
                 }
             }
         }
     }
     if (Session::isPluginLoaded("mMultiLanguage")) {
         $gui->activateFeature("addAnotherLanguageButton", $this, "name");
     }
     $gui->setLabel("linkType", "Link-Typ");
     $gui->setInputJSEvent("linkType", "onchange", "Website.set(this)");
     $gui->setLabel("linkURL", "Link-URL");
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "naviTemplate");
     $gui->selectWithCollection("activeTemplateID", $T, "name");
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "naviTemplate");
     $gui->selectWithCollection("inactiveTemplateID", $T, "name");
     $gui->setLabel("hidden", "versteckt");
     $gui->setFieldDescription("hidden", "Der Menüpunkt wird auf der Seite nicht angezeigt");
     $gui->setType("hidden", "checkbox");
     #$gui->insertSpaceAbove("parentID");
     $gui->setLabel("displaySub", "Unterkat. immer anzeigen");
     $gui->setFieldDescription("displaySub", "Blendet die Unterkategorien immer ein, auch wenn der Menüpunkt nicht ausgewählt ist.");
     $gui->setType("displaySub", "checkbox");
     #$gui->setType("displaySub","hidden");
     $gui->setFieldDescription("httpsLink", "Erzeugt einen https://...-Link");
     $gui->setType("linkType", "select");
     #$gui->setOptions("linkType", array("cmsPage", "url", "separator"), array("multiCMS-Seite", "URL", "Trennlinie"));
     $gui->setOptions("linkType", array("cmsPage", "url", "separator", "HTML"), array("multiCMS-Seite", "URL", "Trennlinie", "Template-HTML"));
     if ($id == -1) {
         $gui->setJSEvent("onSave", "function() { \$('contentLeft').update(); contentManager.reloadFrameRight(); }");
     } else {
         $gui->setJSEvent("onSave", "function() { contentManager.reloadFrameRight(); }");
     }
     $gui->setStandardSaveButton($this);
     #$gui->setSaveButtonValues(get_parent_class($this),$this->ID,"mNavigation");
     return $gui->getEditHTML();
 }
 function getHTML($id)
 {
     $this->addOrderV3("PatchID");
     $this->lCV3($id);
     $gui = new HTMLGUI();
     $gui->setName("Updates");
     $gui->setAttributes($this->collector);
     $gui->setCollectionOf($this->collectionOf, "Update");
     $gui->setShowAttributes(array("PatchDescription", "PatchExecuted"));
     $gui->setParser("PatchExecuted", "Util::catchParser");
     $gui->setParser("PatchDescription", "mPatchGUI::descriptionParser");
     #$gui->setIsDisplayMode(true);
     #$gui->setEditInDisplayMode(true,"contentLeft");
     #$gui->setDeleteInDisplayMode(false);
     $BXML = new Button("XML\nerzeugen", "empty");
     $BXML->style("float:right;");
     $BXML->windowRme("mPatch", "-1", "getXML", "");
     if (strpos($_SERVER["SCRIPT_FILENAME"], "/nemiah") === false) {
         $BXML = "";
     }
     $BU = new Button("Updates\naktualisieren", "refresh");
     $BU->rmePCR("mPatch", "-1", "update", "", "function(transport){ if(transport.responseText != 'error') " . OnEvent::reload("Right") . " else new Effect.BlindDown('errorMessage'); }");
     $T = new HTMLTable(1, "Einzelne Aktualisierungen");
     $T->addRow(array($BU . $BXML . "\n\t\t\t\t\t<div id=\"errorMessage\" style=\"display:none;color:red;\">Es konnte keine Verbindung zum Updates-Server hergestellt werden.<br />Bitte stellen Sie folgende Voraussetzungen sicher:\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>Der Server mit Ihrer Installation kann eine Verbindung ins Internet aufbauen.</li>\n\t\t\t\t\t\t<li>Sie benutzen die aktuellste Version des Update-Plugins.</li>\n\t\t\t\t\t</ul></div>"));
     $html = OnEvent::script("var Patch = { popup: { 'width':600, 'hPosition': 'center', hasX: false } }") . $T;
     /*"
     		<table>
     			<colgroup>
     				<col class=\"backgroundColor3\" />
     			</colgroup>
     			<tr>
     				<td>
     					".(strpos($_SERVER["SCRIPT_FILENAME"], "/nemiah") !== false ? "<input
     						style=\"float:right;\"
     						onclick=\"windowWithRme('mPatch','','getXML','');\"
     						type=\"button\"
     						class=\"bigButton backgroundColor2\"
     						value=\"XML\nerzeugen\"
     					/>" : "")."
     					<input
     						style=\"background-image:url(./images/navi/refresh.png);\"
     						onclick=\"rme('mPatch','','update','','if(transport.responseText != \'error\') contentManager.reloadFrameRight(); else new Effect.BlindDown(\'errorMessage\');');\"
     						type=\"button\"
     						class=\"bigButton backgroundColor2\"
     						value=\"Updates\naktualisieren\"
     					/>
     				</td>
     			</tr>
     		</table>";*/
     #else
     #	$html = "";
     $F = new HTMLForm("updateForm", array("file"), "Die Anwendung aktualisieren");
     $F->getTable()->setColWidth(1, 120);
     $F->setType("file", "file");
     $F->setLabel("file", "Paket");
     $F->addJSEvent("file", "onChange", "Overlay.showDark(0.1, 0.8); " . OnEvent::popup("Anwendungsaktualisierung", "mPatch", "-1", "processUpdate", array("fileName"), "", "Patch.popup"));
     $F->setDescriptionField("file", "Hier aktualisieren Sie Ihre komplette Anwendung mit einem neuen Paket, das Sie von Furtmeier Hard- und Software erhalten haben.<br /><br />Sie können damit sowohl neue Versionen (Update) einspielen als auch eine mit Plugins erweiterte Version (Upgrade) einrichten.<br /><br />Alle Dateien werden vorher gesichert und alle eingetragenen Daten bleiben erhalten.");
     try {
         return ($id == -1 ? $F . "<div style=\"height:30px;\"></div>" . $html : "") . $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
     return $html;
 }
 function getHTML($id)
 {
     $type = "none";
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     $bps = $this->getMyBPSData();
     if ($bps != -1 and isset($bps["type"])) {
         $type = $bps["type"];
     }
     $this->loadMeOrEmpty();
     if ($id == -1) {
         if ($type != "none" and $type != "undefined") {
             $this->A->SeiteID = $type;
         }
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Content");
     $gui->setType("contentType", "select");
     $gui->setOptions("contentType", array("text", "preset", "downloads", "php"), array("Text", "HTML-Vorlage", "Downloads", "PHP"));
     $FB = new FileBrowser();
     $FB->addDir("../specifics/");
     if ($_SESSION["S"]->checkForPlugin("mShop")) {
         $FB->addDir("../multiCMS/Shop/");
     }
     $a = $FB->getAsLabeledArray("iCustomContent", ".class.php");
     $gui->setLabel("customContent", "Inhalt");
     $gui->setType("customContent", "select");
     $gui->setOptions("customContent", array_values($a), array_keys($a));
     $Tab = new HTMLTable(1);
     if ($this->singular) {
         $gui->setType("sort", "hidden");
     } else {
         $B = new Button("zurück", "back");
         $B->onclick("contentManager.loadFrame('contentLeft','Seite', " . $this->A("SeiteID") . ");");
         $Tab->addRow($B);
     }
     $gui->setLabel("contentType", "Typ");
     $gui->setLabel("ContentImage", "Bild");
     $gui->setLabel("SeiteID", "Seite");
     $gui->setLabel("TemplateID", "Vorlage");
     $gui->setLabel("sort", "Sortierung");
     $gui->setFieldDescription("ContentImage", "Wird an Stelle des Parameters %%%IMAGE%%% eingesetzt.");
     #$gui->setType("header","hidden");
     $gui->insertSpaceAbove("contentType");
     #$gui->insertSpaceAbove("TemplateID","sonstiges", true);
     $gui->setInputJSEvent("contentType", "onchange", "Content.selectType(this);");
     $gui->setType("text", "HTMLEditor");
     if (Session::isPluginLoaded("mFile")) {
         $B = new Button("Bild auswählen", "./images/i2/add.png");
         $B->type("icon");
         $B->customSelect("contentRight", $this->ID, "mFile", "Content.selectImage");
         $gui->activateFeature("addCustomButton", $this, "ContentImage", $B);
     } else {
         $gui->setType("ContentImage", "hidden");
     }
     $gui->setShowAttributes(array("text", "ContentSpracheID", "ContentImage", "TemplateID", "header", "sort", "contentType", "presetTemplateID", "formHandlerID", "customContent"));
     $gui->setFormID("ContentForm");
     $S = new anyC();
     $S->setCollectionOf("Seite");
     $gui->selectWithCollection("SeiteID", $S, "name");
     $gui->setType("name", "hidden");
     $gui->setType("SeiteID", "hidden");
     $gui->setLabel("presetTemplateID", "Vorlage");
     $gui->setLabel("formHandlerID", "Handler");
     $gui->setLabel("ContentSpracheID", "Sprache");
     if (Session::isPluginLoaded("mSprache")) {
         $Sprachen = new anyC();
         $Sprachen->setCollectionOf("Sprache");
         $gui->selectWithCollection("ContentSpracheID", $Sprachen, "SpracheIdentifier", "alle");
     } else {
         $gui->setType("ContentSpracheID", "hidden");
     }
     $aC = new anyC();
     $aC->setCollectionOf("Template");
     $aC->addAssocV3("templateType", "=", "presetTemplate");
     $gui->selectWithCollection("presetTemplateID", $aC, "name");
     if ($_SESSION["S"]->checkForPlugin("mHandler")) {
         $handlerAC = new anyC();
         $handlerAC->setCollectionOf("Handler");
         $handlerAC->addAssocV3("HandlerDomainID", "=", $U);
         $gui->selectWithCollection("formHandlerID", $handlerAC, "HandlerName", "keiner");
     } else {
         $gui->setParser("formHandlerID", "ContentGUI::noHandlerParser");
     }
     if ($this->A->contentType != "preset") {
         $gui->setLineStyle("presetTemplateID", "display:none;");
         $gui->setLineStyle("formHandlerID", "display:none;");
     }
     if ($this->A->contentType != "php") {
         $gui->setLineStyle("customContent", "display:none;");
     }
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "contentTemplate");
     $T->addAssocV3("templateType", "=", "listTemplate", "OR");
     $T->addAssocV3("templateType", "=", "tableTemplate", "OR");
     $T->addAssocV3("templateType", "=", "dlTemplate", "OR");
     $T->addOrderV3("templateType");
     $TG = new TemplatesGUI();
     $cats = $TG->getAvailableCategories();
     $options = array();
     while ($o = $T->getNextEntry()) {
         $options[$o->getID()] = $cats[$o->getA()->templateType];
     }
     $T->resetPointer();
     $gui->selectWithCollection("TemplateID", $T, "name");
     $gui->selectOptgroup("TemplateID", $options);
     $gui->setJSEvent("onSave", "function() { contentManager.loadFrame('contentLeft','Seite', " . $this->A("SeiteID") . "); }");
     $gui->setStandardSaveButton($this);
     $gui->customize($this->customizer);
     return $Tab . $gui->getEditHTML();
 }