FPDF('P', 'mm', 'Letter'); }*/ function Header() { $this->SetFont('Arial','B',6); $bordes = 0; $areaDeTrabajo = 200; $arrXpos = array(30, 90, 13, 11); // Logo Corporativo Soler & Palau $this->SetY(30); $this->SetX(10); $rfcSoler = 'SPA861201DK4'; if ( file_exists( 'shared/imagenes/' . $rfcSoler . '_PDF_LOGOCORPORATIVO.png' ) ) { $this->Image( 'shared/imagenes/' . $rfcSoler . '_PDF_LOGOCORPORATIVO.png', 10, 17, 50, 19 ); } // Logo Soler & Palau Ventilation $this->SetY(30); $this->SetX(2); if ( file_exists( 'shared/imagenes/' . $rfcSoler . '_PDF.jpg' ) ) { $this->Image( 'shared/imagenes/' . $rfcSoler . '_PDF.jpg', 165, 10, 40, 20 ); } //Texto Fijo $this->SetY(30); $this->SetX(165); $this->SetFont('Arial', '', 7); $strTexto = 'http://www.solerpalau.mx'; $this->Cell( 40, 5, $strTexto, $bordes, 1, 'L'); $this->SetX(165); $strTexto = 'comercialmx@solerpalau.com'; $this->Cell( 40, 5, $strTexto, $bordes, 1, 'L'); //Datos de columna A $this->SetFont('Arial', '', 7); $this->SetY(23); $this->SetX($arrXpos[0]); // Domicilio Fiscal $strTemporal = ''; $strTemporal .= 'Boulevard A, 15'; $strTemporal = trim($strTemporal); $strTemporal = trim($strTemporal, ','); $this->Cell(80, 3, $strTemporal, $bordes, 1, 'L'); $this->SetX($arrXpos[0]); $strTemporal = 'Col. Parque Industrial Puebla 2000'; $strTemporal = trim($strTemporal); $strTemporal = trim($strTemporal, ','); $this->Cell(80, 3, $strTemporal, $bordes, 1, 'L'); $this->SetX($arrXpos[0]); $strTemporal = 'Puebla, Puebla, Mexico, C.P. 72225'; $strTemporal = trim($strTemporal); $strTemporal = trim($strTemporal, ','); $this->SetX($arrXpos[0]); $this->Cell(80, 3, $strTemporal, $bordes, 1, 'L'); // N�mero telef�nico $this->SetX($arrXpos[0]); $this->Cell(80, 3, 'Tel. (222) 223 3900, 223 3911', $bordes, 1, 'L'); // R.F.C. $this->SetX($arrXpos[0]); $this->Cell(80, 3, 'R.F.C.: SPA861201DK4', $bordes, 1, 'L'); // R�gimen Fiscal $this->SetX($arrXpos[0]); $strTemporal = utf8_decode('R�gimen Fiscal: 601 - General de Ley Personas Morales'); $this->Cell(80, 3, $strTemporal, $bordes, 1, 'L'); $this->Ln(3); if ( $this->PageNo() == "1" ) { // T�tulo del pdf $this->SetX(10); $this->SetFont('Arial', 'B', 14); $this->Cell( $areaDeTrabajo, 5, utf8_decode('SELECCI�N DE ATENUADOR'), $bordes, 1, 'C'); $this->Ln(3); $y = $this->GetY(); $bordes = 0; //Dibuja parte superior izquierda y derecha del cuadro $this->SetY($y); $this->SetX($arrXpos[3]); $this->Cell(2, 2, '', 'TL', 'C'); $this->SetX($arrXpos[3] + 70); $this->Cell(2, 2, '', 'TR', 'C'); $this->Ln(3); $this->SetFont('Arial', 'B', 10); $this->SetX($arrXpos[2]); $this->SetFillColor(255, 255, 255); $y3 = $this->GetY();//Sirve para posicionar la columna B $this->Cell(68, 4, 'Datos de Entrada', $bordes, 1, 'C'); $arrDatosEntrada = $this->datosEntrada; foreach ( $arrDatosEntrada as $keyDatosEntrada => $valueDatosEntrada ) { $this->SetFont('Arial', 'B', 8); $this->SetX($arrXpos[2]); $this->SetFillColor(255, 255, 255); $strTexto = $keyDatosEntrada; $wStrTexto = $this->GetStringWidth($keyDatosEntrada) + 2; $this->Cell($wStrTexto, 4, $strTexto.":", $bordes, 0, 'L'); $this->SetFont('Arial', '', 8); $this->SetFillColor(255, 255, 255); if ( $keyDatosEntrada == "CurvaNC" ) { $arrCurvaNC = explode( "##", $valueDatosEntrada ); $curvaNC = $arrCurvaNC[0]; $valoresCurvaNC = $arrCurvaNC[1]; $this->Cell(34, 4, trim($curvaNC), $bordes, 1, 'L'); } else { $this->Cell(34, 4, trim($valueDatosEntrada), $bordes, 1, 'L'); } } $this->Ln(3); // Dibuja parte inferior izquierda y derecha del cuadro $this->SetX($arrXpos[3]); $this->Cell(2, 2, '', 'BL', 'C'); $this->SetX($arrXpos[3] + 70); $this->Cell(2, 2, '', 'BR', 1, 'C'); $this->Ln(2); $y1 = $this->GetY(); $bordes = 0; $i = 0; $arrConversiones = $this->conversiones; foreach ( $arrConversiones as $valueConversiones ) { $i ++; } if ( ($i > 0) && ( $this->tipoPDF == "CALC" ) ) { $wAreaConversiones = 115; $this->SetY($y3); $this->SetX($arrXpos[1]); $this->SetFont('Arial', 'B', 10); $this->SetFillColor(255, 255, 255); $this->Cell( $wAreaConversiones, 4, "Conversiones de los Datos de Entrada", $bordes, 1, 'C'); $y = $this->GetY(); foreach ( $arrConversiones as $keyConversiones => $valueConversiones ) { $this->SetY($y); $this->SetX($arrXpos[1]); $this->SetFont('Arial', 'B', 8); $this->SetFillColor(255, 255, 255); $this->Cell( 30, 4, $keyConversiones, $bordes, 0, 'L'); $this->SetFont('Arial', '', 8); $this->SetFillColor(255, 255, 255); $this->MultiCell( 85, 4, $valueConversiones, $bordes, 'L'); $y = $this->GetY(); } } $y2 = $this->GetY(); //Para saber cual posici�n de "y" es mayor if ($y1 >= $y2) { $this->SetY($y1); } else { $this->SetY($y2); } } } //Funci�n parta dibujar el cuadro de los conceptos function DibujaCuadro($posy,$largo) { //N�mero $this->Rect(10, $posy, 7, $largo); // Conceptos -> Art�culo $this->Rect(17, $posy, 36, $largo); //Conceptos -> ClaveProdServ $this->Rect(53, $posy, 19, $largo); //Conceptos -> Cantidad $this->Rect(72, $posy, 17, $largo); // Conceptos -> Unidad $this->Rect(89, $posy, 11, $largo); //Descripcion $this->Rect(100, $posy, 65, $largo); // Conceptos -> Valor unitario $this->Rect(165, $posy, 20, $largo); // Conceptos -> Importe $this->Rect(185, $posy, 20, $largo); } //Funci�n para el footer de la p�gina function Footer(){ $this->SetY(-12); $this->SetFont('Arial','B',8); $this->SetX(10); $this->SetY(-13); $this->SetFont('Arial','B',8); $this->SetTextColor(0); $this->Cell(200,10,utf8_decode('P�gina ').$this->PageNo().' de {nb}',0,0,'R'); } // Creaci�n del objeto de la clase heredada function genera_PDF() { $this->AliasNbPages(); $this->AddPage(); // Configuraciones Globales $bordes = 1; $areaDeTrabajo = 195; $tamanoCelda = 4; $bolSaltoPagina = false; $y = $this->GetY(); $arrDatosLwFinal = $this->datosLwFinal; $arrDatosLwA = $this->datosLwA; $arrLw = $this->datosLw; $arrKw = $this->datosKw; $arrDatosLwFinalVa = $this->DatosLwFinalVa; $arrDatosLwAVa = $this->DatosLwAVa; $arrFrecuencias = array( "63Hz", "125Hz", "250Hz", "500Hz", "1000Hz", "2000Hz", "4000Hz", "8000Hz" ); $wColFrecuencias = $areaDeTrabajo / (count($arrFrecuencias)+1); $arrPonderanciaA = array( "-26.2", "-16.1", "-8.6", "-3.2", "0.0", "1.2", "1.0", "-1.1" ); $this->SetY($y); $this->SetX(10); $this->SetFont('Arial','B',11); $this->SetFillColor(255, 255, 255); $this->Ln(5); if ( $this->tipoPDF == "CALC" ) { $this->Cell( $areaDeTrabajo, 4, utf8_decode("C�LCULOS GENERALES"), 0, 1, 'C'); $this->Ln(5); $x = 10; $w = $x; $w1 = $x + $wColFrecuencias; $w2 = $x + $wColFrecuencias + $wColFrecuencias; $w3 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w4 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w5 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w6 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w7 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w8 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $wCol = array( $w, $w1, $w2, $w3, $w4, $w5, $w6, $w7, $w8 ); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $wColAV = $areaDeTrabajo / 4; $tmpX = 10; $y = $this->GetY(); $wx = $tmpX; $wx1 = $tmpX + $wColAV; $wx2 = $tmpX + $wColAV + $wColAV; $wx3 = $tmpX + $wColAV + $wColAV + $wColAV; $wColx = array( $wx, $wx1, $wx2, $wx3 ); $this->SetY($y); $this->SetX($wColx[0]); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColAV, 10, utf8_decode("�rea de Salida"), $bordes, 'C'); $this->SetY($y); $this->SetX($wColx[1]); $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColAV, 10, $this->areaDeSalida, $bordes, 'C'); $this->SetY($y); $this->SetX($wColx[2]); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColAV, 10, "Velocidad del Fluido", $bordes, 'C'); $this->SetY($y); $this->SetX($wColx[3]); $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColAV, 10, $this->velocidadDeFluido, $bordes, 'C'); $this->Ln(5); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $i = 1; $this->Cell($wColFrecuencias, $tamanoCelda, "Frecuencias Hz", $bordes, 0, 'C'); foreach ( $arrFrecuencias as $frecuencias ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $frecuencias, $bordes, 0, 'C'); $i ++; } $this->Ln(4); $i = 1; $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->Cell($wColFrecuencias, $tamanoCelda, "Lw", $bordes, 0, 'C'); foreach ( $arrLw as $keyLw => $valueLw ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $valueLw, $bordes, 0, 'C'); $i ++; } $this->Ln(4); $i = 1; $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->Cell($wColFrecuencias, $tamanoCelda, "Kw", $bordes, 0, 'C'); foreach ( $arrKw as $keyKw => $valueKw ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $valueKw, $bordes, 0, 'C'); $i ++; } $this->Ln(4); $i = 1; $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->Cell($wColFrecuencias, $tamanoCelda, "Lw Final", $bordes, 0, 'C'); foreach ( $arrDatosLwA as $keyLwA => $valueLwA ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwA, $bordes, 0, 'C'); $i ++; } $this->Ln(4); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $i = 1; $this->Cell($wColFrecuencias, $tamanoCelda, "Ponderancia A", $bordes, 0, 'C'); foreach ( $arrPonderanciaA as $ponderancia ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $ponderancia, $bordes, 0, 'C'); $i ++; } $this->Ln(4); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $i = 1; $this->Cell($wColFrecuencias, $tamanoCelda, "LwA", $bordes, 0, 'C'); foreach ( $arrDatosLwA as $keyLwA => $valueLwA ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwA, $bordes, 0, 'C'); $i ++; } $arrDatosEntrada = $this->datosEntrada; foreach ( $arrDatosEntrada as $keyDatosEntrada => $valueDatosEntrada ) { if ( $keyDatosEntrada == "CurvaNC" ) { $arrCurvaNC = explode( "##", $valueDatosEntrada ); $curvaNC = $arrCurvaNC[0]; $valoresCurvaNC = $arrCurvaNC[1]; } } switch( $curvaNC ) { case 'NC15': $arrCurvaNC = array( 47, 36, 29, 22, 17, 14, 12, 11 ); break; case 'NC20': $arrCurvaNC = array( 51, 40, 33, 26, 22, 19, 17, 16 ); break; case 'NC25': $arrCurvaNC = array( 54, 44, 37, 31, 27, 24, 22, 21 ); break; case 'NC30': $arrCurvaNC = array( 57, 48, 41, 35, 31, 29, 28, 27 ); break; case 'NC35': $arrCurvaNC = array( 60, 52, 45, 40, 36, 34, 33, 32 ); break; case 'NC40': $arrCurvaNC = array( 64, 56, 50, 45, 41, 39, 38, 37 ); break; case 'NC45': $arrCurvaNC = array( 67, 60, 54, 49, 46, 44, 43, 42 ); break; case 'NC50': $arrCurvaNC = array( 71, 64, 58, 54, 51, 49, 48, 47 ); break; case 'NC55': $arrCurvaNC = array( 74, 67, 62, 58, 56, 54, 53, 52 ); break; case 'NC60': $arrCurvaNC = array( 77, 71, 67, 63, 61, 59, 58, 57 ); break; case 'NC65': $arrCurvaNC = array( 80, 75, 71, 68, 66, 64, 63, 62 ); break; case 'NC70': $arrCurvaNC = array( 84, 79, 75, 72, 71, 70, 68, 68 ); break; } $this->Ln(4); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $i = 1; $this->Cell($wColFrecuencias, $tamanoCelda, "Curva ".$curvaNC, $bordes, 0, 'C'); foreach ( $arrCurvaNC as $valoresCurvaNC ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $valoresCurvaNC, $bordes, 0, 'C'); $i ++; } $y = $this->GetY(); if ( $y >= 243 ) { $this->AddPage(); $y = $this->GetY(); } $this->Ln(4); $arrLwAV = $this->LwAVentilador; $i = 1; $y1 = $this->GetY(); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell($wColFrecuencias, $tamanoCelda, "LwA Ventilador - ".$curvaNC, $bordes, 'C'); $y2 = $this->GetY(); $sCol = $y1 - $y2; foreach ( $arrLwAV as $valueLwAV ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $sCol, $valueLwAV, $bordes, 0, 'C'); $i ++; } $y = $this->GetY(); if ( $y >= 243 ) { $this->AddPage(); $y = $this->GetY(); } $arrDatosAtenuador = $this->datosAtenuadores; $i = 1; $y1 = $this->GetY(); $this->SetY($y1); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell($wColFrecuencias, $tamanoCelda, utf8_decode("Atenuaci�n Seleccionada"), $bordes, 'C'); $y2 = $this->GetY(); $sCol = $y1 - $y2; foreach ( $arrFrecuencias as $frecuencias ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $sCol, $arrDatosAtenuador[$frecuencias], $bordes, 0, 'C'); $i ++; } $y = $this->GetY(); if ( $y >= 243 ) { $this->AddPage(); $y = $this->GetY(); } $arrVentiladorA = $this->LwAVentiladorA; $i = 1; $y1 = $this->GetY(); $this->SetY($y1); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell($wColFrecuencias, $tamanoCelda, utf8_decode("LwA Ventilador - Atenuaci�n"), $bordes, 'C'); $y2 = $this->GetY(); $sCol = $y1 - $y2; foreach ( $arrVentiladorA as $VentiladorA ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $sCol, $VentiladorA, $bordes, 0, 'C'); $i ++; } $y = $this->GetY(); if ( $y >= 243 ) { $this->AddPage(); $y = $this->GetY(); } $arrSonidoR = $this->sonidoRegenerado; $i = 1; $y1 = $this->GetY(); $this->SetY($y1); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell($wColFrecuencias, $tamanoCelda, "Sonido Regenerado", $bordes, 'C'); $y2 = $this->GetY(); $sCol = $y1 - $y2; foreach ( $arrSonidoR as $sonidoRegenerado ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $sCol, $sonidoRegenerado, $bordes, 0, 'C'); $i ++; } $y = $this->GetY(); if ( $y >= 243 ) { $this->AddPage(); $y = $this->GetY(); } $arrCorrecion = $this->correcionArea; $i = 1; $y1 = $this->GetY(); $this->SetY($y1); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell($wColFrecuencias, $tamanoCelda, utf8_decode("Correci�n para la �rea"), $bordes, 'C'); $y2 = $this->GetY(); $sCol = $y1 - $y2; foreach ( $arrCorrecion as $correcion ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $sCol, $correcion, $bordes, 0, 'C'); $i ++; } $y = $this->GetY(); if ( $y >= 243 ) { $this->AddPage(); $y = $this->GetY(); } $arrSonidoMasCorrecion = $this->sonidoMasCorreccion; $i = 1; $y1 = $this->GetY(); $this->SetY($y1); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell($wColFrecuencias, $tamanoCelda, utf8_decode("Sonido Regenerado m�s Correci�n del �rea"), $bordes, 'C'); $y2 = $this->GetY(); $sCol = $y1 - $y2; foreach ( $arrSonidoMasCorrecion as $sonidoMasCorrecion ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $sCol, $sonidoMasCorrecion, $bordes, 0, 'C'); $i ++; } $y = $this->GetY(); if ( $y >= 243 ) { $this->AddPage(); $y = $this->GetY(); } $i = 1; $y1 = $this->GetY(); $this->SetY($y1); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell($wColFrecuencias, $tamanoCelda, "(A- weighting (dB))", $bordes, 'C'); $y2 = $this->GetY(); $sCol = $y1 - $y2; foreach ( $arrPonderanciaA as $ponderancia ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $sCol, $ponderancia, $bordes, 0, 'C'); $i ++; } $y = $this->GetY(); if ( $y >= 243 ) { $this->AddPage(); $y = $this->GetY(); } $i = 1; $y1 = $this->GetY(); $this->SetY($y1); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell($wColFrecuencias, $tamanoCelda, utf8_decode("Espectro resultante ponderaci�n A ( dBA )"), $bordes, 'C'); $y2 = $this->GetY(); $sCol = $y1 - $y2; foreach ( $arrDatosLwAVa as $valueLwAVa ) { $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $sCol, $valueLwAVa, $bordes, 0, 'C'); $i ++; } } $y = $this->GetY(); if ( $y >= 243 ) { $this->AddPage(); $y = $this->GetY(); } $this->SetFont('Arial','B',12); $this->SetFillColor(255, 255, 255); $this->SetY($y); $this->Cell( $areaDeTrabajo, 4, "RESULTADOS", 0, 1, 'C'); $this->Ln(8); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->Cell($areaDeTrabajo, $tamanoCelda, "Espectro de Potencia Sonora Ventilador Lw",$bordes, 1, 'C'); $x = 10; $w = $x; $w1 = $x + $wColFrecuencias; $w2 = $x + $wColFrecuencias + $wColFrecuencias; $w3 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w4 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w5 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w6 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w7 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w8 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $wCol = array( $w, $w1, $w2, $w3, $w4, $w5, $w6, $w7, $w8 ); $i = 0; foreach ( $arrFrecuencias as $frecuencias ) { $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $frecuencias, $bordes, 0, 'C'); $i ++; } $this->SetX($wCol[8]); $this->Cell($wColFrecuencias, $tamanoCelda, "Lw (dB)", $bordes, 0, 'C'); $this->Ln(4); $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $i = 0; foreach ( $arrDatosLwFinal as $keyLwFinal => $valueLwFinal ) { $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwFinal, $bordes, 0, 'C'); $i ++; } $this->SetX($wCol[8]); $this->Cell($wColFrecuencias, $tamanoCelda, $this->sumaLogLwFinal, $bordes, 0, 'C'); $this->Ln(8); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->Cell($areaDeTrabajo, $tamanoCelda, utf8_decode("Espectro de Potencia Sonora Ventilador Ponderaci�n A Lw (A)"),$bordes, 1, 'C'); $i = 0; foreach ( $arrFrecuencias as $frecuencias ) { $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $frecuencias, $bordes, 0, 'C'); $i ++; } $this->SetX($wCol[8]); $this->Cell($wColFrecuencias, $tamanoCelda, "Lw (dBA)", $bordes, 0, 'C'); $this->Ln(4); $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $i = 0; foreach ( $arrDatosLwA as $keyLwA => $valueLwA ) { $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwA, $bordes, 0, 'C'); $i ++; } $this->SetX($wCol[8]); $this->Cell($wColFrecuencias, $tamanoCelda, $this->sumaLogaritmicaLwA, $bordes, 0, 'C'); $this->Ln(8); $wColPotencias = $areaDeTrabajo / 2; $x = 10; $y = $this->GetY(); $w = $x; $w1 = $x + $wColPotencias; $w2 = $x + $wColPotencias + $wColPotencias; $w3 = $x + $wColPotencias + $wColPotencias + $wColPotencias; $wCol = array( $w, $w1, $w2, $w3 ); $this->SetY($y); $this->SetX($wCol[0]); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColPotencias, 10, utf8_decode("Presi�n Sonora"), $bordes, 'C'); $this->SetY($y); $this->SetX($wCol[1]); $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColPotencias, 10, $this->presionSonora, $bordes, 'C'); $this->Ln(8); // Con Atenaudor $x = 10; $w = $x; $w1 = $x + $wColFrecuencias; $w2 = $x + $wColFrecuencias + $wColFrecuencias; $w3 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w4 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w5 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w6 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w7 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $w8 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias; $wCol = array( $w, $w1, $w2, $w3, $w4, $w5, $w6, $w7, $w8 ); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->Cell($areaDeTrabajo, $tamanoCelda, "Espectro de Potencia Sonora Ventilador con Atenuador Lw",$bordes, 1, 'C'); $i = 0; foreach ( $arrFrecuencias as $frecuencias ) { $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $frecuencias, $bordes, 0, 'C'); $i ++; } $this->SetX($wCol[8]); $this->Cell($wColFrecuencias, $tamanoCelda, "Lw (dBA)", $bordes, 0, 'C'); $this->Ln(4); $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $i = 0; foreach ( $arrDatosLwFinalVa as $keyLwFinalVa => $valueLwFinalVa ) { $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwFinalVa, $bordes, 0, 'C'); $i ++; } $this->SetX($wCol[8]); $this->Cell($wColFrecuencias, $tamanoCelda, $this->sumaLogaritmicaLwFinalVa, $bordes, 0, 'C'); $this->Ln(8); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->Cell($areaDeTrabajo, $tamanoCelda, "Espectro de Potencia Sonora Ventilador con Atenuador Lw (A)",$bordes, 1, 'C'); $i = 0; foreach ( $arrFrecuencias as $frecuencias ) { $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $frecuencias, $bordes, 0, 'C'); $i ++; } $this->SetX($wCol[8]); $this->Cell($wColFrecuencias, $tamanoCelda, "Lw (dBA)", $bordes, 0, 'C'); $this->Ln(4); $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $i = 0; foreach ( $arrDatosLwAVa as $keyLwAVa => $valueLwAVa ) { $this->SetX($wCol[$i]); $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwAVa, $bordes, 0, 'C'); $i ++; } $this->SetX($wCol[8]); $this->Cell($wColFrecuencias, $tamanoCelda, $this->sumaLogaritmicaLwAVa, $bordes, 0, 'C'); $this->Ln(8); $wColPotencias = $areaDeTrabajo / 2; $x = 10; $y = $this->GetY(); $w = $x; $w1 = $x + $wColPotencias; $w2 = $x + $wColPotencias + $wColPotencias; $w3 = $x + $wColPotencias + $wColPotencias + $wColPotencias; $wCol = array( $w, $w1, $w2, $w3 ); $this->SetY($y); $this->SetX($wCol[0]); $this->SetFont('Arial','B',8); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColPotencias, 10, utf8_decode("Presi�n Sonora"), $bordes, 'C'); $this->SetY($y); $this->SetX($wCol[1]); $this->SetFont('Arial','',8); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColPotencias, 10, $this->presionSonoraVa, $bordes, 'C'); $arrXpos = array(30, 90, 13, 11); $y = $this->GetY(); //Dibuja parte superior izquierda y derecha del cuadro $this->SetY($y + 8); $this->SetX($arrXpos[3]); $this->Cell(2, 2, '', 'TL', 'C'); $this->SetX($arrXpos[3] + 192); $this->Cell(2, 2, '', 'TR', 'C'); $this->Ln(3); $this->SetFont('Arial', 'B', 12); $this->SetX($arrXpos[2]); $this->SetFillColor(255, 255, 255); $y3 = $this->GetY();//Sirve para posicionar la columna B $this->Cell(190, 12, 'Datos del Atenuador Seleccionado', $bordes, 1, 'C'); $areaDeTrabajo = 190; $wColPotencias = $areaDeTrabajo / 4; $x = 13; $y = $this->GetY(); $w = $x; $w1 = $x + $wColPotencias; $w2 = $x + $wColPotencias + $wColPotencias; $w3 = $x + $wColPotencias + $wColPotencias + $wColPotencias; $wCol = array( $w, $w1, $w2, $w3 ); $arrDatosAtenuador = $this->datosAtenuadores; $this->SetY($y); $this->SetX($wCol[0]); $this->SetFont('Arial','B',11); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColPotencias, 11, "Modelo", $bordes, 'C'); $this->SetY($y); $this->SetX($wCol[1]); $this->SetFont('Arial','',11); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColPotencias, 11, $arrDatosAtenuador['MODELO'], $bordes, 'C'); $this->SetY($y); $this->SetX($wCol[2]); $this->SetFont('Arial','B',11); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColPotencias, 11, "Longitud", $bordes, 'C'); $this->SetY($y); $this->SetX($wCol[3]); $this->SetFont('Arial','',11); $this->SetFillColor(255, 255, 255); $this->MultiCell( $wColPotencias, 11, $arrDatosAtenuador['LONGITUD']."", $bordes, 'C'); $this->Ln(3); // Dibuja parte inferior izquierda y derecha del cuadro $this->SetX($arrXpos[3]); $this->Cell(2, 2, '', 'BL', 'C'); $this->SetX($arrXpos[3] + 192); $this->Cell(2, 2, '', 'BR', 1, 'C'); $this->Ln(2); if ( $this->narch == "" ) { $this->Output(); } else { if ( $this->p == "" ) { $this->Output( $this->narch ); } else { $this->Output( $this->narch, $this->p ); } } } } ?>