This commit is contained in:
shim
2023-04-17 11:06:08 +09:00
parent d0b393aa97
commit 76264e09ad
4686 changed files with 552713 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
The RBL License
Copyright (c) 2020 Redblock, Inc.

View File

@@ -0,0 +1,6 @@
# 게시판 테마 입니다.
기본형 데스크탑 목록형 게시판 테마 입니다.
## 주요기능
- 글쓰기 기능

View File

@@ -0,0 +1,148 @@
<!-- 첨부파일 접근권한 -->
<?php if ($d['bbs']['perm_l_down'] <= $my['level'] && (strpos($d['bbs']['perm_g_down'],'['.$my['mygroup'].']') === false)): ?>
<!-- 사진 -->
<?php if ($R['upload']): ?>
<?php
$img_files = array();
$audio_files = array();
$video_files = array();
$down_files = array();
foreach($d['upload']['data'] as $_u){
if($_u['type']==2 and $_u['hidden']==0) array_push($img_files,$_u);
else if($_u['type']==4 and $_u['hidden']==0) array_push($audio_files,$_u);
else if($_u['type']==5 and $_u['hidden']==0) array_push($video_files,$_u);
else if($_u['type']==1 || $_u['type']==6 || $_u['type']==7 and $_u['hidden']==0) array_push($down_files,$_u);
}
$attach_photo_num = count ($img_files);
$attach_video_num = count ($video_files);
$attach_audio_num = count ($audio_files);
$attach_down_num = count ($down_files);
?>
<div class="attach-section clearfix my-5">
<?php if($attach_photo_num>0):?>
<div class="float-left">
<ul class="list-inline mb-1 gallery animated fadeIn delay-1" data-plugin="photoswipe">
<?php foreach($img_files as $_u):?>
<?php
$img_origin=$_u['host'].'/'.$_u['folder'].'/'.$_u['tmpname'];
$thumb_list=getPreviewResize($img_origin,'180x120'); // 미리보기 사이즈 조정 (이미지 업로드시 썸네일을 만들 필요 없다.)
$thumb_modal=getPreviewResize($img_origin,'c'); // 정보수정 모달용 사이즈 조정 (이미지 업로드시 썸네일을 만들 필요 없다.)
?>
<figure class="list-inline-item">
<a class="" href="<?php echo $img_origin ?>" data-size="<?php echo $_u['width']?>x<?php echo $_u['height']?>" title="<?php echo $_u['name']?>">
<img src="<?php echo $thumb_list ?>" alt="" class="border">
</a>
<figcaption itemprop="caption description" class="f12 p-3">
<div class="media">
<div class="mr-2"><i class="fa fa-file-image-o fa-lg text-primary" aria-hidden="true"></i></div>
<div class="media-body">
<p class="mb-2 font-weight-bold"><?php echo $_u['name']?></p>
<small data-role="caption"><?php echo $_u['caption']?></small>
<small><?php echo getSizeFormat($_u['size'],1)?></small>
</div>
</div>
</figcaption>
<div class="card__corner">
<div class="card__corner-triangle"></div>
</div>
</figure>
<?php endforeach?>
</ul>
</div>
<?php endif?>
<?php if($attach_down_num>0):?>
<div class="float-left">
<ul class="list-inline mb-1 gallery animated fadeIn delay-1">
<?php foreach($down_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<li class="list-inline-item">
<div class="card f12" style="width: 180px">
<div class="card__corner">
<div class="card__corner-triangle"></div>
</div>
<div class="card-block d-flex justify-content-center align-items-center" style="height:87px">
<i class="fa fa-3x fa-file<?php echo $ext_icon?>-o text-muted"></i>
</div>
<div class="card-footer p-2 text-truncate text-muted bg-light">
<i class="fa fa-download" aria-hidden="true"></i> <?php echo $_u['name']?>
</div>
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=mediaset&amp;a=download&amp;uid=<?php echo $_u['uid']?>" class="card-img-overlay bg-light text-muted p-3">
<div class="media">
<div class="mr-2"><i class="fa fa-file<?php echo $ext_icon?>-o fa-lg text-primary" aria-hidden="true"></i></div>
<div class="media-body">
<p class="mb-2 font-weight-bold"><?php echo $_u['name']?></p>
<small data-role="caption"><?php echo $_u['caption']?></small>
<small><?php echo getSizeFormat($_u['size'],1)?></small>
<span class="ml-2">
<i class="fa fa-download" aria-hidden="true"></i>
<small class="text-muted"><?php echo number_format($_u['down'])?></small>
</span>
</div>
</div>
</a>
</div>
</li>
<?php endforeach?>
</ul>
</div>
<?php endif?>
</div>
<?php if($attach_video_num>0):?>
<div class="card-deck">
<?php foreach($video_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<div class="card">
<video width="320" height="240" controls data-plugin="mediaelement" class="card-img-top">
<source src="<?php echo $_u['host']?>/<?php echo $_u['folder']?>/<?php echo $_u['tmpname']?>" type="video/<?php echo $_u['ext']?>">
</video>
<div class="card-body">
<h6 class="card-title"><?php echo $_u['name']?></h6>
<p class="card-text"><small class="text-muted">(<?php echo getSizeFormat($_u['size'],1)?>)</small></p>
</div><!-- /.card-block -->
</div><!-- /.card -->
<?php endforeach?>
</div><!-- /.card-deck -->
<?php endif?>
<?php if($attach_audio_num>0):?>
<div class="card-deck">
<?php foreach($audio_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<div class="card">
<audio controls data-plugin="mediaelement" class="card-img-top w-100">
<source src="<?php echo $_u['host']?>/<?php echo $_u['folder']?>/<?php echo $_u['tmpname']?>" type="audio/mp3">
</audio>
<div class="card-body">
<h6 class="card-title"><?php echo $_u['name']?></h6>
<p class="card-text"><small class="text-muted">(<?php echo getSizeFormat($_u['size'],1)?>)</small></p>
</div><!-- /.card-block -->
</div><!-- /.card -->
<?php endforeach?>
</div><!-- /.card-deck -->
<?php endif?>
<?php endif; ?>
<?php endif; ?>

View File

@@ -0,0 +1,105 @@
<?php
// 댓글 일반 사항
/*
1) 댓글 저장 테이블 : rb_s_comment
2) 한줄의견 저장 테이블 : rb_s_oneline
3) rb_s_comment 의 parent 필드 저장형식 ==> p_modulep_uid
예를 들어, 게시판 모듈의 uid = 3 인 글의 댓글은 아래와 같이 저장됩니다.
====> bbs3
4) 테마 css 는 테마/css/style.css 이며 댓글박스 가져올때 자동으로 함께 링크를 가져옵니다.
이 css 를 삭제하면 안되며 필요없는 경우 공백으로 처리하는 방법으로 하시기 바랍니다.
현재, notify 부분에 대한 css 가 있어서 삭제하면 안됩니다.
*/
// 댓글 출력 함수
// 함수 호출 방식으로 하면 모달 호출시에도 적용하기 편합니다.
/*
1) module = 부모모듈 : 댓글의 부모 모듈 id ( ex: bbs, post, forum ...)
2) parent_uid = 부모 uid : 댓글의 부모 포스트 uid
3) parent_table = 부모 테이블 : p_uid 가 소속된 테이블명 ( ex : rb_bbs_data, rb_blog_data, rb_chanel_data ...)
(댓글, 한줄의견 추가/삭제시 합계 업데이트시 필요)
*/
?>
<div id="commentting-container">
<!-- 댓글 출력 -->
</div>
<!-- theme css : 삭제금지, 불필요한 경우 해당 파일 내용을 비움. -->
<link href="<?php echo $g['url_root']?>/modules/comment/themes/<?php echo $d['bbs']['c_skin']?>/css/style.css" rel="stylesheet">
<script>
var attach_file_saveDir = '<?php echo $g['path_file']?>comment/';// 파일 업로드 폴더
var attach_module_theme = '<?php echo $d['theme']['upload_theme'] ?>';// attach 모듈 테마
$(function () {
// 댓글 출력 함수 실행
var p_module = '<?php echo $m?>';
var p_table = '<?php echo $table[$m.'data']?>';
var p_uid = '<?php echo $uid?>';
var agent = navigator.userAgent.toLowerCase();
if ((navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) || (agent.indexOf("msie") != -1) ) {
var theme = '_desktop/bs4-classic'; // 인터넷 익스플로러 브라우저, 일반 코멘트 적용
} else {
var theme = '<?php echo $d['bbs']['c_skin'] ?>'; // 인터넷 익스플로러 브라우저가 아닌 경우, ckeditor5 기반 코멘트 적용
}
var commentting_container = $('#commentting-container');
var get_Rb_Comment = function(p_module,p_table,p_uid,theme){
commentting_container.Rb_comment({
moduleName : 'comment', // 댓글 모듈명 지정 (수정금지)
parent : p_module+'-'+p_uid, // rb_s_comment parent 필드에 저장되는 형태가 p_modulep_uid 형태임 참조.(- 는 저장시 제거됨)
parent_table : p_table, // 부모 uid 가 저장된 테이블 (게시판인 경우 rb_bbs_data : 댓글, 한줄의견 추가/삭제시 전체 합계 업데이트용)
theme_name : theme, // 댓글 테마
containerClass :'rb-commentting', // 본 엘리먼트(#commentting-container)에 추가되는 class
recnum: 15, // 출력갯수
commentPlaceHolder : '댓글을 입력해 주세요..',
noMoreCommentMsg : '댓글 없음 ',
commentLength : 500, // 댓글 입력 글자 수 제한
toolbar : ['imageUpload','bold','link'] // 툴바 항목
});
}
get_Rb_Comment(p_module,p_table,p_uid,theme);
// 댓글이 초기화 된 후
commentting_container.on('shown.rb.comment',function(){
var hash = $(location).attr('hash'); //URL에서 해시추출
if (hash) {
setTimeout(function(){
location.href = hash;
$(hash).addClass('highlight');
}, 500); //해시가 있을 경우, 해당 댓글(한줄의견)으로 이동
}
});
// 댓글이 등록된 후에
commentting_container.on('saved.rb.comment',function(){
$('[data-toggle="tooltip"]').tooltip()
})
// 댓글이 수정된 후에
commentting_container.on('edited.rb.comment',function(){
$.notify({message: '댓글이 수정 되었습니다.'},{type: 'success'});
})
// 한줄의견이 등록된 후에
commentting_container.on('saved.rb.oneline',function(){
$('[data-toggle="tooltip"]').tooltip()
})
commentting_container.on('edited.rb.oneline',function(){
$.notify({message: '의견이 수정 되었습니다.'},{type: 'success'});
})
})
</script>

View File

@@ -0,0 +1,9 @@
<!-- 게시판 픗터 파일 -->
<?php if ($g['add_footer_img']): ?>
<div class="my-3">
<img src="<?php echo $g['add_footer_img'] ?>" alt="" class="img-fluid my-3">
</div>
<?php endif; ?>
<!-- 게시판 픗터 코드 -->
<?php if ($g['add_footer_inc']) include_once $g['add_footer_inc'];?>

View File

@@ -0,0 +1,9 @@
<!-- 게시판 헤더 파일 -->
<?php if ($g['add_header_img']): ?>
<div class="my-3">
<img src="<?php echo $g['add_header_img'] ?>" alt="" class="img-fluid">
</div>
<?php endif; ?>
<!-- 게시판 헤더 코드 -->
<?php if ($g['add_header_inc']) include_once $g['add_header_inc'];?>

View File

@@ -0,0 +1,47 @@
<?php
// seo 데이타 -- 전송되는 타이틀 추출
$_MSEO = getDbData($table['s_seo'],'rel=1 and parent='.$_HM['uid'],'*');
$_PSEO = getDbData($table['s_seo'],'rel=2 and parent='.$_HP['uid'],'*');
$_WTIT=strip_tags($g['meta_tit']);
$_link_url=$g['url_root'].$_SERVER['REQUEST_URI'];
?>
<ul class="list-inline" data-role="linkshare">
<li data-toggle="tooltip" title="페이스북" class="list-inline-item">
<a href="" role="button" onclick="snsWin('f');">
<img src="<?php echo $g['img_core']?>/sns/facebook.png" alt="페이스북공유" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="카카오스토리" class="list-inline-item">
<a href="" role="button" onclick="snsWin('ks');">
<img src="<?php echo $g['img_core']?>/sns/kakaostory.png" alt="카카오스토리" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="네이버" class="list-inline-item">
<a href="" role="button" onclick="snsWin('n');">
<img src="<?php echo $g['img_core']?>/sns/naver.png" alt="네이버" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="트위터" class="list-inline-item">
<a href="" role="button" onclick="snsWin('t');">
<img src="<?php echo $g['img_core']?>/sns/twitter.png" alt="트위터" class="rounded-circle" width="50">
</a>
</li>
</ul>
<script type="text/javascript">
// sns 이벤트
function snsWin(sns) {
var snsset = new Array();
var enc_sbj = "<?php echo urlencode($_WTIT)?>";
var enc_url = "<?php echo urlencode($_link_url)?>";
var enc_tag = "<?php echo urlencode(str_replace(',',' ',$R['tag']))?>";
snsset['t'] = 'https://twitter.com/intent/tweet?url=' + enc_url + '&text=' + enc_sbj;
snsset['f'] = 'http://www.facebook.com/sharer.php?u=' + enc_url;
snsset['n'] = 'http://share.naver.com/web/shareView.nhn?url=' + enc_url + '&title=' + enc_sbj;
snsset['ks'] = 'https://story.kakao.com/share?url=' + enc_url + '&title=' + enc_sbj;
window.open(snsset[sns]);
}
</script>

View File

@@ -0,0 +1,153 @@
@charset "utf-8";
/*!
* kimsQ Rb v2.4.5 데스크탑 기본형 게시판 테마 스타일 (bs4-default)
* Homepage: http://www.kimsq.com
* Copyright 2020 redblock inc
* Licensed under RBL
* Based on Bootstrap v4
*/
/**
* 목차:
*
* 1 - 공통 rb-bbs
* 2 - 목록 rb-bbs-list
* 3 - 보기 rb-bbs-view
* 4 - 쓰기 rb-bbs-write
* 5 - 컴포넌트 Component
* 6 - 유틸리티 Utilities
* ----------------------------------------------------------------------------
*/
/**
* 1 - 공통 rb-bbs
* ----------------------------------------------------------------------------
*/
/**
* 2 - 목록 rb-bbs-list
* ----------------------------------------------------------------------------
*/
.rb-bbs-list .ico-replay::before {
display: inline-block;
width: 13px;
height: 10px;
margin: 4px 4px 0 1px;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAABkCAMAAACvvNBNAAAAclBMVEVMaXEtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUAAAAtlvXBtxldAAAAJHRSTlMAlgoDD071ePxpN7FZvfDjLRxb/gEGpEL5hxUkyNvqeXyAwuvQ8jQMAAAAqElEQVR42u2R1w7CMAxFu/feu4ze//9FWlRaWlwkBC9IPi+2cpzYSYTPUZwjk7rQaZNk8ENalfAC2pgoctqoRhzRxtKWERxlY+oO4pz2cKUnU7Ww5TkP/Sl/IDVo1srAW04QZBttRfcV0dW7aWHeEx2a9XJHQx1DFI9hz2kqz4tp88rS5Op4KDdr62hAlpDPI13gpkf/elYEhmGYXzAMrL5XO94phvlnbrKzELi3OthbAAAAAElFTkSuQmCC) 0 -30px no-repeat;
background-size: 13px 50px;
vertical-align: top;
content: '';
}
/* 포커스된 아이템 강조표시 */
[data-role="bbs-list"] tr:focus {
background-color: #F5FFFE !important;
}
[data-role="bbs-list"] tr a:focus {
outline: 0
}
/**
* 3 - 보기 rb-bbs-view
* ----------------------------------------------------------------------------
*/
.rb-bbs-view {
margin-top: 30px
}
.rb-bbs-view header .media-body h1 {
padding: 4px 0 8px 0;
margin: 0;
font-size: 14px;
font-weight: bold;
line-height: 1.5;
border-bottom: #dfdfdf dotted 1px;
}
.rb-bbs-view header .rb-meta {
color: #c0c0c0;
font-family: dotum;
font-size: 11px;
line-height: 20px;
}
.rb-bbs-view header .rb-meta .rb-divider:before {
content: '|';
color: #ddd;
}
.rb-bbs-view [data-role="linkshare"] img {
width: 38px
}
.active .fa-bookmark-o:before {
content: "\f02e" !important;
}
[data-role="btn_post_like"].active .fa-heart-o:before {
content: "\f004";
}
[data-role="btn_post_like"].active .fa,
[data-role="btn_post_dislike"].active .fa {
color: red;
}
[data-role="btn_post_like"].active.heartbeat .fa,
[data-role="btn_post_dislike"].active.heartbeat .fa {
animation: heartbeat .8s;
}
.tag .badge~.badge {
margin-left: .3rem
}
/**
* 4 - 쓰기 rb-bbs-write
* ----------------------------------------------------------------------------
*/
.rb-bbs-write {
margin-top: 30px
}
.rb-bbs-write .ck-editor__editable_inline {
min-height: 350px;
}
/**
* 5 - 컴포넌트 Component
* ----------------------------------------------------------------------------
*/
/**
* 6 - 유틸리티 Utilities
* ----------------------------------------------------------------------------
*/
@keyframes heartbeat
{
0%
{
transform: scale( 1.8 );
}
30%
{
transform: scale( 1 );
}
60%
{
transform: scale( 1.8 );
}
100%
{
transform: scale( 1 );
}
}

View File

@@ -0,0 +1,60 @@
/**
* --------------------------------------------------------------------------
* kimsQ Rb v2.4.5 데스크탑 기본형 게시판 테마 스크립트 (bs4-default): _main.js
* Homepage: http://www.kimsq.com
* Licensed under RBL
* Copyright 2020 redblock inc
* --------------------------------------------------------------------------
*/
$(function () {
// 사용자 액션에 대한 피드백 메시지 제공을 위해 액션 실행후 쿠키에 저장된 결과 메시지를 출력시키고 초기화 시킵니다.
putCookieAlert('bbs_action_result') // 실행결과 알림 메시지 출력
$('[data-toggle="print"]').click(function() {
window.print()
});
$('[data-toggle="actionIframe"]').click(function() {
getIframeForAction('');
frames.__iframe_for_action__.location.href = $(this).attr("data-url");
});
//게시물 목록에서 프로필 풍선(popover) 띄우기
$('[data-toggle="getMemberLayer"]').popover({
container: 'body',
trigger: 'manual',
html: true,
content: function () {
var uid = $(this).attr('data-uid')
var mbruid = $(this).attr('data-mbruid')
var type = 'popover'
$.post(rooturl+'/?r='+raccount+'&m=member&a=get_profileData',{
mbruid : mbruid,
type : type
},function(response){
var result = $.parseJSON(response);
var profile=result.profile;
$('#popover-item-'+uid).html(profile);
});
return '<div id="popover-item-'+uid+'" class="p-1">불러오는 중...</div>';
}
})
.on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
});
}).on("mouseleave", function () {
var _this = this;
setTimeout(function () {
if (!$(".popover:hover").length) {
$(_this).popover("hide");
}
}, 300);
});
})

