20) $md_gap = (isset($module_config['md_gap']) && $module_config['md_gap'] !== '') ? (int)$module_config['md_gap'] : 20; $md_gap_mo = (isset($module_config['md_gap_mo']) && $module_config['md_gap_mo'] !== '') ? (int)$module_config['md_gap_mo'] : 15; if ($md_cnt > 0) { $limit_count = $md_cnt; } elseif ($md_col > 0 && $md_row > 0) { $limit_count = $md_col * $md_row; } else { $limit_count = 4; } // 썸네일 출력 여부 $is_thumb = isset($module_config['md_thumb_is']) ? $module_config['md_thumb_is'] : '1'; $write_table = $g5['write_prefix'] . $bo_table; // 💡 [추가] 팝업 내 링크 이동 방식 설정 (button, image, both) $link_type = 'image'; // 기본값: 이미지 클릭 시 이동 // 💡 [수정] 노출 조건 추가 (숨김, 예약 노출) $today = G5_TIME_YMD; // 오늘 날짜 (YYYY-MM-DD) $sql_where = " wr_is_comment = 0 "; // 기본 조건: 댓글 제외 // 1. 숨김 설정 (wr_10) 체크: 값이 없거나 0인 경우만 노출 $sql_where .= " AND (wr_10 = '' OR wr_10 IS NULL OR wr_10 = '0') "; // 2. 노출 방식 (wr_9) 체크: 즉시 노출이거나, 예약 기간 내인 경우 $sql_where .= " AND ( wr_9 != 'RESERVED' OR (wr_9 = 'RESERVED' AND wr_2 <= '{$today}' AND wr_3 >= '{$today}') ) "; // 데이터베이스에서 데이터 가져오기 (wr_id 역순) $sql = " SELECT * FROM {$write_table} WHERE {$sql_where} ORDER BY wr_num, wr_reply LIMIT 0, {$limit_count} "; $result = sql_query($sql); // 고유 ID 생성 (스타일 격리용) $module_uid = 'pns_fix_' . uniqid(); ?>