Galarie Updat und schadow updatate
This commit is contained in:
@@ -5,18 +5,31 @@
|
||||
<br>
|
||||
|
||||
<div class="gimages">
|
||||
|
||||
<?php
|
||||
$path = 'src/images/2018Luethje/';
|
||||
foreach (new DirectoryIterator($path) as $file) {
|
||||
if ($file->isDot() || $file->isDir()) continue;;
|
||||
if ($file->getExtension()=="jpeg" || $file->getExtension()=="jpg") {
|
||||
echo '<a href="src/images/2018Luethje/';
|
||||
echo $file;
|
||||
echo '"data-lightbox="mygallery"><img src="src/images/2018Luethje/';
|
||||
echo $file;
|
||||
echo '"></a>';
|
||||
}
|
||||
$dir = 'src/Bilder/Feiertag/2018.12.23 Weihnachten 2018 Lühtjes/';
|
||||
|
||||
// Check if the directory exists
|
||||
if (file_exists($dir) && is_dir($dir)) {
|
||||
|
||||
// Get the files of the directory as an array
|
||||
$scan_arr = scandir($dir);
|
||||
$files_arr = array_diff($scan_arr, array('.', '..'));
|
||||
|
||||
// echo "<pre>"; print_r( $files_arr ); echo "</pre>";
|
||||
|
||||
// Get each files of our directory with line break
|
||||
foreach ($files_arr as $file) {
|
||||
//Get the file path
|
||||
$file_path = $dir.$file;
|
||||
// Get the file extension
|
||||
$file_ext = pathinfo($file_path, PATHINFO_EXTENSION);
|
||||
if ($file_ext == "jpg" || $file_ext == "png" || $file_ext == "JPG" || $file_ext == "PNG") {
|
||||
echo '<a href="'.$dir.$file;
|
||||
echo '"data-lightbox="mygallery"><img src="'.$dir.$file;
|
||||
echo '"></a>';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user