function getHtml() { $html = ""; $html .= "<div width=\"100%\" height=\"100%\">\n"; $html .= "<form name=\"priceset_form_" . $this->priceset_id . "\" action=\"configuration.php\" method=\"POST\">\n"; $html .= "<input type=\"hidden\" name=\"page\" value=\"priceset\">\n"; $html .= "<input type=\"hidden\" name=\"priceset_id\" value=\"" . $this->priceset_id . "\">\n"; $html .= "<table width=\"100%\" height=\"100%\">\n"; $html .= "<tr>\n"; $html .= "<td>\n"; $label = new NTKLabel("priceset_name_label", "Bezeichnung"); $html .= $label->getHtml(); $html .= "</td>\n"; $html .= "<td>\n"; $entry = new NTKEntry("priceset_name", $this->name); $html .= $entry->getHtml(); $html .= "</td>\n"; $html .= "<td>\n"; $label = new NTKLabel("priceset_netto_label", "Netto"); $html .= $label->getHtml(); $html .= "</td>\n"; $html .= "<td>\n"; $entry = new NTKCheckbox("priceset_netto", 1, $this->netto); $html .= $entry->getHtml(); $html .= "</td>\n"; if ($this->new) { $html .= "<td colspan=\"2\">\n"; $button = new NTKButton("button_delete", "hinzufügen", "document.forms['priceset_form_" . $this->priceset_id . "'].submit();"); $html .= $button->getHtml(); $html .= "</td>\n"; $html .= "<input type=\"hidden\" name=\"action\" value=\"new\">\n"; } else { $html .= "<td>\n"; $button = new NTKButton("button_edit", "ok", "document.forms['priceset_form_" . $this->priceset_id . "'].submit();"); $html .= $button->getHtml(); $html .= "</td>\n"; $html .= "<input type=\"hidden\" name=\"action\" value=\"edit\">\n"; $html .= "<td>\n"; $button = new NTKButton("button_delete", "löschen", "location.href = 'configuration.php?page=priceset&action=delete&priceset_id=" . $this->priceset_id . "';"); $html .= $button->getHtml(); $html .= "</td>\n"; } $html .= "</tr>\n"; $html .= "</table>\n"; $html .= "</form>\n"; $html .= "</div>\n"; return $html; }
function getHtml() { $html .= "<div width=\"100%\" height=\"100%\">\n"; $html .= "<form name=\"bill_details_form_" . $this->bill_product_id . "\" action=\"bill.php\" method=\"POST\">\n"; $html .= "<input type=\"hidden\" name=\"bill_product_id\" value=\"" . $this->bill_product_id . "\">\n"; $html .= "<input type=\"hidden\" name=\"bill_id\" value=\"" . $this->bill_id . "\">\n"; $html .= "<input type=\"hidden\" name=\"product_id\" value=\"-1\">\n"; $html .= "<input type=\"hidden\" name=\"amount\" value=\"0\">\n"; $html .= "<input type=\"hidden\" name=\"action\" value=\"edit\">\n"; $html .= "<table width=\"100%\" height=\"100%\" border=1>\n"; $html .= "<tr>\n"; if (!$this->new) { global $PHP_SELF; $html .= "<td width=\"32\"><a href=\"" . $PHP_SELF . "?action=edit&bill_id=" . $this->bill_id . "&bill_product_id=" . $this->bill_product_id . "&db_action=move_down\"><img src=\"Icons/down.png\" border=\"0\"></a></td>\n"; $html .= "<td width=\"32\"><a href=\"" . $PHP_SELF . "?action=edit&bill_id=" . $this->bill_id . "&bill_product_id=" . $this->bill_product_id . "&db_action=move_up\"><img src=\"Icons/up.png\" border=\"0\"></a></td>\n"; } $html .= "<td align=right>\n"; $label = new NTKLabel("details_label", "Textzeile"); $html .= $label->getHtml(); $html .= "</td>\n"; $html .= "<td width=\"200px\">\n"; $entry = new NTKEntry("details", $this->details, "width: 200px;"); $html .= $entry->getHtml(); $html .= "</td>\n"; if ($this->new) { $html .= "<td colspan=\"2\">\n"; $button = new NTKButton("button_new", "hinzufügen", "document.forms['bill_details_form_" . $this->bill_product_id . "'].submit();"); $html .= $button->getHtml(); $html .= "</td>\n"; $html .= "<input type=\"hidden\" name=\"db_action\" value=\"position_add\">\n"; } else { $html .= "<td>\n"; $button = new NTKButton("button_edit", "ok", "document.forms['bill_details_form_" . $this->bill_product_id . "'].submit();"); $html .= $button->getHtml(); $html .= "</td>\n"; $html .= "<input type=\"hidden\" name=\"db_action\" value=\"position_edit\">\n"; $html .= "<td>\n"; $button = new NTKButton("button_delete", "löschen", "location.href = 'bill.php?action=edit&bill_id=" . $this->bill_id . "&db_action=position_delete&bill_product_id=" . $this->bill_product_id . "';"); $html .= $button->getHtml(); $html .= "</td>\n"; } $html .= "</tr>\n"; $html .= "</table>\n"; $html .= "</form>\n"; $html .= "</div>\n"; return $html; }
<?php $table = new NTKTable("table", 4, 4, False); $number_label = new NTKLabel("", "Rechnungsnummer:"); $table->add($number_label, 0, 0); $number_label = new NTKLabel("", "fortlaufend"); $table->add($number_label, 0, 1); $date_label = new NTKLabel("", "Datum:"); $table->add($date_label, 1, 2); $date = getdate(time()); $date_entry = new NTKEntry("date", $date['year'] . "-" . $date['mon'] . "-" . $date['mday']); $table->add($date_entry, 1, 3); $customer_id_label = new NTKLabel("", "Kundennummer:"); $table->add($customer_id_label, 1, 0); $customer_id_entry = new NTKEntry("customer_id"); $onload .= "document.getElementById('customer_id').focus();"; $customer_id_entry->addEvent("onkeyup", "parent.frames['action'].location.href='action_customer.php?form=bill_form&entry=customer_id&next=date&search='+this.value;"); $table->add($customer_id_entry, 1, 1); $cancel_button = new NTKButton("cancel", "Abbrechen", "location.href = 'bill.php';"); $table->add($cancel_button, 3, 2); $submit_button = new NTKButton("submit", "Rechnung eintragen", "document.forms['bill_form'].submit();"); $table->add($submit_button, 3, 3); $form = new NTKForm("bill_form", "bill.php", $table); $form->addAttribute("db_action", "new"); $form->addAttribute("action", "edit"); $main_box->add($form, False, True, "background-color: #dfe7f3; vertical-align: middle; align: center;");
function getHtml() { $html .= "<div width=\"100%\" height=\"100%\">\n"; $html .= "<form name=\"bill_product_form_" . $this->bill_product_id . "\" action=\"bill.php\" method=\"POST\">\n"; $html .= "<input type=\"hidden\" name=\"bill_product_id\" value=\"" . $this->bill_product_id . "\">\n"; $html .= "<input type=\"hidden\" name=\"bill_id\" value=\"" . $this->bill_id . "\">\n"; $html .= "<input type=\"hidden\" name=\"product_id\" value=\"" . $this->product_id . "\">\n"; $html .= "<input type=\"hidden\" name=\"action\" value=\"edit\">\n"; $html .= "<table width=\"100%\" height=\"100%\" border=0>\n"; $html .= "<tr>\n"; $html .= "<td align=right width=1>\n"; $label = new NTKLabel("product_label", "Produktnummer"); $html .= $label->getHtml(); $html .= "</td>\n"; $html .= "<td width=1>\n"; $entry = new NTKEntry("product_id", $this->product_id, "width: 100px;"); $html .= $entry->getHtml(); $html .= "</td>\n"; $html .= "<td align=left>\n"; $label = new NTKLabel("product_name", "(" . $this->product_name . ")"); $html .= $label->getHtml(); $html .= "</td>\n"; $html .= "<td align=right width=1>\n"; $label = new NTKLabel("amount_label", "Stückzahl"); $html .= $label->getHtml(); $html .= "</td>\n"; $html .= "<td>\n"; $entry = new NTKEntry("amount", $this->amount, "width: 50px;"); $html .= $entry->getHtml(); $html .= "</td>\n"; $html .= "<td align=right width=1>\n"; $label = new NTKLabel("details_label", "Anmerkung"); $html .= $label->getHtml(); $html .= "</td>\n"; $html .= "<td>\n"; $entry = new NTKEntry("details", $this->details, "width: 100%;"); $html .= $entry->getHtml(); $html .= "</td>\n"; $html .= "<td align=right width=1>\n"; $label = new NTKLabel("rabatt_label", "Rabatt"); $html .= $label->getHtml(); $html .= "</td>\n"; $html .= "<td>\n"; $entry = new NTKEntry("rabatt", $this->rabatt, "width: 50px;"); $html .= $entry->getHtml(); $html .= "</td>\n"; if ($this->new) { $html .= "<td colspan=\"2\">\n"; $button = new NTKButton("button_delete", "hinzufügen", "document.forms['bill_product_form_" . $this->bill_product_id . "'].submit();"); $html .= $button->getHtml(); $html .= "</td>\n"; $html .= "<input type=\"hidden\" name=\"db_action\" value=\"position_add\">\n"; } else { $html .= "<td>\n"; $button = new NTKButton("button_edit", "ok", "document.forms['bill_product_form_" . $this->bill_product_id . "'].submit();"); $html .= $button->getHtml(); $html .= "</td>\n"; $html .= "<td>\n"; $button = new NTKButton("button_delete", "löschen", "location.href = 'bill.php?action=edit&bill_id=" . $this->bill_id . "&db_action=position_delete&bill_product_id=" . $this->bill_product_id . "';"); $html .= $button->getHtml(); $html .= "</td>\n"; $html .= "<input type=\"hidden\" name=\"db_action\" value=\"position_edit\">\n"; } $html .= "</tr>\n"; $html .= "</table>\n"; $html .= "</form>\n"; $html .= "</div>\n"; return $html; }