NTKEGroup.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. class NTKEGroup
  3. {
  4. function NTKEGroup($group_id, $name, $new = False)
  5. {
  6. $this->group_id = $group_id;
  7. $this->name = $name;
  8. $this->new = $new;
  9. }
  10. function getHtml()
  11. {
  12. $html = "";
  13. $html .= "<div width=\"100%\" height=\"100%\">\n";
  14. $html .= "<form name=\"group_form_".$this->group_id."\" action=\"configuration.php\" method=\"POST\">\n";
  15. $html .= "<input type=\"hidden\" name=\"page\" value=\"group\">\n";
  16. $html .= "<table width=\"100%\" height=\"100%\">\n";
  17. $html .= "<tr>\n";
  18. $html .= "<td>\n";
  19. $label = new NTKLabel("group_id_label", "Nummer");
  20. $html .= $label->getHtml();
  21. $html .= "</td>\n";
  22. $html .= "<td>\n";
  23. $entry = new NTKEntry("group_id", $this->group_id);
  24. $html .= $entry->getHtml();
  25. $html .= "</td>\n";
  26. $html .= "<td>\n";
  27. $label = new NTKLabel("group_name_label", "Bezeichnung");
  28. $html .= $label->getHtml();
  29. $html .= "</td>\n";
  30. $html .= "<td>\n";
  31. $entry = new NTKEntry("group_name", $this->name);
  32. $html .= $entry->getHtml();
  33. $html .= "</td>\n";
  34. if($this->new)
  35. {
  36. $html .= "<td colspan=\"2\">\n";
  37. $button = new NTKButton("button_new", "hinzuf&uuml;gen", "document.forms['group_form_".$this->group_id."'].submit();");
  38. $html .= $button->getHtml();
  39. $html .= "</td>\n";
  40. $html .= "<input type=\"hidden\" name=\"action\" value=\"new\">\n";
  41. }
  42. else
  43. {
  44. $html .= "<td>\n";
  45. $button = new NTKButton("button_edit", "ok", "document.forms['group_form_".$this->group_id."'].submit();");
  46. $html .= $button->getHtml();
  47. $html .= "</td>\n";
  48. $html .= "<input type=\"hidden\" name=\"action\" value=\"edit\">\n";
  49. $html .= "<td>\n";
  50. $button = new NTKButton("button_delete", "l&ouml;schen", "if(confirm('Wirklich loeschen?')) location.href = 'configuration.php?page=group&action=delete&group_id=".$this->group_id."';");
  51. $html .= $button->getHtml();
  52. $html .= "</td>\n";
  53. }
  54. $html .= "</tr>\n";
  55. $html .= "</table>\n";
  56. $html .= "</form>\n";
  57. $html .= "</div>\n";
  58. return $html;
  59. }
  60. }
  61. ?>