< < < Click here to go back to the main site

List of available files:

pictures/
templates/
    > header.txt
    > contact.txt
    style/
        > gallery.css
    images/
    > footer.txt
basecode/
    > Video.php
    > includer.php
    > gallerybuilder.php
    > Photograph.php
    > Gallery.php
    > GalleryNavigationData.php
    > GallerySection.php
    > GalleryItem.php
> gpl.txt
> opensource.php
> index.php

Showing source of: ./index.php


<?php

    
/***************************************************************************
     * jpbGallery 1.0.0 Copyright (c) 2007 Jean-Philippe Barbeau
     * Contact: jp $at> jpbarbeau $dot> com
     ***************************************************************************
     * This file is part of the jpbGallery project.
     *
     * jpbGallery is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation; either version 3 of the License, or
     * (at your option) any later version.
     * 
     * jpbGallery is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     * 
     * You should have received a copy of the GNU General Public License
     * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    -***************************************************************************/


    
header('Content-Type: text/html; charset=ISO-8859-1');

    
/* Include the base classes */
    
require_once './basecode/includer.php';
    
    
    
/* Create the gallery and populate it */
    
$gallery = new Gallery("./templates/header.txt""./templates/footer.txt""./templates/contact.txt");
    require 
'./basecode/gallerybuilder.php';
    

    if (
$photoid requesting('photoid'))
    {
        
/* Get that photo, print it */
        
echo $gallery->toHTML($photoid);
    }
    
    else if (
requesting('contact') != 0)
    {
        
/* Print the contact pseudo-id */
        
echo $gallery->toHTML(GALLERY_CONTACT_ID);
    }
    
    else
    {
        
/* Print the main page */
        
echo $gallery->toHTML();
    }
    
    
    function 
requesting($what)
    {
        if (
preg_match('#^[0-9]+$#'$_GET[$what]))
        {
            return (int) 
$_GET[$what];
        }
        
        else
        {
            return 
0;
        }
    }

?>

< < < Click here to go back to the main site