View File

@@ -0,0 +1,39 @@
<div data-role="attach">
<?php if($d['theme']['perm_photo']<=$my['level']):?>
<?php endif?>
<!--
module : 첨부파일 사용 모듈 ,
theme : 첨부파일 테마 ,
attach_handler_file : 파일첨부 실행 엘리먼트 ,
attach_handler_photo : 사진첨부 실행 엘리먼트 ,
parent_data : 수정시 필요한 해당 포스트 데이타 배열 변수,
attach_handler_getModalList : 업로드 리스트 모달로 호출용 엘리먼트 (class 인 경우 . 까지 넘긴다.) -->
<?php
// 설정값 세팅
// $parent_table=$wdgvar['parent_table'];
// $parent_uid=$wdgvar['parent_uid'];
// $parent_field=$wdgvar['parent_field'];
// $attach_mod=$wdgvar['attach_mod']; // main, list...
// $attach_object_type=$wdgvar['attach_object_type'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_tmpcode=$wdgvar['attach_tmpcode'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_featuredImg_form_name=$wdgvar['featuredImg_form_name'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_wdgvar_id=$wdgvar['widget_uid'];
$attachSkin = $d['bbs']['a_skin']?$d['bbs']['a_skin']: ($d['theme']['upload_theme']?$d['theme']['upload_theme']:$d['bbs']['attach_main']); // 업로드 테마
$parent_module=$m; // 첨부파일 사용하는 모듈
$parent_data=$R; // 해당 포스트 데이타 (수정시 필요)
$attach_module_theme=$attachSkin; // 첨부파일 테마
$attach_handler_file='[data-role="attach-handler-file"]'; //파일첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
$attach_handler_photo='[data-role="attach-handler-photo"]'; // 사진첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
$attach_handler_getModalList='.getModalList'; // 첨부파일 리스트 호출 handler
$editor_type=$editor_type; // 에디터 타입 : html,markdown
$attach_object_type= 'photo';//첨부 대상에 따른 분류 : photo, file, link, video....
include $g['path_module'].'mediaset/attach.php'; // 함수 인클루드
?>
</div>

View File

@@ -0,0 +1,32 @@
<?php
// 공통
$d['theme']['profile_link'] = "1"; // 회원 프로필 링크 (사용=1/사용안함=0)
//목록
$d['theme']['show_catnum'] = "1"; //분류별등록수출력(출력=1/감춤=0)
$d['theme']['pagenum'] = "5"; //페이지스킵숫자갯수
$d['theme']['search'] = "1"; //검색폼출력(출력=1/감춤=0)
$d['theme']['timeago'] = "0"; //상대시간 표기(사용=1/날짜표기=0)
//본문
$d['theme']['date_viewf'] = "Y.m.d H:i"; //날짜포맷
$d['theme']['show_report'] = "1"; //신고사용(출력=1/감춤=0)
$d['theme']['show_print'] = "1"; //인쇄사용(출력1/감춤=0)
$d['theme']['show_saved'] = "1"; //링크저장사용(출력=1/감춤=0)
$d['theme']['use_reply'] = "1"; //관리자 답변사용(사용=1/사용안함=0)
$d['theme']['show_tag'] = "1"; //태그출력(출력=1/감춤=0)
$d['theme']['show_upfile'] = "1"; //첨부파일출력(출력=1/감춤=0)
$d['theme']['show_like'] = "1"; //좋아요 출력(출력=1/감춤=0)-회원전용
$d['theme']['show_dislike'] = "0"; //싫어요 출력(출력=1/감춤=0)-회원전용
$d['theme']['show_share'] = "1"; //SNS공유출력(출력=1/감춤=0)
$d['theme']['comment_theme'] = "_desktop/bs4-default"; //댓글 테마 (/modules/comment/themes/ 참고)
//글쓰기
$d['theme']['edit_height'] = "350"; //글쓰기폼높이(픽셀)
$d['theme']['show_edittoolbar'] = "1"; //에디터 툴바출력(출력=1/감춤=0)
$d['theme']['show_upload'] = "1"; //파일 업로더 출력 여부 (출력=1/감춤=0)
$d['theme']['upload_theme'] = "_desktop/bs4-default-attach"; //파일 업로드 테마 (/modules/mediaset/themes/ 참고)
$d['theme']['perm_upload'] = "1"; //파일첨부권한(등급이상)
$d['theme']['show_wtag'] = "1"; //태그필드출력(출력=1/감춤=0)
$d['theme']['use_hidden'] = "1"; //비밀글(사용안함=0/유저선택사용=1/무조건비밀글=2)
?>

View File

