답변 1개 / 댓글 1개
채택된 답변
+20 포인트
<ul class="gall_con"> <!-- 이미지 출력 -->
<li class="gall_href" style="padding:4px; border:1px solid #ddd;">
<a href="<?php echo $list[$i]['href'] ?>">
<?php
// $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $thumb_width, $thumb_height); // 썸네일 크기를 위에서 선언한 크기사용
if($thumb['src']) {
// $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$thumb_width.'" height="'.$thumb_height.'">';
} else {
// $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
$img_content = '<span style="width:'.$thumb_width.'px;height:'.$thumb_height.'px">no image</span>';
}
echo $img_content;
?>
</a>
</li>
</ul>
<li class="gall_href" style="padding:4px; border:1px solid #ddd;">
<a href="<?php echo $list[$i]['href'] ?>">
<?php
// $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $thumb_width, $thumb_height); // 썸네일 크기를 위에서 선언한 크기사용
if($thumb['src']) {
// $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$thumb_width.'" height="'.$thumb_height.'">';
} else {
// $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
$img_content = '<span style="width:'.$thumb_width.'px;height:'.$thumb_height.'px">no image</span>';
}
echo $img_content;
?>
</a>
</li>
</ul>
답변을 작성하려면 로그인이 필요합니다.