$pdf = new masterpdf('P', 'pt', 'A4'); $width = $pdf->w - $pdf->lMargin - $pdf->rMargin; $height = 12; $pdf->SetFont('Arial', '', 8); $pdf->AddPage(); # Generate Data #print_r($result); #exit; #foreach($result as $row) { # foreach($row as $data) { # $pdf->Cell($width/count($header),$height,$data,'',0,'L'); # } # $pdf->Ln(); #} foreach ($result as $data) { $pdf->Cell(60, $height, $data['noakun'], '', 0, 'L'); if ($_SESSION['language'] == 'EN') { $pdf->Cell(260, $height, $data['namaakun1'], '', 0, 'L'); } else { $pdf->Cell(260, $height, $data['namaakun'], '', 0, 'L'); } $pdf->Cell(40, $height, $data['tipeakun'], '', 0, 'C'); $pdf->Cell(40, $height, $data['level'], '', 0, 'C'); $pdf->Cell(60, $height, $data['matauang'], '', 0, 'C'); $pdf->Cell(40, $height, $data['pemilik'], '', 0, 'C'); if ($data['detail'] == 1) { $pdf->Cell(40, $height, 'Y', '', 0, 'C'); } $pdf->Ln(); } # Print Out
$this->SetFont('Arial','B',10); $this->Cell(14/100*$width,$height,$_SESSION['lang']['tanggal'],'',0,'L'); $this->Cell(2/100*$width,$height,':','',0,'L'); $this->Cell(1/100*$width,$height,$tgl,'',1,'L');*/ $this->Ln(20); } } #====================== Prepare PDF Setting $pdf = new masterpdf('P', 'pt', 'A4'); $width = $pdf->w - $pdf->lMargin - $pdf->rMargin; $height = 12; $pdf->SetFont('Arial', 'B', 8); $pdf->AddPage(); $awalXjudulno = $pdf->GetX(); $awalYjudulatas = $pdf->GetY(); $pdf->Cell(20, 1.5 * $height, 'No.', 'TBLR', 0, 'C'); $awalXkdbrg = $pdf->GetX(); $pdf->Cell(60, 1.5 * $height, $_SESSION['lang']['kodebarang'], 'TBLR', 0, 'L'); $awalXnmbrgjudul = $pdf->GetX(); $pdf->Cell(165, 1.5 * $height, $_SESSION['lang']['namabarang'], 'TBLR', 0, 'C'); $awalXjum = $pdf->GetX(); $pdf->Cell(35, 1.5 * $height, $_SESSION['lang']['jumlah'], 'TBLR', 0, 'L'); $awalXsat = $pdf->GetX(); $pdf->Cell(35, 1.5 * $height, $_SESSION['lang']['satuan'], 'TBLR', 0, 'C'); $awalXreq = $pdf->GetX(); $pdf->Cell(40, 1.5 * $height, 'Required', 'TBLR', 0, 'C'); $awalXket = $pdf->GetX(); $pdf->Cell(190, 1.5 * $height, $_SESSION['lang']['keterangan'], 'TBLR', 0, 'C'); $akhirXket = $pdf->GetX(); $pdf->Ln(); $awalYbanget = $pdf->GetY();
$this->Cell(80, 1.5 * $height, $_SESSION['lang']['beratjenis'], 'TBR', 0, 'C'); $this->Cell(80, 1.5 * $height, $_SESSION['lang']['varian'], 'TBR', 0, 'C'); $this->Ln(); } } #====================== Prepare PDF Setting $pdf = new masterpdf('P', 'pt', 'A4'); $width = $pdf->w - $pdf->lMargin - $pdf->rMargin; $height = 14; $pdf->SetFont('Arial', '', 8); $pdf->AddPage(); # Generate Data $str = "select * from " . $dbname . ".pabrik_5suhu where millcode = '" . $kodeorg . "'"; $result = fetchData($str); if (mysql_num_rows(mysql_query($str)) == 0) { $pdf->Cell(380, $height, $_SESSION['lang']['errdatanotexist'], 'BRL', 0, 'C'); } else { foreach ($result as $data) { $pdf->Cell(70, $height, $data['millcode'], 'BRL', 0, 'L'); $pdf->Cell(70, $height, $data['kodetangki'], 'BRL', 0, 'L'); $pdf->Cell(80, $height, $data['suhu'], 'BRL', 0, 'R'); $pdf->Cell(80, $height, $data['berat_jenis'], 'BRL', 0, 'R'); $pdf->Cell(80, $height, $data['varian'], 'BRL', 0, 'R'); $pdf->Ln(); } } # Print Out $pdf->Output(); break; default: break;
$this->Cell(80, 1.5 * $height, $_SESSION['lang']['volume'] . " (liter)", 'TBR', 0, 'C'); $this->Cell(80, 1.5 * $height, $_SESSION['lang']['beda'] . " (liter)", 'TBR', 0, 'C'); $this->Ln(); } } #====================== Prepare PDF Setting $pdf = new masterpdf('P', 'pt', 'A4'); $width = $pdf->w - $pdf->lMargin - $pdf->rMargin; $height = 14; $pdf->SetFont('Arial', '', 8); $pdf->AddPage(); # Generate Data $str = "select * from " . $dbname . ".pabrik_5tinggitangki where millcode = '" . $kodeorg . "'"; $result = fetchData($str); if (mysql_num_rows(mysql_query($str)) == 0) { $pdf->Cell(380, $height, $_SESSION['lang']['errdatanotexist'], 'BRL', 0, 'C'); } else { foreach ($result as $data) { $pdf->Cell(70, $height, $data['millcode'], 'BRL', 0, 'L'); $pdf->Cell(70, $height, $data['kodetangki'], 'BRL', 0, 'L'); $pdf->Cell(80, $height, $data['tinggi'], 'BRL', 0, 'R'); $pdf->Cell(80, $height, $data['volume'], 'BRL', 0, 'R'); $pdf->Cell(80, $height, $data['beda'], 'BRL', 0, 'R'); $pdf->Ln(); } } # Print Out $pdf->Output(); break; default: break;
$this->Cell(80, 1.5 * $height, $_SESSION['lang']['periode'], 'TBR', 0, 'C'); $this->Cell(80, 1.5 * $height, $_SESSION['lang']['suhu'], 'TBR', 0, 'C'); $this->Ln(); } } #====================== Prepare PDF Setting $pdf = new masterpdf('P', 'pt', 'A4'); $width = $pdf->w - $pdf->lMargin - $pdf->rMargin; $height = 14; $pdf->SetFont('Arial', '', 8); $pdf->AddPage(); # Generate Data $str = "select * from " . $dbname . ".pabrik_5standardsuhu_kalibrasi where millcode = '" . $kodeorg . "' and periode like '%" . $optPeriode . "%' order by millcode ASC, kodetangki ASC, periode DESC"; $result = fetchData($str); if (mysql_num_rows(mysql_query($str)) == 0) { $pdf->Cell(300, $height, $_SESSION['lang']['errdatanotexist'], 'BRL', 0, 'C'); } else { foreach ($result as $data) { $pdf->Cell(70, $height, $data['millcode'], 'BRL', 0, 'L'); $pdf->Cell(70, $height, $data['kodetangki'], 'BRL', 0, 'L'); $pdf->Cell(80, $height, $data['periode'], 'BRL', 0, 'L'); $pdf->Cell(80, $height, $data['suhu_kalibrasi'], 'BRL', 0, 'R'); $pdf->Ln(); } } # Print Out $pdf->Output(); break; default: break; }
$spr = "select * from " . $dbname . ".organisasi where kodeorganisasi='" . $kode_org . "' or induk='" . $kode_org . "'"; //echo $spr; $rep = mysql_query($spr) or die(mysql_error($conn)); $bas = mysql_fetch_assoc($rep); if ($data['close'] == '0') { $b = "Need Approval"; } elseif ($data['close'] == '1') { $b = "Waiting Approval"; } elseif ($data['close'] == '2') { if ($no < 6) { if ($data['hasilpersetujuan' . $no] == 1) { $b = 'Approved'; } elseif ($data['hasilpersetujuan' . $no] == 3) { $b = 'Rejected'; } elseif ($data['hasilpersetujuan' . $no] == 0) { $b = 'Waiting Approval'; } } //$b="Approved"; } $data['tanggal'] = tanggalnormal($data['tanggal']); $pdf->Cell(40, $height, $no, 'TBLR', 0, 'L'); $pdf->Cell(120, $height, $data['nopp'], 'TBLR', 0, 'L'); $pdf->Cell(60, $height, $data['tanggal'], 'TBLR', 0, 'C'); $pdf->Cell(150, $height, $bas['namaorganisasi'], 'TBLR', 0, 'L'); $pdf->Cell(80, $height, $b, 'TBLR', 0, 'L'); $pdf->Ln(); } } # Print Out $pdf->Output();
$this->Ln(); $this->Ln(); } } #====================== Prepare PDF Setting $pdf = new masterpdf('P', 'pt', 'A4'); $width = $pdf->w - $pdf->lMargin - $pdf->rMargin; $height = 12; $pdf->SetFont('Arial', '', 8); $pdf->AddPage(); # Generate Data #print_r($result); #exit; #foreach($result as $row) { # foreach($row as $data) { # $pdf->Cell($width/count($header),$height,$data,'',0,'L'); # } # $pdf->Ln(); #} foreach ($result as $data) { $pdf->Cell(60, $height, $data['kodeklp'], '', 0, 'L'); if ($_SESSION['language'] == 'EN') { $pdf->Cell(400, $height, $data['namakelompok1'], '', 0, 'L'); } else { $pdf->Cell(400, $height, $data['namakelompok'], '', 0, 'L'); } $pdf->Cell(80, $height, $data['noakun'], '', 0, 'L'); $pdf->Ln(); } # Print Out $pdf->Output();
# } $this->Cell(60, 1.5 * $height, $_SESSION['lang']['kode'], 'TBLR', 0, 'C'); $this->Cell(400, 1.5 * $height, $_SESSION['lang']['namabarang'], 'TBLR', 0, 'C'); $this->Cell(80, 1.5 * $height, $_SESSION['lang']['satuan'], 'TBLR', 0, 'C'); $this->Ln(); $this->Ln(); } } #====================== Prepare PDF Setting $pdf = new masterpdf('P', 'pt', 'A4'); $width = $pdf->w - $pdf->lMargin - $pdf->rMargin; $height = 12; $pdf->SetFont('Arial', '', 8); $pdf->AddPage(); # Generate Data #print_r($result); #exit; #foreach($result as $row) { # foreach($row as $data) { # $pdf->Cell($width/count($header),$height,$data,'',0,'L'); # } # $pdf->Ln(); #} foreach ($result as $data) { $pdf->Cell(60, $height, $data['kodebarang'], '', 0, 'L'); $pdf->Cell(400, $height, $data['namabarang'], '', 0, 'L'); $pdf->Cell(80, $height, $data['satuan'], '', 0, 'L'); $pdf->Ln(); } # Print Out $pdf->Output();
$pdf = new masterpdf('L', 'pt', 'A4'); $width = $pdf->w - $pdf->lMargin - $pdf->rMargin; $height = 12; $pdf->SetFont('Arial', '', 8); $pdf->AddPage(); # Generate Data #print_r($result); #exit; #foreach($result as $row) { # foreach($row as $data) { # $pdf->Cell($width/count($header),$height,$data,'',0,'L'); # } # $pdf->Ln(); #} foreach ($result as $data) { $pdf->Cell(70, $height, $data['kodeorg'], '', 0, 'C'); $pdf->Cell(60, $height, $data['tahuntanam'], '', 0, 'C'); $pdf->Cell(70, $height, number_format($data['luasareaproduktif'], 2), '', 0, 'R'); $pdf->Cell(70, $height, number_format($data['luasareanonproduktif'], 2), '', 0, 'R'); $totalarea = $data['luasareaproduktif'] + $data['luasareanonproduktif']; $pdf->Cell(80, $height, number_format($totalarea, 2), '', 0, 'R'); $pdf->Cell(60, $height, number_format($data['jumlahpokok'], 0), '', 0, 'R'); $pdf->Cell(60, $height, $data['statusblok'], '', 0, 'C'); $pdf->Cell(50, $height, $data['bulanmulaipanen'], '', 0, 'R'); $pdf->Cell(10, $height, '/', '', 0, 'R'); $pdf->Cell(50, $height, $data['tahunmulaipanen'], '', 0, 'L'); $pdf->Cell(50, $height, $data['jenisbibit'], '', 0, 'L'); $pdf->Cell(50, $height, $data['kodetanah'], '', 0, 'L'); $pdf->Cell(50, $height, $data['klasifikasitanah'], '', 0, 'L'); $pdf->Cell(50, $height, $data['topografi'], '', 0, 'L'); $pdf->Ln();
foreach ($result as $row) { //print"<pre>"; //print_r($row); //print"</pre>"; if ($row['karyawanid']) { $sDt = "select namakaryawan,karyawanid from " . $dbname . ".datakaryawan where karyawanid='" . $row['karyawanid'] . "'"; //echo "warning".$sDt;exit(); $qDt = mysql_query($sDt) or die(mysql_error()); $rDt = mysql_fetch_assoc($qDt); if ($rDt['karyawanid'] == $row['karyawanid']) { $data1 = $rDt['namakaryawan']; } } if ($row['karyawanid']) { $sDt = "select namakaryawan,karyawanid,lokasitugas from " . $dbname . ".datakaryawan where karyawanid='" . $row['karyawanid'] . "'"; //echo "warning".$sDt;exit(); $qDt = mysql_query($sDt) or die(mysql_error()); $rDt = mysql_fetch_assoc($qDt); if ($rDt['karyawanid'] == $row['karyawanid']) { $data1 = $rDt['namakaryawan'] . "[" . $rDt['lokasitugas'] . "]"; } } // foreach($row as $data) { $pdf->Cell($width / count($header), $height, $data1, '', 0, 'L'); $pdf->Cell($width / count($header), $height, $row['idkomponen'], '', 0, 'L'); $pdf->Cell($width / count($header), $height, $row['jumlah'], '', 0, 'L'); // } $pdf->Ln(); } # Print Out $pdf->Output();
$this->Ln(); } } #====================== Prepare PDF Setting $pdf = new masterpdf('P', 'pt', 'A4'); $width = $pdf->w - $pdf->lMargin - $pdf->rMargin; $height = 12; $pdf->SetFont('Arial', '', 8); $pdf->AddPage(); # Generate Data #print_r($result); #exit; #foreach($result as $row) { # foreach($row as $data) { # $pdf->Cell($width/count($header),$height,$data,'',0,'L'); # } # $pdf->Ln(); #} foreach ($result as $data) { $pdf->Cell(60, $height, $data['kodekegiatan'], '', 0, 'L'); if ($_SESSION['language'] == 'EN') { $pdf->Cell(320, $height, $data['namakegiatan1'], '', 0, 'L'); } else { $pdf->Cell(320, $height, $data['namakegiatan'], '', 0, 'L'); } $pdf->Cell(80, $height, $data['kelompok'], '', 0, 'C'); $pdf->Cell(80, $height, $data['noakun'], '', 0, 'L'); $pdf->Ln(); } # Print Out $pdf->Output();