$Rs = safe_r_SQL("select EnName, EnFirstName, QuTargetNo\n\tfrom Entries\n\tinner join Qualifications on EnId=QuId {$Filter} where EnTournament={$_SESSION['TourId']}\n\torder by QuTargetNo"); error_reporting(E_ALL); $n = 0; while ($MyRow = safe_fetch($Rs)) { if ($n == 0) { $pdf->AddPage(); $pdf->Line(5, $Height[1], 15, $Height[1]); $pdf->Line($pdf->getPageWidth() - 15, $Height[1], $pdf->getPageWidth() - 5, $Height[1]); $pdf->Line(5, $Height[2], 15, $Height[2]); $pdf->Line($pdf->getPageWidth() - 15, $Height[2], $pdf->getPageWidth() - 5, $Height[2]); } $pdf->SetXY(10, $Height[$n] + 5); $pdf->setColor('text', 0); $pdf->SetFont('', '', 136); $pdf->Cell($Width, $CellHeight, $MyRow->EnFirstName, 0, 0, 'L'); $pdf->setx($pdf->GetX() + 5); $pdf->SetFont('', '', 20); $pdf->Cell(25, $CellHeight - 8, $MyRow->EnName, 0, 0, 'L', 0, '', true, false, 'T', 'B'); $pdf->setx($pdf->GetX() + 5); $pdf->setColor('text', 128); $pdf->Cell(10, $CellHeight - 8, ltrim(substr($MyRow->QuTargetNo, 1), '0'), 0, 0, 'L', 0, '', true, false, 'T', 'B'); if (!empty($_REQUEST['TargetAssign'])) { // PArte di riconoscimento EVENTO e Paglione $tmpY = ($match2 ? $pdf->getPageHeight() / 2 : $pdf->getPageHeight()) - 10; $pdf->SetFont('', '', 10); $pdf->SetXY($pdf->getPageWidth() - 20, $tmpY); $pdf->Cell(10, 5, "G." . $MyRow->sGo, 1, 0, 'C', 0); $pdf->SetX($pdf->getX() - 20); $pdf->Cell(10, 5, "B." . $MyRow->sBr, 1, 0, 'C', 0); for ($i = 2; $i <= $MyRow->EvFinalFirstPhase; $i = $i * 2) { $pdf->SetX($pdf->getX() - 20);