Exemple #1
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;
     }
 }
 function getHTML($id, $page)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck("Templates");
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     if ($U == null) {
         $t = new HTMLTable(1);
         $t->addRow("Sie haben keine Domain ausgewählt.<br /><br />Bitte wählen Sie eine Domain im Domain-Plugin, indem Sie auf das graue Kästchen in der Liste auf der rechten Seite klicken.");
         return $t->getHTML();
     }
     $this->addAssocV3("TemplateDomainID", "=", $U);
     $this->addAssocV3("TemplateDomainID", "=", "0", "OR");
     $this->addOrderV3("templateType", "ASC");
     #if($this->A == null) $this->lCV3($id);
     $gui->showFilteredCategoriesWarning($this->filterCategories(), $this->getClearClass());
     $gesamt = $this->loadMultiPageMode($id, $page, 0);
     $gui->setMultiPageMode($gesamt, $page, 0, "contentRight", str_replace("GUI", "", get_class($this)));
     $gui->setName("Template");
     if ($this->collector != null) {
         $gui->setAttributes($this->collector);
     }
     $gui->setShowAttributes(array("aktiv", "name"));
     $gui->setParser("aktiv", "TemplatesGUI::aktivParser", array("\$aid"));
     $gui->setColWidth("aktiv", "20px");
     $gui->setDisplayGroup("templateType", $this->getAvailableCategories());
     $gui->setCollectionOf($this->collectionOf);
     try {
         return $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
Exemple #3
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>";
 }
