<?php
ob_start();
@session_name(str_replace(" ", "", "pae29072015"));
@session_cache_limiter("none");
@session_start();
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>FILIPETA NOVA</title>
		<meta http-equiv="Content-Type"	content="text/html; charset=utf-8" >
   <meta charset="utf-8">
	
<link rel="stylesheet" href="alertify/themes/alertify.core.css" />
<!-- include a theme, can be included into the core instead of 2 separate files -->
<link rel="stylesheet" href="alertify/themes/alertify.default.css" />

	<script src="alertify/lib/alertify.min.js"></script>
    
    <script>
	alertify.alert("Message");
	</script>
	</head>
	<body>
 .

    <?php
	function anti_injection($sql){
   $sql = preg_replace("/( from |select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/", "" ,$sql);
   $sql = trim($sql);
   $sql = strip_tags($sql);
   $sql = (get_magic_quotes_gpc()) ? $sql : addslashes($sql);
   return $sql;
}
	
	
 





$html = '<div style="position:absolute;right:1080px;top:255px;">TESTE</div>';





//==============================================================
//==============================================================
//==============================================================


//==============================================================
//==============================================================
//==============================================================


include("../../mpdf/mpdf.php");

$mpdf=new mPDF('c','A4','','',42,15,67,67,20,15); 

$mpdf->SetDisplayMode('fullpage');

$mpdf->mirrorMargins = 1;

$longfooter = '
<table width="100%" style=" vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%">   <img src="qr/php/qr_img.php?e=H&s=3&d=www.educafro.org.br/cdigital/index.php?q=1222" />  
</td>
<td width="33%" align="center">
<td width="33%" style="text-align: right;"></td>
</tr></table>
';


$shortheader = '

<table width="100%" style="vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="20%" style="text-align: right;">


<td width="43%"><span style="font-size:45pt;"> </span></td>
<td width="37%">

<center><barcode  size="1" height="1.75" code="1233" type="EAN128A" />
<span style="font-size:14pt; "><br>Código : 1233 </span><br><span style="font-size:12pt; ">Para verificar a autenticidade do documento basta acessar www.educafro.org.br/cdigital e inserir o código acima</span></center>
</td>




</tr></table>


';





$mpdf->setHeader();	// Clear headers before adding page
$mpdf->AddPage('L','','','','',30,10,55,45,8,25);

$mpdf->SetHTMLHeader($shortheader,'',true);	// New parameter in v1.4 to add the header to the new page

$mpdf->SetHTMLFooter($longfooter);


$mpdf->WriteHTML($stylesheet,1);	// The parameter 1 tells that this is css/style only and no body/html/text







$mpdf->SetWatermarkImage('logoedu.png', 1, 'P', array(50,1));
$mpdf->showWatermarkImage = true;

$mpdf->watermarkImageAlpha = 0.1;
$mpdf->WriteHTML($html);


//$content = $mpdf->Output('', 'S');




$mpdf->Output('certificado.pdf','I');
exit;
//==============================================================
//==============================================================
//==============================================================




?>

</body>
</html>