<html>
<head>
	<title> Index </title>
	
<?php 
include "Modules/Assistant/db_action.php";
$main_box = new NTKVBox("main_box", 0, 0, False);
// Toolbar
$page = "assistant";
$printfile = "";
include "Modules/toolbar.php";
// small Toolbar
include "Modules/Assistant/toolbar.php";
// main content
$action = var_get_post("action", "");
$search = var_post("search_entry", "");
$assistant_id = var_get("assistant_id", "");
if ($action == "new") {
    include "Modules/Assistant/new_form.php";
} elseif ($action == "edit" && $assistant_id != "") {
    $data = $assistant->get($assistant_id);
    include "Modules/Assistant/edit_form.php";
} elseif ($action == "search" && $search != "") {
    $list_view = new NTKListView("list_view", array('Mitarbeiternummer', 'Vorname', 'Nachname'), "location.href = 'assistant.php?action=edit&assistant_id=%0%';");
    $list_view->addLines($assistant->get('', array('assistant_id', 'prename', 'postname'), "assistant_id LIKE '%{$search}%' OR prename LIKE'%{$search}%' OR postname LIKE '%{$search}%'"));
    $main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;");
} else {
    $list_view = new NTKListView("list_view", array('Mitarbeiternummer', 'Vorname', 'Nachname'), "location.href = 'assistant.php?action=edit&assistant_id=%0%';");
    $list_view->addLines($assistant->get('', array('assistant_id', 'prename', 'postname')));
    $main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;");
<head>
	<title> Index </title>

<?php 
include "Modules/Product/db_action.php";
$main_box = new NTKVBox("main_box", 0, 0, False);
// Toolbar
$page = "product";
$printfile = "";
include "Modules/toolbar.php";
// small Toolbar
include "Modules/Product/toolbar.php";
// main content
$action = var_get_post("action", "");
$search = var_post("search_entry", "");
$product_id = var_get_post("product_id", "");
$onload .= "document.getElementById('search_entry').focus();";
if ($action == "new") {
    include "Modules/Product/new_form.php";
} elseif ($action == "edit" && $product_id != "") {
    $data = $product->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 ";
            }
$price = new Price();
$tmp_priceset = $priceset->get($priceset_id);
$netto = 0;
if (count($tmp_priceset) > 0) {
    $netto = $tmp_priceset[0][2];
}
?>

<div width="100%" align="center">

<?php 
// prepare search/filter params
$search_product = var_get_post("search_product", "");
$search_category = var_get_post("search_category", "");
$item_offset = var_get_post("item_offset", 0);
$item_count = var_get_post("item_count", 40);
if ($search_category != "") {
    require_once "DataBase/Category.php";
    $category = new Category();
    $tmp = $category->get($search_category);
    if (count($tmp) > 0) {
        echo "<small>Kategorie:</small> " . $tmp[0][1] . "";
    }
}
?>

<table border="0" width="80%">
	<tr class="table_header">
		<td>ProduktNr.</td>
		<td>Bezeichnung</td>
		<td>Anmerkung</td>
示例#4
0
</HEAD>
<BODY>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=4 CELLSPACING=0>
	<THEAD>
		<tr>
			<td width="1" align="left" class="normal"><?php 
echo $tour_data[1];
?>
</td>
<?php 
require_once "util.php";
$date = var_get_post("date", "");
$tour_id = var_get_post("tour_id", "");
$date_from = var_get_post("date_from", "");
$date_to = var_get_post("date_to", "");
if ($date != "") {
    ?>
		<td width="100%" colspan="2" align="right" class="normal"><?php 
    echo $date;
    ?>
</td>
		<td width="1" align="right" class="normal"><?php 
    echo $date;
    ?>
</td>
<?php 
} else {
    ?>
		<td width="100%" colspan="2" align="right" class="normal"><?php 
    echo $date;
<?php

require_once "util.php";
require_once "NTK/NTK.php";
require_once "DataBase/Category.php";
$db_action = var_get_post("db_action", "");
$category = new Category();
switch ($db_action) {
    case "new":
        $category->create(array(var_post("category_id", ""), var_post("name", ""), var_post("details", "")));
        break;
    case "edit":
        $category->update(var_post("category_id", ""), array(var_post("name", ""), var_post("details", "")));
        break;
    case "delete":
        $category->delete(var_get("category_id", ""));
        break;
}
示例#6
0
require_once "util.php";
require_once "NTK/NTK.php";
require_once "DataBase/Tour.php";
require_once "DataBase/Assistant.php";
?>

<html>
<head>
	<title> Index </title>

<?php 
include "Modules/Tour/db_action.php";
$main_box = new NTKVBox("main_box", 0, 0, False);
$action = var_get_post("action", "");
$tour_id = var_get_post("tour_id", "");
$datum = var_get_post("date", "");
// Toolbar
$page = "tour";
$printfile = "";
if ($action == "list_tour") {
    $printfile = "print_tour.php?tour_id=" . $tour_id . "&date=" . $datum;
}
include "Modules/toolbar.php";
// small Toolbar
include "Modules/Tour/toolbar.php";
// main content
if ($action == "new") {
    include "Modules/Tour/new_form.php";
} elseif ($action == "edit" && $tour_id != "") {
    $data = $tour->get($tour_id);
    include "Modules/Tour/edit_form.php";
<html>
<head>
	<title> Index </title>
	
<?php 
echo getHead();
$main_box = new NTKVBox("main_box", 0, 0, False);
// Toolbar
$page = "configuration";
$printfile = "";
include "Modules/toolbar.php";
// small Toolbar
include "Modules/Configuration/toolbar.php";
// main content
$action = var_get_post("action", "");
$page = var_get_post("page", "");
// tax
if ($page == "tax") {
    include "Modules/Configuration/tax.php";
} elseif ($page == "priceset") {
    include "Modules/Configuration/priceset.php";
} elseif ($page == "group") {
    include "Modules/Configuration/group.php";
} else {
    $main_box->add($spacer, -1, -1, "background-color: #dfe7f3; vertical-align: top;");
}
echo $main_box->getHtml();
?>

</body>
</html>
<?php

require_once "util.php";
require_once "DataBase/Bill.php";
require_once "DataBase/Assistant.php";
require_once "DataBase/Customer.php";
require_once "DataBase/Product.php";
require_once "DataBase/Bill_Product.php";
require_once "DataBase/Price.php";
require_once "DataBase/Priceset.php";
require_once "DataBase/Tax.php";
$bill_id = var_get_post("bill_id", "");
$bill = new Bill();
$tmp = $bill->get($bill_id);
$bill_data = $tmp[0];
$customer = new Customer();
$tmp = $customer->get($bill_data[1]);
$customer_data = $tmp[0];
$assistant = new Assistant();
$tmp = $assistant->get($bill_data[4]);
$assistant_data = $tmp[0];
$priceset = new Priceset();
$tmp = $priceset->get($customer_data[11]);
$priceset_data = $tmp[0];
$bill_product = new Bill_Product();
$bill_product_data = $bill_product->getByBillId($bill_id);
$product = new Product();
$price = new Price();
$tax = new Tax();
include "Druckvorlagen/zeilen.php";
include "Druckvorlagen/rechnung.php";
    $form_action = var_get_post("action", "");
    if ($form_action == "add_product_to_cart") {
        $form_product_id = var_get_post("product_id", "");
        $form_product_amount = var_get_post("amount", "");
        $form_product_amount = str_replace(',', '.', $form_product_amount);
        if ($form_product_id != "" && $form_product_amount != "") {
            $shopping_cart->addProduct($form_product_id, $form_product_amount, "");
        }
    } elseif ($form_action == "remove_product_from_cart") {
        $form_product_id = var_get_post("product_id", "");
        if ($form_product_id != "") {
            $shopping_cart->removeProduct($form_product_id);
        }
    } elseif ($form_action == "edit_product_amount") {
        $form_product_id = var_get_post("product_id", "");
        $form_product_amount = var_get_post("product_amount", "");
        $form_product_amount = str_replace(',', '.', $form_product_amount);
        $form_product_hint = var_get_post("product_hint", "");
        if ($form_product_id != "" && $form_product_amount != "") {
            $shopping_cart->editProduct($form_product_id, $form_product_amount, $form_product_hint);
        }
    } elseif ($form_action == "create_bill") {
        if ($shopping_cart->createBill() == 0) {
            $shopping_cart->clearShoppingCart();
        }
    } elseif ($form_action == "set_template") {
        $shopping_cart->saveTemplate();
    } elseif ($form_action == "load_template") {
        $shopping_cart->loadTemplate();
    }
}
	</tr>
<?php 
/* load or initialize the ShoppingCart */
if (!isset($shopping_cart)) {
    if (isset($_SESSION["cart_product_id_array"])) {
        $shopping_cart = new ShoppingCart($_SESSION["username"], $_SESSION["cart_product_id_array"], $_SESSION["cart_product_amount_array"]);
    } else {
        $shopping_cart = new ShoppingCart($_SESSION["username"]);
    }
}
$list = $shopping_cart->getItems();
/* if there were any actions, set the focus to the next item */
$prev_edit_product_id = "";
$set_focus_next = false;
if (var_get_post("action", "") == "edit_product_amount") {
    $prev_edit_product_id = var_get_post("product_id", "");
}
for ($i = 0; $i < count($list); $i++) {
    echo "\t<tr class=\"list_normal\" onmouseover=\"javascript: this.className='list_hover';\" onmouseout=\"javascript: this.className='list_normal';\">\n";
    echo "\t<form name=\"edit_product_amount_" . $list[$i][0] . "\" action=\"shoppingcart.php\" method=\"POST\">\n";
    echo "\t<input type=\"hidden\" name=\"action\" value=\"edit_product_amount\">\n";
    echo "\t<input type=\"hidden\" name=\"product_id\" value=\"" . $list[$i][0] . "\">\n";
    echo "\t<input type=\"submit\" value=\"\" class=\"invisible_submit\">\n";
    echo "\t\t<td onclick=\"javascript: window.location.href = 'product_details.php?product_id=" . $list[$i][0] . "';\">" . $list[$i][0] . "</td>\n";
    echo "\t\t<td onclick=\"javascript: window.location.href = 'product_details.php?product_id=" . $list[$i][0] . "';\">" . $list[$i][1] . "</td>\n";
    echo "\t\t<td onclick=\"javascript: window.location.href = 'product_details.php?product_id=" . $list[$i][0] . "';\">" . $list[$i][4] . "</td>\n";
    echo "\t\t<td width=\"30px\"><input type=\"text\" name=\"product_amount\" id=\"product_amount_" . $list[$i][0] . "\" class=\"list_cell\" value=\"" . $list[$i][2] . "\"></td>\n";
    echo "\t\t<td width=\"100px\"><input type=\"text\" name=\"product_hint\" class=\"list_cell\" value=\"" . $list[$i][5] . "\"></td>\n";
    echo "\t\t<td align=\"right\" onclick=\"javascript: window.location.href = 'product_details.php?product_id=" . $list[$i][0] . "';\">" . number_format($list[$i][3] * $list[$i][2], 2) . "</td>\n";
    echo "\t\t<td width=\"100px\" align=\"center\"><a href=\"javascript: document.forms['edit_product_amount_" . $list[$i][0] . "'].submit();\">speichern</a></td>\n";
    echo "\t\t<td width=\"100px\" align=\"center\"><a href=\"javascript: window.location.href= ' shoppingcart.php?action=remove_product_from_cart&product_id=" . $list[$i][0] . "';\">entfernen</a></td>\n";
示例#11
0
// Toolbar
$page = "bill";
$printfile = "";
if ($action == "edit" && $bill_id != "") {
    $printfile = "print_bill.php?bill_id=" . $bill_id;
}
include "Modules/toolbar.php";
// small Toolbar
include "Modules/Bill/toolbar.php";
// main content
$onload .= "document.getElementById('search_entry').focus();";
if ($action == "new") {
    include "Modules/Bill/new_form.php";
} elseif ($action == "edit" && $bill_id != "") {
    $data = $bill->get($bill_id);
    $edit_action = var_get_post("edit_action", "");
    include "Modules/Bill/edit_form.php";
} elseif ($action == "search" && var_post("search_entry", "") != "") {
    $search = var_post("search_entry", "");
    $list_view = new NTKListView("list_view", array('ID', 'Rechnungsnummer', 'Kunde', 'Tour'), "location.href = 'bill.php?action=edit&bill_id=%0%';");
    $results = $bill->get('', array('bill_id', 'bill_number', 'customer.prename', 'bill.tour_id'), "customer.prename LIKE '%{$search}%' OR bill_number LIKE '%{$search}%' OR bill.customer_id LIKE'%{$search}%' OR bill.tour_id LIKE '%{$search}%'");
    if (count($results) == 1) {
        $onload = "location.href = 'bill.php?action=edit&bill_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('ID', 'Rechnungsnummer','Kunde','Tour'), "location.href = 'bill.php?action=edit&bill_id=%0%';");
    	$list_view->addLines($bill->get('', array('bill_id', 'bill_number', 'customer.prename', 'bill.tour_id')));
    	$main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;");*/
    $main_box->add(new NTKSpacer(), -1, -1);