@@ -0,0 +1,253 @@
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-list">
<header class="d-flex justify-content-between align-items-center mb-4">
<span class="text-muted">
<small>총게시물 : <strong><?php echo number_format($NUM+count($NCD))?></strong> 건 (<?php echo $p?>/<?php echo $TPG?> page) </small>
</span>
<form class="form-inline" name="bbssearchf" action="<?php echo $g['s']?>/">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="c" value="<?php echo $c?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="bid" value="<?php echo $bid?>">
<input type="hidden" name="cat" value="<?php echo $cat?>">
<input type="hidden" name="sort" value="<?php echo $sort?>">
<input type="hidden" name="orderby" value="<?php echo $orderby?>">
<input type="hidden" name="recnum" value="<?php echo $recnum?>">
<input type="hidden" name="type" value="<?php echo $type?>">
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
<input type="hidden" name="skin" value="<?php echo $skin?>">
<!-- 카테고리 출력부 -->
<?php if($B['category']):$_catexp = explode(',',$B['category']);$_catnum=count($_catexp)?>
<select name="category" class="form-control custom-select mr-2" onchange="document.bbssearchf.cat.value=this.value;document.bbssearchf.submit();">
<option value="">
<?php echo $_catexp[0]?>
</option>
<?php for($i = 1; $i < $_catnum; $i++):if(!$_catexp[$i])continue;?>
<option value="<?php echo $_catexp[$i]?>" <?php if($_catexp[$i]==$cat):?> selected="selected"
<?php endif?>>
<?php echo $_catexp[$i]?>
<?php if($d['theme']['show_catnum']):?>(<?php echo getDbRows($table[$m.'data'],'site='.$s.' and notice=0 and bbs='.$B['uid']." and category='".$_catexp[$i]."'")?>)
<?php endif?>
</option>
<?php endfor?>
</select>
<?php endif?>
<!-- 검색창 출력부 -->
<?php if($d['theme']['search']):?>
<div class="input-group">
<select class="custom-select rounded-0" name="where">
<option value="subject|tag"<?php if($where=='subject|tag'):?> selected="selected"<?php endif?>>제목+태그</option>
<option value="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
<option value="name"<?php if($where=='name'):?> selected="selected"<?php endif?>>이름</option>
<option value="nic"<?php if($where=='nic'):?> selected="selected"<?php endif?>>닉네임</option>
<option value="id"<?php if($where=='id'):?> selected="selected"<?php endif?>>아이디</option>
<option value="term"<?php if($where=='term'):?> selected="selected"<?php endif?>>등록일</option>
</select>
<input type="text" class="form-control" name="keyword" value="<?php echo $_keyword?>" placeholder="검색어를 입력해주세요" style="min-width:200px">
<div class="input-group-append">
<button class="btn btn-light" type="submit">검색</button>
</div>
<?php if ($keyword): ?>
<div class="input-group-append">
<a class="btn btn-primary" href="<?php echo $g['bbs_reset'] ?>">리셋</a>
</div>
<?php endif; ?>
</div>
<?php endif?>
</form>
</header>
<div class="table-responsive-md">
<table class="table text-center bg-white" data-role="bbs-list">
<colgroup>
<col width="7%">
<col>
<col width="15%">
<col width="10%">
<col width="10%">
</colgroup>
<thead class="thead-light">
<tr>
<th scope="col"></th>
<th scope="col">제목</th>
<th scope="col">글쓴이</th>
<th scope="col">조회</th>
<th scope="col">작성일</th>
</tr>
</thead>
<tbody>
<!-- 공지사항 출력부 -->
<?php foreach($NCD as $R):?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<tr class="table-light" id="item-<?php echo $R['uid'] ?>">
<td>
<?php if($R['uid'] != $uid):?>
<span class="badge badge-light">공지</span>
<?php else:?>
<span class="now">&gt;&gt;</span>
<?php endif?>
</td>
<td class="text-left">
<?php if($R['mobile']):?><i class="fa fa-mobile fa-lg"></i>
<?php endif?>
<?php if($R['category']):?>
<span class="badge badge-secondary"><?php echo $R['category']?></span>
<?php endif?>
<a href="<?php echo $g['bbs_view'].$R['uid']?>" class="muted-link">
<?php echo getStrCut($R['subject'],$d['bbs']['sbjcut'],'')?>
</a>
<?php if(strstr($R['content'],'.jpg') || strstr($R['content'],'.png')):?>
<span class="badge badge-light" data-toggle="tooltip" title="사진">
<i class="fa fa-camera-retro fa-lg"></i>
</span>
<?php endif?>
<?php if($R['upload']):?>
<span class="badge badge-light" data-toggle="tooltip" title="첨부파일">
<i class="fa fa-paperclip fa-lg"></i>
</span>
<?php endif?>
<?php if($R['hidden']):?><span class="badge badge-light" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span><?php endif?>
<?php if($R['comment']):?>
<span class="badge badge-light" data-role="total_comment">
<?php echo $R['comment']?><?php echo $R['oneline']?'+'.$R['oneline']:''?>
</span>
<?php endif?>
<?php if(getNew($R['d_regis'],24)):?><span class="rb-new"></span><?php endif?>
</td>
<td>
<?php if ($d['theme']['profile_link']): ?>
<a class="muted-link" href="/@<?php echo $R['id'] ?>"
data-toggle="getMemberLayer"
data-uid="<?php echo $R['uid'] ?>"
data-mbruid="<?php echo $R['mbruid'] ?>">
<?php echo $R[$_HS['nametype']]?>
</a>
<?php else: ?>
<?php echo $R[$_HS['nametype']]?>
<?php endif; ?>
</td>
<td class="text-muted"><?php echo $R['hit']?></td>
<td class="text-muted small">
<time <?php echo $d['theme']['timeago']?'data-plugin="timeago"':'' ?> datetime="<?php echo getDateFormat($R['d_regis'],'c')?>">
<?php echo getDateFormat($R['d_regis'],'Y.m.d')?>
</time>
</td>
</tr>
<?php endforeach?>
<!-- 일반글 출력부 -->
<?php foreach($RCD as $R):?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<tr id="item-<?php echo $R['uid'] ?>">
<td class="text-muted small">
<?php if($R['uid'] != $uid):?>
<?php echo $NUM-((($p-1)*$recnum)+$_rec++)?>
<?php else:$_rec++?>
<span class="now">&gt;&gt;</span>
<?php endif?>
</td>
<td class="text-left">
<?php if($R['depth']):?>
<img src="<?php echo $g['img_core']?>/blank.gif" width="<?php echo ($R['depth']-1)*13?>" height="1">
<span class="ico-replay"></span>
<?php endif?>
<?php if($R['mobile']):?>
<span class="badge badge-light"><i class="fa fa-mobile fa-lg"></i></span>
<?php endif?>
<?php if($R['category']):?>
<span class="badge badge-light"><?php echo $R['category']?></span>
<?php endif?>
<a href="<?php echo $g['bbs_view'].$R['uid']?>" class="muted-link">
<?php echo getStrCut($R['subject'],$d['bbs']['sbjcut'],'')?>
</a>
<?php if(strstr($R['content'],'.jpg') || strstr($R['content'],'.png')):?>
<span class="badge badge-light" data-toggle="tooltip" title="사진">
<i class="fa fa-camera-retro fa-lg"></i>
</span>
<?php endif?>
<?php if($R['upload']):?>
<span class="badge badge-light" data-toggle="tooltip" title="첨부파일">
<i class="fa fa-paperclip fa-lg"></i>
</span>
<?php endif?>
<?php if($R['hidden']):?>
<span class="badge badge-light" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span>
<?php endif?>
<?php if($R['comment']):?>
<span class="badge badge-light" data-role="total_comment">
<?php echo $R['comment']?><?php echo $R['oneline']?'+'.$R['oneline']:''?>
</span>
<?php endif?>
<?php if(getNew($R['d_regis'],24)):?><span class="rb-new ml-1"></span><?php endif?>
</td>
<td>
<?php if ($d['theme']['profile_link']): ?>
<a class="muted-link" href="/@<?php echo $R['id'] ?>"
data-toggle="getMemberLayer"
data-uid="<?php echo $R['uid'] ?>"
data-mbruid="<?php echo $R['mbruid'] ?>">
<?php echo $R[$_HS['nametype']]?>
</a>
<?php else: ?>
<?php echo $R[$_HS['nametype']]?>
<?php endif; ?>
</td>
<td><?php echo $R['hit']?></td>
<td class="text-muted small">
<time <?php echo $d['theme']['timeago']?'data-plugin="timeago"':'' ?> datetime="<?php echo getDateFormat($R['d_regis'],'c')?>">
<?php echo getDateFormat($R['d_regis'],'Y.m.d')?>
</time>
</td>
</tr>
<?php endforeach?>
<?php if(!$NUM):?>
<tr>
<td class="text-muted p-5" colspan="5">
게시물이 없습니다.
</td>
</tr>
<?php endif?>
</tbody>
</table>
</div>
<footer class="d-flex justify-content-between align-items-center my-5">
<div class="btn-group">
<a class="btn btn-light" href="<?php echo $g['bbs_reset']?>">처음목록</a>
<a class="btn btn-light" href="<?php echo $g['bbs_list']?>">새로고침</a>
</div>
<ul class="pagination mb-0">
<?php echo getPageLink($d['theme']['pagenum'],$p,$TPG,'')?>
</ul>
<?php if($B['uid']):?>
<a class="btn btn-light" href="<?php echo $g['bbs_write']?>"><i class="fa fa-pencil"></i> 글쓰기</a>
<?php endif?>
</footer>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<script>
//검색어가 있을 경우 검색어 input focus
<?php if ($keyword): ?>
$('[name="keyword"]').focus()
<?php endif; ?>
</script>

View File

@@ -0,0 +1 @@
부트스트랩 4 리스트 기본형

View File

@@ -0,0 +1,151 @@
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-view">
<header>
<div class="media">
<span class="mr-3">
<img class="border rounded" src="<?php echo getAvatarSrc($R['mbruid'],'55') ?>" width="55" height="55" alt="">
</span>
<div class="media-body">
<h1 class="h4 mt-0">
<?php if($R['category']):?>
<span class="badge badge-light"><?php echo $R['category']?></span>
<?php endif?>
<?php echo $R['subject']?>
<?php if($R['hidden']):?>
<span class="badge badge-white" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span>
<?php endif?>
</h1>
<div class="d-flex justify-content-between mt-2">
<ul class="rb-meta list-inline mb-0 text-muted">
<li class="list-inline-item">
<?php if ($d['theme']['profile_link']): ?>
<a class="muted-link" href="#"
data-toggle="getMemberLayer"
data-uid="<?php echo $R['uid'] ?>"
data-mbruid="<?php echo $R['mbruid'] ?>">
<?php echo $R[$_HS['nametype']]?>
</a>
<?php else: ?>
<?php echo $R[$_HS['nametype']]?>
<?php endif; ?>
</li>
<li class="list-inline-item rb-divider"></li>
<li class="list-inline-item"><?php echo getDateFormat($R['d_regis'],$d['theme']['date_viewf'])?></li>
<li class="list-inline-item rb-divider"></li>
<li class="list-inline-item">조회 : <?php echo $R['hit']?></li>
</ul>
<div class="btn-group d-print-none">
<?php if($d['theme']['show_report']):?>
<a class="btn btn-link muted-link" href="<?php echo $g['bbs_action']?>singo&amp;uid=<?php echo $R['uid']?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 신고하시겠습니까?');">
<i class="fa fa-meh-o"></i> 신고
</a>
<?php endif?>
<?php if($d['theme']['show_saved']):?>
<button type="button" class="btn btn-link muted-link<?php if($is_saved):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>saved&amp;uid=<?php echo $R['uid']?>"
data-role="btn_post_saved">
<i class="fa fa-bookmark-o"></i> 저장
</button>
<?php endif?>
<?php if($d['theme']['show_print']):?>
<button class="btn btn-link muted-link" data-toggle="print" type="button"><i class="fa fa-print"></i> 인쇄</button>
<?php endif?>
</div>
</div><!-- /.d-flex -->
</div><!-- /.media-body -->
</div><!-- /.media -->
</header>
<!-- 본문 -->
<article class="py-4 rb-article">
<?php echo getContents($R['content'],$R['html'])?>
</article>
<!-- 좋아요 or 싫어요 -->
<div class="text-center d-print-none">
<?php if($d['theme']['show_like']):?>
<button type="button" class="btn btn-light<?php if($is_liked):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>opinion&amp;opinion=like&amp;uid=<?php echo $R['uid']?>&amp;effect=heartbeat"
data-role="btn_post_like">
<i class="fa fa fa-heart-o fa-fw" aria-hidden="true"></i> <strong></strong>
<span data-role='likes_<?php echo $R['uid']?>' class="badge badge-inverted"><?php echo $R['likes']?></span>
</button>
<?php endif?>
<?php if($d['theme']['show_dislike']):?>
<button type="button" class="btn btn btn-light<?php if($is_disliked):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>opinion&amp;opinion=dislike&amp;uid=<?php echo $R['uid']?>&amp;effect=heartbeat"
data-role="btn_post_dislike">
<i class="fa fa-thumbs-o-down fa-fw" aria-hidden="true"></i> <strong></strong>
<span data-role='dislikes_<?php echo $R['uid']?>' class="badge badge-inverted"><?php echo $R['dislikes']?></span>
</button>
<?php endif?>
</div>
<!-- 링크 공유 -->
<?php if($d['theme']['show_share']):?>
<div class="mt-4 d-print-none text-center">
<?php include $g['dir_module_skin'].'_linkshare.php'?>
</div>
<?php endif?>
<!-- 태그 -->
<?php if($R['tag']&&$d['theme']['show_tag']):?>
<div class="">
<?php $_tags=explode(',',$R['tag'])?>
<?php $_tagn=count($_tags)?>
<?php $i=0;for($i = 0; $i < $_tagn; $i++):?>
<?php $_tagk=trim($_tags[$i])?>
<a class="badge badge-secondary" href="<?php echo $g['bbs_orign']?>&amp;where=subject|tag&amp;keyword=<?php echo urlencode($_tagk)?>">
<?php echo $_tagk?>
</a>
<?php endfor?>
</div>
<?php endif?>
<!-- 첨부파일 인클루드 -->
<?php if($d['upload']['data']&&$d['theme']['show_upfile']&&$attach_file_num>0):?>
<aside class="mt-4">
<?php include $g['dir_module_skin'].'_attachment.php'?>
</aside>
<?php endif?>
<footer class="d-flex justify-content-between align-items-center mt-3 d-print-none">
<div class="btn-group">
<?php if($my['admin'] || $my['uid']==$R['mbruid']):?>
<a href="<?php echo $g['bbs_modify'].$R['uid']?>" class="btn btn-light">수정</a>
<a href="<?php echo $g['bbs_delete'].$R['uid']?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 삭제하시겠습니까?');" class="btn btn-light">삭제</a>
<?php endif?>
<?php if($my['admin']&&$d['theme']['use_reply']):?>
<a href="<?php echo $g['bbs_reply'].$R['uid']?>" class="btn btn-light">답변</a>
<?php endif?>
</div>
<a href="<?php echo $g['bbs_list']?>" class="btn btn-light">목록</a>
</footer>
<!-- 댓글 인클루드 -->
<?php if(!$d['bbs']['c_hidden']):?>
<aside class="mt-4">
<?php include $g['dir_module_skin'].'_comment.php'?>
</aside>
<?php endif?>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<?php if($d['theme']['show_list']&&$print!='Y'):?>
<?php include_once $g['dir_module'].'mod/_list.php'?>
<?php include_once $g['dir_module_skin'].'list.php'?>
<?php endif?>

View File

