images = $images;
}
function addImage($image) {
$this->images[count($this->images)] = $image;
}
function nextImage() {
if(array_key_exists($this->cur_image + 1,$this->images)) {
$this->cur_image = $this->cur_image + 1;
return $this->images[$this->cur_image];
} else {
return 0;
}
}
}
?>
Պատկերասրահի մասին
Վերջին 12 նոր նկարները
addImage($artist_image_row['ImageID']);
}
$k = 0;
$image_list = array();
while($k < 12 ){
foreach($artists_images as $id => $artist){
$img_id = $artists_images[$id]->nextImage();
if($img_id) {
if($k >= 12 ) break;
$k+=1;
$image_list[] = array('ArtistID'=> $id ,'ImageID' => $img_id);
}
}
if($k >= 12 ) break;
}
echo '
|
';
$g = 0;
foreach($image_list as $image) {
$img_src = realpath('../artists_files/'.$image['ArtistID'].'/ArtistImages/'.$image['ImageID'].'_small.jpg');
if(!file_exists($img_src)) { continue; }
$img_url = '../artists_files/' . $image['ArtistID'] . '/ArtistImages/' . $image['ImageID'] . '_small.jpg';
list($img_w,$img_h) = getimagesize($img_src);
$img_size = "";
if($img_w > 90 || $img_h > 70) {
if($img_w < $img_h) {
$img_size = 'height="70"';
} else {
$img_size = 'width="90"';
}
}
echo '
';
}
echo '
|
';
@mysql_close();
?>