// Hack for new Go Daddy hosting
$subdirectory = "/_uwphoto.net/";
$root=$_SERVER["DOCUMENT_ROOT"].$subdirectory;
require("$root/php/sql.php");
$page_title="Gallery of Fine art Underwater Photography by Jim Christensen";
$page_description="A gallery of wallpapers for your desktop by Jim Christensen";
$page_keywords="underwater photography, photographic opportunities, underwater explorations, Jim Christensen";
require("$root/php/header.php");
function show_gallery($index)
{
global $root;
$photo=array("Photo","Image","Wallpaper","Picture");
$photo=$photo[mt_rand(0,3)];
if($index=="fav")
{
// 'Favorite Images Function (Uses a double query)
$query="SELECT file, Count(file) AS fav_count FROM pop_wallpapers GROUP BY file order by fav_count DESC limit 18";
$result=@mysql_query($query);
if($result)
{
$rows=mysql_num_rows($result);
mysql_data_seek($result,mt_rand(0,$rows-1));
$wallpaper=mysql_fetch_array($result);
$query="SELECT * FROM wallpapers WHERE file = '$wallpaper[file]'";
$gallery['title']="Favorite ".$photo."s";
$gallery['description']="The most popular ".$photo."s";
$photo="";
}
}
else
{
// Grab the title and description from the uwphoto_galleries table
$query="SELECT * FROM galleries WHERE ID=$index LIMIT 1";
$result=mysql_query($query);
$gallery=mysql_fetch_array($result);
// Grab a random image from the uwphoto_wallpapers table
$query="SELECT * FROM wallpapers WHERE gallery=$index ORDER BY rand() LIMIT 1";
}
$result=@mysql_query($query);
if($result)
{
$wallpaper=mysql_fetch_array($result);
$img_data=getimagesize("$root/content/$wallpaper[dir]/thumb_small/$wallpaper[file].jpg");
?>
|
=$gallery['title']?>
=$gallery['description']?>
|
}
}
?>
$ad_page="gallery-index" //************************** Page Starts here ************************ ?>

include("$root/php/adsense.php");
include("$root/php/adsense.php");
?>
|
 |

show_gallery('fav');
show_gallery(14);
show_gallery(13);
show_gallery(12);
show_gallery(11);
show_gallery(9);
show_gallery(8);
show_gallery(4);
show_gallery(7);
show_gallery(1);
show_gallery(2);
show_gallery(3);
show_gallery(5);
show_gallery(6);
?>
Click on an image to enter gallery.
|
|
|
require("$root/php/footer.php")?>