Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<body>
<img id="myPictureId" src="" alt=""/>
<?php
$arrayElem = '';
$dir = opendir('.');
while ($file = readdir($dir)){
if($file == '.' || $file == '..'){continue;}
$info = explode('.', $file);
$file_ext = strtolower($info[count($info)-1]);
if($file_ext == 'jpg' || $file_ext == 'jpeg' || $file_ext == 'png' || $file_ext == 'gif'){
if(!$arrayElem){$arrayElem = "'$file'";}
else{$arrayElem .= ",'$file'";}
}
}
closedir($dir);
?>
<script type="text/javascript">
var oPicture = document.getElementById('myPictureId');
var nInterval = 1000;
var pictureList = new Array(<?php echo $arrayElem;?>);
var index = -1;
var oInterval = null;
function sshow(){
oInterval = setInterval("slideshow()", nInterval);
}
function slideshow(){
index++;
if (index == pictureList.length){
index = 0;
}
oPicture.src = pictureList[index];
}
sshow();
</script>
</body>
<img id="myPictureId" src="" alt=""/>
<?php
$arrayElem = '';
$dir = opendir('images/Pictures');
while ($file = readdir($dir)){
if($file == '.' || $file == '..'){continue;}
$info = explode('.', $file);
$file_ext = strtolower($info[count($info)-1]);
if($file_ext == 'jpg' || $file_ext == 'JPG' || $file_ext == 'jpeg' || $file_ext == 'png' || $file_ext == 'gif'){
if(!$arrayElem){$arrayElem = "'$file'";}
else{$arrayElem .= ",'$file'";}
}
}
closedir($dir);
?>
<script type="text/javascript">
var oPicture = document.getElementById('myPictureId');
var nInterval = 1000;
var pictureList = new Array(<?php echo $arrayElem;?>);
var index = -1;
var oInterval = null;
function sshow(){
oInterval = setInterval("slideshow()", nInterval);
}
function slideshow(){
index++;
if (index == pictureList.length){
index = 0;
}
oPicture.src = pictureList[index];
}
sshow();
</script>