本文整理汇总了PHP中HTMLTable::setColStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTable::setColStyle方法的具体用法?PHP HTMLTable::setColStyle怎么用?PHP HTMLTable::setColStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLTable
的用法示例。
在下文中一共展示了HTMLTable::setColStyle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getArtikel
public function getArtikel($data)
{
$TKategorien = new HTMLTable(2, "Kategorien");
$TKategorien->setTableStyle("width:100%;");
$TKategorien->setTableID("tableKategorien");
$TKategorien->setColWidth(1, 20);
$B = new Button("Nach Kategorie filtern", "arrow_down", "iconic");
$B->className("reverse");
$AC = anyC::get("Kategorie", "type", "2");
$AC->addOrderV3("name");
$TKategorien->addRow(array($B, "Alle Kategorien"));
$TKategorien->addRowClass("selectable");
$TKategorien->addRowEvent("click", "CustomerPage.rme('getArtikel', {KategorieID: '', query : '{$data['query']}', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
if ($data["KategorieID"] == "") {
$TKategorien->addRowStyle("text-decoration:underline;");
}
while ($K = $AC->getNextEntry()) {
$B = new Button("Nach Kategorie filtern", "arrow_down", "iconic");
if ($data["KategorieID"] != $K->getID()) {
$B->className("reverse");
}
$TKategorien->addRow(array($B, $K->A("name")));
$TKategorien->addRowClass("selectable");
$TKategorien->addRowEvent("click", "CustomerPage.rme('getArtikel', {KategorieID: '" . $K->getID() . "', query : '{$data['query']}', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
#if($data["KategorieID"] == $K->getID())
# $TKategorien->addRowStyle ("text-decoration:underline;");
}
$TArtikel = new HTMLTable(4, "Artikel");
$TArtikel->setTableStyle("width:100%;");
$TArtikel->setColWidth(1, 26);
$TArtikel->setColWidth(2, 100);
$TArtikel->setColStyle(4, "text-align:right;");
$BQ = "";
if ($data["query"] != "") {
$BQ = new Button("Suche löschen", "x_alt", "iconic");
$BQ->onclick("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : '', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
$BQ->style("color:darkred;float:left;");
} else {
$BQ = new Button("Suche", "question_mark", "iconic");
}
$I = new HTMLInput("query", "text", $data["query"]);
$I->placeholder("Suche nach Name, Nummer oder Beschreibung");
$I->style("width:90%;");
$I->onEnter("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : this.value, GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
$BS = new Button("Los", "arrow_right", "iconic");
$BS->onclick("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : \$j('[name=query]').val(), GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
$TArtikel->addRow(array($BQ, $I . " " . $BS));
$TArtikel->addRowColspan(2, 3);
$AC = anyC::get("Artikel");
if ($data["KategorieID"] != "") {
$AC->addAssocV3("KategorieID", "=", $data["KategorieID"], "AND", "1");
}
if ($data["query"] != "") {
$AC->addAssocV3("artikelnummer", "LIKE", "%{$data['query']}%", "AND", "2");
$AC->addAssocV3("name", "LIKE", "%{$data['query']}%", "OR", "2");
$AC->addAssocV3("beschreibung", "LIKE", "%{$data['query']}%", "OR", "2");
}
$AC->addOrderV3("artikelnummer");
$AC->addOrderV3("name");
$AC->setLimitV3(100);
while ($A = $AC->getNextEntry()) {
$B = new Button("Artikel hinzufügen", "arrow_left", "iconic");
$B->className("reverse");
#$B->onclick("CustomerPage.rme('delPosten', {PostenID: '".$P->getID()."'}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: $data[GRLBMID]}, function(transport){ $('#contentLeft').html(transport); }); });");
$A->resetParsers();
$TArtikel->addRow(array($B, $A->A("artikelnummer"), $A->A("name") . ($A->A("bemerkung") != "" ? "<br /><small style=\"color:grey;\">" . $A->A("bemerkung") . "</small>" : ""), $this->showPrices ? Util::CLFormatCurrency($A->getGesamtBruttoVK() * 1, true) . "<br /><small style=\"color:grey;\">" . Util::CLFormatCurrency($A->getGesamtNettoVK() * 1, true) . "</small>" : ""));
$TArtikel->addRowClass("selectable");
$TArtikel->addRowEvent("click", "CCAuftrag.lastTextbausteinUnten = \$('[name=textbausteinUnten]').val(); CustomerPage.rme('addArtikel', {ArtikelID: '" . $A->getID() . "', GRLBMID: {$data['GRLBMID']}}, function(transport){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });");
}
if ($AC->numLoaded() == 0) {
$TArtikel->addRow(array("", "Keine Artikel gefunden"));
$TArtikel->setColWidth(2, 200);
}
$html = "<h1>Artikel</h1>\n\t\t\t\t{$TKategorien}\n\t\t\t\t{$TArtikel}";
return $html;
}
示例2: getAuftrag
public function getAuftrag($data)
{
if (!$this->loggedIn) {
return "TIMEOUT";
}
$html = "";
if ($data["GRLBMID"] == 0) {
$html .= "<p class=\"highlight\" style=\"margin-top:10px;\">Bitte wählen Sie rechts einen Lieferschein.</p>";
return $html;
}
$Beleg = new GRLBM($data["GRLBMID"]);
#$this->createAuftrag(new Adresse(1), "W");
$Auftrag = new Auftrag($Beleg->A("AuftragID"));
$Adresse = new Adresse($Auftrag->A("AdresseID"));
#$TAdresse = new HTMLTable(2, "Kundenadresse");
#$TAdresse->setColWidth(1, 26);
#$TAdresse->setTableStyle("width:100%;");
#$TAdresse->addRow(array(new Button("Adresse", "home", "iconic"), $Adresse->getHTMLFormattedAddress()));
#$TAdresse->setColStyle(1, "vertical-align:top;");
$TPosten = new HTMLTable(3, "Lieferung");
$TPosten->setTableStyle("width:100%;");
$TPosten->setColWidth(1, 26);
$TPosten->setColWidth(2, 80);
$TPosten->setColWidth(3, "100%");
$ACP = anyC::get("Posten", "GRLBMID", $Beleg->getID());
$ACP->addOrderV3("PostenID");
$ACP->addAssocV3("useForLieferung", "=", "1");
$i = 0;
$O = new Button("Positionen", "list", "iconic");
/*while($P = $AC->getNextEntry()){
$I = new HTMLInput("mwst", "text", Util::CLNumberParser($P->A("menge")));
$I->style("text-align:right;width:80px;font-size:15px;padding:7px;padding-right:20px;");
#$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){ if(transport == 'TIMEOUT') { document.location.href='?CC=Lieferschein&page=login'; return; } $('#contentLeft .content').html(transport); noty({text: 'Menge gespeichert', type: 'success'}); }); });");
$I->onfocus("this.select();");
$TPosten->addRow(array(
$i == 0 ? $O : "",
$I,
"<span style=\"font-size:15px;\">".$P->A("name")."</span>"));
$i++;
}*/
$AC = anyC::get("Artikel");
$AC->addOrderV3("name");
$AC->addAssocV3("useForLieferung", "=", "1");
while ($A = $AC->getNextEntry()) {
$menge = 0;
while ($P = $ACP->n()) {
if ($P->A("oldArtikelID") == $A->getID()) {
$menge = abs($P->A("menge"));
}
}
$ACP->resetPointer();
$I = new HTMLInput("Artikel_" . $A->getID(), "text", Util::CLNumberParser($menge));
$I->style("text-align:right;width:80px;font-size:15px;padding:7px;padding-right:20px;");
#$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){ if(transport == 'TIMEOUT') { document.location.href='?CC=Lieferschein&page=login'; return; } $('#contentLeft .content').html(transport); noty({text: 'Menge gespeichert', type: 'success'}); }); });");
$I->onfocus("this.select();");
$TPosten->addRow(array($i == 0 ? $O : "", $I, "<span style=\"font-size:15px;\">" . $A->A("name") . "</span>"));
$i++;
}
if ($AC->numLoaded() == 0) {
$TPosten->addRow(array($O, "Keine Artikel"));
$TPosten->addRowColspan(2, 6);
$TPosten->setColWidth(2, "100%");
$TPosten->setColStyle(2, "text-align:left;");
}
$IOK = new Button("Speichern");
$IOK->className("submitFormButton");
$IOK->onclick("CustomerPage.rme('handleLieferung', \$('#posten').serialize(), function(transport){ \$('#contentLeft h1').html('Auftrag'); \$('.selected').removeClass('selected'); \$('#contentLeft .content').html(transport); })");
#$IOK->onclick("$('#contentLeft h1').html('Auftrag'); $('.selected').removeClass('selected'); CustomerPage.rme('getAuftrag', {GRLBMID: 0}, function(transport){ $('#contentLeft .content').html(transport); }, function(){}, 'POST');");
$IC = new Button("Abbrechen");
$IC->className("submitFormButton");
$IC->style("background-color:#DDD;color:grey;float:none;");
$IC->onclick("\$('#contentLeft h1').html('Auftrag'); \$('.selected').removeClass('selected'); CustomerPage.rme('getAuftrag', {GRLBMID: 0}, function(transport){ \$('#contentLeft .content').html(transport); }, function(){}, 'POST');");
#$TZahlungsart = new HTMLTable(2);
#$TZahlungsart->setTableStyle("width:100%;margin-top:50px;");
#$TZahlungsart->setColWidth(1, 26);
#$TZahlungsart->addRow(array("", $IOK));
$IA = new HTMLInput("action", "hidden", "handleLieferung");
$IA = new HTMLInput("GRLBMID", "hidden", $Beleg->getID());
$html .= "\n\t\t\t<form id=\"posten\" style=\"border:0px;padding:0px;width:100%;\" >\n\t\t\t\t{$TPosten}\n\t\t\t\t{$IOK}{$IC}\n\t\t\t\t{$IA}\n\t\t\t</form>";
return $html . OnEvent::script("\$('#contentLeft h1').html('Auftrag " . $Beleg->A("prefix") . $Beleg->A("nummer") . "');");
}