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; }
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 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 showWarenkorb() { $AC = anyC::get("Seminar"); $AC->addAssocV3("SeminarVon", ">=", Util::parseDate("de_DE", Util::formatDate("de_DE", time()))); $count = array(); for ($i = 0; $i < 21; $i++) { $count[$i] = $i; } $T = new HTMLTable(3, "Events"); $T->setTableStyle("width:100%;"); while ($S = $AC->getNextEntry()) { $I = new HTMLInput("AnzahlKarten" . $S->getID(), "select", "0", $count); $I->style("width:80px;text-align:right;"); $I->onchange("CustomerPage.rme('recalc', ['" . $S->getID() . "', this.value], function(response){ \$('#PreisGesamt" . $S->getID() . "').html(response) });"); if (isset($_SESSION["ticketDataSelection"])) { $I->setValue($_SESSION["ticketDataSelection"][$S->getID()]); } $Adresse = new Adresse($S->A("SeminarAdresseID")); $T->addRow(array("<b>" . $S->A("SeminarName") . "</b>, " . Util::CLDateParser($S->A("SeminarVon")) . " ab " . Util::CLTimeParser($S->A("SeminarStart")) . " Uhr, " . $Adresse->A("ort"))); $T->addRowColspan(1, 3); $T->addRow(array($I, Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * 1, true), Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * $I->getValue(), true))); $T->addCellStyle(1, "text-align:right;"); $T->addCellStyle(2, "text-align:right;"); $T->addCellStyle(3, "text-align:right;"); $T->addCellID(3, "PreisGesamt" . $S->getID()); $T->addRow(array(" ")); $T->addRowColspan(1, 3); } $I = new Button("Weiter", ""); $I->onclick("CustomerPage.rme('handleForm', \$('#ticketShop').serialize(), function(){ document.location.reload(); })"); $I->className("submitFormButton"); $T->addRow($I); $T->addRowColspan(1, 3); $IA = new HTMLInput("action", "hidden", "handleSelection"); return "<form id=\"ticketShop\">" . $T . $IA . "</form>"; }
public function getAuftrag($data) { $Beleg = new GRLBM($data["GRLBMID"]); #$this->createAuftrag(new Adresse(1), "W"); $TSumme = new HTMLTable(3); $TSumme->setTableStyle("width:100%;border-top:1px solid #AAA;margin-top:30px;"); $TSumme->setColWidth(1, 26); $TSumme->addColStyle(3, "text-align:right;"); $TSumme->addRow(array("", "Netto: <b>" . Util::CLFormatCurrency($Beleg->A("nettobetrag") * 1, true) . "</b>", "Brutto: <b>" . Util::CLFormatCurrency($Beleg->A("bruttobetrag") * 1, true) . "</b>")); $IZahlungsart = new HTMLInput("zahlungsart", "select", $Beleg->A("GRLBMpayedVia"), GRLBM::getPaymentVia(null, array("transfer", "debit"))); $IZahlungsart->onchange("if(this.value == 'debit') \$('#rowZahlungsart').show(); else \$('#rowZahlungsart').hide(); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);"); $IBankleitzahl = new HTMLInput("bankleitzahl", "text", $Beleg->A("GRLBMBankleitzahl")); $IBankleitzahl->placeholder("Bankleitzahl"); $IBankleitzahl->style("margin-top:10px;text-align:right;width:130px;"); $IBankleitzahl->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);"); $IKontonummer = new HTMLInput("kontonummer", "text", $Beleg->A("GRLBMKontonummer")); $IKontonummer->placeholder("Kontonummer"); $IKontonummer->style("margin-top:10px;text-align:right;margin-left:10px;width:130px;"); $IKontonummer->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);"); #$IBIC = new HTMLInput("bic"); #$IIBAN = new HTMLInput("iban"); $BCheck = new Button("Prüfung", "question_mark", "iconic"); $BCheck->id("ktoCheck"); $BCheck->style("margin-left:8px;"); $TZahlungsart = new HTMLTable(2, "Zahlungsart"); $TZahlungsart->setTableStyle("width:100%;"); $TZahlungsart->setColWidth(1, 26); $TZahlungsart->addRow(array(new Button("Zahlungsart", "pin", "iconic"), $IZahlungsart)); $TZahlungsart->addRowColspan(2, 2); $TZahlungsart->addCellStyle(1, "vertical-align:top;"); $TZahlungsart->addRow(array("", $IBankleitzahl . " " . $IKontonummer . "{$BCheck} <div id=\"bankMessage\" style=\"margin-top:6px;\"> </div>")); $TZahlungsart->setRowID("rowZahlungsart"); if ($Beleg->A("GRLBMpayedVia") != "debit") { $TZahlungsart->addRowStyle("display:none;"); } else { echo OnEvent::script("CustomerPage.saveKontodaten();"); } $IBemerkung = new HTMLInput("bemerkung", "textarea", $Beleg->A("textbausteinUnten")); $IBemerkung->style("width:100%;height:100px;margin-top:40px;"); $IBemerkung->placeholder("Bemerkungen"); #$IBemerkung->onblur(""); $IBemerkung->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveBemerkung, 300);"); $TZahlungsart->addRow(array(new Button("Bemerkung", "document_alt_stroke", "iconic"), $IBemerkung)); $TZahlungsart->addCellStyle(1, "vertical-align:top;padding-top:40px;"); #$TZahlungsart->addCellStyle(3, "padding-top:50px;"); $TFinish = new HTMLTable(1); $TFinish->setTableStyle("width:100%;"); $TFinish->addRow(array($this->buttonCancel($data) . $this->buttonDone($data))); $TFinish->addCellStyle(1, "padding-top:50px;"); $html = "<h1>Auftrag " . $Beleg->A("prefix") . $Beleg->A("nummer") . "</h1>"; $html .= $this->getAdresse($Beleg); if ($this->showPosten) { $html .= $this->getPosten($Beleg); } if ($this->showPrices) { $html .= $TSumme; } if ($this->showZahlungsart) { $html .= $TZahlungsart; } $html .= $this->getBottom($Beleg); $html .= $TFinish; return $html . OnEvent::script("\n\t\t\tCustomerPage.timeout = null;\n\t\t\tCustomerPage.saveBemerkung = function(){ CustomerPage.rme('setBemerkung', {GRLBMID: {$data['GRLBMID']}, bemerkung: \$('textarea[name=bemerkung]').val() }); };\n\t\t\tCustomerPage.saveKontodaten = function(){ CustomerPage.rme('setKontodaten', {\n\t\t\t\tGRLBMID: {$data['GRLBMID']},\n\t\t\t\tzahlungsart: \$('select[name=zahlungsart]').val(),\n\t\t\t\tkontonummer: \$('input[name=kontonummer]').val(),\n\t\t\t\tbankleitzahl: \$('input[name=bankleitzahl]').val()\n\t\t\t}, function(t){ \$('#bankMessage').html(t); }); };"); }
function getBrowserHTML($lineWithId = -1) { $this->texts = $this->languageClass->getBrowserTexts(); $singularLanguageClass = $this->loadLanguageClass($this->singularClass); $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $this->singularClass); $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $this->singularClass); $userHiddenFields = mUserdata::getHides($this->singularClass); $defaultTarget = "contentRight"; if ($this->displaySide != "default") { $defaultTarget = "content" . ucfirst($this->displaySide); } if ($this->singularClass == "none") { echo "collectionOf is not set. See message log for further details."; throw new CollectionOfNotSetException(); } if ($this->name == "Noname") { $_SESSION["messages"]->addMessage("There is no name set. You might use setName of HTMLGUI to do that."); } /** * ERROR-TABLE */ $errorTab = new HTMLTable(1); if (isset($_SESSION["phynx_errors"]) and $lineWithId == -1 and ($_SERVER["HTTP_HOST"] == "dev.furtmeier.lan" or strpos(__FILE__, "nemiah") !== false)) { $B = new Button("", "warning", "icon"); $B->style("float:left;margin-right:10px;"); $errorTab->addRow("\n\t\t\t\t\t{$B}\n\t\t\t\t\t<b>Es " . (count($_SESSION["phynx_errors"]) != 1 ? "liegen" : "liegt") . " " . count($_SESSION["phynx_errors"]) . " PHP-Fehler vor:</b><br />\n\t\t\t\t\t<a href=\"#\" onclick=\"windowWithRme('Util','','showPHPErrors',''); return false;\">Fehler anzeigen</a>,<br />\n\t\t\t\t\t<a href=\"#\" onclick=\"rme('Util','','deletePHPErrors','','contentManager.reloadFrameRight();'); return false;\">Fehler löschen</a>"); } /** * RETURN-BUTTON */ $returnTab = new HTMLTable(1); if ($this->isSelection) { $BReturn = new Button("Auswahl\nbeenden", "back"); $BReturn->onclick("contentManager.restoreFrame('content" . ucfirst($this->displaySide) . "','selectionOverlay');"); #return "<input type=\"button\" value=\"zurück zu\n".$p2[$s[0]]."\" style=\"background-image:url(./images/navi/back.png);\" class=\"bigButton backgroundColor3\" onclick=\"loadFrameV2('contentRight','$s[0]');\" />"; $returnTab->addRow($BReturn); } /** * DELETE-BUTTON */ if ((!$this->onlyDisplayMode or $this->deleteInDisplayMode) and $userCanDelete and !$this->isSelection and $this->showDeleteButton) { $this->newColsRight["delete"] = "\n\t\t\t<span class=\"iconic trash_stroke\" onclick=\"deleteClass('" . $this->singularClass . "','%%VALUE%%', " . ($this->JSOnDelete == null ? "function() { " . ($this->displaySide == "left" ? "contentManager.reloadFrameLeft();" : "contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '%%VALUE%%') \$('contentLeft').update('');") . " }" : $this->JSOnDelete) . ",'" . str_replace("%1", $this->singularName, $this->texts["%1 wirklich löschen?"]) . "');\"></span>"; } elseif (!$userCanDelete) { $this->newColsRight["delete"] = "<img src=\"./images/i2/empty.png\" />"; } /** * EDIT-BUTTON */ if (!isset($this->newColsLeft["select"]) and (!$this->onlyDisplayMode or $this->editInDisplayMode) and $this->showEditButton) { $EB = new Button("", "./images/i2/edit.png"); $EB->type("icon"); $EB->className("editButton"); if ($this->JSOnEdit == null) { $EB->onclick("contentManager.selectRow(this); contentManager.loadFrame('contentLeft','" . $this->singularClass . "','%%VALUE%%','0');"); } else { $EB->onclick($this->JSOnEdit); } $this->newColsLeft["select"] = $EB; } $cols = count($this->showAttributes) + count($this->newColsLeft) + count($this->newColsRight); $valuesTab = new HTMLTable($cols, $lineWithId == -1 ? $this->displaySide == "left" ? $this->name : "" : null); $valuesTab->addTableClass("contentBrowser"); /*if(isset($this->newColsRight["delete"]) AND ($this->displaySide == "default" OR $this->displaySide == "right")) $valuesTab->setColClass($cols, "backgroundColor0"); if(isset($this->newColsRight["delete"]) AND $this->displaySide == "left") $valuesTab->setColClass(1, "backgroundColor0");*/ /** * QUICKSEARCH */ #$quickSearchRow = ""; if ($this->quickSearchPlugin != "" and $lineWithId == -1) { list($quickSearchRow, $BSearchInfo) = $this->getQuicksearchField(); if ($this->displaySide == "left") { $insertRow = array($quickSearchRow); for ($i = 1; $i < $cols - 1; $i++) { $insertRow[] = ""; } $insertRow[] = $BSearchInfo; $valuesTab->addRow($insertRow); $valuesTab->addRowColspan(1, $cols - 1); } else { $valuesTab->addRow(array($BSearchInfo, $quickSearchRow)); $valuesTab->addRowColspan(2, $cols - 1); } $valuesTab->addRowClass("backgroundColorHeader"); } if ($this->headerRow != null) { $valuesTab->addHeaderRow($this->headerRow); } /** * PAGE-BROWSER */ #$multiPageRow = ""; $separator = ""; $userDefinedEntriesPerPage = false; $isMultiPageMode = false; if (count($this->multiPageMode) > 0) { $isMultiPageMode = true; $this->multiPageMode[3] = $defaultTarget; if ($this->multiPageMode[2] == 0) { $userDefinedEntriesPerPage = true; #$mU = new mUserdata(); #$this->multiPageMode[2] = $mU->getUDValue("entriesPerPage{$this->multiPageMode[4]}"); #if($this->multiPageMode[2] == null) $this->multiPageMode[2] = 20; } /* if($this->multiPageMode[1] == "undefined") $this->multiPageMode[1] = 0; $pages = ceil($this->multiPageMode[0] / $this->multiPageMode[2]); if($this->multiPageMode[1] != 0) $pageLinks = "<a href=\"javascript:contentManager.loadPage('$defaultTarget', '0');\"> << </a> "; else $pageLinks = " << "; if($this->multiPageMode[1] != 0) $pageLinks .= "<a href=\"javascript:contentManager.backwardOnePage('$defaultTarget');\"> < </a> "; else $pageLinks .= " < "; if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.forwardOnePage('$defaultTarget');\"> > </a> "; else $pageLinks .= " > "; if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget',".($pages-1).");\"> >> </a> | "; else $pageLinks .= " >> | "; $start = $this->multiPageMode[1] - 3; if($start < 0) $start = 0; $end = $this->multiPageMode[1] + 3; if($end > $pages - 1) $end = $pages - 1; for($i=$start; $i<=$end; $i++) if($this->multiPageMode[1] != "$i") $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget','".$i."');\">".($i+1)."</a> "; else $pageLinks .= ($i+1)." "; $pageLinks = "".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": ".$pageLinks; */ if ($this->displaySide == "left") { $pageLinks = "<span style=\"float:right;\">" . $this->getMultiPageButtons() . "</span>"; } else { $pageLinks = $this->getMultiPageButtons(); } /*if($lineWithId == -1) $multiPageRow = " <tr> ".($userDefinedEntriesPerPage ? "<td><img class=\"mouseoverFade\" src=\"./images/i2/settings.png\" onclick=\"phynxContextMenu.start(this, 'HTML','multiPageSettings:{$this->multiPageMode[4]}','".$this->texts["Einstellungen"].":');\" /></td>" : "")." <td colspan=\"".($colspan+1+($userDefinedEntriesPerPage ? 0 : 1))."\"><input type=\"text\"onkeydown=\"if(event.keyCode == 13) loadFrameV2('".$this->multiPageMode[3]."','".$this->multiPageMode[4]."','',this.value - 1);\" style=\"width:30px;float:right;text-align:right;\" value=\"".($this->multiPageMode[1]+1)."\" onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\" />".$this->multiPageMode[0]." ".($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"])."<!--, ".$pages." ".($pages != 1 ? $this->texts["Seiten"] : $this->texts["Seite"])."--></td> </tr> <tr> <td colspan=\"$determinedNumberofCols\">".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": $pageLinks</td> </tr>"; */ if ($lineWithId == -1) { $BSettings = $this->getPageOptionsButton(); #$IPage = $this->getPageSelectionField(); #$IPage->style("width:30px;float:right;text-align:right;"); $pageOptions = $this->multiPageMode[0] . " " . ($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"]) . ", {$pageLinks}"; if (!$userDefinedEntriesPerPage) { $valuesTab->addRow(array($pageOptions)); $valuesTab->addRowColspan(1, $cols); } else { if ($this->displaySide == "left") { $insertRow = array($pageOptions); for ($i = 1; $i < $cols - 1; $i++) { $insertRow[] = ""; } $insertRow[] = $BSettings; $valuesTab->addRow($insertRow); #$valuesTab->addRow(array($pageOptions,$BSettings)); $valuesTab->addRowColspan(1, $cols - 1); } else { /*$insertRow = array($BSettings); for($i=1; $i<$cols-1; $i++) $insertRow[] = ""; $insertRow[] = $pageOptions; $valuesTab->addRow($insertRow);*/ $valuesTab->addRow(array($BSettings, $pageOptions)); $valuesTab->addRowColspan(2, $cols - 1); } } $valuesTab->addRowClass("backgroundColorHeader"); #$valuesTab->addRow(array($pageLinks)); #$valuesTab->addRowColspan(1, $cols); #$valuesTab->addRowClass("backgroundColorHeader"); $valuesTab->addRow(""); $valuesTab->addRowColspan(1, $cols); $valuesTab->addRowClass("backgroundColor0 browserSeparatorTop"); } } $filteredCol = null; if ($lineWithId == -1 and $this->showFilteredCategoriesWarning != null and $this->showFilteredCategoriesWarning[0]) { $dB = new Button($this->texts["Filter löschen"], "./images/i2/delete.gif"); $dB->style("float:right;"); $dB->type("icon"); $dB->rme("HTML", "", "saveContextMenu", array("'deleteFilters'", "'{$this->showFilteredCategoriesWarning[1]}'"), "if(checkResponse(transport)) contentManager.reloadFrameRight();"); /*$separator = " <tr> <td class=\"backgroundColor0\"".((isset($this->showFilteredCategoriesWarning[0]) AND $this->showFilteredCategoriesWarning[0] == true) ? "<img src=\"./images/i2/note.png\" /></td><td class=\"backgroundColor0\" colspan=\"".($determinedNumberofCols - 2)."\" style=\"color:grey;\" >".$this->texts["Anzeige wurde gefiltert"]."</td><td class=\"backgroundColor0\">$dB</td>" : " >")."</td> </tr>";*/ $filteredCol = array("<img src=\"./images/i2/note.png\" />", $dB . $this->texts["Anzeige wurde gefiltert"]); $valuesTab->addRow($filteredCol); $valuesTab->addRowColspan(2, $cols - 1); $valuesTab->addRowClass("highlight"); #$valuesTab->addRowStyle("color:grey;"); } /** * NEW-BUTTON */ if (!$this->onlyDisplayMode and !$this->isSelection and $userCanCreate and $this->showNewButton and $lineWithId == -1) { $BNew = new Button("", "./images/i2/new.gif"); $BNew->type("icon"); $BNew->id("buttonNewEntry{$this->singularClass}"); #$BNew->onclick($this->JSOnNew == null ? "contentManager.newClassButton('$this->singularClass','');" : $this->JSOnNew); if ($this->displaySide == "left") { #$valuesTab->addRow(array("<b>$this->singularName neu anlegen</b>",$BNew)); #$valuesTab->addRowColspan(1, $cols-1); } else { $valuesTab->addRow(array($BNew, "<b>{$this->singularName} neu anlegen</b>")); $valuesTab->addRowColspan(2, $cols - 1); $valuesTab->addRowEvent("click", $this->JSOnNew == null ? "contentManager.newClassButton('{$this->singularClass}','');" : $this->JSOnNew); $valuesTab->addRowStyle("cursor:pointer;"); $valuesTab->addRowClass(" backgroundColor0"); $valuesTab->addCellStyle(2, "padding-top:10px;padding-bottom:10px;"); } #$valuesTab->addRowColspan(2, $cols-1); } /** * TABLE-CONTENT */ $displayGroup = null; for ($i = 0; $i < count($this->attributes); $i++) { $aid = $this->attributes[$i]->getID(); // get the id of an object separately $sc = $this->attributes[$i]->getA(); // get the attributes-object from the object if ($this->displayGroupBy != null) { $displayGroupField = $this->displayGroupBy; if ($sc->{$displayGroupField} != $displayGroup and $i > 0) { $valuesTab->addRow(""); $valuesTab->addRowClass("backgroundColor0"); } } $row = array(); $styles = array(); if ($this->displaySide == "left") { $colsLeft = $this->newColsRight; $colsRight = $this->newColsLeft; } else { $colsLeft = $this->newColsLeft; $colsRight = $this->newColsRight; } if (count($colsLeft) > 0) { foreach ($colsLeft as $key => $value) { $row[] = str_replace("%%VALUE%%", $aid, $value); $valuesTab->setColWidth(count($row), "20px"); } } foreach ($this->showAttributes as $key => $value) { if (isset($userHiddenFields[$value])) { continue; } if (isset($this->parsers[$value])) { $t = $this->invokeParser($this->parsers[$value], $sc->{$value}, $this->makeParameterStringFromArray($this->parserParameters[$value], $sc, $aid)); } else { $t = htmlspecialchars($sc->{$value}); } if ($this->multiEditMode != null and in_array($value, $this->multiEditMode)) { $posInArray = array_search($value, $this->multiEditMode); if ($this->multiEditModeInputs[$posInArray] == null) { $MI = new HTMLInput($value . "ID{$aid}", "multiInput", $sc->{$value}, array($this->singularClass, $aid, $value)); if ($this->multiEditModeStyle != null) { $MI->style($this->multiEditModeStyle[$posInArray]); } } else { $MI = clone $this->multiEditModeInputs[$posInArray]; $MI->setValue($sc->{$value}); $MI->activateMultiEdit($this->singularClass, $aid); } $t = $MI; } #<td id=\"Browser".$value."$aid\" ".(isset($this->colStyles[$value]) ? "style=\"".$this->colStyles[$value]."\"" : "").">".$t."</td>"; $row[] = $t; if (isset($this->colStyles[$value])) { $styles[count($row)] = $this->colStyles[$value]; } } if (count($colsRight) > 0) { foreach ($colsRight as $key => $value) { $row[] = str_replace("%%VALUE%%", $aid, $value); $valuesTab->setColWidth(count($row), "20px"); } } $valuesTab->addRow($row); if (count($styles) > 0) { foreach ($styles as $col => $s) { $valuesTab->addColStyle($col, $s); } } $valuesTab->setRowID("BrowserMain{$aid}"); #foreach($this->showAttributes as $key => $value) { # $valuesTab->addCellID($cellNo, "Browser".$value."$aid"); #} if ($this->displayGroupBy != null) { $displayGroup = $sc->{$displayGroupField}; } } if ($filteredCol !== null) { $valuesTab->addRow($filteredCol); $valuesTab->addRowColspan(2, $cols - 1); $valuesTab->addRowClass("highlight"); #$valuesTab->addRowStyle("color:grey;"); } if ($lineWithId == -1 and $isMultiPageMode) { $valuesTab->addRow(""); $valuesTab->addRowColspan(1, $cols); $valuesTab->addRowClass("backgroundColor0 browserSeparatorBottom"); if (!$userDefinedEntriesPerPage) { $valuesTab->addRow(array($pageOptions)); $valuesTab->addRowColspan(1, $cols); } else { if ($this->displaySide == "left") { $valuesTab->addRow(array($pageOptions, $BSettings)); $valuesTab->addRowColspan(1, $cols - 1); } else { $valuesTab->addRow(array($BSettings, $pageOptions)); $valuesTab->addRowColspan(2, $cols - 1); } } $valuesTab->addRowClass("backgroundColorHeader"); #$valuesTab->addRow(array($pageLinks)); #$valuesTab->addRowColspan(1, $cols); #$valuesTab->addRowClass("backgroundColorHeader"); } if (count($this->attributes) == 0) { $valuesTab->addRow(array("keine Einträge")); $valuesTab->addRowColspan(1, $cols); } if ($lineWithId != -1) { $valuesTab = $valuesTab->getHTMLForUpdate(); } return $errorTab . $returnTab . $valuesTab . ($lineWithId == -1 ? $this->tip : ""); }
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 getAuftrag($data) { $Beleg = new GRLBM($data["GRLBMID"]); #$this->createAuftrag(new Adresse(1), "W"); $Auftrag = new Auftrag($Beleg->A("AuftragID")); $Adresse = new Adresse($Auftrag->A("AdresseID")); $BCheckK = ""; if (Session::isPluginLoaded("mklickTel")) { $BCheckK = new Button("Adresse mit klickTel prüfen", "compass", "iconic"); $BCheckK->style("float:right;font-size:30px;margin-right:15px;"); $BCheckK->onclick("CustomerPage.popup('Adressprüfung', 'checkAddressKlickTel', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});"); $BCheckK->id("BCheckKT"); Aspect::joinPoint("modButtonKlickTel", $this, __METHOD__, array($BCheckK, $Auftrag)); } $BUpdate = new Button("Adresse ändern", "pen_alt2", "iconic"); $BUpdate->style("float:right;font-size:30px;margin-right:15px;"); $BUpdate->onclick("CustomerPage.popup('Adresse ändern', 'alterAddress', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});"); $BCheckG = new Button("Adresse mit Google prüfen", "compass", "iconic"); $BCheckG->style("float:right;font-size:30px;"); $BCheckG->onclick("CustomerPage.popup('Adressprüfung', 'checkAddressGoogle', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});"); $BCheckG->id("BCheckG"); Aspect::joinPoint("modButtonGoogle", $this, __METHOD__, array($BCheckG, $Auftrag)); $TAdresse = new HTMLTable(2, "Kundenadresse"); $TAdresse->setColWidth(1, 26); $TAdresse->setTableStyle("width:100%;"); $TAdresse->addRow(array(new Button("Adresse", "home", "iconic"), $BCheckG . $BCheckK . $BUpdate . $Adresse->getHTMLFormattedAddress())); $TAdresse->setColStyle(1, "vertical-align:top;"); $TPosten = new HTMLTable(7, "Auftragspositionen"); $TPosten->setTableStyle("width:100%;"); #$TPosten->addColStyle(3, "text-align:right;"); $TPosten->addColStyle(4, "text-align:right;"); $TPosten->addColStyle(5, "text-align:right;"); $TPosten->addColStyle(6, "text-align:right;color:grey;"); $TPosten->setColWidth(1, 26); $TPosten->setColWidth(2, 80); $TPosten->setColWidth(4, 80); $TPosten->setColWidth(5, 80); $TPosten->setColWidth(6, 80); $TPosten->setColWidth(7, 20); $AC = anyC::get("Posten", "GRLBMID", $Beleg->getID()); $AC->addOrderV3("PostenID"); $i = 0; $O = new Button("Positionen", "list", "iconic"); while ($P = $AC->getNextEntry()) { $B = new Button("Position löschen", "trash_stroke", "iconic"); $B->onclick("CustomerPage.rme('delPosten', {PostenID: '" . $P->getID() . "'}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });"); $I = new HTMLInput("mwst", "text", Util::CLNumberParserZ($P->A("menge"))); $I->style("text-align:right;width:80px;"); $I->onEnter("\$j(this).trigger('blur');"); $I->onblur("CustomerPage.rme('setMenge', {PostenID: '" . $P->getID() . "', menge: this.value}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });"); $TPosten->addRow(array($i == 0 ? $O : "", $I, $P->A("name"), Util::CLNumberParserZ($P->A("preis")), Util::CLNumberParserZ($P->A("menge") * $P->A("preis")), Util::CLNumberParserZ($P->A("mwst")) . "%", $B)); $i++; } if ($AC->numLoaded() == 0) { $TPosten->addRow(array($O, "Bitte fügen Sie einen Artikel hinzu.")); $TPosten->addRowColspan(2, 6); $TPosten->setColWidth(2, "100%"); $TPosten->setColStyle(2, "text-align:left;"); } $TSumme = new HTMLTable(3); $TSumme->setTableStyle("width:100%;border-top:1px solid #AAA;margin-top:30px;"); $TSumme->setColWidth(1, 26); $TSumme->addColStyle(3, "text-align:right;"); $TSumme->addRow(array("", "Netto: <b>" . Util::CLFormatCurrency($Beleg->A("nettobetrag") * 1, true) . "</b>", "Brutto: <b>" . Util::CLFormatCurrency($Beleg->A("bruttobetrag") * 1, true) . "</b>")); $IZahlungsart = new HTMLInput("zahlungsart", "select", $Beleg->A("GRLBMpayedVia"), GRLBM::getPaymentVia(null, array("transfer", "debit"))); $IZahlungsart->onchange("if(this.value == 'debit') \$('#rowZahlungsart').show(); else \$('#rowZahlungsart').hide(); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);"); $IBankleitzahl = new HTMLInput("bankleitzahl", "text", $Beleg->A("GRLBMBankleitzahl")); $IBankleitzahl->placeholder("Bankleitzahl"); $IBankleitzahl->style("margin-top:10px;text-align:right;width:130px;"); $IBankleitzahl->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);"); $IKontonummer = new HTMLInput("kontonummer", "text", $Beleg->A("GRLBMKontonummer")); $IKontonummer->placeholder("Kontonummer"); $IKontonummer->style("margin-top:10px;text-align:right;margin-left:10px;width:130px;"); $IKontonummer->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);"); #$IBIC = new HTMLInput("bic"); #$IIBAN = new HTMLInput("iban"); $BCheck = new Button("Prüfung", "question_mark", "iconic"); $BCheck->id("ktoCheck"); $BCheck->style("margin-left:8px;"); $TZahlungsart = new HTMLTable(2, "Zahlungsart"); $TZahlungsart->setTableStyle("width:100%;"); $TZahlungsart->setColWidth(1, 26); $TZahlungsart->addRow(array(new Button("Zahlungsart", "pin", "iconic"), $IZahlungsart)); $TZahlungsart->addRowColspan(2, 2); $TZahlungsart->addCellStyle(1, "vertical-align:top;"); $TZahlungsart->addRow(array("", $IBankleitzahl . " " . $IKontonummer . "{$BCheck} <div id=\"bankMessage\" style=\"margin-top:6px;\"> </div>")); $TZahlungsart->setRowID("rowZahlungsart"); if ($Beleg->A("GRLBMpayedVia") != "debit") { $TZahlungsart->addRowStyle("display:none;"); } else { echo OnEvent::script("CustomerPage.saveKontodaten();"); } $IBemerkung = new HTMLInput("bemerkung", "textarea", $Beleg->A("textbausteinUnten")); $IBemerkung->style("width:100%;height:100px;margin-top:40px;"); $IBemerkung->placeholder("Bemerkungen"); #$IBemerkung->onblur(""); $IBemerkung->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveBemerkung, 300);"); $TZahlungsart->addRow(array(new Button("Bemerkung", "document_alt_stroke", "iconic"), $IBemerkung)); #$TSumme->addRowColspan(2, 2); $TZahlungsart->addCellStyle(1, "vertical-align:top;padding-top:40px;"); $IOK = new Button("Abschließen"); $IOK->className("submitFormButton"); $IOK->onclick("\$(window).unbind('beforeunload'); document.location.href='?CC=Auftrag&page=1';"); $IC = new Button("Abbrechen"); $IC->className("submitFormButton"); $IC->style("background-color:#DDD;color:grey;float:none;"); $IC->onclick("\$(window).unbind('beforeunload'); CustomerPage.rme('cancelAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(){ document.location.href='?CC=Auftrag&page=2'; });"); $TZahlungsart->addRow(array("", $IC . $IOK)); $TZahlungsart->addCellStyle(2, "padding-top:50px;"); #$TZahlungsart->addCellStyle(3, "padding-top:50px;"); $html = "<h1>Auftrag</h1>\n\t\t\t\t{$TAdresse}\n\t\t\t\t{$TPosten}\n\t\t\t\t{$TSumme}\n\t\t\t\t{$TZahlungsart}"; return $html . OnEvent::script("\n\t\t\tCustomerPage.timeout = null;\n\t\t\tCustomerPage.saveBemerkung = function(){ CustomerPage.rme('setBemerkung', {GRLBMID: {$data['GRLBMID']}, bemerkung: \$('textarea[name=bemerkung]').val() }); };\n\t\t\tCustomerPage.saveKontodaten = function(){ CustomerPage.rme('setKontodaten', {\n\t\t\t\tGRLBMID: {$data['GRLBMID']},\n\t\t\t\tzahlungsart: \$('select[name=zahlungsart]').val(),\n\t\t\t\tkontonummer: \$('input[name=kontonummer]').val(),\n\t\t\t\tbankleitzahl: \$('input[name=bankleitzahl]').val()\n\t\t\t}, function(t){ \$('#bankMessage').html(t); }); };"); }
public function getWindow() { $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()) { $T = new HTMLTable(1); $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 des Backups beträgt " . Util::formatByte($F->A("FileSize"), 2)); 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 .= "<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); echo $html . $TF; }
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; }