action_product.php 892 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. require_once("util.php");
  3. require_once("NTK/NTK.php");
  4. require_once("DataBase/Product.php");
  5. ?>
  6. <html>
  7. <head>
  8. <title> Index </title>
  9. <?php
  10. echo getHead();
  11. $search = var_get("search", "");
  12. if(strlen($search) >= 3)
  13. {
  14. $product = new Product();
  15. $main_box = new NTKVBox("main_box", 0, 0, False);
  16. $list_view = new NTKListView("list_view", array('Produktnummer','Name','Beschreibung'), "parent.frames['main'].document.".var_get("form", "").".".var_get("entry", "").".value = '%0%';parent.frames['main'].document.".var_get("form", "").".".var_get("next", "").".focus();");
  17. $list_view->addLines($product->get('', array('product_id', 'name', 'details'), " product_id LIKE '%$search%' OR name LIKE'%$search%' OR details LIKE '%$search%'"));
  18. $main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;");
  19. echo $main_box->getHtml();
  20. }
  21. ?>
  22. </body>
  23. </html>