?> </div> <div class="row"> <h3>Gallerie fotografiche</h3> </div> <div class="row"> <?php $string = file_get_contents("./json/photos.json"); $json_a = json_decode($string, true); usort($json_a, 'sort_by_date'); foreach ($json_a as $ph => $photo) { $data = $util->shortDate($photo['data']); $folder = $photo['folder']; $title = $photo['title']; $gallery->setPath('./photos/' . $folder . '/'); //path to the image folder $images = $gallery->getImages(array('jpg', 'png')); //array of possible image extensions (useful if you have mixed galleries) ?> <div class="col-xs-12"> <h4><?php echo $title; ?> <a name='<?php echo $folder; ?> '></a> (<?php echo substr($data, strlen($data) - 9); ?> )</h4>
date_default_timezone_set('Europe/Rome'); include "./utils/class.utils.php"; include "./utils/class.seminar.php"; include "./utils/class.gallery.php"; function sort_by_date($a, $b) { $dA = strtotime($a['data']); $dB = strtotime($b['data']); return $dB - $dA; } $util = new utils(); $s = new seminar(); $s->setSource("./seminari.json"); $gallery = new gallery(); $data = $util->shortDate($json_a[0]['data']); $gallery->setPath('./stages/'); //path to the image folder $image = $gallery->getImages(array('jpg', 'png', 'gif')); //array of possible image extensions ?> <html> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>associazione renbukai</title> <link rel="apple-touch-icon-precomposed" href="assets/favicon_t.png" /> <link rel="shortcut icon" href="assets/favicon.png"> <!-- bootstrap --> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <link rel="stylesheet" href="//blueimp.github.io/Gallery/css/blueimp-gallery.min.css"> <link rel="stylesheet" href="css/bootstrap-image-gallery.min.css">