<?php
require_once 'conection.ini.php';
$result = mysql_query("SELECT * FROM total WHERE id=".$_GET['id']);
$data = array();
$data = array_map('utf8_encode',mysql_fetch_assoc($result));
ob_start();
?>
<style type="text/css">
<!--
    table.page_header {width: 100%; border: none; background-color: #DDDDFF; border-bottom: solid 1mm #AAAADD; padding: 2mm }
    table.page_footer {width: 100%; border: none; background-color: #DDDDFF; border-top: solid 1mm #AAAADD; padding: 2mm}
    div.note {border: solid 1mm #DDDDDD;background-color: #EEEEEE; padding: 2mm; border-radius: 2mm; width: 100%; }
    ul.main { width: 95%; list-style-type: square; }
    ul.main li { padding-bottom: 2mm; }
    h1 { text-align: center; font-size: 20mm}
    h3 { text-align: center; font-size: 14mm}
	 .columna {vertical-align: text-top;}
-->
</style>
<page backtop="14mm" backbottom="14mm" backleft="10mm" backright="10mm" style="font-size: 12pt">
    <h3>Matriz de talento humano</h3>
    <br><br><br>
    <table cellspacing="20">
		 <tr>
			 <td class="columna"><strong>Fondo</strong></td>
			 <td><?=$data['fondo']?></td>
		 </tr>
		 <tr>
			 <td class="columna"><strong>Cooperante</strong></td>
			 <td><?=$data['cooperante']?></td>
		 </tr>
		 <tr>
			 <td class="columna"><strong>Temática</strong></td>
			 <td><?=$data['tematica']?></td>
		 </tr>
		 <tr>
			 <td class="columna"><strong>Detalle</strong></td>
			 <td><?=$data['detalle']?></td>
		 </tr>
		 <tr>
			 <td class="columna"><strong>Tipo de Apoyo</strong></td>
			 <td><?=$data['apoyo']?></td>
		 </tr>
		 <tr>
			 <td class="columna"><strong>Instituciones Elegibles</strong></td>
			 <td><?=$data['instituciones']?></td>
		 </tr>
		 <tr>
			 <td class="columna"><strong>Recursos Disponibles</strong></td>
			 <td><?=$data['recursos']?></td>
		 </tr>
		 <tr>
			 <td class="columna"><strong>Aspectos Adicionales</strong></td>
			 <td><?=$data['aspectos']?></td>
		 </tr>
		 <tr>
			 <td class="columna"><strong>Link</strong></td>
			 <td><?=$data['link']?></td>
		 </tr>
		 <tr>
			 <td class="columna"><strong>Contacto</strong></td>
			 <td><?=$data['contacto']?></td>
		 </tr>
		 <tr>
			 <td class="columna"><strong>Idioma</strong></td>
			 <td><?=$data['idioma']?></td>
		 </tr>
    </table>
</page>
<?php

$content = ob_get_clean();

require_once 'html2pdf.class.php';
try {
	$html2pdf = new HTML2PDF('P', 'A4', 'fr', true, 'UTF-8', 0);
	$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
	$html2pdf->Output('matriz de talento humano.pdf');
} catch (HTML2PDF_exception $e) {
	echo $e;
	exit;
}
