Image-Ordner-auslesen-und-mit-image-Slider-oeffnen.php


Quell Code


      <link rel="stylesheet" href="https://stylehatch.github.io/photoset-grid/css/main1.css" />
      <link rel="stylesheet" href="https://stylehatch.github.io/photoset-grid/css/colorbox.css" />
    <link rel="stylesheet" href="http://nitinhayaran.github.io/Justified.js/jquery.justified.css">
    <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<div class="photoset-grid-lightbox" data-layout="555555" style="visibility: hidden;">
    <?php
        $url =(isset($_SERVER['HTTPS'])?'https':'http').'://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];  
        $x=0;
        $link='';
        $ordner = "../bilder/im-kreiss-anzeigen/";
        $allebilder = scandir($ordner);
        foreach ($allebilder as $bild) {
            $x++;
            $bildinfo = pathinfo($ordner."/".$bild); 
            $size = ceil(filesize($ordner."/".$bild)/1024); 
            if ($bild != "." && $bild != ".."  && $bild != "_notes" && $bildinfo['basename'] != "Thumbs.db") {
                  if($x<=18){
                       $link.='<img height="200" width="200" src="'.$bildinfo['dirname'].'/'.$bildinfo['basename'].'" data-highres="'.$bildinfo['dirname'].'/'.$bildinfo['basename'].'">';
                  }
            };
        };
echo $link;
    ?>
</div>
  <script src="https://stylehatch.github.io/photoset-grid/jquery.photoset-grid.js"></script>
  <script src="https://stylehatch.github.io/photoset-grid/js/jquery.colorbox.js"></script>
<script>
  $('.photoset-grid-lightbox').photosetGrid({
    highresLinks: true,
    rel: 'withhearts-gallery',
    gutter: '12px',
    width:'800px',

    onComplete: function(){
      $('.photoset-grid-lightbox').attr('style', '');
      $('.photoset-grid-lightbox a').colorbox({
        photo: true,
        scalePhotos: true,
                maxHeight:'90%',
                maxWidth:'90%'
      });
    }
  });
</script>


Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0