Пример #1
0
 public function check($touch = false)
 {
     $mbox = $this->connection();
     #echo "<h1>Nachrichten in INBOX</h1><div style=\"overflow:auto;max-height:400px;\"><pre>";
     $MC = imap_check($mbox);
     $T = new HTMLTable(1, $touch ? "Mails" : "");
     $T->setTableStyle("font-size:11px;");
     $T->useForSelection();
     $start = $MC->Nmsgs - 10;
     if ($start < 1) {
         $start = 1;
     }
     $result = imap_fetch_overview($mbox, "{$start}:{$MC->Nmsgs}", 0);
     $result = array_reverse($result);
     foreach ($result as $overview) {
         #print_r($overview);
         $T->addRow(array("\n\t\t\t\t<small style=\"color:grey;float:right;\">" . Util::CLDateParser($overview->udate) . "</small>\n\t\t\t\t" . str_replace("\"", "", $this->decodeBlubb($overview->from)) . "<br />\n\t\t\t\t<small style=\"color:grey;\">" . substr($this->decodeBlubb($overview->subject), 0, 50) . "</small>"));
         $T->addCellEvent(1, "click", "\$j('#MailFrame').attr('src', './interface/rme.php?class=MailCheck&constructor=" . $this->getID() . "&method=showMailBody&parameters=\\'{$overview->uid}\\'');");
     }
     imap_close($mbox);
     #echo "</pre></div>";
     $BC = "";
     if ($touch) {
         $BC = new Button("Fenster\nschließen", "stop");
         $BC->style("float:right;margin:10px;");
         $BC->onclick(OnEvent::closePopup("MailCheck"));
     }
     echo "<div style=\"float:right;width:300px;\">";
     echo $BC;
     echo "<p>{$MC->Nmsgs} Nachricht" . ($MC->Nmsgs == 1 ? "" : "en") . "</p><div style=\"clear:both;\"></div>";
     echo $T;
     echo "</div>";
     echo "\n\t\t\t<div style=\"border-right-style:solid;border-right-width:1px;width:699px;\" class=\"borderColor1\">\n\t\t\t\t<iframe id=\"MailFrame\" style=\"border:0px;width:699px;height:520px;\" src=\"./fheME/MailCheck/Home/index.html\"></iframe>\n\t\t\t</div>";
     echo "<div style=\"clear:both;\"></div>";
 }
Пример #2
0
 public static function sendEmail($subject, $body, $recipient)
 {
     $S = new SupportGUI();
     $data = $S->getEMailData();
     $mailfrom = $data["fromAddress"];
     $mailto = $data["recipients"][$recipient][1];
     $mimeMail2 = new PHPMailer(false, substr($mailfrom, stripos($mailfrom, "@") + 1));
     $mimeMail2->CharSet = "UTF-8";
     $mimeMail2->Subject = $subject;
     $mimeMail2->From = $mailfrom;
     $mimeMail2->Sender = $mailfrom;
     $mimeMail2->FromName = $data["fromName"];
     $mimeMail2->Body = wordwrap($body, 80);
     $mimeMail2->AddAddress($mailto);
     $B = new Button("Danke!", "./images/big/thanks.png", "icon");
     $B->style("float:left;margin-right:10px;margin-bottom:20px;");
     $BOK = new Button("OK", "bestaetigung");
     $BOK->onclick(OnEvent::closePopup("Support"));
     $BOK->style("float:right;margin:10px;");
     if ($mimeMail2->Send()) {
         echo "<h1>{$B} Danke für Ihre Unterstützung!</h1><p>Sie erhalten in Kürze eine Antwort per E-Mail.</p>{$BOK}<div style=\"clear:both;\"></div>";
     } else {
         echo "<p style=\"padding:5px;color:red;\">Fehler beim Senden der E-Mail. Bitte überprüfen Sie Ihre Server-Einstellungen im Admin-Bereich.</p><p>Nachfolgend wird Ihre Nachricht angezeigt, falls Sie sie in die Zwischenablage kopieren (Strg + c) und manuell an <b>{$mailto}</b> möchten.</p><pre style=\"color:grey;max-height:300px;font-size:10px;padding:5px;width:590px;overflow:auto;\">" . wordwrap(stripslashes($body), 80) . "</pre>{$BOK}<div style=\"clear:both;\"></div>";
     }
 }
Пример #3
0
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI2();
     $gui->setObject($this);
     $gui->setName("RSSFilter");
     $gui->setShowAttributes(array("RSSFilterName", "RSSFilterFeed", "RSSFilterAdapter", "RSSFilterJDID", "RSSFilterAutoDL", "RSSFilterProviderRapidshare", "RSSFilterProviderNetload", "RSSFilterProviderUploaded"));
     $gui->setLabel("RSSFilterName", "Name");
     $gui->setLabel("RSSFilterFeed", "Feed URL");
     $gui->setLabel("RSSFilterAdapter", "Adapter");
     $gui->setLabel("RSSFilterJDID", "DL with");
     $gui->setLabel("RSSFilterProviderRapidshare", "Rapidshare.com");
     $gui->setLabel("RSSFilterProviderNetload", "Netload");
     $gui->setLabel("RSSFilterProviderUploaded", "Uploaded");
     $gui->setLabel("RSSFilterAutoDL", "Auto-DL?");
     $gui->setType("RSSFilterProviderRapidshare", "checkbox");
     $gui->setType("RSSFilterProviderNetload", "checkbox");
     $gui->setType("RSSFilterAutoDL", "checkbox");
     $gui->setType("RSSFilterProviderUploaded", "checkbox");
     $gui->insertSpaceAbove("RSSFilterJDID");
     $gui->setFieldDescription("RSSFilterAutoDL", "Currently only works when using JDownloader RC, Qnap and pyLoad. Will have no effect otherwise.");
     $gui->selectWithCollection("RSSFilterJDID", new mJDGUI(), "JDName", "nicht herunterladen");
     $gui->setStandardSaveButton($this);
     $Tab = new HTMLSideTable("right");
     $B = new Button("show filtered\nfeed", "./trinityDB/RSSFilter/Filtered.png");
     $B->onclick("window.open('./trinityDB/RSSFilter/FilteredFeed.php?RSSFilterID=" . $this->getID() . "', 'Filtered feed');");
     $Tab->addRow($B);
     $FB = new FileBrowser();
     $FB->addDir(Util::getRootPath() . "trinityDB/RSSFilter");
     $Adapters = $FB->getAsLabeledArray("iFeedFilter", ".class.php", true);
     $gui->setType("RSSFilterAdapter", "select");
     $gui->setOptions("RSSFilterAdapter", array_values($Adapters), array_keys($Adapters));
     return $Tab . $gui->getEditHTML();
 }
