priceset.php 1013 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. require_once("util.php");
  3. $priceset = new Priceset();
  4. if($action == "new")
  5. $priceset->create(var_post("priceset_name", ""), var_post("priceset_netto", ""));
  6. elseif($action == "edit")
  7. $priceset->update(var_post("priceset_id", ""), array(var_post("priceset_name", ""), var_post("priceset_netto", "")));
  8. elseif($action == "delete")
  9. $priceset->delete(var_get("priceset_id", ""));
  10. $priceset_box = new NTKVBox("priceset_box", 0, 1, False);
  11. $label = new NTKLabel("priceset_label", "<h3>Preiss&auml;tze</h3>");
  12. $priceset_box->add($label);
  13. $priceset_list = $priceset->get('');
  14. for($i = 0; $i < count($priceset_list); $i++)
  15. {
  16. $priceset_box->add(new NTKEPriceset($priceset_list[$i][0], $priceset_list[$i][1], $priceset_list[$i][2]));
  17. }
  18. $label = new NTKLabel("priceset_label", "<h4>neuer Preissatz</h4>");
  19. $priceset_box->add($label);
  20. $priceset_box->add(new NTKEPriceset("", "", 1, True), -1);
  21. $main_box->add($priceset_box, -1, -1, "background-color: #dfe7f3; vertical-align: top;");
  22. ?>