-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php.txt
More file actions
45 lines (36 loc) · 1.19 KB
/
index.php.txt
File metadata and controls
45 lines (36 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
// Liste des vidéos disponibles
$videos = ["video_1.mp4", "video_2.mp4", "video_3.mp4"];
// Récupération de l'index courant depuis l'URL (ex: ?video=1)
$current = isset($_GET['video']) ? intval($_GET['video']) : 0;
$current = max(0, min($current, count($videos) - 1)); // Sécurité
$prev = ($current - 1 + count($videos)) % count($videos);
$next = ($current + 1) % count($videos);
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Vidéos style TikTok</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css2/style.css">
</head>
<body>
<header>
<title>
</title>
<ul>
<li><a href="#">Upload</a></li>
</ul>
</header>
<div class="video-container">
<a href="?video=<?= $prev ?>" class="nav-arrow left-arrow">‹</a>
<video autoplay muted loop playsinline>
<source src="assets/videos/<?= htmlspecialchars($videos[$current]) ?>" type="video/mp4">
Votre navigateur ne supporte pas la lecture vidéo.
</video>
<a href="?video=<?= $next ?>" class="nav-arrow right-arrow">›</a>
</div>
</body>
</html>