edit_form.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. $table = new NTKTable("table", 2, 4, False);
  3. $name_label = new NTKLabel("", "Bezeichner:");
  4. $table->add($name_label, 0, 0);
  5. $name_entry = new NTKEntry("name", $data[0][1]);
  6. $table->add($name_entry, 0, 1);
  7. $assistant_id_label = new NTKLabel("", "Mitarbeiter:");
  8. $table->add($assistant_id_label, 0, 2);
  9. $assistant_id_entry = new NTKComboBox("assistant_id", $assistant->get(), $data[0][2]);
  10. $table->add($assistant_id_entry, 0, 3);
  11. $delete_button = new NTKButton("delete", "L&ouml;schen", "if(confirm('Wirklich loeschen?')) location.href = 'tour.php?db_action=delete&tour_id=".$data[0][0]."';");
  12. $table->add($delete_button, 1, 1);
  13. $cancel_button = new NTKButton("cancel", "Abbrechen", "location.href = 'tour.php';");
  14. $table->add($cancel_button, 1, 2);
  15. $submit_button = new NTKButton("submit", "Speichern", "document.forms['tour'].submit();");
  16. $table->add($submit_button, 1, 3);
  17. $form = new NTKForm("tour", "tour.php", $table);
  18. $form->addAttribute("db_action", "edit");
  19. $form->addAttribute("tour_id", $data[0][0]);
  20. $main_box->add($form, False, True, "background-color: #dfe7f3; vertical-align: middle; align: center;");
  21. ?>