예제 #1
0
 function getHTML($id)
 {
     $this->customize();
     #if($this->A == null AND $id != -1) $this->loadMe();
     #if($id == -1) $this->A = new UserAttributes();
     $this->loadMeOrEmpty();
     $up = new anyC();
     $up->setCollectionOf("User");
     $up->addAssocV3("password", "!=", ";;;-1;;;");
     $up->lCV3();
     if ($up->numLoaded() > 0) {
         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>";
     }
     $this->A->password = "******";
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Benutzer");
     $gui->setLabel("username", "Benutzername");
     $gui->setLabel("password", "Passwort");
     $gui->setLabel("SHApassword", "Passwort");
     $gui->setLabel("language", "Sprache");
     $gui->setType("language", "select");
     $gui->setOptions("language", array("de_DE", "de_CH", "en_US"), array("Deutsch (Deutschland)", "Deutsch (Schweiz)", "English (United States)"));
     $gui->setFieldDescription("SHApassword", "Zum Ändern eingeben.");
     $gui->setType("password", "hidden");
     $gui->setType("SHApassword", "password");
     $gui->setLabel("isAdmin", "Admin-Rechte?");
     $gui->setType("isAdmin", "radio");
     $gui->setFieldDescription("isAdmin", "<span style=\"color:red;\">Achtung: als Admin sehen Sie nur diese Admin-Oberfläche und NICHT das Programm selbst!</span>");
     $gui->setLabel("UserEmail", "E-Mail");
     $gui->setLabel("UserICQ", "ICQ");
     $gui->setLabel("UserJabber", "Jabber");
     $gui->setLabel("UserSkype", "Skype");
     $gui->setLabel("UserTel", "Telefon");
     $gui->translate($this->loadTranslation());
     $gui->insertSpaceAbove("UserEmail", isset($this->texts["Kontaktdaten"]) ? $this->texts["Kontaktdaten"] : "Kontaktdaten");
     $gui->setType("isAdmin", "checkbox");
     #$gui->setOptions("isAdmin",array("1","0"),array("ja ","nein"));
     $gui->setStandardSaveButton($this);
     $gui->customize($this->customizer);
     $mUD = new mUserdataGUI();
     $mUD->addAssocV3("UserID", "=", $this->ID);
     $mUD->addAssocV3("typ", "=", "uRest", "AND", "1");
     $mUD->addAssocV3("typ", "=", "relab", "OR", "1");
     $mUD->addAssocV3("typ", "=", "hideF", "OR", "1");
     $mUD->addAssocV3("typ", "=", "pSpec", "OR", "1");
     $mUD->addAssocV3("typ", "=", "pHide", "OR", "1");
     $html = "<div>" . $mUD->getHTML(-1) . "</div>";
     if ($id == -1) {
         $html = "<table><tr><td class=\"backgroundColor3\">Sie können Einschränkungen erst anlegen, wenn der Benutzer angelegt wurde.</td></tr></table>";
     }
     return $gui->getEditHTML() . ($this->A->isAdmin != 1 ? $html : "");
 }
예제 #2
0
 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 : "");
 }
예제 #3
0
 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) {
     }
 }
예제 #4
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);
     }
 }
예제 #5
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();
 }