function getHTML($id)
 {
     $B = new Button("Element\nlöschen", "trash", "icon");
     $B->rmePCR("poolAnzeigeControl", $this->getID(), "deleteMe", "", OnEvent::closePopup("poolAnzeigeControl") . OnEvent::reload("Screen"));
     $B->style("margin:10px;");
     $gui = new HTMLGUIX($this);
     $gui->name("Element");
     $gui->displayMode("popupS");
     $gui->attributes(array("poolAnzeigeControlCaption", "poolAnzeigeControlLabel", "poolAnzeigeControlNewLine", "poolAnzeigeControlClass", "poolAnzeigeControlSrc", "poolAnzeigeControlServer", "poolAnzeigeControlMaster", "poolAnzeigeControlValue", "poolAnzeigeControlUpdate", "poolAnzeigeControlGroup", "poolAnzeigeControlGroupDelay", "poolAnzeigeControlGroupDelayIf"));
     $gui->label("poolAnzeigeControlNewLine", "Neue Zeile");
     $gui->label("poolAnzeigeControlCaption", "Überschrift");
     $gui->label("poolAnzeigeControlLabel", "Beschriftung");
     $gui->label("poolAnzeigeControlOrder", "Reihenfolge");
     $gui->label("poolAnzeigeControlClass", "Klasse");
     $gui->label("poolAnzeigeControlSrc", "Bild");
     $gui->label("poolAnzeigeControlServer", "Steuerung");
     $gui->label("poolAnzeigeControlGroupDelay", "Verzögerung in s");
     $gui->label("poolAnzeigeControlGroup", "Eigene Gruppe");
     $gui->label("poolAnzeigeControlUpdate", "Update Gruppe(n)");
     $gui->label("poolAnzeigeControlGroupDelayIf", "Wenn");
     $gui->type("poolAnzeigeControlNewLine", "checkbox");
     $gui->type("poolAnzeigeControlServer", "readonly");
     $gui->type("poolAnzeigeControlClass", "select", array("manual" => "Statisch", "load" => "Laden", "value" => "Wert"));
     $gui->type("poolAnzeigeControlGroupDelayIf", "select", array("" => "ohne", "on" => "Ein"));
     if ($this->A("poolAnzeigeControlMasterValues") != "") {
         $gui->type("poolAnzeigeControlMaster", "select", poolAnzeigeControl::values($this->A("poolAnzeigeControlMasterValues")));
     }
     $gui->descriptionField("poolAnzeigeControlUpdate", "Mehrere Gruppen durch Komma trennen");
     $gui->descriptionField("poolAnzeigeControlNewLine", "Fügt eine neue Zeile vor dem Element ein");
     $gui->space("poolAnzeigeControlClass");
     $gui->space("poolAnzeigeControlServer");
     $gui->space("poolAnzeigeControlUpdate");
     return $B . $gui->getEditHTML();
 }
Esempio n. 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>";
     }
 }
Esempio n. 3
0
 public function searchNow($filename)
 {
     $AC = anyC::get("UPnP", "UPnPDefaultDownloadsServer", "1");
     $S = $AC->getNextEntry();
     echo "<p class=\"prettyTitle\">Abspielen auf</p>";
     if ($S == null) {
         die("<p>Es wurde kein Downloads-Server definiert</p>");
     }
     echo "<div style=\"padding-bottom:10px;\">";
     $result = $S->Search($S->A("UPnPDefaultDownloadsDirectory"), "(dc:title contains \"{$filename}\")", "");
     $xml = new SimpleXMLElement($result["Result"]);
     if (count($xml->item) == 0) {
         die("<p>Die Datei wurde nicht gefunden</p>");
     }
     $item = $xml->item[0];
     $AC = anyC::get("UPnP");
     $AC->addAssocV3("UPnPAVTransport", "=", "1");
     while ($U = $AC->getNextEntry()) {
         $B = new Button($U->A("UPnPName"), "arrow_right", "touch");
         $B->rmePCR("UPnP", $S->getID(), "readSetStart", array("'" . $item->attributes()->id . "'", $U->getID()), "function(){ " . OnEvent::closePopup("mUPnP") . " " . OnEvent::popup("Steuerung", "UPnP", $U->getID(), "controls") . " }");
         echo $B;
     }
     #echo "<pre>";
     #print_r($xml);
     #echo "</pre>";
     #$L = new HTMLList();
     #foreach($xml->item AS $item){#".OnEvent::popup("", "UPnP", $this->getID(), "readSetStart", array("'".$item->attributes()->id."'"))."
     #	$L->addItem("<a href=\"#\" onclick=\"return false;\">".$item->children("http://purl.org/dc/elements/1.1/")."</a>");
     #}
     #echo $L;
     #echo $filename;
     echo "<div style=\"clear:both;\"></div></div>";
 }
