function checkAllClothsCutted($id) { $query = "SELECT count(*) as count FROM plotters WHERE previsionId = '{$id}' and cutted = false"; $result = mysql_query($query); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $allCutted = $row['count'] == "0"; } $prevision = getPrevision($id); $prevision['allCutted'] = $allCutted; return $prevision; }
// Get list of all users or one in particualr if the id is given include_once '../include/headers.php'; include_once '../include/dbutils.php'; include_once '../include/main.php'; include_once 'domain/providers.php'; include_once 'domain/plotters.php'; include_once 'domain/orders.php'; include_once 'domain/previsions.php'; include_once 'domain/previsionStates.php'; db_connect(); $designed = isset($_GET['designed']) ? $_GET['designed'] : null; $expand = isset($_GET['expand']) ? $_GET['expand'] : null; $storedCountry = isset($_GET['storedCountry']) ? $_GET['storedCountry'] : null; if (isset($_GET['id'])) { $value = getPrevision($_GET['id']); } else { if (isset($_GET['validate'])) { $value = validateOrderNumber($_GET['orderNumber']); } else { if (isset($_GET['clothId'])) { $value = getPrevisions($_GET['clothId'], $designed, $expand, null); } else { if (isset($_GET['listForProduction'])) { // deprecated - use with POST $value = getPrevisions(null, null, $expand, true, null, $_GET['sellerCode'], $filters); } else { if (isset($_GET['listHistoric'])) { // deprecated - use with POST $value = getPrevisions(null, null, $expand, null, true, $_GET['sellerCode']); } else {