Exemplo n.º 1
0
 /**
  * Popup zur Konfiguration eines Servers.
  */
 public function getConfigPopup($echo = true)
 {
     // Button
     $BCreate = new Button("Server\nhinzufügen", "new");
     $BCreate->rmePCR("mxCal", "-1", "createNewServer", array(), OnEvent::reloadPopup("mxCal"));
     $htmlTableButton = new HTMLTable(1);
     $htmlTableButton->addRow($BCreate);
     // Liste der konfigurierten Server
     $userId = $_SESSION["S"]->getCurrentUser()->getID();
     $T = new HTMLTable(1, "xCal Server");
     $BDeleteRaw = new Button("Eintrag löschen", "./images/i2/delete.gif", "icon");
     $BDeleteRaw->style("float: right;");
     $serverList = anyC::get("xCal", "xCalUserID", $userId);
     $counter = 0;
     while ($S = $serverList->getNextEntry()) {
         $BDelete = clone $BDeleteRaw;
         $BDelete->onclick("deleteClass('xCal','" . $S->getID() . "', function() { Popup.refresh('mxCal'); }, 'Eintrag wirklich löschen?');");
         $F = new HTMLForm("xCal_" . $S->A("xCalID"), array("xCalName", "xCalUrl", "xCalServerActive"));
         $F->getTable()->setColWidth(1, 120);
         $F->setValues($S);
         $F->setLabel("xCalName", "Bezeichnung");
         $F->setLabel("xCalUrl", "URL");
         $F->setLabel("xCalServerActive", "Für den Import verwenden");
         $F->setType("xCalServerActive", "checkbox");
         $F->useRecentlyChanged();
         $F->setSaveClass("xCal", $S->getID(), "''");
         $display = "none";
         if ($S->A("xCalName") == "" && $S->A("xCalUrl") == "") {
             $display = "";
         }
         $div = "<div\n\t\t\t\t\tonmouseover=\"this.className = 'backgroundColor3';\" \n\t\t\t\t\tonmouseout=\"this.className = '';\" \n\t\t\t\t\tstyle=\"padding:3px;cursor:pointer;\" \n\t\t\t\t\tonclick=\"if(\$('APDetails" . $S->getID() . "').style.display == 'none') new Effect.BlindDown('APDetails" . $S->getID() . "'); else new Effect.BlindUp('APDetails" . $S->getID() . "');\">\n\t\t\t\t\t{$BDelete}<span id=\"APPosition" . $S->getID() . "\">" . ($S->A("xCalName") != "" ? $S->A("xCalName") : "Neuer Server") . "</span>&nbsp;<br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"APName" . $S->getID() . "\">" . ($S->A("xCalServerActive") == "1" ? "Import aktiviert" : "Import deaktiviert") . "&nbsp;</small>\n\t\t\t\t</div>";
         $T->addRow(array($div . "<div id=\"APDetails" . $S->getID() . "\" style=\"display:" . $display . ";\">" . $F . "</div>"));
         $T->addRowClass("backgroundColor0");
         $T->addCellClass(1, "borderColor1");
         $counter++;
     }
     if ($counter == 0) {
         $T->addRow("Keine Server eingetragen!");
     }
     if ($echo == "" || $echo === true) {
         echo $htmlTableButton . $T;
     } else {
         return $htmlTableButton . $T;
     }
 }
