tax.php 906 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. require_once("util.php");
  3. $tax = new Tax();
  4. if($action == "new")
  5. $tax->create(var_post("tax_id", ""), array(var_post("tax_name", ""), var_post("tax_rate", "")));
  6. elseif($action == "edit")
  7. $tax->update(var_post("tax_id", ""), array(var_post("tax_name", ""), var_post("tax_rate", "")));
  8. elseif($action == "delete")
  9. $tax->delete(var_get("tax_id", ""));
  10. $tax_box = new NTKVBox("tax_box", 0, 0, False);
  11. $label = new NTKLabel("tax_label", "<h3>Steuers&auml;tze</h3>");
  12. $tax_box->add($label);
  13. $taxlist = $tax->get('');
  14. for($i = 0; $i < count($taxlist); $i++)
  15. {
  16. $tax_box->add(new NTKETax($taxlist[$i][0], $taxlist[$i][1], $taxlist[$i][2]));
  17. }
  18. $label = new NTKLabel("tax_label", "<h4>neuer Steuersatz</h4>");
  19. $tax_box->add($label);
  20. $tax_box->add(new NTKETax("", "", "", True), -1);
  21. $main_box->add($tax_box, -1, -1, "background-color: #dfe7f3; vertical-align: top;");
  22. ?>