<?php
  include("stilos/config.inc.php");
  include("../clases/BDConexion.php");
  include("../clases/clsEpp.php");
  include("../clases/clsPer.php");
  include("funcion/funciones.php");
  include("Funciones.php");
  session_start();   
  $objPer=new clsPer;
  $objEpp=new clsEpp;
  $fecha1= extraerfechamysql($fecha1);
  $fecha2= extraerfechamysql($fecha2);
?>
<!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">

<!-- Copyright 2000,2001 Macromedia, Inc. All rights reserved. -->
<? $url="cvp_ubicacion_per.php?dociden_per=$dociden_per&mes1=$mes1&anio=$anio&tipo=$tipo"?>
<script>
function volver(form)
{
location.reload('<? echo $url ?>');
}
</script>
<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 onLoad="print();">
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr class="lblCampo">
    <td width="242" height="25">
    <div align="left" >
      <table width="234" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="61"><div align="center"><img src="../imagenes/logo_perenco.GIF" width="200" height="50" border="0"></div></td>
          <td width="173">&nbsp;</td>
        </tr>
      </table> 
      </div></td>
    <td width="249">&nbsp;</td>
    <td width="249" valign="bottom">
	<div align="right">
	  Fecha : <? echo date("d/m/Y");?> <br>
      Hora : <? echo date("H:i:s");?>
	 </div>
	</td>
  </tr>
  <tr class="lblCampo">
    <td colspan="3"><div align="center" class="lblParrafo">ENTREGA DE EPP ----ENTRE&nbsp;&nbsp; <?=$fecha1?> &nbsp;&nbsp;Y &nbsp;&nbsp;<?=$fecha2?> </div></td>
  </tr>
  <tr class="lblCampo" >
    <td colspan="3"><div align="center">
      <table width="679" border="0" cellspacing="0" cellpadding="0"> 
	  <?php 
	     $regId = $objEpp->DevolverDnixfechas($fecha1,$fecha2);
		 while ($filasDni=$objEpp->NextRow($regId)){
		 $dni = $filasDni['id_persona'];
	  ?>       
        <tr>
          <td width="679"><?php  include('cvp_report_epp_pers_parte_print.php'); ?></td>
        </tr>
        <tr>
		<?php } $objEpp->Liberar($regId) ?>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      </div></td>
  </tr>
  <tr valign="top" class="lblCampo" >
    <td colspan="3">
      <div align="left">TOTAL DE PERSONAS ENTREDAS A LA FECHA </div></td>
  </tr>
  <tr valign="top" class="lblCampo" >
    <td colspan="3"><table width="740" border="0" cellspacing="0" cellpadding="0">
      <tr bgcolor="#CCCCCC">
        <td width="60">&nbsp;</td>
        <td width="42"><strong>ITEM </strong></td>
        <td width="248"><strong>TRABAJADORES</strong></td>
        <td width="390"><strong>EMPRESA</strong></td>
      </tr><?php 
	      $regtraba =  $objEpp->PersonasEntregdasEppxFecha($fecha1,$fecha2);
		  $cont  = 1;
		  while($datosPer=$objEpp->NextRow($regtraba)){
	  ?>
      <tr>
        <td>&nbsp;</td>
        <td><?=$cont?></td>
        <td><?=strtoupper($datosPer['nombre'])?></td>
        <td><?=strtoupper($datosPer['razon_emp'])?></td>
      </tr>
	  <?php $cont +=1;} $objEpp->Liberar($regtraba); ?>
    </table></td>
  </tr>
  <tr valign="top" class="lblCampo" >
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr valign="top" class="lblCampo" >
    <td>TOTAL EPP ENTREGADAS </td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr valign="top" class="lblCampo" >
    <td colspan="3"><table width="740" border="0" cellspacing="0" cellpadding="0">
      <tr bgcolor="#CCCCCC">
        <td width="60">&nbsp;</td>
        <td width="282"><strong>EPP</strong></td>
        <td width="44"><strong>CANT</strong></td>
        <td width="354"><strong>UNIDADES</strong></td>
      </tr>
	  <?php 
	      $regE =  $objEpp->DevolverCantDadaEPPxFecha($fecha1,$fecha2);
		  while($datosPerE=$objEpp->NextRow($regE)){
	  ?>
      <tr>
        <td>&nbsp;</td>
        <td><?=strtoupper($datosPerE['tipo_epp'])?></td>
        <td><?=$datosPerE['total']?></td>
        <td><?=$datosPerE['umedida']?></td>
      </tr>
	  <?php } $objEpp->Liberar($regE); ?>
    </table></td>
  </tr>
    <tr valign="top" class="lblCampo" >
    <td colspan="3"><p>&nbsp;</p>
      <p>&nbsp;</p>      </td>
  </tr>
    <tr valign="top" class="lblCampo" >
      <td colspan="3"><hr size="3" noshade></td>
    </tr>
    <tr valign="top" class="lblCampo" >
      <td colspan="3"><table width="740" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="270" class="lblCampo">Perenco Peru Limited Sucursal del Peru</td>
          <td width="191">&nbsp;</td>
          <td width="279"><div align="right" class="lblCampo">OPERACIONES LOTE 67 - BASE CURARAY </div></td>
        </tr>
      </table></td>
    </tr>
</table>
</body>

</html>

