21 lines
890 B
PHP
21 lines
890 B
PHP
|
<?php
|
||
|
|
||
|
require_once "header.php";
|
||
|
|
||
|
for ($problem = 1; $problem <= 4; ++$problem) {
|
||
|
echo "<h2>Vidéos pour le problème $problem</h2>\n";
|
||
|
/** @var Video $video */
|
||
|
foreach ($videos[$problem - 1] as $video) {
|
||
|
$link = $video->getLink();
|
||
|
$team = Team::fromId($video->getTeam());
|
||
|
$version = $video->getVersion();
|
||
|
echo "Vidéo de présentation de l'équipe « " . $team->getName() . " » (" . $team->getTrigram() . "), version $version : <a href=\"$link\">$link</a>\n";
|
||
|
if (preg_match("#(https?\://|)(www\.|)youtube\.com\/watch\?v=(.*)#", $link, $matches)) {
|
||
|
$code = $matches[3];
|
||
|
echo "<center><iframe width=\"854px\" height=\"480px\" src=\"https://www.youtube.com/embed/$code\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe></center><br />\n";
|
||
|
}
|
||
|
}
|
||
|
echo "<hr />\n";
|
||
|
}
|
||
|
|
||
|
require_once "footer.php";
|