<? include("header.php");?>
 

<script>
  function checainco()

{

vas1=this.document.form2.txtreferencia.value;
vas2=this.document.form2.txtreferencia_cliente.value;


if ( vas1.value=='' || vas2.value==''  )

{

alert ("Complete todos los datos por favor");

return;

}

 this.document.form2.submit();

}

</script>

<div align="justify" style="line-height:18px;margin-top:-44px; position:absolute; height:100% ">
<br />
<span style="color:#00AF4B;margin-left:3px;">Cambio de destino de MBL&raquo;</span>
  

  <?

$link =con_ver(); 

$id=$_GET['id'];

	$result = mysqli_query($link,"SELECT * FROM destinos_mbl  where id =$id"); 

$row = mysqli_fetch_array($result);

{

$txtid= $row['id']; 

}

?>
<form name="form1" id="form1" method="post" action="destinoguardacambio.php?id=<?=$txtid?>&referencia=<?=$_GET[referencia]?>&referencia_cliente=<?=$_GET[referencia_cliente]?>&booking=<?=$_GET[booking]?>">
  <table width="468" border="0" cellpadding="1">
    <input type="hidden" id="referencia" name="referencia" value="<?=$_GET[referencia]?>" />
    <input type="hidden" id="referencia_cliente" name="referencia_cliente" value="<?=$_GET[referencia_cliente]?>" />
    <input type="hidden" id="booking" name="booking" value="<?=$_GET[booking]?>" />
  <tr>
    <td colspan="2"  >    
      <input align="left" type="submit"  value="Guardar cambios"  style="border:none; margin-left:-8px;background-color:transparent;color:#00AF4B;text-decoration:underline;font-family:Arial, Helvetica, sans-serif; font-size:14px"> &nbsp;&nbsp;
      <a id="regresar" style="cursor:default;color:#00AF4B;text-align:center;text-decoration:underline;" 
      
	  <? if($_GET[referencia]!=''){ ?>
       href="registro_mbl_navieras.php?referencia=<?=$_GET[referencia]?>&interteam=1">Regresar</a>
	  <? }elseif($_GET[referencia_cliente]!=''){ ?>
      href="registro_mbl_navieras.php?referencia_cliente=<?=$_GET[referencia_cliente]?>&interteam=1">Regresar</a>
      <? } elseif($_GET[booking]!='') { ?>
      href="registro_mbl_navieras.php?booking=<?=$_GET[booking]?>&interteam=1">Regresar</a>
      <? } ?>
      <? if($_GET[referencia_cliente]=='' and $_GET[referencia]=='' and $_GET[booking]==''){ ?> 
       href="registro_mbl_navieras.php">Regresar</a>
      </a>
      <? } ?>
    </tr>
    
    <tr>
      <td width="209"><b>DESTINO</b></td>
      <td width="249"><input type="text" class="aa" name="destino" id="destino" size="40" value="<?=$row[destino]?>"  /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><b>SHIPPER</b></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>NAME</td>
      <td><input type="text" class="aa" name="shipper1" id="shipper1" size="40" value="<?=$row[shipper]?>"  /></td>
    </tr>
    <tr>
      <td>ADDRESS</td>
      <td><input type="text" class="aa" name="shipper2" id="shipper2" size="40" value="<?=$row[shipper2]?>" /></td>
    </tr>
    <tr>
      <td>PO BOX, CITY &amp; COUNTRY</td>
      <td><input type="text" class="aa" name="shipper3" id="shipper3" size="40" value="<?=$row[shipper3]?>" /></td>
    </tr>
    <tr>
      <td>RFC</td>
      <td><input type="text" class="aa" name="shipper4" id="shipper4" size="40" value="<?=$row[shipper4]?>" /></td>
    </tr>
    <tr>
      <td>CTC</td>
      <td><input type="text" class="aa" name="shipper5" id="shipper5" size="40" value="<?=$row[shipper5]?>" /></td>
    </tr>
    <tr>
      <td>PHONE</td>
      <td><input type="text" class="aa" name="shipper6" id="shipper6" size="40" value="<?=$row[shipper6]?>" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td id="t_nombre"><b>CONSIGNEE</b></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>NAME </td>
      <td><input type="text" class="aa" name="consignee1" id="consignee1" size="40" value="<?=$row[consignee]?>" /></td>
    </tr>
    <tr>
      <td>ADDRESS</td>
      <td><input type="text" class="aa" name="consignee2" id="consignee2" size="40" value="<?=$row[consignee2]?>" /></td>
    </tr>
    <tr>
      <td>PO BOX, CITY &amp; COUNTRY</td>
      <td><input type="text" class="aa" name="consignee3" id="consignee3" size="40" value="<?=$row[consignee3]?>" /></td>
    </tr>
    <tr>
      <td>RFC</td>
      <td><input type="text" class="aa" name="consignee4" id="consignee4" size="40"  value="<?=$row[consignee4]?>"/></td>
    </tr>
    <tr>
      <td>CTC</td>
      <td><input type="text" class="aa" name="consignee5" id="consignee5" size="40" value="<?=$row[consignee5]?>" /></td>
    </tr>
    <tr>
      <td>PHONE</td>
      <td><input type="text" class="aa" name="consignee6" id="consignee6" size="40" value="<?=$row[consignee6]?>" /></td>
    </tr>
    <tr>
      <td colspan="2" >&nbsp;</td>
    </tr>
    <tr>
      <td id="t_nombre"><b>NOTIFY </b>
        <input name="chk_copy" id="chk_copy" type="checkbox" title="Copy from consignee"  
      onclick="if(this.checked){
      $('#notify1').val($('#consignee1').val());
      $('#notify2').val($('#consignee2').val());
      $('#notify3').val($('#consignee3').val());
      $('#notify4').val($('#consignee4').val());
      $('#notify5').val($('#consignee5').val());
      $('#notify6').val($('#consignee6').val());
      }else{
      $('#notify1').val('');
      $('#notify2').val('');
      $('#notify3').val('');
      $('#notify4').val('');
      $('#notify5').val('');
      $('#notify6').val('');
      }" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>NAME</td>
      <td><input type="text" class="aa" name="notify1" id="notify1" size="40" value="<?=$row[notify]?>" /></td>
    </tr>
    <tr>
      <td>ADDRESS</td>
      <td><input type="text" class="aa" name="notify2" id="notify2" size="40" value="<?=$row[notify2]?>" /></td>
    </tr>
    <tr>
      <td>PO BOX, CITY &amp; COUNTRY</td>
      <td><input type="text" class="aa" name="notify3" id="notify3" size="40" value="<?=$row[notify3]?>" /></td>
    </tr>
    <tr>
      <td>RFC</td>
      <td><input type="text" class="aa" name="notify4" id="notify4" size="40" value="<?=$row[notify4]?>" /></td>
    </tr>
    <tr>
      <td>CTC</td>
      <td><input type="text" class="aa" name="notify5" id="notify5" size="40" value="<?=$row[notify5]?>" /></td>
    </tr>
    <tr>
      <td>PHONE</td>
      <td><input type="text" class="aa" name="notify6" id="notify6" size="40" value="<?=$row[notify6]?>" /></td>
    </tr>
    <tr>
      <td ><?
	  	echo "  <input type=\"submit\" name=\"Submit2\" value=\"Guardar\">";
		?></td>
      <td>&nbsp;</td>
    </tr>
  </table>
 
<input type="button" name="Submit2" value="Regresar" onclick="document.getElementById('form1').action='referencias.php';document.getElementById('form1').submit()">
 
  </form>
</div>