// return $hours; return sprintf("%d:%02.0f", $hours, $minutes); } switch ($mode) { case 'pdf': /** Report Prep **/ $colPdf = explode(',', $cols2e); $title = $_SESSION['lang']['pabrik'] . " " . $kodeorg; $length = explode(",", "10,10,10,10,10,10,10,10"); $colPdf[6] = "CPO (Kg)"; $colPdf[7] = "Kernel (Kg)"; $pdf = new zPdfMaster('L', 'pt', 'A4'); $pdf->setAttr1($title, $align, $length, $colPdf); $width = $pdf->w - $pdf->lMargin - $pdf->rMargin; $height = 12; $pdf->AddPage(); $pdf->SetFillColor(255, 255, 255); $pdf->SetFont('Arial', '', 9); # Content $pdf->SetFont('Arial', '', 9); $j = 0; foreach ($data as $key => $row) { $i = 0; $j += 1; // nomor baris $pdf->Cell($length[$i] / 100 * $width, $height, $j, 1, 0, $align[$i], 1); foreach ($row as $head => $cont) { if ($i == 0) { // tanggal $tanggal = $cont; $qwe = date('D', strtotime($tanggal));