@@ -0,0 +1,253 @@
<?php
if (!$_SESSION['upsescode']) {
$_SESSION['upsescode'] = str_replace('.','',$g['time_start']);
}
$sescode = $_SESSION['upsescode'];
if($R['uid']){
$u_arr = getArrayString($R['upload']);
$_tmp=array();
$i=0;
foreach ($u_arr['data'] as $val) {
$U=getUidData($table['s_upload'],$val);
if(!$U['fileonly']) $_tmp[$i]=$val;
$i++;
}
$insert_array='';
// 중괄로로 재조립
foreach ($_tmp as $uid) {
$insert_array.='['.$uid.']';
}
}
if ($reply == 'Y') {
$submit_btn = '답변';
$submit_msg = '답변 게시물 등록중...';
$title_text = '게시물 답변 · ';
}
else if ($uid) {
$submit_btn = '수정';
$submit_msg = '게시물 수정중...';
$title_text = '게시물 수정 · ';
}
else {
$submit_btn = '등록';
$submit_msg = '게시물 등록중...';
$title_text = '새 게시물';
}
?>
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-write">
<article>
<form name="writeForm" method="post" action="<?php echo $g['s']?>/" onsubmit="return writeCheck(this);" role="form">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="a" value="write">
<input type="hidden" name="c" value="<?php echo $c?>">
<input type="hidden" name="cuid" value="<?php echo $_HM['uid']?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="bid" value="<?php echo $R['bbsid']?$R['bbsid']:$bid?>">
<input type="hidden" name="uid" value="<?php echo $R['uid']?>">
<input type="hidden" name="reply" value="<?php echo $reply?>">
<input type="hidden" name="nlist" value="<?php echo $g['bbs_list']?>">
<input type="hidden" name="pcode" value="<?php echo $date['totime']?>">
<input type="hidden" name="html" value="HTML">
<input type="hidden" name="upfiles" id="upfilesValue" value="<?php echo $reply=='Y'?'':$R['upload']?>">
<input type="hidden" name="featured_img" value="<?php echo $R['featured_img'] ?>">
<?php if(!$my['id']):?>
<div class="form-group">
<label>이름</label>
<input type="text" name="name" placeholder="이름을 입력해 주세요." value="<?php echo $R['name']?>" id="" class="form-control">
</div>
<?php if(!$R['uid']||$reply=='Y'):?>
<div class="form-group">
<label>암호</label>
<input type="password" name="pw" placeholder="암호는 게시글 수정 및 삭제에 필요합니다." value="<?php echo $R['pw']?>" id="" class="form-control">
<small class="form-text text-muted">비밀답변은 비번을 수정하지 않아야 원게시자가 열람할 수 있습니다.</small>
</div>
<?php endif?>
<?php endif?>
<?php if($B['category']):$_catexp = explode(',',$B['category']);$_catnum=count($_catexp)?>
<div class="form-group">
<label>카테고리</label>
<select name="category" class="form-control custom-select">
<option value="">&nbsp;+ <?php echo $_catexp[0]?>선택</option>
<?php for($i = 1; $i < $_catnum; $i++):if(!$_catexp[$i])continue;?>
<option value="<?php echo $_catexp[$i]?>"<?php if($_catexp[$i]==$R['category']||$_catexp[$i]==$cat):?> selected="selected"<?php endif?>>ㆍ<?php echo $_catexp[$i]?><?php if($d['theme']['show_catnum']):?>(<?php echo getDbRows($table[$m.'data'],'site='.$s.' and notice=0 and bbs='.$B['uid']." and category='".$_catexp[$i]."'")?>)<?php endif?></option>
<?php endfor?>
</select>
</div>
<?php endif?>
<div class="form-group">
<label for="">제목</label>
<input type="text" name="subject" placeholder="제목을 입력해 주세요." value="<?php echo $R['subject']?>" id="" class="form-control form-control-lg" autofocus autocomplete="off">
</div>
<div class="mb-3">
<script>
var attach_file_saveDir = '<?php echo $g['path_file']?>bbs/';// 파일 업로드 폴더
var attach_module_theme = '<?php echo $d['bbs']['a_skin']?$d['bbs']['a_skin']: ($d['theme']['upload_theme']?$d['theme']['upload_theme']:$d['bbs']['attach_main']); ?>';// attach 모듈 테마
</script>
<?php
$__SRC__ = htmlspecialchars($R['content']);
if ($g['broswer']!='MSIE 11' && $g['broswer']!='MSIE 10' && $g['broswer']!='MSIE 9') {
include $g['path_plugin'].'ckeditor5/import.classic.php';
} else {
include $g['path_plugin'].'ckeditor/import.desktop.php';
}
?>
</div>
<div class="form-group">
<label class="sr-only"></label>
<?php if($my['admin']):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="notice" name="notice" value="1"<?php if($R['notice']):?> checked="checked"<?php endif?>>
<label class="custom-control-label" for="notice">공지글</label>
</div>
<?php endif?>
<?php if($d['theme']['use_hidden']==1):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="hidden" name="hidden" value="1"<?php if($R['hidden']):?> checked<?php endif?>>
<label class="custom-control-label" for="hidden">비밀글</label>
</div>
<?php elseif($d['theme']['use_hidden']==2):?>
<input type="hidden" name="hidden" value="1">
<?php endif?>
</div>
<!-- 첨부파일 업로드 -->
<?php if($d['theme']['show_upload']&&$d['theme']['perm_upload']<=$my['level']):?>
<?php if ($d['bbs']['attach']): ?>
<?php include $g['dir_module_skin'].'_uploader.php'?>
<?php endif; ?>
<?php endif?>
<?php if($d['theme']['show_wtag']):?>
<div class="form-group mt-4">
<label>태그<span class="rb-form-required text-danger"></span></label>
<input class="form-control" type="text" name="tag" placeholder="검색태그를 입력해 주세요." value="<?php echo $R['tag']?>">
<small class="form-text text-muted mt-2">이 게시물을 가장 잘 표현할 수 있는 단어를 콤마(,)로 구분해서 입력해 주세요. 첫번째 항목이 대표 태그로 활용됩니다.</small>
</div>
<?php endif?>
<div class="form-group mt-5">
<label class="mr-3">등록 후</label>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype1" name="backtype" value="list"<?php if(!$_SESSION['bbsback'] || $_SESSION['bbsback']=='list'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype1">목록으로 이동</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype2" name="backtype" value="view"<?php if($_SESSION['bbsback']=='view'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype2">본문으로 이동</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype3" name="backtype" value="now"<?php if($_SESSION['bbsback']=='now'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype3">이 화면 유지</label>
</div>
</div><!-- /.form-group -->
<footer class="text-center my-5">
<button class="btn btn-lg btn-light" type="button" onclick="cancelCheck();">취소</button>
<button class="btn btn-lg btn-primary js-submit" type="submit">
<?php echo $submit_btn ?>
</button>
</footer>
</form>
</article>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<script type="text/javascript">
// 글 등록 함수
var submitFlag = false;
function writeCheck(f) {
if (submitFlag == true) {
alert('게시물을 등록하고 있습니다. 잠시만 기다려 주세요.');
return false;
}
if (f.name && f.name.value == '') {
alert('이름을 입력해 주세요. ');
f.name.focus();
return false;
}
if (f.pw && f.pw.value == '') {
alert('암호를 입력해 주세요. ');
f.pw.focus();
return false;
}
<?php if ($B['category']): ?>
if (f.category && f.category.value == '') {
alert('카테고리를 선택해 주세요. ');
f.category.focus();
return false;
}
<?php endif; ?>
if (f.subject.value == '') {
alert('제목을 입력해 주세요. ');
f.subject.focus();
return false;
}
if (f.notice && f.hidden) {
if (f.notice.checked == true && f.hidden.checked == true) {
alert('공지글은 비밀글로 등록할 수 없습니다. ');
f.hidden.checked = false;
return false;
}
}
var editorData = editor.getData();
$('[name="content"]').val(editorData)
// 대표이미지가 없을 경우, 첫번째 업로드 사진을 지정함
var featured_img_input = $('input[name="featured_img"]'); // 대표이미지 input
var featured_img_uid = $(featured_img_input).val();
if(featured_img_uid ==''){ // 대표이미지로 지정된 값이 없는 경우
var first_attach_img_li = $('.rb-attach-photo li:first'); // 첫번째 첨부된 이미지 리스트 li
var first_attach_img_uid = $(first_attach_img_li).data('id');
featured_img_input.val(first_attach_img_uid);
}
// 첨부파일 uid 를 upfiles 값에 추가하기
var attachfiles=$('input[name="attachfiles[]"]').map(function(){return $(this).val()}).get();
var new_upfiles='';
if(attachfiles){
for(var i=0;i<attachfiles.length;i++) {
new_upfiles+=attachfiles[i];
}
$('input[name="upfiles"]').val(new_upfiles);
}
getIframeForAction(f);
submitFlag = true;
$('.js-submit').addClass('disabled').html('<i class="fa fa-spinner fa-spin"></i> <?php echo $submit_msg?>');
return submitFlag;
}
function cancelCheck() {
if (confirm('정말 취소하시겠습니까? ')){
history.back();
}
}
document.title = '<?php echo $title_text ?> · <?php echo $B['name']?>';
</script>

View File

@@ -0,0 +1,3 @@
The RBL License
Copyright (c) 2020 Redblock, Inc.

View File

@@ -0,0 +1,3 @@
# 게시판 테마 입니다.
기본형 데스크탑 갤러리형 게시판 테마 입니다.

View File

