Initial commit
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
<?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','Zrzut wody na odprowadzalniki na dzień: '.$_SESSION['rap003_array_date']);
|
||||
$this->Cell(0,4,$title,0,0,'L');
|
||||
$this->Ln();
|
||||
}
|
||||
|
||||
|
||||
$this -> SetFont('calibri', '', 6);
|
||||
//$this->Cell(40,5,iconv('utf-8','windows-1250','Grupa'),1,0,'C');
|
||||
$this->Cell(45,5,iconv('utf-8','windows-1250','Bariera'),1,0,'C');
|
||||
$this->Cell(45,5,iconv('utf-8','windows-1250','Studnia'),1,0,'C');
|
||||
$this->Cell(40,5,iconv('utf-8','windows-1250',''),1,0,'C');
|
||||
$this->Cell(30,5,iconv('utf-8','windows-1250','Zrzut [m3/min]'),1,0,'C');
|
||||
$this->Cell(30,5,iconv('utf-8','windows-1250','Zrzut [m3/h]'),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=1;$i<count($_SESSION['rap003_array']);$i++)
|
||||
{
|
||||
$pdf -> SetFont('calibri', '', 6);
|
||||
|
||||
if (iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_1'])== 'Grupa:')
|
||||
{
|
||||
$pdf -> SetFont('Calibri_b', '', 6);
|
||||
//$pdf->Cell(40,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_1']),1,0,'L');
|
||||
$pdf->Cell(90,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_2']),1,0,'L');
|
||||
$pdf->Cell(40,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_4'].' '.$_SESSION['rap003_array'][$i]['col_5']),1,0,'L');
|
||||
$pdf->Cell(30,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_6']),1,0,'L');
|
||||
$pdf->Cell(30,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_7']),1,0,'L');
|
||||
$pdf->Ln();
|
||||
}
|
||||
elseif (iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_1'])=='Razem grupa:')
|
||||
{
|
||||
$pdf -> SetFont('Calibri_b', '', 6);
|
||||
//$pdf->Cell(160,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_1']),1,0,'L');
|
||||
$pdf->Cell(160,4,iconv('utf-8','windows-1250','Łącznie'),1,0,'L');
|
||||
$pdf->Cell(30,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_6']),1,0,'R');
|
||||
$pdf->Ln();
|
||||
}
|
||||
else
|
||||
{
|
||||
//$pdf->Cell(40,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_1']),1,0,'L');
|
||||
$pdf->Cell(45,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_2']),1,0,'L');
|
||||
$pdf->Cell(45,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_3']),1,0,'L');
|
||||
$pdf->Cell(40,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_4']),1,0,'L');
|
||||
$pdf->Cell(30,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_6']),1,0,'R');
|
||||
$pdf->Cell(30,4,iconv('utf-8','windows-1250',$_SESSION['rap003_array'][$i]['col_7']),1,0,'R');
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($_SESSION['rap003_array'][$i]['znacznik']=='blue' || $_SESSION['rap003_array'][$i]['znacznik']=='red')
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
|
||||
$pdf->Output();
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user