//echo $galleryID;
// In here we need to insert the gallery stuff.
// ******************************************************************************************************
$dc->query("SELECT Favorites.* FROM Favorites WHERE Favorites.GalleryID='$galleryID' ORDER BY Favorites.ID DESC");
$nums = $dc->num_rows();
$dc->next_record();
if ($eid=="")
{
$eid=$nums;
}
for ($i=0;$i<$dc->num_rows();$i++)
{
$thisGalleryItem=$dc->get("ArtworkID");
$rc->query("SELECT artworks.* FROM artworks WHERE artworks.ID='$thisGalleryItem' ORDER BY artworks.displayorder ASC");
$rc->next_record();
// $thisart=$rc->get("ID");
$thisart=$thisGalleryItem;
$thisname=$rc->get("name");
$thismedium=$rc->get("medium");
$avail=$rc->get("availability");
$size=$rc->get("dimensions");
$imagefile=$rc->get("imagename");
$reg_ex = '"';
$replace_word = "%22";
$replacesize= ereg_replace($reg_ex, $replace_word, $size);
$reg_ex = '
';
$replace_word = " ";
$thisname= ereg_replace($reg_ex, $replace_word, $thisname);
// So what we really want is to move the image down so that it's vertically centered.
$topOffset=0;
$currImage="./images/".$imagefile;
$aSize = getimagesize($currImage);
$iWidth = $aSize[0];
$iHeight= $aSize[1];
// if it's taller than wide, we do nothing. If wider than tall, we need to figur how much to shift down.
if ($iWidth > $iHeight) {
// if ($iHeight > 350) $iHeight=350;
$topOffset=(100-(($iHeight/$iWidth) * 100))/2;
}
$detailString="'".$thisname."','".$thismedium."','".$avail."','".$replacesize."','".$imagefile."'";
?>
$dc->next_record();
}
//**************************************************************************************************************
?>