get($tour_id); include("Modules/Tour/edit_form.php"); } elseif($action == "search" && var_post("search_entry", "") != "") { $search = var_post("search_entry", ""); $list_view = new NTKListView("list_view", array('Tournummer','Bezeichner'), "location.href = 'tour.php?action=edit&tour_id=%0%';"); $list_view->addLines($tour->get('', array('tour_id', 'name'), "tour_id LIKE '%$search%' OR name LIKE'%$search%'")); $main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;"); } elseif($action == "list_tour") { $assistant = new Assistant(); $tour = new Tour(); $bill_box = new NTKHBox("bill_box", 0, 0); $bill_box->add(new NTKLabel("", "Tournummer: ".$tour_id." - Datum: ".$datum.""), False, False, "background-color: #dfe7f3;"); $bill_box->add(new NTKLabel("", "Kundennummer:"), 150); $bill_box->add(new NTKEntry("customer_id", ""), 120); $bill_box->add(new NTKLabel("", "Mitarbeiter:"), 120); $bill_box->add(new NTKComboBox("assistant_id", $assistant->get()), 120); $bill_box->add(new NTKLabel("", "Tour:"), 80); $bill_box->add(new NTKComboBox("tour_id", $tour->get()), 120); $bill_box->add(new NTKButton("bill_button", "Erstelle Rechnung", "document.forms['bill_form'].submit();"), 200); $bill_form = new NTKForm("bill_form", "tour.php", $bill_box); $bill_form->addAttribute("db_action", "tour_to_bill"); $bill_form->addAttribute("date", $datum); $bill_form->addAttribute("current_tour_id", $tour_id); $main_box->add($bill_form, 0, 0, "background-color: #dfe7f3; vertical-align: top;"); $list_view = new NTKListView("list_view", array('Rechnungsnummer','Kunde'), "location.href = 'bill.php?from_page=tour&fp_tour_id=$tour_id&fp_date=".$datum."&action=edit&bill_id=%0%';"); $list_view->addLines($bill->get('', array('bill_id', 'bill.customer_id'), "bill.tour_id='$tour_id' AND date='".$datum."'")); $main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;"); } else { $list_view = new NTKListView("list_view", array('Tournummer','Bezeichner'), "location.href = 'tour.php?action=edit&tour_id=%0%';"); $list_view->addLines($tour->get('', array('tour_id', 'name'))); $main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;"); } // main content $main_box->add($spacer, -1, -1, "background-color: #dfe7f3;"); echo getHead(); echo $main_box->getHtml(); ?>