Esempio n. 4
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>";
 }
Esempio n. 5
0
 function showMessageTimeout($timeout)
 {
     echo $this->messageParser();
     if ($timeout > 0) {
         echo OnEvent::script("window.setTimeout(function(){" . OnEvent::closePopup("Nuntius") . "}, {$timeout} * 1000);");
     }
 }
Esempio n. 6
0
 public function getPopupEinstellungen()
 {
     $F = new HTMLForm("allgemeineWerte", array("OWMApiKey"));
     $F->getTable()->setColWidth(1, 120);
     $F->setValue("OWMApiKey", mUserdata::getGlobalSettingValue("OWMApiKey", ""));
     $F->setSaveRMEPCR("Speichern", "", "mOpenWeatherMap", "-1", "saveEinstellungen", OnEvent::closePopup("mOpenWeatherMap"));
     echo $F;
 }
Esempio n. 7
0
 public function openInPopup($className, $classID, $fieldName)
 {
     $C = new $className($classID);
     $ITA = new HTMLInput("nicEditor", "textarea");
     $ITA->id("nicEditor");
     $ITA->style("width:998px;height:300px;");
     echo $ITA;
     echo OnEvent::script("\n\$j('#nicEditor').val('" . addslashes($C->A($fieldName)) . "'.makeHTML());\n\nsetTimeout(function(){\n\tnew nicEditor({\n\t\ticonsPath : './libraries/nicEdit/nicEditorIconsTiny.gif',\n\t\tbuttonList : ['save','bold','italic','underline','hr'],\n\t\tmaxHeight : 400,\n\n\t\tonSave : function(content, id, instance) {\n\t\t\tif(content.substr(0, 3) != '<p ' && content.substr(0, 3) != '<p>')\n\t\t\t\tcontent = '<p>'+content+'</p>';\n\t\t\t\n\t\t\t" . OnEvent::rme($C, "saveMultiEditField", array("'{$fieldName}'", "content.replace(/<br>/g, '<br />')")) . "\n\n\t\t\t" . OnEvent::closePopup("nicEdit") . "\n\t\t}\n\t}).panelInstance('nicEditor');}, 100);");
 }
Esempio n. 8
0
 public function addSettingPopup()
 {
     $T = new HTMLTable(2);
     $T->setColWidth(1, 20);
     $T->useForSelection(false);
     $S = new System(1);
     $B = new Button("Eintrag erstellen", "./images/i2/cart.png", "icon");
     foreach ($S->types as $k => $v) {
         $T->addRow(array($B, $v->name));
         $T->addRowEvent("click", OnEvent::rme($this, "addSettingNew", array("'{$k}'"), "function(t){ " . OnEvent::closePopup("mSystem") . OnEvent::reload("Right") . " contentManager.loadFrame('contentLeft', 'System', t.responseText); }"));
     }
     echo $T;
 }
Esempio n. 9
0
 function calc($land, $kontonummer, $bankleitzahl, $ibanField, $bicField)
 {
     if ($kontonummer == "" or $bankleitzahl == "") {
         Red::alertD("Bitte tragen Sie Bankleitzahl und Kontonummer ein");
     }
     $url = "http://www.iban.de/iban-berechnen.html";
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_HTTPHEADER, array('User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0', 'Referer: http://www.iban.de/iban-berechnen.html', 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8', 'X-Requested-With: XMLHttpRequest'));
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_POST, 1);
     curl_setopt($ch, CURLOPT_POSTFIELDS, "ibanrechnerCountry={$land}&ibanrechnerBlz={$bankleitzahl}&ibanrechnerKonto={$kontonummer}&ibanToolkit=ibanrechner");
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     $result = curl_exec($ch);
     curl_close($ch);
     $I = new IBAN(trim(str_replace("Die IBAN lautet: ", "", strip_tags($result))));
     $iban = $I->MachineFormat();
     $url = "https://www.s-bausparkasse.at/portal/if_ajax.asp";
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_POST, 1);
     curl_setopt($ch, CURLOPT_POSTFIELDS, "mode=calc.ibanbic.listofbic&cuid=&alt_iban=&iban={$iban}&rechnername=IBAN%2FBIC-Rechner&currentpageid=87&berechnungsdaten=&autocalc=&getresult=&country={$land}&bank={$bankleitzahl}&account=" . str_pad($kontonummer, 10, "0", STR_PAD_LEFT));
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     $result = curl_exec($ch);
     curl_close($ch);
     $ex = explode("&&&", $result);
     $ex[0] = str_replace("listofbic==", "", strip_tags(trim($ex[0])));
     $ex[1] = str_replace("iban==", "", trim($ex[1]));
     $T = new HTMLTable(3, "Gefundene Ergebnisse");
     $T->weight("light");
     $T->useForSelection(false);
     $T->setColWidth(1, 20);
     $T->addHeaderRow(array("", "BIC", "IBAN"));
     foreach (explode("\n", $ex[0]) as $bic) {
         $B = new Button("Diese Kombination verwenden", "arrow_right", "iconic");
         $T->addRow(array($B, trim($bic), $ex[1]));
         $T->addRowEvent("click", "\$j('[name={$ibanField}]').val('{$ex['1']}'); \$j('[name={$bicField}]').val('" . trim($bic) . "'); " . OnEvent::closePopup("IBANCalc"));
     }
     echo $T;
     #echo "<pre>";
     #echo htmlentities(print_r($ex, true));
     #echo($result);
     #echo "</pre>";
 }
