갤러리 이미수가 0 일 경우 Division by zero 오류 나오지 않도록 조치
This commit is contained in:
@ -64,9 +64,9 @@ if ($is_member && ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id'
|
|||||||
// 정렬에 사용하는 QUERY_STRING
|
// 정렬에 사용하는 QUERY_STRING
|
||||||
$qstr2 = 'bo_table='.$bo_table.'&sop='.$sop;
|
$qstr2 = 'bo_table='.$bo_table.'&sop='.$sop;
|
||||||
|
|
||||||
if ($board['bo_gallery_cols']) {
|
// 0 으로 나눌시 오류를 방지하기 위하여 값이 없으면 1 로 설정
|
||||||
$td_width = (int)(100 / $board['bo_gallery_cols']);
|
$bo_gallery_cols = $board['bo_gallery_cols'] ? $board['bo_gallery_cols'] : 1;
|
||||||
}
|
$td_width = (int)(100 / $bo_gallery_cols);
|
||||||
|
|
||||||
// 정렬
|
// 정렬
|
||||||
// 인덱스 필드가 아니면 정렬에 사용하지 않음
|
// 인덱스 필드가 아니면 정렬에 사용하지 않음
|
||||||
|
|||||||
@ -46,13 +46,13 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
|
|||||||
|
|
||||||
<ul id="bo_img_list">
|
<ul id="bo_img_list">
|
||||||
<? for ($i=0; $i<count($list); $i++) {
|
<? for ($i=0; $i<count($list); $i++) {
|
||||||
if($i>0 && ($i % $board['bo_gallery_cols'] == 0))
|
if($i>0 && ($i % $bo_gallery_cols == 0))
|
||||||
$style = 'clear:both;';
|
$style = 'clear:both;';
|
||||||
else
|
else
|
||||||
$style = '';
|
$style = '';
|
||||||
if ($i == 0) $k = 0;
|
if ($i == 0) $k = 0;
|
||||||
$k += 1;
|
$k += 1;
|
||||||
if ($k % $board['bo_gallery_cols'] == 0) $style .= "margin:0 !important;";
|
if ($k % $bo_gallery_cols == 0) $style .= "margin:0 !important;";
|
||||||
?>
|
?>
|
||||||
<li class="bo_img_list_li <? if ($wr_id == $list[$i]['wr_id']) { ?>bo_img_now<? } ?>" style="<?=$style?>">
|
<li class="bo_img_list_li <? if ($wr_id == $list[$i]['wr_id']) { ?>bo_img_now<? } ?>" style="<?=$style?>">
|
||||||
<? if ($is_checkbox) { ?><input type="checkbox" name="chk_wr_id[]" value="<?=$list[$i]['wr_id']?>" title="<?=$list[$i]['wr_subject']?> 선택"><? } ?>
|
<? if ($is_checkbox) { ?><input type="checkbox" name="chk_wr_id[]" value="<?=$list[$i]['wr_id']?>" title="<?=$list[$i]['wr_subject']?> 선택"><? } ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user