<?
	include "db_connection/db_connection.php";
	include "config/config.php";
	
$count = count(glob("mas_fin_images/*.jpeg"));

echo "In images have - $count images";	
	
//	$SLCT1 = "SELECT * FROM `piece_loading` WHERE `piece_status` LIKE 'loading' AND `po_entry_id`!= 2121 AND `po_entry_id` != 2133 AND `loading_type`='PO'";
//	$QURY1 = mysqli_query($connect,$SLCT1);
//	
//	$i = 1;
//	while($FTCH1 = mysqli_fetch_object($QURY1))
//	{
//		echo $i;
//		echo
//		$UPDT_TBL1 = "UPDATE piece_loading SET piece_status = 'finish' WHERE piece_loading_id = $FTCH1->piece_loading_id";
//		mysqli_query($connect,$UPDT_TBL1);
//		echo "<br>--------<br>";
//		
//		$SLCT2 = "SELECT * FROM `piece_loading_history` WHERE `po_entry_id` = $FTCH1->po_entry_id AND `design_det_id` = $FTCH1->design_det_id";
//		$QURY2 = mysqli_query($connect,$SLCT2);
//		$FTCH2 = mysqli_fetch_object($QURY2);
//		
//		echo		
//		$UPDT_TBL2 = "UPDATE piece_loading_history SET finish_dt = '$FTCH2->finish_dt' WHERE `po_entry_id` = $FTCH2->po_entry_id AND `design_det_id` = $FTCH2->design_det_id";
//		mysqli_query($connect,$UPDT_TBL2);		
//		echo "<br>----------------<br>";
//		
//	$i++;	
//	}
?>