Esempio n. 10
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;
 }
Esempio n. 11
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;
 }
Esempio n. 12
0
 public function showCurrentList()
 {
     $BM = new Button("Handy-Version\nanzeigen", "./fheME/Einkaufszettel/mobile.png");
     $BM->style("float:right;margin:10px;");
     $BM->onclick("window.open('" . str_replace("/interface/rme.php", "/ubiquitous/CustomerPage/?CC=Shopping&key=" . substr(Util::eK(), 0, 5), $_SERVER["SCRIPT_NAME"]) . "');");
     #$BH = new Button("Hinzufügen", "bestaetigung", "icon");
     #$BH->style("margin-left:10px;margin-top:10px;float:left;margin-top:-28px;");
     #$BH->onclick("if(\$j('input[name=EinkaufslisteNewEntry]').val() != 'Neuer Eintrag') ".OnEvent::rme($this, "addItem", array("\$j('input[name=EinkaufslisteNewEntry]').val()"), OnEvent::reloadPopup("mEinkaufszettel")));
     $I = new HTMLInput("EinkaufslisteNewEntry", "textarea", "");
     $I->placeholder("Neuer Eintrag");
     $I->style("width:390px;padding:5px;margin-left:5px;font-size:20px;float:left;font-family:monospace;max-width:390px;resize:none;height:35px;max-height:35px;");
     #$I->onfocus("if(this.value == 'Neuer Eintrag') { \$j(this).val('').css('color', 'black'); }");
     #$I->onblur("if(this.value == '') { \$j(this).val('Neuer Eintrag').css('color', 'grey'); }");
     #$I->onkeyup("var currentContent = \$j(this).val(); ".OnEvent::rme($this, "getACData", array("this.value"), "function(transport){ var json = jQuery.parseJSON(transport.responseText); if(json.length >= 1) \$j('#EinkaufslisteNewEntryAC').html(json[0].EinkaufszettelName.replace(currentContent, '<span style=\'color:white;\'>'+currentContent+'</span>')); else \$j('#EinkaufslisteNewEntryAC').html(''); }"));
     $I->onEnter(OnEvent::rme($this, "addItem", array("this.value"), "function(transport){ \$j('#currentList').html(transport.responseText); }") . " \$j(this).val('');");
     $B = new Button("Liste schließen", "stop");
     $B->onclick(OnEvent::closePopup("mEinkaufszettel"));
     $B->style("float:right;margin:10px;");
     #<div id=\"EinkaufslisteNewEntryAC\" style=\"width:390px;height:35px;padding:5px;font-size:20px;margin-top:3px;font-family:monospace;color:grey;float:left;\"></div>
     echo "\n\t\t<div style=\"width:600px;display:inline-block;vertical-align:top;\" id=\"reAddList\">\n\t\t\t" . $this->getListReAddTable() . "\n\t\t</div><div style=\"width:400px;display:inline-block;vertical-align:top;\">\n\t\t\t<div id=\"headerList\">\n\t\t\t{$B}{$BM}\n\t\t\t{$I}<div style=\"clear:both;\"></div></div>\n\t\t\t\n\t\t\t<div id=\"currentList\">" . $this->getListTable() . "</div>\n\t\t</div>\n\t\t\t" . OnEvent::script("\$j('#editDetailsContentmEinkaufszettel').css('overflow', ''); setTimeout(function(){ \$j('input[name=EinkaufslisteNewEntry]').focus(); }, 200);");
 }