@@ -0,0 +1,437 @@
<?php
$img_files = array();
$audio_files = array();
$video_files = array();
$youtube_files = array();
$down_files = array();
foreach($d['upload']['data'] as $_u){
if($_u['type']==2 and $_u['hidden']==0) array_push($img_files,$_u);
else if($_u['type']==4 and $_u['hidden']==0) array_push($audio_files,$_u);
else if($_u['type']==5 and $_u['hidden']==0) array_push($video_files,$_u);
else if($_u['type']==1 || $_u['type']==6 || $_u['type']==7 and $_u['hidden']==0) array_push($down_files,$_u);
}
$attach_photo_num = count ($img_files);
$attach_video_num = count ($video_files);
$attach_audio_num = count ($audio_files);
$attach_down_num = count ($down_files);
?>
<?php if ($attach_photo_num==0): ?>
<div class="p-5 text-muted text-center border">
표시할 사진이 없습니다.<br>
이미지 숨김 처리여부를 확인해 주세요.
</div>
<?php endif; ?>
<?php if($attach_photo_num>0):?>
<h5>사진 <span class="text-danger"><?php echo $attach_photo_num?></span></h5>
<div class="list-inline mb-3 post-gallery" itemscope itemtype="http://schema.org/ImageGallery">
<?php foreach($img_files as $_u):?>
<?php
$thumb_list=getPreviewResize($_u['src'],$d['theme']['view_thumb']); // 미리보기 사이즈 조정 (이미지 업로드시 썸네일을 만들 필요 없다.)
$thumb_modal=getPreviewResize($_u['src'],$_u['width'].'x'.$_u['height']); // 정보수정 모달용 사이즈 조정 (이미지 업로드시 썸네일을 만들 필요 없다.)
?>
<figure class="list-inline-item">
<a href="<?php echo $thumb_modal ?>"
data-size="<?php echo $_u['width']?>x<?php echo $_u['height']?>"
title="<?php echo $_u['name']?>">
<img src="<?php echo $thumb_list ?>" alt="" class="border img-fluid">
</a>
<figcaption itemprop="caption description" hidden><?php echo $_u['caption']?></figcaption>
</figure>
<?php endforeach?>
</div>
<?php endif?>
<?php if($attach_down_num>0):?>
<div class="card">
<div class="card-header">
파일 (<span class="text-danger"><?php echo $attach_down_num ?></span>)
</div>
<ul class="list-group list-group-flush mb-0">
<?php foreach($down_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<i class="fa fa-file<?php echo $ext_icon?>-o fa-lg fa-fw"></i>
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=mediaset&amp;a=download&amp;uid=<?php echo $_u['uid']?>" title="<?php echo $_u['caption']?>">
<?php echo $_u['name']?>
</a>
<small class="text-muted">(<?php echo getSizeFormat($_u['size'],1)?>)</small>
<span title="다운로드 수" data-toggle="tooltip" class="badge badge-light"><?php echo number_format($_u['down'])?></span>
</div>
</li>
<?php endforeach?>
</ul>
</div><!-- /.card -->
<?php endif?>
<?php if($attach_video_num>0):?>
<h5 class="mt-5">비디오 <span class="text-danger"><?php echo $attach_video_num?></span></h5>
<?php foreach($video_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<div class="card">
<video width="320" height="240" controls class="card-img-top mejs-player">
<source src="<?php echo $_u['url']?><?php echo $_u['folder']?>/<?php echo $_u['tmpname']?>" type="video/<?php echo $_u['ext']?>">
</video>
<div class="card-body">
<h6 class="card-title"><?php echo $_u['name']?></h6>
<p class="card-text"><small class="text-muted">(<?php echo getSizeFormat($_u['size'],1)?>)</small></p>
</div><!-- /.card-block -->
</div><!-- /.card -->
<?php endforeach?>
<?php endif?>
<?php if($attach_audio_num>0):?>
<h5 class="mt-5">오디오 <span class="text-danger"><?php echo $attach_audio_num?></span></h5>
<?php foreach($audio_files as $_u):?>
<?php
$ext_to_fa=array('xls'=>'excel','xlsx'=>'excel','ppt'=>'powerpoint','pptx'=>'powerpoint','txt'=>'text','pdf'=>'pdf','zip'=>'archive','doc'=>'word');
$ext_icon=in_array($_u['ext'],array_keys($ext_to_fa))?'-'.$ext_to_fa[$_u['ext']]:'';
?>
<div class="card">
<audio controls class="card-img-top mejs-player w-100">
<source src="<?php echo $_u['url']?><?php echo $_u['folder']?>/<?php echo $_u['tmpname']?>" type="audio/<?php echo $_u['ext']?>">
</audio>
<div class="card-body">
<h6 class="card-title"><?php echo $_u['name']?></h6>
<p class="card-text"><small class="text-muted">(<?php echo getSizeFormat($_u['size'],1)?>)</small></p>
</div><!-- /.card-block -->
</div><!-- /.card -->
<?php endforeach?>
<?php endif?>
<!-- 일반 포토모달 -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<!-- Background of PhotoSwipe.
It's a separate element as animating opacity is faster than rgba(). -->
<div class="pswp__bg"></div>
<!-- Slides wrapper with overflow:hidden. -->
<div class="pswp__scroll-wrap">
<!-- Container that holds slides.
PhotoSwipe keeps only 3 of them in the DOM to save memory.
Don't modify these 3 pswp__item elements, data is added later on. -->
<div class="pswp__container">
<div class="pswp__item"></div>
<div class="pswp__item"></div>
<div class="pswp__item"></div>
</div>
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
<div class="pswp__ui pswp__ui--hidden">
<div class="pswp__top-bar">
<!-- Controls are self-explanatory. Order can be changed. -->
<div class="pswp__counter"></div>
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
<!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
<!-- element will get class pswp__preloader-active when preloader is running -->
<div class="pswp__preloader">
<div class="pswp__preloader__icn">
<div class="pswp__preloader__cut">
<div class="pswp__preloader__donut"></div>
</div>
</div>
</div>
</div>
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
<div class="pswp__share-tooltip"></div>
</div>
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
</button>
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
</button>
<div class="pswp__caption">
<div class="pswp__caption__center"></div>
</div>
</div>
</div>
</div>
<script>
var initPhotoSwipeFromDOM = function(gallerySelector) {
var subject= '<?php echo $R['subject']?>'
var orgin_title = document.title
var modal = $('.pswp')
// parse slide data (url, title, size ...) from DOM elements
// (children of gallerySelector)
var parseThumbnailElements = function(el) {
var thumbElements = el.childNodes,
numNodes = thumbElements.length,
items = [],
figureEl,
linkEl,
size,
item;
for (var i = 0; i < numNodes; i++) {
figureEl = thumbElements[i]; // <figure> element
// include only element nodes
if (figureEl.nodeType !== 1) {
continue;
}
linkEl = figureEl.children[0]; // <a> element
size = linkEl.getAttribute('data-size').split('x');
// create slide object
item = {
src: linkEl.getAttribute('href'),
w: parseInt(size[0], 10),
h: parseInt(size[1], 10)
};
if (figureEl.children.length > 1) {
// <figcaption> content
item.title = figureEl.children[1].innerHTML;
}
if (linkEl.children.length > 0) {
// <img> thumbnail element, retrieving thumbnail url
item.msrc = linkEl.children[0].getAttribute('src');
}
item.el = figureEl; // save link to element for getThumbBoundsFn
items.push(item);
}
return items;
};
// find nearest parent element
var closest = function closest(el, fn) {
return el && (fn(el) ? el : closest(el.parentNode, fn));
};
// triggers when user clicks on thumbnail
var onThumbnailsClick = function(e) {
e = e || window.event;
e.preventDefault ? e.preventDefault() : e.returnValue = false;
var eTarget = e.target || e.srcElement;
// find root element of slide
var clickedListItem = closest(eTarget, function(el) {
return (el.tagName && el.tagName.toUpperCase() === 'FIGURE');
});
if (!clickedListItem) {
return;
}
// find index of clicked item by looping through all child nodes
// alternatively, you may define index via data- attribute
var clickedGallery = clickedListItem.parentNode,
childNodes = clickedListItem.parentNode.childNodes,
numChildNodes = childNodes.length,
nodeIndex = 0,
index;
for (var i = 0; i < numChildNodes; i++) {
if (childNodes[i].nodeType !== 1) {
continue;
}
if (childNodes[i] === clickedListItem) {
index = nodeIndex;
break;
}
nodeIndex++;
}
if (index >= 0) {
// open PhotoSwipe if valid index found
openPhotoSwipe(index, clickedGallery);
}
return false;
};
// parse picture index and gallery index from URL (#&pid=1&gid=2)
var photoswipeParseHash = function() {
var hash = window.location.hash.substring(1),
params = {};
if (hash.length < 5) {
return params;
}
var vars = hash.split('&');
for (var i = 0; i < vars.length; i++) {
if (!vars[i]) {
continue;
}
var pair = vars[i].split('=');
if (pair.length < 2) {
continue;
}
params[pair[0]] = pair[1];
}
if (params.gid) {
params.gid = parseInt(params.gid, 10);
}
return params;
};
var openPhotoSwipe = function(index, galleryElement, disableAnimation, fromURL) {
var pswpElement = document.querySelectorAll('.pswp')[0],
gallery,
options,
items;
items = parseThumbnailElements(galleryElement);
// define options (if needed)
options = {
history: true,
focus: false,
closeOnScroll: false,
closeOnVerticalDrag: false,
showAnimationDuration: 0,
hideAnimationDuration: 0,
timeToIdle: 4000,
// define gallery index (for URL)
galleryUID: galleryElement.getAttribute('data-pswp-uid'),
getThumbBoundsFn: function(index) {
// See Options -> getThumbBoundsFn section of documentation for more info
var thumbnail = items[index].el.getElementsByTagName('img')[0], // find thumbnail
pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
rect = thumbnail.getBoundingClientRect();
return {
x: rect.left,
y: rect.top + pageYScroll,
w: rect.width
};
}
};
// PhotoSwipe opened from URL
if (fromURL) {
if (options.galleryPIDs) {
// parse real index when custom PIDs are used
// http://photoswipe.com/documentation/faq.html#custom-pid-in-url
for (var j = 0; j < items.length; j++) {
if (items[j].pid == index) {
options.index = j;
break;
}
}
} else {
// in URL indexes start from 1
options.index = parseInt(index, 10) - 1;
}
} else {
options.index = parseInt(index, 10);
}
// exit if index not found
if (isNaN(options.index)) {
return;
}
if (disableAnimation) {
options.showAnimationDuration = 0;
}
// Pass data to PhotoSwipe and initialize it
gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);
gallery.init();
//갤러리가 실행된 후에
gallery.listen('imageLoadComplete', function(index, item) {
var counter = '('+modal.find('.pswp__counter').text().replace(/ /g, '')+') ';
document.title = counter+subject+'-'+orgin_title // 브라우저 타이틀 재설정
$('body').addClass('modal-open') // 페이지 스크롤바 원상복귀를 위해
});
//슬라이드 갱신 후에
gallery.listen('afterChange', function() {
var counter = '('+modal.find('.pswp__counter').text().replace(/ /g, '')+') ';
document.title = counter+subject+'-'+orgin_title // 브라우저 타이틀 재설정
});
// 갤러리가 닫힐때
gallery.listen('close', function() {
$('body').removeClass('modal-open') // 페이지 스크롤바 원상복귀를 위해
});
};
// loop through all gallery elements and bind events
var galleryElements = document.querySelectorAll(gallerySelector);
for (var i = 0, l = galleryElements.length; i < l; i++) {
galleryElements[i].setAttribute('data-pswp-uid', i + 1);
galleryElements[i].onclick = onThumbnailsClick;
}
// Parse URL and open gallery if it contains #&pid=3&gid=1
var hashData = photoswipeParseHash();
if (hashData.pid && hashData.gid) {
openPhotoSwipe(hashData.pid, galleryElements[hashData.gid - 1], true, true);
}
};
$(function () {
// execute above function
initPhotoSwipeFromDOM('.post-gallery');
$('.post-gallery figure a').click(function(){
$(this).closest('figure').attr('tabindex','-1').focus();
});
})
</script>

View File

@@ -0,0 +1,88 @@
<?php
// 댓글 일반 사항
/*
1) 댓글 저장 테이블 : rb_s_comment
2) 한줄의견 저장 테이블 : rb_s_oneline
3) rb_s_comment 의 parent 필드 저장형식 ==> p_modulep_uid
예를 들어, 게시판 모듈의 uid = 3 인 글의 댓글은 아래와 같이 저장됩니다.
====> bbs3
4) 테마 css 는 테마/css/style.css 이며 댓글박스 가져올때 자동으로 함께 링크를 가져옵니다.
이 css 를 삭제하면 안되며 필요없는 경우 공백으로 처리하는 방법으로 하시기 바랍니다.
현재, notify 부분에 대한 css 가 있어서 삭제하면 안됩니다.
*/
// 댓글 출력 함수
// 함수 호출 방식으로 하면 모달 호출시에도 적용하기 편합니다.
/*
1) module = 부모모듈 : 댓글의 부모 모듈 id ( ex: bbs, post, forum ...)
2) parent_uid = 부모 uid : 댓글의 부모 포스트 uid
3) parent_table = 부모 테이블 : p_uid 가 소속된 테이블명 ( ex : rb_bbs_data, rb_blog_data, rb_chanel_data ...)
(댓글, 한줄의견 추가/삭제시 합계 업데이트시 필요)
*/
$comment_theme = $d['bbs']['c_skin']?$d['bbs']['c_skin']: ($d['theme']['comment_theme']?$d['theme']['comment_theme']:$d['bbs']['comment_main']);
?>
<div id="commentting-container">
<!-- 댓글 출력 -->
</div>
<link href="<?php echo $g['url_root']?>/modules/comment/themes/<?php echo $comment_theme?>/css/style.css" rel="stylesheet">
<script>
$(function () {
// 댓글 출력 함수 실행
var p_module = 'bbs';
var p_table = '<?php echo $table['bbsdata']?>';
var p_uid = '<?php echo $uid?>';
var theme = '<?php echo $comment_theme ?>';
var commentting_container = $('#commentting-container');
var get_Rb_Comment = function(p_module,p_table,p_uid,theme){
$('#commentting-container').Rb_comment({
moduleName : 'comment', // 댓글 모듈명 지정 (수정금지)
parent : p_module+'-'+p_uid, // rb_s_comment parent 필드에 저장되는 형태가 p_modulep_uid 형태임 참조.(- 는 저장시 제거됨)
parent_table : p_table, // 부모 uid 가 저장된 테이블 (게시판인 경우 rb_bbs_data : 댓글, 한줄의견 추가/삭제시 전체 합계 업데이트용)
theme_name : theme, // 댓글 테마
containerClass :'rb-commentting', // 본 엘리먼트(#commentting-container)에 추가되는 class
recnum: 15, // 출력갯수
commentPlaceHolder : '댓글을 입력해 주세요..',
noMoreCommentMsg : '댓글 없음 ',
commentLength : 500, // 댓글 입력 글자 수 제한
});
}
get_Rb_Comment(p_module,p_table,p_uid,theme);
// 댓글이 등록된 후에
commentting_container.on('saved.rb.comment',function(){
// $.notify({message:'댓글이 등록 되었습니다.'});
$('[data-toggle="tooltip"]').tooltip()
$('[data-role="comment-item"] article').autolink();
$(document).on('click','.add-comment',function(){
var uid = $(this).data('parent')
var textarea = $('[data-role="oneline-input-'+uid+'"]')
setTimeout(function(){ textarea.focus(); }, 200); // 한줄의견 추가시에 textarea focus 처리하기
});
})
// 댓글이 수정된 후에
commentting_container.on('edited.rb.comment',function(){
$.notify({message: '댓글이 수정 되었습니다.'},{type: 'success'});
})
// 한줄의견이 등록된 후에
commentting_container.on('saved.rb.oneline',function(){
$('[data-toggle="tooltip"]').tooltip()
$('[data-role="oneline-item"] article').autolink();
})
commentting_container.on('edited.rb.oneline',function(){
$.notify({message: '의견이 수정 되었습니다.'},{type: 'success'});
})
})
</script>

View File

@@ -0,0 +1,9 @@
<!-- 게시판 픗터 파일 -->
<?php if ($g['add_footer_img']): ?>
<div class="my-3">
<img src="<?php echo $g['add_footer_img'] ?>" alt="" class="img-fluid my-3">
</div>
<?php endif; ?>
<!-- 게시판 픗터 코드 -->
<?php if ($g['add_footer_inc']) include_once $g['add_footer_inc'];?>

View File

@@ -0,0 +1,9 @@
<!-- 게시판 헤더 파일 -->
<?php if ($g['add_header_img']): ?>
<div class="my-3">
<img src="<?php echo $g['add_header_img'] ?>" alt="" class="img-fluid">
</div>
<?php endif; ?>
<!-- 게시판 헤더 코드 -->
<?php if ($g['add_header_inc']) include_once $g['add_header_inc'];?>

View File

@@ -0,0 +1,47 @@
<?php
// seo 데이타 -- 전송되는 타이틀 추출
$_MSEO = getDbData($table['s_seo'],'rel=1 and parent='.$_HM['uid'],'*');
$_PSEO = getDbData($table['s_seo'],'rel=2 and parent='.$_HP['uid'],'*');
$_WTIT=strip_tags($g['meta_tit']);
$_link_url=$g['url_root'].$_SERVER['REQUEST_URI'];
?>
<ul class="list-inline" data-role="linkshare">
<li data-toggle="tooltip" title="페이스북" class="list-inline-item">
<a href="" role="button" onclick="snsWin('f');">
<img src="<?php echo $g['img_core']?>/sns/facebook.png" alt="페이스북공유" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="카카오스토리" class="list-inline-item">
<a href="" role="button" onclick="snsWin('ks');">
<img src="<?php echo $g['img_core']?>/sns/kakaostory.png" alt="카카오스토리" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="네이버" class="list-inline-item">
<a href="" role="button" onclick="snsWin('n');">
<img src="<?php echo $g['img_core']?>/sns/naver.png" alt="네이버" class="rounded-circle" width="50">
</a>
</li>
<li data-toggle="tooltip" title="트위터" class="list-inline-item">
<a href="" role="button" onclick="snsWin('t');">
<img src="<?php echo $g['img_core']?>/sns/twitter.png" alt="트위터" class="rounded-circle" width="50">
</a>
</li>
</ul>
<script type="text/javascript">
// sns 이벤트
function snsWin(sns) {
var snsset = new Array();
var enc_sbj = "<?php echo urlencode($_WTIT)?>";
var enc_url = "<?php echo urlencode($_link_url)?>";
var enc_tag = "<?php echo urlencode(str_replace(',',' ',$R['tag']))?>";
snsset['t'] = 'https://twitter.com/intent/tweet?url=' + enc_url + '&text=' + enc_sbj;
snsset['f'] = 'http://www.facebook.com/sharer.php?u=' + enc_url;
snsset['n'] = 'http://share.naver.com/web/shareView.nhn?url=' + enc_url + '&title=' + enc_sbj;
snsset['ks'] = 'https://story.kakao.com/share?url=' + enc_url + '&title=' + enc_sbj;
window.open(snsset[sns]);
}
</script>

View File

@@ -0,0 +1,384 @@
@charset "utf-8";
/*!
* kimsQ Rb v2.4.5 데스크탑 갤러리 게시판 테마 스타일 (bs4-gallery)
* Homepage: http://www.kimsq.com
* Copyright 2020 redblock inc
* Licensed under RBL
* Based on Bootstrap v4
*/
/**
* 목차:
*
* 1 - 공통 rb-bbs
* 2 - 목록 rb-bbs-list
* 3 - 보기 rb-bbs-view
* 4 - 쓰기 rb-bbs-write
* 5 - 컴포넌트 Component
* 6 - 유틸리티 Utilities
* ----------------------------------------------------------------------------
*/
/**
* 1 - 공통 rb-bbs
* ----------------------------------------------------------------------------
*/
.badge-white {
background-color: #fff;
border: solid 1px #ddd;
color: #777;
letter-spacing: -1px;
font-weight: normal;
}
.active .fa-bookmark-o:before {
content: "\f02e" !important;
}
/**
* 2 - 목록 rb-bbs-list
* ----------------------------------------------------------------------------
*/
.rb-bbs-list .table {
border-bottom: 1px solid #ddd
}
.rb-bbs-list .table thead th {
color: #999;
font-size: 11px;
font-weight: normal
}
.rb-bbs-list .ico-replay::before {
display: inline-block;
width: 13px;
height: 10px;
margin: 4px 4px 0 1px;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAABkCAMAAACvvNBNAAAAclBMVEVMaXEtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUtlvUAAAAtlvXBtxldAAAAJHRSTlMAlgoDD071ePxpN7FZvfDjLRxb/gEGpEL5hxUkyNvqeXyAwuvQ8jQMAAAAqElEQVR42u2R1w7CMAxFu/feu4ze//9FWlRaWlwkBC9IPi+2cpzYSYTPUZwjk7rQaZNk8ENalfAC2pgoctqoRhzRxtKWERxlY+oO4pz2cKUnU7Ww5TkP/Sl/IDVo1srAW04QZBttRfcV0dW7aWHeEx2a9XJHQx1DFI9hz2kqz4tp88rS5Op4KDdr62hAlpDPI13gpkf/elYEhmGYXzAMrL5XO94phvlnbrKzELi3OthbAAAAAElFTkSuQmCC) 0 -30px no-repeat;
background-size: 13px 50px;
vertical-align: top;
content: '';
}
.rb-bbs-list .card {
margin-bottom: 30px;
}
.rb-bbs-list .card:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
-webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .5);
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .5);
}
.rb-bbs-list .card .position-relative {
transition: all 0.3s ease;
max-width: 100%;
backface-visibility: hidden;
transform: translateZ(0px);
margin: 0px;
overflow: hidden;
color: #ccc
}
.rb-bbs-list .card .position-relative .card-img-top {
transition-timing-function: ease-in-out;
transition-property: all;
transition-duration: 0.5s;
transition-delay: 0s;
}
.rb-bbs-list .card:focus .position-relative .card-img-top,
.rb-bbs-list .card .position-relative:hover .card-img-top {
transform: scale3d(1.1, 1.1, 1.1);
}
.rb-bbs-list .card:focus .position-relative .opacity-0,
.rb-bbs-list .card .position-relative:hover .opacity-0 {
opacity: 1 !important;
transform: translate(0px, 0px);
transition-timing-function: ease-in;
transition-duration: 0.3s;
background-color: rgba(0, 0, 0, 0.6) !important;
}
.rb-bbs-list .card-body a {
display: -webkit-box;
overflow: hidden;
height: 38px;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.card-img-overlay .rb-hidden {
position: absolute;
top: 50%;
left: 50%;
margin-top: -30px;
margin-left: -30px;
font-size: 47px;
}
/**
* 3 - 보기 rb-bbs-view
* ----------------------------------------------------------------------------
*/
.rb-bbs-view header .media-body h1 {
padding: 4px 0 8px 0;
margin: 0;
font-size: 14px;
font-weight: bold;
border-bottom: #dfdfdf dotted 1px;
}
.rb-bbs-view header .rb-meta {
color: #c0c0c0;
font-family: dotum;
font-size: 11px;
line-height: 20px;
}
.rb-bbs-view header .rb-meta .rb-divider:before {
content: '|';
color: #ddd;
}
.rb-bbs-view .post-gallery figure:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
-webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .5);
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .5);
}
.post-gallery .list-inline-item:not(:last-child) {
margin-right: .2rem;
}
.rb-bbs-view [data-role="linkshare"] img {
width: 38px
}
[data-role="btn_post_like"].active .fa-heart-o:before {
content: "\f004";
}
[data-role="btn_post_like"].active .fa,
[data-role="btn_post_dislike"].active .fa {
color: red;
}
[data-role="btn_post_like"].active.heartbeat .fa,
[data-role="btn_post_dislike"].active.heartbeat .fa {
animation: heartbeat .8s;
}
.tag .badge~.badge {
margin-left: .3rem
}
/**
* 4 - 쓰기 rb-bbs-write
* ----------------------------------------------------------------------------
*/
.rb-bbs-write .ck-editor__editable_inline {
min-height: 250px;
}
/**
* 5 - 컴포넌트 Component
* ----------------------------------------------------------------------------
*/
.modal-lg {
max-width: calc(100vw - 12.53rem);
}
.modal-lg .modal-content {
/* min-height: calc(100vh - 5rem); */
}
.modal-lg .col-8 {
max-height: calc(100vh - 8rem);
overflow-y: auto;
}
/* modal-pswp */
.pswp-comment .pswp__scroll-wrap {
width: 60% !important;
left: 70px !important;
}
.pswp-comment:not(.pswp--fs) .pswp__scroll-wrap {
padding: 0;
box-shadow: 0 12px 24px rgba(0, 0, 0, .3);
background-color: #000
}
.pswp-comment .rb__area {
position: absolute;
right: 70px;
width: 30%;
height: 100%;
overflow: hidden;
color: #333;
box-shadow: 0 12px 24px rgba(0, 0, 0, .3);
background-color: #fff
}
.pswp-comment .pswp__bg {
opacity: 0.9 !important;
}
.pswp-comment .pswp__scroll-wrap,
.pswp-comment .rb__area {
top: 40px !important;
height: 90% !important;
}
.pswp--fs.pswp-comment .rb__area {
display: none
}
.pswp-comment .pswp__scroll-wrap {
transform: translate3d(0px, 0px, 0px);
}
.pswp--fs.pswp-comment .pswp__scroll-wrap {
transform: translate3d(190px, 0px, 0px);
}
.pswp-comment [data-role="article-body"] {
min-height: 150px;
max-height: 150px;
overflow-y: auto
}
.pswp-comment .pswp__button--fs,
.pswp-comment .pswp__button--arrow--left:before,
.pswp-comment .pswp__button--arrow--right:before {
background: url(./image/icon-set.png) 0 0 no-repeat;
background-repeat: no-repeat;
background-size: auto;
background-position: 0 0;
height: 48px;
width: 48px;
}
.pswp-comment .pswp__button--arrow--left:before {
background-position: 0 -49px;
}
.pswp-comment .pswp__top-bar {
position: absolute;
left: 0;
top: 0;
height: 100px;
width: 100%;
transition: opacity .3s;
-webkit-font-smoothing: antialiased;
}
.pswp-comment:not(.pswp--fs) .pswp__ui--fit .pswp__top-bar,
.pswp-comment:not(.pswp--fs) .pswp__ui--fit .pswp__caption {
background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)) !important;
}
.pswp-comment .pswp__ui--fit .pswp__top-bar,
.pswp-comment .pswp__ui--fit .pswp__caption {
background: transparent !important
}
.pswp-comment .pswp__button--fs {
margin: 30px;
background-position: 0 -98px;
height: 38px;
width: 38px;
}
.pswp-comment .pswp__ui--idle .pswp__button--arrow--left,
.pswp-comment .pswp__ui--idle .pswp__button--arrow--right {
transition: opacity .2s;
}
.pswp-comment .pswp__subject {
position: absolute;
left: 0;
top: 0;
font-size: 21px;
line-height: 1.28;
color: #FFF;
opacity: 0.75;
padding: 0 30px;
}
.pswp-comment .pswp__counter {
position: absolute;
left: 0;
top: 30px;
font-size: 12px;
line-height: 20px;
color: #ccc;
opacity: 0.75;
padding: 0 30px;
}
.pswp-comment .pswp__caption__center {
text-align: center;
}
.pswp-comment .btn-light {
background-color: #ffffff;
background-image: linear-gradient(-180deg, #fff 0%, #f5f5f5 90%);
}
.pswp-comment [data-role="article"] img {
max-width: 100%;
height: auto;
}
[data-role="btn_saved"].active::after {
content: '됨'
}
[data-role="comment-none"] > div {
height: 300px !important;
}
.pswp-comment [data-role="comment-main"] .timeline-vscroll {
max-height: calc(100vh - 32.3rem) !important;
}
/**
* 6 - 유틸리티 Utilities
* ----------------------------------------------------------------------------
*/
@keyframes heartbeat {
0% {
transform: scale( 1.8);
}
30% {
transform: scale( 1);
}
60% {
transform: scale( 1.8);
}
100% {
transform: scale( 1);
}
}

View File

@@ -0,0 +1,62 @@
/**
* --------------------------------------------------------------------------
* kimsQ Rb v2.4.5 데스크탑 갤러리 게시판 테마 스크립트 (bs4-gallery): _main.js
* Homepage: http://www.kimsq.com
* Licensed under RBL
* Copyright 2020 redblock inc
* --------------------------------------------------------------------------
*/
$(function () {
// 사용자 액션에 대한 피드백 메시지 제공을 위해 액션 실행후 쿠키에 저장된 결과 메시지를 출력시키고 초기화 시킵니다.
putCookieAlert('bbs_action_result') // 실행결과 알림 메시지 출력
$('[data-toggle="print"]').click(function() {
window.print()
});
$('[data-toggle="actionIframe"]').click(function() {
getIframeForAction('');
frames.__iframe_for_action__.location.href = $(this).attr("data-url");
});
//게시물 목록에서 프로필 풍선(popover) 띄우기
$('[data-toggle="getMemberLayer"]').popover({
container: 'body',
trigger: 'manual',
placement: 'auto',
html: true,
content: function () {
var uid = $(this).attr('data-uid')
var mbruid = $(this).attr('data-mbruid')
var type = 'popover'
$.post(rooturl+'/?r='+raccount+'&m=member&a=get_profileData',{
mbruid : mbruid,
type : type
},function(response){
// modal.find('[data-role="article"]').loader("hide");
var result = $.parseJSON(response);
var profile=result.profile;
$('#popver-item-'+uid).html(profile);
});
return '<div id="popver-item-'+uid+'" class="p-1">불러오는 중...</div>';
}
})
.on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
});
}).on("mouseleave", function () {
var _this = this;
setTimeout(function () {
if (!$(".popover:hover").length) {
$(_this).popover("hide");
}
}, 300);
});
})

View File

@@ -0,0 +1,39 @@
<div data-role="attach">
<?php if($d['theme']['perm_photo']<=$my['level']):?>
<?php endif?>
<!--
module : 첨부파일 사용 모듈 ,
theme : 첨부파일 테마 ,
attach_handler_file : 파일첨부 실행 엘리먼트 ,
attach_handler_photo : 사진첨부 실행 엘리먼트 ,
parent_data : 수정시 필요한 해당 포스트 데이타 배열 변수,
attach_handler_getModalList : 업로드 리스트 모달로 호출용 엘리먼트 (class 인 경우 . 까지 넘긴다.) -->
<?php
// 설정값 세팅
// $parent_table=$wdgvar['parent_table'];
// $parent_uid=$wdgvar['parent_uid'];
// $parent_field=$wdgvar['parent_field'];
// $attach_mod=$wdgvar['attach_mod']; // main, list...
// $attach_object_type=$wdgvar['attach_object_type'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_tmpcode=$wdgvar['attach_tmpcode'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_featuredImg_form_name=$wdgvar['featuredImg_form_name'];//첨부 대상에 따른 분류 : photo, file, link, video....
// $attach_wdgvar_id=$wdgvar['widget_uid'];
$attachSkin = $d['bbs']['a_skin']?$d['bbs']['a_skin']: ($d['theme']['upload_theme']?$d['theme']['upload_theme']:$d['bbs']['attach_main']); //테마
$parent_module=$m; // 첨부파일 사용하는 모듈
$parent_data=$R; // 해당 포스트 데이타 (수정시 필요)
$attach_module_theme=$attachSkin; // 첨부파일 테마
$attach_handler_file='[data-role="attach-handler-file"]'; //파일첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
$attach_handler_photo='[data-role="attach-handler-photo"]'; // 사진첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
$attach_handler_getModalList='.getModalList'; // 첨부파일 리스트 호출 handler
$editor_type=$editor_type; // 에디터 타입 : html,markdown
$attach_object_type= 'photo';//첨부 대상에 따른 분류 : photo, file, link, video....
include $g['path_module'].'mediaset/attach.php'; // 함수 인클루드
?>
</div>

View File

