리빌더 부분 추가
This commit is contained in:
62
rb/rb.widget/rb.bar/widget.php
Normal file
62
rb/rb.widget/rb.bar/widget.php
Normal file
@ -0,0 +1,62 @@
|
||||
<!--
|
||||
경로 : /rb/rb.widget/rb.quick_btns/
|
||||
사용자코드를 입력하세요.
|
||||
-->
|
||||
<style>
|
||||
.main_ber {background-color: #fff; padding-top: 30px; padding-bottom: 30px; color:#483729; font-size: 18px;}
|
||||
.main_ber_ul1 {float:left;}
|
||||
.main_ber_ul3 {float:right; margin-right: 50px; border-right:1px solid #483729; padding-right: 50px;}
|
||||
.main_ber_ul5 {float:right;}
|
||||
.main_ber_ul3_li0 {float:left; margin-right: 30px;}
|
||||
.main_ber_ul3_li1 {float:left; margin-top: -2px; margin-right: 10px;}
|
||||
.main_ber_ul3_li2 {float:left;}
|
||||
.main_ber_ul5_li0 {float:left; margin-right: 30px;}
|
||||
.main_ber_ul5_li1 {float:left; margin-top: -2px; margin-right: 10px;}
|
||||
.main_ber_ul5_li2 {float:left;}
|
||||
.main_ber_ul3_li3 {display: none;}
|
||||
.main_ber_ul5_li3 {display: none;}
|
||||
@media all and (max-width:1024px) {
|
||||
.main_ber {padding-left: 20px; padding-right: 20px;}
|
||||
.main_ber_ul3 {float:none; margin-top: 10px; padding-right: 0px; margin-right: 0px; border:0px;}
|
||||
.main_ber_ul5 {float:none; margin-top: 20px;}
|
||||
.main_ber_ul1 {float:none;}
|
||||
.main_ber_ul3_li1 {display: none}
|
||||
.main_ber_ul5_li1 {display: none}
|
||||
.main_ber_ul3_li2 {float:right;}
|
||||
.main_ber_ul5_li2 {float:right;}
|
||||
.main_ber_ul3_li3 {display:block; float:left; margin-right: 10px;margin-top: -2px; margin-left: -2px; }
|
||||
.main_ber_ul5_li3 {display:block; float:left; margin-right: 10px;margin-top: -2px; margin-left: -2px;}
|
||||
}
|
||||
</style>
|
||||
<div class="main_ber">
|
||||
|
||||
<ul class="font-B main_ber_ul1">퍼스트가든 운영안내</ul>
|
||||
|
||||
|
||||
<ul class="main_ber_ul5">
|
||||
<li class="main_ber_ul5_li3"><img src="<?php echo G5_THEME_URL ?>/rb.img/m_ico2.svg"></li>
|
||||
<li class="main_ber_ul5_li0"><?php echo $config['cf_2_subj']; ?></li>
|
||||
<li class="main_ber_ul5_li1"><img src="<?php echo G5_THEME_URL ?>/rb.img/m_ico2.svg"></li>
|
||||
<li class="font-B main_ber_ul5_li2"><?php echo $config['cf_2']; ?></li>
|
||||
|
||||
<div class="cb"></div>
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="main_ber_ul3">
|
||||
<li class="main_ber_ul3_li3"><img src="<?php echo G5_THEME_URL ?>/rb.img/m_ico1.svg"></li>
|
||||
<li class="main_ber_ul3_li0"><?php echo $config['cf_3_subj']; ?></li>
|
||||
<li class="main_ber_ul3_li1"><img src="<?php echo G5_THEME_URL ?>/rb.img/m_ico1.svg"></li>
|
||||
<li class="font-B main_ber_ul3_li2"><?php echo $config['cf_3']; ?></li>
|
||||
|
||||
<div class="cb"></div>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="cb"></div>
|
||||
|
||||
</div>
|
||||
5
rb/rb.widget/rb.gap.inner_line/widget.php
Normal file
5
rb/rb.widget/rb.gap.inner_line/widget.php
Normal file
@ -0,0 +1,5 @@
|
||||
<style>
|
||||
.gap_inner_line_wrap {height:1px; border-top:1px solid rgba(0,0,0,0.1);}
|
||||
</style>
|
||||
|
||||
<div class="gap_inner_line_wrap pc"></div>
|
||||
45
rb/rb.widget/rb.gap.wide_line/widget.php
Normal file
45
rb/rb.widget/rb.gap.wide_line/widget.php
Normal file
@ -0,0 +1,45 @@
|
||||
<style>
|
||||
.gap_width_line_wrap {height:1px; border-top:1px solid rgba(0,0,0,0.1);}
|
||||
</style>
|
||||
|
||||
<div class="gap_width_line_wrap gap_width_line_wrap_<?php echo $row_mod['md_id'] ?> pc"></div>
|
||||
|
||||
<script>
|
||||
|
||||
//부모 width를 무시하고 div 를 100%로 만들고, 모듈설정 버튼의 100% 처리를 위해 스크립트를 사용 합니다.
|
||||
//복제 사용을 위해 $row_mod['md_id'](모듈ID) 를 활용 합니다.
|
||||
|
||||
function gap_width_line_wrap_<?php echo $row_mod['md_id'] ?>() {
|
||||
const content_w = $('.gap_width_line_wrap_<?php echo $row_mod['md_id'] ?>');
|
||||
const firstAdminOv_w = content_w.nextUntil('.admin_ov').next('.admin_ov');
|
||||
|
||||
if ($(window).width() > <?php echo $rb_core['main_width'] ?>) {
|
||||
content_w.css({
|
||||
'width': '100vw',
|
||||
'position': 'relative',
|
||||
'left': '50%',
|
||||
'transform': 'translateX(-50%)'
|
||||
});
|
||||
firstAdminOv_w.css({
|
||||
'width': '100vw',
|
||||
'left': '50%',
|
||||
'transform': 'translateX(-50%)'
|
||||
});
|
||||
} else {
|
||||
content_w.css({
|
||||
'width': '100%',
|
||||
'position': 'static',
|
||||
'left': '0',
|
||||
'transform': 'none'
|
||||
});
|
||||
firstAdminOv_w.css({
|
||||
'width': '100%',
|
||||
'left': '0',
|
||||
'transform': 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(gap_width_line_wrap_<?php echo $row_mod['md_id'] ?>);
|
||||
$(window).resize(gap_width_line_wrap_<?php echo $row_mod['md_id'] ?>);
|
||||
</script>
|
||||
5
rb/rb.widget/rb.gap/widget.php
Normal file
5
rb/rb.widget/rb.gap/widget.php
Normal file
@ -0,0 +1,5 @@
|
||||
<style>
|
||||
.gap_wrap {height:1px; margin-top: -10px; margin-bottom: -10px;}
|
||||
</style>
|
||||
|
||||
<div class="gap_wrap pc"></div>
|
||||
78
rb/rb.widget/rb.new/widget.php
Normal file
78
rb/rb.widget/rb.new/widget.php
Normal file
@ -0,0 +1,78 @@
|
||||
<!--
|
||||
경로 : /rb/rb.widget/rb.new/
|
||||
사용자코드를 입력하세요.
|
||||
-->
|
||||
|
||||
<?php
|
||||
//모듈정보 불러오기
|
||||
$md_id = $row_mod['md_id']; //현재 모듈 ID
|
||||
$rb_skin = sql_fetch (" select * from {$rb_module_table} where md_id = '{$md_id}' "); //환경설정 테이블 조회
|
||||
$md_subject = $rb_skin['md_title']; //모듈 타이틀
|
||||
|
||||
$sql_commons = " from {$g5['board_new_table']} a, {$g5['board_table']} b where a.bo_table = b.bo_table and a.wr_id = a.wr_parent order by a.bn_id desc ";
|
||||
|
||||
$sqls = " select a.*, b.bo_subject, b.bo_mobile_subject {$sql_commons} limit 5 ";
|
||||
$results = sql_query($sqls);
|
||||
|
||||
?>
|
||||
<div class="bbs_main">
|
||||
|
||||
<ul class="bbs_main_wrap_tit">
|
||||
<li class="bbs_main_wrap_tit_l"><a href="javascript:void(0);">
|
||||
<h2 class="font-B"><?php echo $md_subject ?></h2>
|
||||
</a></li>
|
||||
<li class="bbs_main_wrap_tit_r">
|
||||
<button type="button" class="arr_plus_btn" id="ovlay_tog">
|
||||
<img src="<?php echo G5_THEME_URL ?>/rb.img/icon/arr_plus.svg" id="ovlay_tog_img">
|
||||
</button>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// 버튼 클릭 시 이벤트 핸들러 등록
|
||||
$('#ovlay_tog').click(function() {
|
||||
// ovlay_con의 클래스를 토글(active)합니다.
|
||||
$('#ovlay_con').toggleClass('active');
|
||||
|
||||
var buttonImage = $('#ovlay_tog_img');
|
||||
|
||||
if (buttonImage.attr('src') === '<?php echo G5_THEME_URL ?>/rb.img/icon/arr_plus.svg') {
|
||||
buttonImage.attr('src', '<?php echo G5_THEME_URL ?>/rb.img/icon/arr_minus.svg');
|
||||
} else {
|
||||
buttonImage.attr('src', '<?php echo G5_THEME_URL ?>/rb.img/icon/arr_plus.svg');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</li>
|
||||
<div class="cb"></div>
|
||||
</ul>
|
||||
|
||||
<ul class="bbs_main_wrap_con ovlay_wrap" style="height:114px;">
|
||||
<div class="ovlay" id="ovlay_con">
|
||||
<?php
|
||||
for ($i=0; $rows=sql_fetch_array($results); $i++) {
|
||||
$tmp_write_table = $g5['write_prefix'].$rows['bo_table'];
|
||||
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$rows['wr_id']}' ");
|
||||
$hrefs = get_pretty_url($rows['bo_table'], $row2['wr_id']);
|
||||
?>
|
||||
<dd>
|
||||
<div>
|
||||
<ul class="bbs_main_wrap_con_ul1">
|
||||
<span class="prof_image"><?php echo get_member_profile_img($row2['mb_id']); ?></span>
|
||||
</ul>
|
||||
<ul class="bbs_main_wrap_con_ul2">
|
||||
<li class="bbs_main_wrap_con_info"><?php echo passing_time($row2['wr_datetime']); ?> <span class="font-B"><?php echo $row2['wr_name'] ?></span></li>
|
||||
<li class="bbs_main_wrap_con_info"><?php echo $rows['bo_subject'] ?></li>
|
||||
<li class="bbs_main_wrap_con_cont cut">
|
||||
<a href="<?php echo $hrefs ?>"><?php echo $row2['wr_subject'] ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cb"></div>
|
||||
</div>
|
||||
</dd>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
173
rb/rb.widget/rb.point_rank/widget.php
Normal file
173
rb/rb.widget/rb.point_rank/widget.php
Normal file
@ -0,0 +1,173 @@
|
||||
<!--
|
||||
경로 : /rb/rb.widget/rb.point_rank/
|
||||
출처 : https://sir.kr/g5_skin/59210
|
||||
제작자 : 미니님a
|
||||
|
||||
사용자코드를 입력하세요.
|
||||
배너관리 > 출력형태 : 개별출력 ID=5 배너가 연동되어 있습니다.
|
||||
배너를 변경하고자 하시는 경우 마지막 라인의 rb_banners() 함수의 ID를 변경해주세요.
|
||||
-->
|
||||
|
||||
<?php
|
||||
|
||||
//모듈정보 불러오기
|
||||
$md_id = $row_mod['md_id']; //현재 모듈 ID
|
||||
$rb_skin = sql_fetch (" select * from {$rb_module_table} where md_id = '{$md_id}' "); //환경설정 테이블 조회
|
||||
$md_subject = $rb_skin['md_title']; //모듈 타이틀
|
||||
|
||||
// 이번 주의 시작과 지난 주의 시작 계산
|
||||
$this_week_start = date('Y-m-d', strtotime('last Monday'));
|
||||
$last_week_start = date('Y-m-d', strtotime('last Monday -1 week'));
|
||||
$last_week_end = date('Y-m-d', strtotime('last Sunday'));
|
||||
|
||||
// 출력 인원수
|
||||
$limit = 10;
|
||||
|
||||
// 제외할 아이디
|
||||
$exclude_ids_array = ['admin', 'webmaster', 'test3'];
|
||||
$exclude_ids = implode("','", $exclude_ids_array);
|
||||
|
||||
// 현재 주의 총 포인트를 가져오는 쿼리
|
||||
$sql_current_week = "
|
||||
SELECT
|
||||
m.mb_id,
|
||||
m.mb_nick,
|
||||
SUM(IFNULL(p.po_point, 0)) AS total_points
|
||||
FROM
|
||||
{$g5['member_table']} m
|
||||
LEFT JOIN
|
||||
{$g5['point_table']} p ON m.mb_id = p.mb_id
|
||||
WHERE
|
||||
m.mb_id NOT IN ('{$exclude_ids}')
|
||||
GROUP BY
|
||||
m.mb_id
|
||||
ORDER BY
|
||||
total_points DESC
|
||||
LIMIT {$limit}
|
||||
";
|
||||
$current_week_result = sql_query($sql_current_week);
|
||||
|
||||
// 지난 주의 총 포인트를 가져오는 쿼리
|
||||
$sql_last_week = "
|
||||
SELECT
|
||||
m.mb_id,
|
||||
SUM(IFNULL(p.po_point, 0)) AS total_points
|
||||
FROM
|
||||
{$g5['member_table']} m
|
||||
LEFT JOIN
|
||||
{$g5['point_table']} p ON m.mb_id = p.mb_id
|
||||
WHERE
|
||||
m.mb_id NOT IN ('{$exclude_ids}')
|
||||
AND p.po_datetime BETWEEN '{$last_week_start}' AND '{$last_week_end}'
|
||||
GROUP BY
|
||||
m.mb_id
|
||||
ORDER BY
|
||||
total_points DESC
|
||||
";
|
||||
$last_week_result = sql_query($sql_last_week);
|
||||
|
||||
// 지난 주의 랭킹을 계산
|
||||
$last_week_ranking = [];
|
||||
$rank = 1;
|
||||
while ($rows = sql_fetch_array($last_week_result)) {
|
||||
$last_week_ranking[$rows['mb_id']] = $rank++;
|
||||
}
|
||||
|
||||
// 순위 변동 계산 함수
|
||||
function get_rank_change($mb_id, $current_rank, $last_week_ranking) {
|
||||
if (isset($last_week_ranking[$mb_id])) {
|
||||
$last_rank = $last_week_ranking[$mb_id];
|
||||
$change = $last_rank - $current_rank;
|
||||
if ($change > 0) {
|
||||
return "<span style='color:blue'>▲ {$change}</span>";
|
||||
} elseif ($change < 0) {
|
||||
return "<span style='color:red'>▼ " . abs($change) . "</span>";
|
||||
} else {
|
||||
return "-";
|
||||
}
|
||||
} else {
|
||||
return "<span style='color:black'>New</span>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="bbs_main">
|
||||
|
||||
<ul class="bbs_main_wrap_tit">
|
||||
<li class="bbs_main_wrap_tit_l"><a href="#">
|
||||
<h2 class="font-B"><?php echo $md_subject ?></h2>
|
||||
</a>
|
||||
</li>
|
||||
<!--
|
||||
<li class="bbs_main_wrap_tit_r">
|
||||
<button type="button" class="tiny_tab_btn active">보유</button>
|
||||
<button type="button" class="tiny_tab_btn">누적</button>
|
||||
</li>
|
||||
-->
|
||||
<div class="cb"></div>
|
||||
</ul>
|
||||
<ul class="bbs_main_wrap_point_con">
|
||||
<div class="swiper-container swiper-container-point_rank">
|
||||
<ul class="swiper-wrapper swiper-wrapper-point_rank">
|
||||
|
||||
<?php
|
||||
$rank = 1;
|
||||
while ($rows = sql_fetch_array($current_week_result)) {
|
||||
$mb_id = $rows['mb_id'];
|
||||
$mb_nick = $rows['mb_nick'];
|
||||
$total_points = number_format($rows['total_points']);
|
||||
$rank_change = get_rank_change($mb_id, $rank, $last_week_ranking);
|
||||
|
||||
echo "<dd class='swiper-slide swiper-slide-point_rank'>";
|
||||
if($rank == 1) {
|
||||
echo "<span class='point_list_num top1_bg'>{$rank}</span>";
|
||||
} else if($rank == 2) {
|
||||
echo "<span class='point_list_num top2_bg'>{$rank}</span>";
|
||||
} else {
|
||||
echo "<span class='point_list_num'>{$rank}</span>";
|
||||
}
|
||||
echo "<span class='point_list_name'><span class='cut'>{$mb_nick}</span></span>";
|
||||
echo "<span class='point_list_point font-H'>{$total_points} P</span>";
|
||||
//echo "<span class='point_list_ch'>{$rank_change}</span>";
|
||||
echo "</dd>";
|
||||
|
||||
$rank++;
|
||||
}
|
||||
?>
|
||||
<!-- } -->
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var swiper = new Swiper('.swiper-container-point_rank', {
|
||||
slidesPerColumnFill: 'row', //세로형
|
||||
slidesPerView: 2, //가로갯수
|
||||
slidesPerColumn: 5, // 세로갯수
|
||||
spaceBetween: 12, // 간격
|
||||
observer: true, //리셋
|
||||
observeParents: true, //리셋
|
||||
touchRatio: 0, // 드래그 가능여부
|
||||
|
||||
breakpoints: { // 반응형
|
||||
1024: {
|
||||
slidesPerView: 2, //가로갯수
|
||||
slidesPerColumn: 5, // 세로갯수
|
||||
|
||||
spaceBetween: 12, // 간격
|
||||
},
|
||||
10: {
|
||||
slidesPerView: 1, //가로갯수
|
||||
slidesPerColumn: 10, // 세로갯수
|
||||
|
||||
spaceBetween: 12, // 간격
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
32
rb/rb.widget/rb.quick_btns/widget.php
Normal file
32
rb/rb.widget/rb.quick_btns/widget.php
Normal file
@ -0,0 +1,32 @@
|
||||
<!--
|
||||
경로 : /rb/rb.widget/rb.quick_btns/
|
||||
사용자코드를 입력하세요.
|
||||
-->
|
||||
<div class="q_btns pc">
|
||||
<button type="button" class="arr_bg" onclick="location.href='#';">
|
||||
<i><img src="<?php echo G5_THEME_URL ?>/rb.img/icon/icon_btn1.svg"></i>
|
||||
<span>레벨링 가이드</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="arr_bg" onclick="location.href='#';">
|
||||
<i><img src="<?php echo G5_THEME_URL ?>/rb.img/icon/icon_btn2.svg"></i>
|
||||
<span>배너광고 신청</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="arr_bg" onclick="location.href='#';">
|
||||
<i><img src="<?php echo G5_THEME_URL ?>/rb.img/icon/icon_btn3.svg"></i>
|
||||
<span>포인트 충전</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
function openNewWindow(url) {
|
||||
var width = Math.min(window.screen.width, 1380);
|
||||
var height = Math.min(window.screen.height, 768);
|
||||
var left = (window.screen.width - width) / 2;
|
||||
var top = (window.screen.height - height) / 2;
|
||||
|
||||
window.open(url, '_blank', `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=yes`);
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user