Esempio n. 13
0
 public function showCurrentList()
 {
     $B = new Button("Fenster\nschließen", "stop");
     $B->onclick(OnEvent::closePopup("mGericht"));
     $B->style("float:right;margin:10px;");
     echo "\n\t\t<div style=\"width:400px;float:right;\">\n\t\t\t{$B}\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t<div id=\"currentList\">" . $this->getListTable() . "</div>\n\t\t</div>\n\t\t<div style=\"width:385px;\" id=\"reAddList\" style=\"overflow-y:auto;overflow-x:hidden;\">\n\t\t\t" . $this->getListReAddTable() . "\n\t\t</div>\n\t\t<div style=\"clear:both;\"></div>\n\t\t\t";
 }
Esempio n. 14
0
 public static function getCalendarDetails($className, $classID, $T = null)
 {
     $K = new Kalender();
     if ($T == null) {
         $T = new Todo($classID);
     }
     $name = "";
     if ($T->A("TodoClass") == "Projekt" or $T->A("TodoClass") == "GRLBM") {
         $O = $T->getOwnerObject();
         $name = $O->getCalendarTitle();
     } else {
         $name = $T->A("TodoName");
     }
     $day = $T->A("TodoTillDay");
     if ($T->A("TodoFromDay") != "0") {
         $day = $T->A("TodoFromDay");
     }
     $time = $T->A("TodoTillTime");
     if ($T->A("TodoFromTime") != "0") {
         $time = $T->A("TodoFromTime");
     }
     $KE = new KalenderEvent($className, $classID, $K->formatDay($day), $K->formatTime($time), $name);
     #echo $T->A("TodoOrt");
     if ($T->A("TodoClass") == "WAdresse") {
         $O = $T->getOwnerObject();
         $KE->value("Kunde", $O->getHTMLFormattedAddress());
     }
     $KE->value("Typ", TodoGUI::types($T->A("TodoType")));
     $KE->value("Ort", $T->A("TodoLocation"));
     #$KE->value("Status", TodoGUI::getStatus($T->A("TodoStatus")));
     $KE->owner($T->A("TodoUserID"));
     if ($T->A("TodoClass") == "WAdresse") {
         $KE->value("Telefon", $O->A("tel"));
         $KE->value("Notiz", nl2br($O->A("bemerkung")));
         $KE->canNotify(true, $T->A("TodoNotified") == "1");
         if ($T->A("TodoType") == "1" and Session::isPluginLoaded("mAkquise")) {
             $B = new Button("Akquise", "./lightCRM/Akquise/callTel.png");
             #$B->doBefore(OnEvent::rme($T, "setStatus", array("'2'"), OnEvent::closePopup("mKalender").OnEvent::reload("Screen"))." %AFTER");
             $B->doBefore(OnEvent::closePopup("mKalender") . "contentManager.emptyFrame('contentScreen'); %AFTER");
             $B->loadFrame("contentLeft", "WAdresse", $T->A("TodoClassID"), 0, "mWAdresseGUI;Akquise:1;from:mKalender");
             #$B->popup("", "Akquise", "mAkquise", "-1", "showTelPopup", array($T->A("TodoClassID")), "", "{width: 950, top:20, hPosition:'center'}");
             $KE->addTopButton($B);
         }
     }
     $KE->allDay($T->A("TodoAllDay") == "1");
     if ($T->A("TodoClass") == "Projekt" and $O->A("ProjektKunde") != "0") {
         $Adresse = new Adresse($O->A("ProjektKunde"));
         $KE->value("Telefon", $Adresse->A("tel"));
     }
     if ($T->A("TodoClass") == "GRLBM") {
         $Auftrag = new Auftrag($O->A("AuftragID"));
         $Adresse = new Adresse($Auftrag->A("AdresseID"));
         $KE->value("Telefon", $Adresse->A("tel"));
     }
     $KE->status($T->A("TodoStatus"));
     $KE->endDay($K->formatDay($T->A("TodoTillDay")));
     $KE->endTime($K->formatTime($T->A("TodoTillTime")));
     $KE->icon(TodoGUI::typesImage($T->A("TodoType"), true));
     $KE->summary(nl2br($T->A("TodoDescription")));
     if ($T->A("TodoExceptionForID") != "0") {
         $KE->exception($T->A("TodoExceptionStarttime"), $T->A("TodoIsDeleted") == "1", $T->A("TodoExceptionForID"));
     }
     if ($T->A("TodoRemind") != "-1") {
         $KE->remind($T->A("TodoRemind") / 60, $T->A("TodoReminded"));
     }
     $editMethod = "editInPopup";
     if ($T->A("TodoOrganizer") != "") {
         $editMethod = null;
         $KE->organizer($T->A("TodoOrganizer"));
     }
     if (!$T->A("TodoDoneTime")) {
         $KE->editable($editMethod, "deleteFromCalendar");
     }
     if ($T->A("TodoOrganizer") == "" and !$T->A("TodoDoneTime")) {
         $KE->repeatable("editRepeatable");
     }
     $KE->location($T->A("TodoLocation"));
     $KE->repeat($T->A("TodoRepeat") != "", $T->A("TodoRepeat"), $T->A("TodoRepeatWeekOfMonth") * 1, $T->A("TodoRepeatDayOfWeek"), $T->A("TodoRepeatInterval"), $T->A("TodoRepeatUntil"));
     $KE->UID("TodoID" . $T->getID() . "@" . substr(Util::eK(), 0, 20));
     $KE->closeable($T->A("TodoDoneTime"), $T->A("TodoReport"));
     if (!$T->A("TodoDoneTime")) {
         $KE->canInvite();
     }
     return $KE;
 }