Пример #4
0
 private function getNav($parentID, $domain)
 {
     $mNav = new anyC();
     $mNav->setCollectionOf("Navigation");
     $mNav->addAssocV3("parentID", "=", $parentID);
     $mNav->addAssocV3("DomainID", "=", $domain);
     $mNav->addOrderV3("sort");
     $mNav->lCV3();
     if ($mNav->numLoaded() == 0) {
         return;
     }
     $html = "\n\t\t<ul style=\"list-style-image:none;list-style-type:none;\" id=\"sortable_{$parentID}\">";
     while ($n = $mNav->getNextEntry()) {
         $B = new Button("Element bearbeiten", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("contentManager.loadFrame('contentLeft','Navigation','" . $n->getID() . "');");
         $B->style("float:left;margin-right:10px;");
         $D = new Button("Element löschen", "./images/i2/delete.gif");
         $D->type("icon");
         $D->onclick("deleteClass('Navigation','" . $n->getID() . "', function() { contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' &amp;&amp; lastLoadedLeft == '1') \$('contentLeft').update(''); },'Element und alle Unterelemente wirklich löschen?');");
         $D->style("float:right;margin-right:10px;");
         $html .= "<li id=\"NavigationElementID_" . $n->getID() . "\" style=\"" . ($n->A("hidden") == "1" ? "text-decoration:line-through;" : "") . "\">{$D}<img src=\"./images/i2/topdown.png\" class=\"navigationHandler_sortable_{$parentID}\"\" style=\"cursor:pointer;float:right;margin-right:10px;\" />{$B}" . ($n->A("name") == "" ? "&lt;kein Name&gt;" : $n->A("name")) . $this->getNav($n->getID(), $domain) . "</li>";
     }
     #
     $html .= "\n\t\t</ul>\n\t\t<script type=\"text/javascript\">Website.add('sortable_{$parentID}');</script>";
     return $html;
 }
Пример #5
0
 public static function nameParser($w, $E)
 {
     $B = new Button("display episodes", "./images/i2/folder.png");
     $B->style("float:left;margin-right:5px;");
     $B->type("icon");
     $B->onclick("contentManager.loadFrame('contentLeft','mFolge',-1,0,'mFolgeGUI;SerieID:" . $E->getID() . "');");
     return $B . $w;
 }
 private function noBackupButton()
 {
     $GoAway = new HTMLInput("BackupGoAway", "checkbox");
     $GoAway->id("BackupGoAway");
     $GoAway->style("float:left;margin-right:5px;");
     $BSave = new Button("Einstellung\nspeichern", "save");
     $BSave->style("float:right;");
     $BSave->onclick("if(\$('BackupGoAway').checked) ");
     $BSave->rmePCR("BackupManager", "", "GoAway", "", "Popup.close('','BackupManagerGUI'); contentManager.reloadFrame('contentLeft');");
     return $BSave . $GoAway . " <label for=\"BackupGoAway\" style=\"float:none;text-align:left;width:auto;\">Diese Meldung nicht mehr anzeigen, ich erstelle meine Backups selbst.</label>";
 }
Пример #7
0
 function getHTML($id)
 {
     $BC = new Button("Abbrechen", "stop");
     $BC->style("margin:10px;float:right;");
     $BC->onclick("\$j('#listAP .lastSelected').removeClass('lastSelected'); \$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing'); });");
     $gui = new HTMLGUIX($this);
     $gui->name("Bricklet");
     $gui->type("TinkerforgeBrickletTinkerforgeID", "hidden");
     $gui->type("TinkerforgeBrickletType", "select", self::$types);
     $gui->addToEvent("onSave", "\$j('#listAP .lastSelected').removeClass('lastSelected'); \$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ " . OnEvent::reloadPopup("Tinkerforge") . " }); }); ");
     return $BC . "<div style=\"clear:both;\"></div>" . $gui->getEditHTML();
 }
Пример #8
0
 public function getOverviewContent()
 {
     $html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemGerichtGUI\"></span><p>MailCheck</p></div>\n\t\t\t<div style=\"padding:10px;overflow:auto;\">";
     $BU = new Button("", "./fheME/Gericht/update.png", "icon");
     $BU->style("float:right;");
     $BU->onclick("fheOverview.loadContent('mGerichtGUI::getOverviewContent');");
     $AC = anyC::get("MailCheck");
     while ($MC = $AC->getNextEntry()) {
         $B = new Button("Mails abholen", "mail", "iconicL");
         $html .= "\n\t\t\t<div class=\"touchButton\" onclick=\"Overlay.showDark();" . OnEvent::popup("Mails abholen", "MailCheck", $MC->getID(), "check", "1", "", "{width:1000, top:20, left:20, hPosition:'center'}") . "\">\n\t\t\t\t" . $B . "\n\t\t\t\t<div class=\"label\">" . $MC->A("MailCheckName") . "</div>\n\t\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t</div>";
     }
     $html .= "</div>";
     echo $html;
 }
Пример #9
0
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI2();
     $gui->setObject($this);
     $gui->setName("Serie");
     $gui->setShowAttributes(array("name", "sprache", "dir", "lastupdate", "genre", "description", "status", "quality", "RSSFilterID", "altFeedName1", "altFileName1"));
     #$gui->setType("adapter", "hidden");
     #$gui->setType("lastupdate", "readonly");
     #$gui->setType("siteID", "hidden");
     #$gui->setType("url", "hidden");
     $gui->setType("description", "textarea");
     $gui->setLabel("sprache", "Language");
     $gui->setLabel("lastupdate", "Last update");
     $gui->setLabel("RSSFilterID", "RSS feed");
     $gui->setLabel("altFileName1", "alt. file name");
     $gui->setLabel("altFeedName1", "alt. feed name");
     $gui->setFieldDescription("altFileName1", "This is useful if the filenames do not match the full series name. trinityDB will then look for both names on the harddrive. For example 'switch' instead of 'Switch Reloaded'.");
     $gui->setFieldDescription("altFeedName1", "This is useful if the feed names do not match the full series name. trinityDB will then look for both names in the feeds. For example 'Human.Target.2010' instead of 'Human Target (2010)'.");
     $gui->setParser("lastupdate", "SerieGUI::lastUpdateParser");
     $gui->setType("quality", "select");
     $gui->setOptions("quality", array_keys(self::getQualities()), array_values(self::getQualities()));
     $gui->setType("sprache", "select");
     $gui->setOptions("sprache", array("en", "de"), array("english", "deutsch"));
     $gui->setStandardSaveButton($this);
     $gui->insertSpaceAbove("RSSFilterID");
     $gui->selectWithCollection("RSSFilterID", new mRSSFilterGUI(), "RSSFilterName", "none");
     $tab = new HTMLSideTable("right");
     $B = new Button("Download\nepisodes", "./trinityDB/Serien/Updates.png");
     #$B->rmePCR("Serie", $this->ID, "downloadEpisodes", array("'1'"), "Popup.display('Download-Status', transport);");
     $B->popup("", "Download-Status", "Serie", $this->ID, "downloadEpisodes", array("'1'"));
     $S = new Button("Settings", "./images/i2/settings.png");
     $S->type("icon");
     $S->style("float:right;margin-right:-20px;");
     $S->contextMenu("Serie", "download", "Settings");
     $tab->addRow($S . $B);
     $B = new Button("Show\nepisodes", "./trinityDB/Serien/Folge.png");
     $B->onclick("contentManager.loadFrame('contentLeft','mFolge',-1,0,'mFolgeGUI;SerieID:" . $this->getID() . "');");
     $tab->addRow($B);
     #$B = new Button("Find new\nepisodes","./trinityDB/RSSFilter/RSSFilter.png");
     #$B->rmePCR("Serie", $this->ID, "checkRSS", "", "Popup.display('Episoden-Status', transport);");
     #$tab->addRow($B);
     $B = new Button("Check\nepisodes", "okCatch");
     $B->rmePCR("Serie", $this->ID, "checkAllEpisodes", "", "Popup.display('Episoden-Status', transport);");
     $tab->addRow($B);
     $Image = new Button("", DBImageGUI::imageLink("Serie", $this->getID(), "cover", false, true), "icon");
     $Image->style("width:150px;");
     $tab->addRow(array($Image));
     return $tab . $gui->getEditHTML();
 }
