| ||||
require('fpdf.php'); require('../../include/conexion.php'); require('fpdf_js.php'); $ide=trim($HTTP_GET_VARS["folio"]); if( $ide=='' || $ide==0) { echo '<meta http-equiv="refresh" content="0;URL=../index.php">'; } $num=trim($HTTP_GET_VARS["n"]); class PDF_AutoPrint extends PDF_Javascript { var $folio; var $ide; var $num; function constructor($folio) { $this->ide=$folio; } function AutoPrint($dialog=false) { $param=($dialog ? 'true' : 'false'); $script="print($param);"; $this->IncludeJS($script); } function Header() { $this->Image('logo_grande.JPG',12,11,15,''); $this->Cell(80); $this->Ln(20); $this->Cell(58); $this->Cell(80,4,'INFORME DE SERVICIO',0,0,'C',1,'R'); $this->ln(5); $this->Cell(58); $this->Cell(80,4,'Anexo de Servicio',0,0,'C',1,'R'); $this->ln(8); $est="select *"; $est=$est." from *"; $est=$est." where est_serv_ide=".$this->ide.";"; //echo $est; require('../../include/conexion.php'); $result=$dbh->query($est); //echo $result; while($result->fetchInto($row)) { $reg=$row[0]; $reg=strtolower($reg); $reg=ucwords($reg); $cuer=$row[1]; $cuer=strtolower($cuer); $cuer=ucwords($cuer); $this->Cell(38); $this->Cell(30,4,'Campo: '.$reg,0,0,'C',1); $this->Cell(0.5,4); $this->Cell(30,4,'Campo: '.$cuer,0,0,'C',1); $this->Cell(0.5,4); $this->Cell(30,4,'Campo: '.$row[2],0,0,'C',1); $this->Cell(0.5,4); $this->Cell(30,4,'Campo: '.$row[3],0,0,'C',1); $this->ln(5); } $this->Cell(85); $this->ln(5); } }//fin clase $pdf=new PDF_AutoPrint(); $pdf->constructor($HTTP_GET_VARS["folio"]); $pdf->Open(); $pdf->SetFont('Arial','',7); $pdf->SetFillColor(230); $pdf->AddPage(); $pdf->Cell(40,4,'Hola Mundo',0,0,'C',1); $dbh->disconnect(); $pdf->Output(); ?> |