<?php

include('pdf/fpdf.php');
session_cache_limiter('private');
session_start();
$com = "I";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
 
class PDF extends FPDF
{
	//Cabecera de Página
	function Header()
	{
	    //Logotipo
	    include("DYIM_VER.php");
	    //Arial Bold (14)
	    $this->SetFont('Arial','B',12);
	    //Espacio
		
	    //Título
	    $this->Cell(280,2,'PARAMETROS GENERALES',0,1,'C');
	    //Salto de línea
	    $this->Ln(3);
	    $this->SetFont('Arial','',7);
		$this->SetFillColor(192,192,192);
	    $this->Cell(18,5,'CLAVE FALTA',1,0,'C',1);
	    $this->Cell(24,5,'CLAVE DESCANSO',1,0,'C',1);
	    $this->Cell(26,5,'CLAVE DIA FESTIVO',1,0,'C',1);
	    $this->Cell(27,5,'CLAVE DIA RETARDO',1,0,'C',1);
	    $this->Cell(30,5,'DESCANSO TRABAJADO',1,0,'C',1);
	    $this->Cell(27,5,'FESTIVO TRABAJADO',1,0,'C',1);
	    $this->Cell(21,5,'CHECA / HUELLA',1,0,'C',1);
	    $this->Cell(23,5,'PRIMA DOMINICAL',1,0,'C',1);
	    $this->Cell(16,5,'ACTUALIZA',1,1,'C',1);
	}
	//Pie de Página
	function Footer()
	{
	    //Posición: 1,5 cm del Final
	    $this->SetY(-15);
	    //Arial Italic 8
	    $this->SetFont('Arial','I',8);
	    //Número de página
	    $this->Cell(0,0, $this->PageNo().'/{nb}',0,0,'C');
	}
}

if($_POST['bot']==""){
	
}else{
	
}
$sql = mysqli_query ($sql1); 
while ($reg = mysqli_fetch_row($sql)) { 
    $data[] = $reg[0]; 
	$data1[] = $reg[1];
	$data2[] = $reg[2];
	$data3[] = $reg[3];
	$data4[] = $reg[4];
	$data5[] = $reg[5];
	$data6[] = $reg[6];
	$data7[] = $reg[7];
	$data8[] = $reg[8];
	$data9[] = $reg[9];
	}
$num_elementos=count($data);

$pdf=new PDF('L','mm','A4');
$pdf->AddPage();
$pdf->AliasNbPages();
for($i=0;$i<=$num_elementos-1;$i++)
{
	$pdf->Cell(18,5,$data1[$i],1,0,'C');
	$pdf->Cell(24,5,$data2[$i],1,0,'C');
	$pdf->Cell(26,5,$data3[$i],1,0,'C');
	$pdf->Cell(27,5,$data4[$i],1,0,'C');
	$pdf->Cell(30,5,$data7[$i],1,0,'C');
	$pdf->Cell(27,5,$data8[$i],1,0,'C');
	$pdf->Cell(21,5,$data6[$i],1,0,'C');
	$pdf->Cell(23,5,$data9[$i],1,0,'C');
	$pdf->Cell(16,5,$data5[$i],1,1,'C');
} 
$pdf->Output();
?> 