<?php
date_default_timezone_set('America/Mexico_City');
require_once("comun/conexion3.php");
require_once("comun/conex_ver.php");

require_once("comun/actions.php");

require_once("comun/funciones.php");

$action = new actions();
$link_impo=con_impo();
$link =con_ver(); 
 
$txtbooking=  ($_POST['booking']);  
 
$id_bl = $_GET[id_bl];
 
mysqli_query($link,"delete from dimensiones where booking='".$txtbooking."'");

for($j=0;$j<count($_POST[numero_bultos]);$j++){
	 
							 if(trim($_POST[numero_bultos][$j])!='0' 
							 and trim($_POST[numero_bultos][$j])!=''){                            
								  
									mysqli_query($link,"insert into dimensiones 
									(`booking`, `id_partida`, `numero_bultos`, `largo`, 
									`ancho`, `alto`)
									values ('".$txtbooking."',	'".$id_bl."',
									'".$_POST[numero_bultos][$j]."','".$_POST[largo][$j]."',
									'".$_POST[ancho][$j]."','".$_POST[alto][$j]."')");
							 
							 }
}	 
$action->alert('DIMENSIONES GUARDADAS');
 $action->send_response();
return;

?>


