group.php 874 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. require_once("util.php");
  3. $group = new Group();
  4. if($action == "new")
  5. $group->create(var_post("group_id", ""), array(var_post("group_name", "")));
  6. elseif($action == "edit")
  7. $group->update(var_post("group_id", ""), array(var_post("group_name", "")));
  8. elseif($action == "delete")
  9. $group->delete(var_get("group_id", ""));
  10. $group_box = new NTKVBox("group_box", 0, 0, False);
  11. $label = new NTKLabel("group_label", "<h3>Gruppen</h3>");
  12. $group_box->add($label);
  13. $group_list = $group->get('');
  14. for($i = 0; $i < count($group_list); $i++)
  15. {
  16. $group_box->add(new NTKEGroup($group_list[$i][0], $group_list[$i][1]));
  17. }
  18. $label = new NTKLabel("group_label", "<h4>neue Gruppe</h4>");
  19. $group_box->add($label);
  20. $group_box->add(new NTKEGroup("", "", True), -1);
  21. $main_box->add($group_box, -1, -1, "background-color: #dfe7f3; vertical-align: top;");
  22. ?>