本文整理汇总了PHP中HTMLTable::addCellStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTable::addCellStyle方法的具体用法?PHP HTMLTable::addCellStyle怎么用?PHP HTMLTable::addCellStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLTable
的用法示例。
在下文中一共展示了HTMLTable::addCellStyle方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAngebote
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;
}
示例2: getHTML
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;
}
示例3: getWindowHTML
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;
}
示例4: showWarenkorb
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>";
}
示例5: getAuftrag
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); }); };");
}
示例6: getBrowserHTML
//.........这里部分代码省略.........
$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");
示例7: getSetTable
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;
}
示例8: browser
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) : "");
}
示例9: EMailPopupAttachmentsSP
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>";
}
示例10: getAuftrag
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;");
//.........这里部分代码省略.........
示例11: getWindow
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;
}
示例12: getService
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;
}