if (isset($value->sname)) {
                $link = new CLMcLink();
                $link->view = 'turnier_player';
                $link->more = array('turnier' => $this->turnier->id, 'snr' => $value->gegner, 'Itemid' => $itemid);
                $link->makeURL();
                echo $link->makeLink($value->sname);
            }
            echo '</td>';
            echo '<td align="center">' . CLMText::formatRating($value->stwz) . '</td>';
            if ($value->ergebnis != NULL) {
                echo '<td align="center">';
                if ($value->pgn == '' or !$this->pgnShow) {
                    echo CLMText::getResultString($value->ergebnis);
                } else {
                    echo '<span class="editlinktip hasTip" title="' . JText::_('PGN_SHOWMATCH') . '">';
                    echo '<a onclick="startPgnMatch(' . $value->id . ', \'pgnArea\');" class="pgn">' . CLMText::getResultString($value->ergebnis) . '</a>';
                    echo '</span>';
                    ?>
						<input type='hidden' name='pgn[<?php 
                    echo $value->id;
                    ?>
]' id='pgnhidden<?php 
                    echo $value->id;
                    ?>
' value='<?php 
                    echo $value->pgn;
                    ?>
'>
						<?php 
                }
                if ($this->turnier->typ == 3 and ($value->tiebrS > 0 or $value->tiebrG > 0)) {
     } else {
         if (isset($this->matrix[$this->players[$p]->snr][$this->posToPlayers[$rnd]][1]->ergebnis)) {
             if (substr(CLMText::getResultString($this->matrix[$this->players[$p]->snr][$this->posToPlayers[$rnd]][1]->ergebnis), 0, 7) == '&frac12') {
                 $czelle = chr(189);
             } else {
                 $czelle = CLMText::getResultString($this->matrix[$this->players[$p]->snr][$this->posToPlayers[$rnd]][1]->ergebnis, 0);
             }
         } else {
             $czelle = " ";
         }
         if ($this->turnier->dg == 2) {
             if (isset($this->matrix[$this->players[$p]->snr][$this->posToPlayers[$rnd]][2]->ergebnis)) {
                 if (substr(CLMText::getResultString($this->matrix[$this->players[$p]->snr][$this->posToPlayers[$rnd]][2]->ergebnis), 0, 7) == '&frac12') {
                     $czelle .= "/" . chr(189);
                 } else {
                     $czelle .= "/" . CLMText::getResultString($this->matrix[$this->players[$p]->snr][$this->posToPlayers[$rnd]][2]->ergebnis, 0);
                 }
             } else {
                 $czelle .= "/";
             }
         }
         $pdf->Cell($br11, $zelle, $czelle, 1, 0, 'C', 1);
     }
 }
 $pdf->Cell($br91, $zelle, $this->players[$p]->sum_punkte, 1, 0, 'C', 1);
 // mgl. Feinwertungen
 for ($f = 1; $f <= 3; $f++) {
     $fwFieldName = 'tiebr' . $f;
     $plTiebrField = 'sumTiebr' . $f;
     if ($this->turnier->{$fwFieldName} > 0) {
         $pdf->Cell($br92, $zelle, CLMtext::tiebrFormat($this->turnier->{$fwFieldName}, $this->players[$p]->{$plTiebrField}), 1, 0, 'C', 1);
        $p1 = true;
        $pdf->SetFillColor(255);
    } else {
        $p1 = false;
        $pdf->SetFillColor(240);
    }
    if ($value->spieler != 0 and $value->gegner != 0 or $value->ergebnis != NULL) {
        $pdf->Cell($br00, $zelle, " ", 0, 0, 'C');
        $pdf->Cell($br01, $zelle, utf8_decode($value->wname), 1, 0, 'L', 1);
        $pdf->Cell($br02, $zelle, $value->wtwz, 1, 0, 'C', 1);
        $pdf->Cell($br03, $zelle, "-", 1, 0, 'C', 1);
        $pdf->Cell($br04, $zelle, utf8_decode($value->sname), 1, 0, 'L', 1);
        $pdf->Cell($br05, $zelle, $value->stwz, 1, 0, 'C', 1);
        if ($value->ergebnis != NULL) {
            if ($value->ergebnis == 2) {
                $ergebnis = chr(189) . ":" . chr(189);
                if ($this->turnier->typ == 3 and ($value->tiebrS > 0 or $value->tiebrG > 0)) {
                    $ergebnis .= '  (' . $value->tiebrS . ':' . $value->tiebrG . ')';
                }
            } else {
                $ergebnis = CLMText::getResultString($value->ergebnis);
            }
        } else {
            $ergebnis = " ";
        }
        $pdf->Cell($br06, $zelle, $ergebnis, 1, 0, 'C', 1);
        $pdf->Cell(1, $zelle, " ", 0, 1, 'C');
    }
}
// Ausgabe
$pdf->Output(utf8_decode(JText::_('TOURNAMENT_ROUND')) . " " . $this->round->nr . ' ' . utf8_decode($this->turnier->name) . '.pdf', 'D');
             if ($this->turnier->typ != '3' and $this->turnier->typ != '5') {
                 if (isset($this->points[$value->nr + ($value->dg - 1) * $this->turnier->runden][$matches->gegner])) {
                     $points = $this->points[$value->nr + ($value->dg - 1) * $this->turnier->runden][$matches->gegner];
                 } else {
                     $points = 0;
                 }
                 $pdf->Cell($br04, $zelle, utf8_decode($this->players[$matches->gegner]->name) . " (" . $points . ")", 1, 0, 'L', 1);
             } else {
                 $pdf->Cell($br04, $zelle, utf8_decode($this->players[$matches->gegner]->name), 1, 0, 'L', 1);
             }
             $pdf->Cell($br05, $zelle, $this->players[$matches->gegner]->twz, 1, 0, 'C', 1);
             if ($matches->ergebnis != NULL) {
                 if ($matches->ergebnis == 2) {
                     $ergebnis = chr(189) . ":" . chr(189);
                 } else {
                     $ergebnis = CLMText::getResultString($matches->ergebnis);
                 }
                 if (($this->turnier->typ == 3 or $this->turnier->typ == 5) and ($matches->tiebrS > 0 or $matches->tiebrG > 0)) {
                     $ergebnis .= '  (' . $matches->tiebrS . ':' . $matches->tiebrG . ')';
                 }
             } else {
                 $ergebnis = " ";
             }
             $pdf->Cell($br06, $zelle, $ergebnis, 1, 0, 'C', 1);
             $pdf->Cell(1, $zelle, " ", 0, 1, 'C');
         }
     }
     if ($print_round == 1) {
         $y_length = $pdf->GetY() - $y_start;
     }
 }
                        $link = new CLMcLink();
                        $link->view = 'turnier_runde';
                        $link->more = array('turnier' => $this->turnier->id, 'runde' => $this->matrix[$this->players[$p]->snr][$this->posToPlayers[$rnd]][1]->runde, 'dg' => 1, 'Itemid' => $itemid);
                        $link->makeURL();
                        echo $link->makeLink(CLMText::getResultString($this->matrix[$this->players[$p]->snr][$this->posToPlayers[$rnd]][1]->ergebnis, 0));
                    }
                    // dg 2?
                    if ($this->turnier->dg == 2) {
                        echo "&nbsp;/&nbsp;";
                        // ergebnis ermitteln
                        if (isset($this->matrix[$this->players[$p]->snr][$this->posToPlayers[$rnd]][2]->ergebnis)) {
                            $link = new CLMcLink();
                            $link->view = 'turnier_runde';
                            $link->more = array('turnier' => $this->turnier->id, 'runde' => $this->matrix[$this->players[$p]->snr][$this->posToPlayers[$rnd]][2]->runde, 'dg' => 2, 'Itemid' => $itemid);
                            $link->makeURL();
                            echo $link->makeLink(CLMText::getResultString($this->matrix[$this->players[$p]->snr][$this->posToPlayers[$rnd]][2]->ergebnis, 0));
                        }
                    }
                    echo '</div></td>';
                }
            }
            echo '</tr>';
        }
        // Ende Spieler
        echo '</table></div>';
        echo '</div>';
        echo '<div class="clr"></div>';
    }
}
require_once JPATH_COMPONENT . DS . 'includes' . DS . 'copy.php';
echo '</div></div>';