first commit 2

This commit is contained in:
hmw1001
2026-06-11 18:47:38 +09:00
parent c768729ce6
commit 6f534e33a6
11095 changed files with 1595758 additions and 0 deletions
@@ -0,0 +1,234 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
$rb_skin = sql_fetch (" select * from {$rb_module_table} where md_id = '{$options}' "); //최신글 환경설정 테이블 조회 (삭제금지)
$thumb_width = 180;
$thumb_height = 150;
if(isset($rb_skin['md_title']) && $rb_skin['md_title']) {
$bo_subjects = $rb_skin['md_title'];
}
/*
모듈설정 연동 변수
$rb_skin['md_id'] 설정ID
$rb_skin['md_layout'] 레이아웃 섹션ID
$rb_skin['md_layout_name'] 레이아웃 스킨명
$rb_skin['md_theme'] 테마명
$rb_skin['md_title'] 타이틀(제목)
$rb_skin['md_bo_table'] 게시판ID
$rb_skin['md_skin'] 스킨명
$rb_skin['md_cnt'] 출력갯수
$rb_skin['md_col'] 행갯수
$rb_skin['md_row'] 열갯수
$rb_skin['md_col_mo'] 행갯수(모바일)
$rb_skin['md_row_mo'] 열갯수(모바일)
$rb_skin['md_gap'] 게시물 간격(여백)
$rb_skin['md_gap_mo'] 모바일 게시물 간격(여백)
$rb_skin['md_width'] 가로사이즈
$rb_skin['md_height'] 세로사이즈
$rb_skin['md_auto_time'] 자동롤링 시간
$rb_skin['md_thumb_is'] 썸네일 출력여부(1,0)
$rb_skin['md_nick_is'] 닉네임 출력여부(1,0)
$rb_skin['md_date_is'] 작성일 출력여부(1,0)
$rb_skin['md_content_is'] 본문내용 출력여부(1,0)
$rb_skin['md_icon_is'] 아이콘 출력여부(1,0)
$rb_skin['md_comment_is'] 댓글수 출력여부(1,0)
$rb_skin['md_swiper_is'] 스와이프 여부(1,0)
$rb_skin['md_auto_is'] 자동롤링 여부(1,0)
$rb_skin['md_tab_skin'] 탭 스킨명
$rb_skin['md_tab_list'] 탭 설정
*/
?>
<link rel="stylesheet" href="<?php echo $latest_skin_url ?>/style.css?ver=<?php echo G5_SERVER_TIME ?>">
<div class="bbs_main">
<!-- 제목 영역 -->
<ul class="bbs_main_wrap_tit" style="display:<?php echo (isset($rb_skin['md_title_hide']) && $rb_skin['md_title_hide'] == '1') ? 'none' : 'block'; ?>">
<li class="bbs_main_wrap_tit_l">
<a href="javascript:void(0);">
<h2 class="<?php echo isset($rb_skin['md_title_font']) ? $rb_skin['md_title_font'] : 'font-B'; ?>" style="color:<?php echo isset($rb_skin['md_title_color']) ? $rb_skin['md_title_color'] : '#25282b'; ?>; font-size:<?php echo isset($rb_skin['md_title_size']) ? $rb_skin['md_title_size'] : '20'; ?>px; "><?php echo $bo_subjects ?></h2>
</a>
</li>
<li class="cb"></li>
</ul>
<div class="latest-tabs-wrap">
<!-- 탭 { -->
<?php if (count($tabs) > 1): ?>
<nav class="bo_tab swiper-container swiper-container-tab-<?php echo $rb_skin['md_id']; ?>">
<ul class="bo_tab_ul swiper-wrapper swiper-wrapper-tab-<?php echo $rb_skin['md_id']; ?>">
<?php foreach ($tabs as $i => $tab): ?>
<li class="swiper-slide swiper-slide-tab-<?php echo $rb_skin['md_id']; ?>">
<a href="javascript:void(0);" data-tab="tab-<?php echo $rb_skin['md_id'].'-'.$i; ?>" class="<?php echo $i == 0 ? 'active' : ''; ?>">
<?php echo $tab['bo_subject']; ?><?php if ($tab['sca']) echo ' / ' . $tab['sca']; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</nav>
<script>
$(document).ready(function() {
setTimeout(function() {
var swiper = new Swiper('.swiper-container-tab-<?php echo $rb_skin['md_id']; ?>', {
slidesPerView: 'auto',
spaceBetween: 5,
touchRatio: 1,
observer: true,
observeParents: true
});
}, 50);
});
</script>
<?php endif; ?>
<!-- } -->
<div class="latest-tab-wrap">
<!-- 탭별 콘텐츠 -->
<?php foreach ($tabs as $i => $tab): ?>
<?php
$list = $tab['list'];
$list_count = count($list);
$bo_table = $tab['bo_table'];
$cate = $tab['sca'];
?>
<div class="latest-tab-content<?php echo $i == 0 ? ' active' : ''; ?>" id="tab-<?php echo $rb_skin['md_id'].'-'.$i; ?>">
<?php
if(isset($cate) && $cate) {
$links_url = get_pretty_url($bo_table,'','sca='.urlencode($cate));
} else {
$links_url = get_pretty_url($bo_table);
}
?>
<button type="button" class="more_btn" onclick="location.href='<?php echo $links_url ?>';" style="display:<?php echo (isset($rb_skin['md_title_hide']) && $rb_skin['md_title_hide'] == '1') ? 'none' : 'block'; ?>">더보기</button>
<div class="rb_swiper" id="rb_swiper_<?php echo $rb_skin['md_id'].'_'.$i ?>" data-pc-w="<?php echo $rb_skin['md_col'] ?>" data-pc-h="<?php echo $rb_skin['md_row'] ?>" data-mo-w="<?php echo $rb_skin['md_col_mo'] ?>" data-mo-h="<?php echo $rb_skin['md_row_mo'] ?>" data-pc-gap="<?php echo $rb_skin['md_gap'] ?>" data-mo-gap="<?php echo $rb_skin['md_gap_mo'] ?>" data-autoplay="<?php echo $rb_skin['md_auto_is'] ?>" data-autoplay-time="<?php echo $rb_skin['md_auto_time'] ?>" data-pc-swap="<?php echo $rb_skin['md_swiper_is'] ?>" data-mo-swap="<?php echo $rb_skin['md_swiper_is'] ?>">
<div class="rb_swiper_inner">
<div class="rb-swiper-wrapper swiper-wrapper">
<?php foreach ($list as $row): ?>
<?php
$thumb = get_list_thumbnail($bo_table, $row['wr_id'], $thumb_width, $thumb_height, false, true);
$img = ($thumb['src'] && !strstr($row['wr_option'], 'secret')) ? $thumb['src'] : (strstr($row['wr_option'], 'secret') ? G5_THEME_URL.'/rb.img/sec_image.png' : G5_THEME_URL.'/rb.img/no_image.png');
$thumb_alt = $thumb['alt'] ?: '이미지';
$wr_href = get_pretty_url($bo_table, $row['wr_id']);
$wr_content = strip_tags($row['wr_content']);
$is_secret = strstr($row['wr_option'], 'secret');
?>
<div class="rb_swiper_list">
<div>
<?php if ($rb_skin['md_thumb_is']): ?>
<ul class="bbs_main_wrap_con_ul1">
<a href="<?php echo $wr_href ?>">
<img src="<?php echo $img ?>" alt="<?php echo $thumb_alt ?>" class="skin_list_image">
</a>
<?php if($rb_skin['md_icon_is'] == 1) { //모듈설정:아이콘 출력여부(1,0)?>
<div class="icon_abs">
<?php if ($row['icon_new']) echo "<span class=\"bbs_list_label label3\">새글</span>"; ?>
<?php if ($row['icon_hot']) echo "<span class=\"bbs_list_label label1\">인기</span>"; ?>
</div>
<?php } ?>
</ul>
<?php endif; ?>
<ul class="bbs_main_wrap_con_ul2" style="<?php echo !$rb_skin['md_thumb_is'] ? 'padding-left:0px !important; min-height:36px;' : '' ?>">
<?php if($rb_skin['md_subject_is']): ?>
<li class="bbs_main_wrap_con_subj cut">
<a href="<?php echo $wr_href ?>" class="font-B"><?php echo $row['subject'] ?></a>
</li>
<?php endif; ?>
<?php if($rb_skin['md_content_is']): ?>
<li class="bbs_main_wrap_con_cont">
<?php if ($is_secret): ?>
<a href="<?php echo $wr_href ?>" style="opacity:0.6" class="cut2">작성자 및 관리자 외 열람할 수 없습니다.<br>비밀글 기능으로 보호된 글입니다.</a>
<?php else: ?>
<a href="<?php echo $wr_href ?>" class="cut2"><?php echo $wr_content ?></a>
<?php endif; ?>
</li>
<?php endif; ?>
<?php if($rb_skin['md_nick_is'] || $rb_skin['md_date_is'] || $rb_skin['md_comment_is']): ?>
<li class="bbs_main_wrap_con_info">
<?php if($rb_skin['md_nick_is']) echo '<span class="prof_tiny_name font-B">'.$row['wr_name'].'</span>'; ?>
<?php if($rb_skin['md_date_is']) echo passing_time($row['wr_datetime']).' '; ?>
<?php if($rb_skin['md_ca_is']) echo $row['ca_name'].' '; ?>
<?php if($rb_skin['md_comment_is'] && $row['wr_comment']) echo '댓글 '.number_format($row['wr_comment']).' '; ?>
조회 <?php echo number_format($row['wr_hit']) ?>
</li>
<?php endif; ?>
</ul>
<div class="cb"></div>
</div>
</div>
<?php endforeach; ?>
<?php if ($list_count == 0): ?>
<div class="no_data" style="width:100% !important;">데이터가 없습니다.</div>
<?php endif; ?>
</div>
</div>
<?php if($rb_skin['md_swiper_is']): ?>
<div class="rb_swiper_paging_btn" style="display:<?php echo (isset($rb_skin['md_title_hide']) && $rb_skin['md_title_hide'] == '1') ? 'none' : 'block'; ?>">
<button type="button" class="swiper-button-prev rb-swiper-prev">
<img src="<?php echo G5_THEME_URL ?>/rb.img/icon/arr_prev.svg">
</button>
<button type="button" class="swiper-button-next rb-swiper-next">
<img src="<?php echo G5_THEME_URL ?>/rb.img/icon/arr_next.svg">
</button>
</div>
<?php endif; ?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<script>
$(document).on('click', '.swiper-slide-tab-<?php echo $rb_skin['md_id']; ?> a', function(e) {
e.preventDefault();
const $this = $(this);
const targetId = $this.data('tab');
const $wrap = $this.closest('.latest-tabs-wrap');
// 탭 버튼 상태 변경
$wrap.find('.swiper-slide-tab-<?php echo $rb_skin['md_id']; ?> a')
.removeClass('active');
$this.addClass('active');
// 탭 콘텐츠 전환
$wrap.find('.latest-tab-content').removeClass('active');
const $targetTab = $wrap.find('#' + targetId).addClass('active');
// 탭 콘텐츠가 보이도록 된 후 슬라이더 초기화
setTimeout(() => {
// Swiper 초기화는 보이는 상태에서만 실행
$targetTab.find('.rb_swiper').each(function() {
if (!$(this).hasClass('swiper-initialized')) {
// 이미 초기화된 게 아니면 실행
setupResponsiveSlider($(this));
}
});
}, 10);
});
</script>
@@ -0,0 +1,71 @@
@charset "utf-8";
/* 탭 메뉴 */
.latest-tabs li a {
color: #333;
}
.latest-tabs li a.active {
color: #000;
}
.latest-tabs-wrap {padding-top: 0px; margin-top: 0px;}
.latest-tab-wrap {padding-top: 15px;}
/* 콘텐츠 컨테이너 */
.latest-tab-content {
visibility: hidden;
height: 0;
overflow: hidden;
opacity: 0;
transition: opacity 0.2s ease;
}
.latest-tab-content.active {
visibility: visible;
height: auto;
opacity: 1;
}
.latest-tabs-wrap .bo_tab {margin-bottom: 0px; display: flex;}
.latest-tabs-wrap .bo_tab .bo_tab_ul {flex:1; position: relative;}
.latest-tabs-wrap .bo_tab a {display: inline-flex; padding: 5px 15px; border:0px; font-size: 16px; color:#888; background-color: transparent; line-height: 100%; position: relative; font-size: 14px;}
.latest-tabs-wrap .bo_tab a:first-child {padding-left: 0px;}
.latest-tabs-wrap .bo_tab a:hover {background-color: transparent; font-family:'font-B',sans-serif;}
.latest-tabs-wrap .bo_tab a.active {background-color: transparent; font-weight: normal; box-shadow: none; color:#25282B; border:0px; font-family:'font-B',sans-serif;}
.latest-tabs-wrap .bo_tab li {padding: 0px; display: inline-block; width: auto !important;}
.latest-tabs-wrap .bo_tab #bo_cate_ul:before {content: "";bottom: 0;position: absolute;width: 100%;margin: 0;height: 1px;background-color: rgba(0, 0, 0, .1);}
.latest-tabs-wrap .bo_tab #bo_cate_on::after {content: "";position: absolute;bottom: 0;right: 20px;left: 0px;height: 2px;background-color: currentColor;}
.latest-tabs-wrap .no_data {padding-top: 40px !important; padding-bottom: 45px !important; border-bottom: 0px !important; margin-top:0px !important;}
.latest-tab-content dd {position: relative;}
.latest-tab-content .more_btn {position: absolute; top:0px; right:0px;}
.latest-tab-content dd:last-child {margin-bottom: 0px;}
.latest-tab-content .bbs_main_wrap_con_ul1 {position: absolute; top:0px; left: 0px; padding-right: 30px; box-sizing: border-box;}
.latest-tab-content .bbs_main_wrap_con_ul1 img {width: 115px; height:95px; border-radius: 10px; object-fit: cover;}
.latest-tab-content .bbs_main_wrap_con_ul2 {width: 100%; padding-left: 144px; min-height: 95px;}
.latest-tab-content .bbs_main_wrap_con_subj {font-size: 20px;}
.latest-tab-content .bbs_main_wrap_con_cont {font-size: 14px; color:#666; word-break: keep-all; margin-top: 5px; min-height: 36px;}
.latest-tab-content .bbs_main_wrap_con_cont a {color:#666; font-size: 15px;}
.latest-tab-content .bbs_main_wrap_con_info {font-size: 12px; color:#999; margin-top: 10px;}
.latest-tab-content .bbs_main_wrap_con_writer {margin-top: 10px;}
.latest-tab-content .bbs_main_wrap_con_writer span {display: inline-block;}
.latest-tab-content .prof_tiny_image img {width: 30px; height:auto; border-radius: 50%; margin-right: 5px;}
.latest-tab-content .prof_tiny_name {font-size: 12px; color:#999; line-height: 20px; margin-right: 10px;}
.latest-tab-content .bbs_list_label {font-size: 11px;border-radius: 4px;padding-left: 5px;padding-right: 5px;padding-top: 3px;padding-bottom: 2px;}
.latest-tab-content .icon_abs {position: absolute; right:40px; top:10px;}
.latest-tab-content .bbs_list_label.label1 {background-color: #FFC700; color:#fff;}
.latest-tab-content .bbs_list_label.label2 {background-color: #00A3FF; color:#fff;}
.latest-tab-content .bbs_list_label.label3 {background-color: #8ED100; color:#fff;}
.latest-tab-content .bbs_list_label.label4 {background-color: #AA20FF; color:#fff;}
.latest-tab-content .bbs_list_label.label5 {background-color: #25282B; color:#fff;}
.latest-tab-content .bbs_list_label.label6 {background-color: #D6DCE0; color:#000;}
@media all and (max-width:1024px) {
.latest-tab-content .more_btn {top:20px; right:20px;}
}