<?php
// ajax/stock_low.ajax.php
// Returns JSON array of stock items where status <= 1.
include $_SERVER['DOCUMENT_ROOT'] . "/root.class.php";
include $_SERVER['DOCUMENT_ROOT'] . "/app/test/classes/dashboard.class.php";

header('Content-Type: application/json');

$db   = new db_safeguard();
$dash = new DashboardData($db);

echo json_encode($dash->lowStock());