Exemplo n.º 2
0
 public function getEditTableHTML($cols = 2)
 {
     BPS::unsetProperty($this->className . "GUI", "edit");
     if ($this->attributes == null) {
         $this->attributes = PMReflector::getAttributesArrayAnyObject($this->object->getA());
     }
     if ($this->name == null) {
         $this->name = $this->className;
     }
     $BA = $this->getAbortButton();
     if (isset($this->features["CRMEditAbove"])) {
         $BA->style("float:left;margin-left:10px;margin-top:10px;");
     }
     $Buttons = "";
     foreach ($this->sideButtons as $B) {
         if (isset($this->features["CRMEditAbove"])) {
             $B->style("float:left;margin-left:10px;margin-top:10px;");
         }
         $Buttons .= $B;
     }
     $abort = "<div>{$BA}{$Buttons}</div><div style=\"clear:left;height:10px;\"></div>";
     $tab = new HTMLForm($this->className . "Form", $this->attributes, $this->name . " editieren:");
     if ($cols != 2) {
         $tab->cols($cols);
     }
     foreach ($this->labels as $k => $v) {
         $tab->setLabel($k, $v);
     }
     foreach ($this->types as $k => $v) {
         $tab->setType($k, $v, null, isset($this->options[$k]) ? $this->options[$k] : null);
     }
     foreach ($this->spaces as $k => $v) {
         $tab->insertSpaceAbove($k, $v);
     }
     foreach ($this->autocomplete as $k => $a) {
         $tab->setAutoComplete($k, $a[0], $a[1]);
     }
     foreach ($this->fieldButtons as $k => $B) {
         $tab->addFieldButton($k, $B);
     }
     foreach ($this->parsers as $n => $l) {
         $tab->setType($n, "parser", null, array($l, $this->object));
     }
     foreach ($this->inputStyles as $k => $n) {
         $tab->setInputStyle($k, $n);
     }
     foreach ($this->descriptionsField as $n => $l) {
         $tab->setDescriptionField($n, T::_($l));
     }
     $tab->setValues($this->object);
     if ($this->object->getID() == -1) {
         $save = $this->functionSaveNew;
     } else {
         $save = $this->functionSave;
     }
     $tab->setSaveClass($this->className, $this->object->getID(), str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $save), $this->name);
     $tab->useRecentlyChanged();
     return $abort . $tab;
 }
Exemplo n.º 3
0
 public function manageMailsettings()
 {
     $F = new HTMLForm("mailsettings", array("systemEmail"));
     $F->getTable()->setColWidth(1, 120);
     $F->useRecentlyChanged();
     $F->setValue("systemEmail", mUserdata::getGlobalSettingValue("mailSystemEmail", ""));
     $F->setLabel("systemEmail", "System E-Mail");
     $F->setDescriptionField("systemEmail", "Absender-Adresse für Systemnachrichten");
     $F->setSaveRMEPCR("Speichern", "", "mInstallation", -1, "manageMailsettingsSave", OnEvent::closePopup("mInstallation"));
     echo $F;
 }
Exemplo n.º 4
0
 function authenticationPopup()
 {
     $allowedUsers = Environment::getS("allowedUsers", null);
     if ($allowedUsers !== null) {
         return;
     }
     $F = new HTMLForm("appserver", array("appServer"), "Application Server");
     $F->useRecentlyChanged();
     $F->setLabel("appServer", "App-Server");
     if (function_exists("ldap_connect")) {
         $F->getTable()->setTableStyle("margin-bottom:30px;");
     }
     $F->getTable()->setColWidth(1, 120);
     $F->setValue("appServer", mUserdata::getGlobalSettingValue("AppServer", ""));
     $F->setDescriptionField("appServer", "Wenn Sie einen Application Server betreiben, tragen Sie hier bitte die URL ein, um die Benutzer mit diesem Server zu authentifizieren.");
     $F->setSaveRMEPCR("Speichern", "", "Users", "", "saveAppServer", OnEvent::closePopup("Users"));
     echo $F;
     if (!function_exists("ldap_connect")) {
         return;
     }
     echo "<span></span><div class=\"backgroundColor1 Tab\"><p>Active Directory</p></div>";
     $LD = LoginData::get("ADServerUserPass");
     BPS::setProperty("LoginDataGUI", "preset", "adServer");
     $gui = new LoginDataGUI($LD == null ? -1 : $LD->getID());
     $gui->loadMeOrEmpty();
     if ($LD != null) {
         $gui->setA($LD->getA());
     }
     $gui->getPopup();
 }