<?
error_reporting ( 0 );

$r = mysql_fetch_array ( mysql_query ( "select parent_id, document_no, ecmlanguage from " . strtolower ( $_REQUEST ['module'] ) . " where id='" . $_REQUEST ['record'] . "'" ) );
$b = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select document_bank_account as dba from accounts where id='".$r['parent_id']."'"));
$this->SetFont ( 'arialpl', '', 8 );
$this->SetY ( $this->fh - 15 );

$this->SetDrawColor ( 0, 0, 0 );
$this->SetFillColor ( 255, 255, 255 );
$this->Rect ( 0, $this->getBreakLine (), $this->fw, $this->bMargin + 1, "F" );

$this->SetDrawColor ( 0, 0, 0 );
$this->Cell ( 0, 10, $this->PageNo () . '/{nb}' );

$this->Ln ( 5 );
$this->AliasNbPages ();
$this->SetLineWidth ();
$this->SetDrawColor ( 0, 0, 0 );
$this->Line ( $this->lMargin, - 17 - 16 + 1, $this->fw - $this->rMargin, - 17 - 16 + 1 );

if ($this->edt->show_footer_on_all_pages == 0 && $this->page > 1) {
	return;
}

$this->SetXY ( $this->lMargin, - 20 - 16 );

$this->Line(10,$this->fh-37,200,$this->fh-37);

$this->SetFont ( 'arialpl', '', '7' );
$this->Cell ( 110, 4, 'e5 Polska Sp. z o.o.' );
$this->SetFont ( 'arialpl', 'B', '7' );
$this->Cell ( 20, 4, 'Bank: ' );
$this->SetFont ( 'arialpl', '', '7' );
if ($b['dba']=='milenium')
$this->Cell ( 45, 4, 'BANK MILLENIUM', 0, 0, 'L' );
if ($b['dba']=='mbank')
$this->Cell ( 45, 4, 'MBANK', 0, 0, 'L' );
$this->Ln ();

$this->SetFont ( 'arialpl', '', '7' );
$this->Cell ( 110, 4, 'ul. Wąwozowa 11, 02-796 Warszawa' );
$this->SetFont ( 'arialpl', 'B', '7' );
$this->Cell ( 20, 4, 'Numer konta: ' );
$this->SetFont ( 'arialpl', '', '7' );
if ($b['dba']=='milenium')
$this->Cell ( 45, 4, '35 1160 2202 0000 0000 6408 0411', 0, 0, 'L' );
if ($b['dba']=='mbank')
	$this->Cell ( 45, 4, '26 1140 1010 0000 5482 1200 1001', 0, 0, 'L' );

$this->Ln ();

$this->SetFont ( 'arialpl', '', '7' );
$this->Cell ( 110, 4, '22 228 20 90');

$this->SetFont ( 'arialpl', 'B', '7' );
$this->Cell ( 20, 4, 'Numer GIOŚ: ' );
$this->SetFont ( 'arialpl', '', '7' );
$this->Cell ( 45, 4, "E0006254W", 0, 0, 'L' );

$this->Ln ();

$this->SetFont ( 'arialpl', '', '7' );
$this->Cell ( 110, 4, '+ 48 (56) 674 60 47' );
$this->SetFont ( 'arialpl', 'B', '7' );
$this->Cell ( 20, 4, 'KRS: ' );
$this->SetFont ( 'arialpl', '', '7' );
$this->Cell ( 45, 4, '28207', 0, 0, 'L' );
$this->Ln ();

$this->SetFont ( 'arialpl', '', '7' );
$this->Cell ( 110, 4, 'www.e5.pl' );
$this->SetFont ( 'arialpl', 'B', '7' );
$this->Cell ( 20, 4, 'NIP: ' );
$this->SetFont ( 'arialpl', '', '7' );
$this->Cell ( 45, 4, 'PL 525-21-73-990', 0, 0, 'L' );
$this->Ln ();

$this->SetFont ( 'arialpl', '', '7' );
$this->Cell ( 110, 4, '' );
$this->SetFont ( 'arialpl', 'B', '7' );
$this->Cell ( 20, 4, 'REGON: ' );
$this->SetFont ( 'arialpl', '', '7' );
$this->Cell ( 45, 4, '016280234', 0, 0, 'L' );
$this->Ln ();

$this->SetFont ( "arialpl", "B", 8 );
$this->SetXY ( 40, $this->GetY () + 1 );

$this->Cell ( 45, 4, $r ['document_no'], 0, 0, 'L' );
?>