<?php
# Copyright by Manuel
# Support www.ilch.de
defined (
'main'
)
or
die
(
'no direct access'
);
echo
'<table width="100%" border="0" cellpadding="2" cellspacing="0">'
;
$erg
= db_query('SELECT a.id,a.tid1,a.tid2,DATE_FORMAT(datum,
"%d.%m.%Y"
)
as
datum,stag, points1, points2, b.name
as
team1,c.name
as
team2 FROM prefix_liga_matches a
LEFT JOIN prefix_groups b ON a.tid1 = b.id
LEFT JOIN prefix_groups c ON a.tid2 = c.id
ORDER BY id DESC LIMIT 3');
while
(
$row
= db_fetch_object(
$erg
) ) {
if
(
$row
->points1 ==
$row
->points2) {
$row
->points1 =
'<font color="#ffd700">'
.
$row
->points1.
'</font>'
;
$row
->points2 =
'<font color="#ffd700">'
.
$row
->points2.
'</font>'
;
}
elseif
(
$row
->points1 <
$row
->points2) {
$row
->points1 =
'<font color="#FF0000">'
.
$row
->points1.
'</font>'
;
$row
->points2 =
'<font color="#00FF00">'
.
$row
->points2.
'</font>'
;
}
elseif
(
$row
->points1 >
$row
->points2) {
$row
->points1 =
'<font color="#00FF00">'
.
$row
->points1.
'</font>'
;
$row
->points2 =
'<font color="#FF0000">'
.
$row
->points2.
'</font>'
;
}
echo
'<tr><td align="left">'
;
echo
'<a class="box" href="?liga-showmatches-s'
.
$row
->stag.
'">'
;
echo
''
.
$row
->team1.
' vs. '
.
$row
->team2.
' zu '
.
$row
->points1.
' - '
.
$row
->points2.
'</a></td></tr>'
;
}
echo
'</table>'
;
?>