Esempio n. 15
0
 public function openInPopup($className, $classID, $fieldName)
 {
     $C = new $className($classID);
     $tinyMCEID = "tinyMCEEditor" . rand(100, 9000000);
     $ITA = new HTMLInput("tinyMCEEditor", "textarea", $C->A($fieldName));
     $ITA->id($tinyMCEID);
     $ITA->style("width:1000px;height:300px;");
     echo "<div style=\"width:1000px;\">" . $ITA . "</div>";
     $buttons = "save | undo redo | pastetext | styleselect fontsizeselect fontselect | bold italic underline forecolor | hr code fullscreen";
     echo OnEvent::script("\n\t\t\t\$j('#{$tinyMCEID}').css('height', contentManager.maxHeight());\nsetTimeout(function(){\n\t" . $this->editorDokument($tinyMCEID, "function(content){" . OnEvent::rme($C, "saveMultiEditField", array("'{$fieldName}'", "content.getContent()")) . "" . OnEvent::closePopup("tinyMCE") . "}", $buttons) . "\n\t\t\t\n\t\t}, 100);");
 }
Esempio n. 16
0
 public function getWindow($redo = false)
 {
     register_shutdown_function('BackupManagerGUIFatalErrorShutdownHandler');
     $F = new File(Util::getRootPath() . "system/Backup");
     if (!$F->A("FileIsWritable")) {
         $B = new Button("Achtung", "restrictions");
         $B->type("icon");
         $B->style("float:left;margin-right:10px;");
         $T = new HTMLTable(1);
         $T->addRow($B . "Es können keine Backups von Ihrer Datenbank angelegt werden, da das Verzeichnis /system/Backup nicht durch den Webserver beschreibbar ist.");
         $T->addRow("Machen Sie das Verzeichnis mit einem FTP-Programm beschreibbar. Klicken Sie dazu mit der rechten Maustaste auf das Verzeichnis auf dem Server, wählen Sie \"Eigenschaften\", und geben Sie den Modus 777 an, damit es durch den Besitzer, die Gruppe und alle Anderen les- und schreibbar ist.");
         $BRefresh = new Button("Aktualisieren", "refresh");
         $BRefresh->rmePCR("BackupManager", "", "getWindow", "", "Popup.displayNamed('BackupManagerGUI','Backup-Manager',transport);");
         $BRefresh->style("float:right;");
         $T->addRow($BRefresh);
         $T->addRow("");
         $T->addRowClass("backgroundColor0");
         $T->addRow($this->noBackupButton());
         die($T);
     }
     $html = "";
     if (!BackupManagerGUI::checkForTodaysBackup() or $redo) {
         $T = new HTMLTable(1);
         if ($redo) {
             unlink(BackupManagerGUI::getNewBackupName());
         }
         $BOK = $this->makeBackupOfToday();
         $F = new File(BackupManagerGUI::getNewBackupName());
         $F->loadMe();
         if ($BOK === basename(BackupManagerGUI::getNewBackupName()) and $F->A("FileSize") > 100) {
             $B = new Button("Backup abgeschlossen", "okCatch");
             $B->type("icon");
             $B->style("float:left;margin-right:10px;");
             $T->addRow($B . "Das Backup wurde erfolgreich abgeschlossen!<br />Die Größe der Sicherungsdatei beträgt <strong>" . Util::formatByte($F->A("FileSize"), 2) . "</strong>");
             $T->addRowClass("backgroundColor0");
             try {
                 $ftpUpload = $this->FTPUpload(Util::getRootPath() . "system/Backup/{$BOK}");
                 if ($ftpUpload === true) {
                     $B = new Button("FTP-Upload erfolgreich", "okCatch");
                     $B->type("icon");
                     $B->style("float:left;margin-right:10px;");
                     $T->addRow(array($B . "Das Backup wurde erfolgreich auf den FTP-Server hochgeladen"));
                 }
             } catch (Exception $e) {
                 $T->addRow(array($B . $e->getMessage()));
             }
             $html .= $T;
         } else {
             $B = new Button("Es ist ein Fehler aufgetreten", "stop");
             $B->type("icon");
             $B->style("float:left;margin-right:10px;");
             $T->addRow($B . "Beim Erstellen des Backups ist ein Fehler aufgetreten: {$BOK}");
             $html .= $T;
         }
         $html .= OnEvent::script(OnEvent::frame("desktopLeft", "Desktop", "2"));
         #"<script type=\"text/javascript\">contentManager.reloadFrame('contentLeft');</script>";
     }
     $gesamt = 0;
     $data = $this->getBackupsList();
     $i = 0;
     $maxD = 5;
     if (count($data) < $maxD) {
         $maxD = count($data);
     }
     $TF = new HTMLTable(2, "Backups ({$maxD}/" . count($data) . ")");
     $TF->addColStyle(2, "text-align:right;");
     $TF->setColWidth(2, "80px");
     foreach ($data as $name => $size) {
         if ($i < 5) {
             if ($name == basename(BackupManagerGUI::getNewBackupName())) {
                 $name = "<span style=\"color:green;\">{$name}</span>";
             }
             $TF->addRow(array($name, Util::formatByte($size, 2)));
         }
         $i++;
         $gesamt += $size;
     }
     $TF->addRow("");
     $TF->addRowClass("backgroundColor0");
     $TF->addRow(array("<b>Gesamt:</b>", "<b>" . Util::formatByte($gesamt, 2) . "</b>"));
     $TF->addCellStyle(1, "text-align:right");
     $TF->addRow(array("Diese Backups können als Admin-Benutzer im Installation-Plugin heruntergeladen und wiederhergestellt werden."));
     $TF->addRowColspan(1, 2);
     $TF->addRow("");
     $TF->addRowClass("backgroundColor0");
     $TF->addRow(array($this->noBackupButton()));
     $TF->addRowColspan(1, 2);
     $BC = new Button("Fenster\nschließen", "bestaetigung");
     $BC->onclick(OnEvent::closePopup("", "BackupManagerGUI"));
     $BC->style("float:right;margin:10px;");
     $BD = new Button("Details\nanzeigen", "down");
     $BD->onclick("\$j('#BMMoreDetails').slideToggle();");
     $BD->style("margin:10px;");
     $BD->className("backgroundColor0");
     echo $html . $BC . $BD . "<div style=\"clear:both;\"></div><div id=\"BMMoreDetails\" style=\"display:none;\">" . $TF . "</div>";
 }
Esempio n. 17
0
 private function throwError($title, $message, $list = "")
 {
     $T = new HTMLTable(1);
     $BE = new Button($title, "warning", "icon");
     $BE->style("float:left;margin-right:10px;margin-bottom:15px;");
     $T->addRow(array($BE . $message));
     if ($list != "") {
         $T->addRow($list);
     }
     $B = new Button("Aktualisierung\nbeenden", "bestaetigung");
     $B->style("margin:10px;");
     $B->onclick(OnEvent::closePopup("mPatch"));
     die($T . $B);
 }
Esempio n. 18
0
 public function sendMessagePopup()
 {
     $AC = anyC::get("Device");
     $AC->addOrderV3("DeviceName");
     $B = new Button("Alle", "fullscreen", "touch");
     $B->className("nuntiusMessageTo");
     $B->id("nuntiusMessageTarget0");
     $B->onclick("\$j('.nuntiusMessageTo:not(#nuntiusMessageTarget0)').slideToggle(); \$j('#nuntiusMessageContainer').slideToggle();");
     $L = $B;
     while ($D = $AC->getNextEntry()) {
         $B = new Button($D->A("DeviceName"), "iphone", "touch");
         $B->className("nuntiusMessageTo");
         $B->id("nuntiusMessageTarget" . $D->getID());
         $B->onclick("\$j('.nuntiusMessageTo:not(#nuntiusMessageTarget" . $D->getID() . ")').slideToggle(); \$j('#nuntiusMessageContainer').slideToggle();");
         $L .= $B;
     }
     $BS = new Button("Senden", "arrow_right", "touch");
     $BS->style("margin-top:0px;height:190px;margin-bottom:0px;");
     $BS->rmePCR("mNuntius", "-1", "sendMessage", array("\$j('.nuntiusMessageTo:visible').attr('id').replace('nuntiusMessageTarget', '')", "\$j('[name=NuntiusMessage]').val()", "'Device:'+\$j.jStorage.get('phynxDeviceID', -1)"), "function(){ " . OnEvent::closePopup("mNuntius") . " }");
     $I = new HTMLInput("NuntiusMessage", "textarea");
     $I->style("width:100%;height:200px;max-width:400px;font-size:15px;");
     $I->placeholder("Nachricht...");
     echo "\n\t\t\t<div id=\"nuntiusTargets\" style=\"padding-top:15px;padding-bottom:1px;\">\n\t\t\t\t" . $L . "\n\t\t\t</div>\n\t\t\t<div style=\"display:none;padding-bottom:1px;\" id=\"nuntiusMessageContainer\">\n\t\t\t\t<div style=\"width:100px;float:right;\">{$BS}</div><div style=\"width:300px;\">{$I}</div>\n\t\t\t</div>";
 }
Esempio n. 19
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;
 }
Esempio n. 20
0
 public static function newSession($physion, $application, $plugin, $cloud = "", $title = "", $icon = "")
 {
     echo "<p>Bitte haben Sie etwas Geduld, während die neue Sitzung initialisiert wird...</p><iframe onload=\"window.open(contentManager.getRoot()+'?physion={$physion}&application={$application}&plugin={$plugin}" . ($cloud != "" ? "&cloud={$cloud}" : "") . "" . ($title != "" ? "&title={$title}" : "") . "" . ($icon != "" ? "&icon={$icon}" : "") . "');" . OnEvent::closePopup("Util") . "\" src=\"interface/rme.php?class=Users&construct=&method=doLogin&parameters=%27" . Session::currentUser()->A("username") . "%27,%27" . Session::currentUser()->A("SHApassword") . "%27,%27" . Applications::activeApplication() . "%27,%27" . Session::currentUser()->A("language") . "%27&physion={$physion}" . ($cloud != "" ? "&cloud={$cloud}" : "") . "\" style=\"display:none;\"></iframe>";
 }
Esempio n. 21
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();
 }
Esempio n. 22
0
 public function previewWindow()
 {
     #echo $this->getID();
     #$relPath = $this->getRelPath();
     #echo $this->A("FileMimetype");
     $BD = new Button("Datei\nherunterladen", "save");
     $BD->style("margin:10px;float:right;");
     $BD->windowRme("File", $this->getID(), "download");
     $BD->onclick("" . OnEvent::closePopup("File"));
     $display = "";
     if ($this->A("FileIsDir") == "0") {
         switch ($this->A("FileMimetype")) {
             case "image/jpeg":
             case "image/png":
             case "image/gif":
             case "image/svg":
             case "image/svg+xml":
                 $display .= "{$BD}<div style=\"clear:both;width:600px;max-height:450px;overflow:auto;\"><img style=\"margin:10px;max-width:560px;\" src=\"data:" . $this->A("FileMimetype") . ";base64," . base64_encode(file_get_contents($this->getID())) . "\" /></div>";
                 break;
             case "text/plain":
             case "text/x-php":
             case "text/x-c++":
                 $display = "{$BD}<div style=\"clear:both;width:600px;max-height:450px;overflow:auto;\"><p>" . highlight_file($this->ID, true) . "</p></div>";
                 break;
             case "application/pdf":
                 $display = "<script type=\"text/javascript\">" . OnEvent::window($this, "previewPDF") . OnEvent::closePopup("File") . "</script>";
                 break;
             default:
                 $display = "<div  class=\"highlight\">{$BD}<p style=\"padding-top:10px;\">Es steht leider keine Vorschau<br />für diesen Dateityp zur Verfügung.</p><div style=\"clear:both;\"></div>";
         }
     } else {
         $display = "Verzeichnis";
     }
     echo $display;
 }
Esempio n. 23
0
 public function share()
 {
     $fields = array();
     $US = Users::getUsers();
     while ($U = $US->getNextEntry()) {
         if ($U->getID() == Session::currentUser()->getID()) {
             continue;
         }
         $fields[] = "User" . $U->getID();
     }
     $US->resetPointer();
     echo "<p>In diesem Fenster bestimmen Sie andere Systembenutzer, die auf Ihren Kalender zugreifen können. Falls es andere Systembenutzer gibt.</p>";
     if (count($fields) == 0) {
         return;
     }
     $F = new HTMLForm("shareMailBox", $fields);
     $F->getTable()->setColWidth(1, 120);
     #$F->setValue("MailKontoID", $MailKontoID);
     #$F->setType("MailKontoID", "hidden");
     while ($U = $US->getNextEntry()) {
         $F->setLabel("User" . $U->getID(), $U->A("name"));
         $F->setType("User" . $U->getID(), "select", null, array("none" => "kein Zugriff", "read" => "lesen", "read.create" => "lesen und erstellen"));
     }
     $UD = new mUserdata();
     $shareWith = $UD->getAsArray("shareCalendar");
     foreach ($shareWith as $v => $n) {
         $v = str_replace("shareCalendarTo", "", $v);
         $F->setValue("User{$v}", $n);
     }
     $F->setSaveRMEPCR("Speichern", "", "mKalender", "-1", "saveShare", OnEvent::closePopup("mKalender"));
     echo $F;
 }
