get($product_id); include("Modules/Product/edit_form.php"); } elseif($action == "search" && $search != "") { $search_toggle = var_post("search_toggle", ""); $search_category = var_post("search_category", ""); $search_in = ""; if($search_category != "") { if($search_toggle && count($search_category) > 0) { for($i = 0; $i < count($search_category); $i++) $search_in .= " category_id='".$search_category[$i]."' AND "; } elseif(count($search_category) > 0) { for($i = 0; $i < count($search_category); $i++) $search_in .= " category_id<>'".$search_category[$i]."' AND "; } } $list_view = new NTKListView("list_view", array('Produktnummer','Name','Beschreibung'), "location.href = 'product.php?action=edit&product_id=%0%';"); $results = $product->get('', array('product_id', 'name', 'details'), $search_in." (product_id LIKE '%$search%' OR name LIKE'%$search%' OR details LIKE '%$search%' OR order_number LIKE '%$search%')"); if(count($results) == 1) $onload = "location.href = 'product.php?action=edit&product_id=".$results[0][0]."';"; $list_view->addLines($results); $main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;"); } else { /*$list_view = new NTKListView("list_view", array('Produktnummer','Name','Beschreibung'), "location.href = '$PHP_SELF?action=edit&product_id=%0%';"); $list_view->addLines($product->get('', array('product_id', 'name', 'details'))); $main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;");*/ $main_box->add(new NTKSpacer(), -1, -1); } echo getHead(); echo $main_box->getHtml(); ?>