Update of /cvsroot/openfirst/photogallery
In directory sc8-pr-cvs1:/tmp/cvs-serv11551
Added Files:
photogallery.php
Log Message:
initial upload
--- NEW FILE: photogallery.php ---
<?php
/*
* openFIRST.photogallery - photogallery.php
*
* Copyright (C) 2003,
* openFIRST Project
* Original Author: David Di Biase <dav...@ea...>
*
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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.
* This program 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
// NOTE: The galleryrandimg() function still needs to be developed, although will not be available yet for time restraints.
// Function to preview images from any gallery on command.
function galleryimage($gallery,$image,$option = true,$height = "",$width = ""){
// Call global basepath variable for use in this function
global $basepath;
// If option is true then preview the image as a thumb else no thumb
$query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '$gallery'");
$thisgallery = mysql_fetch_object($query);
if($option){
echo "<a href='$basepath/photogallery/viewphoto.php?ID=$gallery&PHOTO=$image'><img border='0' alt='Gallery Image' height='$height' width='$width' src='$basepath/photogallery/gallery/$thisgallery->GalleryName/thumbs/$image'></a>";
}else{
echo "<a href='$basepath/photogallery/viewphoto.php?ID=$gallery&PHOTO=$image'><img border='0' alt='Gallery Image' height='$height' width='$width' src='$basepath/photogallery/gallery/$thisgallery->GalleryName/$image'></a>";
}
}
?>\
|