Initial commit
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
<?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','Raport chwilowy pracy systemu odwodnienia wgłębnego na dzień: '.$_SESSION['rep007Array'][0]['date']);
|
||||
$this->Cell(0,4,$title,0,0,'L');
|
||||
$this->Ln();
|
||||
}
|
||||
|
||||
|
||||
$this -> SetFont('calibri', '', 6);
|
||||
$this->Cell(5,5,iconv('utf-8','windows-1250','Lp.'),1,0,'C');
|
||||
$this->Cell(15,5,iconv('utf-8','windows-1250','Studnia'),1,0,'C');
|
||||
$this->Cell(30,5,iconv('utf-8','windows-1250','Agregat pompowy'),1,0,'C');
|
||||
$this->Cell(15,5,iconv('utf-8','windows-1250','Moc Pe [kW]'),1,0,'C');
|
||||
$this->Cell(15,5,iconv('utf-8','windows-1250','Czas pracy [h]'),1,0,'C');
|
||||
$this->Cell(30,5,iconv('utf-8','windows-1250','Jedn. zuż. ener. [Wh/m3/m]'),1,0,'C');
|
||||
$this->Cell(10,5,iconv('utf-8','windows-1250','HST0 [m]'),1,0,'C');
|
||||
$this->Cell(10,5,iconv('utf-8','windows-1250','HD [m]'),1,0,'C');
|
||||
$this->Cell(15,5,iconv('utf-8','windows-1250','Q [m3/min]'),1,0,'C');
|
||||
$this->Cell(10,5,iconv('utf-8','windows-1250','p1 [m]'),1,0,'C');
|
||||
$this->Cell(10,5,iconv('utf-8','windows-1250','p2 [m]'),1,0,'C');
|
||||
$this->Cell(15,5,iconv('utf-8','windows-1250','Temp. wody [oC]'),1,0,'C');
|
||||
$this->Cell(10,5,iconv('utf-8','windows-1250','Cl [mg/l]'),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);
|
||||
$bariera = "";
|
||||
$pdf -> SetFont('calibri', '', 5);
|
||||
|
||||
for ($i=0; $i<count($_SESSION['rep007Array']); $i++)
|
||||
{
|
||||
|
||||
if ($bariera!=$_SESSION['rep007Array'][$i]['bariera'])
|
||||
{
|
||||
$pdf -> SetFont('Calibri_b', '', 6);
|
||||
$pdf->Cell(0,5,iconv('utf-8','windows-1250','Bariera '.$_SESSION['rep007Array'][$i]['bariera']),1,0,'L');
|
||||
$pdf->Ln();
|
||||
$bariera=$_SESSION['rep007Array'][$i]['bariera'];
|
||||
$pdf -> SetFont('calibri', '', 5);
|
||||
}
|
||||
|
||||
$pdf->Cell(5,4,iconv('utf-8','windows-1250',$i+1),1,0,'R');
|
||||
$pdf->Cell(15,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['well']),1,0,'C');
|
||||
$pdf->Cell(30,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['agregat']),1,0,'C');
|
||||
$pdf->Cell(15,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['moc']),1,0,'R');
|
||||
$pdf->Cell(15,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['czas']),1,0,'R');
|
||||
$pdf->Cell(30,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['jzu']),1,0,'R');
|
||||
$pdf->Cell(10,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['hst']),1,0,'R');
|
||||
$pdf->Cell(10,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['hd']),1,0,'R');
|
||||
$pdf->Cell(15,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['q']),1,0,'R');
|
||||
$pdf->Cell(10,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['p1']),1,0,'R');
|
||||
$pdf->Cell(10,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['p2']),1,0,'R');
|
||||
$pdf->Cell(15,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['temp']),1,0,'R');
|
||||
$pdf->Cell(10,4,iconv('utf-8','windows-1250',$_SESSION['rep007Array'][$i]['clor']),1,0,'R');
|
||||
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
}
|
||||
|
||||
$pdf->Output();
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user