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¶meters=\\'{$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>"; }
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> <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 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);") : ""); }
function getSetTable($DeviceID, $values) { $controls = new HTMLTable(1); $controls->setTableStyle("width:100%;border:0px;"); $i = 0; foreach ($values as $v => $l) { $controls->addRow(array($l)); $controls->addRowClass("backgroundColor0"); $controls->addCellStyle(1, "padding-top:10px;padding-bottom:10px;cursor:pointer;"); if ($i != count($values) - 1) { $controls->addCellStyle(1, "border-bottom-style:solid;border-bottom-width:1px;"); $controls->addCellClass(1, "borderColor1"); } $controls->addCellEvent(1, "click", OnEvent::rme($this, "setDevice", array(str_replace(array("D", "H"), "", $DeviceID), "'{$v}'"), "function(){ \$j('#controls_{$DeviceID}').hide(); if(Fhem.doAutoUpdate) Fhem.requestUpdate(); }")); $i++; } $controls = "<div id=\"controls_{$DeviceID}\" style=\"display:none;width:50px;position:absolute;margin-left:150px;border-style:solid;border-width:1px;padding:3px;\" class=\"borderColor1 backgroundColor0 fhemeControl\">{$controls}</div>"; return $controls; }
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;"); if (!$this->showNew) { $BA = ""; } $cols = ($this->showTrash ? 1 : 0) + ($this->showEdit ? 1 : 0) + 1 + count($this->colsLeft) + count($this->colsRight); $TE = new HTMLTable($cols, "Einträge"); if ($this->showTrash) { $TE->setColWidth(1, 20); } if ($this->showEdit) { $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()) { $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(); }") . " });"; $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 !is_array($this->emptyCheckField) and $A->A($this->emptyCheckField) == $this->emptyCheckValue) { $autoLoad = $action; $isEmpty = true; } if ($this->emptyCheckField != null and is_array($this->emptyCheckField)) { $ec = 0; foreach ($this->emptyCheckField as $field) { if ($A->A($field) != "") { continue; } $autoLoad = $action; $isEmpty = true; $ec++; } $isEmpty = $ec == count($this->emptyCheckField); } if (!$isEmpty) { $obj = get_class($this->object); $meth = $this->parsers["main"]; if (strpos($this->parsers["main"], "::")) { $ex = explode("::", $this->parsers["main"]); $obj = $ex[0]; $meth = $ex[1]; } $div = Util::invokeStaticMethod($obj, $meth, array($A)); #($A->A("TinkerforgeBrickletUID") != "" ? $A->A("TinkerforgeBrickletUID") : "Neuer Eintrag"); } else { $div = "Neuer Eintrag"; } $row = array(); if ($this->showTrash) { $row[] = $BD; } $row[] = $div; foreach ($this->colsRight as $col) { $obj = get_class($this->object); $meth = $col[0]; if (strpos($col[0], "::")) { $ex = explode("::", $col[0]); $obj = $ex[0]; $meth = $ex[1]; } $row[] = Util::invokeStaticMethod($obj, $meth, array($A)); } if ($this->showEdit) { $row[] = $BE; } $TE->addRow($row); if ($this->showTrash) { $TE->addCellStyle(1, "vertical-align:top;"); } #$TE->addCellEvent(2, "click", $action); if ($this->showEdit) { $TE->addCellID(count($row), "popupEntryID" . $A->getID()); $TE->addCellStyle(count($row), "vertical-align:top;"); $TE->addCellEvent(count($row), "click", $action); } } if ($this->object->numLoaded() == 0) { $TE->addRow("Keine Einträge"); $TE->addRowColspan(1, $cols); } return "{$BA}\n\t\t\t<div style=\"float:right;width:calc(100% - 400px);height:500px;display:none;background-color:#f4f4f4;overflow:auto;\" 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($autoLoad) : ""); }
public static function EMailPopupAttachmentsSP($dataClass, $dataClassID, $callbackParameter = null) { $c = new $dataClass($dataClassID); $data = $c->getEMailData($callbackParameter); $T = new HTMLTable(1, "Anhänge"); foreach ($data["attachmentsAlways"] as $file) { $T->addRow("<small>{$file}</small>"); $T->addCellStyle(1, "max-width: 100px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"); } echo $T; $T = new HTMLTable(2, "Mögliche Anhänge"); $T->setColWidth(1, 20); foreach ($data["attachmentsOptional"] as $k => $file) { $I = new HTMLInput("addFile{$k}", "checkbox"); $I->style("margin:0px;"); $I->data("value", $file); $T->addRow(array($I, "<small>{$file}</small>")); $T->addCellStyle(2, "max-width: 100px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;cursor:pointer;"); $T->addCellEvent(2, "click", "\$j('[name=addFile{$k}]').prop('checked', !\$j('[name=addFile{$k}]').prop('checked'));"); } echo ((isset($data["attachmentsOptional"]) and count($data["attachmentsOptional"])) ? "<div style=\"height:30px;\"></div>" : "") . "<form id=\"UtilEmailFormAttachments\">" . $T . "</form>"; }
public function getService($data) { if (!$this->loggedIn) { return "TIMEOUT"; } $html = ""; $T = new HTMLTable(4); #, "Bitte wählen Sie einen Lieferschein"); $T->setTableStyle("width:100%;margin-top:10px;"); $T->setColWidth(1, 200); $T->setColWidth(4, 200); $T->useForSelection(false); $T->maxHeight(400); $AC = anyC::get("GRLBM", "isWhat", "S"); $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID"); #$AC->addAssocV3("UserID", "=", Session::currentUser()->getID()); $AC->addAssocV3("isPrinted", "=", "0"); $AC->addAssocV3("isEMailed", "=", "0"); $AC->addAssocV3("isPixelLetteredTime", "=", "0"); #$AC->addAssocV3("status", "=", "delivered"); $AC->addAssocV3("GRLBMServiceMitarbeiter", "=", Session::currentUser()->getID(), "AND", "2"); $AC->addAssocV3("GRLBMServiceMitarbeiter2", "=", Session::currentUser()->getID(), "OR", "2"); $AC->addAssocV3("GRLBMServiceMitarbeiter3", "=", Session::currentUser()->getID(), "OR", "2"); $AC->addAssocV3("GRLBMServiceMitarbeiter4", "=", Session::currentUser()->getID(), "OR", "2"); $AC->addOrderV3("datum", "DESC"); #$AC->addOrderV3("nummer", "DESC"); #$AC->setLimitV3(100); #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID"); $i = 0; while ($B = $AC->n()) { $BPDF = new Button("PDF anzeigen"); $BPDF->className("submitFormButton"); $BPDF->style("background-color:#DDD;color:grey;float:right;"); $BPDF->onclick("CustomerPage.popup('Service PDF', 'getPDFViewer', {GRLBMID: '" . $B->getID() . "'}, {width:'800px'});"); $BOK = ""; if ($B->A("GRLBMServiceSigAG") != "" and $B->A("GRLBMServiceSigAG") != "[]") { $BOK = new Button("Kunde hat unterschrieben", "check", "iconic"); $BOK->style("font-size:55px;"); } $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(), $BOK, $BPDF)); $T->addCellStyle(1, "vertical-align:top;"); $T->addRowStyle("border-bottom:1px solid #ccc;"); #if($i % 2 == 1) # $T->addRowStyle ("background-color:#eee;"); $event = "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\tCCAuftrag.lastTextbausteinUnten = null;\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\t\$('#frameSelect').hide(); \$('#frameEdit').show();\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}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');"; if ($B->A("GRLBMServiceSigAG") == "" or $B->A("GRLBMServiceSigAG") == "[]") { $T->addCellEvent(1, "click", $event); $T->addCellEvent(2, "click", $event); $T->addRowStyle("cursor:pointer;"); } else { $T->addRowStyle("cursor:default;"); } $i++; } $html .= $T; return $html; }