Dev #232
2 changed files with 46 additions and 1 deletions
|
|
@ -12,7 +12,8 @@ if ($host == 'dev.dtch.online') {
|
|||
<a href="last_stats.php">Last quarter %</a>
|
||||
<a href="latestmatches.php">Last Matches</a>
|
||||
<a href="topstats.php">Top20</a>
|
||||
<a href="user_stats.php">User Stats</a>
|
||||
<a href="user_stats.php">User Stats</a>
|
||||
<a href="videos.php">Videos</a>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="icon" onclick="myFunction()">
|
||||
<i class="fa fa-bars"></i>
|
||||
|
|
|
|||
44
videos.php
Normal file
44
videos.php
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
$ogDescription = "Bekijk alle video's";
|
||||
|
||||
// Scan the media/videos directory for mp4 files
|
||||
$videosDir = __DIR__ . '/media/videos';
|
||||
$allFiles = scandir($videosDir);
|
||||
$videoFiles = array_filter($allFiles, function($file) use ($videosDir) {
|
||||
return is_file($videosDir . '/' . $file) && strtolower(pathinfo($file, PATHINFO_EXTENSION)) === 'mp4';
|
||||
});
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<?php include './includes/head.php'; ?>
|
||||
|
||||
<body>
|
||||
<?php include './includes/navigation.php'; ?>
|
||||
<?php include './includes/header.php'; ?>
|
||||
<main>
|
||||
<section>
|
||||
<h2>Videos</h2>
|
||||
|
||||
<?php if (!empty($videoFiles)): ?>
|
||||
<div class="videos-container">
|
||||
<?php foreach ($videoFiles as $video): ?>
|
||||
<div class="video-item">
|
||||
<video controls>
|
||||
<source src="media/videos/<?php echo htmlspecialchars($video); ?>" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
<p><?php echo htmlspecialchars($video); ?></p>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p>No videos found.</p>
|
||||
<?php endif; ?>
|
||||
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<?php include './includes/footer.php'; ?>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue