-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvideos.php
97 lines (75 loc) · 1.74 KB
/
videos.php
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
require_once 'inc/func.inc.php';
$icons_random = array(
'paperclip',
'file-o',
);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php
include 'layout/meta.inc.php';
?>
<style>
video {
width: 100% !important;
height: auto !important;
}
</style>
</head>
<body class="skin-black">
<?php
include 'layout/header.inc.php';
?>
<div class="wrapper row-offcanvas row-offcanvas-left">
<?php
include 'layout/leftpanel.inc.php';
?>
<aside class="right-side">
<section class="content">
<iframe width="560" height="315" src="https://www.youtube.com/embed/zC9adQ4URCI?autoplay=1" frameborder="0" allowfullscreen></iframe>
<div class="row" style="margin-bottom:5px;">
<?php
$path = 'videos';
if(isset($_GET['v'])){
$path = 'videos/' . $_GET['v'];
}
$files = scandir($path);
$files = array_diff($files, array('..', '.','show.php'));
foreach ($files as $file) {
if(is_dir($path . '/' . $file)){
?>
<div class="col-md-2">
<a href="?v=<?php echo $file; ?>">
<div class="stat">
<div class="stat-icon" style="color:#45cf95;">
<i class="fa fa-<?php echo $icons_random[rand() % count($icons_random)]; ?> fa-3x stat-elem"></i>
</div>
<h5 class="stat-info"><?php echo $file; ?></h5>
</div>
</a>
</div>
<?php
} else {
?>
<div class="col-md-4">
<div class="embed-responsive embed-responsive-16by9">
<video controls>
<source src="<?php echo $path . '/' . $file; ?>" type="video/mp4">
</video>
</div>
</div>
<?php
}
}
?>
</div>
</section>
</aside>
</div>
<?php
include 'layout/scripts.inc.php';
?>
</body>
</html>