| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <?php
- require_once("util.php");
- require_once("NTK/NTK.php");
- require_once("../DataBase/Product.php");
- require_once("../DataBase/Group.php");
- require_once("../DataBase/Priceset.php");
- require_once("../DataBase/Price.php");
- require_once("../DataBase/Category.php");
- require_once("../DataBase/Tax.php");
- require_once("../DataBase/Assistant.php");
- require_once("DataBase/Bill.php");
- require_once("DataBase/Bill_Product.php");
- $group = new Group();
- $priceset = new Priceset();
- $category = new Category();
- $product = new Product();
- $price = new Price();
- $tax = new Tax();
- $assistant = new Assistant();
- $bill = new Bill();
- if(var_post("print", "") == "print")
- {
- $search = "";
- if(!var_post("group_all", ""))
- {
- if($search)
- $search .= " AND group_id='".var_post("group", "")."' ";
- else
- $search .= "group_id='".var_post("group", "")."' ";
- }
- if(!var_post("category_all", ""))
- {
- if($search)
- $search .= " AND category_id='".var_post("category", "")."' ";
- else
- $search .= "category_id='".var_post("category", "")."' ";
- }
- if(var_post("available", "") && !var_post("not_available", ""))
- {
- if($search)
- $search .= " AND available='1' ";
- else
- $search .= "available='1' ";
- }
- if(!var_post("available", "") && var_post("not_available", ""))
- {
- if($search)
- $search .= " AND available='0' ";
- else
- $search .= "available='0' ";
- }
- if(var_post("product_id_from", ""))
- {
- if($search)
- $search .= " AND (product_id >=".var_post("product_id_from", "").") ";
- else
- $search .= "(product_id >=".var_post("product_id_from", "").") ";
- }
- if(var_post("product_id_to", ""))
- {
- if($search)
- $search .= " AND (product_id <=".var_post("product_id_to", "").") ";
- else
- $search .= "(product_id <=".var_post("product_id_to", "").") ";
- }
- $product_data = $product->get('', array(), $search);
- $assistant_data = $assistant->get(var_post("assistant", ""));
- $priceset = new Priceset();
- $tmp = $priceset->get(var_post("priceset", ""));
- $priceset_data = $tmp[0];
- include("Druckvorlagen/zeilen.php");
- include("Druckvorlagen/list.php");
- }
- else
- {
- $toolbar_box = new NTKVBox("toolbar_box", 0, 0, False);
- $main_box = new NTKTable("main_box", 14, 4, False);
- $main_box->setStyle("background-color: #dfe7f3;");
- $main_box->add(new NTKLabel("", "Produktnummer von:"), 1, 0);
- $main_box->add(new NTKEntry("product_id_from", ""), 1, 1);
- $main_box->add(new NTKLabel("", "bis: "), 1, 2);
- $main_box->add(new NTKEntry("product_id_to", ""), 1, 3);
- $main_box->add(new NTKLabel("", "alle Gruppen"), 3, 0);
- $main_box->add(new NTKCheckbox("group_all", 1, True), 3, 1);
- $main_box->add(new NTKLabel("", "aus Gruppe"), 3, 2);
- $main_box->add(new NTKComboBox("group", $group->get("")), 3, 3);
- $main_box->add(new NTKLabel("", "verfügbare"), 5, 0);
- $main_box->add(new NTKCheckbox("available", 1, True), 5, 1);
- $main_box->add(new NTKLabel("", "nicht verfügbare"), 5, 2);
- $main_box->add(new NTKCheckbox("not_available", 1, False), 5, 3);
- $main_box->add(new NTKLabel("", "aus Preisliste"), 7, 0);
- $main_box->add(new NTKComboBox("priceset", $priceset->get("")), 7, 1);
- $main_box->add(new NTKLabel("", "alle Kategorien"), 9, 0);
- $main_box->add(new NTKCheckbox("category_all", 1, True), 9, 1);
- $main_box->add(new NTKLabel("", "aus Kategorie"), 9, 2);
- $main_box->add(new NTKComboBox("category", $category->get("")), 9, 3);
- $main_box->add(new NTKLabel("", "Mitarbeiter"), 11, 0);
- $main_box->add(new NTKComboBox("assitant", $assistant->get("")), 11, 1);
- $main_box->add(new NTKButton("submit", "Druckvorschau", "document.forms['print'].submit();"), 13, 3);
- $form = new NTKForm("print", "stat_product_list.php", $main_box);
- $form->addAttribute("print", "print");
- $toolbar_box->add($form, 0, 0);
- echo getHead();
- echo $toolbar_box->getHtml();
- }
- ?>
- </body>
- </html>
|