Initial commit
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
<?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','Studnie w postoju z agregatami pompowymi na dzień: '.$_SESSION['rep005_array'][0]['data']);
|
||||
$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(17,5,iconv('utf-8','windows-1250','Typ pompy'),1,0,'C');
|
||||
$this->Cell(20,5,iconv('utf-8','windows-1250','Numer pompy'),1,0,'C');
|
||||
$this->Cell(17,5,iconv('utf-8','windows-1250','Typ silnika'),1,0,'C');
|
||||
$this->Cell(20,5,iconv('utf-8','windows-1250','Numer silnika'),1,0,'C');
|
||||
$this->Cell(25,5,iconv('utf-8','windows-1250','Postój od'),1,0,'C');
|
||||
$this->Cell(25,5,iconv('utf-8','windows-1250','Postój do'),1,0,'C');
|
||||
$this->Cell(46,5,iconv('utf-8','windows-1250','Powód wyłączenia'),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['rep005_array']); $i++)
|
||||
{
|
||||
|
||||
if ($bariera!=$_SESSION['rep005_array'][$i]['bariera'])
|
||||
{
|
||||
$pdf -> SetFont('Calibri_b', '', 6);
|
||||
$pdf->Cell(0,5,iconv('utf-8','windows-1250','Bariera '.$_SESSION['rep005_array'][$i]['bariera']),1,0,'L');
|
||||
$pdf->Ln();
|
||||
$bariera=$_SESSION['rep005_array'][$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['rep005_array'][$i]['studnia']),1,0,'R');
|
||||
$pdf->Cell(17,4,iconv('utf-8','windows-1250',$_SESSION['rep005_array'][$i]['pompa']),1,0,'R');
|
||||
$pdf->Cell(20,4,iconv('utf-8','windows-1250',$_SESSION['rep005_array'][$i]['pompa_no']),1,0,'R');
|
||||
$pdf->Cell(17,4,iconv('utf-8','windows-1250',$_SESSION['rep005_array'][$i]['silnik']),1,0,'R');
|
||||
$pdf->Cell(20,4,iconv('utf-8','windows-1250',$_SESSION['rep005_array'][$i]['silnik_no']),1,0,'R');
|
||||
$pdf->Cell(25,4,iconv('utf-8','windows-1250',$_SESSION['rep005_array'][$i]['data_od']),1,0,'C');
|
||||
$pdf->Cell(25,4,iconv('utf-8','windows-1250',$_SESSION['rep005_array'][$i]['data_do']),1,0,'C');
|
||||
$pdf->Cell(46,4,iconv('utf-8','windows-1250',$_SESSION['rep005_array'][$i]['powod']),1,0,'L');
|
||||
$pdf->Ln();
|
||||
|
||||
}
|
||||
|
||||
$pdf->Output();
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user