Esempio n. 24
0
 public function discoverNow($reloadWhat = null, $force = false, $quiet = false)
 {
     $last = mUserdata::getGlobalSettingValue("UPnPLastDiscover", 0);
     if (time() - $last < 3600 * 3.5 and !$force) {
         return;
     }
     $C = new phpUPnP();
     $result = $C->mSearch();
     #print_r($result);
     if (!$quiet) {
         echo "<p>Gefundene Geräte:</p>";
     }
     #$locations = array();
     $L = new HTMLList();
     $L->addListStyle("list-style-type:none;");
     $foundLocations = array();
     #echo "<pre style=\"padding:5px;font-size:9px;overflow:auto;height:400px;\">";
     #print_r($result);
     #echo "</pre>";
     foreach ($result as $r) {
         if (isset($foundLocations[$r["location"]])) {
             continue;
         }
         $info = file_get_contents($r["location"]);
         if ($info === false) {
             continue;
         }
         $xml = new SimpleXMLElement($info);
         $services = array();
         foreach ($xml->device->serviceList->service as $service) {
             foreach (self::$desiredServices as $k => $S) {
                 if ($service->serviceId[0] == $S) {
                     $services[$k] = $service;
                 }
             }
         }
         #echo "<pre>";
         #print_r($xml->device->UDN);
         #echo "</pre>";
         $F = new Factory("UPnP");
         $F->sA("UPnPUDN", $xml->device->UDN);
         $L->addItem($xml->device->friendlyName);
         $U = $F->exists(true);
         if ($U !== false) {
             $U->changeA("UPnPLocation", $r["location"]);
             #$U->changeA("UPnPName", $xml->device->friendlyName);
             $U->changeA("UPnPModelName", $xml->device->modelName);
             $U->changeA("UPnPUDN", $xml->device->UDN);
             foreach (self::$desiredServices as $S => $nil) {
                 $U->changeA("UPnP{$S}", 0);
             }
             foreach ($services as $S => $service) {
                 $U->changeA("UPnP{$S}", 1);
                 $U->changeA("UPnP" . $S . "SCPDURL", $service->SCPDURL[0] . "");
                 $U->changeA("UPnP" . $S . "controlURL", $service->controlURL[0] . "");
             }
             #echo "save";
             $U->saveMe();
         } else {
             $F->sA("UPnPLocation", $r["location"]);
             $F->sA("UPnPName", $xml->device->friendlyName);
             $F->sA("UPnPModelName", $xml->device->modelName);
             foreach (self::$desiredServices as $S => $nil) {
                 $F->sA("UPnP{$S}", 0);
             }
             foreach ($services as $S => $service) {
                 $F->sA("UPnP{$S}", 1);
                 $F->sA("UPnP" . $S . "SCPDURL", $service->SCPDURL[0] . "");
                 $F->sA("UPnP" . $S . "controlURL", $service->controlURL[0] . "");
             }
             #echo "store";
             $F->store();
         }
         $foundLocations[$r["location"]] = true;
     }
     $AC = anyC::get("UPnP");
     while ($U = $AC->getNextEntry()) {
         if (!isset($foundLocations[$U->A("UPnPLocation")])) {
             $U->deleteMe();
         }
     }
     if (!$quiet) {
         echo $L;
     }
     $B = new Button("OK", "bestaetigung");
     $B->style("float:right;margin:10px;");
     if ($reloadWhat == "targets") {
         $B->onclick(OnEvent::closePopup("mUPnP") . " UPnP.targetSelection();");
     }
     if ($reloadWhat == "sources") {
         $B->onclick(OnEvent::closePopup("mUPnP") . " UPnP.sourceSelection();");
     }
     if ($reloadWhat) {
         echo $B . "<div style=\"clear:both;\"></div>";
     }
     mUserdata::setUserdataS("UPnPLastDiscover", time(), "", -1);
     #echo "</pre>";
 }