1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-24 15:00:27 +02:00

Phase 1 : affichage des vidéos pour les admins

This commit is contained in:
galaxyoyo
2019-09-17 00:19:01 +02:00
parent a8db4a421c
commit 1e67b8569d
11 changed files with 50 additions and 16 deletions

View File

@ -11,10 +11,10 @@ elseif (isset($new_video))
<?php
if ($video !== null) {
$link = $video->getLink();
echo "Lien de la vidéo déjà envoyée : <a href=\"$link\">$link</a> (version " . $video->getVersion() . ")<br />";
echo "Lien de la vidéo déjà envoyée : <a href=\"$link\">$link</a> (version " . $video->getVersion() . ")<br />\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 />";
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";
}
}
?>