1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-25 12:57:22 +02:00

Phase 1 : envoi des vidéos (en cours)

This commit is contained in:
galaxyoyo
2019-09-17 00:04:45 +02:00
parent 0fdae19f2d
commit a8db4a421c
7 changed files with 160 additions and 14 deletions

View File

@ -9,12 +9,12 @@ elseif (isset($new_video))
?>
<?php
while (($data = $videos_req->fetch()) !== false) {
$link = $data["link"];
echo "<a href=\"$link\">$link</a><br />";
if (preg_match("#https?\://www\.youtube\.com\/watch\?v=(.*)#", $link, $matches)) {
$code = $matches[1];
echo "<center><iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/$code\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe></center><br />";
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 />";
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 />";
}
}
?>
@ -24,7 +24,7 @@ while (($data = $videos_req->fetch()) !== false) {
<tbody>
<tr>
<td style="width: 30%;">
<label for="link">Lien de la vidéo :</label>
<label for="link">Lien de la vidéo à soumettre :</label>
</td>
<td style="width: 70%;">
<input style="width: 100%;" type="url" id="link" name="link" />