Esempio n. 1
0
        $result = mysql_query($insert_waste_qtty) or die(mysql_error());
        if ($result) {
            $url .= "&qc=" . $qtty;
            $url .= "&MESSG=18";
        }
    }
    redirect($url, $TEST_T);
    //if barcode is empty redirect to form, but $$$form shall be checked by default values, also set not incomplete set of parametters can be send
    exit;
}
// functions returns to a buffer that is not in use yet. Fun returns hash format. While barcode is still slash format. Thoough javna conversion is needed, before adding barcode
$barcode2 = validate_barcode($barcode);
echo '</br>barcode after validateing: ' . $barcode2;
//check if group barcode
if (detect_group_barcode($barcode2, $PREFIX_GROUP_STICKER) == 1) {
    if (check_group_barcode($barcode2) == 1) {
        if (check_if_sold_group($barcode2) == 1) {
            echo "GROUP BARCODE READY TO DISPOSE FOR FURTHER TREATMENT";
            extract_group($barcode2);
            //$v_bar_exist=0;
        }
    }
}
//than do the function of takin individual barcodes and  insert intowee waste
//here we try to validate a barcode inputed barcode2. We set filtering by size of set and prefix detection limits
if (check_barcode_constraint($barcode2) == 0) {
    $v_bar_exist = 0;
}
if (check_set_size($barcode2) == 0) {
    $v_bar_exist = 0;
}
Esempio n. 2
0
}
?>

<?php 
connect_db();
//HERE we receive
$list = $_POST['group_list'];
?>
    
  <?php 
if (isset($_POST['submit']) and !empty($_POST['group_sticker']) and !empty($_POST['group_list']) and !empty($_POST['group_description'])) {
    echo "checking data";
    $barcode = $_POST['group_sticker'];
    if (detect_group_barcode($barcode, $PREFIX_GROUP_STICKER) == 1) {
        //if is valid format of grp
        if (check_group_barcode($barcode) != 1) {
            echo "Prepering initialisation";
            $group = initialize_group_barcode();
        }
    }
    echo "UPDATE DESCRITION";
    $description = $_POST['group_description'];
    $update = "UPDATE group_barcode SET reserved='{$description}' WHERE group_barcode='{$barcode}'";
    query_select($update);
} else {
    echo "Please set group barcode";
}
if (!empty($_POST['group_list']) and !empty($_POST['group_sticker']) and !empty($_POST['group_list']) and !empty($_POST['group_description']) and !empty($group)) {
    $barcode = $_POST['group_sticker'];
    if (detect_group_barcode($barcode, $PREFIX_GROUP_STICKER) == 1) {
        echo "initialising";