<?php
	include("stilos/config.inc.php");
	include("../clases/BDConexion.php");
  include("../clases/clsPer.php");
  include("Funciones.php");
  include("funcion/funciones.php");
  session_start();
  $objPer=new clsPer;
  $resultado=$objPer->getListaHVHeli($numcontrol);
  $fila=$objPer->NextRow($resultado);
?>

<!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>
<? 
$envia="fondo.php?k=$k&razonsocial=$razonsocial&distrito=$distrito";
$envia1="cvp_personal.php";
?>

		   
<!-- Copyright 2000,2001 Macromedia, Inc. All rights reserved. -->
<!-- Copyright 2000,2001 Macromedia, Inc. All rights reserved. -->
<!-- Copyright 2000,2001 Macromedia, Inc. All rights reserved. -->
</head>

<body onLoad="print();">
<table width="850" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td  valign="bottom">&nbsp;</td>
  </tr>
  <tr>
    <td  valign="bottom"><div align="left">
      <table width="681" border="0" cellpadding="0" cellspacing="0">
        <tr class="lblCampo" valign="top">
          <td width="231" valign="top">&nbsp;</td>
          <td width="287" valign="bottom"><div align="center" class="lblParrafo"></div></td>
          <td width="210"><div align="left"></div></td>
        </tr>
      </table>
    </div></td>
  </tr>
  <tr class="lblCampo">
    <td  valign="bottom"><div align="center">CONTROL DE HORAS DE VUELO X TIPO </div></td>
  </tr>
  <tr class="lblCampo">
    <td  valign="bottom"><div align="center">Reporte del <? echo $fecha1?> al <? echo $fecha2?></div></td>
  </tr>
  <tr class="lblCampo">
    <td  valign="bottom">&nbsp;</td>
  </tr>
  <tr>
    <td  valign="bottom"><div align="left">
      <table width="699" border="0" cellspacing="0" cellpadding="0">
        <tr class="lblCampo">
          <td width="71"><div align="left">Transporte</div></td>
          <td width="10"><div align="left"></div></td>
          <td width="245"><div align="left"><? echo $matricula?></div></td>
          <td width="10"><div align="left" class="lblParrafo"></div></td>
          <td width="81"><div align="right"></div></td>
          <td width="10"><div align="left"></div></td>
          <td width="300"><div align="left"></div></td>
        </tr>
      </table>
    </div></td>
  </tr>
  <tr>
    <td width="730"  valign="bottom">
      <div align="left" class="lblTitulo" ></div></td>
  </tr>
  <tr>
    <td>
      <div align="left">
        <table width="835" 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>&nbsp;</td>
            <td colspan="2"><div align="center">Ruta</div></td>
            <td><div align="center">Arrranca</div></td>
            <td><div align="center">Decola</div></td>
            <td><div align="center">Aterriza</div></td>
            <td><div align="center">Apaga</div></td>
            <td><div align="center">TVC</div></td>
            <td colspan="2"><div align="center">Pasajeros</div></td>
            <td colspan="2"><div align="center"></div>
                <div align="center">Carga</div></td>
            <td width="207" rowspan="2"><div align="center">Observaciones</div></td>
          </tr>
          <tr valign="top" class="lblCampoBlanco" bgcolor="<?=$c_fondo_tr["fondo tr"]?>">
            <td width="19"><div align="center">N&ordm;</div></td>
            <td width="44"><div align="left"></div>
                <div align="center">Origen</div></td>
            <td width="43">
              <div align="center">Destino</div></td>
            <td width="49"><div align="center">hora</div></td>
            <td width="53"><div align="center">ArHora</div></td>
            <td><div align="center">Hora</div></td>
            <td width="44"><div align="center">Hora</div></td>
            <td width="61"><div align="center">Hora</div></td>
            <td width="72"><div align="center">Nro de Pax </div></td>
            <td width="72"><div align="center">Kilos</div></td>
            <td width="47"><div align="center">Carga</div></td>
            <td width="44"><div align="center">Kilos</div></td>
          </tr>
          <?
					 //if($numcontrol!=""){ 
				    $regxpag=50;
					if(!isset($pagina)){
					$pagina=0;
					}					
					$regini=$pagina*$regxpag;
					if($matricula!='0'){
					$resultado=$objPer->getListaHVHelixTipo(extraerfechamysql($fecha1),extraerfechamysql($fecha2),$matricula);				
					}
					
                  while($filas=$objPer->NextRow($resultado))
                   {
				   $n++;
				   ?>
          <tr valign="top" class="lblForm" >
            <td class="lblForm">
              <div align="center"> <? echo $n; ?> </div></td>
            <td class="lblForm"><div align="left"> </div>
                <div align="center">
                  <?php 
						//echo extraerfechanormal($filas['fecha']); 
						?>
                  <?php echo $filas['origen']; ?></div></td>
            <td class="lblForm">
              <div align="center"><?php echo $filas['destino']; ?> </div></td>
            <td class="lblForm"><div align="center"><?php echo $filas['harranq_dch']; ?></div></td>
            <td class="lblForm"><div align="center"><?php echo $filas['haire_dch']; ?> </div></td>
            <td width="54">
              <div align="center"><?php echo $filas['htierra_dch']; ?> </div></td>
            <td><div align="center">
                <?php 
					  echo $filas['hapaga_dch']; 
					  ?>
            </div></td>
            <td><div align="center">
                <?php 
					  if($matricula!='CFIGR'){
					echo $thp=calcular_tiempo_trasnc($filas['hapaga_dch'],$filas['harranq_dch']);					
					}else{
					$thp=calcular_tiempo_trasnc($filas['htierra_dch'],$filas['haire_dch']);
					$thh=calcular_horas_formato_inversa($thp);
					echo dif($filas['htierra_dch'],$filas['haire_dch']);
					}		
					$th=$th+$thp;
					?>
            </div></td>
            <td><div align="center"><?php echo $filas['pi']; ?></div></td>
            <td><div align="center">
              <?php  echo $filas['cpass_dch']?>
</div></td>
            <td><div align="center">
              <?php  echo $filas['trascarga']?>
            </div></td>
            <td><div align="center">
              <?php 
					echo $filas['ccarga_dch'];
					$tcarga=$tcarga+$filas['ccarga_dch']; 
					?>
</div></td>
            <td><?php echo $filas['obser']; ?></td>
          </tr>
          <? 
			}
			$objPer->Liberar($resultado); 
			//} 
			?>
          <tr valign="top" class="lblForm" >
            <td colspan="7" class="lblForm"><div align="right">TOTAL HORAS DE VUELOS </div>
                <div align="center"></div></td>
            <td>
              <div align="center"><? echo $th?></div></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><div align="center"><?=$tcarga?></div></td>
            <td>&nbsp;</td>
          </tr>
          <tr valign="top" class="lblForm" >
            <td colspan="7" class="lblForm"><div align="right">Equivalente a HH:mm </div></td>
            <td><div align="center">
                <? 
					echo calcular_horas_formato_inversa1($th);
					?>
            </div></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><div align="center"></div></td>
            <td>&nbsp;</td>
          </tr>
        </table>
</div></td>
  </tr>
  <tr class="lblCampo">
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><div align="left">
      </div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<map name="MapMap">
  <area shape="rect" coords="3,4,23,21" href="fondo.php">
</map>
</body>
</html>

