/*****************************CODIGO NUEVO***********************************************/
include '../funciones/extract.php';
include '../sitio/admi/config.php';
include '../funciones/funcionesphp.php';
if($acceso == false){
include '../../funciones/error.php';
}else{
/* $sql_tipousuario = 'SELECT t1.codigo, t1.descripcion as descripcion, t1.depende,
IF ((ISNULL(t1.depende)),"No depende de Nadie",t2.descripcion) AS relacion
FROM tipousuario t1 LEFT JOIN tipousuario t2 ON (t1.depende = t2.codigo)';
$resultado_tipousuario = mysql_db_query($bd,$sql_tipousuario,$conn);
*/
/*****************************FIN CODIGO NUEVO*******************************************/
$sql_normativa = 'SELECT codigo, titulo, cke_texto
FROM normativa
WHERE codigo = '.$codigo.' AND
eliminado = "N"';
//echo $bd;
$resultado_normativa = mysql_db_query($bd,$sql_normativa,$conn);
$fila_normativa = mysql_fetch_array($resultado_normativa);
//echo $fila_normativa[titulo];
$html = '
'.$fila_normativa[titulo].'
'.$fila_normativa[cke_texto].'
';
//$html = $_SESSION[html];
include("../mpdf/mpdf.php");
$mpdf=new mPDF('c','A4',0,0,15,15,40,16,9,8);
//$mpdf=new mPDF('c','A4');
/*
class mPDF ([ string $mode [, mixed $format [, float $default_font_size [, string $default_font [, float $margin_left , float $margin_right , float $margin_top , float $margin_bottom , float $margin_header , float $margin_footer [, string $orientation ]]]]]])
*/
//$mpdf=new mPDF('c','A4',0,0,15,15,$_SESSION[margen_top_pdf],16,9,8);
/*encabezado*/
//$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins
//$mpdf->defaultheaderfontsize = 10; /* in pts */
//$mpdf->defaultheaderfontstyle = B; /* blank, B, I, or BI */
//$mpdf->defaultheaderline = 10; /* 1 to include line below header/above footer */
$aux_encabezado_pdf = $_SESSION[encabezado_pdf];
$mpdf->SetHTMLHeader($aux_encabezado_pdf,'');
/*
$mpdf->SetHTMLFooter('
');
*/
/* fin de encabezado*/
$stylesheet = file_get_contents('../bootstrap/dist/css/bootstrap.min.css');
$stylesheet2 = file_get_contents('http://code.jquery.com/jquery.js');
$stylesheet3 = file_get_contents('../bootstrap/dist/js/bootstrap.min.js');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($stylesheet2,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($stylesheet3,1); // The parameter 1 tells that this is css/style only and no body/html/text
$html_esqueleto = '
Normativa
';
$html_esqueleto2 = '
';
$html = $html_esqueleto.$html.$html_esqueleto2;
$mpdf->WriteHTML(utf8_encode($html));
//$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
}
?>