Initial commit
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
<?php session_start();
|
||||
|
||||
require_once('../fpdf/fpdf.php');
|
||||
|
||||
class PDF extends FPDF
|
||||
{
|
||||
// Page header
|
||||
function Header()
|
||||
{
|
||||
if ( $this->PageNo() == 1 )
|
||||
{
|
||||
$this->Image('../images/logo_head_pge.jpg',10,8,71);
|
||||
$this->Ln(15);
|
||||
|
||||
$this -> SetFont('Calibri_b', '', 11);
|
||||
$this->Cell(0,5,iconv('utf-8','windows-1250','Dział Odwodnienia'),0,1,'R');
|
||||
$this->Cell(0,4,iconv('utf-8','windows-1250','Oddział Odwodnienia '.str_replace('Dębina', 'P/Bełchatów - bariera ochronna Dębina', $_SESSION['syndis_eq_stock'])),0,1,'R');
|
||||
$this->Ln();
|
||||
|
||||
$this -> SetFont('Calibri_b', '', 11);
|
||||
$title = iconv('utf-8','windows-1250','Poziom zwierciadła wody w piezometrach - '.$_SESSION['rep006Array'][0]['typ']);
|
||||
$this->Cell(0,4,$title,0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
$this->SetFont('Calibri_i','',10);
|
||||
$title = iconv('utf-8','windows-1250','Data: '.$_SESSION['rep006Array'][0]['date']);
|
||||
$this->Cell(0,4,$title,0,0,'L');
|
||||
$this->Ln();
|
||||
}
|
||||
|
||||
|
||||
$this -> SetFont('calibri', '', 8);
|
||||
$this->Cell(10,5,iconv('utf-8','windows-1250','Lp'),1,0,'C');
|
||||
$this->Cell(20,5,iconv('utf-8','windows-1250','Bariera'),1,0,'C');
|
||||
$this->Cell(20,5,iconv('utf-8','windows-1250','Nazwa'),1,0,'C');
|
||||
$this->Cell(20,5,iconv('utf-8','windows-1250','Gł. rurki [m]'),1,0,'C');
|
||||
$this->Cell(30,5,iconv('utf-8','windows-1250','Rzędna aktualna [m npm]'),1,0,'C');
|
||||
$this->Cell(30,5,iconv('utf-8','windows-1250','Poziom wodonośny'),1,0,'C');
|
||||
$this->Cell(18,5,iconv('utf-8','windows-1250','HST [m]'),1,0,'C');
|
||||
$this->Cell(24,5,iconv('utf-8','windows-1250','Data pomiaru'),1,0,'C');
|
||||
$this->Cell(18,5,iconv('utf-8','windows-1250','Status'),1,0,'C');
|
||||
|
||||
$this->Ln();
|
||||
|
||||
}
|
||||
|
||||
// Page footer
|
||||
function Footer()
|
||||
{
|
||||
// Position at 1.5 cm from bottom
|
||||
$this->SetY(-15);
|
||||
// Arial italic 8
|
||||
$this->SetFont('Calibri_i','',6);
|
||||
// Page number
|
||||
$this->Cell(50,10,iconv('utf-8','windows-1250','© SoftSPM, '.date('Y')),0,0,'L');
|
||||
$this->Cell(90,10,'www.softspm.com',0,0,'C');
|
||||
$this->Cell(50,10,'Strona '.$this->PageNo().'/{nb}',0,0,'R');
|
||||
}
|
||||
}
|
||||
|
||||
// Instanciation of inherited class
|
||||
$pdf = new PDF();
|
||||
$pdf->AddFont('calibri','','calibri.php');
|
||||
$pdf->AddFont('Calibri_b','','Calibri_b.php');
|
||||
$pdf->AddFont('Calibri_i','','Calibri_i.php');
|
||||
|
||||
$pdf->AliasNbPages();
|
||||
$pdf->AddPage(); //190
|
||||
//$pdf->AddPage('L'); //277
|
||||
|
||||
$pdf->SetLineWidth(.1);
|
||||
|
||||
|
||||
|
||||
for($i=0;$i<count($_SESSION['rep006Array']);$i++)
|
||||
{
|
||||
$pdf -> SetFont('calibri', '', 7);
|
||||
$pdf->Cell(10,4,iconv('utf-8','windows-1250',($i+1)),1,0,'R');
|
||||
$pdf->Cell(20,4,iconv('utf-8','windows-1250',$_SESSION['rep006Array'][$i]['bariera']),1,0,'C');
|
||||
$pdf->Cell(20,4,iconv('utf-8','windows-1250',$_SESSION['rep006Array'][$i]['piezometr']),1,0,'C');
|
||||
$pdf->Cell(20,4,iconv('utf-8','windows-1250',$_SESSION['rep006Array'][$i]['glebokosc']),1,0,'R');
|
||||
$pdf->Cell(30,4,iconv('utf-8','windows-1250',$_SESSION['rep006Array'][$i]['rzedna']),1,0,'R');
|
||||
$pdf->Cell(30,4,iconv('utf-8','windows-1250',$_SESSION['rep006Array'][$i]['poziom']),1,0,'C');
|
||||
$pdf->Cell(18,4,iconv('utf-8','windows-1250',$_SESSION['rep006Array'][$i]['hst']),1,0,'R');
|
||||
$pdf->Cell(24,4,iconv('utf-8','windows-1250',$_SESSION['rep006Array'][$i]['data']),1,0,'C');
|
||||
$pdf->Cell(18,4,iconv('utf-8','windows-1250',$_SESSION['rep006Array'][$i]['status']),1,0,'C');
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
|
||||
$pdf->Output();
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user