Пример #10
0
 public function getHTML($id)
 {
     $bps = $this->getMyBPSData();
     $t = new HTMLTable(1);
     $t->setTableStyle("width:160px;float:right;margin-right:10px;");
     if (!isset($bps["ID"])) {
         $F = new mFhemGUI();
         $F->addAssocV3("FhemType", "!=", "FHZ");
         while ($f = $F->getNextEntry()) {
             $B = new Button($f->getA()->FhemName, "./fheME/Fhem/fhem.png");
             $B->onclick("contentManager.loadFrame('contentRight','mFhemTimer',-1,0,'mFhemTimerGUI;ID:" . $f->getID() . ";type:D;name:" . $f->getA()->FhemName . "');");
             $t->addRow($B);
             $t->addRowClass("backgroundColor0");
         }
         $t->addRow("");
         $t->addRowClass("backgroundColor1");
         $F = new anyC();
         $F->setCollectionOf("FhemPreset");
         $F->addAssocV3("FhemPresetHide", "=", "0");
         while ($f = $F->getNextEntry()) {
             $B = new Button($f->getA()->FhemPresetName, "./fheME/Fhem/events.png");
             $B->onclick("contentManager.loadFrame('contentRight','mFhemTimer',-1,0,'mFhemTimerGUI;ID:" . $f->getID() . ";type:P;name:" . $f->getA()->FhemPresetName . "');");
             $t->addRow($B);
             $t->addRowClass("backgroundColor0");
         }
         return $t;
     }
     if (isset($bps["ID"])) {
         if ($bps["type"] == "D") {
             $F = new Fhem($bps["ID"]);
             $F->loadMe();
             $FF = new Fhem("timer");
             $FF->setA($F->getA());
             $C = new FhemControlGUI();
             $control = $C->getControl($FF);
         } else {
             $control = "";
         }
         $rand = rand(10, 10000000);
         $B = new Button("set timer", "okCatch");
         $B->rme("FhemControl", '', 'setTimer', array($bps["ID"], "'setBPSValue'", "'{$bps['type']}'", "parent.clock4Timer{$rand}.stunden", "parent.clock4Timer{$rand}.minuten", "'{$bps['name']}'"), "contentManager.loadFrame(\\'contentRight\\',\\'mFhem\\',-1,0,\\'\\');");
         $B->style("float:right;");
         $t->addRow("<iframe name=\"clock4Timer{$rand}\" style=\"width:240px;height:330px;border:0px;\" src=\"./libraries/ClockGUI.class.php\"></iframe>");
         $t->addRowClass("backgroundColor0");
         $t->addRow($B);
         $t->addRowClass("backgroundColor0");
         return $control . $t;
     }
 }
Пример #11
0
 public function getPopup()
 {
     $bps = $this->getMyBPSData();
     $gui = $this->getGUI($this->getID());
     $gui->addToEvent("onSave", "Popup.close('LoginData', 'edit');");
     #$gui->setJSEvent("onSave", "function() { Popup.close('', 'mailServer'); contentManager.reloadFrame('contentRight'); }");
     #$gui->setStandardSaveButton($this,"mLoginData");
     $gui->displayMode("popup");
     $html = "";
     $html2 = "";
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "mailServer") {
         $BAbort = new Button("Abbrechen", "stop");
         $BAbort->onclick("Popup.close('LoginData', 'edit');");
         $BAbort->style("float:right;");
         $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie diese Anwendung lokal auf einem Windows-Rechner betreiben oder direkt über einen SMTP-Server versenden möchten (z.B. Newsletter).</small></p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "MailServerUserPass");
         $gui->type("optionen", "hidden");
     }
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "backupFTPServer") {
         $BAbort = new Button("Abbrechen", "stop");
         $BAbort->onclick("Popup.close('LoginData', 'edit');");
         $BAbort->style("float:right;");
         $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie die Backups automatisch auf einen FTP-Server hochladen möchten.</small></p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "BackupFTPServerUserPass");
         $gui->descriptionField("optionen", "Bitte geben Sie hier das Unterverzeichnis an, in das die Datei hochgeladen werden soll");
         $gui->label("optionen", "Verzeichnis");
         #$gui->type("optionen", "hidden");
     }
     #
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "googleData") {
         $html = "<p>Bitte beachten Sie: Es werden nur Ihre eigenen Termine synchronisiert.</p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", Session::currentUser()->getID());
         $gui->type("name", "hidden");
         $this->changeA("name", "GoogleAccountUserPass");
         $gui->type("optionen", "hidden");
         $gui->type("server", "hidden");
     }
     $gui->label("benutzername", "Benutzername");
     $gui->label("passwort", "Passwort");
     $gui->label("server", "Server");
     echo $html . $gui->getEditHTML();
 }
Пример #12
0
 public function browser()
 {
     $BA = new Button("Eintrag\nhinzufügen", "new");
     $BA->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
     $BA->rmePCR($this->object->getClearClass(), "-1", "create", $this->parametersCreate, OnEvent::reloadPopup($this->object->getClearClass()));
     $BA->style("margin:10px;");
     $cols = 3 + count($this->colsLeft) + count($this->colsRight);
     $TE = new HTMLTable($cols, "Einträge");
     $TE->setColWidth(1, 20);
     $TE->setColWidth($cols, 20);
     $TE->useForSelection(false);
     $TE->maxHeight(400);
     $TE->weight("light");
     $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic");
     $autoLoad = false;
     while ($A = $this->object->getNextEntry()) {
         $BD = new Button("Eintrag löschen", "trash_stroke", "iconic");
         $BD->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
         $BD->onclick("deleteClass('" . get_class($A) . "','" . $A->getID() . "', function() { " . OnEvent::reloadPopup($this->object->getClearClass()) . " },'Eintrag wirklich löschen?');");
         $isEmpty = false;
         if ($this->emptyCheckField != null and $A->A($this->emptyCheckField) == "") {
             $autoLoad = $A->getID();
             $isEmpty = true;
         }
         if (!$isEmpty) {
             $div = Util::invokeStaticMethod(get_class($this->object), $this->parsers["main"], array($A));
         } else {
             $div = "Neuer Eintrag";
         }
         $row = array();
         $row[] = $BD;
         $row[] = $div;
         foreach ($this->colsRight as $col) {
             $c = Util::invokeStaticMethod(get_class($this->object), $col[0], array($A));
             $row[] = $c;
         }
         $row[] = $BE;
         $TE->addRow($row);
         $action = "contentManager.selectRow(this); \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("popupEditEntry", get_class($A), $A->getID(), "0", "function(){ \$j('#popupEditEntry').fadeIn(); }") . " });";
         $TE->addCellEvent(2, "click", $action);
         $TE->addCellID(2, "popupEntryID" . $A->getID());
         $TE->addCellEvent(count($row), "click", $action);
     }
     if ($this->object->numLoaded() == 0) {
         $TE->addRow("Keine Einträge");
         $TE->addRowColspan(1, 3);
     }
     return "{$BA}\n\t\t\t<div style=\"float:right;width:400px;height:500px;display:none;\" id=\"popupEditEntry\"></div>\n\t\t\t<div id=\"popupListEntries\" style=\"width:400px;height:440px;overflow:auto;\">{$TE}</div>\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t" . ($autoLoad ? OnEvent::script("\$j('#popupEntryID" . $autoLoad . "').trigger(Touch.trigger);") : "");
 }
Пример #13
0
 public function getOverviewContent()
 {
     $html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemtrinityDBGUI\"></span><p>trinityDB</p></div>\n\t\t\t<div style=\"padding:10px;\">";
     $AC = anyC::get("trinityDB");
     while ($T = $AC->getNextEntry()) {
         $B = new Button("Neue Folgen", "star", "touch");
         $B->onclick("trinityDB.show(" . $T->getID() . ", 'newEpisodes');");
         $html .= "{$B}";
         $B = new Button("Serienbrowser", "aperture", "touch");
         $B->onclick("trinityDB.show(" . $T->getID() . ", 'browser');");
         $html .= "{$B}";
     }
     $html .= "</div>";
     echo $html;
 }
Пример #14
0
 public function getHTML($id)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck($this->getClearClass());
     $t = new HTMLTable(2, $this->tableLabel);
     $t->addColStyle(1, "width:20px;");
     $FB = new FileBrowser();
     $FB->addDir($this->directory);
     $w = $FB->getAsLabeledArray("iFileBrowser", ".class.php");
     foreach ($w as $k => $v) {
         $B = new Button("", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("contentManager.loadFrame('contentLeft','{$v}');");
         $t->addRow(array($B, "{$k}"));
     }
     return $t->getHTML();
 }
Пример #15
0
 public function getHTML($id)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck("mTool");
     $FB = new FileBrowser();
     $FB->addDir("../PM/GoD");
     $files = $FB->getAsLabeledArray("iPMTool", ".class.php", true);
     $tab = new HTMLTable(2, "Tools");
     $tab->setColWidth(1, "20px");
     foreach ($files as $key => $value) {
         $B = new Button("", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("loadFrameV2('contentLeft','{$value}');");
         $tab->addRow(array($B, $key));
     }
     return $tab;
 }
Пример #16
0
 public function showDetailsPopup()
 {
     $BD = new Button("Gericht löschen", "trash", "icon");
     $BD->style("float:right;margin-right:10px;");
     $BD->onclick("deleteClass('Gericht','" . $this->getID() . "', function() { " . OnEvent::closePopup("Gericht") . " fheOverview.loadContent('mGerichtGUI::getOverviewContent'); },'Eintrag wirklich löschen?');");
     $BC = new Button("Popup schließen", "stop", "icon");
     $BC->style("float:right;margin-right:10px;");
     $BC->onclick(OnEvent::closePopup("Gericht"));
     $BE = new Button("Gericht bearbeiten", "edit", "icon");
     $BE->style("float:right;margin-right:10px;");
     $BE->editInPopup("Gericht", $this->getID(), "Gericht bearbeiten", "GerichtGUI;mode:popup");
     $html = "<h1>{$BC}{$BD}{$BE}" . $this->A("GerichtName") . "</h1><p>";
     if ($this->A("GerichtRezeptBuch") != "") {
         $html .= "Buch: " . $this->A("GerichtRezeptBuch") . "<br />";
         $html .= "Seite: " . $this->A("GerichtRezeptBuchSeite") . "<br />";
     }
     $html .= nl2br($this->A("GerichtRezept"));
     $html .= "</p>";
     echo $html;
 }
Пример #17
0
 public function editInWindow($UDID)
 {
     $T = new HTMLTable(1);
     $B = new Button("Desktop-Link\nlöschen", "trash");
     $B->onclick("");
     $B->style("float:right;");
     $B->rmePCR("DesktopLink", "", "delete", $UDID, "if(checkResponse(transport)){ Popup.close('', 'DesktopLinkPopup'); DesktopLink.loadContent(true); }");
     $T->addRow($B);
     $T->addRowClass("backgroundColor0");
     $UD = new Userdata($UDID);
     $F = new HTMLForm("DesktopLinkEdit", array("order", "symbol", "name", "UDID"), "Bearbeiten:");
     $F->setSaveRMEP("Desktop-Link speichern", "./images/i2/save.gif", "DesktopLink", "{$UDID}", "save", "if(checkResponse(transport)){ Popup.close(\\'\\', \\'DesktopLinkPopup\\'); DesktopLink.loadContent(true); }");
     $v = explode(";", $UD->A("wert"));
     $F->setValue("order", $v[0]);
     $F->setValue("symbol", $v[1]);
     $F->setValue("name", $v[2]);
     $F->setValue("UDID", $UDID);
     $F->setType("UDID", "hidden");
     $F->setType("order", "hidden");
     $F->setType("symbol", "hidden");
     echo $T . $F;
 }
Пример #18
0
 /**
  * Method to display an E-Mail popup for easy E-Mail sending
  * 
  * Requires a method named "getEMailData" in $dataClass which returns an array:
  * array(fromName, fromAddress, recipientName, recipientAddress, subject, body)
  * 
  * Will call $dataClass($dataClassID)::sendEmail afterwards
  * 
  * @param string $dataClass
  * @param string $dataClassID 
  */
 public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null)
 {
     $c = new $dataClass($dataClassID);
     $data = $c->getEMailData($callbackParameter);
     $tab = new HTMLTable(2);
     $tab->setColWidth(1, "120px;");
     $tab->addLV("Absender:", "{$data['fromName']}<br /><small>&lt;{$data['fromAddress']}&gt;</small>");
     if (count($data["recipients"]) == 1) {
         $tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small>&lt;" . $data["recipients"][0][1] . "&gt;</small>");
     } else {
         $recipients = array();
         foreach ($data["recipients"] as $ID => $Rec) {
             $recipients[$ID] = new HTMLInput($Rec[0] . " &lt;" . $Rec[1] . "&gt;", "option", $ID);
         }
         $IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", "0", $recipients);
         $IS->id("EMailRecipient{$dataClassID}");
         $tab->addLV("Empfänger:", $IS);
     }
     $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />");
     $tab->addRow(array("<textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea>"));
     $tab->addRowColspan(1, 2);
     $tab->addRowClass("backgroundColor0");
     if ($onSuccessFunction == null) {
         $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');";
     }
     $BAbort = new Button("Abbrechen", "stop");
     $BAbort->onclick("Popup.close('Util', 'edit');");
     $BAbort->style("margin-bottom:10px;margin-top:10px;");
     $BGo = new Button("E-Mail\nsenden", "okCatch");
     $BGo->style("float:right;margin-top:10px;");
     $BGo->rmePCR($dataClass, $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", count($data["recipients"]) == 1 ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction);
     #$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); ");
     $tab->addRow(array($BGo . $BAbort));
     $tab->addRowColspan(1, 2);
     #$tab->addRowClass("backgroundColor0");
     echo $tab;
 }
Пример #19
0
 public function setSaveCheckListUD($targetClass, $identifier = "", $checkedByDefault = true, $onSuccessFunction = null)
 {
     $this->saveMode = "custom";
     if ($onSuccessFunction != null and strpos($onSuccessFunction, "function(") !== 0) {
         $onSuccessFunction = "function(transport){ {$onSuccessFunction} }";
     }
     $value = mUserdata::getUDValueS("{$identifier}{$targetClass}", "");
     if ($checkedByDefault and !$value) {
         foreach ($this->fields as $field) {
             $this->setValue($field, "1");
         }
     }
     if ($value != "") {
         $value = explode(",", $value);
         foreach ($value as $field) {
             $this->setValue($field, "1");
         }
     }
     $B = new Button("Speichern", "./images/i2/save.gif", "icon");
     $B->onclick("var submitValues = ''; \$j.each(\$j('#{$this->id}').serializeArray(), function(k, v) { submitValues += (submitValues != '' ? ',' : '')+v.name; }); contentManager.rmePCR('mUserdata', '-1', 'setUserdata', ['{$identifier}{$targetClass}', submitValues]" . ($onSuccessFunction != null ? ", {$onSuccessFunction}" : "") . ");");
     $B->style("float:right;margin-top:-25px;margin-right:3px;");
     $this->saveButtonCustom = $B;
     $this->onSubmit = "return false;";
 }
Пример #20
0
 public function getHTML($id, $page)
 {
     $bps = $this->getMyBPSData();
     $this->loadMultiPageMode($id, $page, 0);
     $gui = new HTMLGUIX($this);
     $gui->version("mIncoming");
     #$gui->options(true, true, true, true);
     $gui->name("Incoming");
     $gui->attributes(array("IncomingDir"));
     try {
         if ($bps != -1 and isset($bps["edit"])) {
             return $gui->getBrowserHTML($id);
         }
     } catch (Exception $e) {
     }
     $T = new HTMLTable(3, "new episodes");
     $found = $this->findNewEpisodes();
     foreach ($found as $S) {
         foreach ($S as $E) {
             $T->addRow(array($E["name"], $E["season"], $E["episode"]));
         }
     }
     $Tab = new HTMLSideTable("left");
     $B = new Button("Change\ndirectories", "./trinityDB/Incoming/SetFolder.png");
     $B->onclick("contentManager.loadFrame('contentRight', 'mIncoming', -1, 0, 'mIncomingGUI;edit:true');");
     $Tab->addRow($B);
     $B = $Tab->addButton("Rename\ndownloaded", "redo");
     $B->popup("", "Rename downloaded", "mIncoming", "-1", "renameDownloaded", array("'1'"));
     $B = $Tab->addButton("Create move-\nscript", "redo");
     $B->windowRme("mIncoming", "-1", "createMoveScript", array("'0'"));
     $B = $Tab->addButton("Run move-\nscript", "redo");
     $B->windowRme("mIncoming", "-1", "createMoveScript", array("'1'"));
     $B = $Tab->addButton("Prettifyer", "./trinityDB/Incoming/prettify.png");
     $B->loadFrame("contentLeft", "mIncomingPrettify");
     return ($id == -1 ? $Tab : "") . $T;
 }
Пример #21
0
 public function bricklets()
 {
     $BA = new Button("Bricklet\nhinzufügen", "new");
     $BA->doBefore("\$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
     $BA->rmePCR("Tinkerforge", $this->getID(), "createNew", "", OnEvent::reloadPopup("Tinkerforge"));
     $BA->style("margin:10px;");
     $TE = new HTMLTable(4, "Bricklets");
     $TE->setColWidth(1, 20);
     $TE->setColWidth(2, 35);
     $TE->setColWidth(4, 20);
     $TE->useForSelection(false);
     $TE->maxHeight(400);
     $TE->weight("light");
     $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic");
     $autoLoad = false;
     $AC = anyC::get("TinkerforgeBricklet", "TinkerforgeBrickletTinkerforgeID", $this->getID());
     while ($A = $AC->getNextEntry()) {
         $B = new Button("Master", "bars", "iconicL");
         $B->popup("", "Plot", "TinkerforgeBricklet", $A->getID(), "getControls", "", "", "{width:820}");
         $B->style("float:right;");
         $BD = new Button("Eintrag löschen", "trash_stroke", "iconic");
         $BD->doBefore("\$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
         $BD->onclick("deleteClass('TinkerforgeBricklet','" . $A->getID() . "', function() { Popup.refresh('Tinkerforge'); },'Eintrag wirklich löschen?');");
         if ($A->A("TinkerforgeBrickletUID") == "") {
             $autoLoad = $A->getID();
         }
         $div = "<span id=\"TinkerforgeBrickletUID" . $A->getID() . "\">" . ($A->A("TinkerforgeBrickletUID") != "" ? $A->A("TinkerforgeBrickletUID") : "Neues Bricklet") . "</span>&nbsp;<br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"TinkerforgeBrickletType" . $A->getID() . "\">" . ($A->A("TinkerforgeBrickletType") != "" ? TinkerforgeBricklet::$types[$A->A("TinkerforgeBrickletType")] : "") . "</small>";
         $TE->addRow(array($BD, $B, $div, $BE));
         $TE->addCellEvent(3, "click", "contentManager.selectRow(this); \$j('#editDetailsTinkerforge').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("editAP", "TinkerforgeBricklet", $A->getID(), "0", "function(){ \$j('#editAP').fadeIn(); }") . " });");
     }
     if ($AC->numLoaded() == 0) {
         $TE->addRow("Keine Bricklets eingetragen");
         $TE->addRowColspan(1, 3);
     }
     echo "{$BA}\n\t\t\t<div style=\"float:right;width:400px;height:500px;display:none;\" id=\"editAP\"></div>\n\t\t\t<div id=\"listAP\" style=\"width:400px;height:440px;overflow:auto;\">{$TE}</div>\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t" . ($autoLoad ? OnEvent::script("\$j('#TinkerforgeBrickletUID" . $autoLoad . "').parent().trigger(Touch.trigger);") : "");
 }
Пример #22
0
 public function updateAllTables($echoStatus = false)
 {
     $return = parent::updateAllTables();
     if ($echoStatus) {
         ksort($return);
         echo "<pre style=\"font-size:10px;padding:5px;overflow:auto;max-height:400px;\">";
         foreach ($return as $plugin => $status) {
             echo phynx_mb_str_pad($plugin, 20) . ": {$status}\n";
         }
         echo "</pre>";
     }
     $message = "<p style=\"padding:10px;font-size:20px;color:green;margin-bottom:40px;text-align:center;\">Ihre Datenbank wurde erfolgreich aktualisiert.</p>";
     $action = "userControl.doLogout();";
     $B = new Button("Benutzer abmelden", "./plugins/Installation/abmelden.png", "icon");
     $B->onclick($action);
     $html = $this->box($B, $action, "Jetzt normal<br />weiterarbeiten");
     echo "{$message}<div style=\"width:350px;margin:auto;padding-bottom:40px;\">" . $html . "</div>";
 }
Пример #23
0
 /**
  * Method to display an E-Mail popup for easy E-Mail sending
  * 
  * Requires a method named "getEMailData" in $dataClass which returns an array:
  * array(fromName, fromAddress, recipientName, recipientAddress, subject, body)
  * 
  * Will call $dataClass($dataClassID)::sendEmail afterwards
  * 
  * @param string $dataClass
  * @param string $dataClassID 
  */
 public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null, $onAbortFunction = null, $return = false)
 {
     $c = new $dataClass($dataClassID);
     $data = $c->getEMailData($callbackParameter);
     $html = "";
     $tab = new HTMLTable(2);
     $tab->setColWidth(1, "120px;");
     $tab->addLV("Absender:", "{$data['fromName']}<br /><small>&lt;{$data['fromAddress']}&gt;</small>");
     if (is_array($data["recipients"])) {
         if (count($data["recipients"]) == 1) {
             $tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small>&lt;" . $data["recipients"][0][1] . "&gt;</small>");
         } else {
             $recipients = array();
             foreach ($data["recipients"] as $ID => $Rec) {
                 $recipients[$ID] = new HTMLInput($Rec[0] . " &lt;" . $Rec[1] . "&gt;", "option", $ID);
             }
             $IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", isset($data["default"]) ? $data["default"] : "0", $recipients);
             $IS->id("EMailRecipient{$dataClassID}");
             $tab->addLV("Empfänger:", $IS);
         }
     } else {
         $IS = new HTMLInput("EMailRecipient{$dataClassID}", "text", $data["recipients"]);
         $IS->id("EMailRecipient{$dataClassID}");
         $tab->addLV("Empfänger:", $IS);
     }
     $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />");
     $html .= $tab;
     $html .= "<div style=\"width:94%;margin:auto;\"><textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea></div>";
     #$tab->addRow(array(""));
     #$tab->addRowColspan(1, 2);
     #$tab->addRowClass("backgroundColor0");
     $tab = new HTMLTable(2);
     $tab->setColWidth(1, "120px;");
     if ($onSuccessFunction == null) {
         $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');";
     }
     $BAbort = new Button("Abbrechen", "stop");
     if ($onAbortFunction == null) {
         $BAbort->onclick("Popup.close('Util', 'edit');");
     } else {
         $BAbort->onclick($onAbortFunction);
     }
     $BAbort->style("margin-bottom:10px;margin-top:10px;");
     $BGo = new Button("E-Mail\nsenden", "okCatch");
     $BGo->style("float:right;margin-top:10px;");
     if (strpos($data["body"], "<p") !== false) {
         $BGo->doBefore("nicEditors.findEditor('EMailBody{$dataClassID}').saveContent(); %AFTER");
     }
     $BGo->rmePCR(str_replace("GUI", "", $dataClass), $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", (is_array($data["recipients"]) and count($data["recipients"]) == 1) ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction);
     #$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); ");
     $tab->addRow(array($BGo . $BAbort));
     $tab->addRowColspan(1, 2);
     #$tab->addRowClass("backgroundColor0");
     $html .= $tab;
     if (strpos($data["body"], "<p") !== false) {
         echo OnEvent::script("\n\t\t\t\tsetTimeout(function(){\n\t\t\tnew nicEditor({\n\t\t\t\ticonsPath : './libraries/nicEdit/nicEditorIconsTiny.gif',\n\t\t\t\tbuttonList : ['bold','italic','underline'],\n\t\t\t\tmaxHeight : 400\n\t\t\t}).panelInstance('EMailBody{$dataClassID}');}, 100);");
     }
     if ($return) {
         return $html;
     } else {
         echo $html;
     }
 }
Пример #24
0
 private function getSelectButton()
 {
     $B = new Button("Auswahl hinzufügen", "./images/i2/cart.png");
     $B->onclick(str_replace(array("%COLLECTIONNAME", "%CLASSNAME", "%CLASSID"), array($this->collectionName, $this->className, $this->classID), $this->functionSelect));
     $B->type("icon");
     $B->className("selectionButton");
     return $B;
 }
Пример #25
0
 public function getDesktopLinkButton()
 {
     try {
         if (!PMReflector::implementsInterface(get_class($this->object), "iDesktopLink")) {
             return "";
         }
     } catch (ReflectionException $e) {
         return "";
     }
     $B = new Button("Desktop-Link anlegen", "./images/i2/link.png");
     $B->type("icon");
     $B->style("float:right;margin-right:10px;");
     $B->onclick("DesktopLink.createNew('" . $this->object->getClearClass() . "','" . $this->object->getID() . "','contentLeft','" . $_SESSION["applications"]->getActiveApplication() . "');");
     return $B;
 }
Пример #26
0
 public function getPopup()
 {
     $bps = $this->getMyBPSData();
     $gui = $this->getGUI($this->getID());
     $onSave = "Popup.close('LoginData', 'edit');";
     #$gui->setJSEvent("onSave", "function() { Popup.close('', 'mailServer'); contentManager.reloadFrame('contentRight'); }");
     #$gui->setStandardSaveButton($this,"mLoginData");
     $gui->displayMode("popup");
     $gui->label("server", "Server");
     $gui->label("passwort", "Passwort");
     $html = "";
     #$html2 = "";
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "mailServer") {
         $BAbort = new Button("Abbrechen", "stop");
         $BAbort->onclick("Popup.close('LoginData', 'edit');");
         $BAbort->style("float:right;");
         $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie diese Anwendung lokal auf einem Windows-Rechner betreiben oder direkt über einen SMTP-Server versenden möchten (z.B. Newsletter). Es kann auch notwendig sein, die E-Mail über den korrekten Server zu schicken, um die Ankunft beim Empfänger sicherzustellen.</small></p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "MailServerUserPass");
         $gui->descriptionField("server", "Für eine verschlüsselte Verbindung tragen Sie ein: Protokoll://server.de:Port<br />Also zum Beispiel tls://smtp.1und1.de:465 oder tls://smtp.strato.de:465");
         $gui->type("optionen", "hidden");
     }
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "jabberServer") {
         $BAbort = new Button("Abbrechen", "stop");
         $BAbort->onclick("Popup.close('LoginData', 'edit');");
         $BAbort->style("float:right;");
         #$html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie diese Anwendung lokal auf einem Windows-Rechner betreiben oder direkt über einen SMTP-Server versenden möchten (z.B. Newsletter). Es kann auch notwendig sein, die E-Mail über den korrekten Server zu schicken, um die Ankunft beim Empfänger sicherzustellen.</small></p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "JabberServerUserPass");
         $gui->type("optionen", "hidden");
     }
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "AWS") {
         $BAbort = new Button("Abbrechen", "stop");
         $BAbort->onclick("Popup.close('LoginData', 'edit');");
         $BAbort->style("float:right;");
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "AWSUserPass");
         $gui->label("benutzername", "Access key");
         $gui->label("passwort", "Secret key");
         $gui->type("optionen", "hidden");
         $gui->type("server", "hidden");
     }
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "regID") {
         $BAbort = new Button("Abbrechen", "stop");
         $BAbort->onclick("Popup.close('LoginData', 'edit');");
         $BAbort->style("float:right;");
         #$html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie diese Anwendung lokal auf einem Windows-Rechner betreiben oder direkt über einen SMTP-Server versenden möchten (z.B. Newsletter). Es kann auch notwendig sein, die E-Mail über den korrekten Server zu schicken, um die Ankunft beim Empfänger sicherzustellen.</small></p>";
         $gui->type("UserID", "hidden");
         $gui->type("server", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "RegIDUserPass");
         $gui->type("optionen", "hidden");
     }
     if ($bps != -1 and isset($bps["preset"]) and strpos($bps["preset"], "mailServerAdditional") !== false) {
         $Nr = str_replace("mailServerAdditional", "", $bps["preset"]);
         $BAbort = new Button("Abbrechen", "stop");
         $BAbort->onclick("Popup.close('LoginData', 'edit');");
         $BAbort->style("float:right;");
         $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn eine Absender-Domain nicht über den Standard-Mailserver verschickt werden kann.</small></p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "MailServer{$Nr}UserPass");
         $gui->label("optionen", "Absender-Domain");
         $onSave .= OnEvent::reloadPopup("mInstallation");
         #$gui->type("optionen", "hidden");
     }
     if ($bps != -1 and isset($bps["preset"]) and ($bps["preset"] == "remoteMailServer1" or $bps["preset"] == "remoteMailServer2" or $bps["preset"] == "remoteMailServer3")) {
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "RemoteMailServer" . substr($bps["preset"], -1) . "APIKey");
         $gui->type("optionen", "hidden");
         $gui->type("passwort", "hidden");
         $gui->label("benutzername", "API key");
         $gui->descriptionField("server", "Der Pfad zur openMM-Installation inklusive Protokollangabe. Zum Beispiel https://www.meinMailserver.de/openMM");
         $onSave .= OnEvent::reloadPopup("mVUser");
     }
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "backupFTPServer") {
         $BAbort = new Button("Abbrechen", "stop");
         $BAbort->onclick("Popup.close('LoginData', 'edit');");
         $BAbort->style("float:right;");
         $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie die Backups automatisch auf einen FTP-Server hochladen möchten.</small></p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "BackupFTPServerUserPass");
         $gui->descriptionField("optionen", "Bitte geben Sie hier das Unterverzeichnis an, in das die Datei hochgeladen werden soll");
         $gui->label("optionen", "Verzeichnis");
         #$gui->type("optionen", "hidden");
     }
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "backupSFTPServer") {
         $BAbort = new Button("Abbrechen", "stop");
         $BAbort->onclick("Popup.close('LoginData', 'edit');");
         $BAbort->style("float:right;");
         $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie die Backups automatisch auf einen SFTP-Server hochladen möchten.</small></p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "BackupSFTPServerUserPass");
         $gui->descriptionField("optionen", "Bitte geben Sie hier das Unterverzeichnis an, in das die Datei hochgeladen werden soll");
         $gui->label("optionen", "Verzeichnis");
         #$gui->type("optionen", "hidden");
     }
     if ($bps != -1 and isset($bps["preset"]) and ($bps["preset"] == "googleData" or $bps["preset"] == "GoogleAccountUserPass")) {
         $html = "<p>Bitte beachten Sie: Es werden nur Ihre eigenen Termine synchronisiert.</p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", Session::currentUser()->getID());
         $gui->type("name", "hidden");
         $this->changeA("name", "GoogleAccountUserPass");
         $gui->type("optionen", "hidden");
         $gui->type("server", "hidden");
     }
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "AnySMSUserPass") {
         $html = "";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "AnySMSUserPass");
         #$gui->type("optionen", "hidden");
         #$gui->type("server", "hidden");
         $gui->label("server", "Gateway");
         $gui->label("optionen", "Absender");
         $gui->descriptionField("optionen", "Dies ist vom gewählten Gateway abhängig.");
     }
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "klickTelAPIKey") {
         $html = "";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->label("benutzername", "API-Key");
         $gui->type("name", "hidden");
         $this->changeA("name", "klickTelAPIKey");
         $gui->type("optionen", "hidden");
         $gui->type("server", "hidden");
         $gui->type("passwort", "hidden");
     }
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "adServer") {
         $this->changeA("UserID", "-1");
         $this->changeA("name", "ADServerUserPass");
         #$html = "";
         /*
         			$gui->label("benutzername", "API-Key");
         			$gui->type("optionen", "hidden");
         			$gui->type("server", "hidden");
         			$gui->type("passwort", "hidden");*/
         $gui->type("name", "hidden");
         $gui->type("UserID", "hidden");
         $gui->label("server", "AD-Server");
         $gui->label("optionen", "Benutzer-Pfad");
         $gui->descriptionField("benutzername", "Mit Domain-Name. Z.B. Administator@Furtmeier.dom");
         $gui->descriptionField("optionen", "Bitte geben Sie den LDAP-Pfad zum Benutzer-Verzeichnis ein. Z.B. OU=Benutzer,DC=furtmeier,DC=dom");
         $onSave = "Popup.close('Users', 'edit');";
     }
     #$gui->label("benutzername", "Benutzername");
     $gui->addToEvent("onSave", $onSave);
     echo $html . $gui->getEditHTML();
 }
