Skip to content

Commit

Permalink
Add extra info on 2nd and next classifications pdf pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsito committed Aug 5, 2015
1 parent c914950 commit 44c81fa
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 4 deletions.
22 changes: 19 additions & 3 deletions agility/server/pdf/print_clasificacion.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,19 @@ function print_datosMangas() {
$this->Cell(25,7,"Vel.: {$trs['vel']}m/s","LTBR",0,'L',false);
$this->Ln();
}


// on second and consecutive pages print a short description to avoid sheet missorder
function print_datosMangas2() {
$this->SetXY(35,20);
$this->SetFont('Arial','B',11); // bold 9px
$this->Cell(80,7,"{$this->jornada->Nombre}",0,0,'',false);
$this->SetXY(35,25);
$this->Cell(80,7,"{$this->jornada->Fecha}",0,0,'',false);
$ronda=Mangas::$tipo_manga[$this->manga1->Tipo][4]; // la misma que la manga 2
$this->SetXY(35,30);
$this->Cell(80,7,"$ronda - {$this->categoria}",0,0,'',false);
}

function Header() {
$this->print_commonHeader(_("Clasificación Final"));
}
Expand All @@ -129,11 +141,15 @@ function writeTableHeader() {
$caza=($this->federation->getFederation()==1)?true:false;
$tm1=Mangas::$tipo_manga[$this->manga1->Tipo][3];
$tm2=null;
$firstpage=($this->PageNo()==1)?true:false;
if ($this->manga2!=null) $tm2=Mangas::$tipo_manga[$this->manga2->Tipo][3];

$this->ac_header(1,12);

$this->SetXY(10,($this->PageNo()==1)?65:40); // first page has 3 extra header lines
$this->SetXY(10,65);// first page has 3 extra header lines
if ($this->PageNo()!=1) {
$this->print_datosMangas2();
$this->SetXY(10,40);
}
// REMINDER: $this->cell( width, height, data, borders, where, align, fill)
// first row of table header
$this->SetFont('Arial','BI',12); // default font
Expand Down
15 changes: 14 additions & 1 deletion agility/server/pdf/print_clasificacion_eq3.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,23 @@ function print_datosMangas() {
$this->Cell(25,5,"Vel.: {$trs['vel']}m/s","LTBR",0,'L',false);
$this->Ln();
}


// on second and consecutive pages print a short description to avoid sheet missorder
function print_datosMangas2() {
$this->SetXY(35,15);
$this->SetFont('Arial','B',11); // bold 9px
$this->Cell(80,7,"{$this->jornada->Nombre}",0,0,'',false);
$this->SetXY(35,20);
$this->Cell(80,7,"{$this->jornada->Fecha}",0,0,'',false);
$ronda=Mangas::$tipo_manga[$this->manga1->Tipo][4]; // la misma que la manga 2
$this->SetXY(35,25);
$this->Cell(80,7,"$ronda - {$this->categoria}",0,0,'',false);
}

function Header() {
$this->print_commonHeader(_("Clasificación Final"));
if ($this->PageNo()==1) $this->print_datosMangas();
else $this->print_datosMangas2();
}

// Pie de página: tampoco cabe
Expand Down
13 changes: 13 additions & 0 deletions agility/server/pdf/print_clasificacion_eq4.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,22 @@ function print_datosMangas() {
$this->Ln();
}

// on second and consecutive pages print a short description to avoid sheet missorder
function print_datosMangas2() {
$this->SetXY(35,15);
$this->SetFont('Arial','B',11); // bold 9px
$this->Cell(80,7,"{$this->jornada->Nombre}",0,0,'',false);
$this->SetXY(35,20);
$this->Cell(80,7,"{$this->jornada->Fecha}",0,0,'',false);
$ronda=Mangas::$tipo_manga[$this->manga1->Tipo][4]; // la misma que la manga 2
$this->SetXY(35,25);
$this->Cell(80,7,"$ronda - {$this->categoria}",0,0,'',false);
}

function Header() {
$this->print_commonHeader(_("Clasificación Final"));
if ($this->PageNo()==1) $this->print_datosMangas();
else $this->print_datosMangas2();
}

// Pie de página: tampoco cabe
Expand Down

0 comments on commit 44c81fa

Please sign in to comment.