Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailem fpdf cestina

kouknul jsem se do databaze jak je to k tomu radku nastavene...

zde je zdrojek:


<?php
require('fpdf/fpdf.php');


class PDF extends FPDF
{

// Better table
function ImprovedTable($header)
{
// Column widths
$w = array(10, 15, 30, 20, 20, 20, 15, 15, 40, 10);
// Header
for($i=0;$i<count($header);$i++)
$this->Cell($w[$i],7,$header[$i],1,0,'C');
$this->Ln();
// Data

$dbc=mysqli_connect('localhost','xxx','xxx','xxx') ;
//mysql_query("SET character_set_results=CP1250");

$text = iconv('utf-8', 'iso-8859-2','sěščřžýáíéůú ĚŠČŘŽÝÁÍÉŮÚ');
$query_pdf = "SELECT * FROM centr_vchody";

$pdf_result = mysqli_query($dbc,$query_pdf) or die(mysql_error());

while($row = mysqli_fetch_array($pdf_result))
{



$this->Cell($w[0],6,iconv('utf-8', 'iso-8859-2', ''.$row['ulice'].''),'1');
$this->Cell($w[1],6,$text,'1');
$this->Cell($w[2],6,number_format($row[2]),'1',0,' R');
$this->Cell($w[3],6,number_format($row[3]),'1',0,' R');
$this->Cell($w[4],6,number_format($row[3]),'1',0,' R');
$this->Cell($w[5],6,number_format($row[3]),'1',0,' R');
$this->Cell($w[6],6,number_format($row[3]),'1',0,' R');
$this->Cell($w[7],6,number_format($row[3]),'1',0,' R');
$this->Cell($w[8],6,number_format($row[3]),'1',0,' R');
$this->Cell($w[9],6,number_format($row[3]),'1',0,' R');
$this->Ln();
}
// Closing line
$this->Cell(array_sum($w),0,'','T');
}


}

$pdf = new PDF();
// Column headings
$header = array('Byt', 'Patro', iconv('utf-8', 'iso-8859-2','Služba'), 'Telefon', 'Obj. ', 'Konk.', iconv('utf-8', 'iso-8859-2','Služba'), 'Cena', iconv('utf-8', 'iso-8859-2','Poznámky'), 'Kont');

// Data loading
define('FPDF_FONTPATH','../vchody/fpdf/font/');
$pdf->AddFont('muj_font', '', 'arial.php');
$pdf->SetFont('muj_font','',8);

$pdf->AddPage();
$pdf->ImprovedTable($header);
$pdf->AddPage();
$pdf->Output();
?>

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny