avs-code / PREM-Podium-race-E-manager

Description PREM (Podium race e manager) is management software for races and race leagues. It can be used to create overviews of race results. Based on Paddock 7.10beta by: demontpx
https://arv187.github.io/PREM-Podium-race-E-manager/
GNU General Public License v3.0
5 stars 1 forks source link

show teams names+drivers names+logos #6

Closed avs-code closed 8 years ago

avs-code commented 8 years ago
<? if (!defined("CONFIG"))    exit(); ?>

<?

$teams = "SELECT `team`.`name` , `team`.`logo` FROM team ORDER BY `team`.`name` ASC LIMIT 0 , 30";
$result = mysql_query($teams);
if (!$result) {
    show_error("MySQL Error: " . mysql_error() . "\n");
    return;
}
?>
<h1>Teams</h1>
<h2>Teams</h2>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="head">
<td><h1><strong>Name</strong></h1></td>
<td><h1><strong>Drivers</strong></h1></td>
<td><h1><strong>Logo</strong></h1></td>
</tr>
<?
$style = "odd";
while ($sitem = mysql_fetch_array($result)) {
 if ($sitem['driver_photo'] == '') { $url = 'images/logo.png' ; } else { $url = $sitem['driver_photo']; } 
?>
<tr class="<?= $style ?>">
<td><?= $sitem['name'] ?></td><!--team name-->
<td><?= $sitem['name'] ?></td><!--driver name-->
<td><a><img src="<?=$url;?>" width="150" height="150"/></a></td><!--url logo-->
</tr>
<?
    $style = $style == "odd" ? "even" : "odd";
}
?>
</table>
inguni commented 8 years ago

Fixed in inguni-patch-show-races-1 .