Exemple #4
0
 public function getHTML($id, $page)
 {
     $this->addAssocV3("DateiClassID", "=", $this->classID);
     $this->addAssocV3("DateiClass", "=", $this->className);
     $this->lCV3($id);
     $gui = new HTMLGUI();
     $gui->setName("Dateien");
     $gui->setAttributes($this->collector);
     $gui->setCollectionOf($this->collectionOf);
     $gui->setShowAttributes(array("DateiName"));
     $gui->setParser("DateiName", "mDateiGUI::nameParser", array("\$DateiPath", "\$DateiIsDir", "\$DateiSize"));
     $gui->setIsDisplayMode(true);
     if (!$this->viewOnly) {
         $gui->setDeleteInDisplayMode(true);
     }
     $t = new HTMLTable(1);
     if ($this->classID != null and !$this->viewOnly) {
         $B = new Button("Datei\nhinzufügen", "computer");
         $B->select(true, "mFile", $this->onAddClass != null ? $this->onAddClass : "'+lastLoadedLeftPlugin+'", $this->classID, "addFile");
         $B->customSelect("contentRight", $this->classID, "mFile", "{$this->onAddClass}.addFile");
         $t->addRow($B);
         #$t->addRow(array("<input onclick=\"loadFrameV2('contentRight','mFile','mFileGUI;selectionMode:multiSelection,".($this->onAddClass != null ? $this->onAddClass : "'+lastLoadedLeftPlugin+'").",$this->classID,addFile,'+lastLoadedRightPlugin+',".($this->onReloadFrame != null ? $this->onReloadFrame : "contentLeft").",".($this->onReloadClass != null ? $this->onReloadClass : "'+lastLoadedLeftPlugin+'").",".($this->onReloadID != null ? $this->onReloadID : $this->classID)."');\" type=\"button\" class=\"backgroundColor3 bigButton\" style=\"background-image:url(./images/navi/computer.png);\" value=\"Datei\nhinzufügen\" />"));
     }
     $gui->setJSEvent("onDelete", $this->onDeleteFunction == null ? "function() { contentManager.reloadFrame('contentLeft'); }" : $this->onDeleteFunction);
     try {
         if ($this->viewOnly and $this->numLoaded() == 0) {
             return "";
         }
         return $t->getHTML() . $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
Exemple #5
0
 public function getAngebote($data)
 {
     if (!$this->loggedIn) {
         return "TIMEOUT";
     }
     $html = "";
     $T = new HTMLTable(2);
     #, "Bitte wählen Sie einen Lieferschein");
     $T->setTableStyle("width:100%;margin-top:10px;");
     $T->setColWidth(1, 130);
     $T->useForSelection(false);
     $T->maxHeight(400);
     $AC = anyC::get("GRLBM", "isA", "1");
     $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID");
     $AC->addAssocV3("UserID", "=", Session::currentUser()->getID());
     $AC->addAssocV3("status", "=", "open");
     #$AC->addOrderV3("datum", "DESC");
     $AC->addOrderV3("nummer", "DESC");
     #$AC->setLimitV3(100);
     #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID");
     $i = 0;
     while ($B = $AC->n()) {
         $Adresse = new Adresse($B->A("AdresseID"));
         $T->addRow(array("<span style=\"font-size:20px;font-weight:bold;\">" . $B->A("prefix") . $B->A("nummer") . "</span><br><span style=\"color:grey;\">" . Util::CLDateParser($B->A("datum")) . "</span>", $Adresse->getHTMLFormattedAddress()));
         $T->addCellStyle(1, "vertical-align:top;");
         $T->addRowStyle("cursor:pointer;border-bottom:1px solid #ccc;");
         #if($i % 2 == 1)
         #	$T->addRowStyle ("background-color:#eee;");
         $T->addRowEvent("click", "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\t\n\t\t\t\tCustomerPage.rme('getAuftrag', {GRLBMID: " . $B->getID() . "}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentLeft').html(transport); \n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');\n\t\t\t\t\t\n\t\t\t\tCustomerPage.rme('getArtikel', {GRLBMID: " . $B->getID() . ", query : '', KategorieID: ''}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentRight').html(transport); \n\t\t\t\t\t\t\$('.selected').removeClass('selected');\n\t\t\t\t\t\t\$('#frameSelect').hide(); \$('#frameEdit').show();\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');");
         $i++;
     }
     $html .= $T;
     return $html;
 }
 function getHTML($id)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck("mNavigation");
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     if ($U == null) {
         $t = new HTMLTable(1);
         $t->addRow("Sie haben keine Domain ausgewählt.<br /><br />Bitte wählen Sie eine Domain im Domain-Plugin, indem Sie auf das graue Kästchen in der Liste auf der rechten Seite klicken.");
         return $t->getHTML();
     }
     $this->addOrderV3("DomainID", "ASC");
     $this->addOrderV3("sort", "ASC");
     if ($U != null) {
         $this->addAssocV3("DomainID", "=", "{$U}");
     }
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $gui->setName(get_parent_class($this));
     if ($this->collector != null) {
         $gui->setAttributes($this->collector);
     }
     $gui->setDisplayGroup("DomainID");
     $gui->setDisplayGroupParser("mNavigationGUI::DGParser");
     $gui->setShowAttributes(array("name", "sort"));
     $gui->setCollectionOf($this->collectionOf);
     try {
         return $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
 function addRow($content)
 {
     parent::addRow($content);
     #$this->addRowClass("backgroundColor0");
     #$this->addCellStyle(1, "background-color:transparent;");
     #$this->addColStyle(1, "background-color:transparent;");
     #$this->addRowStyle("background-color:transparent;");
 }
Exemple #8
0
 /**
  * Popup zur Konfiguration eines Servers.
  */
 public function getConfigPopup($echo = true)
 {
     // Button
     $BCreate = new Button("Server\nhinzufügen", "new");
     $BCreate->rmePCR("mxCal", "-1", "createNewServer", array(), OnEvent::reloadPopup("mxCal"));
     $htmlTableButton = new HTMLTable(1);
     $htmlTableButton->addRow($BCreate);
     // Liste der konfigurierten Server
     $userId = $_SESSION["S"]->getCurrentUser()->getID();
     $T = new HTMLTable(1, "xCal Server");
     $BDeleteRaw = new Button("Eintrag löschen", "./images/i2/delete.gif", "icon");
     $BDeleteRaw->style("float: right;");
     $serverList = anyC::get("xCal", "xCalUserID", $userId);
     $counter = 0;
     while ($S = $serverList->getNextEntry()) {
         $BDelete = clone $BDeleteRaw;
         $BDelete->onclick("deleteClass('xCal','" . $S->getID() . "', function() { Popup.refresh('mxCal'); }, 'Eintrag wirklich löschen?');");
         $F = new HTMLForm("xCal_" . $S->A("xCalID"), array("xCalName", "xCalUrl", "xCalServerActive"));
         $F->getTable()->setColWidth(1, 120);
         $F->setValues($S);
         $F->setLabel("xCalName", "Bezeichnung");
         $F->setLabel("xCalUrl", "URL");
         $F->setLabel("xCalServerActive", "Für den Import verwenden");
         $F->setType("xCalServerActive", "checkbox");
         $F->useRecentlyChanged();
         $F->setSaveClass("xCal", $S->getID(), "''");
         $display = "none";
         if ($S->A("xCalName") == "" && $S->A("xCalUrl") == "") {
             $display = "";
         }
         $div = "<div\n\t\t\t\t\tonmouseover=\"this.className = 'backgroundColor3';\" \n\t\t\t\t\tonmouseout=\"this.className = '';\" \n\t\t\t\t\tstyle=\"padding:3px;cursor:pointer;\" \n\t\t\t\t\tonclick=\"if(\$('APDetails" . $S->getID() . "').style.display == 'none') new Effect.BlindDown('APDetails" . $S->getID() . "'); else new Effect.BlindUp('APDetails" . $S->getID() . "');\">\n\t\t\t\t\t{$BDelete}<span id=\"APPosition" . $S->getID() . "\">" . ($S->A("xCalName") != "" ? $S->A("xCalName") : "Neuer Server") . "</span>&nbsp;<br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"APName" . $S->getID() . "\">" . ($S->A("xCalServerActive") == "1" ? "Import aktiviert" : "Import deaktiviert") . "&nbsp;</small>\n\t\t\t\t</div>";
         $T->addRow(array($div . "<div id=\"APDetails" . $S->getID() . "\" style=\"display:" . $display . ";\">" . $F . "</div>"));
         $T->addRowClass("backgroundColor0");
         $T->addCellClass(1, "borderColor1");
         $counter++;
     }
     if ($counter == 0) {
         $T->addRow("Keine Server eingetragen!");
     }
     if ($echo == "" || $echo === true) {
         echo $htmlTableButton . $T;
     } else {
         return $htmlTableButton . $T;
     }
 }
Exemple #9
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;
 }
 public function getWindowHTML()
 {
     $bps = $this->getMyBPSData();
     #print_r($bps);
     $v = false;
     $b = false;
     $von = "Bitte ziehen Sie ein <img src=\"./images/i2/add.png\" style=\"margin-bottom:-5px;\" />-Symbol auf dieses Feld.";
     $bis = "Bitte ziehen Sie ein <img src=\"./images/i2/add.png\" style=\"margin-bottom:-5px;\" />-Symbol auf dieses Feld.";
     if ($bps != -1 and isset($bps["VonClass"])) {
         $VonClass = $bps["VonClass"];
         $VonClass = new $VonClass($bps["VonID"]);
         $von = $VonClass->getCategorizerLabel();
         $v = true;
     }
     if ($bps != -1 and isset($bps["BisClass"])) {
         $BisClass = $bps["BisClass"];
         $BisClass = new $BisClass($bps["BisID"]);
         $bis = $BisClass->getCategorizerLabel();
         $b = true;
     }
     $t = new HTMLTable(2);
     $t->addColStyle(1, "width:120px;");
     $t->addRow(array("<label>Von:</label>", $von));
     $t->addCellID(2, "droppableVon");
     $t->addCellStyle(2, "height:30px;");
     $t->addRow(array("<label>Bis:</label>", $bis));
     $t->addCellID(2, "droppableBis");
     $t->addCellStyle(2, "height:30px;");
     if ($v and $b) {
         $K = $BisClass->getCategorizerOptions();
         $o = HTMLGUI::getOptions(array_keys($K), array_values($K));
         $t->addRow(array("<label>Kategorie:</label>", "<select id=\"categorizeWithCategory\">{$o}</select>"));
         $t->addRow(array("<input\n\t\t\ttype=\"button\"\n\t\t\tclass=\"bigButton backgroundColor3\"\n\t\t\tvalue=\"Kategorisieren\"\n\t\t\tstyle=\"background-image:url(./images/navi/okCatch.png);float:right;\"\n\t\t\tonclick=\"rme('Categorizer','','categorize',Array(\$('categorizeWithCategory').value),'if(checkResponse(transport)) { Popup.close(\\'Categorizer\\', 0); contentManager.reloadFrameRight(); }');\" />"));
         $t->addRowColspan(1, 2);
     }
     $html = "\n\t\t<script type=\"text/javascript\">\n\t\t\tDroppables.add('droppableVon', {hoverclass: 'backgroundColor1', accept: 'draggable', onDrop: function(element){ rme('Categorizer','','saveVon',Array(element.id),'Popup.update(transport, \\'Categorizer\\', 0);'); }});\n\t\t\tDroppables.add('droppableBis', {hoverclass: 'backgroundColor1', accept: 'draggable', onDrop: function(element){ rme('Categorizer','','saveBis',Array(element.id),'Popup.update(transport, \\'Categorizer\\', 0);'); }});\n\t\t</script>";
     echo $t->getHTML() . $html;
 }
 function getHTML($id)
 {
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     if ($U == null) {
         $t = new HTMLTable(1);
         $t->addRow("Sie haben keine Domain ausgewählt.<br /><br />Bitte wählen Sie eine Domain im Domain-Plugin, indem Sie auf das graue Kästchen in der Liste auf der rechten Seite klicken.");
         return $t->getHTML();
     }
     $Domain = new Domain($U);
     $Domain->loadMe();
     $variables = array("domainTemplate", "contentTemplate", "naviTemplate", "pageTemplate");
     $variables["domainTemplate"] = array("TITLE", "DESCRIPTION", "NAVIGATION", "HEADER", "PAGE");
     $variables["contentTemplate"] = array("TEXT", "IMAGE", "DOWNLOADS", "CONTENTID", "HANDLER");
     $variables["naviTemplate"] = array("LINK", "URL", "TEXT");
     $variables["pageTemplate"] = array("HEADER", "CONTENT", "DOMAIN");
     $variables["dlTemplate"] = array("TEXT", "DOWNLOADS");
     #$this->setParser("html","Util::base64Parser");
     if ($this->A == null and $id != -1) {
         $this->loadMe();
     }
     if ($id == -1) {
         $this->A = $this->newAttributes();
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Template");
     $TG = new TemplatesGUI();
     $options = $TG->getAvailableCategories();
     $gui->setType("templateType", "select");
     $gui->setOptions("templateType", array_keys($options), array_values($options));
     $gui->setInputJSEvent("templateType", "onchange", "CMSTemplate.updateVariables(this);");
     $gui->setInputJSEvent("templateType", "onkeyup", "CMSTemplate.updateVariables(this);");
     $gui->setLabel("templateType", "Typ");
     $gui->setType("html", "TextEditor64");
     $gui->setType("TemplateDomainID", "radio");
     $gui->setLabel("TemplateDomainID", "Domain");
     $gui->setOptions("TemplateDomainID", array("0", $U), array("alle", "nur " . $Domain->getA()->title));
     $gui->hideAttribute("TemplateID");
     $gui->setType("aktiv", "hidden");
     $gui->setStandardSaveButton($this, "Templates");
     $vars = "";
     foreach ($variables as $k => $v) {
         if (is_array($variables[$k])) {
             $vars .= "<p id=\"{$k}Variables\" style=\"" . ($this->A->templateType == $k ? "" : "display:none;") . "\">%%%" . implode("%%%<br />%%%", $variables[$k]) . "%%%</p>";
         }
     }
     $html = "\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tnew Draggable('TBVarsContainer',{handle:'TBVarsHandler', zindex: 2000});\n\t\t\t\toldVarSelected = '" . ($this->A->templateType != null ? $this->A->templateType : "null") . "';\n\t\t\t</script>\n\t\t\t<div \n\t\t\t\tstyle=\"position:absolute;z-index:2000;left:450px;width:200px;border-width:1px;border-style:solid;" . (isset($variables[$this->A->templateType]) ? "" : "display:none;") . "\"\n\t\t\t\tclass=\"backgroundColor0 borderColor1\"\n\t\t\t\tid=\"TBVarsContainer\"\n\t\t\t>\n\t\t\t<div class=\"cMHeader backgroundColor1\" id=\"TBVarsHandler\">Variablen:</div>\n\t\t\t<div>\n\t\t\t\t<p><small>Sie können folgende Variablen in Ihrem HTML verwenden (bitte beachen Sie Groß- und Kleinschreibung):</small></p>\n\t\t\t\t{$vars}\n\t\t\t</div>\n\t\t\t</div>";
     return $html . $gui->getEditHTML();
 }
 /**
  * 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;
 }
Exemple #13
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);") : "");
 }
 public function getHTML($id)
 {
     $allowedUsers = Environment::getS("allowedUsers", null);
     $this->addOrderV3("name");
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $up = new anyC();
     $up->setCollectionOf("User");
     $up->addAssocV3("password", "!=", ";;;-1;;;");
     $up->lCV3();
     if ($up->numLoaded() > 0 and $id == -1) {
         return "\n\t\t<table>\n\t\t\t<colgroup>\n\t\t\t\t<col class=\"backgroundColor3\" />\n\t\t\t</colgroup>\n\t\t\t<tr>\n\t\t\t\t<td><input onclick=\"rme('Users','','convertPasswords','','contentManager.reloadFrameRight();');\" type=\"button\" style=\"float:right;background-image:url(./images/navi/keys.png);\" class=\"bigButton backgroundColor2\" value=\"Passwörter\nkonvertieren\" />In Ihrer Datenbank befinden sich noch unkonvertierte Passwörter.</td>\n\t\t\t</tr>\n\t\t</table>";
     }
     $T = new HTMLTable(1, "Application Server");
     $I = new HTMLInput("AppServer", "text", mUserdata::getGlobalSettingValue("AppServer", ""));
     $I->onEnter("contentManager.rmePCR('Users', '-1', 'saveAppServer', [this.value], ' ');");
     if ($allowedUsers === null) {
         $T->addRow($I . "<br /><small>Wenn Sie einen Application Server bertreiben, tragen Sie hier bitte die URL ein, um die Benutzer mit diesem Server zu authorisieren.</small>");
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Benutzer");
     $gui->setCollectionOf($this->collectionOf, "Benutzer");
     #$gui->setObject($this);
     $gui->setParser("isAdmin", "UsersGUI::isAdminParser");
     $gui->setColWidth("isAdmin", "20px");
     #$gui->hideAttribute("password");
     #$gui->hideAttribute("SHApassword");
     #$gui->hideAttribute("language");
     $gui->setShowAttributes(array("name", "username", "isAdmin"));
     $g = "";
     if (strstr($_SERVER["SCRIPT_FILENAME"], "demo")) {
         $UA = $_SESSION["S"]->getCurrentUser()->getA();
         if ($UA->name != "Installations-Benutzer") {
             $g = "In der Demo können keine Benutzer geändert werden!";
             $gui->setIsDisplayMode(true);
         }
     }
     $TR = new HTMLTable(1);
     if ($allowedUsers !== null and $id == -1) {
         $B = new Button("", "notice", "icon");
         $B->style("float:left;margin-right:10px;");
         $TR->addRow(array($B . "Bitte beachten Sie: Sie können insgesamt {$allowedUsers} Benutzer ohne Admin-Rechte anlegen."));
     }
     $gui->customize($this->customizer);
     return $TR . $g . $gui->getBrowserHTML($id) . ($id == -1 ? $T : "");
 }
Exemple #15
0
 public function getHTML($id)
 {
     $this->addJoinV3("User", "AutoLoginUserID", "=", "UserID");
     $gui = new HTMLGUI();
     #$gui->VersionCheck("mAutoLogin");
     $this->lCV3($id);
     $gui->setName("AutoLogin");
     $gui->setObject($this);
     $gui->setShowAttributes(array("username", "AutoLoginIP", "AutoLoginApp"));
     $t = new HTMLTable(1);
     $t->addRow("<img src=\"./images/navi/warning.png\" style=\"float: left; margin-right: 10px;\" />Dieses Plugin ist möglicherweise ein Sicherheitsrisiko!");
     try {
         return ($id == -1 ? $t : "") . $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
 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();
 }
 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;
 }
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Starsystem");
     $gui->setStandardSaveButton($this);
     $B = new Button("create\nplanets", "./PM/Planet/Terran01.png");
     $B->rme("Starsystem", $this->ID, "createPlanets", "");
     $tab = new HTMLTable(1);
     $tab->addRow($B);
     $gui->setType("StarsystemGalaxyID", "hidden");
     $gui->setLabel("StarsystemName", "Name");
     $gui->setLabel("StarsystemX", "X");
     $gui->setLabel("StarsystemY", "Y");
     $gui->setLabel("StarsystemRotation", "Rotation");
     return $tab . $gui->getEditHTML();
 }
 public function getHTML($id, $page)
 {
     $bps = $this->getMyBPSData();
     $LangTab = new HTMLTable(1, "Language selection:");
     $LangTab->addRow("German");
     $LangTab->addRowEvent("click", "contentManager.loadFrame('contentRight', 'mNewSeries', -1, 0, 'mNewSeriesGUI;lang:de');");
     $LangTab->addRowStyle("cursor:pointer;");
     if ($bps != -1 and $bps["lang"] == "de") {
         $LangTab->addRowClass("backgroundColor1");
     }
     $LangTab->addRow("English");
     $LangTab->addRowEvent("click", "contentManager.loadFrame('contentRight', 'mNewSeries', -1, 0, 'mNewSeriesGUI;lang:en');");
     $LangTab->addRowStyle("cursor:pointer;");
     if ($bps != -1 and $bps["lang"] == "en") {
         $LangTab->addRowClass("backgroundColor1");
     }
     if ($bps == -1) {
         return $LangTab;
     }
     $T = new HTMLTable(1);
     $T->setTableStyle("width:370px;float:left;");
     $FeedSerien = array();
     $i = 0;
     $Series = array();
     $RSS = new mRSSFilterGUI();
     while ($R = $RSS->getNextEntry()) {
         $new = $R->filterNew();
         foreach ($new as $S => $v) {
             if ($v->language != $bps["lang"]) {
                 continue;
             }
             $Series[$v->name] = "rmeP('NewSeries', '-1', 'showInfo', ['{$v->name}', '{$v->language}'], 'if(checkResponse(transport)) { \$(\\'Row{$i}\\').className = \\'backgroundColor1\\'; \$(\\'contentLeft\\').update(transport.responseText); }');";
         }
     }
     asort($Series);
     foreach ($Series as $name => $action) {
         $T->addRow(array($name));
         $T->addRowStyle("cursor:pointer;");
         $T->addRowEvent("click", $action);
         $T->setRowID("Row{$i}");
         $i++;
     }
     return $LangTab . "<div style=\"margin-left:0px;height:500px;overflow:auto;\">" . $T . "</div>";
 }
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Domain");
     if ($id != -1) {
         $Seiten = new SeitenGUI();
         $Seiten->addAssocV3("DomainID", "=", $this->getID());
         $Seiten->setFieldsV3(array("SeiteID", "IF(name = '', header , name) AS name"));
         $gui->selectWithCollection("startseite", $Seiten, "name");
     } else {
         $gui->setParser("startseite", "DomainGUI::startseiteParser");
     }
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "domainTemplate");
     $gui->selectWithCollection("TemplateID", $T, "name");
     $gui->setStandardSaveButton($this);
     #$gui->setSaveButtonValues(get_parent_class($this),$this->ID,"Domains");
     $gui->setShowAttributes(array("TemplateID", "url", "DomainDefaultSpracheID", "startseite", "title", "header", "umleitung", "permalinkPrefix", "horizontalNav"));
     if (Session::isPluginLoaded("mSprache")) {
         $mS = new anyC();
         $mS->setCollectionOf("Sprache");
         $gui->selectWithCollection("DomainDefaultSpracheID", $mS, "SpracheIdentifier", "keine Auswahl");
     } else {
         $gui->setType("DomainDefaultSpracheID", "hidden");
     }
     $gui->setLabel("DomainDefaultSpracheID", "Sprache");
     $gui->setLabel("url", "Domains");
     $gui->setLabel("title", "Titelzeile");
     $gui->setLabel("header", "Header");
     $gui->setLabel("permalinkPrefix", "Permalink-Präfix");
     $gui->setLabel("horizontalNav", "horizontale Navigation");
     $gui->setType("horizontalNav", "checkbox");
     $gui->setFieldDescription("horizontalNav", "Subkategorien in der Navigation werden nicht zwischen den Einträgen angezeigt sondern am Ende angehängt.");
     $gui->setFieldDescription("umleitung", "<b>www-Umleitung</b><br />Anfragen an Adressen ohne www-Subdomain werden auf die www-subdomain umgeleitet. Also es würde http://example.com an http://www.example.com umgeleitet. Nicht jedoch http://test.example.com<br /><br /><b>erster Eintrag</b><br />Alle Anfragen werden auf den ersten Eintrag der Liste umgeleitet.");
     $gui->setType("umleitung", "select");
     $gui->setOptions("umleitung", array("0", "1", "2"), array("keine", "www-Umleitung", "erster Eintrag"));
     $gui->setType("url", "textarea");
     $gui->setFieldDescription("url", "geben Sie eine Domain pro Zeile an oder * für eine beliebige Domain");
     $tab = new HTMLTable(1);
     $tab->addRow("Das Permalink-Präfix wird vor den Permalink geschrieben, wenn er für eine Seite eingetragen wurde.<br /><br />Wenn Sie also \"page-\" als Präfix angeben, wird der Permalink für die Startseite so aussehen (wenn der Permalink für die Startseite \"Startseite\" lautet) page-Startseite.<br /><br />Sie müssen diesen Permalink dann noch mit mod_rewrite umschreiben. Mit präfix \"page-\" dann zum Beispiel:<pre style=\"font-size:9px;\">RewriteEngine on\nRewriteRule ^page-([a-zA-Z0-9-_]*)\$ ?permalink=\$1</pre>");
     return $gui->getEditHTML() . $tab;
 }
Exemple #21
0
 function getHTML($id)
 {
     $gui = new HTMLGUI();
     $this->addJoinV3("FhemLocation", "FhemPresetLocationID", "=", "FhemLocationID");
     $this->addOrderV3("FhemLocationName");
     $this->lCV3($id);
     $gui->setName("Preset");
     $gui->setObject($this);
     $gui->setCollectionOf("FhemPreset", "Preset");
     #$gui->setIsDisplayMode(true);
     #$gui->setEditInDisplayMode(true, "contentLeft");
     $gui->setShowAttributes(array("FhemLocationName", "FhemPresetName"));
     $t = new HTMLTable(1);
     $t->addRow("You'll have to use the \"register settings\"-button in the devices-menu to make this presets known to the server.");
     try {
         return ($id == -1 ? $t : "") . $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
Exemple #22
0
 function ldapUsersPopup()
 {
     $T = "";
     try {
         $AD = new LoginAD();
         $AD->getUsers();
         $T = new HTMLTable(2);
         $T->setColWidth(1, 20);
         $T->maxHeight(400);
         $T->useForSelection(false);
         $B = new Button("Eintrag bearbeiten", "./images/i2/edit.png", "icon");
         while ($U = $AD->n()) {
             $T->addRow(array($B, $U->A("name")));
             $T->addRowEvent("click", OnEvent::frame("contentLeft", "User", $U->getID()));
         }
     } catch (Exception $e) {
     }
     echo $T;
 }
 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>";
 }
 public function setPath()
 {
     $bps = $this->getMyBPSData();
     #Aspect::registerOnetimePointCut("aboveList", "GUIFactory::getContainer", "FileManagerGUI::adviceAboveList");
     $rootDir = null;
     if ($bps != -1 and isset($bps["root"])) {
         $rootDir = preg_replace("/^([A-Z])%/", "\\1:", $bps["root"]);
     }
     #echo $rootDir;
     if ($rootDir != null) {
         $T = new HTMLTable(1);
         #$rel = "specifics/$rootDir";
         #$root = Util::getRootPath().$rel;
         $root = FileStorage::getFilesDir() . $rootDir;
         $_SESSION["BPS"]->setProperty("FileManagerGUI", "path", preg_replace("/^([A-Z]):/", "\\1%", $root));
         $_SESSION["BPS"]->setProperty("FileManagerGUI", "root", preg_replace("/^([A-Z]):/", "\\1%", $root));
         $F = new File($root);
         $F->loadMe();
         if ($F->getA() == null) {
             if (is_writable(FileStorage::getFilesDir())) {
                 mkdir($root);
             } else {
                 $B = new Button("", "stop");
                 $B->type("icon");
                 $B->style("float:left;margin-right:10px;");
                 $T->addRow($B . "Das Verzeichnis <code>{$rel}</code> existiert nicht und kann nicht automatisch angelegt werden, da keine Schreibberechtigung für <code>specifics</code> vorliegt.");
                 return $T;
             }
         }
     }
     $bps = $this->getMyBPSData();
     //go again
     #print_r($bps);
     if (isset($bps["path"]) and strpos($bps["path"], $bps["root"]) === false) {
         $bps["path"] = preg_replace("/^([A-Z])%/", "\\1:", $bps["root"]);
     }
     #$bps["root"];
     if ($bps != -1 and isset($bps["path"])) {
         $this->setDir(preg_replace("/^([A-Z])%/", "\\1:", $bps["path"]));
     }
     return true;
 }
Exemple #25
0
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Preset");
     $gui->selectWithCollection("FhemPresetServerID", new mFhemServerGUI(), "FhemServerName");
     $gui->setLabel("FhemPresetServerID", "Server");
     $gui->setLabel("FhemPresetName", "Name");
     $gui->setType("FhemPresetHide", "checkbox");
     $gui->setLabel("FhemPresetHide", "Hide?");
     $gui->setType("FhemPresetNightOnly", "checkbox");
     $gui->setLabel("FhemPresetNightOnly", "Night only?");
     $gui->setLabel("FhemPresetLocationID", "Location");
     $gui->setLabel("FhemPresetRunOn", "run on");
     $gui->settype("FhemPresetLocationID", "select");
     $gui->selectWithCollection("FhemPresetLocationID", new mFhemLocationGUI(), "FhemLocationName");
     $gui->setFieldDescription("FhemPresetRunOn", "The event that triggers this Preset. For example HomeStatus:here will trigger this Preset when the dummy 'HomeStatus' is set to 'here'. The Preset will create its own dummy if this field is empty.");
     $gui->setStandardSaveButton($this, "mFhemPreset");
     #$gui->setIsDisplayMode(true);
     #$gui->setShowAttributes(array("name"));
     $gui->setShowAttributes(array("FhemPresetServerID", "FhemPresetLocationID", "FhemPresetName", "FhemPresetRunOn", "FhemPresetHide", "FhemPresetNightOnly"));
     $desc = new HTMLTable(1);
     $desc->addRow("For the \"Night only\"-option to work correctly you might want to set <code>{sunrise_coord(\"10.873799\",\"48.699495\",\"Europe/Berlin\")}</code> in the <code>fhem.cfg</code>-file. With your own coordinates/timezone of course.");
     if ($id == -1) {
         return $gui->getEditHTML() . $desc;
     }
     $_SESSION["BPS"]->registerClass("mFhemSelection");
     $_SESSION["BPS"]->setACProperty("selectionServerID", $this->A->FhemPresetServerID);
     $B = new Button("add Device", "./fheME/Fhem/fhem.png");
     $B->select("false", "mFhem", "FhemPreset", $this->ID, "addDevice");
     $BW = new Button("add custom", "backup");
     $BW->rmePCR("FhemPreset", $this->ID, "addWait", "", "contentManager.reloadFrame('contentLeft');");
     $BW->style("float:right;");
     $t = new HTMLTable(1);
     $t->addRow($BW . $B);
     $_SESSION["CurrentAppPlugins"]->addClass("Presets", "mFhemPreset");
     $mFE = new mFhemEventGUI();
     $mFE->addJoinV3("Fhem", "FhemEventFhemID", "=", "FhemID");
     $mFE->addAssocV3("FhemEventPresetID", "=", $this->ID);
     return $gui->getEditHTML() . $desc . "<div style=\"height:30px;\"></div>" . $t . $mFE->getHTML(-1) . "<div style=\"height:30px;\"></div>";
 }
Exemple #26
0
 public function checkAllEpisodes($returnValues = false, $newFiles = null)
 {
     $ac = new anyC();
     $ac->setCollectionOf("Folge");
     $ac->addAssocV3("SerieID", "=", $this->getID());
     $ac->addAssocV3("wanted", "=", "1");
     $ac->addOrderV3("season");
     $ac->addOrderV3("episode");
     if (!$returnValues) {
         $T = new HTMLTable(5);
     }
     $R = array();
     if ($newFiles != null) {
         $newFound = $this->findNewEpisodes($newFiles);
     }
     while ($E = $ac->getNextEntry()) {
         $c = $E->check($this);
         if ($c[0] === true) {
             continue;
         }
         $continue = false;
         if ($newFiles != null) {
             foreach ($newFound as $NE) {
                 if ($NE["season"] * 1 == $E->A("season") * 1 and $NE["episode"] * 1 == $E->A("episode") * 1) {
                     $continue = true;
                 }
             }
         }
         if ($continue) {
             continue;
         }
         $R[] = $E;
         if (!$returnValues) {
             $T->addRow(array("S" . $E->A("season") . "E" . $E->A("episode"), $E->A("name"), $c[0] ? "ok" : "", Util::formatByte($c[1]), $c[2]));
         }
     }
     if ($returnValues) {
         return $R;
     }
     echo "<div style=\"overflow:auto;max-height:400px;\">" . $T . "</div>";
 }
 public function getHTML($id)
 {
     $tab = new HTMLTable(3, "Koordinaten");
     $tab->setColWidth(1, "20px");
     for ($i = 0; $i < 200; $i++) {
         $x = round(($i + 1) * 1000 * sin(($i + mt_rand(-0.9, 0.9)) * pi() / 5));
         $y = round(($i + 1) * 1000 * cos(($i + mt_rand(-1.2, 1.2)) * pi() / 3));
         $tab->addRow(array($i . ": ", "{$x}", "{$y}"));
         $tab->addCellStyle(1, "text-align:right");
         $tab->addCellStyle(2, "text-align:right");
         $S = new Starsystem(-1);
         $SA = $S->newAttributes();
         $SA->StarsystemName = "Starsystem " . ($i + 1);
         $SA->StarsystemX = $x;
         $SA->StarsystemY = $y;
         $SA->StarsystemRotation = rand(0, 180);
         $S->setA($SA);
         $S->newMe();
     }
     return $tab;
 }
 public function searchCity($name)
 {
     $data = file_get_contents("http://api.openweathermap.org/data/2.5/find?q=" . urlencode($name) . ",de&type=like&mode=json&APPID=" . $this->apiKey());
     $data = json_decode($data);
     if ($data->count == 0) {
         die("<p>Kein Ergebnis</p>");
     }
     $T = new HTMLTable(2);
     $T->weight("light");
     $T->useForSelection();
     $T->setColWidth(1, 20);
     foreach ($data->list as $I) {
         $B = new Button("Übernehmen", "arrow_left", "iconic");
         $T->addRow(array($B, $I->name));
         $T->addRowEvent("click", "\$j('[name=OpenWeatherMapCityID]').val('{$I->id}');");
     }
     echo $T;
     #echo "<pre>";
     #print_r($data);
     #echo "</pre>";
 }
 public function getHTML($id)
 {
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     try {
         $MArgs = func_get_args();
         return Aspect::joinPoint("around", $this, __METHOD__, $MArgs);
     } catch (AOPNoAdviceException $e) {
     }
     Aspect::joinPoint("before", $this, __METHOD__, $MArgs);
     // </editor-fold>
     if ($_SESSION["S"]->isUserAdmin()) {
         return parent::getHTML($id);
     }
     switch ($id) {
         case "1":
             $AC = anyC::get("JDownload");
             $AC->addOrderV3("JDownloadDate", "DESC");
             $AC->setLimitV3(19);
             $T = new HTMLTable(2);
             $T->weight("light");
             $T->addColStyle(1, "padding:5px;padding-left:10px;");
             $T->addColStyle(2, "color:grey;text-align:right;padding:5px;");
             while ($D = $AC->getNextEntry()) {
                 $T->addRow(array($D->A("JDownloadRenameto"), Util::formatByte($D->A("JDownloadFilesize"), 2)));
                 if ($D->A("JDownloadRenamed") == 0) {
                     $T->addRowClass("error");
                 }
                 #$r .= OnEvent::script ("\$j('#BrowsermJDownload".$E->getID()."').css('background-color', '');");
                 $T->addRowStyle("cursor:pointer;");
                 $T->addRowEvent("click", "contentManager.loadPlugin('contentRight', 'mJDownload', '', " . $D->getID() . ");");
             }
             return "<p class=\"prettyTitle\">Downloads</p>" . $T;
             break;
         case "2":
             break;
         case "3":
             return "";
             break;
     }
 }
 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;
 }