where=$_POST['where']; if(!$_POST['start'])$vc->limit="0,".$vc->pp; else $vc->limit=$_POST['start'].",".$vc->pp; if($_POST['order_by'])$vc->order_by=$_POST['order_by']; else $vc->order_by="purchaseorder.duedate"; if($_POST['sorder'])$vc->sorder=$_POST['sorder']; else $vc->sorder="desc"; $vc->getData(); $vc->getCount(); $data=$vc->data=$_SESSION['EcmProductReportsData']; foreach($_REQUEST['check'] as $che)if($che)$ile++; $pdf = new HTML2FPDF("L"); $j=0; $k=0; $m=0; for($i=0;$i'; $html.=''; $html.=''; $html.=''; $html.=''; $html.=''; //$html.=''; $html.=''; $html.=''; //$html.=''; $html.=''; $html.=''; $html.=''; } if(!$_REQUEST['check'][$i])continue; $id=$vc->getIdByCode($data[$i]['productcode']); $duedate=$data[$i]['duedate']; $exp=explode("-",$duedate); $dtime=date("Y-m-d",@mktime(0,0,0,$exp[1],$exp[2],$exp[0])+37*24*3600); $html.=''; $html.=''; $html.=''; $html.=''; //$html.=''; $html.=''; $html.=''; //$html.=''; $html.=''; $html.=''; $html.=''; $j++; $k++; $m++; if($j==17 || $ile==$k){ $st++; $html.='
ProductCodePurchase OrderStatusDue DateDelivery TimeList PriceQuantityTracking No
'.iconv("UTF-8","ISO-8859-2",$data[$i]['productname']).''.iconv("UTF-8","ISO-8859-2",$data[$i]['productcode']).''.iconv("UTF-8","ISO-8859-2",$data[$i]['subject']).''.iconv("UTF-8","ISO-8859-2",$data[$i]['postatus']).''.iconv("UTF-8","ISO-8859-2",$vc->timeDate($duedate)).''.iconv("UTF-8","ISO-8859-2",$vc->timeDate($dtime)).''.iconv("UTF-8","ISO-8859-2",$vc->formatNumber($data[$i]['listprice'])).''.iconv("UTF-8","ISO-8859-2",$data[$i]['quantity']).''.iconv("UTF-8","ISO-8859-2",$data[$i]['tracking_no']).'
'; $html.=''; $html.=''; $html.=''; $html.='
www.e5world.com'.$st.'/'.ceil($ile/17).'    
'; $ohtml=$html; $html=''; $pdf->AddPage(); $pdf->WriteHTML($ohtml); $j=0; } } $pdf->Output("ProductsReport.pdf", "D"); ?>