// print header
$text = 'Beste Tankstelle ('.$this->config['sorte'].')';
imagettftextboxopt($image, 18, 0, 50, $yoffset, $style['textcolor'], $style['font'], $text, $opt_header);
$icon = ImageCreateFromPNG ( 'resources/icons/tank.png' );
ImageCopy($image, $icon, 20, $yoffset-3, 0, 0, imagesx($icon), imagesy($icon));
ImageDestroy($icon);
$yoffset += 26;
while ($row = mysql_fetch_assoc($result)) {
$counter++;
$rest = (mysql_num_rows($result) - $counter) + 1;
$entrylimit = $this->config['max_displayed_stations'];
if ( (($entrylimit) && ($counter > $entrylimit)) || (($yoffset >= (imagesy($image) - 36)) && ($rest > 1)) ) {
// show only n mails. If more mails are available show hint "x more stations..."
$rest = (mysql_num_rows($result) - $counter) + 1;
if ($rest > 1)
$text = "... $rest weitere Tankstellen";
else
$text = "... $rest weitere Tankstelle";
imagettftextboxopt($image, 14, 0, 24, $yoffset, $style['textcolor'], $style['fontb'], $text, $opt_header);
$yoffset += 22;
break;
}