first
This commit is contained in:
130
modules/member/themes/_desktop/bs4-default/dashboard/_best.php
Normal file
130
modules/member/themes/_desktop/bs4-default/dashboard/_best.php
Normal file
@@ -0,0 +1,130 @@
|
||||
<div class="card shadow-sm" id="widget-post-best">
|
||||
<div class="card-header d-flex justify-content-between align-items-end">
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#bset-hit" data-sort="hit">조회순</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#bset-likes" data-sort="likes">좋아요순</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#bset-dislikes" data-sort="dislikes">싫어요순</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#bset-comment" data-sort="comment">댓글순</a>
|
||||
</li>
|
||||
</ul>
|
||||
<small class="text-muted" data-toggle="tooltip" title="<?php echo date('m/d',mktime(0,0,0,substr($date['today'],4,2),substr($date['today'],6,2)-7,substr($date['today'],0,4)))?>~<?php echo getDateFormat($date['today'],'m/d')?>">최근 일주일</small>
|
||||
</div>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane show active" id="bset-hit" role="tabpanel">
|
||||
<ul class="list-group list-group-flush" role="list"></ul>
|
||||
<div role="loader">
|
||||
<div class="d-flex justify-content-center align-items-center" style="height:432px">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div role="none" class="d-none">
|
||||
<div class="d-flex justify-content-center align-items-center" style="height:432px">
|
||||
<span class="text-muted">포스트가 없습니다.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="bset-likes" role="tabpanel">
|
||||
<ul class="list-group list-group-flush" role="list"></ul>
|
||||
<div role="loader">
|
||||
<div class="d-flex justify-content-center align-items-center" style="height:432px">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div role="none" class="d-none">
|
||||
<div class="d-flex justify-content-center align-items-center" style="height:432px">
|
||||
<span class="text-muted">포스트가 없습니다.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="bset-dislikes" role="tabpanel">
|
||||
<ul class="list-group list-group-flush" role="list"></ul>
|
||||
<div role="loader">
|
||||
<div class="d-flex justify-content-center align-items-center" style="height:432px">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div role="none" class="d-none">
|
||||
<div class="d-flex justify-content-center align-items-center" style="height:432px">
|
||||
<span class="text-muted">포스트가 없습니다.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="bset-comment" role="tabpanel">
|
||||
|
||||
<ul class="list-group list-group-flush" role="list"></ul>
|
||||
<div role="loader">
|
||||
<div class="d-flex justify-content-center align-items-center" style="height:432px">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div role="none" class="d-none">
|
||||
<div class="d-flex justify-content-center align-items-center" style="height:432px">
|
||||
<span class="text-muted">포스트가 없습니다.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function getWidgetPostbest(target,sort) {
|
||||
|
||||
$(target).find('[role="list"]').html('');
|
||||
$(target).find('[role="loader"]').removeClass('d-none');
|
||||
|
||||
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postBest',{
|
||||
dashboard : 'Y',
|
||||
sort : sort,
|
||||
markup_file : 'dashboard-media',
|
||||
d_start : '<?php echo 'site='.$s.' and date >= '.date("Ymd", strtotime("-1 week")); ?>', //일주일전
|
||||
limit : 10
|
||||
},function(response,status){
|
||||
if(status=='success'){
|
||||
var result = $.parseJSON(response);
|
||||
var list=result.list;
|
||||
|
||||
if (list) {
|
||||
$(target).find('[role="list"]').html(list)
|
||||
$(target).find('[role="loader"]').addClass('d-none');
|
||||
$(target).find('[data-plugin="timeago"]').timeago(); // 상대시간 플러그인 초기화
|
||||
} else {
|
||||
$(target).find('[role="loader"]').addClass('d-none');
|
||||
$(target).find('[role="none"]').removeClass('d-none');
|
||||
}
|
||||
} else {
|
||||
alert(status);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$( document ).ready(function() {
|
||||
$('#widget-post-best').find('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
var target = $(this).attr('href') // newly activated tab
|
||||
var sort = $(this).data('sort')
|
||||
getWidgetPostbest(target,sort)
|
||||
})
|
||||
|
||||
getWidgetPostbest('#bset-hit','hit');
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
111
modules/member/themes/_desktop/bs4-default/dashboard/_chart.php
Normal file
111
modules/member/themes/_desktop/bs4-default/dashboard/_chart.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<header class="d-flex justify-content-between align-items-center py-2">
|
||||
<strong>전체 포스트 추이</strong>
|
||||
<div class="mr-2">
|
||||
<a href="/dashboard?page=analytics" class="muted-link small d-none">
|
||||
더보기 <i class="fa fa-angle-right" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="card shadow-sm" id="widget-post-chart">
|
||||
<div class="card-header d-flex justify-content-between align-items-end">
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#chart-hit" data-mod="hit">조회수</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#chart-likes" data-mod="likes">좋아요</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#chart-dislikes" data-mod="dislikes">싫어요</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#chart-comment" data-mod="comment">댓글</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#chart-follower" data-mod="follower">구독자</a>
|
||||
</li>
|
||||
</ul>
|
||||
<small class="text-muted" data-toggle="tooltip" title="<?php echo date("m/d", strtotime("-1 week")).'~'. date("m/d", strtotime("now")) ?>">
|
||||
최근 일주일
|
||||
</small>
|
||||
</div>
|
||||
<div class="tab-content card-body">
|
||||
<div data-chart="loader">
|
||||
<div class="d-flex justify-content-center align-items-center" style="height:267px">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane show active" id="chart-hit" role="tabpanel">
|
||||
<canvas class="d-none"></canvas>
|
||||
</div>
|
||||
<div class="tab-pane" id="chart-likes" role="tabpanel">
|
||||
<canvas class="d-none"></canvas>
|
||||
</div>
|
||||
<div class="tab-pane" id="chart-dislikes" role="tabpanel">
|
||||
<canvas class="d-none"></canvas>
|
||||
</div>
|
||||
<div class="tab-pane" id="chart-comment" role="tabpanel">
|
||||
<canvas class="d-none"></canvas>
|
||||
</div>
|
||||
<div class="tab-pane" id="chart-follower" role="tabpanel">
|
||||
<canvas class="d-none"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function setWidgetPostLineChart(ele,mod) {
|
||||
|
||||
if (mod=='hit') var chartSet = ['조회수 추이','#cce5ff','#004085']; //label ,backgroundColor,borderColor
|
||||
if (mod=='likes') var chartSet = ['좋아요 추이','#d4edda','#155724'];
|
||||
if (mod=='dislikes') var chartSet = ['싫어요 추이','#d4edda','#155724'];
|
||||
if (mod=='comment') var chartSet = ['댓글 추이','#f8d7da','#721c24'];
|
||||
if (mod=='follower') var chartSet = ['구독자 추이','#ffeeba','#856404'];
|
||||
|
||||
var ctx = $(ele).find('canvas');
|
||||
ctx.addClass('d-none');
|
||||
$('[data-chart="loader"]').removeClass('d-none');
|
||||
|
||||
$.post(rooturl+'/?r='+raccount+'&m=member&a=get_mbrTrend',{
|
||||
mod : mod,
|
||||
d_start : '<?php echo date("Ymd", strtotime("-1 week")); ?>' //일주일전
|
||||
},function(response,status){
|
||||
if(status=='success'){
|
||||
var result = $.parseJSON(response);
|
||||
var type=result.type;
|
||||
var data=result.data;
|
||||
var options=result.options;
|
||||
|
||||
var mbrChart = new Chart(ctx, {
|
||||
type: type,
|
||||
data: data,
|
||||
options: options
|
||||
});
|
||||
|
||||
ctx.removeClass('d-none');
|
||||
$('[data-chart="loader"]').addClass('d-none');
|
||||
|
||||
} else {
|
||||
alert(status);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
setWidgetPostLineChart('#chart-hit','hit');
|
||||
|
||||
$('#widget-post-chart').find('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
var target = $(this).attr('href');
|
||||
var mod = $(this).data('mod');
|
||||
var ele = $(target).find('canvas');
|
||||
setWidgetPostLineChart(target,mod);
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
218
modules/member/themes/_desktop/bs4-default/dashboard/_main.css
Normal file
218
modules/member/themes/_desktop/bs4-default/dashboard/_main.css
Normal file
@@ -0,0 +1,218 @@
|
||||
.serial {
|
||||
counter-increment: Serial;
|
||||
}
|
||||
.serial .counter:before {
|
||||
content: counter(Serial);
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link {
|
||||
border: 1px solid transparent;
|
||||
color: #999;
|
||||
}
|
||||
.nav-tabs .nav-item.show .nav-link,
|
||||
.nav-tabs .nav-link.active {
|
||||
color: #495057;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/* form */
|
||||
.dropdown-toggle {
|
||||
position: relative;
|
||||
text-align: left;
|
||||
min-width: 10rem
|
||||
}
|
||||
|
||||
.dropdown-toggle::after {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 10px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.show .dropdown-toggle::after {
|
||||
border-bottom: .3em solid;
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.dropdown-item .material-icons {
|
||||
margin-left: -10px;
|
||||
margin-right: 5px
|
||||
}
|
||||
|
||||
.input-group .form-control:focus {
|
||||
border-color: #ced4da;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
.input-group .btn:hover {
|
||||
background-color: inherit;
|
||||
border-color: rgba(27,31,35,0.2);
|
||||
}
|
||||
|
||||
/* table */
|
||||
|
||||
.table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
border-bottom: 1px solid rgb(216, 216, 216);
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.table thead th,
|
||||
.table th {
|
||||
padding: 9px 10px;
|
||||
border-top: 1px solid rgb(226, 226, 226);
|
||||
border-left: 1px solid rgb(226, 226, 226);
|
||||
border-bottom: 1px solid rgb(226, 226, 226);
|
||||
font-size: 14px;
|
||||
background-color: rgb(248, 248, 248);
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
|
||||
.table th:first-child {
|
||||
border-left: 0 none
|
||||
}
|
||||
|
||||
.table td {
|
||||
padding: 10px 10px 9px;
|
||||
border-top: 1px solid rgb(233, 233, 233);
|
||||
font-size: 14px;
|
||||
line-height: 17px
|
||||
}
|
||||
|
||||
.table tr:first-child td {
|
||||
border-top: 0 none
|
||||
}
|
||||
|
||||
.table td {
|
||||
border-left: 1px solid rgb(233, 233, 233)
|
||||
}
|
||||
|
||||
.table tr td:first-child {
|
||||
border-left: 0 none
|
||||
}
|
||||
|
||||
/* Nestable */
|
||||
|
||||
.dd {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.dd-list {
|
||||
display: block;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.dd-item,
|
||||
.dd-empty,
|
||||
.dd-placeholder {
|
||||
display: block;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.dd-handle {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.dd-handle:hover {
|
||||
color: #2ea8e5;
|
||||
}
|
||||
|
||||
.dd-placeholder,
|
||||
.dd-empty {
|
||||
margin: 5px 0;
|
||||
padding: 0;
|
||||
min-height: 30px;
|
||||
background: #f2fbff;
|
||||
border: 1px dashed #b6bcbf;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box
|
||||
}
|
||||
|
||||
.dd-empty {
|
||||
border: 1px dashed #bbb;
|
||||
min-height: 100px;
|
||||
background-color: #e5e5e5;
|
||||
background-image: -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), background-image: -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), background-size: 60px 60px;
|
||||
background-position: 0 0, 30px 30px;
|
||||
}
|
||||
|
||||
.dd-dragel {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.dd-dragel > .dd-item .dd-handle {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* list-header */
|
||||
.list-header-edit {
|
||||
display: none
|
||||
}
|
||||
.list-header.edit .list-header-edit {
|
||||
display: block
|
||||
}
|
||||
.list-header.edit .list-header-show {
|
||||
display: none
|
||||
}
|
||||
|
||||
/* list-section */
|
||||
.list-section .list-section-edit {
|
||||
display: none;
|
||||
}
|
||||
.list-section.open .list-section-edit {
|
||||
display: block;
|
||||
}
|
||||
.list-section.open .list-section-show {
|
||||
display: none;
|
||||
}
|
||||
.list-section [data-role="empty-section"] {
|
||||
display: none
|
||||
}
|
||||
.list-section [data-role="has-section"] {
|
||||
display: block
|
||||
}
|
||||
.list-section.empty [data-role="empty-section"] {
|
||||
display: block
|
||||
}
|
||||
.list-section.empty [data-role="has-section"] {
|
||||
display: none
|
||||
}
|
||||
|
||||
[data-role="follow"].active {
|
||||
background-color: #e0e0e0 !important;
|
||||
color: #696969 !important;
|
||||
border: none !important
|
||||
}
|
||||
[data-role="follow"].active::after {
|
||||
content: '중'
|
||||
}
|
||||
|
||||
|
||||
.btn.btn-white.active {
|
||||
color: #fff;
|
||||
background-color: #007bff;
|
||||
border-color: #007bff;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$('[data-toggle="actionIframe"] , [data-act="actionIframe"]').click(function() {
|
||||
getIframeForAction('');
|
||||
frames.__iframe_for_action__.location.href = $(this).attr("data-url");
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
$wdgvar['limit'] = 6; //전체 출력수
|
||||
$wdgvar['recnum'] =3; //한 열에 출력할 카드 갯수
|
||||
$wdgvar['title'] ='최근 리스트';
|
||||
$wdgvar['link'] = RW('mod=dashboard&page=list');
|
||||
$recnum = $wdgvar['recnum']; // 한 열에 출력할 카드 갯수
|
||||
$totalCardRow=ceil($wdgvar['limit']/$recnum); // row 갯수
|
||||
$total_card_num = $totalCardRow*$recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
|
||||
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
|
||||
$lack_card_num = $total_card_num;
|
||||
|
||||
$_listque = 'mbruid='.$my['uid'].' and site='.$s;
|
||||
$_NUM = getDbRows($table['postlist'],$_listque);
|
||||
$_RCD=getDbArray($table['postlist'],$_listque,'*','gid','asc',$wdgvar['limit'],1);
|
||||
?>
|
||||
|
||||
<section class="widget-post-card-01">
|
||||
<header class="d-flex justify-content-between align-items-center py-2">
|
||||
<strong><?php echo $wdgvar['title']?></strong>
|
||||
<?php if($wdgvar['link'] && $_NUM):?>
|
||||
<a href="<?php echo $wdgvar['link']?>" class="muted-link small">
|
||||
더보기 <i class="fa fa-angle-right" aria-hidden="true"></i>
|
||||
</a>
|
||||
<?php endif?>
|
||||
</header>
|
||||
|
||||
<?php if ($_NUM): ?>
|
||||
<div class="card-deck" data-role="post-list">
|
||||
|
||||
<?php $i=0;foreach($_RCD as $R):$i++;?>
|
||||
<div class="card shadow-sm" id="item-<?php echo $_R['uid'] ?>">
|
||||
|
||||
<a class="position-relative" href="<?php echo RW('mod=dashboard&page=list_view&id='.$R['id'])?>">
|
||||
<img src="<?php echo getPreviewResize(getListImageSrc($R['uid']),'300x168') ?>" alt="" class="card-img-top">
|
||||
<span class="list_mask">
|
||||
<span class="txt"><?php echo $R['num']?><i class="fa fa-list-ul d-block" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
</a>
|
||||
<div class="card-body p-3">
|
||||
<h6 class="card-title mb-0 line-clamp-2">
|
||||
<a class="muted-link" href="<?php echo RW('mod=dashboard&page=list_view&id='.$R['id'])?>">
|
||||
<?php echo getStrCut($R['name'],100,'..')?>
|
||||
</a>
|
||||
</h6>
|
||||
<small class="text-muted small" >업데이트 : <time data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_last']?$R['d_last']:$R['d_regis'],'c')?>"></time></small>
|
||||
</div>
|
||||
|
||||
</div><!-- /.card -->
|
||||
|
||||
<?php
|
||||
$print_card_num++; // 카드 출력될 때마 1씩 증가
|
||||
$lack_card_num = $total_card_num - $print_card_num;
|
||||
?>
|
||||
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endforeach?>
|
||||
|
||||
<?php if($lack_card_num ):?>
|
||||
<?php for($j=0;$j<$lack_card_num;$j++):$i++;?>
|
||||
<div class="card border-0" style="background-color: transparent"></div>
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
|
||||
</div> <!-- /.row -->
|
||||
<?php else: ?>
|
||||
<div class="text-center text-muted small py-5 border">
|
||||
리스트가 없습니다.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</section><!-- /.widget -->
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
$wdgvar['limit'] = 9; //전체 출력수
|
||||
$wdgvar['recnum'] =3; //한 열에 출력할 카드 갯수
|
||||
$wdgvar['title'] ='최근 포스트';
|
||||
$wdgvar['link'] = RW('mod=dashboard&page=post');
|
||||
$recnum = $wdgvar['recnum']; // 한 열에 출력할 카드 갯수
|
||||
$totalCardRow=ceil($wdgvar['limit']/$recnum); // row 갯수
|
||||
$total_card_num = $totalCardRow*$recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
|
||||
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
|
||||
$lack_card_num = $total_card_num;
|
||||
|
||||
$_postque = 'mbruid='.$my['uid'].' and site='.$s.' and auth=1';
|
||||
$_NUM = getDbRows($table['postmember'],$_postque);
|
||||
$_RCD=getDbArray($table['postmember'],$_postque,'*','gid','asc',$wdgvar['limit'],1);
|
||||
while($_R = db_fetch_array($_RCD)) $RCD[] = getDbData($table['postdata'],'gid='.$_R['gid'],'*');
|
||||
?>
|
||||
|
||||
<section class="widget-post-card-01">
|
||||
<header class="d-flex justify-content-between align-items-center py-2">
|
||||
<strong><?php echo $wdgvar['title']?></strong>
|
||||
|
||||
<div class="">
|
||||
<?php if($wdgvar['link'] && $_NUM):?>
|
||||
<a href="<?php echo $wdgvar['link']?>" class="muted-link small">
|
||||
더보기 <i class="fa fa-angle-right" aria-hidden="true"></i>
|
||||
</a>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
<?php if ($_NUM): ?>
|
||||
<div class="card-deck" data-role="post-list">
|
||||
|
||||
<?php $i=0;foreach($RCD as $R):$i++;?>
|
||||
<div class="card shadow-sm" id="item-<?php echo $_R['uid'] ?>">
|
||||
<a class="position-relative" href="<?php echo getPostLink($R,0) ?>" target="_blank">
|
||||
<img src="<?php echo checkPostPerm($R) ?getPreviewResize(getUpImageSrc($R),'300x168'):getPreviewResize('/files/noimage.png','300x168') ?>" alt="" class="card-img-top">
|
||||
<time class="badge badge-dark rounded-0 position-absolute" style="right:1px;bottom:1px"><?php echo checkPostPerm($R)?getUpImageTime($R):'' ?></time>
|
||||
<span class="badge badge-primary rounded-0 position-absolute" style="left:0px;top:0px"><?php echo $R['mbruid']!=$my['uid']?'공유':'' ?></span>
|
||||
</a>
|
||||
<div class="card-body p-3">
|
||||
<h6 class="card-title mb-0 line-clamp-2">
|
||||
<a class="muted-link" href="<?php echo RW('m=post&mod=write&cid='.$R['cid']) ?>">
|
||||
<?php echo checkPostPerm($R)?getStrCut(stripslashes($R['subject']),100,'..'):'[비공개 포스트]'?>
|
||||
</a>
|
||||
</h6>
|
||||
<small class="text-muted small" >업데이트 : <time data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_modify']?$R['d_modify']:$R['d_regis'],'c')?>"></time></small>
|
||||
</div><!-- /.card-body -->
|
||||
</div><!-- /.card -->
|
||||
|
||||
<?php
|
||||
$print_card_num++; // 카드 출력될 때마 1씩 증가
|
||||
$lack_card_num = $total_card_num - $print_card_num;
|
||||
?>
|
||||
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endforeach?>
|
||||
|
||||
<?php if($lack_card_num ):?>
|
||||
<?php for($j=0;$j<$lack_card_num;$j++):$i++;?>
|
||||
<div class="card border-0" style="background-color: transparent"></div>
|
||||
<?php if(!($i%$recnum)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
|
||||
</div><!-- /.card-deck -->
|
||||
<?php else: ?>
|
||||
|
||||
<div class="text-center text-muted small py-5 border">
|
||||
<?php if ($d['post']['writeperm']): ?>
|
||||
<a href="<?php echo RW('m=post&mod=write')?>" class="btn btn-primary">
|
||||
포스트 작성하기
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</section><!-- /.widget -->
|
||||
@@ -0,0 +1,52 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="subhead d-flex justify-content-between align-items-center">
|
||||
<h2 class="mb-0">
|
||||
분석
|
||||
</h2>
|
||||
|
||||
<div class="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<canvas id="myChart"></canvas>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!--
|
||||
<script>
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
var ctx = document.getElementById('myChart').getContext('2d');
|
||||
var chart = new Chart(ctx, {
|
||||
// The type of chart we want to create
|
||||
type: 'line',
|
||||
|
||||
// The data for our dataset
|
||||
data: {
|
||||
labels: ['1월', '2월', '3월', '4월', '5월', '6월', '7월'],
|
||||
datasets: [{
|
||||
label: '조회수 추이',
|
||||
backgroundColor: '#e9f6fa',
|
||||
borderColor: '#007bff',
|
||||
data: [0, 10, 5, 2, 20, 30, 45]
|
||||
}]
|
||||
},
|
||||
|
||||
// Configuration options go here
|
||||
options: {}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script> -->
|
||||
180
modules/member/themes/_desktop/bs4-default/dashboard/feed.php
Normal file
180
modules/member/themes/_desktop/bs4-default/dashboard/feed.php
Normal file
@@ -0,0 +1,180 @@
|
||||
<?php
|
||||
$g['postVarForSite'] = $g['path_var'].'site/'.$r.'/post.var.php';
|
||||
$svfile = file_exists($g['postVarForSite']) ? $g['postVarForSite'] : $g['path_module'].'post/var/var.php';
|
||||
include_once $svfile;
|
||||
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'desc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 16;
|
||||
$postque = 'site='.$s;
|
||||
|
||||
$_line =4; //한 열에 출력할 카드 갯수
|
||||
$totalCardRow=ceil($recnum/$_line); // row 갯수
|
||||
$total_card_num = $totalCardRow*$_line;// 총 출력되야 할 card 갯수(빈카드 포함)
|
||||
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
|
||||
$lack_card_num = $total_card_num;
|
||||
|
||||
$postque .= ' and (display=2 and hidden=0 or display>3)';
|
||||
|
||||
$postque .= ' and mbruid='.$my['uid'];
|
||||
$NUM = getDbRows($table['s_feed'],$postque);
|
||||
$TCD = getDbArray($table['s_feed'],$postque,'entry',$sort,$orderby,$recnum,$p);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = getDbData($table['postdata'],'uid='.$_R['entry'],'*');
|
||||
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
$vtype = $vtype ? $vtype : $_SESSION['feed_vtype'];
|
||||
$_SESSION['feed_vtype'] = $vtype ? $vtype : 'card';
|
||||
|
||||
$g['page_reset'] = RW('mod=dashboard&page='.$page);
|
||||
$g['page_list'] = $g['page_reset'].getLinkFilter('',array($vtype?'vtype':''));
|
||||
$g['pagelink'] = $g['page_list'];
|
||||
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-between align-items-center subhead mt-0">
|
||||
<h3 class="mb-0">
|
||||
피드
|
||||
</h3>
|
||||
<div class="">
|
||||
<a href="<?php echo RW('mod=dashboard&page=follower&type=following')?>" class="btn btn-white">
|
||||
구독 관리
|
||||
</a>
|
||||
<a href="<?php echo RW('mod=dashboard&page=feed&vtype=card')?>" class="btn btn-white py-1<?php echo $_SESSION['feed_vtype']=='card'?' active':'' ?>">
|
||||
<div class="d-flex justify-content-center align-content-between">
|
||||
<i class="material-icons">view_module</i>
|
||||
</div>
|
||||
</a>
|
||||
<a href="<?php echo RW('mod=dashboard&page=feed&vtype=media')?>" class="btn btn-white py-1<?php echo $_SESSION['feed_vtype']=='media'?' active':'' ?>">
|
||||
<div class="d-flex justify-content-center align-content-between">
|
||||
<i class="material-icons">view_list</i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center border-top border-dark pt-4 pb-3" role="filter">
|
||||
<span class="f18">전체 <span class="text-primary"><?php echo number_format($NUM)?></span> 개</span>
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<?php if ($vtype=='media'): ?>
|
||||
<ul class="list-unstyled" style="margin-top: -1rem">
|
||||
<?php if (!empty($RCD)): ?>
|
||||
<?php foreach($RCD as $R):?>
|
||||
<li class="mt-4 d-flex justify-content-between align-items-center"
|
||||
data-role="item"
|
||||
data-featured_img="<?php echo getPreviewResize(getUpImageSrc($R),'180x100') ?>"
|
||||
data-hit="<?php echo $R['hit']?>"
|
||||
data-likes="<?php echo $R['likes']?>"
|
||||
data-comment="<?php echo $R['comment']?>"
|
||||
data-subject="<?php echo stripslashes($R['subject'])?>">
|
||||
|
||||
<div class="media w-75">
|
||||
<a href="<?php echo getPostLink($R,1)?>" class="position-relative mr-3" target="_blank">
|
||||
<img class="border" src="<?php echo checkPostPerm($R) ?getPreviewResize(getUpImageSrc($R),'180x100'):getPreviewResize('/files/noimage.png','180x100') ?>" alt="" width="180">
|
||||
<time class="badge badge-dark rounded-0 position-absolute f14" style="right:1px;bottom:1px"><?php echo checkPostPerm($R)?getUpImageTime($R):'' ?></time>
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h5 class="my-1 line-clamp-2">
|
||||
<a href="<?php echo getPostLink($R,1)?>" class="font-weight-light muted-link" <?php echo !checkPostOwner($R)?'target="_blank"':'' ?>>
|
||||
<?php echo stripslashes($R['subject'])?>
|
||||
</a>
|
||||
</h5>
|
||||
<div class="mb-1">
|
||||
<ul class="list-inline d-inline-block f13 text-muted">
|
||||
<li class="list-inline-item">조회수 <?php echo $R['hit']?>회 </li>
|
||||
<li class="list-inline-item">• 업데이트 :
|
||||
<time data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_modify']?$R['d_modify']:$R['d_regis'],'c')?>"></time>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<?php if ($R['category']): ?>
|
||||
<span class="ml-2 f13 text-muted">
|
||||
<i class="fa fa-folder-o mr-1" aria-hidden="true"></i> <?php echo getAllPostCat('post',$R['category']) ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($R['review']): ?>
|
||||
<p class="text-muted f13 mt-2 mb-1 line-clamp-2"><?php echo $R['review'] ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.media -->
|
||||
<div class="">
|
||||
<a href="<?php echo getProfileLink($R['mbruid']) ?>" class="media align-items-center mb-2 text-decoration-none text-reset">
|
||||
<img src="<?php echo getAvatarSrc($R['mbruid'],'32') ?>" class="mr-2 rounded-circle" width="32" height="32" alt="<?php echo $M1[$_HS['nametype']] ?>의 프로필">
|
||||
<div class="media-body">
|
||||
<?php echo getProfileInfo($R['mbruid'],$_HS['nametype']) ?>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
|
||||
<div class="card-deck" data-role="post-list">
|
||||
<?php if (!empty($RCD)): ?>
|
||||
<?php $i=0;foreach($RCD as $R):$i++;?>
|
||||
<div class="card shadow-sm" id="item-<?php echo $_R['uid'] ?>">
|
||||
<a class="text-nowrap text-truncate muted-link position-relative " href="<?php echo getPostLink($R,1) ?>" target="_blank">
|
||||
<img src="<?php echo checkPostPerm($R) ?getPreviewResize(getUpImageSrc($R),'250x140'):getPreviewResize('/files/noimage.png','250x140') ?>" alt="" class="card-img-top">
|
||||
<time class="badge badge-dark rounded-0 position-absolute" style="right:1px;bottom:1px"><?php echo checkPostPerm($R)?getUpImageTime($R):'' ?></time>
|
||||
</a>
|
||||
<div class="card-body p-3">
|
||||
<h6 class="card-title mb-0 line-clamp-2">
|
||||
<a class="muted-link" href="<?php echo RW('m=post&mod=write&cid='.$R['cid']) ?>">
|
||||
<?php echo checkPostPerm($R)?getStrCut(stripslashes($R['subject']),100,'..'):'[비공개 포스트]'?>
|
||||
</a>
|
||||
</h6>
|
||||
|
||||
<small class="text-muted small" ><?php echo getProfileInfo($R['mbruid'],$_HS['nametype']) ?> • 업데이트 : <time data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_modify']?$R['d_modify']:$R['d_regis'],'c')?>"></time></small>
|
||||
</div><!-- /.card-body -->
|
||||
</div><!-- /.card -->
|
||||
|
||||
<?php
|
||||
$print_card_num++; // 카드 출력될 때마 1씩 증가
|
||||
$lack_card_num = $total_card_num - $print_card_num;
|
||||
?>
|
||||
|
||||
<?php if(!($i%$_line)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endforeach?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($lack_card_num ):?>
|
||||
<?php for($j=0;$j<$lack_card_num;$j++):$i++;?>
|
||||
<div class="card border-0" style="background-color: transparent"></div>
|
||||
<?php if(!($i%$_line)):?></div><div class="card-deck mt-3" data-role="post-list"><?php endif?>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
|
||||
</div><!-- /.card-deck -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(!$NUM):?>
|
||||
<div class="d-flex align-items-center justify-content-center" style="height: 40vh">
|
||||
<div class="text-muted">표시할 포스트가 없습니다.</div>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
<div class="d-flex justify-content-between my-4">
|
||||
<div class=""></div>
|
||||
|
||||
<?php if ($NUM > $recnum): ?>
|
||||
<ul class="pagination mb-0">
|
||||
<?php echo getPageLink(10,$p,$TPG,'')?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php include $g['path_module'].'post/mod/_component.desktop.php';?>
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
$g['postVarForSite'] = $g['path_var'].'site/'.$r.'/post.var.php';
|
||||
$svfile = file_exists($g['postVarForSite']) ? $g['postVarForSite'] : $g['path_module'].'post/var/var.php';
|
||||
include_once $svfile;
|
||||
|
||||
$type = $type ? $type : 'follower';
|
||||
$sort = 'uid';
|
||||
$orderby= 'desc';
|
||||
$recnum = 30;
|
||||
|
||||
$postque = 'my_mbruid='.$my['uid'];
|
||||
|
||||
if($type == 'follower') {
|
||||
$postque = 'by_mbruid='.$my['uid'];
|
||||
$_fmemberuid = 'my_mbruid';
|
||||
}
|
||||
if($type == 'following') {
|
||||
$_fmemberuid = 'by_mbruid';
|
||||
}
|
||||
if($type == 'friend') {
|
||||
$postque = 'by_mbruid='.$my['uid'].' and rel=1';
|
||||
$_fmemberuid = 'my_mbruid';
|
||||
}
|
||||
if ($where && $keyword) $postque .= getSearchSql($where,$keyword,$ikeyword,'or');
|
||||
$RCD = getDbArray($table['s_friend'],$postque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_friend'],$postque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
$g['page_reset'] = RW('mod=dashboard&page='.$page);
|
||||
$g['page_list'] = $g['page_reset'].getLinkFilter('',array($type?'type':''));
|
||||
$g['pagelink'] = $g['page_list'];
|
||||
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-between align-items-center subhead mt-0">
|
||||
<h3 class="mb-0">
|
||||
구독자 관리
|
||||
</h3>
|
||||
<div class="">
|
||||
<a href="<?php echo RW('mod=dashboard&page=follower')?>" class="btn btn-white<?php echo $type=='follower'?' active':'' ?>">
|
||||
나를 구독하는 사람
|
||||
<span class="badge"><?php echo getDbRows($table['s_friend'],'by_mbruid='.$my['uid'])?></span>
|
||||
</a>
|
||||
<a href="<?php echo RW('mod=dashboard&page=follower&type=following')?>" class="btn btn-white<?php echo $type=='following'?' active':'' ?>">
|
||||
내가 구독하는 사람
|
||||
<span class="badge"><?php echo getDbRows($table['s_friend'],'my_mbruid='.$my['uid'])?></span>
|
||||
</a>
|
||||
<a href="<?php echo RW('mod=dashboard&page=follower&type=friend')?>" class="btn btn-white<?php echo $type=='friend'?' active':'' ?>" data-toggle="tooltip" title="서로 구독하는 관계">
|
||||
친구
|
||||
<span class="badge"><?php echo getDbRows($table['s_friend'],'by_mbruid='.$my['uid'].' and rel=1')?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center border-top border-dark pb-3" role="filter">
|
||||
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<ul class="list-inline mt-3">
|
||||
<?php foreach($RCD as $R):?>
|
||||
<?php $num_follower = getProfileInfo($R[$_fmemberuid],'num_follower') ?>
|
||||
<?php $_isFollowing = getDbRows($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$R[$_fmemberuid]); ?>
|
||||
<?php $_isFriend = getDbRows($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$R[$_fmemberuid].' and rel=1'); ?>
|
||||
<li class="list-inline-item text-center mr-5" data-mbruid="<?php echo $R[$_fmemberuid] ?>">
|
||||
<a href="<?php echo getProfileLink($R[$_fmemberuid])?>" class="d-block text-decoration-none text-reset" target="_blank">
|
||||
<img alt="" class="rounded-circle border" src="<?php echo getAvatarSrc($R[$_fmemberuid],'105') ?>" width="105" height="105" >
|
||||
<div class="mt-2">
|
||||
<?php echo getProfileInfo($R[$_fmemberuid],'nic')?>
|
||||
<span class="badge badge-light align-middle"><?php echo $_isFriend?'친구':'' ?></span>
|
||||
</div>
|
||||
</a>
|
||||
<p class="text-muted mb-2 f13 mt-1">
|
||||
구독자 <span data-role="num_follower"><?php echo number_format($num_follower)?></span>명
|
||||
</p>
|
||||
<?php if($my['uid']!=$R[$_fmemberuid]):?>
|
||||
<button type="button" class="btn btn-primary btn-sm<?php echo $_isFollowing ?' active':''?>"
|
||||
data-act="actionIframe"
|
||||
data-toggle="button"
|
||||
data-role="follow"
|
||||
data-url="<?php echo $g['s'].'/?r='.$r.'&m=member&a=profile_follow&mbruid='.$R[$_fmemberuid]?>">
|
||||
구독
|
||||
</button>
|
||||
<?php endif?>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
|
||||
<?php if(!$NUM):?>
|
||||
<div class="d-flex align-items-center justify-content-center" style="height: 40vh">
|
||||
<div class="text-muted">자료가 없습니다.</div>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
<div class="d-flex justify-content-between my-4">
|
||||
<div class=""></div>
|
||||
|
||||
<?php if ($NUM > $recnum): ?>
|
||||
<ul class="pagination mb-0">
|
||||
<?php echo getPageLink(10,$p,$TPG,'')?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
365
modules/member/themes/_desktop/bs4-default/dashboard/list.php
Normal file
365
modules/member/themes/_desktop/bs4-default/dashboard/list.php
Normal file
@@ -0,0 +1,365 @@
|
||||
<?php
|
||||
$g['postVarForSite'] = $g['path_var'].'site/'.$r.'/post.var.php';
|
||||
$svfile = file_exists($g['postVarForSite']) ? $g['postVarForSite'] : $g['path_module'].'post/var/var.php';
|
||||
include_once $svfile;
|
||||
|
||||
$sort = $sort ? $sort : 'gid';
|
||||
$orderby= $orderby ? $orderby : 'asc';
|
||||
$recnum = $recnum && $recnum < 201 ? $recnum : 15;
|
||||
$where = 'name|tag';
|
||||
$listque = 'mbruid='.$my['uid'].' and site='.$s;
|
||||
|
||||
if ($display) $listque .= ' and display='.$display;
|
||||
|
||||
if ($where && $keyword) {
|
||||
if (strstr('[id]',$where)) $listque .= " and ".$where."='".$keyw."'";
|
||||
else $listque .= getSearchSql($where,$keyword,$ikeyword,'or');
|
||||
}
|
||||
|
||||
$RCD = getDbArray($table['postlist'],$listque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['postlist'],$listque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
$m = 'post';
|
||||
$g['post_base'] = $g['s'].'/?r='.$r.'&'.'m=post';
|
||||
$g['post_reset'] = RW('mod=dashboard&page='.$page);
|
||||
$g['post_list'] = $g['post_reset'].getLinkFilter('',array($sort!='gid'?'sort':'',$orderby!='asc'?'orderby':'',$display?'display':'',$keyword?'keyword':''));
|
||||
$g['pagelink'] = $g['post_list'];
|
||||
$g['post_orign'] = $g['post_reset'];
|
||||
$g['post_view'] = $g['post_list'].'&uid=';
|
||||
$g['post_write'] = $g['post_list'].'&mod=write';
|
||||
$g['post_modify']= $g['post_write'].'&uid=';
|
||||
$g['post_reply'] = $g['post_write'].'&reply=Y&uid=';
|
||||
$g['post_action']= $g['post_base'].'&a=';
|
||||
$g['post_list_delete']= $g['post_action'].'deletelist&uid=';
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-between align-items-center subhead">
|
||||
<h3 class="mb-0">
|
||||
리스트 관리
|
||||
</h3>
|
||||
<div class="">
|
||||
<a href="<?php echo getProfileLink($my['uid']) ?><?php echo $_HS['rewrite']?'/':'&page=' ?>list" class="btn btn-white">
|
||||
<i class="fa fa-address-card-o fa-fw" aria-hidden="true"></i>
|
||||
프로필 이동
|
||||
</a>
|
||||
<a href="#modal-list-new" data-toggle="modal" data-backdrop="static" class="btn btn-primary">
|
||||
리스트 만들기
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center border-top border-dark pt-4 pb-3" role="filter">
|
||||
<span class="f18">전체 <span class="text-primary"><?php echo number_format($NUM)?></span> 개</span>
|
||||
|
||||
<form name="toolbarForm" action="<?php echo $g['post_reset'] ?>" method="get" class="form-inline ml-auto">
|
||||
|
||||
<?php if (!$_HS['rewrite']): ?>
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="mod" value="dashboard">
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="display" value="<?php echo $display?>">
|
||||
|
||||
<label class="mt-1 mr-2 sr-only">상태</label>
|
||||
<div class="dropdown" data-role="display">
|
||||
<a class="btn btn-white dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
상태 : <?php echo $display?$g['displaySet']['label'][$display]:'전체' ?>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu shadow-sm" aria-labelledby="dropdownMenuLink">
|
||||
<button class="dropdown-item d-flex justify-content-between align-items-center<?php echo !$display?' active':'' ?>" type="button">
|
||||
전체
|
||||
<small><?php echo number_format(getDbRows($table['postlist'],'mbruid='.$my['uid'].' and site='.$s))?></small>
|
||||
</button>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
<?php $displaySet=explode('||',$d['displaySet'])?>
|
||||
<?php $i=1;foreach($displaySet as $displayLine):if(!trim($displayLine))continue;$dis=explode(',',$displayLine)?>
|
||||
<button class="dropdown-item justify-content-between align-items-center<?php echo $display==$i?' active':' d-flex' ?><?php echo $dis[0]=='일부공개'?' d-none':'' ?>" type="button" data-value="<?php echo $i ?>">
|
||||
<span>
|
||||
<i class="material-icons mr-1 f18 align-middle" aria-hidden="true"><?php echo $dis[1]?></i>
|
||||
<?php echo $dis[0]?>
|
||||
</span>
|
||||
<small><?php echo number_format(getDbRows($table['postlist'],'mbruid='.$my['uid'].' and site='.$s.' and display='.$i))?></small>
|
||||
</button>
|
||||
<?php $i++;endforeach?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-group ml-2">
|
||||
<input type="text" name="keyword" class="form-control" placeholder="이름,태그 검색" value="<?php echo $keyword ?>">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-white text-muted border-left-0" type="submit">
|
||||
<i class="fa fa-search" aria-hidden="true"></i>
|
||||
</button>
|
||||
<?php if ($keyword): ?>
|
||||
<a href="<?php echo RW('mod=dashboard&page='.$page)?>" class="btn btn-white">초기화</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<form id="nestableForm" action="<?php echo $g['s']?>/" method="post" target="_action_frame_<?php echo $m?>">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="post">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="type" value="list">
|
||||
<input type="hidden" name="a" value="modifygid">
|
||||
|
||||
<div class="dd" id="nestable-list">
|
||||
<ul class="dd-list list-unstyled" style="margin-top: -1rem" data-plugin="markjs">
|
||||
|
||||
<?php $_i=1;while($R=db_fetch_array($RCD)):?>
|
||||
<li class="media align-items-center my-3 serial dd-item bg-light p-3" data-id="<?php echo $_i?>">
|
||||
<input type="checkbox" name="listmembers[]" value="<?php echo $R['uid']?>" checked class="d-none">
|
||||
<span class="dd-handle pr-3">
|
||||
<i class="fa fa-arrows" aria-hidden="true"></i>
|
||||
</span>
|
||||
<strong class="counter mr-3 f18"></strong>
|
||||
<a href="<?php echo RW('mod=dashboard&page=list_view&id='.$R['id'])?>" class="position-relative mr-3">
|
||||
<img src="<?php echo getPreviewResize(getListImageSrc($R['uid']),'300x168') ?>" alt="" style="width:180px">
|
||||
<span class="list_mask">
|
||||
<span class="txt"><?php echo $R['num']?><i class="fa fa-list-ul d-block" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0 mb-1"><a class="muted-link" href="<?php echo RW('mod=dashboard&page=list_view&id='.$R['id'])?>"><?php echo $R['name']?></a></h5>
|
||||
<span class="text-muted">업데이트: <time data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_last'],'c')?>"></time></span>
|
||||
<?php if(getNew($R['d_last'],12)):?><small class="text-danger">new</small><?php endif?>
|
||||
<div class="">
|
||||
<?php if ($R['tag']): ?>
|
||||
<span class="f13 text-muted mr-2">
|
||||
<!-- 태그 -->
|
||||
<?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-light" href="<?php echo RW('m=post&mod=keyword&') ?>keyword=<?php echo urlencode($_tagk)?>"><?php echo $_tagk?></a>
|
||||
<?php endfor?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-3 align-self-center form-inline">
|
||||
|
||||
<div class="dropdown mr-2" data-toggle="display" data-uid="<?php echo $R['uid'] ?>">
|
||||
<button class="btn btn-white btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="min-width: 7.5rem">
|
||||
<?php echo $g['displaySet']['label'][$R['display']] ?>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right shadow" style="min-width: 6rem">
|
||||
<?php $displaySet=explode('||',$d['displaySet'])?>
|
||||
<?php $i=1;foreach($displaySet as $displayLine):if(!trim($displayLine))continue;$dis=explode(',',$displayLine)?>
|
||||
<button class="dropdown-item<?php echo $R['display']==$i?' active':'' ?><?php echo $dis[0]=='일부공개'?' d-none':'' ?>" type="button" data-display="<?php echo $i ?>" data-label="<?php echo $dis[0]?>">
|
||||
<i class="material-icons mr-1 f16 align-middle" aria-hidden="true"><?php echo $dis[1]?></i>
|
||||
<?php echo $dis[0]?>
|
||||
</button>
|
||||
<?php $i++;endforeach?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-white btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="min-width: 5rem">
|
||||
관리
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right shadow-sm" style="min-width: 5rem">
|
||||
<a class="dropdown-item" href="<?php echo RW('mod=dashboard&page=list_view&id='.$R['id'])?>" >수정</a>
|
||||
<a class="dropdown-item" href="<?php echo $g['post_list_delete'].$R['uid']?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 삭제하시겠습니까?');">삭제</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?php echo getListLink($R,0) ?>" target="_blank">보기</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<?php $_i++;endwhile?>
|
||||
|
||||
<?php if(!$NUM):?>
|
||||
<li>
|
||||
<div class="d-flex align-items-center justify-content-center" style="height: 40vh">
|
||||
<div class="text-muted">리스트가 없습니다.</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php endif?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex justify-content-between my-4">
|
||||
<div class=""></div>
|
||||
|
||||
<?php if ($NUM > $recnum): ?>
|
||||
<ul class="pagination mb-0">
|
||||
<?php echo getPageLink(10,$p,$TPG,'')?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal" id="modal-list-new" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document" style="width: 560px">
|
||||
<form class="modal-content" id="listAddForm" role="form" action="<?php echo $g['s']?>/" method="post" onsubmit="return listCheck(this);">
|
||||
<div class="modal-header border-bottom-0">
|
||||
<h5 class="modal-title" id="exampleModalLongTitle">새 리스트</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="post">
|
||||
<input type="hidden" name="a" value="regis_list">
|
||||
<input type="hidden" name="display" value="1">
|
||||
|
||||
<div class="input-group input-group-lg">
|
||||
<input type="text" name="name" class="form-control rounded-0" placeholder="리스트명 입력" required>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
|
||||
<div class="dropdown mr-auto">
|
||||
<button class="btn btn-white dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="material-icons mr-1 f16 align-middle" aria-hidden="true"><?php echo $g['displaySet']['icon'][1]?></i>
|
||||
<?php echo $g['displaySet']['label'][1] ?>
|
||||
</button>
|
||||
<div class="dropdown-menu shadow" aria-labelledby="dropdownMenuButton">
|
||||
<?php $displaySet=explode('||',$d['displaySet'])?>
|
||||
<?php $i=1;foreach($displaySet as $displayLine):if(!trim($displayLine))continue;$dis=explode(',',$displayLine)?>
|
||||
<a class="dropdown-item<?php echo $dis[0]=='일부공개'?' d-none':'' ?><?php echo $dis[0]=='비공개'?' active':'' ?>" href="#" data-display="<?php echo $i ?>">
|
||||
<i class="material-icons mr-1 f16 align-middle" aria-hidden="true"><?php echo $dis[1]?></i> <?php echo $dis[0]?>
|
||||
</a>
|
||||
<?php $i++;endforeach?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">취소</button>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<span class="not-loading">
|
||||
저장
|
||||
</span>
|
||||
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i>저장 중 ...</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- nestable : https://github.com/dbushell/Nestable -->
|
||||
<?php getImport('nestable','jquery.nestable',false,'js') ?>
|
||||
|
||||
<!-- bootstrap-maxlength -->
|
||||
<?php getImport('bootstrap-maxlength','bootstrap-maxlength.min',false,'js')?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var f = document.getElementById("listAddForm")
|
||||
var form = $('#listAddForm');
|
||||
var modal = $('#modal-list-new');
|
||||
|
||||
putCookieAlert('list_action_result') // 실행결과 알림 메시지 출력
|
||||
|
||||
function listCheck(f) {
|
||||
var name = modal.find('[name="name"]')
|
||||
if (!name.val()) {
|
||||
name.addClass('is-invalid').focus();
|
||||
return false
|
||||
}
|
||||
modal.find('[type="submit"]').attr('disabled',true)
|
||||
getIframeForAction(f);
|
||||
setTimeout(function(){
|
||||
form.submit()
|
||||
}, 500);
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#nestable-list').nestable({
|
||||
maxDepth : 0
|
||||
});
|
||||
$('.dd').on('change', function() {
|
||||
var f = document.getElementById("nestableForm");
|
||||
getIframeForAction(f);
|
||||
f.submit();
|
||||
});
|
||||
|
||||
$('input.rb-title').maxlength({
|
||||
alwaysShow: true,
|
||||
threshold: 10,
|
||||
warningClass: "label label-success",
|
||||
limitReachedClass: "label label-danger",
|
||||
});
|
||||
|
||||
modal.on('shown.bs.modal', function () {
|
||||
var modal = $(this);
|
||||
modal.find('.form-control').val('').trigger('focus')
|
||||
})
|
||||
|
||||
modal.find('.dropdown').on('hidden.bs.dropdown', function () {
|
||||
modal.find('.form-control').trigger('focus')
|
||||
})
|
||||
|
||||
//공개상태 변경 dropdown
|
||||
$('[data-toggle="display"] .dropdown-item').click(function(){
|
||||
var button = $(this)
|
||||
var dropdown = button.closest('[data-toggle="display"]');
|
||||
var display = button.attr('data-display');
|
||||
var uid = dropdown.attr('data-uid');
|
||||
var label = button.attr('data-label');
|
||||
|
||||
dropdown.find('.dropdown-item').removeClass('active');
|
||||
button.addClass('active');
|
||||
dropdown.find('.dropdown-toggle').text(label);
|
||||
|
||||
$.post(rooturl+'/?r='+raccount+'&m=post&a=regis_list',{
|
||||
uid : uid,
|
||||
display : display,
|
||||
type : 'display'
|
||||
},function(response,status){
|
||||
if(status=='success'){
|
||||
$.notify({message: '공개상태가 변경되었습니다.'},{type: 'success'});
|
||||
} else {
|
||||
alert(status);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 새 리스트 모달 내부 공개범위 설정 dropdown
|
||||
modal.find('.dropdown-item').click(function(){
|
||||
var item = $(this);
|
||||
var display = item.attr('data-display');
|
||||
var label = item.html();
|
||||
modal.find('.dropdown-item').removeClass('active')
|
||||
item.addClass('active');
|
||||
modal.find('[name="display"]').val(display);
|
||||
modal.find('[data-toggle="dropdown"]').html(label);
|
||||
});
|
||||
|
||||
// 툴바
|
||||
$('[name="toolbarForm"] .dropdown-item').click(function(){
|
||||
var form = $('[name="toolbarForm"]');
|
||||
var value = $(this).attr('data-value');
|
||||
var role = $(this).closest('.dropdown').attr('data-role');
|
||||
form.find('[name="'+role+'"]').val(value)
|
||||
form.submit();
|
||||
});
|
||||
|
||||
// marks.js
|
||||
$('[data-plugin="markjs"]').mark("<?php echo $keyword ?>");
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,600 @@
|
||||
<?php
|
||||
$g['postVarForSite'] = $g['path_var'].'site/'.$r.'/post.var.php';
|
||||
$svfile = file_exists($g['postVarForSite']) ? $g['postVarForSite'] : $g['path_module'].'post/var/var.php';
|
||||
include_once $svfile;
|
||||
|
||||
$LIST=getDbData($table['postlist'],"id='".$id."'",'*');
|
||||
|
||||
$sort = $sort ? $sort : 'gid';
|
||||
$orderby= $orderby ? $orderby : 'asc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 20;
|
||||
$listque = 'list='.$LIST['uid'].' and site='.$s;
|
||||
$TCD = getDbArray($table['postlist_index'],$listque,'*',$sort,$orderby,$recnum,$p);
|
||||
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = getDbData($table['postdata'],'uid='.$_R['data'],'*');
|
||||
|
||||
$NUM = getDbRows($table['postlist_index'],$listque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
$g['post_reset'] = RW('mod=dashboard&page='.$page.'&id='.$id);
|
||||
$g['post_base'] = $g['s'].'/?'.($_HS['usescode']?'r='.$r.'&':'').'m=post';
|
||||
$g['post_list'] = $g['post_reset'].getLinkFilter('',array('recnum'));
|
||||
$g['pagelink'] = $g['post_list'];
|
||||
$g['post_action']= $g['post_base'].'&a=';
|
||||
$g['post_list_delete']= $g['post_action'].'deletelist&uid=';
|
||||
$g['listindex_delete']= $g['post_action'].'deletelistindex&uid=';
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-between align-items-center subhead border-bottom border-dark ">
|
||||
<h3 class="mb-0">
|
||||
리스트 수정
|
||||
</h3>
|
||||
<div class="">
|
||||
<a href="<?php echo $g['post_list_delete'].$LIST['uid']?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 삭제하시겠습니까?');" class="btn btn-white">
|
||||
삭제
|
||||
</a>
|
||||
<a href="<?php echo RW('mod=dashboard&page=list')?>" class="btn btn-white">목록</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-8">
|
||||
|
||||
<div class="py-4">
|
||||
|
||||
<div class="media">
|
||||
<span class="position-relative mr-3">
|
||||
<img src="<?php echo getPreviewResize(getListImageSrc($LIST['uid']),'300x168') ?>" class="" alt="..." style="width:180px">
|
||||
<span class="list_mask">
|
||||
<span class="txt"><?php echo $LIST['num']?><i class="fa fa-list-ul d-block" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<div class="media-body">
|
||||
|
||||
<div class="list-header">
|
||||
<div class="list-header-show">
|
||||
|
||||
<div class="d-flex">
|
||||
<h5 class="mt-0">
|
||||
<?php echo $LIST['name'] ?>
|
||||
</h5>
|
||||
<div class="ml-auto">
|
||||
<a href="#" class="badge badge-light edit" data-toggle="tooltip" title="리스트명 수정"><i class="fa fa-pencil" aria-hidden="true"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<span class="text-muted font-weight-light f13">업데이트: <time data-plugin="timeago" datetime="<?php echo getDateFormat($LIST['d_last'],'c')?>"></time></span>
|
||||
</div>
|
||||
|
||||
<div class="list-header-edit">
|
||||
<form class="form-inline" action="<?php echo $g['s']?>/" method="post" id="listName" onsubmit="return false">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="post">
|
||||
<input type="hidden" name="a" value="regis_list">
|
||||
<input type="hidden" name="type" value="name">
|
||||
<input type="hidden" name="uid" value="<?php echo $LIST['uid']?>">
|
||||
<label class="sr-only" for="">리스트명</label>
|
||||
<input type="text" name="name" class="form-control mb-2 mr-sm-2 mb-sm-0 bg-white" placeholder="제목을 작성하세요." value="<?php echo $LIST['name']?>" style="width:300px">
|
||||
|
||||
<button type="button" class="btn btn-light" data-act="submit">
|
||||
<span class="not-loading">저장</span>
|
||||
<span class="is-loading">
|
||||
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-link cancle">취소</button>
|
||||
</form>
|
||||
</div><!-- /.list-header-edit -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 간단설명 -->
|
||||
<section id="list-review" class="list-section mb-2<?php echo $LIST['review']?'':' empty' ?>">
|
||||
<header class="pb-2 mb-3 border-bottom d-flex justify-content-between align-items-end">
|
||||
<span class="font-weight-light text-muted f13">한줄소개</span>
|
||||
<button type="button" class="badge badge-light js-edit" data-role="has-section" data-toggle="tooltip" title="한줄소개 수정">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</button>
|
||||
<div class="list-section-edit">
|
||||
<button type="button" class="btn btn-light btn-sm" data-act="section-edit" data-submit="review" data-msg="리스트 한줄소개">
|
||||
<span class="not-loading">저장</span>
|
||||
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 저장중 ...</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-link btn-sm muted-link js-cancle">취소</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="list-section-show">
|
||||
<div data-role="has-section">
|
||||
<blockquote data-role="list-article" class="font-weight-light f14">
|
||||
<?php echo nl2br($LIST['review']) ?>
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
<div class="notice f14 text-muted list-section-show" data-role="empty-section">
|
||||
<blockquote class="font-italic text-muted font-weight-light">
|
||||
이 리스트의 내용을 알수 있는 하나의 문장을 작성해보세요.
|
||||
<button type="button" class="btn btn-link btn-sm js-edit" role="button">
|
||||
작성하기
|
||||
</button>
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
</div><!-- /.project-review-show -->
|
||||
|
||||
<div class="list-section-edit">
|
||||
|
||||
<div class="notice">
|
||||
<blockquote class="font-italic text-muted font-weight-light mb-2">
|
||||
이 리스트의 내용을 알수 있는 하나의 문장을 작성해보세요.
|
||||
</blockquote>
|
||||
</div>
|
||||
<textarea class="form-control" name="review" rows="2" placeholder="내용 입력"><?php echo $LIST['review']?></textarea>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<div class="d-flex align-items-center pt-4 pb-3" role="filter">
|
||||
<div class="form-inline">
|
||||
|
||||
<label class="mt-1 mr-2 sr-only">상태</label>
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-white dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
출력수 : <?php echo $recnum ?>개
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu shadow-sm" aria-labelledby="dropdownMenuLink">
|
||||
<a class="dropdown-item d-flex justify-content-between align-items-center<?php echo $recnum==20?' active':'' ?>" href="<?php echo $g['post_reset'] ?>&recnum=20">
|
||||
20개
|
||||
</a>
|
||||
<a class="dropdown-item d-flex justify-content-between align-items-center<?php echo $recnum==30?' active':'' ?>" href="<?php echo $g['post_reset'] ?>&recnum=30">
|
||||
30개
|
||||
</a>
|
||||
<a class="dropdown-item d-flex justify-content-between align-items-center<?php echo $recnum==40?' active':'' ?>" href="<?php echo $g['post_reset'] ?>&recnum=40">
|
||||
40개
|
||||
</a>
|
||||
<a class="dropdown-item d-flex justify-content-between align-items-center<?php echo $recnum==50?' active':'' ?>" href="<?php echo $g['post_reset'] ?>&recnum=50">
|
||||
50개
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<form id="nestableForm" action="<?php echo $g['s']?>/" method="post" target="_action_frame_<?php echo $m?>">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="post">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="type" value="post">
|
||||
<input type="hidden" name="a" value="modifygid">
|
||||
|
||||
<div class="dd" id="nestable-post">
|
||||
|
||||
<ul class="dd-list list-unstyled" style="margin-top: -1rem">
|
||||
|
||||
<?php $_i=1;foreach($RCD as $R):?>
|
||||
<li class="media mt-2 serial dd-item bg-light p-3" data-id="<?php echo $_i?>">
|
||||
<input type="checkbox" name="listmembers[]" value="<?php echo $R['uid']?>" checked class="d-none">
|
||||
<span class="dd-handle pr-3 align-self-center">
|
||||
<i class="fa fa-arrows" aria-hidden="true"></i>
|
||||
</span>
|
||||
<a href="<?php echo getPostLink($R,1) ?>" class="position-relative mr-3" target="_blank">
|
||||
<img src="<?php echo getPreviewResize(getUpImageSrc($R),'130x73') ?>" alt="">
|
||||
<time class="badge badge-dark rounded-0 position-absolute f14" style="right:1px;bottom:1px"><?php echo getUpImageTime($R) ?></time>
|
||||
</a>
|
||||
|
||||
<div class="media-body">
|
||||
<h6 class="my-1">
|
||||
<a href="<?php echo getPostLink($R,1) ?>" class="text-reset text-decoration-none" target="_blank"><?php echo stripslashes($R['subject'])?></a>
|
||||
</h6>
|
||||
<div class="mb-1">
|
||||
<span class="badge badge-secondary"><?php echo $R['display']!=5?$g['displaySet']['label'][$R['display']]:'' ?></span>
|
||||
<ul class="list-inline d-inline-block ml-2 f13 text-muted">
|
||||
<li class="list-inline-item">조회 <?php echo $R['hit']?> </li>
|
||||
<li class="list-inline-item">추천 <?php echo $R['likes']?> </li>
|
||||
<li class="list-inline-item">댓글 <?php echo $R['comment']?> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-white btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="min-width: 5rem">
|
||||
관리
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right" style="min-width: 5rem">
|
||||
<a class="dropdown-item" href="<?php echo $g['listindex_delete'].$R['uid'].'&listid='.$id?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 제외 하시겠습니까?');">제외</a>
|
||||
<a class="dropdown-item" href="<?php echo RW('m=post&mod=write&cid='.$R['cid']) ?>" >수정</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php $_i++;endforeach?>
|
||||
|
||||
<?php if(!$NUM):?>
|
||||
<li>
|
||||
<div class="text-center text-muted p-5">포스트가 없습니다.</div>
|
||||
</li>
|
||||
<?php endif?>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div><!-- /.dd -->
|
||||
|
||||
</form>
|
||||
|
||||
<div class="d-flex justify-content-between my-4">
|
||||
<div class=""></div>
|
||||
|
||||
<?php if ($NUM > $recnum): ?>
|
||||
<ul class="pagination mb-0">
|
||||
<?php echo getPageLink(10,$p,$TPG,'')?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div><!-- /.col-9 -->
|
||||
<div class="col-4 border-left">
|
||||
|
||||
<div class="sidebar-item mt-3">
|
||||
<div class="form-group">
|
||||
<label class="small text-muted">리스트 URL</label>
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control" value="<?php echo $g['url_root'].getListLink($LIST,0) ?>" readonly id="_url_">
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-white js-clipboard js-tooltip" title="클립보드에 복사" data-clipboard-target="#_url_">
|
||||
<i class="fa fa-clone" aria-hidden="true"></i>
|
||||
</button>
|
||||
<a class="btn btn-white" href="<?php echo getListLink($LIST,0) ?>" target="_blank" data-toggle="tooltip" title="최종화면">
|
||||
<i class="fa fa-share" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.sidebar-item -->
|
||||
|
||||
<div class="sidebar-item mt-3" data-role="display">
|
||||
<button class="btn btn-link btn-block text-left px-0 text-reset text-decoration-none" type="button" data-toggle="dropdown">
|
||||
<span class="d-flex justify-content-between small text-muted">
|
||||
공개상태
|
||||
<i class="fa fa-cog fa-lg" aria-hidden="true"></i>
|
||||
</span>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right shadow py-0" style="width:300px;line-height: 1.2">
|
||||
|
||||
<div class="list-group list-group-flush">
|
||||
<button type="button" class="list-group-item list-group-item-action<?php echo !$R['display']?' active':'' ?>" data-icon="<?php echo $g['displaySet']['icon'][1] ?>" data-display="1">
|
||||
<div class="media align-items-center">
|
||||
<i class="material-icons mr-3 f28" aria-hidden="true"><?php echo $g['displaySet']['icon'][1]?></i>
|
||||
<div class="media-body">
|
||||
<span data-heading><?php echo $g['displaySet']['label'][1] ?></span><br>
|
||||
<small data-description>나만 볼수 있음</small>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button" class="list-group-item list-group-item-action<?php echo $R['display']==3?' active':'' ?>" data-icon="<?php echo $g['displaySet']['icon'][3] ?>" data-display="3">
|
||||
<div class="media align-items-center">
|
||||
<i class="material-icons mr-3 f28" aria-hidden="true"><?php echo $g['displaySet']['icon'][3]?></i>
|
||||
<div class="media-body">
|
||||
<span data-heading><?php echo $g['displaySet']['label'][3] ?></span><br>
|
||||
<small data-description>링크 있는 사용자만 볼 수 있음.<br>로그인 불필요</small>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button" class="list-group-item list-group-item-action<?php echo $R['display']==4?' active':'' ?>" data-icon="<?php echo $g['displaySet']['icon'][4] ?>" data-display="4">
|
||||
<div class="media align-items-center">
|
||||
<i class="material-icons mr-3 f28" aria-hidden="true"><?php echo $g['displaySet']['icon'][4]?></i>
|
||||
<div class="media-body">
|
||||
<span data-heading><?php echo $g['displaySet']['label'][4] ?></span><br>
|
||||
<small data-description>사이트 회원만 볼수 있음. 로그인 필요</small>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button" class="list-group-item list-group-item-action<?php echo $R['display']==5?' active':'' ?>" data-icon="<?php echo $g['displaySet']['icon'][5] ?>" data-display="5">
|
||||
<div class="media align-items-center">
|
||||
<i class="material-icons mr-3 f28" aria-hidden="true"><?php echo $g['displaySet']['icon'][5]?></i>
|
||||
<div class="media-body">
|
||||
<span data-heading><?php echo $g['displaySet']['label'][5] ?></span><br>
|
||||
<small data-description>모든 사용자가 검색하고 볼 수 있음</small>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<ul class="list-group list-group-flush f13 mt-1 item-body">
|
||||
<li class="list-group-item d-flex w-100 justify-content-between align-items-center px-0">
|
||||
<div class="media text-muted">
|
||||
<i class="material-icons mr-3 f48" aria-hidden="true" data-role="icon"></i>
|
||||
<div class="media-body align-self-center">
|
||||
<span data-role="heading"></span> <br><span class="f12" data-role="description"></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- /.sidebar-item -->
|
||||
|
||||
<div class="sidebar-item mt-4" data-role="tag">
|
||||
|
||||
<button class="btn btn-link btn-block text-left px-0 text-reset text-decoration-none" type="button" data-toggle="dropdown">
|
||||
<div class="d-flex justify-content-between small text-muted">
|
||||
태그
|
||||
<i class="fa fa-cog fa-lg" aria-hidden="true"></i>
|
||||
</div>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right bg-light shadow" style="width: 300px;">
|
||||
|
||||
<div class="dropdown-body p-2">
|
||||
<textarea class="form-control" name="tag" placeholder="검색태그를 입력해 주세요." rows="3"><?php echo $LIST['tag']?></textarea>
|
||||
<small class="form-text text-muted">이 리스트를 가장 잘 표현할 수 있는 단어를 콤마(,)로 구분해서 입력해 주세요.</small>
|
||||
</div>
|
||||
|
||||
<div class="dropdown-footer row p-2">
|
||||
<div class="col-6 pr-1">
|
||||
<button type="button" class="btn btn-light btn-block">취소</button>
|
||||
</div>
|
||||
<div class="col-6 pl-1">
|
||||
<button type="button" class="btn btn-primary btn-block" data-role="submit">
|
||||
<span class="not-loading">저장</span>
|
||||
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 저장중 ...</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mt-1 pt-3 border-top">
|
||||
<?php if($LIST['tag']):?>
|
||||
<?php $_tags=explode(',',$LIST['tag'])?>
|
||||
<?php $_tagn=count($_tags)?>
|
||||
<?php $i=0;for($i = 0; $i < $_tagn; $i++):?>
|
||||
<?php $_tagk=trim($_tags[$i])?>
|
||||
<a class="badge badge-light" href="<?php echo RW('m=post&mod=keyword&') ?>keyword=<?php echo urlencode($_tagk)?>">
|
||||
<?php echo $_tagk?>
|
||||
</a>
|
||||
<?php endfor?>
|
||||
<?php else: ?>
|
||||
<div class="text-center small text-muted py-5">
|
||||
태그가 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div>
|
||||
</div><!-- /.sidebar-item -->
|
||||
|
||||
</div><!-- /.col-3 -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- nestable : https://github.com/dbushell/Nestable -->
|
||||
<?php getImport('nestable','jquery.nestable',false,'js') ?>
|
||||
|
||||
<!-- 클립보드저장 : clipboard.js : https://github.com/zenorocha/clipboard.js-->
|
||||
<?php getImport('clipboard','clipboard.min','2.0.4','js') ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
putCookieAlert('listview_action_result') // 실행결과 알림 메시지 출력
|
||||
|
||||
function setPostDisplay(display) {
|
||||
var section = $('[data-role="display"]');
|
||||
var button = section.find('.list-group-item[data-display="'+display+'"]')
|
||||
var icon = button.attr('data-icon');
|
||||
var heading = button.find('[data-heading]').text();
|
||||
var description = button.find('[data-description]').html();
|
||||
section.find('.list-group-item').removeClass('active'); // 상태초기화
|
||||
button.addClass('active');
|
||||
section.find('[data-role="icon"]').text(icon);
|
||||
section.find('[data-role="heading"]').text(heading);
|
||||
section.find('[data-role="description"]').html(description);
|
||||
section.removeClass('d-none')
|
||||
}
|
||||
|
||||
// Textarea 또는 Input의 끝으로 커서 이동
|
||||
jQuery.fn.putCursorAtEnd = function() {
|
||||
return this.each(function() {
|
||||
var $el = $(this),
|
||||
el = this;
|
||||
if (!$el.is(":focus")) {
|
||||
$el.focus();
|
||||
}
|
||||
if (el.setSelectionRange) {
|
||||
var len = $el.val().length * 2;
|
||||
setTimeout(function() {
|
||||
el.setSelectionRange(len, len);
|
||||
}, 1);
|
||||
} else {
|
||||
$el.val($el.val());
|
||||
}
|
||||
this.scrollTop = 999999;
|
||||
});
|
||||
};
|
||||
|
||||
var title = document.title;
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
setPostDisplay(<?php echo $LIST['display'] ?>) // 현재 공개상태 셋팅
|
||||
|
||||
// dropdown 내부클릭시 dropdown 유지
|
||||
$('.dropdown-body, .dropdown-footer [data-role="submit"]').on('click', function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
// 태그입력
|
||||
$('[data-role="tag"]').on('show.bs.dropdown', function () {
|
||||
setTimeout(function(){
|
||||
$('[data-role="tag"]').find('[name="tag"]').focus().putCursorAtEnd()
|
||||
}, 100);
|
||||
})
|
||||
|
||||
$('[data-role="tag"]').find('[data-role="submit"]').click(function(){
|
||||
var tag = $('[name="tag"]').val()
|
||||
$(this).attr( 'disabled', true );
|
||||
setTimeout(function(){
|
||||
$.post(rooturl+'/?r='+raccount+'&m=post&a=regis_list',{
|
||||
tag : tag,
|
||||
type : 'tag',
|
||||
uid : <?php echo $LIST['uid']?>
|
||||
},function(response,status){
|
||||
if(status=='success'){
|
||||
location.reload();
|
||||
}else{
|
||||
alert(status);
|
||||
}
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
|
||||
var clipboard = new ClipboardJS('.js-clipboard');
|
||||
|
||||
clipboard.on('success', function (e) {
|
||||
$(e.trigger)
|
||||
.attr('title', '복사완료!')
|
||||
.tooltip('_fixTitle')
|
||||
.tooltip('show')
|
||||
.attr('title', '클립보드 복사')
|
||||
.tooltip('_fixTitle')
|
||||
|
||||
e.clearSelection()
|
||||
})
|
||||
|
||||
$('[data-role="display"] .dropdown-menu .list-group-item').click(function(){
|
||||
var button = $(this)
|
||||
var display = button.attr('data-display');
|
||||
setPostDisplay(display) // 공개상태 변경
|
||||
|
||||
$.post(rooturl+'/?r='+raccount+'&m=post&a=regis_list',{
|
||||
uid : <?php echo $LIST['uid']?>,
|
||||
display : display,
|
||||
type : 'display'
|
||||
},function(response,status){
|
||||
if(status=='success'){
|
||||
$.notify({message: '공개상태가 변경되었습니다.'},{type: 'success'});
|
||||
} else {
|
||||
alert(status);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// 리스트 제목(타이틀)수정
|
||||
$('.list-header .edit').click(function(){
|
||||
$('.list-header').addClass('edit');
|
||||
$('.list-header').find('[name="name"]').focus().putCursorAtEnd() ;
|
||||
document.title = '수정중 · '+ title;
|
||||
});
|
||||
$('.list-header .cancle').click(function(){
|
||||
$('.list-header').removeClass('edit')
|
||||
document.title = title;
|
||||
});
|
||||
|
||||
$('#nestable-post').nestable({
|
||||
maxDepth : 0
|
||||
});
|
||||
$('.dd').on('change', function() {
|
||||
var f = document.getElementById("nestableForm");
|
||||
getIframeForAction(f);
|
||||
f.submit();
|
||||
});
|
||||
|
||||
$('#listName').find('[data-act="submit"]').click(function(e){
|
||||
var button = $(this)
|
||||
var f = document.getElementById("listName");
|
||||
button.attr( 'disabled', true );
|
||||
setTimeout(function(){
|
||||
getIframeForAction(f);
|
||||
f.submit();
|
||||
}, 200);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 프로젝트 섹션 수정
|
||||
$('.list-section .js-edit').click(function(){
|
||||
var section = $(this).closest('.list-section')
|
||||
$('[data-role="empty-section"]').removeClass('animated fadeIn delay-1')
|
||||
$('.list-section').removeClass('open') // 전체 초기화
|
||||
|
||||
$(this).parents('.list-section').find('.js-edit').addClass('d-none');
|
||||
$(this).parents('.list-section').addClass('open');
|
||||
$(this).parents('.list-section').find('textarea').focus().putCursorAtEnd() ;
|
||||
autosize.update($('textarea'));
|
||||
document.title = '수정중 · '+ title;
|
||||
});
|
||||
|
||||
$('.list-section .js-cancle').click(function(){
|
||||
$('.list-section').removeClass('open')
|
||||
$(this).parents('.list-section').find('.js-edit').removeClass('d-none');
|
||||
document.title = title;
|
||||
});
|
||||
|
||||
// 본문입력 textarea 자동 높이 조정
|
||||
autosize($('textarea'));
|
||||
|
||||
// 섹션 수정
|
||||
$('.list-section-edit').find('[data-act="section-edit"]').click(function(){
|
||||
var section = $(this).closest('.list-section')
|
||||
var type = $(this).attr('data-submit')
|
||||
var msg = $(this).attr('data-msg')
|
||||
var content = section.find('textarea').val()
|
||||
var button = $(this)
|
||||
var article = section.find('[data-role="list-article"]')
|
||||
var empty = section.find('[data-role="empty-section"]')
|
||||
button.attr('disabled',true)
|
||||
|
||||
setTimeout(function(){
|
||||
$.post(rooturl+'/?r='+raccount+'&m=post&a=regis_list',{
|
||||
content : content,
|
||||
type : 'review',
|
||||
uid : <?php echo $LIST['uid']?>
|
||||
},function(response,status){
|
||||
if(status=='success'){
|
||||
var result = $.parseJSON(response);
|
||||
var content=result.content;
|
||||
section.removeClass('open')
|
||||
section.find('.js-edit').removeClass('d-none');
|
||||
if (content) {
|
||||
section.removeClass('empty')
|
||||
article.html(content).addClass('animated fadeIn delay-1')
|
||||
} else {
|
||||
article.html('')
|
||||
section.addClass('empty')
|
||||
empty.addClass('animated fadeIn delay-1')
|
||||
}
|
||||
document.title = title;
|
||||
button.attr('disabled',false)
|
||||
$.notify({message: msg+'가 수정되었습니다.'},{type: 'success'})
|
||||
|
||||
}else{
|
||||
alert(status);
|
||||
}
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,72 @@
|
||||
<div class="p-3">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
|
||||
<?php if ($d['post']['writeperm']): ?>
|
||||
<section>
|
||||
<?php include $g['dir_module_skin'].'_recentPost.php';?>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="mt-4">
|
||||
<?php include $g['dir_module_skin'].'_recentList.php';?>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="col-6">
|
||||
|
||||
<?php if ($d['post']['writeperm']): ?>
|
||||
<section>
|
||||
<header class="d-flex justify-content-between align-items-center py-2">
|
||||
<strong>포스트 현황</strong>
|
||||
</header>
|
||||
|
||||
<ul class="list-group list-group-horizontal text-center text-muted shadow-sm">
|
||||
<li class="list-group-item flex-fill">
|
||||
<small>포스트</small>
|
||||
<a href="<?php echo RW('mod=dashboard&page=post')?>" class="d-block h2 my-2 text-reset text-decoration-none">
|
||||
<?php echo number_format($my['num_post']) ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-group-item flex-fill">
|
||||
<small>구독자</small>
|
||||
<a href="<?php echo RW('mod=dashboard&page=follower')?>" class="d-block h2 my-2 text-reset text-decoration-none">
|
||||
<?php echo number_format($my['num_follower']) ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-group-item flex-fill">
|
||||
<small>누적 조회수</small>
|
||||
<span class="d-block h2 my-2">
|
||||
<?php echo number_format($my['hit_post']) ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item flex-fill">
|
||||
<small>누적 좋아요</small>
|
||||
<span class="d-block h2 my-2">
|
||||
<?php echo number_format($my['likes_post']) ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item flex-fill">
|
||||
<small>누적 싫어요</small>
|
||||
<span class="d-block h2 my-2">
|
||||
<?php echo number_format($my['dislikes_post']) ?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="mt-3">
|
||||
<?php include $g['dir_module_skin'].'_chart.php';?>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="mt-3">
|
||||
<?php include $g['dir_module_skin'].'_best.php';?>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
|
||||
</div>
|
||||
|
||||
<?php include $g['path_module'].'post/mod/_component.desktop.php';?>
|
||||
328
modules/member/themes/_desktop/bs4-default/dashboard/noti.php
Normal file
328
modules/member/themes/_desktop/bs4-default/dashboard/noti.php
Normal file
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'desc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
|
||||
|
||||
$sqlque = 'mbruid='.$my['uid'];
|
||||
if ($module) $sqlque .= " and frommodule='".$module."'";
|
||||
if ($fromsys) $sqlque .= " and frommbr=0";
|
||||
|
||||
$RCD = getDbArray($table['s_notice'],$sqlque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_notice'],$sqlque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
$g['page_reset'] = RW('mod=dashboard&page='.$page);
|
||||
$g['page_list'] = $g['page_reset'].getLinkFilter('',array($module?'module':''));
|
||||
$g['pagelink'] = $g['page_list'];
|
||||
|
||||
//모든 알림 읽음처리
|
||||
getDbUpdate($table['s_notice'],"d_read='".$date['totime']."'",$sqlque);
|
||||
getDbUpdate($table['s_mbrdata'],'num_notice=0','memberuid='.$my['uid']);
|
||||
|
||||
$MD = getDbData($table['s_module'],"id='".$module."'",'name');
|
||||
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="subhead d-flex justify-content-between align-items-center">
|
||||
<h2 class="mb-0">
|
||||
알림내역
|
||||
</h2>
|
||||
|
||||
<div class="">
|
||||
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=notification&a=multi_delete_user&deltype=delete_all" class="btn btn-white" onclick="return hrefCheck(this,true,'정말로 전체 알림 삭제를 하시겠습니까?');">
|
||||
<i class="fa fa-trash-o fa-fw" aria-hidden="true"></i>
|
||||
알림함 비우기
|
||||
</a>
|
||||
|
||||
<a href="<?php echo RW('mod=settings&page=noti')?>" class="btn btn-white">
|
||||
<i class="fa fa-cog fa-fw" aria-hidden="true"></i>
|
||||
알림 설정
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center border-top border-dark pt-4 pb-3" role="filter">
|
||||
<span class="f18">전체 <span class="text-primary"><?php echo number_format($NUM)?></span> 개</span>
|
||||
<div class="form-inline ml-auto">
|
||||
<label class="mt-1 mr-2 sr-only">모듈별</label>
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-white dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<?php echo $module?$MD['name']:($fromsys=='Y'?'시스템':'전체') ?>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu shadow-sm" aria-labelledby="dropdownMenuLink">
|
||||
<a class="dropdown-item d-flex justify-content-between align-items-center" href="<?php echo $g['page_reset']?>">
|
||||
전체
|
||||
<small><?php echo number_format(getDbRows($table['s_notice'],'mbruid='.$my['uid']))?></small>
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item d-flex justify-content-between align-items-center" href="<?php echo $g['page_reset'] ?>&fromsys=Y">
|
||||
시스템
|
||||
<small><?php echo number_format(getDbRows($table['s_notice'],'mbruid='.$my['uid'].' and frommbr=0'))?></small>
|
||||
</a>
|
||||
|
||||
<?php $_MODULES=getDbArray($table['s_module'],'','*','gid','asc',0,1)?>
|
||||
<?php while($_MD=db_fetch_array($_MODULES)):?>
|
||||
<a class="dropdown-item <?php echo $module==$_MD['id']?' active ':'' ?><?php if(strstr($d['ntfc']['cut_modules'],'['.$_MD['id'].']')):?>d-none<?php else: ?>d-flex justify-content-between align-items-center<?php endif?>"
|
||||
href="<?php echo $g['page_reset']?>&module=<?php echo $_MD['id']?>" id="module_members_<?php echo $_MD['id']?>">
|
||||
<?php echo $_MD['name']?>
|
||||
<small class="ml-auto"><?php echo number_format(getDbRows($table['s_notice'],'mbruid='.$my['uid'].' and frommodule="'.$_MD['id'].'"'))?></small>
|
||||
</a>
|
||||
<?php endwhile?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.flex -->
|
||||
|
||||
|
||||
<form name="listForm" action="<?php echo $g['s']?>/" method="post">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="notification">
|
||||
<input type="hidden" name="a" value="">
|
||||
<input type="hidden" name="deltype" value="">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<?php if($NUM):?>
|
||||
<div class="card-header py-2">
|
||||
<section class="d-flex justify-content-between align-items-center">
|
||||
<div class="">
|
||||
<div class="custom-control custom-checkbox mr-3" data-toggle="tooltip" title="전체선택">
|
||||
<input type="checkbox" class="custom-control-input js-checkAll" id="checkAll">
|
||||
<label class="custom-control-label" for="checkAll" data-role="checked-num"></label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<fieldset disabled data-role="actions">
|
||||
<button type="button" class="btn btn-light btn-sm" onclick="actCheck('multi_delete_user','cut_member');">
|
||||
<i class="fa fa-ban fa-fw fa-lg" aria-hidden="true"></i>
|
||||
보낸회원 차단
|
||||
</button>
|
||||
<button type="button" class="btn btn-light btn-sm" onclick="actCheck('multi_delete_user','cut_module');">
|
||||
<i class="fa fa-ban fa-fw fa-lg" aria-hidden="true"></i>
|
||||
보낸곳 차단
|
||||
</button>
|
||||
<button type="button" class="btn btn-light btn-sm" onclick="actCheck('multi_delete_user','delete_select');">
|
||||
<i class="fa fa-trash fa-fw fa-lg" aria-hidden="true"></i>
|
||||
삭제
|
||||
</button>
|
||||
</fieldset>
|
||||
</section>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
<ul class="list-group list-group-flush">
|
||||
<?php $_i=0;while($R=db_fetch_array($RCD)):?>
|
||||
<?php $SM1=$R['mbruid']?getDbData($table['s_mbrdata'],'memberuid='.$R['mbruid'],'name,nic'):array()?>
|
||||
<?php $SM2=$R['frommbr']?getDbData($table['s_mbrdata'],'memberuid='.$R['frommbr'],'memberuid,name,nic'):array()?>
|
||||
<?php $MD = getDbData($table['s_module'],"id='".$R['frommodule']."'",'icon'); ?>
|
||||
<?php $avatar =$R['frommbr']?getAvatarSrc($SM2['memberuid'],'42'):'/_core/images/touch/homescreen-42x42.png' ?>
|
||||
<li class="list-group-item d-flex list-group-item-action ">
|
||||
|
||||
<div class="custom-control custom-checkbox mr-3">
|
||||
<input type="checkbox" class="custom-control-input" name="noti_members[]" id="item-<?php echo $R['uid']?>" onclick="checkboxCheck();" value="<?php echo $R['uid']?>|<?php echo $R['frommbr']?>|<?php echo $R['frommodule']?>">
|
||||
<label class="custom-control-label" for="item-<?php echo $R['uid']?>"></label>
|
||||
</div>
|
||||
|
||||
<div class="media w-100">
|
||||
<a class="mr-3 position-relative" href="<?php echo getProfileLink($SM2['memberuid']) ?>"
|
||||
data-toggle="getMemberLayer"
|
||||
data-mbruid="<?php echo $SM2['memberuid'] ?>">
|
||||
<img class="rounded " src="<?php echo $avatar ?>" alt="" width=42>
|
||||
<?php if ($R['frommbr']): ?>
|
||||
<i class="<?php echo $MD['icon'] ?> bg-primary text-white position-absolute noti-mobule-badge"></i>
|
||||
<?php endif?>
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<div class="d-flex w-100 justify-content-between mb-1">
|
||||
<h5 class="my-0">
|
||||
<?php if($SM2['name']):?>
|
||||
<a class="f15 muted-link" href="<?php echo getProfileLink($SM2['memberuid']) ?>"
|
||||
data-toggle="getMemberLayer"
|
||||
data-mbruid="<?php echo $SM2['memberuid'] ?>">
|
||||
<?php echo $R['title']?> <?php echo $SM2[$_HS['nametype']]?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<?php echo $R['title']?> <span class="badge badge-pill badge-light">시스템</span>
|
||||
<?php endif?>
|
||||
</h5>
|
||||
<div class="">
|
||||
<?php if(getNew($R['d_regis'],24)):?><small class="rb-new align-text-top"></small><?php endif?>
|
||||
<time class="small text-muted" data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_regis'],'c')?>" data-toggle="tooltip" title="<?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?>">
|
||||
</time>
|
||||
</div>
|
||||
</div>
|
||||
<p class="mb-0">
|
||||
<?php echo getStrCut($R['message'],200,'..')?>
|
||||
<?php if (strlen($R['message'])>200): ?>
|
||||
<a class="ml-2 badge badge-light"
|
||||
data-toggle="modal" href="#modal-noti"
|
||||
data-uid="<?php echo $R['uid'] ?>"
|
||||
data-from="<?php echo $SM2[$_HS['nametype']] ?>">
|
||||
자세히
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
||||
<?php if ($R['referer']): ?>
|
||||
<a href="<?php echo $R['referer']?>" target="_blank" class="badge badge-light"><?php echo $R['button']?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php $_i++;endwhile?>
|
||||
|
||||
<?php if(!$NUM):?>
|
||||
<li class="list-group-item">
|
||||
<div class="p-5 text-center text-muted">알림이 없습니다.</div>
|
||||
</li>
|
||||
<?php endif?>
|
||||
|
||||
</ul>
|
||||
</div><!-- /.card -->
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<div class="d-flex justify-content-center my-4">
|
||||
|
||||
<?php if($NUM > $recnum):?>
|
||||
<ul class="pagination mb-0">
|
||||
<?php echo getPageLink(10,$p,$TPG,'')?>
|
||||
</ul>
|
||||
<?php endif?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// 선택박스 체크시 액션버튼 활성화 함수
|
||||
function checkboxCheck() {
|
||||
var f = document.listForm;
|
||||
var l = document.getElementsByName('noti_members[]');
|
||||
var n = l.length;
|
||||
var i;
|
||||
var j=0;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if (l[i].checked == true){
|
||||
$(l[i]).parent().parent().addClass('list-group-item-checked'); // 선택된 체크박스 tr 강조표시
|
||||
j++;
|
||||
}else{
|
||||
$(l[i]).parent().parent().removeClass('list-group-item-checked');
|
||||
}
|
||||
}
|
||||
|
||||
if (j) {
|
||||
$('[data-role="checked-num"]').text(j+'개 선택됨')
|
||||
$('[data-role="actions"]').attr('disabled',false)
|
||||
$('#checkAll').prop('indeterminate', true)
|
||||
} else {
|
||||
$('[data-role="checked-num"]').text('')
|
||||
$('#checkAll').prop('indeterminate', false)
|
||||
$('[data-role="actions"]').attr('disabled',true)
|
||||
}
|
||||
|
||||
|
||||
// 하단 회원관리 액션 버튼 상태 변경
|
||||
if (j) $('#list-bottom-fset').prop("disabled",false);
|
||||
else $('#list-bottom-fset').prop("disabled",true);
|
||||
}
|
||||
|
||||
function actCheck(act,type) {
|
||||
var f = document.listForm;
|
||||
var l = document.getElementsByName('noti_members[]');
|
||||
var n = l.length;
|
||||
var j = 0;
|
||||
var i;
|
||||
|
||||
if (type == 'delete_all' || type == 'delete_read')
|
||||
{
|
||||
if (confirm('정말로 일괄 삭제하시겠습니까?'))
|
||||
{
|
||||
getIframeForAction(f);
|
||||
f.a.value = act;
|
||||
f.deltype.value = type;
|
||||
f.submit();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if(l[i].checked == true)
|
||||
{
|
||||
j++;
|
||||
}
|
||||
}
|
||||
if (!j)
|
||||
{
|
||||
alert('선택된 알림이 없습니다. ');
|
||||
return false;
|
||||
}
|
||||
|
||||
getIframeForAction(f);
|
||||
f.a.value = act;
|
||||
f.deltype.value = type;
|
||||
f.submit();
|
||||
}
|
||||
|
||||
$(function () {
|
||||
|
||||
putCookieAlert('member_noti_result') // 실행결과 알림 메시지 출력
|
||||
|
||||
// 선택박스 체크 이벤트 핸들러
|
||||
$(".js-checkAll").click(function(){
|
||||
$('[name="noti_members[]"]').prop("checked",$(".js-checkAll").prop("checked"));
|
||||
checkboxCheck();
|
||||
$(this).prop('indeterminate', false)
|
||||
$('[data-toggle="tooltip"]').tooltip('hide')
|
||||
});
|
||||
|
||||
//게시물 목록에서 프로필 풍선(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");
|
||||
}
|
||||
}, 30);
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,8 @@
|
||||
<div class="container">
|
||||
<div class="subhead mt-0">
|
||||
<h2 class="subhead-heading">
|
||||
구매 내역
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
173
modules/member/themes/_desktop/bs4-default/dashboard/point.php
Normal file
173
modules/member/themes/_desktop/bs4-default/dashboard/point.php
Normal file
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
$vtype = $vtype ? $vtype : 'point';
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'desc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 10;
|
||||
|
||||
$sqlque = 'my_mbruid='.$my['uid'];
|
||||
if ($type == '1') $sqlque .= ' and price > 0';
|
||||
if ($type == '2') $sqlque .= ' and price < 0';
|
||||
if ($where && $keyword)
|
||||
{
|
||||
$sqlque .= getSearchSql($where,$keyword,$ikeyword,'or');
|
||||
}
|
||||
$RCD = getDbArray($table['s_'.$vtype],$sqlque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_'.$vtype],$sqlque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
$g['page_reset'] = RW('mod=dashboard&page='.$page);
|
||||
$g['page_list'] = $g['page_reset'].getLinkFilter('',array($type?'type':''));
|
||||
$g['pagelink'] = $g['page_list'];
|
||||
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center subhead mt-0">
|
||||
<h3 class="mb-0">
|
||||
포인트 내역 <span class="badge badge-pill badge-dark align-top"><?php echo number_format($my['point'])?> P</span>
|
||||
</h3>
|
||||
<div class="">
|
||||
<button type="button" class="btn btn-white" onclick="actCheck('point_sum');">내역정리</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center border-top border-dark pt-4 pb-3" role="filter">
|
||||
<span class="f18">전체 <span class="text-primary"><?php echo number_format($NUM)?></span> 건</span>
|
||||
<div class="form-inline ml-auto">
|
||||
|
||||
<label class="sr-only">상태</label>
|
||||
<form name="hideForm" action="<?php echo $g['page_reset']?>" method="get">
|
||||
<input type="hidden" name="page" value="<?php echo $page?>">
|
||||
|
||||
<select name="type" class="form-control custom-select" onchange="this.form.submit();">
|
||||
<option value="">구분 : 전체</option>
|
||||
<option value="1"<?php if($type=='1'):?> selected="selected"<?php endif?>>획득</option>
|
||||
<option value="2"<?php if($type=='2'):?> selected="selected"<?php endif?>>사용</option>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<form name="procForm" action="<?php echo $g['s']?>/" method="post" onsubmit="return submitCheck(this);">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="a" value="">
|
||||
<input type="hidden" name="pointType" value="<?php echo $vtype?>">
|
||||
|
||||
<table class="table table-hover mb-0 text-center">
|
||||
<colgroup>
|
||||
<col width="50">
|
||||
<col width="80">
|
||||
<col>
|
||||
<col width="150">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="side1">
|
||||
<i class="fa fa-check-square-o fa-lg" aria-hidden="true" onclick="chkFlag('members[]');" role="button" data-toggle="tooltip" title="전체선택"></i>
|
||||
</th>
|
||||
<th scope="col">금액</th>
|
||||
<th scope="col">내역</th>
|
||||
<th scope="col" class="side2">날짜</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="members[]" value="<?php echo $R['uid']?>" /></td>
|
||||
<td><?php echo ($R['price']>0?'+':'').number_format($R['price'])?></td>
|
||||
<td class="text-left">
|
||||
<?php echo $R['content']?>
|
||||
<?php if(getNew($R['d_regis'],24)):?><small class="text-danger">new</small><?php endif?>
|
||||
</td>
|
||||
<td><?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?></td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
|
||||
<?php if(!$NUM):?>
|
||||
<tr>
|
||||
<td><input type="checkbox" disabled="disabled" /></td>
|
||||
<td class="cat">-</td>
|
||||
<td class="sbj1">내역이 없습니다.</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<nav aria-label="Page navigation" class="d-flex justify-content-between my-4">
|
||||
<div>
|
||||
<button type="button" class="btn btn-white" onclick="actCheck('point_delete');">삭제</button>
|
||||
</div>
|
||||
|
||||
<?php if ($NUM > $recnum): ?>
|
||||
<ul class="pagination">
|
||||
<?php echo getPageLink(10,$p,$TPG,'')?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function submitCheck(f)
|
||||
{
|
||||
if (f.a.value == '')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function actCheck(act)
|
||||
{
|
||||
var f = document.procForm;
|
||||
var l = document.getElementsByName('members[]');
|
||||
var n = l.length;
|
||||
var j = 0;
|
||||
var i;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if(l[i].checked == true)
|
||||
{
|
||||
j++;
|
||||
}
|
||||
}
|
||||
if (!j)
|
||||
{
|
||||
alert('선택된 항목이 없습니다. ');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (act == 'saved_category')
|
||||
{
|
||||
if (getId('iCategory').style.display == 'inline')
|
||||
{
|
||||
if (f.category.value == '')
|
||||
{
|
||||
alert('지정하려는 분류명을 입력해 주세요. ');
|
||||
f.category.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
getId('iCategory').style.display = 'inline';
|
||||
f.category.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(confirm('정말로 실행하시겠습니까? '))
|
||||
{
|
||||
f.a.value = act;
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
347
modules/member/themes/_desktop/bs4-default/dashboard/post.php
Normal file
347
modules/member/themes/_desktop/bs4-default/dashboard/post.php
Normal file
@@ -0,0 +1,347 @@
|
||||
<?php
|
||||
$g['postVarForSite'] = $g['path_var'].'site/'.$r.'/post.var.php';
|
||||
$svfile = file_exists($g['postVarForSite']) ? $g['postVarForSite'] : $g['path_module'].'post/var/var.php';
|
||||
include_once $svfile;
|
||||
|
||||
if (!$d['post']['writeperm']) getLink('','','잘못된 접근입니다..','-1');
|
||||
|
||||
$sort = $sort ? $sort : 'gid';
|
||||
$orderby= $orderby ? $orderby : 'asc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
|
||||
$where = 'subject|review|tag';
|
||||
$postque = 'site='.$s;
|
||||
|
||||
if ($display) $postque .= ' and display='.$display;
|
||||
|
||||
if ($sort != 'gid') $orderby= 'desc';
|
||||
|
||||
if ($sort == 'gid' && !$keyword) {
|
||||
|
||||
$postque .= ' and mbruid='.$my['uid'];
|
||||
$NUM = getDbRows($table['postmember'],$postque);
|
||||
$TCD = getDbArray($table['postmember'],$postque,'gid',$sort,$orderby,$recnum,$p);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = getDbData($table['postdata'],'gid='.$_R['gid'],'*');
|
||||
|
||||
} else {
|
||||
|
||||
$postque .= getSearchSql('members','['.$my['uid'].']',$ikeyword,'or');
|
||||
|
||||
if ($where && $keyword) {
|
||||
if (strstr('[name][nic][id][ip]',$where)) $postque .= " and ".$where."='".$keyword."'";
|
||||
else if ($where == 'term') $postque .= " and d_regis like '".$keyword."%'";
|
||||
else $postque .= getSearchSql($where,$keyword,$ikeyword,'or');
|
||||
}
|
||||
|
||||
$NUM = getDbRows($table['postdata'],$postque);
|
||||
$TCD = getDbArray($table['postdata'],$postque,'*',$sort,$orderby,$recnum,$p);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = $_R;
|
||||
|
||||
}
|
||||
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
$g['post_base'] = $g['s'].'/?r='.$r.'&'.'m=post';
|
||||
$g['post_reset'] = RW('mod=dashboard&page='.$page);
|
||||
$g['post_list'] = $g['post_reset'].getLinkFilter('',array($sort!='gid'?'sort':'',$orderby!='asc'?'orderby':'',$display?'display':'',$keyword?'keyword':''));
|
||||
$g['pagelink'] = $g['post_list'];
|
||||
$g['post_view'] = $g['post_list'].'&mod=view&cid=';
|
||||
$g['post_write'] = $g['post_list'].'&mod=write';
|
||||
$g['post_modify']= $g['post_write'].'&cid=';
|
||||
$g['post_action']= $g['post_base'].'&a=';
|
||||
$g['post_delete']= $g['post_action'].'delete&cid=';
|
||||
|
||||
switch ($sort) {
|
||||
case 'gid' : $sort_txt='등록순';break;
|
||||
case 'd_modify' : $sort_txt='최신순';break;
|
||||
case 'hit' : $sort_txt='조회순';break;
|
||||
case 'likes' : $sort_txt='좋아요순';break;
|
||||
case 'comment' : $sort_txt='댓글순';break;
|
||||
default : $sort_txt='기본';break;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-between align-items-center subhead mt-0">
|
||||
<h3 class="mb-0">
|
||||
포스트 관리
|
||||
</h3>
|
||||
<div class="">
|
||||
<a href="<?php echo getProfileLink($my['uid']) ?><?php echo $_HS['rewrite']?'/':'&page=' ?>post" class="btn btn-white">
|
||||
<i class="fa fa-address-card-o fa-fw" aria-hidden="true"></i>
|
||||
프로필 이동
|
||||
</a>
|
||||
<?php if ($d['post']['writeperm']): ?>
|
||||
<a href="<?php echo RW('m=post&mod=write')?>" class="btn btn-primary">새 포스트</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center border-top border-dark pt-4 pb-3" role="filter">
|
||||
<span class="f18">전체 <span class="text-primary"><?php echo number_format($NUM)?></span> 개</span>
|
||||
<form name="toolbarForm" action="<?php echo $g['post_reset'] ?>" method="get" class="form-inline ml-auto">
|
||||
|
||||
<?php if (!$_HS['rewrite']): ?>
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="mod" value="dashboard">
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="sort" value="<?php echo $sort?>">
|
||||
<input type="hidden" name="display" value="<?php echo $display?>">
|
||||
|
||||
<div class="dropdown mr-2" data-role="sort">
|
||||
<a class="btn btn-white dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
정열 : <?php echo $sort_txt ?>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu shadow-sm">
|
||||
<button class="dropdown-item<?php echo $sort=='gid'?' active':'' ?>" type="button" data-value="gid">
|
||||
등록순
|
||||
</button>
|
||||
<button class="dropdown-item<?php echo $sort=='d_modify'?' active':'' ?>" type="button" data-value="d_modify">
|
||||
최신순
|
||||
</button>
|
||||
<button class="dropdown-item<?php echo $sort=='hit'?' active':'' ?>" type="button" data-value="hit">
|
||||
조회순
|
||||
</button>
|
||||
<button class="dropdown-item<?php echo $sort=='likes'?' active':'' ?>" type="button" data-value="likes">
|
||||
좋아요순
|
||||
</button>
|
||||
<button class="dropdown-item<?php echo $sort=='comment'?' active':'' ?>" type="button" data-value="comment">
|
||||
댓글순
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="sr-only">상태</label>
|
||||
<div class="dropdown" data-role="display">
|
||||
<a class="btn btn-white dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
상태 : <?php echo $display?$g['displaySet']['label'][$display]:'전체' ?>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu shadow-sm">
|
||||
<button class="dropdown-item d-flex justify-content-between align-items-center<?php echo !$display?' active':'' ?>" type="button">
|
||||
전체
|
||||
<small><?php echo number_format(getDbRows($table['postmember'],'mbruid='.$my['uid'].' and site='.$s))?></small>
|
||||
</button>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
<?php $displaySet=explode('||',$d['displaySet'])?>
|
||||
<?php $i=1;foreach($displaySet as $displayLine):if(!trim($displayLine))continue;$dis=explode(',',$displayLine)?>
|
||||
<button class="dropdown-item d-flex justify-content-between align-items-center<?php echo $display==$i?' active':'' ?>" type="button" data-value="<?php echo $i ?>">
|
||||
<span>
|
||||
<i class="material-icons mr-1 f18 align-middle" aria-hidden="true"><?php echo $dis[1]?></i>
|
||||
<?php echo $dis[0]?>
|
||||
</span>
|
||||
<small><?php echo number_format(getDbRows($table['postmember'],'mbruid='.$my['uid'].' and site='.$s.' and display='.$i))?></small>
|
||||
</button>
|
||||
<?php $i++;endforeach?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-group ml-2">
|
||||
<input type="text" name="keyword" class="form-control" placeholder="제목,요약,태그 검색" value="<?php echo $keyword ?>">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-white text-muted border-left-0" type="submit">
|
||||
<i class="fa fa-search" aria-hidden="true"></i>
|
||||
</button>
|
||||
<?php if ($keyword): ?>
|
||||
<a href="<?php echo $g['post_reset']?>" class="btn btn-white">초기화</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<form name="procForm" action="<?php echo $g['s']?>/" method="post" target="_action_frame_<?php echo $m?>" onsubmit="return submitCheck(this);">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>" />
|
||||
<input type="hidden" name="m" value="<?php echo $m?>" />
|
||||
<input type="hidden" name="front" value="<?php echo $front?>" />
|
||||
<input type="hidden" name="a" value="" />
|
||||
|
||||
<ul class="list-unstyled" style="margin-top: -1rem" data-plugin="markjs">
|
||||
<?php if (!empty($RCD)): ?>
|
||||
<?php foreach($RCD as $R):?>
|
||||
<li class="media mt-4"
|
||||
data-role="item"
|
||||
data-featured_img="<?php echo checkPostPerm($R) ?getPreviewResize(getUpImageSrc($R),'300x168'):getPreviewResize('/files/noimage.png','300x168') ?>"
|
||||
data-hit="<?php echo $R['hit']?>"
|
||||
data-likes="<?php echo $R['likes']?>"
|
||||
data-comment="<?php echo $R['comment']?>"
|
||||
data-subject="<?php echo checkPostPerm($R)?stripslashes($R['subject']):'[비공개 포스트]'?>">
|
||||
|
||||
<a href="<?php echo getPostLink($R,0)?>" class="position-relative mr-3" target="_blank">
|
||||
<img class="" src="<?php echo checkPostPerm($R) ?getPreviewResize(getUpImageSrc($R),'300x168'):getPreviewResize('/files/noimage.png','300x168') ?>" alt="" width="180">
|
||||
<time class="badge badge-dark rounded-0 position-absolute f14" style="right:1px;bottom:1px"><?php echo checkPostPerm($R)?getUpImageTime($R):'' ?></time>
|
||||
<span class="badge badge-primary rounded-0 position-absolute f14" style="left:1px;top:1px"><?php echo $R['mbruid']!=$my['uid']?'공유':'' ?></span>
|
||||
</a>
|
||||
|
||||
<div class="media-body">
|
||||
<h5 class="my-1 line-clamp-2">
|
||||
<a href="<?php echo checkPostOwner($R)?RW('m=post&mod=write&cid='.$R['cid']):getPostLink($R,1) ?>" class="font-weight-light muted-link" <?php echo !checkPostOwner($R)?'target="_blank"':'' ?>>
|
||||
<?php echo checkPostPerm($R)?stripslashes($R['subject']):'[비공개 포스트]'?>
|
||||
</a>
|
||||
</h5>
|
||||
<?php if (checkPostPerm($R)): ?>
|
||||
<div class="mb-1">
|
||||
<ul class="list-inline d-inline-block f13 text-muted">
|
||||
<li class="list-inline-item">조회 <?php echo $R['hit']?> </li>
|
||||
<li class="list-inline-item">
|
||||
<a class="text-reset" href="#modal-post-opinion" data-toggle="modal" data-uid="<?php echo $R['uid']?>" data-opinion="like">
|
||||
좋아요 <?php echo $R['likes']?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a class="text-reset" href="#modal-post-opinion" data-toggle="modal" data-uid="<?php echo $R['uid']?>" data-opinion="dislike">
|
||||
싫어요 <?php echo $R['dislikes']?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">댓글 <?php echo $R['comment']?> </li>
|
||||
<li class="list-inline-item">
|
||||
<time data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_modify']?$R['d_modify']:$R['d_regis'],'c')?>"></time>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<?php if ($R['category']): ?>
|
||||
<span class="ml-2 f13 text-muted">
|
||||
<i class="fa fa-folder-o mr-1" aria-hidden="true"></i> <?php echo getAllPostCat('post',$R['category']) ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<span class="ml-2 f13 text-muted">
|
||||
<!-- 태그 -->
|
||||
<?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-light" href="<?php echo RW('m=post&mod=keyword&') ?>keyword=<?php echo urlencode($_tagk)?>"><?php echo $_tagk?></a>
|
||||
<?php endfor?>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p class="text-muted py-3">
|
||||
이 포스트에 대한 액세스 권한이 없습니다.
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="ml-3 align-self-center form-inline">
|
||||
|
||||
<div class="dropdown mr-2" data-toggle="display" data-uid="<?php echo $R['uid'] ?>">
|
||||
<button class="btn btn-white btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="min-width: 8.3rem"<?php echo !checkPostOwner($R)?' disabled':'' ?>>
|
||||
<?php echo $g['displaySet']['label'][$R['display']] ?>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right shadow" style="min-width: 8.3rem">
|
||||
<?php $displaySet=explode('||',$d['displaySet'])?>
|
||||
<?php $i=1;foreach($displaySet as $displayLine):if(!trim($displayLine))continue;$dis=explode(',',$displayLine)?>
|
||||
<button class="dropdown-item<?php echo $R['display']==$i?' active':'' ?>" type="button" data-display="<?php echo $i?>" data-label="<?php echo $dis[0]?>">
|
||||
<i class="material-icons mr-1 f18 align-middle" aria-hidden="true"><?php echo $dis[1]?></i>
|
||||
<?php echo $dis[0]?>
|
||||
</button>
|
||||
<?php $i++;endforeach?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-white btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="min-width: 5rem"<?php echo !checkPostOwner($R)?' disabled':'' ?>>
|
||||
관리
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right shadow-sm" style="min-width: 5rem">
|
||||
<a class="dropdown-item" href="<?php echo RW('m=post&mod=write&cid='.$R['cid']) ?>" >수정</a>
|
||||
|
||||
<?php if ($R['mbruid']==$my['uid']): ?>
|
||||
<a class="dropdown-item" href="<?php echo $g['post_delete'].$R['cid']?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 삭제하시겠습니까?');">
|
||||
삭제
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?php echo getPostLink($R,1) ?>" target="_blank">보기</a>
|
||||
<a class="dropdown-item" href="#modal-post-analytics" data-toggle="modal" data-backdrop="static" data-uid="<?php echo $R['uid'] ?>">
|
||||
통계
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(!$NUM):?>
|
||||
<li>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-center" style="height: 40vh">
|
||||
<div class="text-muted">포스트가 없습니다.</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<?php endif?>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="d-flex justify-content-between my-4">
|
||||
<div class=""></div>
|
||||
|
||||
<?php if ($NUM > $recnum): ?>
|
||||
<ul class="pagination mb-0">
|
||||
<?php echo getPageLink(10,$p,$TPG,'')?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php include $g['path_module'].'post/mod/_component.desktop.php';?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
putCookieAlert('post_action_result') // 실행결과 알림 메시지 출력
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
//공개상태 변경 dropdown
|
||||
$('[data-toggle="display"] .dropdown-item').click(function(){
|
||||
var button = $(this)
|
||||
var dropdown = button.closest('[data-toggle="display"]');
|
||||
var display = button.attr('data-display');
|
||||
var uid = dropdown.attr('data-uid');
|
||||
var label = button.attr('data-label');
|
||||
|
||||
dropdown.find('.dropdown-item').removeClass('active');
|
||||
button.addClass('active');
|
||||
dropdown.find('.dropdown-toggle').text(label);
|
||||
|
||||
$.post(rooturl+'/?r='+raccount+'&m=post&a=change_display',{
|
||||
uid : uid,
|
||||
display : display
|
||||
},function(response,status){
|
||||
if(status=='success'){
|
||||
$.notify({message: '공개상태가 변경되었습니다.'},{type: 'success'});
|
||||
} else {
|
||||
alert(status);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 툴바
|
||||
$('[name="toolbarForm"] .dropdown-item').click(function(){
|
||||
var form = $('[name="toolbarForm"]');
|
||||
var value = $(this).attr('data-value');
|
||||
var role = $(this).closest('.dropdown').attr('data-role');
|
||||
form.find('[name="'+role+'"]').val(value)
|
||||
form.submit();
|
||||
});
|
||||
|
||||
// marks.js
|
||||
$('[data-plugin="markjs"]').mark("<?php echo $keyword ?>");
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
198
modules/member/themes/_desktop/bs4-default/dashboard/saved.php
Normal file
198
modules/member/themes/_desktop/bs4-default/dashboard/saved.php
Normal file
@@ -0,0 +1,198 @@
|
||||
<?php
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'desc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
|
||||
|
||||
$sqlque = 'mbruid='.$my['uid'];
|
||||
if ($category) $sqlque .= " and category='".$category."'";
|
||||
if ($where && $keyword)
|
||||
{
|
||||
$sqlque .= getSearchSql($where,$keyword,$ikeyword,'or');
|
||||
}
|
||||
$RCD = getDbArray($table['s_saved'],$sqlque,'*',$sort,$orderby,$recnum,$p);
|
||||
|
||||
$NUM = getDbRows($table['s_saved'],$sqlque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
$g['page_reset'] = RW('mod=dashboard&page='.$page);
|
||||
$g['page_list'] = $g['page_reset'].getLinkFilter('',array($category?'category':''));
|
||||
$g['pagelink'] = $g['page_list'];
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="subhead mt-0">
|
||||
<h2 class="mb-0">
|
||||
저장내역
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center border-top border-dark pt-4 pb-3" role="filter">
|
||||
<span class="f18">전체 <span class="text-primary"><?php echo number_format($NUM)?></span> 건</span>
|
||||
<div class="form-inline ml-auto">
|
||||
|
||||
<label class="sr-only">분류</label>
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-white dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<?php echo $category?$category:'분류 : 전체' ?>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu shadow-sm" aria-labelledby="dropdownMenuLink">
|
||||
<a class="dropdown-item d-flex justify-content-between align-items-center" href="<?php echo RW('mod=dashboard&page=saved')?>">
|
||||
전체
|
||||
<small><?php echo number_format(getDbRows($table['s_saved'],'mbruid='.$my['uid']))?></small>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
<h6 class="dropdown-header">게시판</h6>
|
||||
<?php $_CATS = getDbSelect($table['s_saved'],"mbruid=".$my['uid']." and category<>'' group by category",'category')?>
|
||||
<?php while($_R=db_fetch_array($_CATS)):?>
|
||||
<a class="dropdown-item d-flex justify-content-between align-items-center<?php if($_R['category']==$category):?> active<?php endif?>" href="<?php echo RW('mod=dashboard&page=saved')?>&category=<?php echo $_R['category']?>">
|
||||
<?php echo $_R['category']?>
|
||||
<span class="badge badge-pill"><?php echo number_format(getDbRows($table['s_saved'],'mbruid='.$my['uid'].' and category="'.$_R['category'].'"'))?></span>
|
||||
</a>
|
||||
<?php endwhile?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-group ml-2">
|
||||
<input type="text" class="form-control" placeholder="제목 검색">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-white text-muted border-left-0" type="button">
|
||||
<i class="fa fa-search" aria-hidden="true"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<form name="procForm" action="<?php echo $g['s']?>/" method="post" target="_action_frame_<?php echo $m?>" onsubmit="return submitCheck(this);">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>" />
|
||||
<input type="hidden" name="m" value="<?php echo $m?>" />
|
||||
<input type="hidden" name="front" value="<?php echo $front?>" />
|
||||
<input type="hidden" name="a" value="" />
|
||||
|
||||
<table class="table text-center border-bottom">
|
||||
<colgroup>
|
||||
<col width="50">
|
||||
<col width="50">
|
||||
<col width="100">
|
||||
<col>
|
||||
<col width="150">
|
||||
</colgroup>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<i class="fa fa-check-square-o fa-lg" aria-hidden="true" onclick="chkFlag('members[]');" role="button" data-toggle="tooltip" title="전체선택"></i>
|
||||
</th>
|
||||
<th scope="col">번호</th>
|
||||
<th scope="col">분류</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">저장날짜</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="members[]" value="<?php echo $R['uid']?>" /></td>
|
||||
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
|
||||
<td><?php echo $R['category']?></td>
|
||||
<td class="text-left">
|
||||
<a href="<?php echo $R['url']?>" class="muted-link" target="_blank"><?php echo $R['subject']?></a>
|
||||
<?php if(getNew($R['d_regis'],24)):?><small class="text-danger">new</small><?php endif?>
|
||||
</td>
|
||||
<td><?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?></td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
|
||||
<?php if(!$NUM):?>
|
||||
<tr>
|
||||
<td colspan="5" class="text-center text-muted p-5">저장된 자료가 없습니다.</td>
|
||||
</tr>
|
||||
<?php endif?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="d-flex justify-content-between my-4">
|
||||
<div class="form-inline">
|
||||
<input type="text" name="category" id="iCategory" value="" class="form-control none" />
|
||||
|
||||
<button type="button" class="btn btn-light ml-1" onclick="actCheck('saved_category');">
|
||||
분류지정
|
||||
</button>
|
||||
<button type="button" class="btn btn-light ml-2" onclick="actCheck('saved_delete');">
|
||||
삭제
|
||||
</button>
|
||||
</div><!-- /.form-inline -->
|
||||
|
||||
<?php if ($NUM > $recnum): ?>
|
||||
<ul class="pagination mb-0">
|
||||
<?php echo getPageLink(10,$p,$TPG,'')?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function submitCheck(f)
|
||||
{
|
||||
if (f.a.value == '')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function actCheck(act)
|
||||
{
|
||||
var f = document.procForm;
|
||||
var l = document.getElementsByName('members[]');
|
||||
var n = l.length;
|
||||
var j = 0;
|
||||
var i;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if(l[i].checked == true)
|
||||
{
|
||||
j++;
|
||||
}
|
||||
}
|
||||
if (!j)
|
||||
{
|
||||
alert('선택된 항목이 없습니다. ');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (act == 'saved_category')
|
||||
{
|
||||
if (getId('iCategory').style.display == 'inline')
|
||||
{
|
||||
if (f.category.value == '')
|
||||
{
|
||||
alert('지정하려는 분류명을 입력해 주세요. ');
|
||||
f.category.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
getId('iCategory').style.display = 'inline';
|
||||
f.category.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(confirm('정말로 실행하시겠습니까? '))
|
||||
{
|
||||
f.a.value = act;
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
Reference in New Issue
Block a user