@@ -0,0 +1,43 @@
<?php
// 공통
$d['theme']['profile_link'] = "1"; // 회원 프로필 링크 (사용=1/사용안함=0)
//목록
$d['theme']['xl_item'] = "4"; // ≥ 1200px 미디어에서 한줄당 사진수(1,2,3,4,6 범위내 사용, )
$d['theme']['lg_item'] = "3"; // ≥ 992px 미디어에서 한줄당 사진수(1,2,3,4,6 범위내 사용, )
$d['theme']['md_item'] = "3"; // ≥ 768px 미디어에서 한줄당 사진수(1,2,3,4,6 범위내 사용, )
$d['theme']['sm_item'] = "2"; // ≥ 576px 미디어에서 한줄당 사진수(1,2,3,4,6 범위내 사용, )
$d['theme']['xs_item'] = "1"; // < 576px 미디어에서한줄당 사진수(1,2,3,4,6 범위내 사용, )
$d['theme']['list_thumb'] = "n"; //섬네일사이즈(s=75x75/q=150x150/t=100x67/m=240x160/n=320x213/z=640x427/c=800x534, htaccess 참고)
$d['theme']['use_rss'] = "1"; //rss발행사용(사용=1/사용안함=0)
$d['theme']['show_catnum'] = "1"; //분류별등록수출력(출력=1/감춤=0)
$d['theme']['pagenum'] = "5"; //페이지스킵숫자갯수
$d['theme']['search'] = "1"; //검색폼출력(출력=1/감춤=0)
$d['theme']['timeago'] = "1"; //상대시간 표기(사용=1/일시표기=0)
//본문
$d['theme']['view_thumb'] = "s"; //섬네일사이즈(s=75x75/q=150x150/t=100x67/m=240x160/n=320x213/z=640x427, htaccess 참고)
$d['theme']['date_viewf'] = "Y.m.d H:i"; //날짜포맷
$d['theme']['show_report'] = "1"; //신고사용(사용=1/사용안함=0)
$d['theme']['show_print'] = "1"; //인쇄사용(사용=1/사용안함=0)
$d['theme']['show_saved'] = "1"; //링크저장사용(사용=1/사용안함=0)
$d['theme']['use_reply'] = "0"; //답변사용(사용=1/사용안함=0)
$d['theme']['show_tag'] = "1"; //태그출력(출력=1/감춤=0)
$d['theme']['show_upfile'] = "1"; //첨부파일출력(출력=1/감춤=0)
$d['theme']['show_like'] = "1"; //좋아요 출력(출력=1/감춤=0)-회원전용
$d['theme']['show_dislike'] = "0"; //싫어요 출력(출력=1/감춤=0)-회원전용
$d['theme']['show_share'] = "1"; //SNS공유출력(출력=1/감춤=0)
$d['theme']['show_comment'] = "0"; //댓글출력(사용=1/사용안함=0)
$d['theme']['comment_theme'] = "_desktop/bs4-default"; //댓글 테마 (/modules/comment/themes/ 참고)
//글쓰기
$d['theme']['editor'] = "ckeditor"; //에디터 (ckeditor/summernote/simplemde)
$d['theme']['edit_height'] = "200"; //글쓰기폼높이(픽셀)
$d['theme']['show_edittoolbar'] = "0"; //에디터 툴바출력(출력=1/감춤=0)
$d['theme']['show_upload'] = "1"; //파일 업로드 출력 여부 (출력=1/감춤=0)
$d['theme']['upload_theme'] = "_desktop/bs4-gallery"; //파일 업로드 테마 (/modules/mediaset/themes/ 참고)
$d['theme']['upload_qty'] = "2"; //파일 업로드 출력 갯수
$d['theme']['perm_upload'] = "1"; //파일첨부권한(등급이상)
$d['theme']['show_wtag'] = "1"; //태그필드출력(출력=1/감춤=0)
$d['theme']['use_hidden'] = "1"; //비밀글(사용안함=0/유저선택사용=1/무조건비밀글=2)
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,252 @@
<?php
// 화면크기에 따라 한열에 배치할 아이템갯수와 관련된 class 산출
$col_xl_num = 12 /$d['theme']['xl_item'] ;
$col_lg_num = 12 /$d['theme']['lg_item'] ;
$col_md_num = 12 /$d['theme']['md_item'] ;
$col_sm_num = 12 /$d['theme']['sm_item'] ;
$col_xs_num = 12 /$d['theme']['xs_item'] ;
$col_xl = $d['theme']['xl_item']?' col-xl-'.$col_xl_num:'';
$col_lg = $d['theme']['lg_item']?' col-lg-'.$col_lg_num:'';
$col_md = $d['theme']['md_item']?' col-md-'.$col_md_num:'';
$col_sm = $d['theme']['sm_item']?' col-sm-'.$col_sm_num:'';
$col_xs = $d['theme']['xs_item']?' col-xs-'.$col_xs_num:'';
?>
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-list">
<header class="d-flex justify-content-between align-items-center mb-4">
<span class="text-muted">
<small>총게시물 : <strong><?php echo number_format($NUM+count($NCD))?></strong> 건 (<?php echo $p?>/<?php echo $TPG?> page) </small>
</span>
<form class="form-inline" name="bbssearchf" action="<?php echo $g['s']?>/">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="c" value="<?php echo $c?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="bid" value="<?php echo $bid?>">
<input type="hidden" name="cat" value="<?php echo $cat?>">
<input type="hidden" name="sort" value="<?php echo $sort?>">
<input type="hidden" name="orderby" value="<?php echo $orderby?>">
<input type="hidden" name="recnum" value="<?php echo $recnum?>">
<input type="hidden" name="type" value="<?php echo $type?>">
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
<input type="hidden" name="skin" value="<?php echo $skin?>">
<!-- 카테고리 출력부 -->
<?php if($B['category']):$_catexp = explode(',',$B['category']);$_catnum=count($_catexp)?>
<select name="category" class="form-control custom-select mr-2" onchange="document.bbssearchf.cat.value=this.value;document.bbssearchf.submit();">
<option value="">
<?php echo $_catexp[0]?>
</option>
<?php for($i = 1; $i < $_catnum; $i++):if(!$_catexp[$i])continue;?>
<option value="<?php echo $_catexp[$i]?>" <?php if($_catexp[$i]==$cat):?> selected="selected"
<?php endif?>>
<?php echo $_catexp[$i]?>
<?php if($d['theme']['show_catnum']):?>(<?php echo getDbRows($table[$m.'data'],'site='.$s.' and notice=0 and bbs='.$B['uid']." and category='".$_catexp[$i]."'")?>)
<?php endif?>
</option>
<?php endfor?>
</select>
<?php endif?>
<!-- 검색창 출력부 -->
<?php if($d['theme']['search']):?>
<div class="input-group">
<select class="custom-select rounded-0" name="where">
<option value="subject|tag"<?php if($where=='subject|tag'):?> selected="selected"<?php endif?>>제목+태그</option>
<option value="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
<option value="name"<?php if($where=='name'):?> selected="selected"<?php endif?>>이름</option>
<option value="nic"<?php if($where=='nic'):?> selected="selected"<?php endif?>>닉네임</option>
<option value="id"<?php if($where=='id'):?> selected="selected"<?php endif?>>아이디</option>
<option value="term"<?php if($where=='term'):?> selected="selected"<?php endif?>>등록일</option>
</select>
<input type="text" class="form-control" name="keyword" value="<?php echo $_keyword?>" placeholder="검색어를 입력해주세요" style="min-width:200px">
<div class="input-group-append">
<button class="btn btn-light" type="submit">검색</button>
</div>
<?php if ($keyword): ?>
<div class="input-group-append">
<a class="btn btn-primary" href="<?php echo $g['bbs_reset'] ?>">리셋</a>
</div>
<?php endif; ?>
</div>
<?php endif?>
</form>
</header>
<div class="table-responsive-md">
<table class="table text-center">
<colgroup>
<col width="7%">
<col>
<col width="10%">
</colgroup>
<tbody>
<!-- 공지사항 출력부 -->
<?php foreach($NCD as $R):?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<tr class="table-light">
<td>
<?php if($R['uid'] != $uid):?>
<span class="badge badge-white">공지</span>
<?php else:?>
<span class="now">&gt;&gt;</span>
<?php endif?>
</td>
<td class="text-left">
<?php if($R['mobile']):?><i class="fa fa-mobile fa-lg"></i>
<?php endif?>
<?php if($R['category']):?>
<span class="badge badge-secondary"><?php echo $R['category']?></span>
<?php endif?>
<a href="<?php echo $g['bbs_view'].$R['uid']?>" class="muted-link">
<?php echo getStrCut($R['subject'],$d['bbs']['sbjcut'],'')?>
</a>
<?php if(strstr($R['content'],'.jpg') || strstr($R['content'],'.png')):?>
<span class="badge badge-white" data-toggle="tooltip" title="사진">
<i class="fa fa-camera-retro fa-lg"></i>
</span>
<?php endif?>
<?php if($R['upload']):?>
<span class="badge badge-white" data-toggle="tooltip" title="첨부파일">
<i class="fa fa-paperclip fa-lg"></i>
</span>
<?php endif?>
<?php if($R['hidden']):?><span class="badge badge-white" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span><?php endif?>
<?php if($R['comment']):?><span class="badge badge-white"><?php echo $R['comment']?><?php echo $R['oneline']?'+'.$R['oneline']:''?></span><?php endif?>
<?php if(getNew($R['d_regis'],24)):?><span class="rb-new ml-1"></span><?php endif?>
</td>
<td class="text-muted small"><?php echo getDateFormat($R['d_regis'],'Y.m.d')?></td>
</tr>
<?php endforeach?>
</tbody>
</table>
<?php if ($NUM): ?>
<div class="row gutter-half">
<!-- 일반글 출력부 -->
<?php foreach($RCD as $R):?>
<?php
$R['mobile']=isMobileConnect($R['agent']);
$d['upload'] = getArrayString($R['upload']);
?>
<div class="<?php echo $col_xl.$col_lg.$col_md.$col_sm.$col_xs ?>">
<div class="card" id="item-<?php echo $R['uid']?>">
<a class="position-relative" href="<?php echo $g['bbs_view'].$R['uid']?>">
<img src="<?php echo getPreviewResize(getUpImageSrc($R),'640x360') ?>" alt="" class="card-img-top">
<div class="card-img-overlay opacity-0">
<div class="d-flex flex-column w-100 h-100">
<?php if ($R['hidden']): ?>
<div class="rb-hidden">
<i class="fa fa-lock fa-fw"></i>
</div>
<?php else: ?>
<?php if($R['category']):?>
<h2 class="align-self-start list-inline mb-auto mr-auto mb-0">
<span class="badge badge-pill badge-secondary">
<?php echo $R['category']?>
</span>
</h2>
<?php endif?>
<ul class="align-self-end list-inline mt-auto ml-auto mb-0">
<li class="list-inline-item">
<i class="fa fa-heart-o" aria-hidden="true"></i>
<span data-role="likes"><?php echo $R['likes']?></span>
</li>
<li class="list-inline-item">
<i class="fa fa-eye" aria-hidden="true"></i>
<?php echo $R['hit']?>
</li>
<li class="list-inline-item">
<i class="fa fa-clone" aria-hidden="true"></i>
<?php echo $d['upload']['count'] ?>
</li>
<li class="list-inline-item">
<i class="fa fa-comment-o" aria-hidden="true"></i>
<span data-role="total_comment"><?php echo $R['comment']?></span>
</li>
</ul>
<?php endif; ?>
</div>
</div>
</a><!-- /.position-relative -->
<div class="card-body">
<a class="muted-link" href="<?php echo $g['bbs_view'].$R['uid']?>">
<?php echo getStrCut($R['subject'],100,'')?>
</a>
</div>
<div class="card-footer d-flex justify-content-between align-items-center">
<span class="text-muted">
<a class="muted-link" href="/@<?php echo $R['id'] ?>"
data-toggle="getMemberLayer"
data-uid="<?php echo $R['uid'] ?>"
data-mbruid="<?php echo $R['mbruid'] ?>">
<?php echo $R[$_HS['nametype']]?>
</a>
</span>
<small class="text-muted">
<time <?php echo $d['theme']['timeago']?'data-plugin="timeago"':'' ?> datetime="<?php echo getDateFormat($R['d_regis'],'c')?>">
<?php echo getDateFormat($R['d_regis'],'Y.m.d')?>
</time>
<?php if(getNew($R['d_regis'],24)):?><span class="rb-new ml-1"></span><?php endif?>
</small>
</div>
</div><!-- /.card -->
</div>
<?php endforeach?>
</div>
<?php else: ?>
<div class="d-flex align-items-center justify-content-center text-muted" style="height: 350px">
<div class="text-xs-center">
<div class="display-1">
<i class="fa fa-folder-open-o" aria-hidden="true"></i>
</div>
<p>게시물이 없습니다.</p>
</div>
</div>
<?php endif; ?>
</div>
<footer class="d-flex justify-content-between align-items-center my-5">
<div class="btn-group">
<a class="btn btn-light" href="<?php echo $g['bbs_reset']?>">처음목록</a>
<a class="btn btn-light" href="<?php echo $g['bbs_list']?>">새로고침</a>
</div>
<ul class="pagination mb-0">
<?php echo getPageLink($d['theme']['pagenum'],$p,$TPG,'')?>
</ul>
<?php if($B['uid']):?>
<a class="btn btn-light" href="<?php echo $g['bbs_write']?>"><i class="fa fa-pencil"></i> 글쓰기</a>
<?php endif?>
</footer>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<script>
//검색어가 있을 경우 검색어 input focus
<?php if ($keyword): ?>
$('[name="keyword"]').focus()
<?php endif; ?>
<?php if (!$c): ?>
document.title = '<?php echo $B['name']?> · <?php echo $g['browtitle']?>' // 브라우저 타이틀 재설정
<?php endif; ?>
</script>

View File

@@ -0,0 +1 @@
부트스트랩 4 갤러리 기본형

View File

