썸네일 -> 기본 이미지)
$img_url = '';
// 1. 원본 파일 확인
$sql_file = " select bf_file from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' order by bf_no limit 1 ";
$row_file = sql_fetch($sql_file);
if ($row_file['bf_file']) {
$img_url = G5_DATA_URL.'/file/'.$bo_table.'/'.$row_file['bf_file'];
}
// 2. 원본 파일이 없으면 썸네일 확인
if (!$img_url) {
$thumb = get_list_thumbnail($bo_table, $row['wr_id'], '1240', '750', true, true);
if ($thumb['src']) {
$img_url = $thumb['src'];
}
}
// 3. 둘 다 없으면 기본 이미지
if (!$img_url) {
$img_url = G5_THEME_URL.'/rb.img/no_image.png';
}
// 원본 이미지 경로 (팝업용)
$ori_url = $img_url;
// 제목과 요약 내용 (wr_subject, wr_1)
$subject = cut_str(get_text($row['wr_subject']), 100);
$summary = get_text($row['wr_1']); // wr_1에 저장된 요약 내용
// 링크 URL (wr_link1 사용)
$link_url = $row['wr_link1'];
// 💡 [수정] 링크가 있으면 바로 이동, 없으면 팝업
$click_action = '';
$cursor_style = '';
if ($link_url) {
$click_action = "onclick=\"window.open('{$link_url}', '_blank');\"";
$cursor_style = 'cursor: pointer;';
} else {
$click_action = "onclick=\"openLightbox('{$ori_url}');\""; // 팝업 함수 호출
$cursor_style = 'cursor: zoom-in;';
}
?>
등록된 광고 데이터가 없습니다.