| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- class NTKEPriceset
- {
- function NTKEPriceset($priceset_id, $name, $netto, $new = False)
- {
- $this->priceset_id = $priceset_id;
- $this->name = $name;
- $this->netto = $netto;
- $this->new = $new;
- }
- 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_new", "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", "if(confirm('Wirklich loeschen?')) 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;
- }
- }
- ?>
|