// GNU General Public License for more details:                          //
//                                                                       //
//          http://www.gnu.org/copyleft/gpl.html                         //
//                                                                       //
///////////////////////////////////////////////////////////////////////////
require '../../../functions/globales.php';
require '../include/rutas.php';
require '../functions/main.php';
require '../struct/login2.php';
require '../functions/doc_functions.php';
if ($_POST['pdf']) {
    require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
    $p = new PDFTable('P');
    $p->SetMargins(3, 43, 0);
    $p->SetTitle(date("d-m-Y") . "_revision_direccion");
    $p->SetFillColor(255, 255, 255);
    $p->SetTextColor(0, 0, 0);
    $p->SetDrawColor(0, 0, 0);
    $doc_real = select_normal("Select * from kz_tec_doc_documentos_reales where id = " . $_POST['documento_real'] . "");
    $doc_real = $doc_real[0];
    $p->AddPage('P');
    $p->SetMargins(10, 10, 0);
    $p->setfont('Arial', 'B', 12);
    $color1 = 'A6A6A6';
    $color2 = 'FFFFFF';
    $tit = "bgcolor=#{$color1} color=#{$color2} align=center valign=middle style=bold height=8";
    $nor = "align=center height=5 valign=middle";
    $p->cell(0, 0, $doc_real['titulo'], 0, 0, 'C');
    $p->ln(15);
    $p->setfont('Arial', '', 10);
    $p->MultiCell(188, 5, $doc_real['contenido'], 0, 'J');
require '../struct/login2.php';
require '../functions/rrhh_functions.php';
$titulo = "Informe de perfiles";
$perfiles = select_normal("Select * from kz_tec_rrhh_perfilespuestos");
require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
$p = new PDFTable('P');
$p->SetMargins(3, 43, 0);
if ($perfiles) {
    $table = "<table border=1>\n\t\t<tr>\n\t\t\t<th>Nombre</th>\n\t\t\t<th>Funciones</th>\n\t\t\t<th>Formacion</th>\n\t\t\t<th></th>\n\t\t\t<th>Experiencia</th>\n\t\t\t<th>" . html_entity_decode("Caracter&iacute;sticas") . "</th> \n\t\t\t<th></th>\n\t\t</tr>";
    foreach ($perfiles as $key => $valor) {
        $p->AddPage('P');
        $p->SetMargins(3, 10, 0);
        $p->titulo(5, $titulo);
        $p->setfont('Arial', '', 8);
        $p->SetTitle(date("d-m-Y") . "_informe");
        $p->SetFillColor(166, 166, 166);
        $p->SetTextColor(255, 255, 255);
        $p->SetDrawColor(0, 0, 0);
        $p->Cell(204, 10, "PERFILES DE PUESTO", 1, 1, "C", true);
        $p->Ln(5);
        $p->SetFillColor(255, 255, 255);
        $p->SetTextColor(175, 175, 175);
        $p->Cell(180, 10, "" . html_entity_decode("Denominaci&oacute;n del puesto") . "", 0, 1, "LB");
        $p->SetTextColor(0, 0, 0);
        $p->SetFontSize(15);
        $p->Cell(180, 5, $valor['nombre'], 0, 1, "L");
        $p->Ln(8);
        $p->SetFontSize(10);
        $p->SetTextColor(175, 175, 175);
        $p->Cell(80, 10, "Funciones", 0, 1);
        $p->SetTextColor(0, 0, 0);