Пример #27
0
 public function popupDesktop($DeviceID)
 {
     $O = anyC::getFirst("fheOverview", "fheOverviewDeviceID", $DeviceID);
     $d = json_decode($O->A("fheOverviewDesktop"));
     $BD = new Button("Fertig", "bestaetigung");
     $BD->onclick("fheOverview.draggableStop(); " . OnEvent::closePopup("mfheOverview"));
     $BD->style("float:right;margin:10px;");
     echo $BD . "<div style=\"clear:both;\"></div>";
     $T = new HTMLTable(2, "Plugins");
     $T->useForSelection();
     $T->weight("light");
     while ($callback = Registry::callNext("Overview")) {
         $c = $callback->className();
         $B = new Button("Plugin hinzufügen", "arrow_left", "iconic");
         $T->addRow(array($B, $callback->name()));
         $T->addRowEvent("click", OnEvent::rme("mfheOverview", "pluginLoad", array($DeviceID, "'" . $callback->className() . "'"), "function(t){  \$j('#addPlugin{$c}').hide(); \$j('#OverviewDesktop').append(t.responseText); }"));
         $T->setRowID("addPlugin{$c}");
         if (isset($d->{$c})) {
             $T->addRowStyle("display:none;");
         }
     }
     Registry::reset("Overview");
     echo $T;
     echo OnEvent::script("fheOverview.draggableStart({$DeviceID});");
     $T = new HTMLTable(1, "Hintergrundbild");
     $T->weight("light");
     $ID = new Button("Bild löschen", "trash_stroke", "iconicL");
     $ID->style("float:right;");
     $ID->rmePCR("mfheOverview", "-1", "backgroundDelete", $DeviceID, "function(t){\$j('#OverviewDesktop').append(t.responseText); }");
     $I = new HTMLInput("upload", "file", null, array("multiple" => false));
     $I->onchange(OnEvent::rme($this, "backgroudUpload", array($DeviceID, "fileName"), "function(t){\$j('#OverviewDesktop').append(t.responseText); }"));
     $T->addRow($ID . "<div style=\"margin-right:30px;\">" . $I . "</div>");
     echo $T;
 }
