<?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();

$leyenda=$arr1['leyenda'];


$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>Constancia</title> 

</head>

<body background='../../../../fotografias/escudo_constancia.jpg' style='background:center;background-repeat:no-repeat;background-attachment:fixed'>";


$html.="<table align='center'>
<tr>

<td>
<img height='100' width='100' src='../../../../fotografias/escudo.jpg'/>&nbsp;&nbsp;&nbsp;
</td>

<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

<td style='font-size:14px' align='center'>
    <b>REPUBLICA DE COLOMBIA</b><br>
    <b>   DEPARTAMENTO DEL CAQUET&Aacute;</b><br>
       <b>INSTITUCI&Oacute;N EDUCATIVA <br>NUESTRA SE&Ntilde;ORA DE LAS MERCEDES</b><br><br>
       Aprobaci&oacute;n de Estudios Resoluci&oacute;n No. 000519 de 02-11-2007<br>
       Paujil - Caquet&aacute;<br>
       
</td>

<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

<td>
<img height='120' width='110' src='../../../../fotografias/escudo_colombia.png'/>&nbsp;&nbsp;&nbsp;
</td>

</tr>
</table>"; 

  $registrar=$obj->consulta("select * from registrar");
  $reg=$obj->fetch_assoc($registrar);
  
  $obj->disconnect();

$html.="<table id='font'  width='90%'  align='center'>
<tr> <td style='font-size:12px'>Registro Educativo:".$reg['registroeducativo']."<br><td align='right' style='font-size:12px'>DANE:".$reg['codigodane']."<br> </td>

</tr>                                   
</table>"; 

$html.="<center><h4>LA SECRETARIA ACAD&Eacute;MICA DE LA <br>".$arr[0]."</h4>";
$html.="<br><br><br><h4>HACE CONSTAR:</h4></center>";

$html.="<br><table width='80%' align='center'><tr><td>&nbsp;</td></tr><tr><td style='font-size: 14px; text-align:justify;'>".($leyenda)."</td></tr></table>";

$html.="<br><br><table width='80%' align='center'><tr><td>&nbsp;</td></tr><tr><td style='font-size: 14px; text-align:justify;'>".('Se expide la presente certificación con destino a ').$arr1['destino']."</td></tr></table>";

$html.="<br><table width='80%' align='center'><tr><td>&nbsp;</td></tr><tr><td style='font-size: 14px; text-align:justify;'>".('Dada en ').$arr[5].' el '.date('d/m/Y').".</td></tr></table>";

$html.="<br><br><br><br><br>
        <table width='40%' border='0' align='center'><tr><td>&nbsp;</td></tr>
        <tr><td style='font-size: 13px; text-align:center;'><hr></td></tr>
        <tr><td style='font-size: 14px; text-align:center;'>".$row['secretario']."</td></tr>
        <tr><td style='font-size: 14px; text-align:center;'>C.C. 25.115.846 de Salamina - Caldas</td></tr>
        <tr><td style='font-size: 13px; text-align:center;'>Secretaria</td></tr>
        </table>";
        
/*        
$html.="<br><br><br><table width='100%' align='center'>";
$html.="<tr>";
$html.="<td style='font-size:10px; text-align:center;'>____________________________________________________________________________________________________________________</td>";
$html.="</tr><tr><td style='font-size:10px; text-align:center;'>Direcci&oacute;n: CRA. 14 No. 12-101 - FLORENCIA - CAQUET&Aacute;. Tel&eacute;fono : 4352382    Email: colcorazones@yahoo.es  Fax: 4352382</td>";
$html.="</tr></table>";
*/

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




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

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

?>
