-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.php
More file actions
34 lines (30 loc) · 766 Bytes
/
main.php
File metadata and controls
34 lines (30 loc) · 766 Bytes
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
<?php
/**
* Created by PhpStorm.
* User: user
* Date: 08.06.2025
* Time: 3:57
*/
include_once(__DIR__.'/config.php');
$videos = $pdo->query("SELECT * FROM videos GROUP BY title ORDER BY is_series, folder, title")->fetchAll(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html>
<head><meta charset="utf-8"><title>Медиа Сервер</title></head>
<body>
<h1>Видео библиотека</h1>
<ul>
<?php
$n = 1;
foreach ($videos as $v): ?>
<li>
<?=($n++)?> |
<?=(!empty($v['is_series']) ? 'Series' : 'Movie')?> |
<?=htmlspecialchars($v['folder'])?> |
<?=htmlspecialchars($v['title'])?> |
<a href="stream.php?stream=<?=urlencode($v['id'])?>">▶️ Смотреть</a>
</li>
<?php endforeach; ?>
</ul>
</body>
</html>