Initial commit
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
<?php session_start();
|
||||
|
||||
require_once('../fpdf/fpdf.php');
|
||||
|
||||
//pobiera informacje z pliku o zawartości raportu
|
||||
unset($conArray);
|
||||
$file = fopen("../charts/".base64_decode($_GET['fm']), "r");
|
||||
$i = 0;
|
||||
while (!feof($file)) {
|
||||
$line_of_text .= fgets($file);
|
||||
}
|
||||
$conArray = explode(chr(13), $line_of_text);
|
||||
fclose($file);
|
||||
|
||||
unset($wellArray);
|
||||
for ($i=0; $i<count($conArray); $i++)
|
||||
$wellArray[] = explode('|', $conArray[$i]);
|
||||
|
||||
$GLOBALS['date'] = $wellArray[0][0];
|
||||
|
||||
|
||||
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', '', 10);
|
||||
$title = iconv('utf-8','windows-1250','Wykaz obiektów na stanie oddziału (piezometry)');
|
||||
$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','Piezometr'),1,0,'C');
|
||||
$this->Cell(33,5,iconv('utf-8','windows-1250','Typ obiektu'),1,0,'C');
|
||||
$this->Cell(20,5,iconv('utf-8','windows-1250','Data przyjęcia'),1,0,'C');
|
||||
$this->Cell(34,5,iconv('utf-8','windows-1250','Współrzędne'),1,0,'C');
|
||||
$this->Cell(36,5,iconv('utf-8','windows-1250','Rzędna wiercenia [m n.p.m.]'),1,0,'C');
|
||||
$this->Cell(36,5,iconv('utf-8','windows-1250','Rzędna aktualna [m n.p.m.]'),1,0,'C');
|
||||
$this->Cell(30,5,iconv('utf-8','windows-1250','Głębokość aktualna [m]'),1,0,'C');
|
||||
$this->Cell(29,5,iconv('utf-8','windows-1250','Lokalizacja'),1,0,'C');
|
||||
$this->Cell(29,5,iconv('utf-8','windows-1250','Uwagi'),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(177,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->SetFont('calibri','',6);
|
||||
|
||||
$bariera = "";
|
||||
|
||||
for ($i=0; $i<count($wellArray); $i++)
|
||||
{
|
||||
if (!empty($wellArray[$i][1]))
|
||||
{
|
||||
if ($bariera!=$wellArray[$i][1])
|
||||
{
|
||||
$pdf->SetFont('calibri','',8);
|
||||
$pdf->Cell(0,4,iconv('utf-8','windows-1250','Bariera: '.$wellArray[$i][1]),1,0,'L');
|
||||
$bariera=$wellArray[$i][1];
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('calibri','',6);
|
||||
}
|
||||
|
||||
$pdf->Cell(10,4,iconv('utf-8','windows-1250',str_replace(array(chr(10),chr(13)), array('',''), $wellArray[$i][0])),1,0,'R');
|
||||
$pdf->Cell(20,4,iconv('utf-8','windows-1250',$wellArray[$i][2]),1,0,'C');
|
||||
$pdf->Cell(33,4,iconv('utf-8','windows-1250',$wellArray[$i][3]),1,0,'C');
|
||||
$pdf->Cell(20,4,iconv('utf-8','windows-1250',$wellArray[$i][4]),1,0,'C');
|
||||
$pdf->Cell(17,4,iconv('utf-8','windows-1250',$wellArray[$i][5]),1,0,'C');
|
||||
$pdf->Cell(17,4,iconv('utf-8','windows-1250',$wellArray[$i][6]),1,0,'C');
|
||||
$pdf->Cell(36,4,iconv('utf-8','windows-1250',$wellArray[$i][7]),1,0,'R');
|
||||
$pdf->Cell(36,4,iconv('utf-8','windows-1250',$wellArray[$i][8]),1,0,'R');
|
||||
$pdf->Cell(30,4,iconv('utf-8','windows-1250',$wellArray[$i][9]),1,0,'R');
|
||||
$pdf->Cell(29,4,iconv('utf-8','windows-1250',$wellArray[$i][10]),1,0,'C');
|
||||
$pdf->Cell(29,4,iconv('utf-8','windows-1250',$wellArray[$i][11]),1,0,'C');
|
||||
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$pdf->Output();
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user