= NOW() ORDER BY bn_order ASC, bn_id DESC "; $result = sql_query($sql); $fixed_banners = []; $slide_groups = []; while ($row = sql_fetch_array($result)) { $row['bn_img'] = '' . get_text($row['bn_alt']) . ''; if (isset($row['bn_group']) && !empty($row['bn_group'])) { $slide_groups[$row['bn_group']][] = $row; } else { $fixed_banners[] = $row; } } $md_banner_skin = isset($module_config['md_banner_skin']) && $module_config['md_banner_skin'] !='' ? $module_config['md_banner_skin'] : 'image_only'; $item_skin_file = G5_PATH . '/rb/' . $md_banner_skin . '/skin.php'; $css_vars = [ '--fixed-columns: ' . (int)$premium_ad_config['fixed_grid_columns'], '--banner-width: ' . (int)$premium_ad_config['banner_width'] . 'px', '--banner-height: ' . (int)$premium_ad_config['banner_height'] . 'px', '--banner-gap: ' . (int)$premium_ad_config['banner_gap'] . 'px', ]; $visual_id = 'pas_' . uniqid(); ?>
'; include($item_skin_file); echo '
'; } } ?>
$banners): $columns = (int)$premium_ad_config['fixed_grid_columns']; $chunk_size = $columns * 2; $banner_rows = array_chunk($banners, $chunk_size); ?> $banners_in_row): // 💡 [핵심 수정] 현재 행의 배너 개수를 확인합니다. $current_count = count($banners_in_row); // 배너 개수가 설정된 컬럼 수보다 적으면, 그 개수만큼만 보여줘서 꽉 채웁니다. // 예: 6개 설정인데 3개만 남았다면, slidesPerView를 3으로 설정 -> 3개가 100% 너비 차지 $slides_per_view = ($current_count < $columns) ? $current_count : $columns; ?>
등록된 배너가 없습니다.