Пример #28
0
 function showWarenkorb()
 {
     $AC = anyC::get("Seminar");
     $AC->addAssocV3("SeminarVon", ">=", Util::parseDate("de_DE", Util::formatDate("de_DE", time())));
     $count = array();
     for ($i = 0; $i < 21; $i++) {
         $count[$i] = $i;
     }
     $T = new HTMLTable(3, "Events");
     $T->setTableStyle("width:100%;");
     while ($S = $AC->getNextEntry()) {
         $I = new HTMLInput("AnzahlKarten" . $S->getID(), "select", "0", $count);
         $I->style("width:80px;text-align:right;");
         $I->onchange("CustomerPage.rme('recalc', ['" . $S->getID() . "', this.value], function(response){ \$('#PreisGesamt" . $S->getID() . "').html(response) });");
         if (isset($_SESSION["ticketDataSelection"])) {
             $I->setValue($_SESSION["ticketDataSelection"][$S->getID()]);
         }
         $Adresse = new Adresse($S->A("SeminarAdresseID"));
         $T->addRow(array("<b>" . $S->A("SeminarName") . "</b>, " . Util::CLDateParser($S->A("SeminarVon")) . " ab " . Util::CLTimeParser($S->A("SeminarStart")) . " Uhr, " . $Adresse->A("ort")));
         $T->addRowColspan(1, 3);
         $T->addRow(array($I, Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * 1, true), Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * $I->getValue(), true)));
         $T->addCellStyle(1, "text-align:right;");
         $T->addCellStyle(2, "text-align:right;");
         $T->addCellStyle(3, "text-align:right;");
         $T->addCellID(3, "PreisGesamt" . $S->getID());
         $T->addRow(array("&nbsp;"));
         $T->addRowColspan(1, 3);
     }
     $I = new Button("Weiter", "");
     $I->onclick("CustomerPage.rme('handleForm', \$('#ticketShop').serialize(), function(){ document.location.reload(); })");
     $I->className("submitFormButton");
     $T->addRow($I);
     $T->addRowColspan(1, 3);
     $IA = new HTMLInput("action", "hidden", "handleSelection");
     return "<form id=\"ticketShop\">" . $T . $IA . "</form>";
 }
