// Create a Gallery from the database
function PhotoThumbs($NumCols,$PageKey)
{
$myKey = $PageKey;
if($myKey == null)
{
$myKey = 0;
}
$myCols = $NumCols;
if($myCols == null)
{
$myCols = 3;
}
elseif($myCols < 1)
{
$myCols = 1;
}
require("../theFireRing/phputility/util.php");
$sql = new MySQL_class;
$sql->Create("");
$myQuery = "SELECT T.PhotoKey, T.ThumbFolder, T.ThumbName, T.WallpaperFolder, T.WallpaperName1024x768, T.WallpaperName800x600 FROM Photos T WHERE T.PageKey = $myKey ORDER BY T.DisplayOrder ";
$sql->Query($myQuery);
if($sql->rows < 1)
{
echo("
photos coming soon ");
}
else
{
echo("
");
echo(" "); if($row[WallpaperName1024x768] != null) { echo("Wallpaper 1024x768 "); } if($row[WallpaperName800x600] != null) { echo("Wallpaper 800x600 "); } echo(" | ");
// have we filled all the columns? if so close the row and reset the counter.
if($Count==$myCols)
{
echo(""); } echo(""); } echo(" |
";
if($useThickBox==true)
{
$output .= " "; } else { $output .= " "; } $output .= ""; $output .= " "; if($row[WallpaperName1024x768] != null) { $output .= "Wallpaper 1024x768 "; } if($row[WallpaperName800x600] != null) { $output .= "Wallpaper 800x600 "; } $output .= " | ";
// have we filled all the columns? if so close the row and reset the counter.
if($Counter==$myCols)
{
$output .= ""; } $output .= ""; } $output .= " |
"; if($useThickBox==true) { $output .= ""; } else { $output .= ""; } $output .= ""; $output .= ""; $output .= " | "; // have we filled all the columns? if so close the row and reset the counter. if($Counter==$myCols) { $output .= ""; } $output .= ""; } $output .= " |
Before TV, before newspapers, even before we moved into houses...
the fire ring was the gathering place to tell stories and share personal experiences. |
|