-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
124 lines (110 loc) · 3.33 KB
/
index.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<html>
<head>
<link rel="stylesheet" href="efe.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script>
<?php
$videolar_ad=array();
$ilk="";
$videolar_klasor=opendir("videolar");
while($video=readdir($videolar_klasor)) {
if($video!="."&&$video!="..")
{
if($ilk == "")
{
array_push($videolar_ad,$video);
shuffle($videolar_ad);
}
else
{
array_push($videolar_ad,$video);
shuffle($videolar_ad);
}
}
}
closedir($videolar_klasor);
$toplam=count($videolar_ad);
$son= $toplam-1;
$dosyalar="var videos=new Array(";
for($sira=0;$sira<$toplam; $sira++)
{
$video_ad= "videolar/". $videolar_ad[$sira];
if($sira!=$son)
{
$dosyalar_ek="\"".$video_ad."\",";
}
else
{
$dosyalar_ek="\"".$video_ad."\");";
}
$dosyalar.=$dosyalar_ek;
}
echo $dosyalar ?>
var currentVideo = 0;
function nextVideo() {
videoPlayer = document.getElementById("play-video")
videoPlayer.removeEventListener('ended',nextVideo,false);
videoPlayer.src = videos[currentVideo];
videoPlayer.play()
currentVideo = (currentVideo + 1) % videos.length
videoPlayer.addEventListener('ended', nextVideo,false);
}
function ooops() {
console.log(document.getElementById("play-video").error.code)
}
</script>
<style>
video#backgroundvid {
position: fixed; right: 0; bottom: 0;
min-width: 100%; min-height: 100%;
width: auto; height: auto; z-index: -100;
background: url(polina.jpg) no-repeat;
background-size: cover;
}
</style>
</head>
<body>
<div class="existing_items">
<table cellspacing="0">
<th class="pointer"colspan="2">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<?php
if(isset($_POST["submit"])){
$link = $_POST["link"];
echo '<a href="'.$link.'">Siteye Git</a>';// corrected incorrect usage of quotes
}
?>
<form accept="" action="" method="post"> <!-- added form open -->
<input type="url" class="form-control" name="link" placeholder="Enter Product URL" required>
<input class="button" type="submit" name="submit" value="Submit">
</form>
</nav>
</th>
<tr><th class="" colspan="2"></th></tr>
</table>
</div>
<div class="video-player">
<video class="videom" id="play-video" width="%100" height="%100" controls autobuffer muted id="backgroundvid"></video>
</div>
<div
class="container">
</div>
<script>
document.getElementById("play-video").addEventListener('error', ooops,false);
function ooops() {
console.log(document.getElementById("play-video").error)
}
nextVideo()
var elem = document.getElementById("video-player");
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.mozRequestFullScreen) {
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) {
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) {
elem.msRequestFullscreen();
}
</script>
</body>
</html>