Image('imagenes/hgo.jpg',23,4,25); $this->Image('imagenes/TBC.jpg',312,5,40); //Arial bold 15 $this->SetFont('Arial','B',11); //Movernos a la derecha //Título $this->SetXY(285,20); $this->Cell(285,20,'TIPO DE INVENTARIO: TRÁMITE ',0,1,'L'); $this->SetXY(285,23); $this->Cell(285,23,'FECHA DE EMISIÓN: ',0,1,''); $this->SetXY(328,23); //$this->Cell(328,23,$fecha,0,1,''); $this->Cell(328,23,$fecha1,0,1,''); $this->SetXY(257,26); $this->Cell(0,26,'HOJA '.$this->PageNo().' DE {nb}',0,0,'C'); $pagina=$this->PageNo(); $this->SetXY(285,29); $this->Cell(285,29,'CÓDIGO:',0,1,''); $this->SetXY(305,41); $this->MultiCell(45,3.49,$codigo,0,'','j'); $this->SetFillColor(200,200,200); $this->Rect(23,60,55,8.24,'FD'); $this->SetXY(33,43); $this->Cell(33,43,'UBICACIÓN FÍSICA',0,'C'); $this->SetFillColor(200,200,200); $this->Rect(78,60,55,8.24,'FD'); $this->SetXY(70,43); $this->Cell(70,43,'UBICACIÓN TOPOGRÁFICA',0,1,'C'); $this->SetFillColor(200,200,200); $this->Rect(133,60,67,8.24,'FD'); $this->SetXY(112,43); $this->Cell(115,43,'NO. EXPEDIENTE',0,1,'C'); $this->SetFillColor(200,200,200); $this->Rect(200,60,62,8.24,'FD'); $this->SetXY(154,43); $this->Cell(154,43,'DESCRIPCIÓN DEL EXPEDIENTE',0,1,'C'); $this->SetFillColor(200,200,200); $this->Rect(262,60,44,4,'FD'); $this->SetXY(190,41.5); $this->Cell(190,41.5,'FECHAS EXTREMAS',0,1,'C'); $this->SetFillColor(200,200,200); $this->Rect(262,64,22,4.24,'FD'); $this->SetXY(183,44); $this->Cell(183,44,'INICIO',0,1,'C'); $this->SetFillColor(200,200,200); $this->Rect(284,64,22,4.24,'FD'); $this->SetXY(196,44); $this->Cell(196,44,'FINAL',0,1,'C'); $this->SetFillColor(200,200,200); $this->Rect(305,60,49,8.24,'FD'); $this->SetXY(220,43); $this->Cell(220,43,'OBSERVACIONES',0,1,'C'); $this->SetFont('Arial','B',13); $this->SetXY(150,15); $this->Cell(18,15,'INVENTARIO DOCUMENTAL',0,1,'B'); $this->SetFont('Arial','B',11); $this->SetXY(23,20); $this->Cell(23,20,'FONDO:',0,1,''); $this->SetXY(23,23); $this->Cell(23,23,'UNIDAD ADMINISTRACIÓN:',0,1,'B'); $this->SetXY(23,26); $this->Cell(23,26,'UNIDAD GENERADORA:',0,1,'B'); $this->SetXY(23,29); $this->Cell(23,29,'NOMBRE DEL RESPONSABLE:',0,1,'B'); $this->SetXY(23,32); $this->Cell(23,32,'SECCIÓN:',0,1,'B'); $this->SetXY(23,35); $this->Cell(23,35,'SERIE:',0,1,'B'); $this->SetXY(23,38); $this->Cell(23,38,'SUBSERIE:',0,1,'B'); $this->SetFont('Arial','B',11); $this->SetXY(43,20); $this->Cell(43,20,'BACHILLERATO DEL ESTADO DE HIDALGO',0,1,'b'); $this->SetXY(80,23); $this->Cell(80,23,$direccion,0,1,''); $this->SetXY(72,26); $this->Cell(72,26,$nombarea,0,1,'B'); $this->SetXY(84,29); $this->Cell(84,29,$titular,0,1,'B'); $this->SetXY(45,32); $this->Cell(45,32,$concatnsecc,0,1,'B'); if($tipo!='SUB'){ $this->SetXY(37,50.5); $this->MultiCell(220,3.8, $concatn1,0,'1','J'); }else{ $this->SetXY(37,50.5); $this->MultiCell(220,3.8,$concatserser,0,'1','J'); $this->SetXY(44.5,55.1); $this->MultiCell(220,3.8, $concatn1,0,'1','J'); } //Salto de línea $this->Ln(0); } //Pie de página function Footer() { //BUSCA DATOS DE QUIEN FIRMA INVENTARIO EN TRÁMITE $area=$_POST['narea']; $fecha=date("d-m-Y"); pg_connect("dbname='inv_expedientes' port='5432' user='telerin' password='aplicaciones'") or die ("Error en la conexion"); $queryres="SELECT titular_area,nom_responsable FROM cat_area WHERE cve_area='$area'"; $datores=pg_query($queryres); $titulara=pg_fetch_result($datores,0); $responsable=pg_fetch_result($datores,1); $queryenlace="SELECT nom_responsable FROM cat_area WHERE cve_area='6'"; $datoenlace=pg_query($queryenlace); $nenlace=pg_fetch_result($datoenlace,0); $this->SetFont('Arial','B',11); $this->SetXY(5,260); $this->Line(15,200,90,200); $this->SetXY(15,180); $this->Cell(70,10,'ELABORÓ',2,1,'C'); $this->SetXY(35,197); $this->Cell(35,10,$responsable,2,1,'C'); $this->SetXY(35,201); $this->Cell(35,10,'UNIDAD DE ARCHIVO EN TRÁMITE',2,1,'C'); //$this->SetXY(207,260); $this->Line(230,200,150,200); $this->SetXY(150,180); $this->Cell(80,10,'AUTORIZÓ',0,0,'C'); $this->SetXY(127,197); $this->Cell(127,10,$nenlace,2,1,'C'); $this->SetXY(127,201); $this->Cell(127,10,'ENLACE NORMATIVO',2,1,'C'); $this->SetXY(200,260); $this->Line(270,200,354,200); $this->SetXY(280,180); $this->Cell(70,10,'VALIDÓ',0,0,'C'); $this->SetXY(193,197); $this->Cell(240,10,'ÓRGANO RECTOR',2,1,'C'); $this->SetXY(193,197); $this->Cell(240,10,'ÓRGANO RECTOR',2,1,'C'); } } //Creación del objeto de la clase heredada $pdf=new PDF('L','mm','Legal'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Arial','',11); $area=$_POST['narea']; $secc=$_POST['sseccion']; $serie=$_POST['serie']; $ano=$_POST['nano']; $anotr=$ano+1; $ubica='Circuito Ex-Hacienda la Concepción, Lte. 17, San Juan Tilcuautla, Mpio. de San Agustín Tlaxiaca'; pg_connect("dbname='inv_expedientes' port='5432' user='telerin' password='aplicaciones'") or die ("Error en la conexion"); $querybhomol="select homologa,at from cat_series1 where homologa='$serie' and cve_serie='12S.4' and cve_cat like'%$ano'"; $datohom=pg_query($querybhomol); $homologas=pg_fetch_result($datohom,0); IF ($homologas==137 ){ //PARA INVENTARIAR LA SERIE DE EXPEDIENTES DE ALUMNOS O DE PERSONAL $queryctot="select count(codigo) as sumtotal from datos_generales where cve_area='$area' and homologa=$homologas and cve_serie='$serie' and ano='2013'"; $datoctot=pg_query($queryctot); $sumtotal=pg_fetch_result($datoctot,0,0); $querybdts="select lugar1||' '||no_caja AS ubicatop,codigo,asunto,fecha_inicio,fecha_final,observacion,substring(fecha_inicio,7,4) as anoi,substring(fecha_final,7,4) as anof,ano,cve_serie,descripcion_ubic,domicilio from datos_generales,ubicacion where ANO>='2012' and ano<='2013' AND cve_area='$area' and cve_serie='12S.4' and ubicacion.cve_ubicacion=datos_generales.ubicacion order by ANO,codigo"; // echo"$querybdts"; $datoat=pg_query($querybdts); $filadat=pg_num_rows($datoat); if($filadat!=0){ //IF 1 for($i=0;$i< $filadat;$i++){ $cuent=$cuent+1; $hresta=$sumtotal-$cuent; $codigo=$codigo1; $ubicatp1=pg_fetch_result($datoat,$i,0); $codigor=pg_fetch_result($datoat,$i,1); $asunto=pg_fetch_result($datoat,$i,2); $fechai=pg_fetch_result($datoat,$i,3); $fechaf=pg_fetch_result($datoat,$i,4); $observac=pg_fetch_result($datoat,$i,5); $anoin=pg_fetch_result($datoat,$i,6); $anofi=pg_fetch_result($datoat,$i,7); $anoexp=pg_fetch_result($datoat,$i,8); $cveser=pg_fetch_result($datoat,$i,9); $desubicfisica=pg_fetch_result($datoat,$i,10); $domicilio=pg_fetch_result($datoat,$i,11); $anostramite=$anoac-$anoexp; $querytramite="select distinct(at) as archtramite from cat_series1 where cve_serie='$cveser'"; $datotramite=pg_query($querytramite); $anotramite=pg_fetch_result($datotramite,0); if($anostramite<=$anoexp){ //IF 2 $tot=$tot+1; } //FIN DE IF 2 $pdf->SetFont('Arial','',11); $pdf->SetXY(23,($c+2.74)*25); $pdf->MultiCell(55,3.49,$ubica,0,'L'); $pdf->Rect(23,($c+2.73)*25,55,25,''); $pdf->SetXY(78,($c+2.74)*25); $pdf->MultiCell(50,3.49,"$desubicfisica"." "."en"." "."la"." "."$ubicatp1",0,'J'); $pdf->Rect(78,($c+2.73)*25,55,25,''); $pdf->SetXY(133,($c+2.74)*25); $pdf->MultiCell(67,3.49,$codigor,0,'J'); $pdf->Rect(133,($c+2.73)*25,67,25,''); $pdf->SetXY(200,($c+2.74)*25); $pdf->MultiCell(60,3.49,$asunto,0,'J'); $pdf->Rect(200,($c+2.73)*25,62,25,''); if($fechai!=''){ //IF 3 $pdf->SetXY(262,($c+2.74)*25); $pdf->MultiCell(22,3.49,$fechai,0,'C'); $pdf->Rect(262,($c+2.73)*25,22,25,''); }else{ $pdf->SetXY(262,($c+2.74)*25); $pdf->MultiCell(22,3.49,$ano,0,'C'); $pdf->Rect(262,($c+2.73)*25,22,25,''); } // FIN DE IF 3 if($fechaf=='.' or $fechaf==null or $fechaf=='__/__/____'){ //IF 4 $pdf->SetXY(284,($c+2.74)*25); $pdf->MultiCell(21.5,3.49,$ano,0,'C'); $pdf->Rect(284,($c+2.73)*25,21,25,''); //$pdf->SetXY(284,($c+3.98)*17.3); }else{ $pdf->SetXY(284,($c+2.74)*25); $pdf->MultiCell(21.5,3.49,$fechaf,0,'C'); $pdf->Rect(284,($c+2.73)*25,21,25,''); } //FIN DE IF 4 $pdf->SetFont('Arial','',8); $pdf->SetXY(305,($c+2.74)*25); $pdf->MultiCell(50,3.49,$observac,0,'J'); $pdf->Rect(305,($c+2.73)*25,49,25,''); if($bar >=4){ //IF 5 $resto = $bar % 4; $resf=$bar-1; $indice++; } // FIN DE IF 5 $c++; IF($resto==0){ //IF 6 //if($hresta>=4){ // IF 7 if ($c>=4){ // IF 8 $c=0; $pdf->AddPage(); } // FIN DE IF 8 //} if($hresta==4){ if ($c>=3){ // IF 9 $c=0; $pdf->AddPage(); } // FIN DE IF 9 } }else{ if ($c>=3){// IF 10 $c=0; $pdf->AddPage(); }// FIN DE IF 10 }// FIN DE IF 6 } //FIN DE IF 1 } } $querybtot="select count(codigo) as total from tmp_inventario where cve_serie='12S.4'"; $datotot=pg_query($querybtot); $dtotal=pg_fetch_result($datotot,0,0); $pdf->SetFont('Arial','B',11); $pdf->SetFillColor(200,200,200); $pdf->Rect(78,($c+2.73)*25,67,10,'FD'); $pdf->SetXY(100,($c+2.7)*26); $pdf->MultiCell(40,3.49,'TOTAL',0,'','j'); $pdf->SetFillColor(200,200,200); $pdf->Rect(133,($c+2.73)*25,67,10,'FD'); $pdf->SetXY(160,($c+2.7)*26); $pdf->MultiCell(60,3.49,$dtotal,'','j'); $pdf->Output(); ?>