From 1154d140c1c5f4c1737b1ae641273b49c25bc8e8 Mon Sep 17 00:00:00 2001 From: KWON Date: Wed, 9 Jul 2025 10:07:54 +0900 Subject: [PATCH] =?UTF-8?q?=EC=83=81=ED=83=9C=20=EB=B0=8F=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC=20=EC=9A=B0=EC=84=A0=EC=88=9C=EC=9C=84=EB=A5=BC=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=ED=95=98=EA=B3=A0=20=EA=B7=B8=EC=97=90=20?= =?UTF-8?q?=EB=94=B0=EB=9D=BC=20=EC=A0=95=EB=A0=AC=20=EC=B6=9C=EB=A0=A5,?= =?UTF-8?q?=20=EC=83=81=ED=83=9C=EB=A5=BC=20=EC=84=A4=EC=A0=95=ED=96=88?= =?UTF-8?q?=EA=B8=B0=20=EB=95=8C=EB=AC=B8=EC=97=90=20=EB=82=A0=EC=A7=9C?= =?UTF-8?q?=EB=A5=BC=20if=EB=A1=9C=20=EB=B0=9B=EC=95=84=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=ED=95=98=EB=8D=98=20=EB=B6=80=EB=B6=84=EC=9D=84=20swi?= =?UTF-8?q?tch=20=EB=A1=9C=20=EB=B3=80=EA=B2=BD=ED=95=98=EC=97=AC=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../latest/rb.latest.event/latest.skin.php | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/theme/rb.basic/skin/latest/rb.latest.event/latest.skin.php b/theme/rb.basic/skin/latest/rb.latest.event/latest.skin.php index f729d3198..db42a5821 100644 --- a/theme/rb.basic/skin/latest/rb.latest.event/latest.skin.php +++ b/theme/rb.basic/skin/latest/rb.latest.event/latest.skin.php @@ -107,6 +107,45 @@ $rb_skin['md_auto_is'] 자동롤링 여부(1,0)
$end_date) { + $item['_status'] = '종료'; // 종료 + $item['_sort'] = 3; + } else { + $item['_status'] = '진행'; // 진행 중 + $item['_sort'] = 0; + } + } else { + $item['_status'] = '기타'; + $item['_sort'] = 9; + } + + // 시작일 없을 경우를 고려한 비교용 날짜 (미입력 시 최후순) + $item['_start_date'] = $start_date ? $start_date : '9999-99-99'; + } + unset($item); + + // 정렬: 상태 우선순위(_sort) → 시작일(_start_date) + usort($list, function ($a, $b) { + if ($a['_sort'] === $b['_sort']) { + return strcmp($a['_start_date'], $b['_start_date']); + } + return $a['_sort'] <=> $b['_sort']; + }); + + // 정렬 후 list_count 재설정 (안전) + $list_count = count($list); + for ($i=0; $i<$list_count; $i++) { //썸네일 @@ -139,6 +178,18 @@ $rb_skin['md_auto_is'] 자동롤링 여부(1,0) $end_date = isset($list[$i]['wr_2']) ? $list[$i]['wr_2'] : ''; $rb_ev_ico = ''; + switch ($list[$i]['_status']) { + case '예정': + $rb_ev_ico = '예정'; + break; + case '종료': + $rb_ev_ico = '종료'; + break; + case '진행': + $rb_ev_ico = '진행'; + break; + } + /* switch 로 대체 if($start_date && $end_date) { if ($todays < $start_date) { // 진행 전 @@ -151,6 +202,7 @@ $rb_skin['md_auto_is'] 자동롤링 여부(1,0) $rb_ev_ico = '진행'; } } + */ ?>