Ejemplo n.º 1
0
<html><body><?php 
include "Product.php";
include "functions.php";
//	printThisDBResult(getOrdresByProductNo("OR001")); //RAYMOND:l 蟲蛀
printThisDBResult(getSalesSummaryByCat("S0001", "CAT03"));
//	printThisDBResult(getAllDistricts());
//	markJobDate("D0003", date("Y-m-d"), "DST01");
//addOrder(date("Y-m-d"), null , 0.25, "Noo","C0001", "DST02", array());
//matchSchedule("OR008",  date("Y-m-d"), "DST03");
//	printThisDBResult(getAllOrders());
//	UserControl::login("U0002");
//echo "<a href='loginText.php'> HI </a>";
//	UserControl::logout();
//$cart = new SCart();
//$cart->addProduct("P00002", "100", "3");
//$cart->addProduct("P00005", "100", "4");
//$cart->qtyPlusPlus("P00001");
//
//$products = $cart->getProducts();
//$array = getSalesSummaryByGender("S0002", null)
//foreach($array as $a)
//	printThisDBResult(getProducts(null,null,null,null,null,"CAT01",null));
//	print_r(getSubCategories("CAT07",true));
//	//$array = getSubCategoriesNested("CAT01","ASC");
//print_r($array);
?>
</html></body>
Ejemplo n.º 2
0
    case 2:
        $chart = getSalesSummaryByGender($suppNo);
        $chart = $chart["F"];
        break;
    case 3:
        $chart = getSalesSummaryByDistrict($suppNo, "DST01");
        break;
    case 4:
        $chart = getSalesSummaryByDistrict($suppNo, "DST02");
        break;
    case 5:
        $chart = getSalesSummaryByDistrict($suppNo, "DST03");
        break;
    case 6:
        if (isset($_POST[catNo])) {
            $chart = getSalesSummaryByCat($suppNo, $_POST[catNo]);
            break;
        } else {
            return null;
        }
}
if (!$chart) {
    return json_encode($array);
}
while ($row = $chart->fetch_assoc()) {
    $newArr["label"] = $row[prodName];
    $newArr["y"] = intval($row["Sold"]);
    $array["data"][0]["dataPoints"][] = $newArr;
}
echo json_encode($array);
?>