<?php
	include("stilos/config.inc.php");
	include("../clases/BDConexion.php");
  include("../clases/clsPer.php");
  include("funcion/funciones.php");
  include("Funciones.php");
  session_start();
  $objPer=new clsPer;
  
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><MMString:LoadString id="insertbar/formsHidden" /></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">

<link href="Estilos.css" rel="stylesheet" type="text/css">

<link href="stilos/Estilos.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript src="js/calendario.js"></SCRIPT>
<!-- Copyright 2000,2001 Macromedia, Inc. All rights reserved. -->
<script language="JavaScript"> 
<!--
function Abrir_Ventanapopup1(sURL,x,y) {
if (!window.focus) return;
			var par;
			par = "width=" +x + ",height="+y+","
			par = par + "dependent=no,scrollbars=yes,resizable=yes"
			par = par + "menubar=no,toolbar=no,status=no"
			var ventana = window.open(sURL,"Ver",par)
			ventana.focus();
}
//--> 
</script>

</head>

<body background="../imagenes/fondo.jpg">
<table width="794" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr valign="top" >
    <td height="25" colspan="4">
    <div align="left" ></div></td>
  </tr>
  <tr class="lblCampo" >
    <td colspan="4"><div align="center">
        <table width="750" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="25"><img src="../estilo_tabla/parte_sup_izq.gif" width="25" height="25"></td>
            <td width="680" background="../estilo_tabla/parte_sup_cen.gif" valign="bottom">
			<div align="left" class="lblTitulo" >Ubicacion de Carga y Embarque </div>			</td>
            <td width="25"><img src="../estilo_tabla/parte_sup_der.gif" width="25" height="25" border="0" usemap="#Map"></td>
          </tr>
          <tr>
            <td width="25" background="../estilo_tabla/parte_med_izq.gif">&nbsp;</td>
            <td width="680" height="86" background="../estilo_tabla/parte_med_cen.gif"><div align="center">
              <table width="688" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="15" colspan="4"><div align="center"></div></td>
                </tr>
                <tr>
				<form action="cvp_ubicacion_carga.php?guia=<? echo $guia?>" method="post" name="form1" >
                  <td height="15" colspan="2">
				  
				    <div align="left" class="lblForm">
				      <table width="394" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="181"><div align="left">N&ordm; de Guia
                                <input name="guia" type="text" id="des3" value="<? echo $guia?>" size="15" maxlength="15">
                          Fecha</div></td>
                          <td width="102"><div align="left">
                            <table width="102" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="67"><div align="left">
                                    <input name="fecha" type="text" id="fecha2" value="<? echo $fecha?>" size="12" maxlength="10" title="FORMATO dd/mm/AA">
                                </div></td>
                                <td width="10">&nbsp;</td>
                                <td width="109"><div align="left"> <a onMouseOver="window.status='Calendario';return true;" onMouseOut="window.status='';return true;"  href="javascript:show_calendar('form1.fecha');"> <img src="../imagenes/calendar.jpg" alt="Calendario" width="16" height="15" border="0"> </a> </div></td>
                              </tr>
                            </table>
                          </div></td>
                          <td width="111"><div align="left">
                            <input type="submit" name="Submit" value="Buscar" style="<?=$stylo['st2']?>" class="botira">
                            <input name="ver" type="hidden" id="ver" value="1">
                          </div></td>
                        </tr>
                      </table>
				    </div>
				   
				  </td>
				  <td width="34" height="15"><div align="left">
				    <span class="lblForm"> </span></div></td>
				  <td width="127"><div align="left"><span class="lblForm">
				    </span></div></td>
				</form>
                </tr>
                <tr>
                  <td colspan="4"><div align="center">
                    <table width="676" border="1" cellpadding="0" cellspacing="0" style="<?=$stylo['tabla']?>" bgcolor="<?=$c_fondo['fondo tabla']?>" bordercolor="<?=$bordetabla?>">
                      <tr valign="top" class="lblCampoBlanco" bgcolor="<?=$c_fondo_tr["fondo tr"]?>">
                        <td width="52"><div align="center">Matricula</div></td>
                        <td width="75"><div align="center">Tipo Nave </div></td>
                        <td width="128"><div align="center">Embarque</div></td>
                        <td width="67"><div align="center">Hora salida </div></td>
                        <td width="88"><div align="center">Fecha Salida </div></td>
                        <td width="85"><div align="center">Fecha LLegada </div></td>
                        <td width="82"><div align="center">From</div></td>
                        <td width="81">
						  <div align="center">Destino</div>						  <div align="center">
						  
						  </div></td>
                        </tr>
                      <? 				    
					if($guia!=""){						
						$mes=extraermes($fecha);
						$anio=extraeranio($fecha);
						$resultado=$objPer->getUbicacionCarga($guia,$mes,$anio);
					
                  while($filas=$objPer->NextRow($resultado))
                   {
				   ?>
                      <tr valign="top" class="lblForm" >
                        <td class="lblForm">
                          <div align="center">
						  <? echo $filas['mat_trans']; ?>  
						  </div>
						</td>
                        <td class="lblForm"> <div align="center"><? echo $filas['tipo_trans']; ?></div></td>
                        <td class="lblForm"><div align="left"><? echo $filas['des_w']; ?></div></td>
                        <td class="lblForm"><div align="center"><? echo $filas['horasal_ruta']; ?></div></td>
                        <td class="lblForm"><div align="center"><? echo extraerfechanormal($filas['fecha_ruta']); ?></div></td>
                        <td class="lblForm"><div align="center"><? echo extraerfechanormal($filas['testimado_ruta']); ?></div></td>
                        <td class="lblForm"><div align="center"><? echo $filas['origen']; ?></div></td>
                        <td class="lblForm">						
						  <div align="center"><?php echo $filas['destino']; ?>
                          </div>						 
						  <div align="center">
  
						 
						    </div></td>
                        </tr>
                      <? 
			}
			$objPer->Liberar($resultado); 
			}
			?> 
			</table>
			 </div>
			 </td>
                </tr>				
                
                <tr>
                  <td width="227">
				    <div align="left"></div></td>
                  <td width="222"><div align="center">
                  </div></td>
                  <td colspan="2">&nbsp;</td>
                </tr>				  
                 <tr>
				 <form name="form2" method="post" action="cvp_ubicacion_carga_print.php?mes=<? echo $mes?>&anio=<? echo $anio?>">
                   <td colspan="4"><div align="center">
				   <? if($ver==1){?>
				   
                     <table width="349" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                         <td width="114"><div align="center">
                           <input type="submit" name="Submit2" value=".:Imprimir:." style="<?=$stylo['st2']?>" class="botira">
                         </div></td>
                         <td width="124"><div align="center">
                           <input name="guia" type="hidden" size="5" id="guia" value="<? echo $guia?>">
                           <input name="mes1" type="hidden" size="5" id="mes1" value="<? echo $mes?>">
                           <input name="anio" type="hidden" id="anio" value="<? echo $anio?>">
                         </div></td>
                         <td width="111"><div align="center">
                           <input type="button" name="Submit22" value=".:Regresar:." style="<?=$stylo['st2']?>" class="botira" onClick="volver(this.form);">
                         </div></td>
                       </tr>
                     </table>
					 <? }?>
                   </div></td>
				   </form>
                 </tr>
                
              </table>
            </div></td>
            <td background="../estilo_tabla/parte_med_der.gif">&nbsp;</td>
          </tr>
          <tr>
            <td><img src="../estilo_tabla/parte_inf_izq.gif" width="25" height="20"></td>
            <td background="../estilo_tabla/parte_inf_cen.gif">&nbsp;</td>
            <td><img src="../estilo_tabla/parte_inf_der.gif" width="25" height="20"></td>
          </tr>
        </table>
    </div></td>
  </tr>
  <tr valign="top" class="lblCampo" >
    <td colspan="4">
      <div align="center"> </div></td>
  </tr>
</table>

<map name="Map">
  <area shape="rect" coords="2,5,22,21" href="fondo.php">
</map>
</body>

</html>

