| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- class NTKEBillDetails
- {
- function NTKEBillDetails($bill_product_id, $bill_id, $details, $new = False)
- {
- $this->bill_product_id = $bill_product_id;
- $this->bill_id = $bill_id;
- $this->details = $details;
- $this->new = $new;
- }
-
- 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;
- }
- }
- ?>
|