Nevím kam přesně to vložit, výpis kodu:
$sql="SELECT w.winner AS winnerID,w.loser AS loserID,datum,winortie,rf,ra,tw.teamname AS winner,tl.teamname AS loser FROM sportsdb_wins w LEFT JOIN sportsdb_teams tw ON w.winner=tw.teamid LEFT JOIN sportsdb_teams tl ON w.loser=tl.teamid WHERE w.winner={$results['teamid']} OR w.loser={$results['teamid']} ORDER BY w.winid DESC LIMIT 5";
$resWins=mysql_query($sql);
?>
<tr style="background:<? If($row_number<$postupujici)echo'dodgerblue';ElseIf($row_number-$postupujici<$baraz)echo'#edae1d';Else echo'red'?>">
<td><?=++$row_number ?></td>
<td> <a href="rozpis_black.php?tym=<?php print $results['teamid']; ?>&conf=<?php print $confid; ?>&body=<?php print $body; ?>&postup=<?php print $postup; ?>&baraz=<?php print $baraz; ?>" title="View scores for <?php print $results['teamname']; ?>"><?php print $results['teamname']; ?></a></td><td><?php print "\t\t" . '<img src="http://www.cup.michales.eu/img/' . $results['teamname'] .'.gif">' . "\n"; ?></td>
<td><a href="rozpis_black.php?tym=<?php print $results['teamid']; ?>&conf=<?php print $confid; ?>&body=<?php print $body; ?>&postup=<?php print $postup; ?>&baraz=<?php print $baraz; ?>" title="View scores for <?php print $results['nickname']; ?>"><em><?php print $results['nickname']; ?></em></a></td>
<td><?php print $results['gamesplayed']; ?></td>
<td><?php print $results['teamwins']; ?></td>
<td><?php print $results['teamlosses']; ?></td>
<?php if ($show_ties) { ?>
<?php }
if ($forfeit) { ?>
<td><?php print $results['teamforfeits']; ?></td>
<?php }
if ($show_rfra) { ?>
<td><?php print $results['teamrf']; ?></td>
<td><?php print $results['teamra']; ?></td>
<?php } ?>
<td><?php print $winningpct; ?></td>
<?php if ($show_points) { ?>
<td><?php print $results['points']; ?></td>
<?php } ?>
<td><?php
while($rw=mysql_fetch_assoc($resWins)){
switch($rw['winortie']){
case 0:
$bg='white';
$winner=$loser=$rw['winner'].'+'.$rw['loser'];
$popis='remíza';
break;
case 1:
case 2:
$bg=($rw['winnerID']==$results['teamid'])?'green':'red';
$winner=$rw['winner'];
$loser=$rw['loser'];
$popis='Vyhrál tým winner-'.$rw['winner'];
$popis2='Výsledek uložen-'.$rw['datum'];
break;
case 4:
case 5:
$bg=($rw['winnerID']==$results['teamid'])?'red':'green';
$winner=$rw['loser'];
$loser=$rw['winner'];
$popis='Vyhrál tým loser-'.$rw['loser'];
$popis2='Výsledek uložen -'.$rw['datum'];
break;
}
echo '<div style="margin-left:1px;margin-top:1px;border:1px solid black;background-color:'.$bg.';width:6px;height:10px;float:left">
<div class="hiddenxD" style="background-color:'.$bg.'">
'.$rw['winortie'].' '.$popis.'<br/>
'.$rw['winortie'].' '.$popis2.'<br/>
'.$rw['winner'].' <img width="15" height="15" src="/img/versus.png"> '.$rw['loser'].'<br />
'.$rw['rf'].':'.$rw['ra'].'<br />
</div>
</div>';
}
?></td>