@@ -0,0 +1,155 @@
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-view">
<header>
<div class="media">
<img class="mr-3 border rounded" src="<?php echo getAvatarSrc($R['mbruid'],'55') ?>" width="55" height="55" alt="">
<div class="media-body">
<h1 class="h4 mt-0">
<?php if($R['category']):?>
<span class="badge badge-white"><?php echo $R['category']?></span>
<?php endif?>
<?php echo $R['subject']?>
<?php if($R['hidden']):?>
<span class="badge badge-white" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span>
<?php endif?>
</h1>
<div class="d-flex justify-content-between mt-2">
<ul class="rb-meta list-inline mb-0 text-muted">
<li class="list-inline-item">
<a class="muted-link" href="#"
data-toggle="getMemberLayer"
data-uid="<?php echo $R['uid'] ?>"
data-mbruid="<?php echo $R['mbruid'] ?>">
<?php echo $R[$_HS['nametype']]?>
</a>
</li>
<li class="list-inline-item rb-divider"></li>
<li class="list-inline-item">
<?php echo getDateFormat($R['d_regis'],$d['theme']['date_viewf'])?>
</li>
<li class="list-inline-item rb-divider"></li>
<li class="list-inline-item">조회 : <?php echo $R['hit']?></li>
</ul>
<div class="btn-group d-print-none">
<?php if($d['theme']['show_report']):?>
<a class="btn btn-link muted-link" href="<?php echo $g['bbs_action']?>report&amp;uid=<?php echo $R['uid']?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 신고하시겠습니까?');">
<i class="fa fa-user-secret fw"></i> 신고
</a>
<?php endif?>
<?php if($d['theme']['show_saved']):?>
<button type="button" class="btn btn-link muted-link<?php if($is_saved):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>saved&amp;uid=<?php echo $R['uid']?>"
data-role="btn_post_saved">
<i class="fa fa-bookmark-o"></i> 저장
</button>
<?php endif?>
<?php if($d['theme']['show_print']):?>
<button class="btn btn-link muted-link" data-toggle="print" type="button"><i class="fa fa-print"></i> 인쇄</button>
<?php endif?>
</div>
</div><!-- /.d-flex -->
</div><!-- /.media-body -->
</div><!-- /.media -->
</header>
<main class="row mt-4">
<article class="col-7">
<!-- 첨부파일 인클루드 -->
<?php if($d['upload']['data']&&$d['theme']['show_upfile']):?>
<?php include $g['dir_module_skin'].'_attachment.php'?>
<?php endif?>
<!-- 좋아요 or 싫어요 -->
<div class="text-center d-print-none mt-5">
<?php if($d['theme']['show_like']):?>
<button type="button" class="btn btn-light btn-lg js-action-iframe<?php if($is_liked):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>opinion&amp;opinion=like&amp;uid=<?php echo $R['uid']?>&amp;effect=heartbeat"
data-role="btn_post_like">
<i class="fa fa fa-heart-o fa-fw" aria-hidden="true"></i> <strong></strong>
<span data-role='likes_<?php echo $R['uid']?>' class="badge badge-inverted"><?php echo $R['likes']?></span>
</button>
<?php endif?>
<?php if($d['theme']['show_dislike']):?>
<button type="button" class="btn btn-light btn-lg<?php if($is_disliked):?> active<?php endif?>"
data-toggle="actionIframe"
data-url="<?php echo $g['bbs_action']?>opinion&amp;opinion=dislike&amp;uid=<?php echo $R['uid']?>&amp;effect=heartbeat"
data-role="btn_post_dislike">
<i class="fa fa-thumbs-o-down fa-fw" aria-hidden="true"></i> <strong></strong>
<span data-role='dislikes_<?php echo $R['uid']?>' class="badge badge-inverted"><?php echo $R['dislikes']?></span>
</button>
<?php endif?>
</div>
<!-- 본문 -->
<article class="py-4 rb-article">
<?php echo getContents($R['content'],$R['html'])?>
</article>
<!-- 링크 공유 -->
<?php if($d['theme']['show_share']):?>
<div class="my-4 d-print-none text-center">
<?php include $g['dir_module_skin'].'_linkshare.php'?>
</div>
<?php endif?>
<!-- 태그 -->
<?php if($R['tag']&&$d['theme']['show_tag']):?>
<div class="py-3">
<?php $_tags=explode(',',$R['tag'])?>
<?php $_tagn=count($_tags)?>
<?php $i=0;for($i = 0; $i < $_tagn; $i++):?>
<?php $_tagk=trim($_tags[$i])?>
<a class="badge badge-secondary" href="<?php echo $g['bbs_orign']?>&amp;where=subject|tag&amp;keyword=<?php echo urlencode($_tagk)?>">
<?php echo $_tagk?>
</a>
<?php endfor?>
</div>
<?php endif?>
<footer class="d-flex justify-content-between align-items-center my-3 d-print-none">
<div class="btn-group">
<?php if($my['admin'] || $my['uid']==$R['mbruid']):?>
<a href="<?php echo $g['bbs_modify'].$R['uid']?>" class="btn btn-light">수정</a>
<a href="<?php echo $g['bbs_delete'].$R['uid']?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 삭제하시겠습니까?');" class="btn btn-light">삭제</a>
<?php endif?>
<?php if($my['admin']&&$d['theme']['use_reply']):?>
<a href="<?php echo $g['bbs_reply'].$R['uid']?>" class="btn btn-light">답변</a>
<?php endif?>
</div>
<a href="<?php echo $g['bbs_list']?>" class="btn btn-light">목록</a>
</footer>
</article>
<aside class="col-5 border-left d-print-none">
<!-- 댓글 인클루드 -->
<?php if(!$d['bbs']['c_hidden']):?>
<?php include $g['dir_module_skin'].'_comment.php'?>
<?php endif?>
</aside>
</main>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<script type="text/javascript">
$(window).on("load", function(){
initPhotoSwipeFromDOM('.post-gallery');
});
</script>

View File

@@ -0,0 +1,262 @@
<?php
if (!$_SESSION['upsescode'])
{
$_SESSION['upsescode'] = str_replace('.','',$g['time_start']);
}
$sescode = $_SESSION['upsescode'];
if($R['uid']){
$u_arr = getArrayString($R['upload']);
$_tmp=array();
$i=0;
foreach ($u_arr['data'] as $val) {
$U=getUidData($table['s_upload'],$val);
if(!$U['fileonly']) $_tmp[$i]=$val;
$i++;
}
$insert_array='';
// 중괄로로 재조립
foreach ($_tmp as $uid) {
$insert_array.='['.$uid.']';
}
}
if ($uid) {
$submit_btn = '수정';
$submit_msg = '게시물 수정중...';
$title_text = '게시물 수정 · '.$B['name'];
}
else {
$submit_btn = '등록';
$submit_msg = '게시물 등록중...';
$title_text = '새 게시물';
}
?>
<?php include $g['dir_module_skin'].'_header.php'?>
<section class="rb-bbs-write">
<article class="mt-4">
<form name="writeForm" method="post" action="<?php echo $g['s']?>/" onsubmit="return writeCheck(this);" role="form">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="a" value="write">
<input type="hidden" name="c" value="<?php echo $c?>">
<input type="hidden" name="cuid" value="<?php echo $_HM['uid']?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="bid" value="<?php echo $R['bbsid']?$R['bbsid']:$bid?>">
<input type="hidden" name="uid" value="<?php echo $R['uid']?>">
<input type="hidden" name="reply" value="<?php echo $reply?>">
<input type="hidden" name="nlist" value="<?php echo $g['bbs_list']?>">
<input type="hidden" name="pcode" value="<?php echo $date['totime']?>">
<input type="hidden" name="html" value="HTML">
<input type="hidden" name="upfiles" id="upfilesValue" value="<?php echo $reply=='Y'?'':$R['upload']?>">
<input type="hidden" name="featured_img" value="<?php echo $R['featured_img'] ?>">
<div class="row">
<div class="col-6">
<!-- 첨부파일 업로드 -->
<?php if($d['theme']['show_upload']&&$d['theme']['perm_upload']<=$my['level']):?>
<?php if ($d['bbs']['attach']): ?>
<?php include $g['dir_module_skin'].'_uploader.php'?>
<?php endif; ?>
<?php endif?>
</div><!-- /.col-6 -->
<div class="col-6">
<?php if(!$my['id']):?>
<div class="form-group">
<label>이름</label>
<input type="text" name="name" placeholder="이름을 입력해 주세요." value="<?php echo $R['name']?>" id="" class="form-control">
</div>
<?php if(!$R['uid']||$reply=='Y'):?>
<div class="form-group">
<label>암호</label>
<input type="password" name="pw" placeholder="암호는 게시글 수정 및 삭제에 필요합니다." value="<?php echo $R['pw']?>" id="" class="form-control">
<small class="form-text text-muted">비밀답변은 비번을 수정하지 않아야 원게시자가 열람할 수 있습니다.</small>
</div>
<?php endif?>
<?php endif?>
<?php if($B['category']):$_catexp = explode(',',$B['category']);$_catnum=count($_catexp)?>
<div class="form-group">
<label>카테고리</label>
<select name="category" class="form-control custom-select form-control-lg">
<option value="">&nbsp;+ <?php echo $_catexp[0]?>선택</option>
<?php for($i = 1; $i < $_catnum; $i++):if(!$_catexp[$i])continue;?>
<option value="<?php echo $_catexp[$i]?>"<?php if($_catexp[$i]==$R['category']||$_catexp[$i]==$cat):?> selected="selected"<?php endif?>>ㆍ<?php echo $_catexp[$i]?><?php if($d['theme']['show_catnum']):?>(<?php echo getDbRows($table[$m.'data'],'site='.$s.' and notice=0 and bbs='.$B['uid']." and category='".$_catexp[$i]."'")?>)<?php endif?></option>
<?php endfor?>
</select>
</div>
<?php endif?>
<div class="form-group">
<label for="">제목</label>
<input type="text" name="subject" placeholder="제목을 입력해 주세요." value="<?php echo $R['subject']?>" id="" class="form-control form-control-lg" autofocus autocomplete="off">
</div>
<div class="mb-3">
<label>본문</label>
<script>
var attach_file_saveDir = '<?php echo $g['path_file']?>bbs/';// 파일 업로드 폴더
var attach_module_theme = '_desktop/bs4-gallery';// attach 모듈 테마
</script>
<?php
$__SRC__ = htmlspecialchars($R['content']);
if ($g['broswer']!='MSIE 11' && $g['broswer']!='MSIE 10' && $g['broswer']!='MSIE 9') {
include $g['path_plugin'].'ckeditor5/import.classic.php';
} else {
include $g['path_plugin'].'ckeditor/import.desktop.post.php';
}
?>
</div>
<?php if($d['theme']['show_wtag']):?>
<div class="form-group mt-4">
<label>태그<span class="rb-form-required text-danger"></span></label>
<input class="form-control form-control-lg" type="text" name="tag" placeholder="검색태그를 입력해 주세요." value="<?php echo $R['tag']?>">
<small class="form-text text-muted">이 게시물을 가장 잘 표현할 수 있는 단어를 콤마(,)로 구분해서 입력해 주세요.</small>
</div>
<?php endif?>
<div class="form-group">
<label class="sr-only"></label>
<?php if($my['admin']):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="notice" name="notice" value="1"<?php if($R['notice']):?> checked="checked"<?php endif?>>
<label class="custom-control-label" for="notice">공지글</label>
</div>
<?php endif?>
<?php if($d['theme']['use_hidden']==1):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="hidden" name="hidden" value="1"<?php if($R['hidden']):?> checked<?php endif?>>
<label class="custom-control-label" for="hidden">비밀글</label>
</div>
<?php elseif($d['theme']['use_hidden']==2):?>
<input type="hidden" name="hidden" value="1">
<?php endif?>
</div>
<div class="form-group mt-5">
<label class="mr-3">등록 후</label>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype1" name="backtype" value="list"<?php if(!$_SESSION['bbsback'] || $_SESSION['bbsback']=='list'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype1">목록으로 이동</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype2" name="backtype" value="view"<?php if($_SESSION['bbsback']=='view'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype2">본문으로 이동</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="backtype3" name="backtype" value="now"<?php if($_SESSION['bbsback']=='now'):?> checked<?php endif?>>
<label class="custom-control-label" for="backtype3">이 화면 유지</label>
</div>
</div><!-- /.form-group -->
<footer class="text-center my-3">
<button class="btn btn-lg btn-outline-primary btn-block js-submit" type="submit"><?php echo $submit_btn ?></button>
<button class="btn btn-lg btn-light btn-block" type="button" onclick="cancelCheck();">취소</button>
</footer>
</div><!-- /.col-6 -->
</div><!-- /.row -->
</form>
</article>
</section>
<?php include $g['dir_module_skin'].'_footer.php'?>
<script type="text/javascript">
// 글 등록 함수
var submitFlag = false;
function writeCheck(f) {
if (submitFlag == true) {
alert('게시물을 등록하고 있습니다. 잠시만 기다려 주세요.');
return false;
}
if (f.name && f.name.value == '') {
alert('이름을 입력해 주세요. ');
f.name.focus();
return false;
}
if (f.pw && f.pw.value == '') {
alert('암호를 입력해 주세요. ');
f.pw.focus();
return false;
}
<?php if ($B['category']): ?>
if (f.category && f.category.value == '') {
alert('카테고리를 선택해 주세요. ');
f.category.focus();
return false;
}
<?php endif; ?>
if (f.subject.value == '') {
alert('제목을 입력해 주세요. ');
f.subject.focus();
return false;
}
if (f.notice && f.hidden) {
if (f.notice.checked == true && f.hidden.checked == true) {
alert('공지글은 비밀글로 등록할 수 없습니다. ');
f.hidden.checked = false;
return false;
}
}
var editorData = editor.getData();
$('[name="content"]').val(editorData)
// 대표이미지가 없을 경우, 첫번째 업로드 사진을 지정함
var featured_img_input = $('input[name="featured_img"]'); // 대표이미지 input
var featured_img_uid = $(featured_img_input).val();
if(!featured_img_uid){ // 대표이미지로 지정된 값이 없는 경우
var first_attach_img_li = $('.rb-attach-photo li:first'); // 첫번째 첨부된 이미지 리스트 li
var first_attach_img_uid = $(first_attach_img_li).data('id');
featured_img_input.val(first_attach_img_uid);
}
// 첨부파일 uid 를 upfiles 값에 추가하기
var attachfiles=$('input[name="attachfiles[]"]').map(function(){return $(this).val()}).get();
var new_upfiles='';
if(attachfiles){
for(var i=0;i<attachfiles.length;i++) {
new_upfiles+=attachfiles[i];
}
$('input[name="upfiles"]').val(new_upfiles);
}
if ( !$('[name="upfiles"]').val() && !$('[name="notice"]').prop("checked") ) {
alert('사진파일을 첨부해 주세요. ');
$('[data-role="attach-handler-file"]').focus()
return false;
}
getIframeForAction(f);
submitFlag = true;
$('.js-submit').addClass('disabled').html('<i class="fa fa-spinner fa-spin"></i> <?php echo $submit_msg?>');
return submitFlag;
}
function cancelCheck() {
if (confirm('정말 취소하시겠습니까? ')){
history.back();
}
}
document.title = '<?php echo $title_text ?> · <?php echo $B['name']?>';
</script>