Example #1
0
include "header1.php";
?>
<link rel="stylesheet" type="text/css" href="css/products.css" />
<link rel="stylesheet" type="text/css" href="css/products-m.css" />
<script src="scripts/products.js"></script>
<?php 
include "header2.php";
error_reporting(0);
include_once "Brain/field_const.php";
include_once "Brain/functions.php";
include_once "Brain/Product.php";
include_once "Brain/Category.php";
include_once "Brain/User.php";
include_once "Brain/ShoppingCart.php";
regGet('prodName', 'priceMin', 'priceMax', 'catNo');
$cart = new SCart();
if ($prodName == "") {
    $prodName = null;
}
if ($priceMin == "") {
    $priceMin = null;
}
if ($priceMax == "") {
    $priceMax = null;
}
if ($catNo == "") {
    $catNo = null;
}
$prods = getProducts($prodName, $priceMin, $priceMax, null, null, $catNo, null);
//$prods = getAllProducts();
Example #2
0
<?php

error_reporting(0);
include_once "../Brain/field_const.php";
include_once "../Brain/functions.php";
include_once "../Brain/ShoppingCart.php";
include_once "../Brain/Product.php";
include_once "../Brain/UserControl.php";
if (!UserControl::checkState()) {
    echo "Error: You must login first!";
    return;
}
regGet('act', 'prodNo', 'qty');
if (!isset($act) || !isset($prodNo)) {
    echo "Error: No action specified";
    return;
}
$cart = new SCart();
$prod = getProduct($prodNo);
//$cart->clear();
if ($act == 'add') {
    if (!isset($qty)) {
        $qty = 1;
    }
    $cart->addProduct($prodNo, $prod[prodPrice], $qty);
    //if not success
    //...
} else {
    $cart->removeItem($prodNo);
}
$cartProds = $cart->getProducts();
Example #3
0
<title>Admin Category</title>
<?php 
include "header2.php";
?>

	<?php 
include "admin_table_tabs.php";
?>
	<?php 
include_once 'Brain/functions.php';
include_once 'Brain/Order.php';
include_once 'Brain/field_const.php';
include_once 'Brain/User.php';
include_once 'Brain/District.php';
error_reporting(-1);
regGet('searchBy', 'searchByProd', 'searchByCat', 'searchByDist');
if (isset($searchBy)) {
    if ($searchBy == "prod") {
        $orders = getOrdresByProductNo($searchByProd);
    } else {
        if ($searchBy == "cat") {
            $orders = getOrdresByCatNo($searchByCat);
        } else {
            if ($searchBy == "dist") {
                $orders = getOrdersByDistNo($searchByDist);
            }
        }
    }
} else {
    $orders = getAllOrders();
}
Example #4
0
	
	<script src="supplier.js"></script>
</head>
<body>
	<form id="suppDetailsForm" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="get">
		<input type="hidden" name="suppNo" value=""/>
	</form>

	<table>
		<?php 
include_once "Brain/User.php";
include_once "Brain/functions.php";
regGet('suppNo');
if (isset($suppNo)) {
    $supp = getSupplier($suppNo);
    echo '<tr>
						<th>Supplier ID</th>
						<td>' . $supp[suppNo] . '</td>
					</tr>
					<tr>
						<th>Supplier Name</th>
						<td>' . $supp[suppName] . '</td>
					</tr>
					<tr>
						<th>Tel.</th>
						<td>' . $supp[suppTel] . '</td>
					<tr>
						<th>Address</th>