Пример #29
0
 public function getEditHTML()
 {
     if (BPS::getProperty($this->className . "GUI", "edit") == "ok") {
         return $this->getEditTableHTML();
     }
     ################################################################################
     if ($this->name == null) {
         $this->name = $this->className;
     }
     if ($this->attributes == null) {
         $this->attributes = PMReflector::getAttributesArrayAnyObject($this->object->getA());
     }
     $widths = Aspect::joinPoint("changeWidths", $this, __METHOD__);
     if ($widths == null) {
         $widths = array(700, 132, 218);
     }
     $tab = new HTMLTable(2);
     $tab->setTableStyle("width:{$widths['0']}px;margin-left:10px;");
     $tab->setColWidth(1, "50%");
     $tab->setColWidth(2, "50%");
     $A = $this->object->getA();
     $TSub = new HTMLTable(2);
     $TSub->setColWidth(1, 120);
     $TSub->setColClass(1, "");
     $TSub->setColClass(2, "");
     $TC = clone $TSub;
     $row = array();
     foreach ($this->attributes as $k => $v) {
         if (isset($this->types[$v]) and $this->types[$v] == "hidden") {
             continue;
         }
         if (isset($this->parsers[$v])) {
             $A->{$v} = $this->invokeParser($this->parsers[$v], $A->{$v}, $this->object);
         }
         if (isset($this->types[$v]) and $this->types[$v] == "select") {
             if (isset($this->options[$v]) and isset($this->options[$v][$A->{$v}])) {
                 $A->{$v} = $this->options[$v][$A->{$v}];
             }
         }
         if (isset($this->spaces[$v]) and $this->spaces[$v] != "") {
             if ($k > 0) {
                 $row[] = $TC;
             }
             if ($this->forceNewRow[$v]) {
                 $row[] = "";
                 $tab->addRow($row);
                 $tab->addRowClass("backgroundColor0");
                 $tab->addRowStyle("vertical-align:top;");
                 $row = array();
             }
             if (count($row) == 2) {
                 $tab->addRow($row);
                 $tab->addRowClass("backgroundColor0");
                 $tab->addRowStyle("vertical-align:top;");
                 $row = array();
             }
             $TC = clone $TSub;
             if (trim($this->spaces[$v]) != "") {
                 $TC->addRow(array($this->spaces[$v]));
                 $TC->addRowClass("backgroundColor2");
                 $TC->addRowColspan(1, 2);
             }
         }
         if ($A->{$v} != "") {
             $B = "";
             if (isset($this->fieldButtons[$v])) {
                 $B = $this->fieldButtons[$v];
                 $B->style("float:right;");
             }
             $TC->addLV($this->labels($v) . ":", $B . nl2br($A->{$v}));
             $TC->addRowStyle("vertical-align:top;");
         }
         /*
         			$label = isset($this->labels[$v]) ? $this->labels[$v] : $v;
         
         			$row[] = "<label>".($label != "" ? ucfirst($label).":" : "")."</label>";
         
         
         
         			$row[] = nl2br($A->$v);*/
         /*if(count($row) == 4){
         			$tab->addRow($row);
         			$row = array();
         		}*/
     }
     $row[] = $TC;
     if (count($row) == 1) {
         $row[] = "";
     }
     if (count($row) == 2) {
         $tab->addRow($row);
         $tab->addRowClass("backgroundColor0");
         $tab->addRowStyle("vertical-align:top;");
     }
     $BE = new Button("Eintrag\nbearbeiten", "edit");
     $BE->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionEdit));
     $BE->style("float:left;margin-left:10px;");
     $BD = new Button("Eintrag\nlöschen", "trash");
     $BD->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionDelete));
     $BD->style("float:left;margin-left:10px;");
     $options = "<div style=\"width:{$widths['0']}px;\">" . $BE . $BD . implode("", $this->topButtons) . "</div><div style=\"clear:left;height:10px;width:{$widths['0']}px;\"></div>";
     $appended = "";
     if (count($this->appended) > 0) {
         foreach ($this->appended as $k => $v) {
             $appended .= $v->getHTML();
         }
     }
     $prepended = "";
     if (count($this->prepended) > 0) {
         foreach ($this->prepended as $k => $v) {
             $prepended .= $v->getHTML();
         }
     }
     /*
     		if(count($this->CRMGUIappendedElements) > 0)
     			foreach($this->CRMGUIappendedElements as $k => $v)
     				$appended .= $v->getHTML();*/
     return $options . $prepended . $tab . $appended;
 }
Пример #30
0
 public function buttonDone($data)
 {
     $IOK = new Button("Fertig");
     $IOK->className("submitFormButton");
     $IOK->onclick("\$('#frameSelect').show(); \$('#frameEdit').hide();");
     return $IOK;
 }