<?php

require_once 'bs_info.php';
require_once '../../../../app/model/bs_info_col.php';

require_once("../../../../dompdf/dompdf_config.inc.php");
require_once "../../../../dompdf/www/functions.inc.php";


$ob=new InfoCol();
$arr=$obj->proceso();
$row=$obj->proceso2();
$obj->disconnect();

$ob1=new Con1();
$arr1=$ob1->proceso();

$html="<html>
<head><meta http-equiv='expires' content='0'><meta http-equiv='Cache-Control' content='no-cache'><meta http-equiv='Pragma' CONTENT='no-cache'>
<title>Tipos de Faltas</title>

</head>

<body>";

$html.="<br><br><center><table width='90%' border='0' align='center'>";

$html.="<tr>";
$html.="<td align='right' rowspan='3'><img src='../../../../fotografias/".$arr[1]."' width='70' height='70'></td>";
$html.="<td style='font-size: 14px; text-align:center;'>".$arr[2]."</td></tr>";

$html.="<tr><td  style='font-size: 17px; text-align:center;'><b>".$arr[0]."</b></td></tr>";
$html.="<tr><td style='font-size: 14px; text-align:center;' >".$arr[5]."</td></tr>";

$html.="</table></center><br>";

$html.="<center><b>TIPOS DE FALTAS</b></center><br>";


   $cadena="select * from tipo_falta order by orden";

   $cadena=$obj->consulta($cadena);



    $s="<BR><table border='1' class='normal' cellspacing='0' align='center' id='font' >";
    $s.="</tr>";
    $s.="<tr ALIGN='CENTER' > <td><b>CODIGO</b></td> <td  width='200'><b>DESCRIPCI&Oacute;N</b></td> </tr>";

    $i=1;

    while($row = $obj->fetch_assoc($cadena)){

        $s.="<tr>";

        $s.="<td align='center' width='5' style='font-size: 12px'>".$row['codigo']."</td>";
        $s.="<td width='25%' style='font-size: 12px;'>&nbsp;". ($row['descripcion'])."</td>";
        $s.="</tr>";

        $i++;
    }

    $s.="</table>";


$obj->disconnect();

$html.=$s."</body></html>";


$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->set_paper('a4', 'portrait');
$dompdf->render();

$dompdf->stream("Tipos_faltas.pdf", array("Attachment" => false));

?>
