<? // Written by Joseph E Rubenstein email: hide@address.com
// Creative Digital Design Ltd. Beijing China
//SET variables used by this CLASS
class ImageInclude {
var $width_L,
$height_L,
$width_S,
$height_S,
$image_aspratio,
$small_tag,
$large_tag;
//dynamically size the thumbnail, and prepare div tags for the display
function size_image() {
$this->photodim_L = getimagesize($this->path.$this->photo_file.$this->file_extension);
$this->width_L = $this->photodim_L['0'];
$this->height_L = $this->photodim_L['1'];
$this->image_aspratio = $this->width_L/$this->height_L;
$this->width_S = $this->thumbnail_width;
$this->height_S = $this->thumbnail_width / $this->image_aspratio;
$this->small_tag = $this->photo_file."SMALL";
$this->large_tag = $this->photo_file."LARGE";
}
// DISPLAY code for the thumbnail DIV and larger DIV - only one is visable at a time.
function display_image() {
//display small image
echo '<SPAN ID="'.$this->small_tag.'" class="boximage_'.$this->float.'" onmouseover="'.$this->large_tag.'.style.display=\'\','.$this->small_tag.'.style.display=\'none\'">';
echo '<img src="'.$this->path.$this->photo_file.$this->file_extension.'" width="'.$this->width_S.'" height="'.$this->height_S.'" alt=\'Mouse Over for Larger Image\'>';
echo '</SPAN>';
//display large image
echo '<span ID="'.$this->large_tag.'" class="boximage_'.$this->float.'" STYLE="display:none" onclick="'.$this->large_tag.'.style.display=\'none\','.$this->small_tag.'.style.display=\'\'">';
echo '<img src="'.$this->path.$this->photo_file.$this->file_extension.'" width="'.$this->width_L.'" height="'.$this->height_L.'" alt=\'Click Once To Shrink Image\'>';
echo '</SPAN>';
}
}
?>