Rabu, 09 Oktober 2013

PHP Indonesia - Facebook: teman teman saya ingin bertanya bagaimana caranya ...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Compare Hotels

Find great prices for amazing hotels wherever your next destination may be. It's simple to search 100+ sites at once!
From our sponsors
teman teman saya ingin bertanya bagaimana caranya ...
Oct 10th 2013, 05:05, by Athung Hidayat

Athung Hidayat 5:05am Oct 10
teman teman saya ingin bertanya bagaimana caranya supaya tulisan BELAJAR PROGRAM MENCETAK DI PHP
SAYA INI MASIH BELAJAR PHP menjadi tengah dan tulisan TANGERANG ,
ANGKASA PURA 2 menjadi pindah kesebelah kanan
mohon bantuannya terima kasih

Cahya Dsn 5:08am Oct 10
gak ada scriptnya?

no script hoax.. ^_^V

Rabbani Fauzan 5:18am Oct 10
itu pake class apa gan?

Izey Linuxer 5:19am Oct 10
script nya aja ga ada

Irham Ramadhan 5:19am Oct 10
kaya'a pake fpdf ini ya gan??

Jonatan Yeremia 5:25am Oct 10
kalau pake fpdf
$this->Cell(xx,yy,BELAJAR PROGRAM MENCETAK DI PHP',0,0,'C');

Athung Hidayat 5:25am Oct 10
ini scriptnya teman teman : <?php
require('/fpdf/fpdf.php');
$start=0;
$xpdf=new FPDF();
$xpdf->AddPage();
$xpdf->SetFont('Arial','B',16);
$xpdf->SetFillColor(55,174,200);
$host = "localhost"; $user = "root"; $pass = ""; $db = "posko_lebaran";
$koneksi = mysql_connect($host,$user,$pass) or die("Koneksi error : ".mysql_error());
mysql_select_db($db,$koneksi) or die ("Database tidak ditemukan : ".mysql_error());

$xpdf->text(10,30,'BELAJAR PROGRAM MENCETAK DI PHP','center');
$xpdf->text(10,36,'SAYA INI MASIH BELAJAR PHP');
$row=40;
$yi = 40;
$ya = 70;
$xpdf->setFont('Arial','',9);
$xpdf->setFillColor(222,222,222);
$xpdf->setXY(2,$ya);
$xpdf->CELL(22,6,'FLIGTH NO',1,0,'C',1);
$xpdf->CELL(20,6,'FIS NO',1,0,'C',1);
$xpdf->CELL(18,6,'NO REG',1,0,'C',1);
$xpdf->CELL(15,6,'TYPE',1,0,'C',1);
$xpdf->CELL(15,6,'LEG',1,0,'C',1);
$xpdf->CELL(15,6,'STATUS',1,0,'C',1);
$xpdf->CELL(18,6,'TERMINAL',1,0,'C',1);
$xpdf->CELL(18,6,'TANGGAL',1,0,'C',1);
$xpdf->CELL(15,6,'ACTUAL',1,0,'C',1);
$xpdf->CELL(22,6,'DESTINATION',1,0,'C',1);
$xpdf->CELL(15,6,'PAX',1,0,'C',1);
$ya = $yi + $row;

$sql = mysql_query("select *from db_ats order by fis_number") or die(mysql_error());
$i = 1;
$no = 1;
$max = 31;
$row = 6;
while($data = mysql_fetch_array($sql)){

$xpdf->setXY(2,$ya);
$xpdf->setFont('arial','',9);
$xpdf->setFillColor(255,255,255);
$xpdf->cell(22,6,$data['fligth_number'],1,0,'L',1);
$xpdf->cell(20,6,$data['fis_number'],1,0,'L',1);
$xpdf->CELL(18,6,$data['no_reg'],1,0,'C',1);
$xpdf->CELL(15,6,$data['type'],1,0,'C',1);
$xpdf->CELL(15,6,$data['leg'],1,0,'C',1);
$xpdf->CELL(15,6,$data['status'],1,0,'C',1);
$xpdf->CELL(18,6,$data['terminal'],1,0,'C',1);
$xpdf->CELL(18,6,$data['tanggal'],1,0,'C',1);
$xpdf->CELL(15,6,$data['actual'],1,0,'C',1);
$xpdf->CELL(22,6,$data['destination'],1,0,'C',1);
$xpdf->CELL(15,6,$data['pax'],1,0,'C',1);
$ya = $ya+$row;
$no++;
$i++;

}
$xpdf->text(100,$ya+6,"TANGERANG , ");
$xpdf->text(100,$ya+18,"ANGKASA PURA 2 ");

$xpdf->output();

?>

Rabbani Fauzan 5:25am Oct 10
pake aja dompdf gan terus buat designya pake css :v

Jonatan Yeremia 5:27am Oct 10
sobat, untuk header buat class tersendiri
saya pernah buat laporan pdf seperti itu juga

Jonatan Yeremia 5:27am Oct 10
/ Untuk header dan footer
class PDF extends FPDF{
function Header(){
$this->Image('../../images/logo_cetak.jpg',10,8,15);
$this->SetTextColor(128,0,0);
$this->SetFont('Arial','B','12');
$this->Cell(320,10,'TEKS 1',0,0,'C');
$this->Ln();
$this->Cell(320,10,'TEKS 2',0,0,'C');
$this->Ln(15);
}
function Footer(){
$this->SetY(-20,50);
$this->Cell(0,10,$this->PageNo(),0,0,'C');
}
}

//tambahka ini setelah require('/fpdf/fpdf.php');
//tes dulu ya
// mudah2xan berhasil
//angka 320 itu untuk mengatur kiri-kanan (alignment)
//angka 10 itu untuk mengatur atas-bawah (valignment)

Izey Linuxer 5:29am Oct 10
$xpdf->text(10,36,'<center>SAYA INI MASIH BELAJAR PHP'</center>);

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar