From 44c81faac6f8d8229f8da3e0af6860fd510229aa Mon Sep 17 00:00:00 2001 From: Juan Antonio Martinez Date: Wed, 5 Aug 2015 16:36:50 +0200 Subject: [PATCH] Add extra info on 2nd and next classifications pdf pages --- agility/server/pdf/print_clasificacion.php | 22 ++++++++++++++++--- .../server/pdf/print_clasificacion_eq3.php | 15 ++++++++++++- .../server/pdf/print_clasificacion_eq4.php | 13 +++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/agility/server/pdf/print_clasificacion.php b/agility/server/pdf/print_clasificacion.php index 23153907f..c5a204f56 100644 --- a/agility/server/pdf/print_clasificacion.php +++ b/agility/server/pdf/print_clasificacion.php @@ -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")); } @@ -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 diff --git a/agility/server/pdf/print_clasificacion_eq3.php b/agility/server/pdf/print_clasificacion_eq3.php index 931dcd943..534e97af7 100644 --- a/agility/server/pdf/print_clasificacion_eq3.php +++ b/agility/server/pdf/print_clasificacion_eq3.php @@ -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 diff --git a/agility/server/pdf/print_clasificacion_eq4.php b/agility/server/pdf/print_clasificacion_eq4.php index ff6063f95..20c003c8b 100644 --- a/agility/server/pdf/print_clasificacion_eq4.php +++ b/agility/server/pdf/print_clasificacion_eq4.php @@ -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