updates
This commit is contained in:
parent
50cd802d33
commit
317f0bce1a
224 changed files with 1105 additions and 27 deletions
|
|
@ -1,11 +1,27 @@
|
|||
<?php
|
||||
use App\Models\Team;
|
||||
|
||||
$pageTitle = 'Spieltipp';
|
||||
require __DIR__ . '/../partials/header.php';
|
||||
|
||||
$teamLogo = function ($name) {
|
||||
static $cache = [];
|
||||
if (array_key_exists($name, $cache)) {
|
||||
return $cache[$name];
|
||||
}
|
||||
$team = Team::resolve($name);
|
||||
$cache[$name] = ($team && Team::logoExists($team)) ? Team::logoUrl($team) : null;
|
||||
return $cache[$name];
|
||||
};
|
||||
?>
|
||||
|
||||
<h1>Spieltipp:</h1>
|
||||
|
||||
<p><strong><?php echo htmlspecialchars($game['team1'] . ' : ' . $game['team2']); ?></strong></p>
|
||||
<p><strong>
|
||||
<span class="team-cell"><?php $l1 = $teamLogo($game['team1']); if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo"><?php endif; ?><?php echo htmlspecialchars($game['team1']); ?></span>
|
||||
:
|
||||
<span class="team-cell"><?php $l2 = $teamLogo($game['team2']); if ($l2): ?><img src="<?php echo htmlspecialchars($l2); ?>" alt="" class="team-logo"><?php endif; ?><?php echo htmlspecialchars($game['team2']); ?></span>
|
||||
</strong></p>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<p style="color: red;"><?php echo htmlspecialchars($error); ?></p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue