Exemplo n.º 1
0
 public function getHTML($id)
 {
     $this->loadMeOrEmpty();
     #if($this->A == null AND $id != -1) $this->loadMe();
     #if($id == -1) $this->A = new InstallationAttributes();
     BPS::setProperty("mInstallationGUI", "showErrorText", "1");
     $gui = new HTMLGUI();
     if (!Session::isPluginLoaded("multiInstall")) {
         $this->A->httpHost = "*";
         $gui->setType("httpHost", "hidden");
     } else {
         $gui->insertSpaceAbove("httpHost");
     }
     $gui->setObject($this);
     $gui->setName("Zugangsdaten");
     $gui->setType("password", "password");
     $gui->setLabel("datab", "Datenbank");
     $gui->setLabel("user", "Benutzer");
     $gui->setLabel("password", "Passwort");
     $gui->setLabel("httpHost", "Domain");
     $gui->setFieldDescription("host", "Der Rechner, auf dem die Datenbank liegt. Das kann 'localhost' sein, oder eine IP wie '192.168.8.243' oder ein Hostname wie 'rdbms.strato.de'.");
     $gui->setFieldDescription("httpHost", "unter der phynx erreichbar ist oder * für alle Domains");
     #$this->loadGUITranslation($gui);
     $gui->translate($this->loadTranslation());
     $gui->setJSEvent("onSave", "\n\t\t\t\tfunction() {\n\t\t\t\t\tcontentManager.emptyFrame('contentLeft');\n\t\t\t\t\tcontentManager.emptyFrame('contentBelow');\n\t\t\t\t\tcontentManager.reloadFrame('contentRight');" . "\n\t\t\t\t}");
     $gui->setStandardSaveButton($this);
     return $gui->getEditHTML();
 }
Exemplo n.º 2
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) {
     }
 }
Exemplo n.º 3
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;
     }
 }
Exemplo n.º 4
0
 /**
  * @return HTMLGUI
  */
 protected function getGUI()
 {
     $this->loadMeOrEmpty();
     $bps = $this->getMyBPSData();
     $c = $this->getClearClass() . "Class";
     $d = $this->getClearClass() . "ClassID";
     $this->A->{$c} = $bps["className"];
     $this->A->{$d} = $bps["classID"];
     $gui = new HTMLGUI();
     $gui->setType($this->getClearClass() . "Class", "hidden");
     $gui->setType($this->getClearClass() . "ClassID", "hidden");
     $gui->setObject($this);
     $gui->setFormID("propertyForm");
     if (isset($bps["returnTo" . $bps["className"]])) {
         $gui->setJSEvent("onSave", "function(){ contentManager.reloadFrameLeft(); contentManager.loadFrame('contentRight','" . $bps["returnTo" . $bps["className"]] . "'); }");
     }
     $gui->setStandardSaveButton($this);
     return $gui;
 }
Exemplo n.º 5
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) {
     }
 }
Exemplo n.º 6
0
 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);
     }
 }
Exemplo n.º 7
0
 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();
 }
Exemplo n.º 8
0
 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();
 }