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
+12
View File
@@ -0,0 +1,12 @@
<?php
include_once('../../../common.php');
// 커뮤니티 사용여부
/*
if(defined('G5_COMMUNITY_USE') && G5_COMMUNITY_USE === false) {
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
die('<p>쇼핑몰 설치 후 이용해 주십시오.</p>');
define('_SHOP_', true);
}
*/
+91
View File
@@ -0,0 +1,91 @@
var show_alarm_exist=false;
function check_alarm(){
$.ajax({
type: 'POST',
data: { act: 'alarm' },
url: memo_alarm_url + '/get-events.php',
dataType: 'json',
async: true,
cache: false,
success: function(result) {
if(result.msg == 'SUCCESS') {
// URL을 추출하는 정규식
const urlRegex = /(https?:\/\/[^\s]+)/g;
const urlMatches = result.content.match(urlRegex);
// 추출된 URL이 있으면 그 값을 사용하고, 없으면 me_id 사용
const urlOrMeId = urlMatches ? urlMatches[0] : result.me_id;
// 추출된 값을 show_alarm으로 전달
show_alarm(result.title, result.content, result.url, urlOrMeId, result.me_send_datetime, result.me_id);
} else {
// 오류 처리
}
}
});
}
function show_alarm(title, content, url, urlOrMeId, me_send_datetime, me_id) {
if(show_alarm_exist) hide_alarm();
show_alarm_exist = true;
var html = "";
// audio.play(); // 알림 소리 재생
html = "<div id='alarm_layer' class='wrapper-notification bottom right side' style='display:none'>";
html += "<div class='notification notification-primary notification-msg animated bounceInUp' id='" + me_id + "'>";
// 알림 옵션 부분 (닫기 버튼, 읽음 처리 버튼 등)
html += "<div class='notification-option'>";
html += "<button class='notification-check' data-toggle='tooltip' data-trigger='hover' data-html='true' data-placement='top' data-original-title='읽음' onclick='set_recv_memo(\"" + me_id + "\")'>";
html += "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-x'><line x1='18' y1='6' x2='6' y2='18'></line><line x1='6' y1='6' x2='18' y2='18'></line></svg></button>";
html += "</div>";
html += "<a href='../bbs/memo_view.php?me_id=" + me_id + "&kind=recv' onclick='win_memo(this.href); return false;'>";
html += "<div class='notification-heading'><span class='font-B'>새 알림</span> <span class='al_date'>" + me_send_datetime + "</span></div>";
html += "<div class='notification-content cut2 cursor'>" + content + "</div>";
html += "</a>";
html += "</div>";
html += "</div>";
$('body').prepend(html);
$('#alarm_layer').fadeIn();
setTimeout(function(){ hide_alarm(); }, 30000);
}
function hide_alarm(){
if(show_alarm_exist){
show_alarm_exist=false;
$("#alarm_layer").fadeOut(400,function(){
$('#alarm_layer').remove();
});
}
}
function set_recv_memo(me_id){
$.ajax({
type:'POST',
data : ({act : 'recv_memo', me_id : me_id}),
url: memo_alarm_url + '/get-events.php',
dataType:'json',
async:true,
cache:false,
success:function(result){
if(result.msg=='SUCCESS'){
hide_alarm();
}else{
}
}
});
}
function RemoveTag(s){
var tmp = '';
tmp = s;
tmp = tmp.replace('<','&lt;');
tmp = tmp.replace('>','&gt;');
tmp = tmp.replace('"','&quot;');
return tmp;
}
+355
View File
@@ -0,0 +1,355 @@
.alert {
padding: 10px;
margin-bottom: 10px;
border: 1px solid transparent;
border-radius: 3px;
}
.alert h4 {
margin-top: 0;
color: inherit
}
.alert .alert-link {
font-weight: bold
}
.alert>p,
.alert>ul {
margin-bottom: 0
}
.alert>p+p {
margin-top: 5px
}
.alert-dismissable,
.alert-dismissible {
padding-right: 35px
}
.alert-dismissable .close,
.alert-dismissible .close {
position: relative;
top: -2px;
right: -21px;
color: inherit
}
.alert-success {
background-color: #dff0d8;
border-color: #d6e9c6;
color: #3c763d
}
.alert-success hr {
border-top-color: #c9e2b3
}
.alert-success .alert-link {
color: #2b542c
}
.alert-info {
background-color: #d9edf7;
border-color: #bce8f1;
color: #31708f
}
.alert-info hr {
border-top-color: #a6e1ec
}
.alert-info .alert-link {
color: #245269
}
.alert-warning {
background-color: #fcf8e3;
border-color: #faebcc;
color: #8a6d3b
}
.alert-warning hr {
border-top-color: #f7e1b5
}
.alert-warning .alert-link {
color: #66512c
}
.alert-danger {
background-color: #f2dede;
border-color: #ebccd1;
color: #a94442
}
.alert-danger hr {
border-top-color: #e4b9c0
}
.alert-danger .alert-link {
color: #843534
}
.wrapper-alert,
.wrapper-notification {
position: fixed;
padding: 10px;
left: 5px;
bottom:5px;
/*position: absolute;*/
z-index: 999;
/*left: 5px;
right: 5px*/
}
.wrapper-alert.top,
.wrapper-notification.top {
top: 10px
}
.wrapper-alert.bottom,
.wrapper-notification.bottom {
bottom: 0
}
.wrapper-alert.left,
.wrapper-notification.left {
left: 10px;
right: auto
}
.wrapper-alert.right,
.wrapper-notification.right {
left: 50px;
right: auto;
bottom:40px;
}
.wrapper-alert-circle {
position: fixed;
left: 50%;
top: 50%;
margin-top: -60px;
margin-left: -60px;
z-index: 3001
}
.alert-circle {
width: 120px;
height: 120px;
font-size: 150%;
color: #fff;
animation-duration: .2s;
border-radius: 50%;
text-align: center;
padding-top: 65px
}
.notification,
.notification-custom {
padding: 20px;
margin-bottom: 0px;
border: 0px;
border-radius: 5px;
box-shadow: 5px 5px 15px rgba(0, 0, 0, .1);
background: #fff;
min-width: 300px;
max-height: 600px;
overflow-y: auto;
position: relative;
word-wrap: break-word;
font-size: 13px;
}
.notification-close,
.notification-custom-close {
text-align: right
}
.notification-close>.dropdown-menu,
.notification-custom-close>.dropdown-menu {
top: 8px;
float: right;
right: 20px;
left: auto;
min-width: 50px
}
.notification-close>.dropdown-menu>li,
.notification-custom-close>.dropdown-menu>li {
text-align: right
}
.notification-close>a,
.notification-custom-close>a {
color: #999
}
.notification-close>.close,
.notification-custom-close>.close {
opacity: .6;
font-size: 13px
}
.wrapper-notification.side {
width: 350px
}
.wrapper-notification.side>.notification,
.wrapper-notification.side>.notification-custom {
cursor: pointer;
overflow: visible
}
.wrapper-notification.main {
top: 20%;
left: 50%;
width: 500px;
margin: 0 0 0 -250px
}
.wrapper-notification.main .notification,
.wrapper-notification.main .notification-custom {
padding-left: 10px
}
.notification-heading,
.notification-custom-heading {
padding: 0 15px 10px 0px;
/*color: #005b9e;*/
color: #000;
text-align: left
}
.wrapper-notification.main .notification-heading,
.wrapper-notification.main .notification-custom-heading {
font-size: 116.6666%;
font-weight: bold;
padding-left: 0
}
.notification-success,
.notification-success .notification,
.notification-success .notification-custom {
border-color: #10b045 !important
}
.notification-success .notification-heading,
.notification-success .notification-custom-heading {
color: #10b045 !important
}
.notification-info,
.notification-info .notification,
.notification-info .notification-custom {
border-color: #3a87ad !important
}
.notification-info .notification-heading,
.notification-info .notification-custom-heading {
color: #3a87ad !important
}
.notification-warning,
.notification-warning .notification,
.notification-warning .notification-custom {
border-color: #ff8f32 !important
}
.notification-warning .notification-heading,
.notification-warning .notification-custom-heading {
color: #db741d !important
}
.notification-danger,
.notification-danger .notification,
.notification-danger .notification-custom {
border-color: #d23737 !important
}
.notification-danger .notification-heading,
.notification-danger .notification-custom-heading {
color: #d23737 !important
}
.notification-icon {
position: absolute;
left: 10px;
top: 10px;
z-index: 6;
width: 25px;
height: 25px;
border-radius: 50%;
color: #fff;
background-color: #756FAD;
padding-left: 7px;
padding-top: 3px;
}
.notification-info .notification-icon {
background-color: #3a87ad
}
.notification-success .notification-icon {
background-color: #10b045
}
.notification-warning .notification-icon {
background-color: #ff8f32
}
.notification-danger .notification-icon {
background-color: #d23737
}
.notification-option {
position: absolute;
right: 13px;
top: 15px;
}
.notification-content {line-height: 150%;}
.notification-option .notification-check {
border: none;
color: #000;
background-color: transparent;
}
.al_date {font-size: 11px; color:#888;}
.close {
float: right;
font-size: 18px;
font-weight: bold;
line-height: 1;
color: #000;
text-shadow: 0 1px 0 #fff;
opacity: .2
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
opacity: .5
}
button.close {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none
}
@media all and (max-width:1024px) {
.wrapper-alert.right,
.wrapper-notification.right {
max-width:250px;
left: 10px;
bottom:10px;
}
}
+94
View File
@@ -0,0 +1,94 @@
var show_alarm_exist=false;
function check_alarm(){
$.ajax({
type: 'POST',
data: { act: 'alarm' },
url: memo_alarm_url + '/get-events.php',
dataType: 'json',
async: true,
cache: false,
success: function(result) {
if(result.msg == 'SUCCESS') {
// URL을 추출하는 정규식
const urlRegex = /(https?:\/\/[^\s]+)/g;
const urlMatches = result.content.match(urlRegex);
// 추출된 URL이 있으면 그 값을 사용하고, 없으면 me_id 사용
const urlOrMeId = urlMatches ? urlMatches[0] : result.me_id;
// 추출된 값을 show_alarm으로 전달
show_alarm(result.title, result.content, result.url, urlOrMeId, result.me_send_datetime, result.me_id);
} else {
// 오류 처리
}
}
});
}
function show_alarm(title, content, url, urlOrMeId, me_send_datetime, me_id) {
if(show_alarm_exist) hide_alarm();
show_alarm_exist = true;
var html = "";
// audio.play(); // 알림 소리 재생
html = "<div id='alarm_layer' class='wrapper-notification bottom right side' style='display:none'>";
html += "<div class='notification notification-primary notification-msg animated bounceInUp' id='" + me_id + "'>";
// 알림 옵션 부분 (닫기 버튼, 읽음 처리 버튼 등)
html += "<div class='notification-option'>";
html += "<button class='notification-check' data-toggle='tooltip' data-trigger='hover' data-html='true' data-placement='top' data-original-title='읽음' onclick='set_recv_memo(\"" + me_id + "\")'>";
html += "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-x'><line x1='18' y1='6' x2='6' y2='18'></line><line x1='6' y1='6' x2='18' y2='18'></line></svg></button>";
html += "</div>";
if (urlOrMeId.startsWith("http")) {
html += "<a href='" + urlOrMeId + "' data-original-title='읽음' onclick='set_recv_memo(\"" + me_id + "\");'>";
} else {
html += "<a href='../bbs/memo_view.php?me_id=" + me_id + "&kind=recv' onclick='win_memo(this.href); return false;'>";
}
html += "<div class='notification-heading'><span class='font-B'>새 알림</span> <span class='al_date'>" + me_send_datetime + "</span></div>";
html += "<div class='notification-content cut2 cursor'>" + content + "</div>";
html += "</a>";
html += "</div>";
html += "</div>";
$('body').prepend(html);
$('#alarm_layer').fadeIn();
setTimeout(function(){ hide_alarm(); }, 30000);
}
function hide_alarm(){
if(show_alarm_exist){
show_alarm_exist=false;
$("#alarm_layer").fadeOut(400,function(){
$('#alarm_layer').remove();
});
}
}
function set_recv_memo(me_id){
$.ajax({
type:'POST',
data : ({act : 'recv_memo', me_id : me_id}),
url: memo_alarm_url + '/get-events.php',
dataType:'json',
async:true,
cache:false,
success:function(result){
if(result.msg=='SUCCESS'){
hide_alarm();
}else{
}
}
});
}
function RemoveTag(s){
var tmp = '';
tmp = s;
tmp = tmp.replace('<','&lt;');
tmp = tmp.replace('>','&gt;');
tmp = tmp.replace('"','&quot;');
return tmp;
}
+48
View File
@@ -0,0 +1,48 @@
<?php
if (!defined('_GNUBOARD_')) exit; //개별 페이지 접근 불가
// 간격
//echo help('기본 60000ms, 밀리초(ms)는 천분의 1초. ex) 60초 = 60000ms');
$wset['delay'] = '60000';
$wset['delay'] = (isset($wset['delay']) && $wset['delay'] >= 60000) ? $wset['delay'] : 60000;
$alarm_url = G5_URL . "/rb/rb.mod/alarm";
?>
<?php
// 특정 페이지에서 alarm 표시 안함
$except_alarm_page = array(
'memo.php',
'point.php',
'scrap.php',
'profile.php',
'coupon.php',
'memo_form.php'
);
if (!in_array(basename($_SERVER['PHP_SELF']), $except_alarm_page)) {
if (isset($member['mb_id']) && $member['mb_id']) { // $member 배열과 'mb_id' 키가 정의되어 있는지 확인 ?>
<link rel="stylesheet" href="<?php echo $alarm_url ?>/alarm.css">
<script>
var memo_alarm_url = "<?php echo $alarm_url; ?>";
//var audio = new Audio("<?php echo $alarm_url;?>/memo_on.mp3"); // 임의 폴더 아래에 사운드 파일을 넣고 자바스크립트 동일경로
</script>
<?php
$dirs = dirname($_SERVER['PHP_SELF']); // $PHP_SELF 대신 $_SERVER['PHP_SELF'] 사용
$dirs_chk = str_replace('/', '', $dirs);
?>
<?php if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == $app['ap_title']) { ?>
<script src="<?php echo $alarm_url ?>/alarm.app.js"></script>
<?php } else { ?>
<script src="<?php echo $alarm_url ?>/alarm.js"></script>
<?php } ?>
<script type="text/javascript">
$(function() {
setInterval(function() {
check_alarm();
}, <?php echo $wset['delay'] ?>);
check_alarm();
});
</script>
<?php } ?>
<?php } ?>
+11
View File
File diff suppressed because one or more lines are too long
+43
View File
@@ -0,0 +1,43 @@
<?php
include_once('../_common.php');
$act = isset($_POST['act']) ? $_POST['act'] : '';
if ($act == 'alarm') {
$result = array();
$row = sql_fetch("SELECT * FROM {$g5['memo_table']} WHERE me_recv_mb_id = '{$member['mb_id']}' AND me_send_datetime >= NOW() - INTERVAL 2 DAY AND me_read_datetime = '0000-00-00 00:00:00' ORDER BY me_id DESC LIMIT 1");
if ($row) {
$result['content'] = isset($row['me_memo']) ? $row['me_memo'] : '';
$result['msg'] = 'SUCCESS';
$result['me_id'] = isset($row['me_id']) ? $row['me_id'] : '';
//$result['sound'] = 'N';
$mb = get_member($row['me_send_mb_id'], 'mb_name');
$result['title'] = isset($mb['mb_name']) ? $mb['mb_name'] : '';
$result['me_send_datetime'] = isset($row['me_send_datetime']) ? $row['me_send_datetime'] : '';
$result['url'] = G5_URL . '/bbs/memo.php';
} else {
$result['msg'] = 'NOMSG';
$result['me_id'] = '';
}
echo json_encode($result);
}
if ($act == 'recv_memo') {
$result = array();
$me_id = isset($_POST['me_id']) ? $_POST['me_id'] : '';
$sql = "UPDATE {$g5['memo_table']}
SET me_read_datetime = '".G5_TIME_YMDHIS."'
WHERE me_id = '$me_id'
AND me_read_datetime = '0000-00-00 00:00:00'";
sql_query($sql);
$sql = "UPDATE `{$g5['member_table']}` SET mb_memo_cnt = '".get_memo_not_read($member['mb_id'])."' WHERE mb_id = '{$member['mb_id']}'";
sql_query($sql);
$result['msg'] = 'SUCCESS';
echo json_encode($result);
}
+42
View File
@@ -0,0 +1,42 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<?php
$i = 0; // $i 변수를 초기화
while ($row = sql_fetch_array($result)) {
$bn_border = isset($row['bn_border']) && $row['bn_border'] ? ' bn_border' : '';
$bn_radius = isset($row['bn_radius']) && $row['bn_radius'] ? ' bn_radius' : '';
// 새창 옵션
$bn_new_win = isset($row['bn_new_win']) && $row['bn_new_win'] ? ' target="_blank"' : '';
if ($i == 0) echo '<div class="random_bn">'.PHP_EOL;
$bimg = G5_DATA_PATH.'/banners/'.$row['bn_id'];
if (file_exists($bimg)) {
$banner = '';
$size = getimagesize($bimg);
echo '<div class="random_item top_ad'.$bn_border.$bn_radius.'">'.PHP_EOL;
if ($row['bn_url'][0] == '#')
$banner .= '<a href="'.$row['bn_url'].'">';
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
$banner .= '<a href="'.G5_URL.'/rb/rb.mod/banner/bannerhit.php?bn_id='.$row['bn_id'].'"'.$bn_new_win.'>';
}
echo $banner.'<img src="'.G5_DATA_URL.'/banners/'.$row['bn_id'].'?ver='.G5_SERVER_TIME.'" title="'.get_text($row['bn_alt']).'" width="100%">';
if ($banner) {
echo '</a>'.PHP_EOL;
}
if (isset($row['bn_ad_ico']) && $row['bn_ad_ico']) {
echo '<span class="ico_ad">AD</span>'.PHP_EOL;
}
echo '</div>'.PHP_EOL;
}
$i++;
}
if ($i > 0) echo '</div>'.PHP_EOL;
?>
+23
View File
@@ -0,0 +1,23 @@
<?php
include_once("../_common.php");
$bn_id = isset($bn_id) ? (int)$bn_id : 0;
$sql = "SELECT bn_id, bn_url FROM rb_banner WHERE bn_id = '$bn_id'";
$row = sql_fetch($sql);
if (!isset($row['bn_id']) || !$row['bn_id']) {
alert('등록된 배너가 없습니다.', G5_URL);
}
if (!isset($_COOKIE['ck_bn_id']) || $_COOKIE['ck_bn_id'] != $bn_id) {
$sql = "UPDATE rb_banner SET bn_hit = bn_hit + 1 WHERE bn_id = '$bn_id'";
sql_query($sql);
// 하루 동안
set_cookie("ck_bn_id", $bn_id, 60*60*24);
}
$url = isset($row['bn_url']) ? clean_xss_tags($row['bn_url']) : G5_URL;
goto_url($url);
?>
@@ -0,0 +1,20 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: border_anim/banner.skin.php
* 배너 그룹 스킨 (래퍼)
*/
// CSS 로드
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/border_anim/style.css">', 0);
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
if (isset($banners) && is_array($banners)) {
foreach ($banners as $banner) {
include(dirname(__FILE__).'/skin.php');
}
} else if (isset($banner)) {
// 단일 배너인 경우
include(dirname(__FILE__).'/skin.php');
}
?>
@@ -0,0 +1,24 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: border_anim/skin.php
* 단일 배너 아이템 스킨
*/
?>
<div class="rb-banner-border-anim">
<a href="<?php echo $banner['bn_url']; ?>"
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
onclick="banner_click_count(this); return true;"
data-banner-id="<?php echo $banner['bn_id']; ?>">
<div class="banner-image">
<?php echo $banner['bn_img']; ?>
</div>
<div class="banner-content">
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
</div>
<div class="border-top-left"></div>
<div class="border-top-right"></div>
<div class="border-bottom-left"></div>
<div class="border-bottom-right"></div>
</a>
</div>
@@ -0,0 +1,71 @@
.rb-banner-border-anim {
position: relative;
overflow: hidden;
display: block;
width: 100%;
height: 100%;
}
.rb-banner-border-anim a {
display: block;
text-decoration: none;
position: relative;
width: 100%;
height: 100%;
}
.rb-banner-border-anim .banner-image {
width: 100%;
height: 100%;
}
.rb-banner-border-anim .banner-image img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.rb-banner-border-anim .banner-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
text-align: center;
opacity: 0;
transition: opacity 0.3s ease;
background: rgba(0,0,0,0.5);
padding: 10px 20px;
border-radius: 5px;
width: 90%;
}
.rb-banner-border-anim:hover .banner-content {
opacity: 1;
}
.rb-banner-border-anim h3 {
margin: 0;
font-size: 1.2rem;
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.rb-banner-border-anim [class^="border-"] {
position: absolute;
background-color: #fff;
transition: all 0.3s ease-in-out;
}
.rb-banner-border-anim .border-top-left, .rb-banner-border-anim .border-top-right { height: 3px; width: 0; }
.rb-banner-border-anim .border-bottom-left, .rb-banner-border-anim .border-bottom-right { width: 3px; height: 0; }
.rb-banner-border-anim .border-top-left { top: 0; left: 0; }
.rb-banner-border-anim .border-top-right { top: 0; right: 0; }
.rb-banner-border-anim .border-bottom-left { bottom: 0; left: 0; }
.rb-banner-border-anim .border-bottom-right { bottom: 0; right: 0; }
.rb-banner-border-anim:hover .border-top-left, .rb-banner-border-anim:hover .border-top-right { width: 100%; }
.rb-banner-border-anim:hover .border-bottom-left, .rb-banner-border-anim:hover .border-bottom-right { height: 100%; }
@@ -0,0 +1,20 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: card_overlay/banner.skin.php
* 배너 그룹 스킨 (래퍼)
*/
// CSS 로드
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/card_overlay/style.css">', 0);
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
if (isset($banners) && is_array($banners)) {
foreach ($banners as $banner) {
include(dirname(__FILE__).'/skin.php');
}
} else if (isset($banner)) {
// 단일 배너인 경우
include(dirname(__FILE__).'/skin.php');
}
?>
@@ -0,0 +1,20 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: card_overlay/skin.php
* 단일 배너 아이템 스킨
*/
?>
<div class="rb-banner-card-overlay">
<a href="<?php echo $banner['bn_url']; ?>"
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
onclick="banner_click_count(this); return true;"
data-banner-id="<?php echo $banner['bn_id']; ?>">
<div class="banner-image">
<?php echo $banner['bn_img']; ?>
</div>
<div class="banner-content">
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
</div>
</a>
</div>
@@ -0,0 +1,46 @@
/* 💡 [최종 수정] 스킨 자체는 크기를 갖지 않고, 부모 컨테이너를 100% 채우도록 수정 */
.rb-banner-card-overlay {
position: relative;
overflow: hidden;
display: block;
width: 100%;
height: 100%;
}
.rb-banner-card-overlay a {
display: block;
text-decoration: none;
width: 100%;
height: 100%;
}
.rb-banner-card-overlay .banner-image {
width: 100%;
height: 100%;
}
.rb-banner-card-overlay .banner-image img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.rb-banner-card-overlay .banner-content {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 10px;
background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
color: #fff;
}
.rb-banner-card-overlay h3 {
margin: 0;
font-size: 0.9rem;
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@@ -0,0 +1,20 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: image_only/banner.skin.php
* 배너 그룹 스킨 (래퍼)
*/
// CSS 로드
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
if (isset($banners) && is_array($banners)) {
foreach ($banners as $banner) {
include(dirname(__FILE__).'/skin.php');
}
} else if (isset($banner)) {
// 단일 배너인 경우
include(dirname(__FILE__).'/skin.php');
}
?>
+23
View File
@@ -0,0 +1,23 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: image_only/skin.php
* 단일 배너 아이템 스킨 (이미지만 출력)
*/
// 💡 [핵심 수정] 이 스킨의 CSS 파일을 불러옵니다.
//add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/image_only/style.css?ver='.G5_SERVER_TIME.'">', 0);
?>
<link rel="stylesheet" href="<?php echo G5_URL; ?>/rb/rb.mod/banner/skin/image_only/style.css?ver=<?php echo G5_SERVER_TIME; ?>">
<div class="rb-banner-image-only">
<a href="<?php echo $banner['bn_url']; ?>"
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
onclick="banner_click_count(this); return true;"
data-banner-id="<?php echo $banner['bn_id']; ?>">
<div class="banner-image">
<?php echo $banner['bn_img']; ?>
</div>
</a>
</div>
@@ -0,0 +1,26 @@
/* Image Only Banner Skin - Final Fix */
/* 💡 [핵심] 부모(.banner-unit-wrapper)의 공간을 100% 채우도록 강제 */
.rb-banner-image-only {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.rb-banner-image-only a,
.rb-banner-image-only .banner-image {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.rb-banner-image-only img {
width: 100%;
height: 100%;
object-fit: fill;
max-height: 85px;
}
@@ -0,0 +1,67 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 💡 [핵심] 스킨이 의존하는 전역 변수들을 명시적으로 선언합니다.
global $row_mod, $rb_module_table;
// 💡 [초기화] $rb_skin 변수를 빈 배열로 먼저 선언합니다.
// 이렇게 하면, 아래에서 설정을 불러오지 못하더라도 다른 부분에서 오류가 발생하지 않습니다.
$rb_skin = array();
// 💡 [핵심 수정] Rebuilder 모듈 변수($row_mod)가 존재하고, 그 안에 md_id 값이 있을 때만 DB 조회를 실행합니다.
// 이렇게 하면 $row_mod가 null일 때 발생하는 오류를 원천적으로 방지할 수 있습니다.
if (isset($row_mod['md_id']) && $row_mod['md_id'] && isset($rb_module_table) && $rb_module_table) {
$rb_skin = sql_fetch("SELECT * FROM {$rb_module_table} WHERE md_id = '{$row_mod['md_id']}'");
}
// 💡 [개선] $rb_skin['md_banner_bg'] 값이 없을 경우를 대비하여 기본값을 설정합니다.
$md_banner_bg = isset($rb_skin['md_banner_bg']) ? $rb_skin['md_banner_bg'] : '';
?>
<style>
.basic_item {margin-top: 10px;}
.basic_item:first-child {margin-top: 0px;}
</style>
<?php
$i = 0; // $i 변수를 초기화
while ($row = sql_fetch_array($result)) {
$bn_border = isset($row['bn_border']) && $row['bn_border'] ? ' bn_border' : '';
$bn_radius = isset($row['bn_radius']) && $row['bn_radius'] ? ' bn_radius' : '';
// 새창 옵션
$bn_new_win = isset($row['bn_new_win']) && $row['bn_new_win'] ? ' target="_blank"' : '';
// 💡 [개선] 배경색($md_banner_bg)이 있을 때만 style 속성을 출력하도록 수정합니다.
if ($i == 0) {
$bg_style = $md_banner_bg ? ' style="background-color:'.$md_banner_bg.'"' : '';
echo '<div class="mod_bn_wrap"'.$bg_style.'>'.PHP_EOL;
}
$bimg = G5_DATA_PATH.'/banners/'.$row['bn_id'];
if (file_exists($bimg)) {
$banner = '';
$size = getimagesize($bimg);
echo '<div class="basic_item top_ad '.$bn_border.$bn_radius.'">'.PHP_EOL;
if ($row['bn_url'][0] == '#')
$banner .= '<a href="'.$row['bn_url'].'">';
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
$banner .= '<a href="'.G5_URL.'/rb/rb.mod/banner/bannerhit.php?bn_id='.$row['bn_id'].'"'.$bn_new_win.'>';
}
echo $banner.'<img src="'.G5_DATA_URL.'/banners/'.$row['bn_id'].'?ver='.G5_SERVER_TIME.'" title="'.get_text($row['bn_alt']).'" width="100%">';
if ($banner) {
echo '</a>'.PHP_EOL;
}
if (isset($row['bn_ad_ico']) && $row['bn_ad_ico']) {
echo '<span class="ico_ad">AD</span>'.PHP_EOL;
}
echo '</div>'.PHP_EOL;
}
$i++;
}
if ($i > 0) echo '</div>'.PHP_EOL;
?>
@@ -0,0 +1,47 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
global $row_mod, $rb_module_table;
$rb_skin = sql_fetch (" select * from {$rb_module_table} where md_id = '{$row_mod['md_id']}' "); //최신글 환경설정 테이블 조회 (삭제금지)
$md_banner_bg = isset($rb_skin['md_banner_bg']) ? $rb_skin['md_banner_bg'] : '';
?>
<?php
$i = 0; // $i 변수를 초기화
while ($row = sql_fetch_array($result)) {
$bn_border = isset($row['bn_border']) && $row['bn_border'] ? ' bn_border' : '';
$bn_radius = isset($row['bn_radius']) && $row['bn_radius'] ? ' bn_radius' : '';
// 새창 옵션
$bn_new_win = isset($row['bn_new_win']) && $row['bn_new_win'] ? ' target="_blank"' : '';
if ($i == 0) echo '<div class="mod_bn_wrap" style="background-color:'.$md_banner_bg.'">'.PHP_EOL;
$bimg = G5_DATA_PATH.'/banners/'.$row['bn_id'];
if (file_exists($bimg)) {
$banner = '';
$size = getimagesize($bimg);
echo '<div class="random_item top_ad '.$bn_border.$bn_radius.'">'.PHP_EOL;
if ($row['bn_url'][0] == '#')
$banner .= '<a href="'.$row['bn_url'].'">';
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
$banner .= '<a href="'.G5_URL.'/rb/rb.mod/banner/bannerhit.php?bn_id='.$row['bn_id'].'"'.$bn_new_win.'>';
}
echo $banner.'<img src="'.G5_DATA_URL.'/banners/'.$row['bn_id'].'?ver='.G5_SERVER_TIME.'" title="'.get_text($row['bn_alt']).'" width="100%">';
if ($banner) {
echo '</a>'.PHP_EOL;
}
if (isset($row['bn_ad_ico']) && $row['bn_ad_ico']) {
echo '<span class="ico_ad">AD</span>'.PHP_EOL;
}
echo '</div>'.PHP_EOL;
}
$i++;
}
if ($i > 0) echo '</div>'.PHP_EOL;
?>
@@ -0,0 +1,97 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
global $row_mod, $rb_module_table;
$rb_skin = sql_fetch (" select * from {$rb_module_table} where md_id = '{$row_mod['md_id']}' "); //최신글 환경설정 테이블 조회 (삭제금지)
$md_banner_bg = isset($rb_skin['md_banner_bg']) ? $rb_skin['md_banner_bg'] : '';
?>
<style>
.swiper-button-next-slide_bn {right:20px;}
.swiper-button-prev-slide_bn {left:20px;}
.swiper-button-next-slide_bn svg {width: 10px;}
.swiper-button-prev-slide_bn svg {width: 10px;}
</style>
<?php
$i = 0; // $i 변수를 초기화
while ($row = sql_fetch_array($result)) {
$bn_border = isset($row['bn_border']) && $row['bn_border'] ? ' bn_border' : '';
$bn_radius = isset($row['bn_radius']) && $row['bn_radius'] ? ' bn_radius' : '';
// 새창 옵션
$bn_new_win = isset($row['bn_new_win']) && $row['bn_new_win'] ? ' target="_blank"' : '';
if ($i == 0) echo '<div class="mod_bn_wrap" style="background-color:'.$md_banner_bg.'"><div class="swiper-container swiper-container-slide_bn swiper-container-slide_bn_'.$row_mod['md_id'].'"><ul class="swiper-wrapper swiper-wrapper-slide_bn swiper-wrapper-slide_bn_'.$row_mod['md_id'].'">'.PHP_EOL;
$bimg = G5_DATA_PATH.'/banners/'.$row['bn_id'];
if (file_exists($bimg)) {
$banner = '';
$size = getimagesize($bimg);
echo '<div class="swiper-slide swiper-slide-slide_bn swiper-slide-slide_bn_'.$row_mod['md_id'].' slide_item top_ad '.$bn_border.$bn_radius.'">'.PHP_EOL;
if ($row['bn_url'][0] == '#')
$banner .= '<a href="'.$row['bn_url'].'">';
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
$banner .= '<a href="'.G5_URL.'/rb/rb.mod/banner/bannerhit.php?bn_id='.$row['bn_id'].'"'.$bn_new_win.'>';
}
echo $banner.'<img src="'.G5_DATA_URL.'/banners/'.$row['bn_id'].'?ver='.G5_SERVER_TIME.'" title="'.get_text($row['bn_alt']).'" width="100%">';
if ($banner) {
echo '</a>'.PHP_EOL;
}
if (isset($row['bn_ad_ico']) && $row['bn_ad_ico']) {
echo '<span class="ico_ad">AD</span>'.PHP_EOL;
}
echo '</div>'.PHP_EOL;
}
$i++;
}
if ($i > 0) echo '</ul>';
if ($i > 1) echo '
<div class="swiper-button-next swiper-button-next-slide_bn swiper-button-next-slide_bn_'.$row_mod['md_id'].'">
<svg width="24" height="46" viewBox="0 0 24 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 45L22.3333 23L1 1" stroke="#09244B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<div class="swiper-button-prev swiper-button-next-slide_bn swiper-button-prev-slide_bn_'.$row_mod['md_id'].'">
<svg width="24" height="46" viewBox="0 0 24 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23 0.999999L1.66667 23L23 45" stroke="#09244B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>'.PHP_EOL;
if ($i > 0) echo '</div></div>';
?>
<script>
var swiper = new Swiper('.swiper-container-slide_bn_<?php echo $row_mod['md_id'] ?>', {
slidesPerView: 1, //가로갯수
spaceBetween: 0, // 간격
observer: true, //리셋
observeParents: true, //리셋
<?php if ($i > 1) { ?>
touchRatio: 1,
loop: true,
navigation: { //네비
nextEl: '.swiper-button-next-slide_bn_<?php echo $row_mod['md_id'] ?>',
prevEl: '.swiper-button-prev-slide_bn_<?php echo $row_mod['md_id'] ?>',
},
<?php } else { ?>
touchRatio: 0,
loop: false,
<?php } ?>
});
</script>
@@ -0,0 +1,58 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: rb.wide_slide/banner.skin.php
* 배너 그룹 스킨 (래퍼)
*/
// CSS 로드
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/rb.wide_slide/style.css">', 0);
// Swiper 라이브러리 로드 (테마에 포함된 경우)
if (is_file(G5_THEME_PATH.'/js/swiper/swiper-bundle.min.js')) {
add_javascript('<script src="'.G5_THEME_URL.'/js/swiper/swiper-bundle.min.js"></script>', 10);
}
?>
<div class="rb-banner-wide-slide">
<div class="swiper-container">
<div class="swiper-wrapper">
<?php
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
if (isset($banners) && is_array($banners)) {
foreach ($banners as $banner) {
include(dirname(__FILE__).'/skin.php');
}
}
?>
</div>
<!-- 네비게이션 버튼 -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
<!-- 페이징 -->
<div class="swiper-pagination"></div>
</div>
</div>
<script>
// 이 스킨 전용 Swiper 초기화
document.addEventListener('DOMContentLoaded', function () {
// 동일한 스킨이 여러 개 있을 수 있으므로, 고유한 클래스를 부여하거나 ID를 사용해야 합니다.
// 여기서는 이 스킨의 최상위 클래스 내에 있는 swiper-container를 찾습니다.
var swiper = new Swiper('.rb-banner-wide-slide .swiper-container', {
loop: true,
autoplay: {
delay: 5000,
disableOnInteraction: false,
},
pagination: {
el: '.swiper-pagination',
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
});
</script>
@@ -0,0 +1,14 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: rb.wide_slide/skin.php
* 단일 배너 아이템 스킨 (슬라이드용)
*/
?>
<div class="swiper-slide">
<a href="<?php echo $banner['bn_url']; ?>" target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>">
<div class="banner-image">
<?php echo $banner['bn_img']; ?>
</div>
</a>
</div>
@@ -0,0 +1,53 @@
@charset "utf-8";
/* 💡 [최종 수정] 와이드 슬라이드 스타일 */
.rb-banner-wide-slide {
position: relative;
width: 728px; /* 💡 [핵심] 와이드 배너 너비 고정 */
height: 90px; /* 💡 [핵심] 와이드 배너 높이 고정 */
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
border-radius: 8px;
margin: 0 auto; /* 중앙 정렬 */
}
.rb-banner-wide-slide .swiper-container {
width: 100%;
height: 100%;
}
.rb-banner-wide-slide .swiper-slide {
position: relative;
width: 100%;
height: 100%;
}
.rb-banner-wide-slide .banner-image {
width: 100%;
height: 100%;
}
/* 💡 [최종 수정] img 태그 자체의 크기를 와이드 배너(728x90)로 강제 고정 */
.rb-banner-wide-slide .banner-image img {
width: 728px !important;
height: 90px !important;
object-fit: cover !important;
display: block;
}
/* Swiper 네비게이션 버튼 스타일 (필요시 수정) */
.rb-banner-wide-slide .swiper-button-next,
.rb-banner-wide-slide .swiper-button-prev {
color: #fff;
width: 30px;
height: 30px;
}
.rb-banner-wide-slide .swiper-button-next:after,
.rb-banner-wide-slide .swiper-button-prev:after {
font-size: 16px;
}
.rb-banner-wide-slide .swiper-pagination-bullet-active {
background: #fff;
}
@@ -0,0 +1,20 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: split_layout/banner.skin.php
* 배너 그룹 스킨 (래퍼)
*/
// CSS 로드
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/split_layout/style.css">', 0);
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
if (isset($banners) && is_array($banners)) {
foreach ($banners as $banner) {
include(dirname(__FILE__).'/skin.php');
}
} else if (isset($banner)) {
// 단일 배너인 경우
include(dirname(__FILE__).'/skin.php');
}
?>
@@ -0,0 +1,39 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: split_layout/skin.php
* 단일 배너 아이템 스킨 (내용에 따라 3단 변신)
*/
// 이미지와 텍스트 유무 확인
$has_image = (isset($banner['bn_img']) && !empty($banner['bn_img']));
$has_text = (isset($banner['bn_alt']) && !empty($banner['bn_alt']));
// 클래스 동적 생성
$layout_class = '';
if ($has_image && $has_text) {
$layout_class = 'has-image-and-text';
} elseif ($has_image) {
$layout_class = 'has-image-only';
} elseif ($has_text) {
$layout_class = 'has-text-only';
}
?>
<link rel="stylesheet" href="<?php echo G5_URL; ?>/rb/rb.mod/banner/skin/split_layout/style.css?ver=<?php echo G5_SERVER_TIME; ?>">
<div class="rb-banner-split-layout <?php echo $layout_class; ?>">
<a href="<?php echo $banner['bn_url']; ?>"
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
onclick="banner_click_count(this); return true;"
data-banner-id="<?php echo $banner['bn_id']; ?>">
<?php if ($has_image): ?>
<div class="banner-image">
<?php echo $banner['bn_img']; ?>
</div>
<?php endif; ?>
<?php if ($has_text): ?>
<div class="banner-content">
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
</div>
<?php endif; ?>
</a>
</div>
@@ -0,0 +1,110 @@
/* ================================
0. 배너 고정 크기 (절대 필수)
================================ */
.banner-unit-wrapper {
width: 180px;
height: 80px;
box-sizing: border-box;
}
/* ================================
1. 링크 전체 채우기
================================ */
.rb-banner-split-layout a {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
overflow: hidden;
text-decoration: none;
color: inherit;
border: 1px solid #eee;
box-sizing: border-box;
}
/* ================================
2. 이미지 영역 (flex 문제 해결)
================================ */
.banner-image {
width: 100%;
overflow: hidden;
background: #f8f8f8;
min-height: 0; /* 🔥 flex 기본값 무력화 */
}
.banner-image img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
/* ================================
3. 이미지 + 텍스트
================================ */
.has-image-and-text .banner-image {
flex: 0 0 60px; /* 🔥 이게 핵심 */
height: 60px;
}
.has-image-and-text .banner-content {
flex: 0 0 20px;
height: 20px;
border-top: 1px solid #eee;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.has-image-and-text .banner-content h3 {
margin: 0;
font-size: 11px;
line-height: 20px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* ================================
4. 이미지만
================================ */
.has-image-only .banner-image {
width: 100%;
height: 100%;
/*object-fit: fill;*/
max-height: 85px;
}
.banner-image img{
width: 100%;
height: 100%;
object-fit: fill;
max-height: 85px;
}
.has-image-only .banner-content {
display: none;
}
/* ================================
5. 텍스트만
================================ */
.has-text-only .banner-image {
display: none;
}
.has-text-only .banner-content {
flex: 0 0 100%;
height: 100%;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.has-text-only .banner-content h3 {
margin: 0;
font-size: 14px;
font-weight: 700;
}
@@ -0,0 +1,20 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: text_reveal/banner.skin.php
* 배너 그룹 스킨 (래퍼)
*/
// CSS 로드
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/text_reveal/style.css">', 0);
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
if (isset($banners) && is_array($banners)) {
foreach ($banners as $banner) {
include(dirname(__FILE__).'/skin.php');
}
} else if (isset($banner)) {
// 단일 배너인 경우
include(dirname(__FILE__).'/skin.php');
}
?>
@@ -0,0 +1,20 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: text_reveal/skin.php
* 단일 배너 아이템 스킨
*/
?>
<div class="rb-banner-text-reveal">
<a href="<?php echo $banner['bn_url']; ?>"
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
onclick="banner_click_count(this); return true;"
data-banner-id="<?php echo $banner['bn_id']; ?>">
<div class="banner-image">
<?php echo $banner['bn_img']; ?>
</div>
<div class="banner-content">
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
</div>
</a>
</div>
@@ -0,0 +1,51 @@
.rb-banner-text-reveal {
position: relative;
overflow: hidden;
display: block;
width: 100%;
height: 100%;
}
.rb-banner-text-reveal a {
display: block;
text-decoration: none;
width: 100%;
height: 100%;
}
.rb-banner-text-reveal .banner-image {
width: 100%;
height: 100%;
}
.rb-banner-text-reveal .banner-image img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.rb-banner-text-reveal .banner-content {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 10px;
background: rgba(0,0,0,0.6);
color: #fff;
transform: translateY(100%);
transition: transform 0.4s ease;
}
.rb-banner-text-reveal:hover .banner-content {
transform: translateY(0);
}
.rb-banner-text-reveal h3 {
margin: 0;
font-size: 0.9rem;
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@@ -0,0 +1,20 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: zoom_in_hover/banner.skin.php
* 배너 그룹 스킨 (래퍼)
*/
// CSS 로드
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/zoom_in_hover/style.css">', 0);
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
if (isset($banners) && is_array($banners)) {
foreach ($banners as $banner) {
include(dirname(__FILE__).'/skin.php');
}
} else if (isset($banner)) {
// 단일 배너인 경우
include(dirname(__FILE__).'/skin.php');
}
?>
@@ -0,0 +1,20 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.mod.banner :: zoom_in_hover/skin.php
* 단일 배너 아이템 스킨
*/
?>
<div class="rb-banner-zoom-in-hover">
<a href="<?php echo $banner['bn_url']; ?>"
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
onclick="banner_click_count(this); return true;"
data-banner-id="<?php echo $banner['bn_id']; ?>">
<div class="banner-image">
<?php echo $banner['bn_img']; ?>
</div>
<div class="banner-content">
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
</div>
</a>
</div>
@@ -0,0 +1,50 @@
.rb-banner-zoom-in-hover {
position: relative;
overflow: hidden;
display: block;
width: 100%;
height: 100%;
}
.rb-banner-zoom-in-hover a {
display: block;
text-decoration: none;
width: 100%;
height: 100%;
}
.rb-banner-zoom-in-hover .banner-image {
width: 100%;
height: 100%;
}
.rb-banner-zoom-in-hover .banner-image img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
transition: transform 0.4s ease;
}
.rb-banner-zoom-in-hover:hover .banner-image img {
transform: scale(1.1);
}
.rb-banner-zoom-in-hover .banner-content {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 10px;
background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
color: #fff;
}
.rb-banner-zoom-in-hover h3 {
margin: 0;
font-size: 0.9rem;
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
+292
View File
@@ -0,0 +1,292 @@
/* PrismJS 1.29.0
https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+css-extras+git+http+java+javadoclike+js-extras+json+markup-templating+php+phpdoc+php-extras+python+sass+scss+sql+visual-basic+wgsl+xml-doc&plugins=line-highlight+line-numbers+toolbar+copy-to-clipboard */
code[class*=language-],
pre[class*=language-] {
color: #ddddcb;
background: 0 0;
text-shadow: 0 1px rgba(0, 0, 0, .3);
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 12px;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none
}
pre[class*=language-] {
padding: 1em;
margin: .5em 0;
overflow: auto;
border-radius: .3em
}
:not(pre) > code[class*=language-],
pre[class*=language-] {
background: #272822
}
:not(pre) > code[class*=language-] {
padding: .1em;
border-radius: .3em;
white-space: normal
}
.token.cdata,
.token.comment,
.token.doctype,
.token.prolog {
color: #8292a2
}
.token.punctuation {
color: #ddddcb
}
.token.namespace {
opacity: .7
}
.token.constant {
color:#ddddcb;
}
.token.deleted,
.token.property,
.token.symbol,
.token.tag {
color: #66a9ee
}
.token.boolean,
.token.number {
color: #dc6360
}
.token.attr-name {
color:#ddddcb;
}
.token.builtin,
.token.char,
.token.inserted,
.token.selector,
.token.string {
color: #e8c152
}
.token.operator {
color:#ddddcb;
}
.language-css .token.string,
.style .token.string,
.token.entity,
.token.url,
.token.variable {
color: #e57a35
}
.token.atrule,
.token.attr-value,
.token.class-name,
.token.function {
color: #ddddcb
}
.token.keyword {
color: #82cc87
}
.token.important,
.token.regex {
color: #8c5aec
}
.token.bold,
.token.important {
font-weight: 700
}
.token.italic {
font-style: italic
}
.token.entity {
cursor: help
}
pre[data-line] {
position: relative;
padding: 1em 0 1em 3em
}
.line-highlight {
position: absolute;
left: 0;
right: 0;
padding: inherit 0;
margin-top: 1em;
background: hsla(24, 20%, 50%, .08);
background: linear-gradient(to right, hsla(24, 20%, 50%, .1) 70%, hsla(24, 20%, 50%, 0));
pointer-events: none;
line-height: inherit;
white-space: pre
}
@media print {
.line-highlight {
-webkit-print-color-adjust: exact;
color-adjust: exact
}
}
.line-highlight:before,
.line-highlight[data-end]:after {
content: attr(data-start);
position: absolute;
top: .4em;
left: .6em;
min-width: 1em;
padding: 0 .5em;
background-color: hsla(24, 20%, 50%, .4);
color: #f4f1ef;
font: bold 65%/1.5 sans-serif;
text-align: center;
vertical-align: .3em;
border-radius: 999px;
text-shadow: none;
box-shadow: 0 1px #fff
}
.line-highlight[data-end]:after {
content: attr(data-end);
top: auto;
bottom: .4em
}
.line-numbers .line-highlight:after,
.line-numbers .line-highlight:before {
content: none
}
pre[id].linkable-line-numbers span.line-numbers-rows {
pointer-events: all
}
pre[id].linkable-line-numbers span.line-numbers-rows > span:before {
cursor: pointer
}
pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before {
background-color: rgba(128, 128, 128, .2)
}
pre[class*=language-].line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber
}
pre[class*=language-].line-numbers > code {
position: relative;
white-space: inherit
}
.line-numbers .line-numbers-rows {
position: absolute;
pointer-events: none;
top: 0;
font-size: 100%;
left: -3.8em;
width: 3em;
letter-spacing: -1px;
border-right: 1px solid #666;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
.line-numbers-rows > span {
display: block;
counter-increment: linenumber
}
.line-numbers-rows > span:before {
content: counter(linenumber);
color: #666;
display: block;
padding-right: .8em;
text-align: right
}
div.code-toolbar {
position: relative
}
div.code-toolbar > .toolbar {
position: absolute;
z-index: 10;
top: .3em;
right: .2em;
transition: opacity .3s ease-in-out;
opacity: 0
}
div.code-toolbar:hover > .toolbar {
opacity: 1
}
div.code-toolbar:focus-within > .toolbar {
opacity: 1
}
div.code-toolbar > .toolbar > .toolbar-item {
display: inline-block
}
div.code-toolbar > .toolbar > .toolbar-item > a {
cursor: pointer
}
div.code-toolbar > .toolbar > .toolbar-item > button {
background: 0 0;
border: 0;
color: inherit;
font: inherit;
line-height: normal;
overflow: visible;
padding: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none
}
div.code-toolbar > .toolbar > .toolbar-item > a,
div.code-toolbar > .toolbar > .toolbar-item > button,
div.code-toolbar > .toolbar > .toolbar-item > span {
color: #bbb;
font-size: 11px;
padding: 3px 5px 3px 5px;
background: #f5f2f0;
background: rgba(224, 224, 224, .2);
box-shadow: 0 2px 0 0 rgba(0, 0, 0, .2);
border-radius: .5em
}
div.code-toolbar > .toolbar > .toolbar-item > a:focus,
div.code-toolbar > .toolbar > .toolbar-item > a:hover,
div.code-toolbar > .toolbar > .toolbar-item > button:focus,
div.code-toolbar > .toolbar > .toolbar-item > button:hover,
div.code-toolbar > .toolbar > .toolbar-item > span:focus,
div.code-toolbar > .toolbar > .toolbar-item > span:hover {
color: inherit;
text-decoration: none
}
File diff suppressed because one or more lines are too long
+54
View File
@@ -0,0 +1,54 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if(isset($sb['sb_use']) && $sb['sb_use'] == 1) {
$sb_is = sb_is($view['mb_id']);
}
?>
<?php if($view['mb_id']) { ?>
<div class="writer_prof">
<ul class="writer_prof_ul1">
<li class="writer_prof_li_prof">
<dd class="writer_prof_li_prof_img"><?php echo get_member_profile_img($view['mb_id']) ?></dd>
<dd class="writer_prof_li_prof_txt">
<span class="prof_nick"><?php echo $view['name'] ?></span>
@<?php echo $view['mb_id'] ?> <?php if(isset($sb['sb_use']) && $sb['sb_use'] == 1) { // 구독 사용시 ?><?php echo sb_cnt($view['mb_id']) ?><?php } ?>
</dd>
<div class="cb"></div>
</li>
<?php if ($is_signature && $signature) { ?>
<li class="writer_prof_li_txt">
<?php echo $signature ?>
</li>
<?php } ?>
</ul>
<ul class="writer_prof_ul2">
<?php if($is_member) { ?>
<a class="fl_btns" href="<?php echo G5_URL ?>/rb/home.php?mb_id=<?php echo $view['mb_id'] ?>">
<?php } else { ?>
<a class="fl_btns" href="javascript:alert('로그인 후 이용해주세요.');">
<?php } ?>
<img src="<?php echo $board_skin_url ?>/img/ico_home.svg">
<span class="tooltips">미니홈</span>
</a>
<a class="fl_btns" href="<?php echo G5_BBS_URL ?>/memo_form.php?me_recv_mb_id=<?php echo $view['mb_id'] ?>" onclick="win_memo(this.href); return false;">
<img src="<?php echo $board_skin_url ?>/img/ico_msg.svg">
<span class="tooltips">쪽지</span>
</a>
<?php
if(isset($sb['sb_use']) && $sb['sb_use'] == 1) { // 구독 사용시
$sb_mb_id = $view['mb_id'];
include_once(G5_PATH.'/rb/rb.mod/subscribe/subscribe.skin.php');
}
?>
</ul>
<div class="cb"></div>
</div>
<?php } ?>