$country = $row[15]; $ebaysales = $row[18]; $date_s = $row[4]->format('Y-m-d'); $price = $row[19]; //$date_s=$row[4]; echo $date_s; $select = "SELECT * From Barcode Where Barcode='{$unique}'"; $result = mysql_query($select) or die(mysql_error()); $rek = mysql_fetch_array($result); $id_barcode = $rek['id_Barcode']; echo $id_Barcode; $insert = "INSERT INTO six_barcode(u_barcode, barcode_id_Barcode,ebayid, ebayref, tracking_num, parceler" . ",stock_number,date_ship,item_id,name,surname,address1,address2,address3,city,state,postalcode, country, ebaysales,price) VALUES('{$unique}','{$id_barcode}','{$ebaid}','{$ebairef}','{$tracking_number}','{$id_user}','{$u_barcode}','{$date_s}','{$item_id}','{$firstname}','{$lastname}','{$address1}','{$address2}','{$address3}','{$city}','{$state}','{$postalcode}','{$country}','{$ebaysales}','{$price}')"; if ($_POST['ind'] == 1) { $insert = "INSERT INTO six_barcode(u_barcode, barcode_id_Barcode,ebayid, ebayref, tracking_num, parceler" . ",stock_number,item_id,name,surname,address1,address2,address3,city,state,postalcode, country,ind, ebaysales,price) VALUES('{$unique}','{$id_barcode}','{$ebaid}','{$ebairef}','{$tracking_number}','{$id_user}','{$u_barcode}','{$item_id}','{$firstname}','{$lastname}','{$address1}','{$address2}','{$address3}','{$city}','{$state}','{$postalcode}','{$country}','1','{$ebaysales}','{$price}')"; } $unq_val = validate_barcode($unique); if (empty($unq_val)) { echo "Barcode is wrong"; echo $unq_val; $url = "six_manual.php?ebay=" . $ebaysales; redirect($url, 5); exit; } $select1 = "SELECT * From test Where Barcode_id_Barcode='{$id_barcode}'"; $result1 = mysql_query($select1) or die(mysql_error()); $rek1 = mysql_fetch_array($result1); if ($rek1[9] != 1) { echo "Item not tested"; $url = "six_manual.php?ebay=" . $ebaysales; redirect($url, 5); exit;
} echo "RIM ustawione" . $rin; } if (isset($fuse)) { if ($fuse == 0) { $v_fuse = 1; } if ($fuse == 1) { $v_fuse = 2; } if ($fuse == 2) { $v_fuse = 3; } echo "FUSE ustawione" . $pat; } $barcode2 = validate_barcode($barcode); echo '</br>barcode after validateing: ' . $barcode2; $connect = mysql_connect('localhost', 'root', 'krasnal') or die(mysql_error()); mysql_select_db('dbs3'); $user = $_SESSION['id_user']; $tab = array(); for ($z = 0; $z <= 100; $z++) { $tab[$z] = 0; } //echo $barcode2; //echo $_POST[$idd]; //echo " "; echo $pat; //echo $_POST[$name]; echo " EXI OR NOT"; //barcode not exist v-pat set
$s_serial = 1; //if part number is not empty $V_SERIAL = $serial; } echo "BEFORE CROOS" . $EXTENDED_MODULE; // 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 $barcode3 = check_unq($barcode); if ($EXTENDED_MODULE == 1) { $barcode2 = validate_barcode($barcode); if (isset($_POST['barcode2'])) { echo "<BR />Container barcode set."; $barcode_cont = $_POST['barcode2']; $barcode_container = get_barcodes_from_db($barcode_cont); } } else { $barcode2 = validate_barcode(get_barcodes_from_db($barcode)); } echo '</br>barcode after validateing: ' . $barcode2; $connect = mysql_connect('localhost', 'root', 'krasnal') or die(mysql_error()); mysql_select_db('dbs3'); //user is written as a session $user = $_SESSION['id_user']; //$barcode=swap_hash($barcode); echo "KLINIETO BARCODE EXEXEXEXEXXEXXXEXEXE"; echo "VBAR EXRR:" . $V_BAR_EX . "s_itemRR:" . $s_item . $s_brand . $s_serial . "sesjaRR:" . $sesja . "MESSAGERR:" . $MESSG_EX; // if barcode does not exist in database or barcode read from db exist but doesnt fit the barcode inputed and everything else is set than // if barcode does not exist in databse and everything is set and site place if ($v_bar_exist == 0 and $s_item != 0 and $s_brand != 0 and $s_serial != 0 and isset($sesja) and $MESSG_EX != 0) { //HERE WE GIVE A MODUL FOR aggind slash format $item = add_db_format($item); $brand = add_db_format($brand);
} else { echo "Not tested"; } if ($added == 1) { echo $added; $MESG = "Item " . $barcode . " Sold."; } else { if ($added == 0) { $MESG = "Item failed to be sold."; } } if (empty($id_barcode)) { // $MESG="This is not valid barcode format"; $MESG = " This item needs further attention. Please contact supervisor."; //if not there than check if used valid barcode format if ($val = validate_barcode($small_bar)) { $MESG = " This item is not valid barcode format "; } } else { if ($TESTED == 1) { } else { $MESG .= " This item needs further attention. Please contact supervisor."; } } if (check_barcode_ebay($barcode) == 0 and $added == 0) { $MESG .= " Item already sold on ebay"; } } sqlsrv_free_stmt($stmt); sqlsrv_close($conn); //if confirm posted than do this. Maybe here we fill put the query for adding to six barcode
} } } } if ($_SESSION['FOCUS'] == 1) { $foc_sign = "autofocus=''"; } //echo "DEBUG: [Signature] - ".$signature; //ready_to_dismantle = check_dismantle($signature); echo "</BR>DEBUG: [Prepering Remove ]: - Ready To Remove"; //here we must check: // 1. If already item in barcode statuses. We dont want doubled strips of the same barcode // 2. Item cant be added to be striped since is tested in main system echo "VV: "; echo $barcode; echo validate_barcode($barcode); //prepering for inserts echo "</BR>VALIDATED BARCODE " . $barcode; echo "VV"; //$barcode=check_statuses($barcode); echo "ebay check"; echo $ebay = check_ebay($barcode); if ($ebay and $MOD_RM_EBAY == 0) { $MESG = "ITEM ON EBAY.Contact Supervisor"; } $whl = check_wholesale($barcode); if ($whl) { echo "on wholesale"; } if (empty($ebay) or $MOD_RM_EBAY == 1) { if (empty($whl)) {