'; var_dump($v); echo ''; if ($die == true) die(); } function objectToArray($d) { if (is_object($d)) { // Gets the properties of the given object // with get_object_vars function $d = get_object_vars($d); } if (is_array($d)) { /* * Return array converted to object * Using __FUNCTION__ (Magic constant) * for recursive call */ return array_map(__FUNCTION__, $d); } else { // Return array return $d; } } global $app_list_strings; $res=$db->query($query); $data=array(); while($dane=$db->fetchByAssoc($res)){ $p = new EcmProduct(); $p->retrieve($dane['product_id']); $dane['jm']=strtoupper($app_list_strings['ecmproducts_unit_dom'][$p->unit_id]); $data[]=$dane; } $si= new EcmSysInfo(); $smarty = new Sugar_Smarty (); $smarty->assign("data",$data); $content= $smarty->fetch("modules/Home/tpl/StanyPDF.tpl"); include_once ("include/MPDF57/mpdf.php"); $mPDF = new mPDF ( 'pl', 'A4', 9, 'arial', 10, 10,35, 20, 14, 20); $mPDF->setAutoTopMargi = 'stretch'; $mPDF->setAutoBottomMargin = 'stretch'; $mPDF->SetHTMLHeader('
ARKUSZE SPISU Z NATURY
'.$si->getName().'
ARKUSZ NR: {PAGENO}
'); $mPDF->SetHTMLFooter("

podpisy członków komisji inwentaryzacyjnej

"); $mPDF->WriteHTML($content); $mPDF->Output('inwentaryzacja.pdf', "I"); ?>