17 lines
617 B
PHP
Executable File
17 lines
617 B
PHP
Executable File
<?php
|
|
include_once ("include/MPDF57/mpdf.php");
|
|
$smarty = new Sugar_Smarty ();
|
|
$content = $smarty->fetch('modules/EcmReports/tpls/pdf_content_header.tpl');
|
|
$content .= 'test<table id="myTable" class="tablesorter">' .$_REQUEST['dataTable'] . '</table>';
|
|
$content .= $smarty->fetch('modules/EcmReports/tpls/pdf_content_footer.tpl');
|
|
$mpdf = new mPDF ( '', 'A4', null, 'helvetica', 10, 10, 10, 10, 5, 5 );
|
|
$mpdf->mirrorMargins = 1;
|
|
|
|
$mpdf->WriteHTML($content);
|
|
|
|
$dir = 'upload/' . $current_user->id . '/';
|
|
if(!is_dir($dir)){
|
|
mkdir($dir, '755', true);
|
|
}
|
|
$mpdf->Output ($dir.'Raport.pdf', 'F');
|
|
print $dir.'Raport.pdf'; |