Ejemplo n.º 1
0
 /**
  * Validate and set static values
  *
  * @param array $init Configuration values.
  */
 public function __construct($init)
 {
     // Validate argument
     is_dir($init['galleryPath']) or $this->errorMessage('The gallery dir is not a valid directory.');
     // Set static values
     self::$galleryPath = $init['galleryPath'];
     self::$galleryBaseurl = $init['galleryBaseurl'];
 }
Ejemplo n.º 2
0
<?php

// Get incoming parameters
$path = isset($_GET['path']) ? $_GET['path'] : null;
$pathComplete = GALLERY_PATH . DIRECTORY_SEPARATOR . $path;
//create paths
$pathToGallery = realpath($pathComplete);
$basePath = realpath(GALLERY_PATH);
//instantiate and generate gallery
$imgGal = new CGallery();
echo $imgGal->createAndReturnGallery($basePath, $pathToGallery);
?>