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

View File

@@ -0,0 +1,21 @@
The RBL License
Copyright (c) 2011-2018 Redblock, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,10 @@
# 부스트트랩 4 심플형
부스트트랩 최신버전이 적용된 데스크탑 우선 반응형 회원모듈 테마 입니다.
## 주요 프론트
- 회원가입
- 로그인
- 비밀번호초기화
- 개인정보수정

View File

@@ -0,0 +1 @@
_postList.html

View File

@@ -0,0 +1,17 @@
<a href="{$referer}" class="list-group-item list-group-item-action {$check_read}">
<div class="d-flex w-100">
<div class="mr-3">
<img class="rounded-circle" src="{$avatar}" style="width:52px">
</div>
<div class="w-100">
<div class="d-flex w-100 justify-content-between">
<h6 class="mb-2">{$title}</h6>
<small><time class="small" data-plugin="timeago" datetime="{$datetime}"></time></small>
</div>
<p class="f13 text-muted mb-1">{$message}</p>
<i class="{$icon} {$check_from}"></i>
<small class="align-top ml-2">{$from}</small>
</div>
</div>
</a>

View File

@@ -0,0 +1,18 @@
<div class="media" style="width:200px">
<img class="border rounded mr-3" src="{$avatar}" alt="{$name}" width="48">
<div class="media-body">
<h6 class="mt-0">
<a href="/@{$id}" class="muted-link">{$nic}</a>
</h6>
<div class="small text-muted">
<span class="d-block mb-1">가입일 : {$d_regis}</span>
<span>포인트: {$point} </span>
<span class="ml-1">레벨: {$level}</span>
</div>
</div>
</div>
<div class="mt-3">
{$bio}
</div>

View File

@@ -0,0 +1 @@
profile_setting.html

View File

@@ -0,0 +1 @@
변수

View 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>

View 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>

View 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;
}

View File

@@ -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");
});
});

View File

@@ -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 -->

View File

@@ -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 -->

View File

@@ -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> -->

View 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';?>

View File

@@ -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.'&amp;m=member&amp;a=profile_follow&amp;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>

View 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.'&amp;'.'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'].'&amp;uid=';
$g['post_write'] = $g['post_list'].'&amp;mod=write';
$g['post_modify']= $g['post_write'].'&amp;uid=';
$g['post_reply'] = $g['post_write'].'&amp;reply=Y&amp;uid=';
$g['post_action']= $g['post_base'].'&amp;a=';
$g['post_list_delete']= $g['post_action'].'deletelist&amp;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>

View File

@@ -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.'&amp;':'').'m=post';
$g['post_list'] = $g['post_reset'].getLinkFilter('',array('recnum'));
$g['pagelink'] = $g['post_list'];
$g['post_action']= $g['post_base'].'&amp;a=';
$g['post_list_delete']= $g['post_action'].'deletelist&amp;uid=';
$g['listindex_delete']= $g['post_action'].'deletelistindex&amp;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'].'&amp;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>

View File

@@ -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';?>

View 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?>&amp;m=notification&amp;a=multi_delete_user&amp;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>

View File

@@ -0,0 +1,8 @@
<div class="container">
<div class="subhead mt-0">
<h2 class="subhead-heading">
구매 내역
</h2>
</div>
</div>

View 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>

View 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.'&amp;'.'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'].'&amp;mod=view&amp;cid=';
$g['post_write'] = $g['post_list'].'&amp;mod=write';
$g['post_modify']= $g['post_write'].'&amp;cid=';
$g['post_action']= $g['post_base'].'&amp;a=';
$g['post_delete']= $g['post_action'].'delete&amp;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>

View 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>

View File

@@ -0,0 +1,12 @@
[name="id"],
[name="name"]
[name="email"],
[name="pw1"],
[name="pw2"] {
padding: .5rem 1rem;
font-size: 1.25rem;
line-height: 1.5;
}
.invalid-feedback {
margin-top: .35rem;
}

View File

@@ -0,0 +1,706 @@
<?php
$R = getDbData($table['s_guestauth'],'token="'.$token.'"','email');
?>
<section class="row justify-content-center my-5 mx-0">
<div class="col-5">
<div class="text-center">
<h2>회원가입</h2>
</div>
<div class="border bg-light p-3 my-5" role="alert">
<i class="fa fa-exclamation-triangle fa-3x fa-pull-left" aria-hidden="true"></i>
유효기간이 만료되었거나, 정상적인 토큰이 아닙니다. 다시 인증 받으시기 바랍니다.
</div>
<button type="button" class="btn btn-light btn-block" data-toggle="modal" data-target="#modal-join">
회원가입 하기
</button>
<div class="text-center my-3">
<span class="position-relative d-inline-block">
<img src="<?php echo $user_avatar_src ?>" alt=<?php echo $name ?>"" class="rounded-circle border">
<span class="position-absolute" style="bottom:0;right:0">
<img src="<?php echo $g['img_core']?>/sns/<?php echo $sns_name ?>.png" alt="<?php echo $sns_name ?>" class="rounded-circle" width="48">
</span>
</span>
</div>
<form id="memberForm" class="my-3" role="form" action="<?php echo $g['s']?>/" method="post" autocomplete="off">
<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="join">
<input type="hidden" name="check_id" value="1">
<input type="hidden" name="check_nic" value="0">
<input type="hidden" name="sns_access_token" value="<?php echo $sns_access_token?>">
<input type="hidden" name="sns_refresh_token" value="<?php echo $sns_refresh_token?>">
<input type="hidden" name="sns_expires_in" value="<?php echo $sns_expires_in?>">
<input type="hidden" name="snsname" value="<?php echo $sns_name?>">
<input type="hidden" name="snsuid" value="<?php echo $snsuid?>">
<input type="hidden" name="_photo" value="<?php echo $_photo ?>">
<?php if ($R['email']): ?>
<input type="hidden" name="verified_email" value="1">
<?php else: ?>
<input type="hidden" name="check_email" value="0">
<?php endif; ?>
<?php if ($R['email']): ?>
<div class="form-group">
<label class="sr-only">이메일 <span class="text-danger">*</span></label>
<input type="email" class="form-control form-control-lg" name="email" value="<?php echo $R['email'] ?>" placeholder="이메일" readonly>
<div class="invalid-feedback" id="email-feedback">이메일을 입력해주세요.</div>
</div>
<?php endif; ?>
<div class="form-group">
<label class="sr-only">이름</label>
<input type="text" class="form-control form-control-lg" name="name" id="name" value="<?php echo $name ?>" placeholder="이름" autocomplete="off" placeholder="이름">
<div class="invalid-feedback">이름을 입력해주세요.</div>
</div>
<?php if($d['member']['form_join_nic']):?>
<div class="form-group">
<label>닉네임<?php if($d['member']['form_join_nic_required']):?> <span class="text-danger">*</span><?php endif?></label>
<input type="text" class="form-control" name="nic" id="nic" value="<?php echo $nic?>" placeholder="닉네임을 입력해 주세요." onblur="sameCheck(this,'nic-feedback');">
<div id="nic-feedback"></div>
<div class="invalid-feedback">닉네임을 입력해주세요.</div>
<small class="form-text text-muted">2~12자로 사용할 수 있습니다.</small>
</div>
<?php endif?>
<?php if($d['member']['form_join_tel1']):?>
<div class="form-group">
<label>전화번호 <?php if($d['member']['form_join_tel1_required']):?><span class="text-danger">*</span><?php endif?></label>
<div class="form-inline">
<input type="text" name="tel1_1" value="" maxlength="4" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="tel1_2" value="" maxlength="4" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="tel1_3" value="" maxlength="4" size="4" class="form-control">
<div class="invalid-feedback">
전화번호를 입력해주세요.
</div>
</div><!-- /.form-inline -->
</div>
<?php endif?>
<?php if($d['member']['form_join_tel2']):?>
<div class="form-group">
<label>휴대전화 <?php if($d['member']['form_join_tel2_required']):?><span class="text-danger">*</span><?php endif?></label>
<div class="form-inline">
<input type="text" name="tel2_1" value="" maxlength="3" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="tel2_2" value="" maxlength="4" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="tel2_3" value="" maxlength="4" size="4" class="form-control">
<div class="custom-control custom-checkbox ml-3">
<input type="checkbox" class="custom-control-input" id="sms" name="sms" value="1"<?php if($my['sms']):?> checked="checked"<?php endif?>>
<label class="custom-control-label" for="sms">알림문자를 받겠습니다.</label>
</div>
<div class="invalid-feedback">
휴대전화 번호를 입력해주세요.
</div>
</div><!-- /.form-inline -->
</div>
<?php endif?>
<?php if($d['member']['form_join_birth']):?>
<div class="form-group">
<label>생년월일<?php if($d['member']['form_join_birth_required']):?> <span class="text-danger">*</span><?php endif?></label>
<div class="form-inline">
<select class="form-control custom-select" name="birth_1">
<option value="">년도</option>
<?php for($i = substr($date['today'],0,4); $i > 1930; $i--):?>
<option value="<?php echo $i?>"<?php if(substr($i,-2)==substr($regis_jumin1,0,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="birth_2">
<option value="">월</option>
<?php $birth_2=substr($my['birth2'],0,2)?>
<?php for($i = 1; $i < 13; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($i==substr($regis_jumin1,2,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="birth_3">
<option value="">일</option>
<?php $birth_3=substr($my['birth2'],2,2)?>
<?php for($i = 1; $i < 32; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($i==substr($regis_jumin1,4,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<div class="custom-control custom-checkbox ml-3">
<input type="checkbox" class="custom-control-input" name="birthtype" id="birthtype" value="1">
<label class="custom-control-label" for="birthtype">음력</label>
</div>
<div class="invalid-feedback">
생년월일을 지정해 주세요.
</div>
</div><!-- /.form-inline -->
</div>
<?php endif?>
<?php if($d['member']['form_join_sex']):?>
<div class="form-group">
<label>성별 <?php if($d['member']['form_join_sex_required']):?><span class="text-danger">*</span><?php endif?></label>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="sex_1" name="sex" class="custom-control-input" value="1"<?php if($regis_jumin2&&(substr($regis_jumin2,0,1)%2)==1):?> checked="checked"<?php endif?> >
<label class="custom-control-label" for="sex_1">남성</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="sex_2" name="sex" class="custom-control-input" value="2"<?php if($regis_jumin2&&(substr($regis_jumin2,0,1)%2)==0):?> checked="checked"<?php endif?>>
<label class="custom-control-label" for="sex_2">여성</label>
</div>
<div class="invalid-feedback">
성별을 선택해 주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_join_addr']):?>
<div class="form-group">
<label>주소 <?php if($d['member']['form_join_addr_required']):?><span class="text-danger">*</span><?php endif?></label>
<div id="addrbox">
<div class="form-row">
<div class="form-group col-3">
<input type="text" class="form-control" name="zip_1" value="" id="zip" maxlength="5" size="5" readonly>
</div>
<div class="form-group col-6">
<button type="button" class="btn btn-light" role="button" id="execDaumPostcode">우편번호찾기</button>
</div>
</div>
<input type="text" class="form-control mb-2" name="addr1" id="addr1" value="" readonly>
<input type="text" class="form-control mb-2" name="addr2" id="addr2" value="">
<div class="invalid-feedback">
주소를 입력해주세요.
</div>
</div><!-- /#addrbox -->
<?php if($d['member']['form_join_overseas']):?>
<div class="">
<?php if($my['addr0']=='해외'):?>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="overseas" name="overseas" value="1" checked="checked" onclick="overseasChk(this);">
<label class="custom-control-label" for="overseas" id="overseas_ment">해외거주자 입니다.</label>
</div>
<?php else:?>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="overseas" name="overseas" value="1" onclick="overseasChk(this);">
<label class="custom-control-label" for="overseas" id="overseas_ment">해외거주자일 경우 체크해 주세요.</label>
</div>
<?php endif?>
</div>
<?php endif?>
<script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script>
<script>
$(function() {
$("#execDaumPostcode").click(function() {
// 우편번호 찾기 화면을 넣을 element
var element_wrap = document.getElementById('postLayer');
function execDaumPostcode() {
new daum.Postcode({
oncomplete: function(data) {
// 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
// 각 주소의 노출 규칙에 따라 주소를 조합한다.
// 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
var fullAddr = data.address; // 최종 주소 변수
var extraAddr = ''; // 조합형 주소 변수
// 기본 주소가 도로명 타입일때 조합한다.
if(data.addressType === 'R'){
//법정동명이 있을 경우 추가한다.
if(data.bname !== ''){
extraAddr += data.bname;
}
// 건물명이 있을 경우 추가한다.
if(data.buildingName !== ''){
extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName);
}
// 조합형주소의 유무에 따라 양쪽에 괄호를 추가하여 최종 주소를 만든다.
fullAddr += (extraAddr !== '' ? ' ('+ extraAddr +')' : '');
}
// 우편번호와 주소 정보를 해당 필드에 넣는다.
document.getElementById('zip').value = data.zonecode; //5자리 새우편번호 사용
document.getElementById('addr1').value = fullAddr;
$('#modal-DaumPostcode').modal('hide')// 우편번호 검색모달을 숨김
$('#addr2').focus()
},
// 우편번호 찾기 화면 크기가 조정되었을때 실행할 코드를 작성하는 부분. iframe을 넣은 element의 높이값을 조정한다.
width : '100%',
height : '100%'
}).embed(element_wrap);
element_wrap.style.display = 'block';
$('#modal-DaumPostcode').modal('show')
}
execDaumPostcode()
})
});
</script>
</div>
<!-- Modal -->
<div id="modal-DaumPostcode" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">우편번호 찾기</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body p-0" id="postLayer" style="height: 500px">
</div>
</div>
</div>
</div>
<?php endif?>
<?php if($d['member']['form_join_bio']):?>
<div class="form-group">
<label>간단소개<?php if($d['member']['form_join_bio_required']):?> <span class="text-danger">*</span><?php endif?></label>
<textarea class="form-control" name="bio" rows="3" placeholder="간략한 소개글을 입력해주세요."><?php echo $my['bio']?></textarea>
<div class="invalid-feedback">
간단소개를 입력해 주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_join_home']):?>
<div class="form-group">
<label>홈페이지<?php if($d['member']['form_join_home_required']):?> <span class="text-danger">*</span><?php endif?></label>
<input type="text" class="form-control" name="home" value="" placeholder="URL을 입력하세요.">
<div class="invalid-feedback">
홈페이지 주소를 입력해주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_join_job']):?>
<div class="form-group">
<label>직업<?php if($d['member']['form_join_job_required']):?> <span class="text-danger">*</span><?php endif?></label>
<select class="form-control custom-select" name="job">
<option value="">&nbsp;+ 선택하세요</option>
<option value="" disabled>------------------</option>
<?php
$g['memberJobVarForSite'] = $g['path_var'].'site/'.$r.'/member.job.txt';
$_tmpvfile = file_exists($g['memberJobVarForSite']) ? $g['memberJobVarForSite'] : $g['path_module'].$module.'/var/member.job.txt';
$_job=file($_tmpvfile);
?>
<?php foreach($_job as $_val):?>
<option value="<?php echo trim($_val)?>">ㆍ<?php echo trim($_val)?></option>
<?php endforeach?>
</select>
<div class="invalid-feedback">
직업을 선택해 주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_join_marr']):?>
<div class="form-group">
<label>결혼기념일<?php if($d['member']['form_join_marr_required']):?> <span class="text-danger">*</span><?php endif?></label>
<div class="form-inline">
<select class="form-control custom-select" name="marr_1">
<option value="">년도</option>
<?php for($i = substr($date['today'],0,4); $i > 1930; $i--):?>
<option value="<?php echo $i?>"><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="marr_2">
<option value="">월</option>
<?php for($i = 1; $i < 13; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="marr_3">
<option value="">일</option>
<?php for($i = 1; $i < 32; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"><?php echo $i?></option>
<?php endfor?>
</select>
<div class="invalid-feedback">
결혼기념일을 입력해주세요.
</div>
</div><!-- /.form-inline -->
</div>
<?php endif?>
<!-- 추가 가입항목 -->
<?php $_add = file($g['path_var'].'site/'.$_HS['id'].'/member.add_field.txt')?>
<?php foreach($_add as $_key):?>
<?php $_val = explode('|',trim($_key))?>
<?php if($_val[6]) continue?>
<div class="form-group">
<label><?php echo $_val[1]?><?php if($_val[5]):?><span class="text-danger">*</span><?php endif?></label>
<?php if($_val[2]=='text'):?>
<input type="text" name="add_<?php echo $_val[0]?>" class="form-control" value="<?php echo $_val[3]?>"<?php if($_val[5]):?> required<?php endif?>>
<?php endif?>
<?php if($_val[2]=='password'):?>
<input type="password" name="add_<?php echo $_val[0]?>" class="form-control" value="<?php echo $_val[3]?>"<?php if($_val[5]):?> required<?php endif?>>
<?php endif?>
<?php if($_val[2]=='select'): $_skey=explode(',',$_val[3])?>
<select name="add_<?php echo $_val[0]?>" class="form-control custom-select"<?php if($_val[5]):?> required<?php endif?>>
<option value="">&nbsp;+ 선택하세요</option>
<?php foreach($_skey as $_sval):?>
<option value="<?php echo trim($_sval)?>">ㆍ<?php echo trim($_sval)?></option>
<?php endforeach?>
</select>
<?php endif?>
<?php if($_val[2]=='radio'): $_skey=explode(',',$_val[3])?>
<div class="">
<?php foreach($_skey as $_sval):?>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>" name="add_<?php echo $_val[0]?>" value="<?php echo trim($_sval)?>" class="custom-control-input">
<label class="custom-control-label" for="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>"><?php echo trim($_sval)?></label>
</div>
<?php endforeach?>
</div>
<?php endif?>
<?php if($_val[2]=='checkbox'): $_skey=explode(',',$_val[3])?>
<div>
<?php foreach($_skey as $_sval):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>" name="add_<?php echo $_val[0]?>[]" value="<?php echo trim($_sval)?>">
<label class="custom-control-label" for="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>"><?php echo trim($_sval)?></label>
</div>
<?php endforeach?>
</div>
<?php endif?>
<?php if($_val[2]=='textarea'):?>
<textarea name="add_<?php echo $_val[0]?>" rows="5" class="form-control"<?php if($_val[5]):?> required<?php endif?>><?php echo $_val[3]?></textarea>
<?php endif?>
</div><!-- /.form-group -->
<?php endforeach?>
<div class="d-flex justify-content-between mt-4">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="agreecheckbox" name="agreecheckbox">
<label class="custom-control-label" for="agreecheckbox">서비스 약관에 동의합니다.</label>
<div class="invalid-feedback">
회원으로 가입을 원하실 경우, 약관에 동의하셔야 합니다.
</div>
</div>
<a href="<?php echo RW('mod=policy') ?>" class="muted-link" target="_blank">약관보기</a>
</div>
<button class="btn btn-outline-primary btn-block btn-lg js-submit mt-5" type="submit">
<span class="not-loading">가입하기</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 회원가입 중 ...</span>
</button>
</form>
</div><!-- .col_*-->
</section><!-- /.row -->
<script type="text/javascript">
var f = document.getElementById("memberForm");
function overseasChk(obj) {
if (obj.checked == true)
{
$('#addrbox').addClass('d-none')
$('#overseas_ment').text('해외거주자 입니다.')
}
else {
$('#addrbox').removeClass('d-none')
$('#overseas_ment').text('해외거주자일 경우 체크해 주세요.')
}
}
function sameCheck(obj,layer) {
if (!obj.value)
{
eval('f.check_'+obj.name).value = '0';
f.classList.remove('was-validated');
obj.classList.remove('is-invalid','is-valid');
getId(layer).innerHTML = '';
}
else
{
if (obj.name == 'email')
{
if (!chkEmailAddr(obj.value))
{
f.check_email.value = '0';
setTimeout(function() {
obj.focus();
}, 0);
f.classList.remove('was-validated');
obj.classList.add('is-invalid');
obj.classList.remove('is-valid');
getId(layer).innerHTML = '이메일형식이 아닙니다';
return false;
}
}
if (obj.name == 'nic')
{
if (obj.value.length < 2 || obj.value.length > 12 )
{
f.check_nic.value = '0';
setTimeout(function() {
obj.focus();
}, 0);
f.classList.remove('was-validated');
obj.classList.add('is-invalid');
obj.classList.remove('is-valid');
getId(layer).innerHTML = '사용할 수 없는 닉네임 입니다.';
return false;
}
}
frames._action_frame_<?php echo $m?>.location.href = '<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&a=same_check&fname=' + obj.name + '&fvalue=' + obj.value + '&flayer=' + layer;
}
}
function _submit() {
getIframeForAction(f);
f.submit();
}
$(function () {
$('#memberForm').submit( function(event){
if (f.name.value == '')
{
f.name.classList.add('is-invalid');
f.name.focus();
return false;
}
if (f.check_email.value == '0')
{
f.email.classList.add('is-invalid');
f.email.focus();
return false;
}
<?php if($d['member']['form_join_nic_required']):?>
if (f.check_nic.value == '0')
{
f.nic.classList.add('is-invalid')
f.nic.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_tel1']&&$d['member']['form_join_tel1_required']):?>
if (f.tel1_1.value == '')
{
f.tel1_1.classList.add('is-invalid');
f.tel1_1.focus();
return false;
}
if (f.tel1_2.value == '')
{
f.tel1_2.classList.add('is-invalid');
f.tel1_2.focus();
return false;
}
if (f.tel1_3.value == '')
{
f.tel1_3.classList.add('is-invalid');
f.tel1_3.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_tel2']&&$d['member']['form_join_tel2_required']):?>
if (f.tel2_1.value == '')
{
f.tel2_1.classList.add('is-invalid');
f.tel2_1.focus();
return false;
}
if (f.tel2_2.value == '')
{
f.tel2_2.classList.add('is-invalid');
f.tel2_2.focus();
return false;
}
if (f.tel2_3.value == '')
{
f.tel2_3.classList.add('is-invalid');
f.tel2_3.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_birth']&&$d['member']['form_join_birth_required']):?>
if (f.birth_1.value == '')
{
f.birth_1.classList.add('is-invalid');
f.birth_1.focus();
return false;
}
if (f.birth_2.value == '')
{
f.birth_2.classList.add('is-invalid');
f.birth_2.focus();
return false;
}
if (f.birth_3.value == '')
{
f.birth_3.classList.add('is-invalid');
f.birth_3.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_sex']&&$d['member']['form_join_sex_required']):?>
if (f.sex[0].checked == false && f.sex[1].checked == false)
{
f.sex.classList.add('is-invalid');
return false;
}
<?php endif?>
<?php if($d['member']['form_join_addr']&&$d['member']['form_join_addr_required']):?>
if (!f.overseas || f.overseas.checked == false)
{
if (f.addr1.value == ''||f.addr2.value == '')
{
f.addr2.classList.add('is-invalid');
f.addr2.focus();
return false;
}
}
<?php endif?>
<?php if($d['member']['form_join_bio']&&$d['member']['form_join_bio_required']):?>
if (f.bio.value == '')
{
f.bio.classList.add('is-invalid');
f.bio.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_home']&&$d['member']['form_join_home_required']):?>
if (f.home.value == '')
{
f.home.classList.add('is-invalid');
f.home.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_job']&&$d['member']['form_join_job_required']):?>
if (f.job.value == '')
{
f.job.classList.add('is-invalid');
f.job.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_marr']&&$d['member']['form_join_marr_required']):?>
if (f.marr_1.value == '')
{
f.marr_1.classList.add('is-invalid');
f.marr_1.focus();
return false;
}
if (f.marr_2.value == '')
{
f.marr_2.classList.add('is-invalid');
f.marr_2.focus();
return false;
}
if (f.marr_3.value == '')
{
f.marr_3.classList.add('is-invalid');
f.marr_3.focus();
return false;
}
<?php endif?>
var radioarray;
var checkarray;
var i;
var j = 0;
<?php foreach($_add as $_key):?>
<?php $_val = explode('|',trim($_key))?>
<?php if(!$_val[5]||$_val[6]) continue?>
<?php if($_val[2]=='text' || $_val[2]=='password' || $_val[2]=='select' || $_val[2]=='textarea'):?>
if (f.add_<?php echo $_val[0]?>.value == '')
{
alert('<?php echo $_val[1]?>이(가) <?php echo $_val[2]=='select'?'선택':'입력'?>되지 않았습니다. ');
f.add_<?php echo $_val[0]?>.focus();
return false;
}
<?php endif?>
<?php if($_val[2]=='radio'):?>
j = 0;
radioarray = f.add_<?php echo $_val[0]?>;
for (i = 0; i < radioarray.length; i++)
{
if (radioarray[i].checked == true) j++;
}
if (!j)
{
alert('<?php echo $_val[1]?>이(가) 선택되지 않았습니다. ');
radioarray[0].focus();
return false;
}
<?php endif?>
<?php if($_val[2]=='checkbox'):?>
j = 0;
checkarray = document.getElementsByName("add_<?php echo $_val[0]?>[]");
for (i = 0; i < checkarray.length; i++)
{
if (checkarray[i].checked == true) j++;
}
if (!j)
{
alert('<?php echo $_val[1]?>이(가) 선택되지 않았습니다. ');
checkarray[0].focus();
return false;
}
<?php endif?>
<?php endforeach?>
if (f.check_id.value == '0' || f.check_email.value == '0' || f.check_pw.value == '0') {
event.preventDefault();
event.stopPropagation();
}
if (f.agreecheckbox.checked == false){
$('#agreecheckbox').addClass('is-invalid')
f.agreecheckbox.focus();
return false;
}
$('.js-submit').attr("disabled",true);
setTimeout("_submit();",500);
event.preventDefault();
event.stopPropagation();
}
);
})
</script>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,735 @@
<section class="row justify-content-center my-5 mx-0">
<div class="col-5">
<header>
<h2 class="text-center">
<a class="navbar-brand" href="<?php echo RW(0) ?>"
style="background-image:url(<?php echo $d['layout']['header_logo']?$g['url_var_site'].'/'.$d['layout']['header_logo'].$g['wcache']:''?>);background-size:<?php echo $d['layout']['header_logo_size'] ?>%">
<?php echo !$d['layout']['header_logo']?$d['layout']['header_title'] :'' ?>
</a>
</h2>
</header>
<?php if ($d['member']['join_bySocial']): ?>
<?php if ($d['connect']['use_k']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-kakao" data-connect="kakao" role="button">
<span></span>
<span class="f14">카카오톡 계정으로 가입하기</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_n']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-naver" data-connect="naver" role="button">
<span></span>
<span class="f14">네이버 계정으로 가입하기</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_g']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-google" data-connect="google" role="button">
<span class="fa fa-google"></span>
<span class="f14">구글 계정으로 가입하기</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_f']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-facebook" data-connect="facebook" role="button">
<span class="fa fa-facebook"></span>
<span class="f14">페이스북 계정으로 가입하기</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_i']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-instagram" data-connect="instagram" role="button">
<span class="fa fa-instagram"></span>
<span class="f14">인스타그램 계정으로 가입하기</span>
</button>
<?php endif; ?>
<span class="section-divider" style="z-index: 1;"><span>또는</span></span>
<?php endif; ?>
<form id="memberForm" class="my-3" role="form" action="<?php echo $g['s']?>/" method="post" autocomplete="off">
<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="join">
<input type="hidden" name="check_id" value="0">
<input type="hidden" name="check_pw" value="0">
<input type="hidden" name="check_nic" value="0">
<input type="hidden" name="check_email" value="0">
<div class="form-group">
<label class="sr-only">아이디</label>
<input type="text" class="form-control form-control-lg" name="id" value="<?php echo $id ?>" onblur="sameCheck(this,'id-feedback');" autocapitalize="off" placeholder="아이디" autofocus>
<div id="id-feedback" class="invalid-feedback"></div>
<div class="invalid-feedback">아이디를 입력해 주세요.</div>
<small class="form-text text-muted">4~12자의 영문(소문자)과 숫자만 사용할 수 있습니다.</small>
</div>
<div class="form-group">
<label class="sr-only">이름</label>
<input type="text" class="form-control form-control-lg" name="name" id="name" value="<?php echo $name ?>" placeholder="이름" autocomplete="off" placeholder="이름">
<div class="invalid-feedback">이름을 입력해주세요.</div>
</div>
<div class="form-group">
<label class="sr-only">이메일 <span class="text-danger">*</span></label>
<input type="email" class="form-control form-control-lg" name="email" id="email" value="<?php echo $email ?>" onblur="sameCheck(this,'email-feedback');" placeholder="이메일">
<div class="invalid-feedback" id="email-feedback">이메일을 입력해주세요.</div>
</div>
<?php if($d['member']['form_join_nic']):?>
<div class="form-group">
<label>닉네임<?php if($d['member']['form_join_nic_required']):?> <span class="text-danger">*</span><?php endif?></label>
<input type="text" class="form-control" name="nic" id="nic" value="<?php echo $nic?>" placeholder="닉네임을 입력해 주세요." onblur="sameCheck(this,'nic-feedback');">
<div id="nic-feedback"></div>
<div class="invalid-feedback">닉네임을 입력해주세요.</div>
<small class="form-text text-muted">2~12자로 사용할 수 있습니다.</small>
</div>
<?php endif?>
<?php if (!$pw): ?>
<div class="form-group">
<label class="sr-only">비밀번호</label>
<input type="password" class="form-control form-control-lg" name="pw1" id="pw1" value="<?php echo $pw ?>" onblur="pw1Check();" autocomplete="off" placeholder="비밀번호">
<div class="invalid-feedback" id="pw1-feedback">비밀번호를 입력해주세요.</div>
<small class="form-text text-muted">6~16자의 영문/숫자/특수문자중 2개이상의 조합으로 만드셔야 합니다.</small>
</div>
<div class="form-group">
<label class="sr-only">비밀번호 재입력</label>
<input type="password" class="form-control form-control-lg" name="pw2" id="pw2" placeholder="비밀번호 확인" onkeyup="pw2Check();" autocomplete="off">
<div class="invalid-feedback" id="pw2-feedback">패스워드를 한번더 입력해 주세요.</div>
</div>
<?php endif; ?>
<?php if($d['member']['form_join_phone']):?>
<div class="form-group">
<label>휴대전화 <?php if($d['member']['form_join_phone_required']):?><span class="text-danger">*</span><?php endif?></label>
<div class="form-inline">
<input type="text" name="phone_1" value="" maxlength="3" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="phone_2" value="" maxlength="4" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="phone_3" value="" maxlength="4" size="4" class="form-control">
<div class="custom-control custom-checkbox ml-3">
<input type="checkbox" class="custom-control-input" id="sms" name="sms" value="1"<?php if($my['sms']):?> checked="checked"<?php endif?>>
<label class="custom-control-label" for="sms">알림문자 수신</label>
</div>
<div class="invalid-feedback">
휴대전화 번호를 입력해주세요.
</div>
</div><!-- /.form-inline -->
</div>
<?php endif?>
<?php if($d['member']['form_join_tel']):?>
<div class="form-group">
<label>전화번호 <?php if($d['member']['form_join_tel_required']):?><span class="text-danger">*</span><?php endif?></label>
<div class="form-inline">
<input type="text" name="tel_1" value="" maxlength="4" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="tel_2" value="" maxlength="4" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="tel_3" value="" maxlength="4" size="4" class="form-control">
<div class="invalid-feedback">
전화번호를 입력해주세요.
</div>
</div><!-- /.form-inline -->
</div>
<?php endif?>
<?php if($d['member']['form_join_birth']):?>
<div class="form-group">
<label>생년월일<?php if($d['member']['form_join_birth_required']):?> <span class="text-danger">*</span><?php endif?></label>
<div class="form-inline">
<select class="form-control custom-select" name="birth_1">
<option value="">년도</option>
<?php for($i = substr($date['today'],0,4); $i > 1930; $i--):?>
<option value="<?php echo $i?>"<?php if(substr($i,-2)==substr($regis_jumin1,0,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="birth_2">
<option value="">월</option>
<?php $birth_2=substr($my['birth2'],0,2)?>
<?php for($i = 1; $i < 13; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($i==substr($regis_jumin1,2,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="birth_3">
<option value="">일</option>
<?php $birth_3=substr($my['birth2'],2,2)?>
<?php for($i = 1; $i < 32; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($i==substr($regis_jumin1,4,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<div class="custom-control custom-checkbox ml-3">
<input type="checkbox" class="custom-control-input" name="birthtype" id="birthtype" value="1">
<label class="custom-control-label" for="birthtype">음력</label>
</div>
<div class="invalid-feedback">
생년월일을 지정해 주세요.
</div>
</div><!-- /.form-inline -->
</div>
<?php endif?>
<?php if($d['member']['form_join_sex']):?>
<div class="form-group">
<label>성별 <?php if($d['member']['form_join_sex_required']):?><span class="text-danger">*</span><?php endif?></label>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="sex_1" name="sex" class="custom-control-input" value="1"<?php if($regis_jumin2&&(substr($regis_jumin2,0,1)%2)==1):?> checked="checked"<?php endif?> >
<label class="custom-control-label" for="sex_1">남성</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="sex_2" name="sex" class="custom-control-input" value="2"<?php if($regis_jumin2&&(substr($regis_jumin2,0,1)%2)==0):?> checked="checked"<?php endif?>>
<label class="custom-control-label" for="sex_2">여성</label>
</div>
<div class="invalid-feedback">
성별을 선택해 주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_join_bio']):?>
<div class="form-group">
<label>간단소개<?php if($d['member']['form_join_bio_required']):?> <span class="text-danger">*</span><?php endif?></label>
<textarea class="form-control" name="bio" rows="3" placeholder="간략한 소개글을 입력해주세요."><?php echo $my['bio']?></textarea>
<div class="invalid-feedback">
간단소개를 입력해 주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_join_home']):?>
<div class="form-group">
<label>홈페이지<?php if($d['member']['form_join_home_required']):?> <span class="text-danger">*</span><?php endif?></label>
<input type="text" class="form-control" name="home" value="" placeholder="URL을 입력하세요.">
<div class="invalid-feedback">
홈페이지 주소를 입력해주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_join_job']):?>
<div class="form-group">
<label>직업<?php if($d['member']['form_join_job_required']):?> <span class="text-danger">*</span><?php endif?></label>
<select class="form-control custom-select" name="job">
<option value="">&nbsp;+ 선택하세요</option>
<option value="" disabled>------------------</option>
<?php
$g['memberJobVarForSite'] = $g['path_var'].'site/'.$r.'/member.job.txt';
$_tmpvfile = file_exists($g['memberJobVarForSite']) ? $g['memberJobVarForSite'] : $g['path_module'].$module.'/var/member.job.txt';
$_job=file($_tmpvfile);
?>
<?php foreach($_job as $_val):?>
<option value="<?php echo trim($_val)?>">ㆍ<?php echo trim($_val)?></option>
<?php endforeach?>
</select>
<div class="invalid-feedback">
직업을 선택해 주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_join_marr']):?>
<div class="form-group">
<label>결혼기념일<?php if($d['member']['form_join_marr_required']):?> <span class="text-danger">*</span><?php endif?></label>
<div class="form-inline">
<select class="form-control custom-select" name="marr_1">
<option value="">년도</option>
<?php for($i = substr($date['today'],0,4); $i > 1930; $i--):?>
<option value="<?php echo $i?>"><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="marr_2">
<option value="">월</option>
<?php for($i = 1; $i < 13; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="marr_3">
<option value="">일</option>
<?php for($i = 1; $i < 32; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"><?php echo $i?></option>
<?php endfor?>
</select>
<div class="invalid-feedback">
결혼기념일을 입력해주세요.
</div>
</div><!-- /.form-inline -->
</div>
<?php endif?>
<!-- 추가 가입항목 -->
<?php $g['memberAddFieldSite'] = $g['path_var'].'site/'.$_HS['id'].'/member.add_field.txt'; ?>
<?php $_add = file_exists($g['memberAddFieldSite']) ? file($g['memberAddFieldSite']) : file($g['path_module'].'member/var/add_field.txt');?>
<?php foreach($_add as $_key):?>
<?php $_val = explode('|',trim($_key))?>
<?php if($_val[6]) continue?>
<div class="form-group">
<label><?php echo $_val[1]?><?php if($_val[5]):?><span class="text-danger">*</span><?php endif?></label>
<?php if($_val[2]=='text'):?>
<input type="text" name="add_<?php echo $_val[0]?>" class="form-control" value="<?php echo $_val[3]?>"<?php if($_val[5]):?> required<?php endif?>>
<?php endif?>
<?php if($_val[2]=='password'):?>
<input type="password" name="add_<?php echo $_val[0]?>" class="form-control" value="<?php echo $_val[3]?>"<?php if($_val[5]):?> required<?php endif?>>
<?php endif?>
<?php if($_val[2]=='select'): $_skey=explode(',',$_val[3])?>
<select name="add_<?php echo $_val[0]?>" class="form-control custom-select"<?php if($_val[5]):?> required<?php endif?>>
<option value="">&nbsp;+ 선택하세요</option>
<?php foreach($_skey as $_sval):?>
<option value="<?php echo trim($_sval)?>">ㆍ<?php echo trim($_sval)?></option>
<?php endforeach?>
</select>
<?php endif?>
<?php if($_val[2]=='radio'): $_skey=explode(',',$_val[3])?>
<div class="">
<?php foreach($_skey as $_sval):?>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>" name="add_<?php echo $_val[0]?>" value="<?php echo trim($_sval)?>" class="custom-control-input">
<label class="custom-control-label" for="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>"><?php echo trim($_sval)?></label>
</div>
<?php endforeach?>
</div>
<?php endif?>
<?php if($_val[2]=='checkbox'): $_skey=explode(',',$_val[3])?>
<div>
<?php foreach($_skey as $_sval):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>" name="add_<?php echo $_val[0]?>[]" value="<?php echo trim($_sval)?>">
<label class="custom-control-label" for="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>"><?php echo trim($_sval)?></label>
</div>
<?php endforeach?>
</div>
<?php endif?>
<?php if($_val[2]=='textarea'):?>
<textarea name="add_<?php echo $_val[0]?>" rows="5" class="form-control"<?php if($_val[5]):?> required<?php endif?>><?php echo $_val[3]?></textarea>
<?php endif?>
</div><!-- /.form-group -->
<?php endforeach?>
<div class="d-flex justify-content-between mt-4">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="agreecheckbox" name="agreecheckbox">
<label class="custom-control-label" for="agreecheckbox">서비스 약관에 동의합니다.</label>
</div>
<a href="<?php echo RW('mod='.$d['member']['join_joint_policy']) ?>" class="muted-link" target="_blank">약관보기</a>
</div>
<button class="btn btn-primary btn-block btn-lg js-submit mt-5" type="submit">
<span class="not-loading">가입하기</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 회원가입 중 ...</span>
</button>
</form>
</div><!-- .col_*-->
</section><!-- /.row -->
<script type="text/javascript">
var f = document.getElementById("memberForm");
function overseasChk(obj) {
if (obj.checked == true)
{
$('#addrbox').addClass('d-none')
$('#overseas_ment').text('해외거주자 입니다.')
}
else {
$('#addrbox').removeClass('d-none')
$('#overseas_ment').text('해외거주자일 경우 체크해 주세요.')
}
}
function sameCheck(obj,layer) {
if (!obj.value)
{
eval('f.check_'+obj.name).value = '0';
f.classList.remove('was-validated');
obj.classList.remove('is-invalid','is-valid');
getId(layer).innerHTML = '';
}
else
{
if (obj.name == 'id')
{
if (obj.value.length < 4 || obj.value.length > 12 || !chkIdValue(obj.value))
{
f.check_id.value = '0';
setTimeout(function() {
obj.focus();
}, 0);
f.classList.remove('was-validated');
obj.classList.add('is-invalid');
obj.classList.remove('is-valid');
getId(layer).innerHTML = '사용할 수 없는 아이디 입니다.';
return false;
}
}
if (obj.name == 'email')
{
if (!chkEmailAddr(obj.value))
{
f.check_email.value = '0';
setTimeout(function() {
obj.focus();
}, 0);
f.classList.remove('was-validated');
obj.classList.add('is-invalid');
obj.classList.remove('is-valid');
getId(layer).innerHTML = '이메일형식이 아닙니다';
return false;
}
}
if (obj.name == 'nic')
{
if (obj.value.length < 2 || obj.value.length > 12 )
{
f.check_nic.value = '0';
setTimeout(function() {
obj.focus();
}, 0);
f.classList.remove('was-validated');
obj.classList.add('is-invalid');
obj.classList.remove('is-valid');
getId(layer).innerHTML = '사용할 수 없는 닉네임 입니다.';
return false;
}
}
frames._action_frame_<?php echo $m?>.location.href = '<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&a=same_check&fname=' + obj.name + '&fvalue=' + obj.value + '&flayer=' + layer;
}
}
function pw1Check(){
var layer = 'pw1-feedback';
if (!pw1.value) {
pw1.classList.remove('is-valid','is-invalid');
} else {
f.classList.remove('was-validated');
pw1.classList.add('is-invalid');
pw1.classList.remove('is-valid');
if (f.pw1.value.length < 6 || f.pw1.value.length > 16)
{
getId(layer).innerHTML = '비밀번호는 영문/숫자/특수문자중 2개 이상의 조합으로 최소 6~16자로 입력하셔야 합니다.';
f.pw1.focus();
return false;
}
if (getTypeCheck(f.pw1.value,"abcdefghijklmnopqrstuvwxyz"))
{
getId(layer).innerHTML = '비밀번호가 영문만으로 입력되었습니다.\n비밀번호는 영문/숫자/특수문자중 2개 이상의 조합으로 최소 6자이상 입력하셔야 합니다.';
f.pw1.focus();
return false;
}
if (getTypeCheck(f.pw1.value,"1234567890"))
{
getId(layer).innerHTML = '비밀번호가 숫자만으로 입력되었습니다.\n비밀번호는 영문/숫자/특수문자중 2개 이상의 조합으로 최소 6자이상 입력하셔야 합니다.';
f.pw1.focus();
return false;
}
pw1.classList.add('is-valid');
pw1.classList.remove('is-invalid');
getId(layer).innerHTML = '';
}
}
function pw2Check(){
var layer = 'pw2-feedback';
if (!f.pw1.value) {
f.pw2.value = '';
f.pw1.focus();
} else {
f.classList.remove('was-validated');
pw2.classList.add('is-invalid');
pw2.classList.remove('is-valid');
if (f.pw1.value != f.pw2.value)
{
getId(layer).innerHTML = '비밀번호가 일치하지 않습니다.';
f.classList.remove('was-validated');
f.pw2.focus();
f.check_pw.value = '0';
return false;
}
pw2.classList.add('is-valid');
pw2.classList.remove('is-invalid');
getId(layer).innerHTML = '';
f.check_pw.value = '1';
}
}
function _submit() {
getIframeForAction(f);
f.submit();
}
$(function () {
$('#memberForm').submit( function(event){
//에러흔적 초기화
f.id.classList.remove('is-invalid')
f.name.classList.remove('is-invalid')
f.email.classList.remove('is-invalid')
if (f.check_id.value == '0')
{
f.id.classList.add('is-invalid')
f.id.focus();
return false;
}
if (f.name.value == '')
{
f.name.classList.add('is-invalid');
f.name.focus();
return false;
}
<?php if($d['member']['form_join_nic_required']):?>
if (f.check_nic.value == '0')
{
f.nic.classList.add('is-invalid')
f.nic.focus();
return false;
}
<?php endif?>
if (f.check_email.value == '0')
{
f.email.classList.add('is-invalid');
f.email.focus();
return false;
}
if (f.pw1.value == '')
{
f.pw1.classList.add('is-invalid');
f.pw1.focus();
return false;
}
if (f.pw2.value == '')
{
f.pw2.classList.add('is-invalid');
f.pw2.focus();
return false;
}
if (f.pw1.value != f.pw2.value)
{
alert('패스워드가 일치하지 않습니다.');
f.pw1.focus();
return false;
}
<?php if($d['member']['form_join_tel1']&&$d['member']['form_join_tel1_required']):?>
if (f.tel1_1.value == '')
{
f.tel1_1.classList.add('is-invalid');
f.tel1_1.focus();
return false;
}
if (f.tel1_2.value == '')
{
f.tel1_2.classList.add('is-invalid');
f.tel1_2.focus();
return false;
}
if (f.tel1_3.value == '')
{
f.tel1_3.classList.add('is-invalid');
f.tel1_3.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_tel2']&&$d['member']['form_join_tel2_required']):?>
if (f.tel2_1.value == '')
{
f.tel2_1.classList.add('is-invalid');
f.tel2_1.focus();
return false;
}
if (f.tel2_2.value == '')
{
f.tel2_2.classList.add('is-invalid');
f.tel2_2.focus();
return false;
}
if (f.tel2_3.value == '')
{
f.tel2_3.classList.add('is-invalid');
f.tel2_3.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_birth']&&$d['member']['form_join_birth_required']):?>
if (f.birth_1.value == '')
{
f.birth_1.classList.add('is-invalid');
f.birth_1.focus();
return false;
}
if (f.birth_2.value == '')
{
f.birth_2.classList.add('is-invalid');
f.birth_2.focus();
return false;
}
if (f.birth_3.value == '')
{
f.birth_3.classList.add('is-invalid');
f.birth_3.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_sex']&&$d['member']['form_join_sex_required']):?>
if (f.sex[0].checked == false && f.sex[1].checked == false)
{
f.sex.classList.add('is-invalid');
return false;
}
<?php endif?>
<?php if($d['member']['form_join_addr']&&$d['member']['form_join_addr_required']):?>
if (!f.overseas || f.overseas.checked == false)
{
if (f.addr1.value == ''||f.addr2.value == '')
{
f.addr2.classList.add('is-invalid');
f.addr2.focus();
return false;
}
}
<?php endif?>
<?php if($d['member']['form_join_bio']&&$d['member']['form_join_bio_required']):?>
if (f.bio.value == '')
{
f.bio.classList.add('is-invalid');
f.bio.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_home']&&$d['member']['form_join_home_required']):?>
if (f.home.value == '')
{
f.home.classList.add('is-invalid');
f.home.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_job']&&$d['member']['form_join_job_required']):?>
if (f.job.value == '')
{
f.job.classList.add('is-invalid');
f.job.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_join_marr']&&$d['member']['form_join_marr_required']):?>
if (f.marr_1.value == '')
{
f.marr_1.classList.add('is-invalid');
f.marr_1.focus();
return false;
}
if (f.marr_2.value == '')
{
f.marr_2.classList.add('is-invalid');
f.marr_2.focus();
return false;
}
if (f.marr_3.value == '')
{
f.marr_3.classList.add('is-invalid');
f.marr_3.focus();
return false;
}
<?php endif?>
var radioarray;
var checkarray;
var i;
var j = 0;
<?php foreach($_add as $_key):?>
<?php $_val = explode('|',trim($_key))?>
<?php if(!$_val[5]||$_val[6]) continue?>
<?php if($_val[2]=='text' || $_val[2]=='password' || $_val[2]=='select' || $_val[2]=='textarea'):?>
if (f.add_<?php echo $_val[0]?>.value == '')
{
alert('<?php echo $_val[1]?>이(가) <?php echo $_val[2]=='select'?'선택':'입력'?>되지 않았습니다. ');
f.add_<?php echo $_val[0]?>.focus();
return false;
}
<?php endif?>
<?php if($_val[2]=='radio'):?>
j = 0;
radioarray = f.add_<?php echo $_val[0]?>;
for (i = 0; i < radioarray.length; i++)
{
if (radioarray[i].checked == true) j++;
}
if (!j)
{
alert('<?php echo $_val[1]?>이(가) 선택되지 않았습니다. ');
radioarray[0].focus();
return false;
}
<?php endif?>
<?php if($_val[2]=='checkbox'):?>
j = 0;
checkarray = document.getElementsByName("add_<?php echo $_val[0]?>[]");
for (i = 0; i < checkarray.length; i++)
{
if (checkarray[i].checked == true) j++;
}
if (!j)
{
alert('<?php echo $_val[1]?>이(가) 선택되지 않았습니다. ');
checkarray[0].focus();
return false;
}
<?php endif?>
<?php endforeach?>
if (f.check_id.value == '0' || f.check_email.value == '0' || f.check_pw.value == '0') {
event.preventDefault();
event.stopPropagation();
}
if (f.agreecheckbox.checked == false){
alert('회원으로 가입을 원하실 경우, 약관에 동의하셔야 합니다.');
f.agreecheckbox.focus();
return false;
}
$('.js-submit').attr("disabled",true);
setTimeout("_submit();",500);
event.preventDefault();
event.stopPropagation();
}
);
})
</script>

View File

@@ -0,0 +1,55 @@
.form-signin {
max-width: 340px;
margin: 0 auto;
}
.form-signin .logo {
display: block;
text-align: center;
font-size: 50px;
color: #333;
}
.form-signin .form-signin-heading,
.form-signin .checkbox {
margin-bottom: 15px;
}
.form-signin .checkbox {
font-weight: normal;
}
.form-signin .form-control {
position: relative;
height: auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 10px;
font-size: 16px;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
}
.form-signin label {
display: block;
margin-bottom: 7px;
}
.form-signin .label-link {
float: right;
font-size: 12px;
line-height: 24px
}
.form-signin .rb-complete {
display: none
}
.form-signin.has-sent .rb-default {
display: none
}
.form-signin.has-sent .rb-complete {
display: block
}

View File

@@ -0,0 +1,703 @@
<!--
로그인 관련 컴포넌트 모음
1. 모달 : modal-login : 로그인 시작모달 (로그인 방식선택)
2. 모달 : modal-combine : 소셜미디어 사용자인증 연결정보 입력 (기존 회원중에 동일한 이메일이 존재하나, 본인인증되지 않은 이메일일 경우)
3. 모달 : modal-pwReset : 비밀번호 초기화
-->
<!-- 1. 일반모달 : 로그인 -->
<div class="modal fade" id="modal-login" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered" role="document" style="max-width: 400px;">
<div class="modal-content">
<div class="modal-body">
<h3 class="text-center my-4">회원 로그인</h3>
<?php if ($d['member']['login_emailid']): ?>
<form class="px-4" id="modal-loginform" action="<?php echo $g['s']?>/" method="post">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="a" value="login">
<input type="hidden" name="form" value="">
<div class="form-group position-relative">
<label class="sr-only">이메일 또는 휴대폰 번호</label>
<input type="text" class="form-control form-control-lg" name="id" placeholder="이메일 또는 휴대폰 번호" tabindex="1" autocorrect="off" autocapitalize="off" required>
<div class="invalid-tooltip" data-role="idErrorBlock"></div>
</div>
<div class="form-group position-relative">
<label class="sr-only">패스워드</label>
<input type="password" class="form-control form-control-lg" name="pw" tabindex="2" required placeholder="비밀번호를 입력하세요.">
<div class="invalid-tooltip" data-role="passwordErrorBlock"></div>
</div>
<div class="d-flex justify-content-between align-items-center">
<?php if ($d['member']['login_cookie']): ?>
<div class="custom-control custom-checkbox" data-toggle="collapse" data-target="#modal-collapsealert">
<input type="checkbox" class="custom-control-input" id="modal-login-cookie" name="login_cookie" value="checked">
<label class="custom-control-label" for="modal-login-cookie">로그인 상태 유지</label>
</div>
<?php endif; ?>
<a class="small muted-link" href="#modal-pwReset" data-toggle="changeModal">비밀번호를 잊으셨나요?</a>
</div>
<div class="collapse" id="modal-collapsealert">
<div class="alert alert-light border f12 mt-3">
개인정보 보호를 위해, 개인 PC에서만 사용해 주세요.
</div>
</div>
<div class="my-3">
<button type="submit" class="btn btn-outline-primary btn-lg btn-block" data-role="submit" tabindex="3">
<span class="not-loading">로그인</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 로그인중 ...</span>
</button>
</div>
</form>
<?php endif; ?>
<?php if ($d['member']['login_emailid'] && $d['member']['login_social']): ?>
<span class="section-divider" style="z-index: 1080;"><span>또는</span></span>
<?php endif; ?>
<?php if ($d['member']['login_social']): ?>
<div class="mx-auto mt-3 px-4">
<?php if ($d['connect']['use_k']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-kakao" data-connect="kakao" role="button">
<span></span>
<span class="f14">카카오톡으로 로그인</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_n']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-naver" data-connect="naver" role="button">
<span></span>
<span class="f14">네이버로 로그인</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_g']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-google" data-connect="google" role="button">
<span class="fa fa-google"></span>
<span class="f14">구글로 로그인</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_f']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-facebook" data-connect="facebook" role="button">
<span class="fa fa-facebook"></span>
<span class="f14">페이스북으로 로그인</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_i']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-instagram" data-connect="instagram" role="button">
<span class="fa fa-instagram"></span>
<span class="f14">인스타그램으로 로그인</span>
</button>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<div class="modal-footer justify-content-between">
<button type="button" class="btn btn-link muted-link" data-dismiss="modal">닫기</button>
<a href="#modal-join" data-toggle="changeModal" data-start="" tabindex="6" class="btn btn-link muted-link">회원계정이 없으신가요 ?</a>
</div>
</div>
</div>
</div>
<?php if ($call_modal_combine): ?>
<?php
$avatar_data=array('src'=>$_photo,'width'=>150,'height'=>150);
$user_avatar_src=getTimThumb($avatar_data);
$_SESSION['SL'] = ''; //세션 비우기
?>
<div class="modal fade" id="modal-combine" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered" role="document" style="max-width: 400px;">
<div class="modal-content">
<div class="modal-body">
<div class="text-center my-3">
<span class="position-relative d-inline-block">
<?php if ($_photo): ?>
<img src="<?php echo $user_avatar_src ?>" alt=<?php echo $name ?>"" class="rounded-circle border">
<?php else: ?>
<img src="<?php echo $g['s'].'/files/avatar/0.svg' ?>" alt=<?php echo $name ?>"" class="rounded-circle border" width="100">
<?php endif; ?>
<span class="position-absolute" style="bottom:0;right:0">
<img src="<?php echo $g['img_core']?>/sns/<?php echo $sns_name ?>.png" alt="<?php echo $sns_name ?>" class="rounded-circle" width="48">
</span>
</span>
</div>
<div class="text-center mb-3">
<h2>계정통합</h2>
<span class="f13 text-muted">
<?php echo $name ?>님, 반갑습니다. <br>
하나의 회원계정으로 다양한 서비스를 이용해 보세요.
</span>
</div>
<form class="px-4" id="modal-combineform" action="<?php echo $g['s']?>/" method="post">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="a" value="login">
<input type="hidden" name="sns_access_token" value="<?php echo $sns_access_token?>">
<input type="hidden" name="sns_refresh_token" value="<?php echo $sns_refresh_token?>">
<input type="hidden" name="sns_expires_in" value="<?php echo $sns_expires_in?>">
<input type="hidden" name="snsname" value="<?php echo $sns_name?>">
<input type="hidden" name="snsuid" value="<?php echo $snsuid?>">
<input type="hidden" name="_photo" value="<?php echo $_photo ?>">
<input type="hidden" name="form" value="">
<?php if ($has_sns): ?> <!-- 동일한 이메일로 이미 가입된 소셜로그인 전용 계정이 있을 경우 -->
<div class="alert alert-warning f13" role="alert">
<strong><?php echo $email ?></strong>로 이미 연결된 <?php echo $has_sns_ko ?> 계정이 확인 되었습니다.
</div>
<button type="button" class="btn btn-lg btn-block btn-social btn-<?php echo $has_sns ?>" data-connect="<?php echo $has_sns ?>" role="button">
<?php if ($has_sns=='naver' || $has_sns=='kakao'): ?>
<span></span>
<?php else: ?>
<span class="fa fa-<?php echo $has_sns ?>"></span>
<?php endif; ?>
<span class="f14"><?php echo $has_sns_ko ?> 으로 로그인</span>
</button>
<div class="mt-3 text-muted small">
<?php echo $has_sns_ko ?>로 로그인 후, 설정에서 <?php echo $sns_name_ko ?> 계정을 통합 할수 있습니다.
</div>
<?php else: ?>
<div class="form-group position-relative">
<label class="sr-only">이메일 또는 휴대폰번호</label>
<input type="text" class="form-control form-control-lg" name="id" placeholder="아이디 또는 이메일" tabindex="1" value="<?php echo $email ?>" <?php echo $email?' readonly':'' ?>>
<small class="form-text text-danger mt-2">
회원님의 이메일로 이미 가입된 회원계정이 확인 되었습니다.<br>
비밀번호를 입력 하시면 <?php echo $sns_name_ko ?> 계정이 자동으로 통합 됩니다.
</small>
</div>
<div class="form-group position-relative">
<label>패스워드</label>
<input type="password" class="form-control form-control-lg" name="pw" tabindex="2" placeholder="비밀번호를 입력하세요.">
<div class="invalid-tooltip" data-role="passwordErrorBlock" id="pw-feedback"></div>
</div>
<div class="d-flex justify-content-between align-items-center">
<div class="custom-control custom-checkbox" data-toggle="collapse" data-target="#modal-collapsealert">
<input type="checkbox" class="custom-control-input" id="modal-combine-cookie" name="login_cookie" value="checked">
<label class="custom-control-label" for="modal-combine-cookie">로그인 상태 유지</label>
</div>
<a class="small muted-link" href="<?php echo RW('mod=password_reset')?>">비밀번호를 잊으셨나요?</a>
</div>
<div class="collapse" id="modal-collapsealert">
<div class="alert alert-light border f12 mt-3">
개인정보 보호를 위해, 개인 PC에서만 사용해 주세요.
</div>
</div>
<div class="my-3">
<button type="submit" class="btn btn-outline-primary btn-lg btn-block" data-role="submit" tabindex="3">
<span class="not-loading">연결하기</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 연결중 ...</span>
</button>
</div>
<?php endif; ?>
</form>
</div>
<div class="modal-footer p-2">
<button type="button" class="btn btn-link btn-block muted-link" data-dismiss="modal">닫기</button>
</div>
</div>
</div>
</div>
<script>
var modal_combine = $('#modal-combine')
var f = document.getElementById('modal-combineform');
modal_combine.modal('show')
modal_combine.on('shown.bs.modal', function () {
$(this).find('[name="pw"]').trigger('focus')
})
modal_combine.find('.form-control').keyup(function() {
$(this).removeClass('is-invalid') //에러 흔적 초기화
});
//modal 계정통합 - 실행
modal_combine.find('form').submit(function(e){
e.preventDefault();
e.stopPropagation();
if (f.pw.value == '') {
f.pw.classList.add('is-invalid');
getId('pw-feedback').innerHTML = '비밀번호를 입력해주세요.';
f.pw.focus();
return false;
}
var form = $(this)
siteLogin(form)
});
</script>
<?php endif; ?>
<!-- 3. 모달 : modal-pwReset : 비밀번호 초기화 -->
<div class="modal" id="modal-pwReset" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered" role="document" style="max-width: 400px;">
<div class="modal-content">
<div class="modal-header border-bottom-0 d-flex flex-column" style="background-color: rgba(0,0,0,.03);">
<h5 class="modal-title mx-auto">비밀번호 재설정</h5>
</div>
<?php if ($d['member']['join_byEmail'] || $d['member']['join_byPhone']): ?>
<div class="card border-0" style="margin-top: -15px" data-role="confirm_code">
<div class="card-header">
<ul class="nav nav-tabs nav-justified card-header-tabs">
<?php if ($d['member']['join_byEmail']): ?>
<li class="nav-item">
<a class="nav-link<?php echo $d['member']['join_byEmail']?' active':'' ?>" id="tab-email" data-toggle="tab" href="#pane-pw-email">
이메일로 받기
</a>
</li>
<?php endif; ?>
<?php if ($d['member']['join_byPhone']): ?>
<li class="nav-item">
<a class="nav-link<?php echo ($d['member']['join_byPhone'] && !$d['member']['join_byEmail'])?' active':'' ?>" id="tab-phone" data-toggle="tab" href="#pane-pw-phone">
휴대폰으로 받기
</a>
</li>
<?php endif; ?>
</ul>
</div>
<div class="card-body ">
<div class="tab-content text-center">
<div class="tab-pane <?php echo $d['member']['join_byEmail']?' show active':'' ?>" id="pane-pw-email" role="tabpanel" aria-labelledby="tab-email">
<div class="input-group input-group-lg mt-3">
<input type="email" class="form-control" name="email" placeholder="이메일 주소" tabindex="1" autocorrect="off" autocapitalize="off" required value="">
<div class="invalid-tooltip" data-role="emailErrorBlock"></div>
<div class="input-group-append">
<button class="btn btn-light" type="button" data-act="send_code" data-type="email" data-device="desktop">
<span class="not-loading">다음</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
<div class="d-none mt-3" data-role="verify_email_area">
<small class="form-text text-success my-3">
인증번호를 발송했습니다.(유효시간 <?php echo $d['member']['join_keyexpire'] ?>분)
<span data-role="countdown" data-email-countdown="">[00:00]</span><br>
위 메일로 발송된 6자리 인증번호를 입력해 주세요.<br>
인증번호가 오지 않으면 입력하신 정보가 정확한지 확인하여 주세요.
</small>
<div class="input-group input-group-lg">
<input type="number" class="form-control" name="confirm_email_code" data-role="confirm_email_code" placeholder="인증번호 입력">
<div class="invalid-tooltip" data-role="emailCodeBlock"></div>
<div class="input-group-append">
<button class="btn btn-outline-primary" type="button" data-act="confirm_code" data-type="email" data-device="desktop">
<span class="not-loading">확인</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
</div><!-- /.d-none -->
</div><!-- /.tab-pane -->
<div class="tab-pane <?php echo ($d['member']['join_byPhone'] && !$d['member']['join_byEmail'])?' show active':'' ?>" id="pane-pw-phone" role="tabpanel" aria-labelledby="tab-phone">
<div class="input-group input-group-lg mt-3">
<input type="tel" class="form-control" name="phone" placeholder="휴대폰 번호" tabindex="1" autocorrect="off" autocapitalize="off" required>
<div class="invalid-tooltip" data-role="phoneErrorBlock"></div>
<div class="input-group-append">
<button class="btn btn-light" type="button" data-act="send_code" data-type="phone" data-device="desktop">
<span class="not-loading">다음</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
<div class="d-none mt-3" data-role="verify_phone_area">
<small class="form-text text-success my-3">
인증번호를 발송했습니다.(유효시간 <?php echo $d['member']['join_keyexpire'] ?>분)
<span data-role="countdown" data-phone-countdown="">[00:00]</span><br>
위 휴대폰으로 발송된 6자리 인증번호를 입력해 주세요.<br>
인증번호가 오지 않으면 입력하신 정보가 정확한지 확인하여 주세요.
</small>
<div class="input-group input-group-lg">
<input type="number" class="form-control" name="confirm_phone_code" data-role="confirm_phone_code" placeholder="인증번호 입력">
<div class="invalid-tooltip" data-role="phoneCodeBlock">인증번호를 입력해주세요.</div>
<div class="input-group-append">
<button class="btn btn-outline-primary" type="button" data-act="confirm_code" data-type="phone" data-device="desktop">
<span class="not-loading">확인</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
</div><!-- /.d-none -->
</div><!-- /.tab-pane -->
</div><!-- /.tab-content -->
<ul class="list-unstyled f13 text-muted mt-4 mb-1">
<li>본인인증을 통해 비밀번호를 재설정 하실 수 있습니다.</li>
<li>인증번호를 받을 곳을 선택해 주세요.</li>
<li>비밀번호는 암호화 저장되어 분실 시 찾아드릴 수 없습니다.</li>
</ul>
</div><!-- /.card-body tab-content-->
</div><!-- /.card -->
<?php endif; ?>
<div class="card d-none" data-role="change_pw">
<div class="card-body">
<form id="pwResetForm" role="form" action="<?php echo $g['s']?>/" method="post" autocomplete="off">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="member">
<input type="hidden" name="a" value="pw_reset">
<input type="hidden" name="act" value="change_pw">
<input type="hidden" name="device" value="desktop">
<input type="hidden" name="code" value="">
<input type="hidden" name="target" value="">
<input type="hidden" name="type" value="">
<input type="hidden" name="check_pw1" value="0">
<input type="hidden" name="check_pw2" value="0">
<div class="form-group position-relative">
<label>비밀번호(6~16자리)</label>
<input type="password" class="form-control form-control-lg" name="pw1" placeholder="" autocorrect="off" autocapitalize="off" data-role="pw1">
<div class="invalid-tooltip" data-role="pw1CodeBlock" id="pw1-feedback"></div>
</div>
<div class="form-group position-relative">
<label>비밀번호 재입력</label>
<input type="password" class="form-control form-control-lg" name="pw2" placeholder="" autocorrect="off" autocapitalize="off" data-role="pw2">
<div class="invalid-tooltip" data-role="pw2CodeBlock" id="pw2-feedback"></div>
</div>
<div class="mt-4 mb-3">
<button type="submit" class="btn btn-outline-primary btn-lg 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>
</form>
</div><!-- /.card-body -->
</div><!-- /.card -->
<div class="modal-footer justify-content-between">
<button type="button" class="btn btn-link muted-link" data-dismiss="modal">닫기</button>
<a href="#modal-login" data-toggle="changeModal" tabindex="6" class="btn btn-link muted-link">로그인으로 가기</a>
</div>
</div>
</div>
</div>
<script>
var modal_pwReset = $('#modal-pwReset')
function doPwCountdown(type) {
modal_pwReset.find('[data-'+type+'-countdown]').each(function() {
var $this = $(this), finalDate = $(this).data(type+'-countdown');
$this.html('');
$this.countdown(finalDate, function(event) {
$this.html('['+event.strftime('%M:%S')+']');
});
});
};
function pwResetCheck(obj,layer) {
var f = document.getElementById('pwResetForm');
if (!obj.value)
{
obj.classList.remove('is-invalid');
getId(layer).innerHTML = '';
}
else
{
if (obj.name == 'pw1') {
f.classList.remove('was-validated');
if (f.pw1.value.length < 6 || f.pw1.value.length > 16) {
f.check_pw1.value = '0';
f.classList.remove('was-validated');
obj.classList.add('is-invalid');
obj.classList.remove('is-valid');
getId(layer).innerHTML = '영문/숫자 2개 이상의 조합으로 최소 6~16자로 입력하셔야 합니다.';
obj.focus();
return false;
}
if (getTypeCheck(f.pw1.value,"abcdefghijklmnopqrstuvwxyz")) {
getId(layer).innerHTML = '비밀번호가 영문만으로 입력되었습니다.\n영문/숫자 2개 이상의 조합으로 최소 6자이상 입력하셔야 합니다.';
obj.focus();
return false;
}
if (getTypeCheck(f.pw1.value,"1234567890")) {
getId(layer).innerHTML = '비밀번호가 숫자만으로 입력되었습니다.\n영문/숫자 2개 이상의 조합으로 최소 6자이상 입력하셔야 합니다.';
obj.focus();
return false;
}
f.pw1.classList.add('is-valid');
f.pw1.classList.remove('is-invalid');
getId(layer).innerHTML = '';
f.check_pw1.value = '1';
}
if (obj.name == 'pw2') {
f.classList.remove('was-validated');
obj.classList.add('is-invalid');
obj.classList.remove('is-valid');
if (f.pw1.value != f.pw2.value)
{
getId(layer).innerHTML = '비밀번호가 일치하지 않습니다.';
f.classList.remove('was-validated');
obj.focus();
f.check_pw2.value = '0';
return false;
}
f.pw2.classList.add('is-valid');
f.pw2.classList.remove('is-invalid');
getId(layer).innerHTML = '';
f.check_pw2.value = '1';
}
}
}
$(function () {
modal_pwReset.on('show.bs.modal', function (e) {
var modal = modal_pwReset
//화면 초기화
modal.find('[data-role="confirm_code"]').removeClass('d-none')
modal.find('[data-role="change_pw"]').addClass('d-none')
modal.find('#tab-email').tab('show')
modal.find('[data-act="send_code"]').prop("disabled",false)
modal.find('[data-act="send_code"] .not-loading').text('다음')
modal.find('[data-act="confirm_code"]').prop("disabled",false)
modal.find('[type="number"]').val('').removeClass('is-invalid')
modal.find('[name="email"]').val('').removeClass('is-invalid')
modal.find('[name="phone"]').val('').removeClass('is-invalid')
modal.find('[data-role="verify_email_area"]').addClass('d-none')
modal.find('[data-role="verify_phone_area"]').addClass('d-none')
modal.find('[data-role="pw1"]').val('').removeClass('is-invalid')
modal.find('[data-role="pw2"]').val('').removeClass('is-invalid')
modal.find('[name="check_pw1"]').val(0)
modal.find('[name="check_pw2"]').val(0)
modal.find('[data-role="submit"]').prop("disabled",false)
})
modal_pwReset.on('shown.bs.modal', function (e) {
var modal = modal_pwReset
modal.find('[name="email"]').trigger('focus')
})
modal_pwReset.find('input').keyup(function() {
$(this).removeClass('is-invalid') //에러 발생후 다시 입력 시도시에 에러 흔적 초기화
});
//비밀번호 유용성 체크
modal_pwReset.find('[data-role="change_pw"] input').keyup(function(){
var modal = modal_pwReset
var item = $(this).data('role')
var item_pw_check = modal.find('[name=check_pw]').val()
if (item =='pw1') {
element = document.querySelector('[name="pw1"]');
pwResetCheck(element,'pw1-feedback')
}
if (item =='pw2') {
element = document.querySelector('[name="pw2"]');
pwResetCheck(element,'pw2-feedback')
}
});
})
modal_pwReset.find('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var pane = $(this).attr('id')
if (pane=='tab-email') modal_pwReset.find('[name="email"]').focus()
if (pane=='tab-phone') modal_pwReset.find('[name="phone"]').focus()
})
// 본인인증 코드발송
modal_pwReset.on('click','[data-act="send_code"]',function(){
var modal = modal_pwReset
var button = $(this)
var act = 'send_code'
var type = button.attr('data-type')
var device = button.attr('data-device')
if (type=='email') {
var input = modal.find('[name="email"]')
var _input = document.querySelector('#modal-pwReset [name="email"]');
var target = input.val()
var msg = modal.find('[data-role="emailErrorBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 이메일 입력폼 유효성 체크
if (!target) {
input.focus()
input.addClass('is-invalid')
msg.text('이메일을 입력해주세요.')
return false;
}
if (!chkEmailAddr(_input.value)) {
input.focus()
input.addClass('is-invalid')
msg.text('이메일 형식이 아닙니다.')
return false;
}
}
if (type=='phone') {
var input = modal.find('[name="phone"]')
var _input = document.querySelector('#modal-pwReset [name="phone"]');
var target = input.val()
var msg = modal.find('[data-role="phoneErrorBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 휴대폰번호 입력폼 유효성 체크
if (!target) {
input.focus()
input.addClass('is-invalid')
msg.text('휴대폰 번호를 입력해주세요.')
return false;
}
if (!chkPhoneNumber(_input.value)) {
input.focus()
input.addClass('is-invalid')
msg.text('휴대폰 번호 형식이 아닙니다.')
return false;
}
}
button.attr('disabled',true) //버튼 로딩처리
var url = rooturl+'/?r='+raccount+'&m=member&a=pw_reset&act='+act+'&type='+type+'&target='+target+'&device='+device
getIframeForAction();
//modal.find('[data-act=confirm_code]').attr('data-type',type);
//modal.find('[type=number]').attr('data-role','confirm_'+type+'_code').attr('name','confirm_'+type+'_code');
//modal.find('.invalid-tooltip').attr('data-role',type+'CodeBlock');
modal.find('[data-role=countdown]').text('');
modal.find('[data-role="target"]').text(target)
setTimeout(function() {
frames.__iframe_for_action__.location.href = url;
}, 700);
});
// 본인인증 코드확인
modal_pwReset.on('click','[data-act="confirm_code"]',function(){
var modal = modal_pwReset
var button = $(this)
var act = 'confirm_code'
var type = button.data('type')
var device = button.data('device')
if (type=='email') {
var input = modal.find('[name="confirm_email_code"]')
var code = input.val()
var msg = modal.find('[data-role="emailCodeBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 인증번호 입력폼 유효성 체크
if (!code) {
input.focus()
input.addClass('is-invalid')
msg.text('인증번호를 입력해주세요.')
return false;
}
}
if (type=='phone') {
var input = modal.find('[name="confirm_phone_code"]')
var code = input.val()
var msg = modal.find('[data-role="phoneCodeBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 인증번호 입력폼 유효성 체크
if (!code) {
input.focus()
input.addClass('is-invalid')
msg.text('인증번호를 입력해주세요.')
return false;
}
}
button.attr('disabled',true) //버튼 로딩처리
var url = rooturl+'/?r='+raccount+'&m=member&a=pw_reset&act='+act+'&type='+type+'&code='+code+'&device='+device
getIframeForAction();
setTimeout(function() {
frames.__iframe_for_action__.location.href = url;
}, 700);
});
// 비밀번호 변경
$('#pwResetForm').submit( function(e){
e.preventDefault();
e.stopPropagation();
var form = $(this)
var formID = form.attr('id')
var f = document.getElementById(formID);
if (f.check_pw1.value == '0' || f.check_pw2.value == '0') {
return false;
}
form.find('[name="form"]').val('#'+formID);
form.find('[type="submit"]').attr("disabled",true); //버튼 로딩처리
form.find('.form-control').removeClass('is-invalid') //에러이력 초기화
setTimeout(function(){
getIframeForAction(f);
f.submit();
}, 500);
}
);
</script>

View File

@@ -0,0 +1,144 @@
<section class="my-5">
<header>
<h2 class="text-center">
<a class="navbar-brand" href="<?php echo RW(0) ?>"
style="background-image:url(<?php echo $d['layout']['header_logo']?$g['url_var_site'].'/'.$d['layout']['header_logo'].$g['wcache']:''?>);background-size:<?php echo $d['layout']['header_logo_size'] ?>%">
<?php echo !$d['layout']['header_logo']?$d['layout']['header_title'] :'' ?>
</a>
</h2>
</header>
<div class="form-signin mt-2">
<div class="card">
<div class="card-body">
<?php if ($d['member']['login_emailid']): ?>
<form class="" id="page-loginform" action="<?php echo $g['s']?>/" method="post" novalidate>
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="a" value="login">
<input type="hidden" name="referer" value="<?php echo $referer ? $referer : $_SERVER['HTTP_REFERER']?>">
<input type="hidden" name="form" value="">
<div class="form-group">
<label for="">이메일 또는 휴대폰 번호</label>
<input type="text" name="id" id="id" class="form-control" placeholder="" tabindex="1" autocorrect="off" autocapitalize="off" autofocus="autofocus" required>
<div class="invalid-feedback mt-2" data-role="idErrorBlock"></div>
</div>
<div class="form-group">
<label for="">
비밀번호
<a href="#modal-pwReset" data-toggle="modal" data-backdrop="static" class="label-link" id="password_reset">
비밀번호를 잊으셨나요?
</a>
</label>
<input type="password" name="pw" id="password" class="form-control" placeholder="" tabindex="2" required>
<div class="invalid-feedback mt-2" data-role="passwordErrorBlock"></div>
</div>
<?php if ($d['member']['login_cookie']): ?>
<div class="custom-control custom-checkbox" data-toggle="collapse" data-target="#page-collapsealert">
<input type="checkbox" class="custom-control-input" id="page-loginCookie" name="login_cookie" value="checked" tabindex="4">
<label class="custom-control-label" for="page-loginCookie">로그인 상태 유지</label>
</div>
<div class="collapse" id="page-collapsealert">
<div class="alert alert-danger f12 mb-3">
개인정보 보호를 위해, 개인 PC에서만 사용해 주세요.
</div>
</div>
<?php endif; ?>
<button class="btn btn-lg btn-primary btn-block" type="submit" id="rb-submit" data-role="submit" tabindex="3">
<span class="not-loading">로그인</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 로그인중 ...</span>
</button>
</form>
<?php endif; ?>
<?php if ($d['member']['login_emailid'] && $d['member']['login_social']): ?>
<span class="section-divider" style="z-index: 1;"><span>또는</span></span>
<?php endif; ?>
<?php if ($d['member']['login_social']): ?>
<div class="mx-auto mt-3">
<h6 class="mb-2">내 소셜계정으로 로그인</h6>
<?php if ($d['connect']['use_k']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-kakao" data-connect="kakao" role="button">
<span></span>
<span class="f14">카카오톡 계정으로 로그인</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_n']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-naver" data-connect="naver" role="button">
<span></span>
<span class="f14">네이버 계정으로 로그인</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_g']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-google" data-connect="google" role="button">
<span class="fa fa-google"></span>
<span class="f14">구글 계정으로 로그인</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_f']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-facebook" data-connect="facebook" role="button">
<span class="fa fa-facebook"></span>
<span class="f14">페이스북 계정으로 로그인</span>
</button>
<?php endif; ?>
<?php if ($d['connect']['use_i']): ?>
<button type="button" class="btn btn-lg btn-block btn-social btn-instagram" data-connect="instagram" role="button">
<span class="fa fa-instagram"></span>
<span class="f14">인스타그램 계정으로 로그인</span>
</button>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</div>
</form>
<div class="card form-signin mt-3 bg-transparent">
<div class="card-body">
<a href="<?php echo RW('mod=join') ?>" tabindex="6">회원계정이 없으신가요 ?</a>
</div>
</div>
</section>
<script type="text/javascript">
$(function () {
$('#page-loginform').submit(function(e){
e.preventDefault();
e.stopPropagation();
var form = $(this)
var formID = form.attr('id')
var f = document.getElementById(formID);
form.find('[name="form"]').val('#'+formID);
form.find('[type="submit"]').attr("disabled",true);
form.find('.form-control').removeClass('is-invalid') //에러이력 초기화
setTimeout(function(){
getIframeForAction(f);
f.submit();
}, 500);
});
// 로그인 에러 흔적 초기화
$("#page-loginform").find('.form-control').keyup(function() {
$(this).removeClass('is-invalid')
});
})
</script>

View File

@@ -0,0 +1,145 @@
<?php $id_or_email='회원가입시 등록한 '.($d['member']['login_emailid']?'아이디':'이메일').'을 입력해주세요.'?>
<section class="my-5">
<form id="request_tmpPW" class="form-signin" 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="<?php echo $m?>">
<input type="hidden" name="a" value="pw_tmp">
<h2 class="form-signin-heading text-center">임시 비밀번호 요청</h2>
<div class="card rb-default">
<div class="card-body">
<div class="form-group">
<label for="join_email" class="control-label">
등록된 이메일을 입력해 주세요.
</label>
<input type="email" id="email_field" class="form-control" name="email" placeholder="이메일을 입력해주세요." required autofocus value="<?php echo $my['email'] ?>">
</div>
<div class="div">
<button type="submit" class="btn btn-primary btn-lg btn-block">임시 비밀번호 요청</button>
<?php if (!$my['email']): ?>
<button type="button" class="btn btn-light btn-lg btn-block" data-target="#findEmail" data-toggle="modal">이메일 찾기</button>
<?php endif; ?>
<a href="/login" class="d-none btn btn-link btn-block f12 muted-link">로그인으로 돌아가기</a>
</div>
</div><!-- /.card-boy -->
</div><!-- /.card -->
<div class="card p-3 mt-3 rb-complete">
<p>
몇분이 지나도 메일수신이 안되었을 경우, 스펨 메일함을 확인해 보시고 기타사항에 대해서는 관리자에게 문의해주세요.
<mark>임시 비밀번호로 로그인한 후, 비밀번호를 변경해주세요.</mark>
</p>
<?php if ($my['uid']): ?>
<a href="/settings/account" class="btn btn-light btn-block">비밀번호 변경 페이지로 돌아가기</a>
<?php else: ?>
<a href="/login" class="btn btn-light btn-block">로그인 페이지로 돌아가기</a>
<?php endif; ?>
</div>
</form>
</section>
<!-- 이메일 찾기 -->
<div class="modal fade" id="findEmail" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><i class="fa fa-search"></i> 이메일 찾기</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form name="procForm1" class="" 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="<?php echo $m?>" />
<input type="hidden" name="a" value="email_search" />
<p class="f12 mb-3">
회원가입시 등록한 이름(실명)과 아이디를 입력하시면 이메일을 확인하실 수 있습니다.
</p>
<div class="form-group">
<label for="join_name" class="sr-only control-label">이름</label>
<input type="text" class="form-control" name="name" id="join_name" placeholder="등록된 이름을 입력 해주세요." required>
</div>
<div class="form-group">
<label for="join_id" class="sr-only control-label"><?php echo $d['member']['login_emailid']?'아이디':'이메일'?></label>
<input type="text" class="form-control" name="id" id="join_id" placeholder="등록된 아이디를 입력 해주세요." required>
</div>
<div>
<button type="submit" class="btn btn-secondary btn-block">찾기</button>
</div>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
$('#findEmail').on('shown.bs.modal', function () {
$('#join_name').val('').trigger('focus')
$('#join_id').val('')
})
function pwCheck(f)
{
if (f.new_id.value == '')
{
alert('<?php echo $d['member']['login_emailid']?'이메일을':'아이디를'?> 입력해 주세요. ');
f.new_id.focus();
return false;
}
if (f.id_auth.value == '2')
{
if (f.new_pw_a.value == '')
{
alert('답변을 입력해 주세요. ');
f.new_pw_a.focus();
return false;
}
}
if (f.id_auth.value == '3')
{
if (f.new_pw1.value == '')
{
alert('새 패스워드를 입력해 주세요.');
f.new_pw1.focus();
return false;
}
if (f.new_pw2.value == '')
{
alert('새 패스워드를 한번더 입력해 주세요.');
f.new_pw2.focus();
return false;
}
if (f.new_pw1.value != f.new_pw2.value)
{
alert('새 패스워드가 일치하지 않습니다.');
f.new_pw1.focus();
return false;
}
alert('입력하신 패스워드로 재등록 되었습니다.');
}
}
//]]>
</script>

View File

@@ -0,0 +1,22 @@
body {padding:20px;}
#pages_top {}
#pages_top .title {padding:0 0 7px 0;margin:0 0 40px 0;border-bottom:#dfdfdf solid 1px;}
#pages_top .title .xl {float:left;}
#pages_top .title .xl h2 {font-family:"malgun gothic",dotum;font-size:20px;padding:0;margin:0;}
#pages_top .title .xr {float:right;}
#pages_top .title .xr ul {padding:0;margin:0;}

View File

@@ -0,0 +1,32 @@
<?php
$g['url_reset'] = $g['s'].'/?r='.$r.'&iframe=Y&amp;m='.$m.'&amp;front='.$front.'&amp;mbruid='.$M['memberuid'];
$g['url_page'] = $g['url_reset'].'&amp;page='.$page;
?>
<div id="pages_top">
<div class="title">
<div class="xl"><h2><a href="<?php echo $g['url_reset']?>"><?php echo $M[$_HS['nametype']]?>님</a></h2></div>
<div class="xr">
<ul>
<li class="leftside"></li>
<?php if($d['member']['mytab_post']):?><li<?php if($page=='post'):?> class="selected"<?php endif?>><a href="<?php echo $g['url_reset']?>&amp;page=post">게시물</a></li><?php endif?>
<?php if($d['member']['mytab_comment']):?><li<?php if($page=='comment'):?> class="selected"<?php endif?>><a href="<?php echo $g['url_reset']?>&amp;page=comment">댓글</a></li><?php endif?>

View File

@@ -0,0 +1,30 @@
/* list */
#bbslist {margin:auto;padding:0 0 30px 0;}
#bbslist .info {height:28px;}
#bbslist .info .article {float:left;font-size:11px;font-family:gothic,dotum;color:#c0c0c0;padding:5px 0 0 5px;}
#bbslist .info .article a {position:relative;top:3px;left:3px;}
#bbslist .info .category {float:right;}
#bbslist .info .category select .sline {color:#c0c0c0;}
#bbslist table {width:100%;border-spacing:0px;border-collapse:collapse;}
#bbslist table caption {display:none;}
#bbslist thead th {height:28px;border-top:#D2D2D2 solid 1px;border-bottom:#D2D2D2 solid 1px;background:url('../../../../../../_core/image/_public/bg_list_tt.jpg');font-size:11px;font-family:dotum;font-weight:normal;color:#787878;}
#bbslist thead .side1 {border-left:#D2D2D2 solid 1px;}
#bbslist thead .side2 {border-right:#D2D2D2 solid 1px;}
#bbslist tbody .noticetr td {background:url('');background:#FAFAFA;border-bottom:#EBEBEB solid 1px;}
#bbslist tbody .noticetr td a {font-weight:bold;}
#bbslist tbody td {text-align:center;color:#888888;font-family:arial;font-size:10px;border-bottom:#E6E6E6 solid 1px;letter-spacing:-1px;}

View File

@@ -0,0 +1,177 @@
<?php
include_once $g['dir_module_skin'].'_menu.php';
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'asc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
$bbsque = 'mbruid='.$M['memberuid'];
if ($account) $bbsque .= ' and site='.$account;
if ($where && $keyword)
{
if (strstr('[name][nic][id][ip]',$where)) $bbsque .= " and ".$where."='".$keyword."'";
else if ($where == 'term') $bbsque .= " and d_regis like '".$keyword."%'";
else $bbsque .= getSearchSql($where,$keyword,$ikeyword,'or');
}
$RCD = getDbArray($table['s_comment'],$bbsque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_comment'],$bbsque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div id="bbslist">
<div class="info">
<div class="article">
<?php echo number_format($NUM)?>개(<?php echo $p?>/<?php echo $TPG?>페이지)
</div>
<div class="category">
<select name="account" class="account" onchange="goHref('<?php echo str_replace('&amp;','&',$g['url_reset'])?>&page=<?php echo $page?>&account='+this.value);">
<option value="">&nbsp;+ 전체사이트</option>
<option value="">----------------</option>
<?php $SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1)?>
<?php while($S = db_fetch_array($SITES)):?>
<option value="<?php echo $S['uid']?>"<?php if($account==$S['uid']):?> selected="selected"<?php endif?>>ㆍ<?php echo $S['name']?></option>
<?php endwhile?>
<?php if(!db_num_rows($SITES)):?>
<option value="">등록된 사이트가 없습니다.</option>
<?php endif?>
</select>
</div>
<div class="clear"></div>
</div>
<form name="procForm" 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="comment" />
<input type="hidden" name="a" value="" />
<table summary="댓글리스트 입니다.">
<caption>댓글리스트</caption>
<colgroup>
<col width="30">
<col width="50">
<col>
<col width="70">
<col width="90">
</colgroup>
<thead>
<tr>
<th scope="col" class="side1"><img src="<?php echo $g['img_core']?>/_public/ico_check_01.gif" class="hand" alt="" onclick="chkFlag('comment_members[]');" /></th>
<th scope="col">번호</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)):?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<tr>
<td><input type="checkbox" name="comment_members[]" value="<?php echo $R['uid']?>" /></td>
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
<td class="sbj">
<?php if($R['mobile']):?><img src="<?php echo $g['img_core']?>/_public/ico_mobile.gif" class="imgpos" alt="모바일" title="모바일(<?php echo $R['mobile']?>)로 등록된 글입니다" /><?php endif?>
<a href="<?php echo getCyncUrl($R['cync'].',CMT:'.$R['uid'].',s:'.$R['site'])?>#CMT" target="_blank"><?php echo $R['subject']?></a>
<?php if(strstr($R['content'],'.jpg')):?><img src="<?php echo $g['img_core']?>/_public/ico_pic.gif" class="imgpos" alt="사진" title="사진" /><?php endif?>
<?php if($R['upload']):?><img src="<?php echo $g['img_core']?>/_public/ico_file.gif" class="imgpos" alt="첨부파일" title="첨부파일" /><?php endif?>
<?php if($R['hidden']):?><img src="<?php echo $g['img_core']?>/_public/ico_hidden.gif" class="imgpos" alt="비밀글" title="비밀글" /><?php endif?>
<?php if($R['oneline']):?><span class="comment">[<?php echo $R['oneline']?>]</span><?php endif?>
<?php if($R['trackback']):?><span class="trackback">[<?php echo $R['trackback']?>]</span><?php endif?>
<?php if(getNew($R['d_regis'],24)):?><span class="new">new</span><?php endif?>
</td>
<td class="hit b"><?php echo $R['hit']?></td>
<td><?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?></td>
</tr>

View File

@@ -0,0 +1,21 @@
#friendlist {padding:0 0 30px 0;}
#friendlist .info {height:28px;}
#friendlist .info .article {float:left;padding:7px 0 0 0;}
#friendlist .info .article a {font-family:gothic,gulim;font-size:12px;}
#friendlist .info .article span {font-size:11px;font-family:dotum;color:#c0c0c0;padding:0 5px 0 5px;}
#friendlist .info .article .num {color:#666;padding:0 0 0 3px;}
#friendlist .info .category {float:right;}
#friendlist table {width:100%;border-spacing:0px;border-collapse:collapse;}
#friendlist table caption {display:none;}
#friendlist thead th {height:28px;border-top:#D2D2D2 solid 1px;border-bottom:#D2D2D2 solid 1px;background:url('../../../../../../_core/image/_public/bg_list_tt.jpg');font-size:11px;font-family:dotum;font-weight:normal;color:#787878;}
#friendlist thead .side1 {border-left:#D2D2D2 solid 1px;}

View File

@@ -0,0 +1,139 @@
<?php
include_once $g['dir_module_skin'].'_menu.php';
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
$type = $type ? $type : 'follower';
if ($type == 'follower')
{
$sqlque = 'by_mbruid='.$M['memberuid'];
if ($category) $sqlque .= " and category='".$category."'";
}
elseif($type == 'following')
{
$sqlque = 'my_mbruid='.$M['memberuid'];
}
else {
$sqlque = 'my_mbruid='.$M['memberuid'].' and rel=1';
}
if ($where && $keyword)
{
$sqlque .= getSearchSql($where,$keyword,$ikeyword,'or');
}
$RCD = getDbArray($table['s_friend'],$sqlque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_friend'],$sqlque);
$TPG = getTotalPage($NUM,$recnum);
$_NUM = array();
$_NUM['follower'] = getDbRows($table['s_friend'],'by_mbruid='.$M['memberuid']);
$_NUM['following'] = getDbRows($table['s_friend'],'my_mbruid='.$M['memberuid']);
$_NUM['friend'] = getDbRows($table['s_friend'],'my_mbruid='.$M['memberuid'].' and rel=1');
?>
<div id="friendlist">
<div class="info">
<div class="article">
<a href="<?php echo $g['url_page']?>&amp;type=friend"<?php if($type=='friend'):?> class="b"<?php endif?>>맞팔</a><span class="num">(<?php echo $_NUM['friend']?>)</span></span> <span>|</span>
<a href="<?php echo $g['url_page']?>&amp;type=follower"<?php if($type=='follower'):?> class="b"<?php endif?>>팔로워</a><span class="num">(<?php echo $_NUM['follower']?>)</span> <span>|</span>
<a href="<?php echo $g['url_page']?>&amp;type=following"<?php if($type=='following'):?> class="b"<?php endif?>>팔로잉</a><span class="num">(<?php echo $_NUM['following']?>)
</div>
<div class="category">
<?php if($type != 'follower'):?>
<select onchange="goHref('<?php echo str_replace('&amp;','&',$g['url_page'])?>&type=<?php echo $type?>&category='+this.value);">
<option value="">&nbsp;+ 전체</option>
<option value="">-------------</option>
<?php $_CATS = getDbSelect($table['s_friend'],"my_mbruid=".$M['memberuid']." and category<>'' group by category",'category')?>
<?php while($_R=db_fetch_array($_CATS)):?>
<option value="<?php echo $_R['category']?>"<?php if($_R['category']==$category):?> selected="selected"<?php endif?>>ㆍ<?php echo $_R['category']?></option>
<?php endwhile?>
</select>
<?php endif?>
</div>
<div class="clear"></div>
</div>
<table summary="친구 리스트입니다.">
<caption>친구</caption>
<colgroup>
<col width="50">
<col>
<col width="60">

View File

@@ -0,0 +1,21 @@
#pages_join {overflow:auto;width:765px;height:550px;}
#pages_join .tt_comp {font-weight:bold;font-family:"malgun gothic",dotum;font-size:15px;padding:30px 0 20px 0;margin:0;}
#pages_join .tt_comp .tt_check {font-weight:normal;font-family:dotum;font-size:12px;color:#999999;}
#pages_join .msg {padding:0 0 25px 20px;color:#1C5B8C;font-family:dotum;line-height:150%;}
#pages_join .msg span {font-size:11px;color:#ff0000;}
#pages_join table {width:100%;border-spacing:0px;border-collapse:collapse;letter-spacing:-1px;border-top:#E6E6E6 solid 1px;color:#888;}
#pages_join table caption {display:none;}
#pages_join table thead {display:none;}
#pages_join tbody td {padding:12px 0 12px 0;border-bottom:#E6E6E6 solid 1px;color:#888;}

View File

@@ -0,0 +1,700 @@
<?php include_once $g['dir_module_skin'].'_menu.php'?>
<div id="pages_join">
<form name="procForm" action="<?php echo $g['s']?>/" method="post" target="_action_frame_<?php echo $m?>" onsubmit="return saveCheck(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="info_update" />
<input type="hidden" name="check_nic" value="<?php echo $M['nic']?1:0?>" />
<input type="hidden" name="check_email" value="<?php echo $M['email']?1:0?>" />
<input type="hidden" name="memberuid" value="<?php echo $M['memberuid']?>" />
<div class="msg">
<span class="b">(*)</span> 표시가 있는 항목은 반드시 입력해야 합니다.<br />
관리자권한을 이용해서 이름,닉네임,이메일등을 중복확인없이 변경할 수 있습니다.<br />
</div>
<table summary="회원가입 기본정보를 입력받는 표입니다.">
<caption>회원가입 기본정보</caption>
<colgroup>
<col width="100">
<col>
</colgroup>
<thead>
<tr>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="key">이름(실명)<span>*</span></td>
<td>
<input type="text" name="name" value="<?php echo $M['name']?>" maxlength="10" class="input" />
</td>
</tr>
<?php if($d['member']['form_nic']):?>
<tr>
<td class="key">닉네임<?php if($d['member']['form_nic_p']):?><span>*</span><?php endif?></td>
<td>
<input type="text" name="nic" value="<?php echo $M['nic']?>" maxlength="20" class="input" onblur="sameCheck(this,'hLayernic');" />
<span class="hmsg" id="hLayernic"></span>
<div>닉네임은 자신을 표현할 수 있는 단어로 20자까지 자유롭게 사용할 수 있습니다.</div>
</td>
</tr>
<?php endif?>
<?php if($d['member']['form_birth']):?>
<tr>
<td class="key">생년월일<?php if($d['member']['form_birth_p']):?><span>*</span><?php endif?></td>
<td>
<select name="birth_1">
<option value="">년도</option>
<?php for($i = substr($date['today'],0,4); $i > 1930; $i--):?>
<option value="<?php echo $i?>"<?php if($M['birth1']==$i):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select name="birth_2">
<option value="">월</option>
<?php $birth_2=substr($M['birth2'],0,2)?>
<?php for($i = 1; $i < 13; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($birth_2==$i):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select name="birth_3">
<option value="">일</option>
<?php $birth_3=substr($M['birth2'],2,2)?>
<?php for($i = 1; $i < 32; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($birth_3==$i):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<input type="checkbox" name="birthtype" value="1"<?php if($M['birthtype']):?> checked="checked"<?php endif?> />음력<br />
</td>
</tr>
<?php endif?>
<?php if($d['member']['form_sex']):?>
<tr>
<td class="key">성별<?php if($d['member']['form_sex_p']):?><span>*</span><?php endif?></td>
<td class="shift">
<input type="radio" name="sex" value="1"<?php if($M['sex']==1):?> checked="checked"<?php endif?> />남성
<input type="radio" name="sex" value="2"<?php if($M['sex']==2):?> checked="checked"<?php endif?> />여성
</td>
</tr>
<?php endif?>
<?php if($d['member']['form_qa']):?>
<tr>
<td class="key">비번찾기 질문<?php if($d['member']['form_qa_p']):?><span>*</span><?php endif?></td>
<td>
<input type="text" name="pw_q" value="<?php echo $M['pw_q']?>" class="input pw_q2" />
</td>
</tr>
<tr>
<td class="key">비번찾기 답변<?php if($d['member']['form_qa_p']):?><span>*</span><?php endif?></td>
<td>
<input type="text" name="pw_a" value="<?php echo $M['pw_a']?>" class="input" />
<div>
비밀번호찾기 질문에 대한 답변을 혼자만 알 수 있는 단어나 기호로 입력해 주세요.<br />
비밀번호를 찾을 때 필요하므로 반드시 기억해 주세요.
</div>
</td>
</tr>
<?php endif?>
<tr>
<td class="key">이메일<span>*</span></td>
<td>
<input type="text" name="email" value="<?php echo $M['email']?>" size="35" class="input" onblur="sameCheck(this,'hLayeremail');" />
<span class="hmsg" id="hLayeremail"></span>
<div>주로 사용하는 이메일 주소를 입력해 주세요. 비밀번호 잊어버렸을 때 확인 받을 수 있습니다.</div>
<div class="remail"><input type="checkbox" name="remail" value="1"<?php if($M['mailing']):?> checked="checked"<?php endif?> />뉴스레터나 공지이메일을 수신받겠습니다.</div>
</td>
</tr>
<?php if($d['member']['form_home']):?>
<tr>
<td class="key">홈페이지<?php if($d['member']['form_home_p']):?><span>*</span><?php endif?></td>
<td>
<input type="text" name="home" value="<?php echo $M['home']?>" size="35" class="input" />
</td>
</tr>
<?php endif?>
<?php if($d['member']['form_tel2']):?>
<tr>
<td class="key">휴대전화<?php if($d['member']['form_tel2_p']):?><span>*</span><?php endif?></td>
<td><?php $tel2=explode('-',$M['tel2'])?>
<input type="text" name="tel2_1" value="<?php echo $tel2[0]?>" maxlength="3" size="4" class="input" />-
<input type="text" name="tel2_2" value="<?php echo $tel2[1]?>" maxlength="4" size="4" class="input" />-
<input type="text" name="tel2_3" value="<?php echo $tel2[2]?>" maxlength="4" size="4" class="input" />
<div class="remail"><input type="checkbox" name="sms" value="1"<?php if($M['sms']):?> checked="checked"<?php endif?> />알림문자를 받겠습니다.</div>
</td>
</tr>
<?php endif?>
<?php if($d['member']['form_tel1']):?>
<tr>
<td class="key">전화번호<?php if($d['member']['form_tel1_p']):?><span>*</span><?php endif?></td>
<td><?php $tel1=explode('-',$M['tel1'])?>
<input type="text" name="tel1_1" value="<?php echo $tel1[0]?>" maxlength="4" size="4" class="input" />-
<input type="text" name="tel1_2" value="<?php echo $tel1[1]?>" maxlength="4" size="4" class="input" />-
<input type="text" name="tel1_3" value="<?php echo $tel1[2]?>" maxlength="4" size="4" class="input" />
</td>
</tr>
<?php endif?>
<?php if($d['member']['form_addr']):?>
<tr>
<td class="key">주소<?php if($d['member']['form_addr_p']):?><span>*</span><?php endif?></td>
<td>
<div id="addrbox"<?php if($M['addr0']=='해외'):?> class="hide"<?php endif?>>
<div>
<input type="text" name="zip_1" id="zip1" value="<?php echo substr($M['zip'],0,3)?>" maxlength="3" size="3" readonly="readonly" class="input" />-
<input type="text" name="zip_2" id="zip2" value="<?php echo substr($M['zip'],3,3)?>" maxlength="3" size="3" readonly="readonly" class="input" />
<input type="button" value="우편번호" class="btngray btn" onclick="OpenWindow('<?php echo $g['s']?>/?r=<?php echo $r?>&m=zipsearch&zip1=zip1&zip2=zip2&addr1=addr1&focusfield=addr2');" />
</div>
<div><input type="text" name="addr1" id="addr1" value="<?php echo $M['addr1']?>" size="55" readonly="readonly" class="input" /></div>
<div><input type="text" name="addr2" id="addr2" value="<?php echo $M['addr2']?>" size="55" class="input" /></div>
</div>
<?php if($d['member']['form_foreign']):?>
<div class="remail shift">
<?php if($M['addr0']=='해외'):?>
<input type="checkbox" name="foreign" value="1" checked="checked" onclick="foreignChk(this);" /><span id="foreign_ment">해외거주자 입니다.</span>
<?php else:?>
<input type="checkbox" name="foreign" value="1" onclick="foreignChk(this);" /><span id="foreign_ment">해외거주자일 경우 체크해 주세요.</span>
<?php endif?>
</div>
<?php endif?>
</td>
</tr>
<?php endif?>
<?php if($d['member']['form_job']):?>
<tr>
<td class="key">직업<?php if($d['member']['form_job_p']):?><span>*</span><?php endif?></td>
<td>
<select name="job">
<option value="">&nbsp;+ 선택하세요</option>
<option value="">------------------</option>
<?php $_job=file($g['dir_module'].'var/job.txt')?>
<?php foreach($_job as $_val):?>
<option value="<?php echo trim($_val)?>"<?php if(trim($_val)==$M['job']):?> selected="selected"<?php endif?>>ㆍ<?php echo trim($_val)?></option>
<?php endforeach?>
</select>
</td>
</tr>
<?php endif?>
<?php if($d['member']['form_marr']):?>
<tr>
<td class="key">결혼기념일<?php if($d['member']['form_marr_p']):?><span>*</span><?php endif?></td>
<td>
<select name="marr_1">
<option value="">년도</option>
<?php for($i = substr($date['today'],0,4); $i > 1930; $i--):?>
<option value="<?php echo $i?>"<?php if($i==$M['marr1']):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select name="marr_2">
<option value="">월</option>
<?php for($i = 1; $i < 13; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($i==substr($M['marr2'],0,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select name="marr_3">
<option value="">일</option>
<?php for($i = 1; $i < 32; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($i==substr($M['marr2'],2,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
</td>
</tr>
<?php endif?>
<?php $_add = file($g['dir_module'].'var/add_field.txt')?>
<?php foreach($_add as $_key):?>
<?php $_val = explode('|',trim($_key))?>
<?php if($_val[6]) continue?>
<?php $_myadd1 = explode($_val[0].'^^^',$M['addfield'])?>
<?php $_myadd2 = explode('|||',$_myadd1[1])?>
<tr>
<td class="key"><?php echo $_val[1]?><?php if($_val[5]):?><span>*</span><?php endif?></td>
<td>
<?php if($_val[2]=='text'):?>
<input type="text" name="add_<?php echo $_val[0]?>" class="input" style="width:<?php echo $_val[4]?>px;" value="<?php echo $_myadd2[0]?>" />
<?php endif?>
<?php if($_val[2]=='password'):?>
<input type="password" name="add_<?php echo $_val[0]?>" class="input" style="width:<?php echo $_val[4]?>px;" value="<?php echo $_myadd2[0]?>" />
<?php endif?>
<?php if($_val[2]=='select'): $_skey=explode(',',$_val[3])?>
<select name="add_<?php echo $_val[0]?>" style="width:<?php echo $_val[4]?>px;">
<option value="">&nbsp;+ 선택하세요</option>
<?php foreach($_skey as $_sval):?>
<option value="<?php echo trim($_sval)?>"<?php if(trim($_sval)==$_myadd2[0]):?> selected="selected"<?php endif?>>ㆍ<?php echo trim($_sval)?></option>
<?php endforeach?>
</select>
<?php endif?>
<?php if($_val[2]=='radio'): $_skey=explode(',',$_val[3])?>
<div class="shift">
<?php foreach($_skey as $_sval):?>
<input type="radio" name="add_<?php echo $_val[0]?>" value="<?php echo trim($_sval)?>"<?php if(trim($_sval)==$_myadd2[0]):?> checked="checked"<?php endif?> /><?php echo trim($_sval)?>
<?php endforeach?>
</div>
<?php endif?>
<?php if($_val[2]=='checkbox'): $_skey=explode(',',$_val[3])?>
<div class="shift">
<?php foreach($_skey as $_sval):?>
<input type="checkbox" name="add_<?php echo $_val[0]?>[]" value="<?php echo trim($_sval)?>"<?php if(strstr($_myadd2[0],'['.trim($_sval).']')):?> checked="checked"<?php endif?> /><?php echo trim($_sval)?>
<?php endforeach?>
</div>
<?php endif?>
<?php if($_val[2]=='textarea'):?>
<textarea name="add_<?php echo $_val[0]?>" rows="5" style="width:<?php echo $_val[4]?>px;"><?php echo $_myadd2[0]?></textarea>
<?php endif?>
</tr>
<?php endforeach?>
</tbody>
</table>
<?php if($d['member']['form_comp']):?>
<?php if($M['comp']) $myc = getDbData($table['s_mbrcomp'],'memberuid='.$M['memberuid'],'*')?>
<?php $tel = explode('-',$myc['comp_tel'])?>
<?php $fax = explode('-',$myc['comp_fax'])?>
<div class="tt_comp">
기업정보
<?php if(!$M['comp']):?>
<span class="tt_check">(<input type="checkbox" name="comp" value="1" />기업정보를 등록합니다)</span>
<?php else:?>
<input type="checkbox" name="comp" value="1" checked="checked" class="hide" />
<?php endif?>
</div>
<table summary="회원가입 기업정보를 입력받는 표입니다.">
<caption>회원가입 기업정보</caption>
<colgroup>
<col width="100">
<col>
</colgroup>
<thead>
<tr>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="key">사업자등록번호<span>*</span></td>
<td colspan="3">
<input type="text" name="comp_num_1" size="4" maxlength="3" class="input" value="<?php echo substr($myc['comp_num'],0,3)?>" /> -
<input type="text" name="comp_num_2" size="3" maxlength="2" class="input" value="<?php echo substr($myc['comp_num'],3,2)?>" /> -
<input type="text" name="comp_num_3" size="5" maxlength="5" class="input" value="<?php echo substr($myc['comp_num'],5,5)?>" />
<input type="radio" name="comp_type" value="1"<?php if($myc['comp_type']==1||!$myc['comp_type']):?> checked="checked"<?php endif?> />개인
<input type="radio" name="comp_type" value="2"<?php if($myc['comp_type']==2):?> checked="checked"<?php endif?> />법인
</td>
</tr>
<tr>
<td class="key">회사명<span>*</span></td>
<td>
<input type="text" name="comp_name" class="input" value="<?php echo $myc['comp_name']?>" />
</td>
<td class="key">대표자명<span>*</span></td>
<td>
<input type="text" name="comp_ceo" class="input" value="<?php echo $myc['comp_ceo']?>" />
</td>
</tr>
<tr>
<td class="key">업태<span>*</span></td>
<td>
<input type="text" name="comp_upte" class="input" value="<?php echo $myc['comp_upte']?>" />
</td>
<td class="key">종목<span>*</span></td>
<td>
<input type="text" name="comp_jongmok" class="input" value="<?php echo $myc['comp_jongmok']?>" />
</td>
</tr>
<tr>
<td class="key">대표전화<span>*</span></td>
<td>
<input type="text" name="comp_tel_1" value="<?php echo $tel[0]?>" maxlength="4" size="4" class="input" />-
<input type="text" name="comp_tel_2" value="<?php echo $tel[1]?>" maxlength="4" size="4" class="input" />-
<input type="text" name="comp_tel_3" value="<?php echo $tel[2]?>" maxlength="4" size="4" class="input" />
</td>
<td class="key">팩스</td>
<td>
<input type="text" name="comp_fax_1" value="<?php echo $fax[0]?>" maxlength="4" size="4" class="input" />-
<input type="text" name="comp_fax_2" value="<?php echo $fax[1]?>" maxlength="4" size="4" class="input" />-
<input type="text" name="comp_fax_3" value="<?php echo $fax[2]?>" maxlength="4" size="4" class="input" />
</td>
</tr>
<tr>
<td class="key">소속부서</td>
<td>
<input type="text" name="comp_part" class="input" value="<?php echo $myc['comp_part']?>" />
</td>
<td class="key">직책</td>
<td>
<input type="text" name="comp_level" class="input" value="<?php echo $myc['comp_level']?>" />
</td>
</tr>
<tr>
<td class="key">사업장주소<span>*</span></td>

View File

@@ -0,0 +1,22 @@
#pages_join {overflow:auto;width:765px;height:550px;}
#pages_join .tt_comp {font-weight:bold;font-family:"malgun gothic",dotum;font-size:15px;padding:30px 0 20px 0;margin:0;}
#pages_join .tt_comp .tt_check {font-weight:normal;font-family:dotum;font-size:12px;color:#999999;}
#pages_join .msg {padding:0 0 25px 20px;color:#1C5B8C;font-family:dotum;line-height:150%;}
#pages_join .msg span {font-size:11px;color:#ff0000;}
#pages_join table {width:100%;border-spacing:0px;border-collapse:collapse;letter-spacing:-1px;border-top:#E6E6E6 solid 1px;color:#888;}
#pages_join table caption {display:none;}
#pages_join table thead {display:none;}
#pages_join tbody td {padding:12px 0 12px 0;border-bottom:#E6E6E6 solid 1px;color:#888;}

View File

@@ -0,0 +1,147 @@
<?php
include_once $g['path_module'].$module.'/_main.php';
//소속넘버로 분과이름 추출
$s2b=array(
'12'=>'제도법제분과',
'13'=>'사회공헌분과',
'14'=>'기부문화분과',
'16'=>'변호사분과', //여기서부터는 기부컨설팅위원회
'17'=>'세무 · 회계사 분과',
'18'=>'법무사 분과',
'19'=>'부동산 분과',
'20'=>'금융 분과'
);
// 소속넘버로 위원회 이름 추출
$s2mb=array(
'11'=>'배분위원회',
'12'=>'기부문화연구소-제도법제분과',
'13'=>'기부문화연구소-사회공헌분과',
'14'=>'기부문화연구소-기부문화분과',
'15'=>'기부문화연구소-이사',
'16'=>'기부컨설팅위원회-변호사분과',
'17'=>'기부컨설팅위원회-세무 · 회계사 분과',
'18'=>'기부컨설팅위원회-법무사 분과',
'19'=>'기부컨설팅위원회-부동산 분과',
'20'=>'기부컨설팅위원회-금융분과',
'21'=>'기금운용위원회',
'22'=>'이사회'
);
$s2m=array(
'11'=>'배분위원회',
'12'=>'기부문화연구소',
'13'=>'기부문화연구소',
'14'=>'기부문화연구소',
'15'=>'기부문화연구소',
'16'=>'기부컨설팅위원회',
'17'=>'기부컨설팅위원회',
'18'=>'기부컨설팅위원회',
'19'=>'기부컨설팅위원회',
'20'=>'기부컨설팅위원회',
'21'=>'기금운용위원회',
'22'=>'이사회'
);
?>
<style>
.ajax_msg {position:absolute;left:220px;bottom:70px;line-height:180%;color:red;}
</style>
<!-- 아작스 이미지 업로드용 JQ -->
<script type="text/javascript" src="<?php echo $g['path_module']?>member/var/jquery.form.js"></script>
<!-- 아작스 이미지 업로드용 JQ -->
<div id="pages_join">
<div style="height:200px;vertical-align:bottom;position:relative;">
<?php ajax_imgupload2('admin','member',$mbruid)?>
<p style="position:absolute;left:220px;top:80px;line-height:180%;">* JPG 만 가능. 사이즈는 177px X 140px.
</div>
<form name="procForm" action="<?php echo $g['s']?>/" method="post" target="_action_frame_<?php echo $m?>" onsubmit="return saveCheck(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="info_update2" />
<input type="hidden" name="memberuid" value="<?php echo $M['memberuid']?>" />
<table summary="회원가입 기본정보를 입력받는 표입니다.">
<caption>회원가입 기본정보</caption>
<colgroup>
<col width="100">
<col>
</colgroup>
<thead>
<tr>
<th scope="col"></th>

View File

@@ -0,0 +1,21 @@
#loglist {padding:0 0 30px 0;}
#loglist .info {height:28px;}
#loglist .info .article {float:left;font-size:11px;font-family:gothic,dotum;color:#c0c0c0;padding:5px 0 0 5px;}
#loglist .info .category {float:right;}
#loglist .info .category .btngray {height:18px;font-size:11px;font-family:dotum;}
#loglist table {width:100%;border-spacing:0px;border-collapse:collapse;}
#loglist table caption {display:none;}
#loglist thead th {height:28px;border-top:#D2D2D2 solid 1px;border-bottom:#D2D2D2 solid 1px;background:url('../../../../../../_core/image/_public/bg_list_tt.jpg');font-size:11px;font-family:dotum;font-weight:normal;color:#787878;}
#loglist thead .side1 {border-left:#D2D2D2 solid 1px;}
#loglist thead .side2 {border-right:#D2D2D2 solid 1px;}
#loglist tbody td {text-align:center;color:#888888;font-family:arial;font-size:10px;border-bottom:#E6E6E6 solid 1px;letter-spacing:-1px;}

View File

@@ -0,0 +1,196 @@
<?php
include_once $g['dir_module_skin'].'_menu.php';
$year1 = $year1 ? $year1 : substr($date['today'],0,4);
$month1 = $month1 ? $month1 : substr($date['today'],4,2);
$day1 = $day1 ? $day1 : 1;//substr($date['today'],6,2);
$year2 = $year2 ? $year2 : substr($date['today'],0,4);
$month2 = $month2 ? $month2 : substr($date['today'],4,2);
$day2 = $day2 ? $day2 : substr($date['today'],6,2);
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
$sqlque = 'mbruid='.$M['memberuid'];
if ($account) $bbsque .= ' and site='.$account;
$sqlque = $sqlque.' and d_regis > '.$year1.sprintf('%02d',$month1).sprintf('%02d',$day1).'000000 and d_regis < '.$year2.sprintf('%02d',$month2).sprintf('%02d',$day2).'240000';
if ($where && $keyword)
{
$sqlque .= getSearchSql($where,$keyword,$ikeyword,'or');
}
$RCD = getDbArray($table['s_referer'],$sqlque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_referer'],$sqlque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div id="loglist">
<form name="bbssearchf" action="<?php echo $g['s']?>/">
<input type="hidden" name="r" value="<?php echo $r?>" />
<div class="info">
<div class="article">
<?php echo number_format($NUM)?>건(<?php echo $p?>/<?php echo $TPG?>페이지)
</div>
<div class="category">
<select name="year1">
<?php for($i=$date['year'];$i>2009;$i--):?><option value="<?php echo $i?>"<?php if($year1==$i):?> selected="selected"<?php endif?>><?php echo $i?>년</option><?php endfor?>
</select>
<select name="month1">
<?php for($i=1;$i<13;$i++):?><option value="<?php echo sprintf('%02d',$i)?>"<?php if($month1==$i):?> selected="selected"<?php endif?>><?php echo sprintf('%02d',$i)?>월</option><?php endfor?>
</select>
<select name="day1">
<?php for($i=1;$i<32;$i++):?><option value="<?php echo sprintf('%02d',$i)?>"<?php if($day1==$i):?> selected="selected"<?php endif?>><?php echo sprintf('%02d',$i)?>일(<?php echo getWeekday(date('w',mktime(0,0,0,$month1,$i,$year1)))?>)</option><?php endfor?>
</select> ~
<select name="year2">
<?php for($i=$date['year'];$i>2009;$i--):?><option value="<?php echo $i?>"<?php if($year2==$i):?> selected="selected"<?php endif?>><?php echo $i?>년</option><?php endfor?>
</select>
<select name="month2">
<?php for($i=1;$i<13;$i++):?><option value="<?php echo sprintf('%02d',$i)?>"<?php if($month2==$i):?> selected="selected"<?php endif?>><?php echo sprintf('%02d',$i)?>월</option><?php endfor?>
</select>
<select name="day2">
<?php for($i=1;$i<32;$i++):?><option value="<?php echo sprintf('%02d',$i)?>"<?php if($day2==$i):?> selected="selected"<?php endif?>><?php echo sprintf('%02d',$i)?>일(<?php echo getWeekday(date('w',mktime(0,0,0,$month2,$i,$year2)))?>)</option><?php endfor?>
</select>
<input type="button" class="btngray" value="기간적용" onclick="this.form.submit();" />
<select name="account" class="account" onchange="this.form.submit();">
<option value="">&nbsp;+ 전체사이트</option>
<option value="">-------------</option>
<?php $SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1)?>
<?php while($S = db_fetch_array($SITES)):?>
<option value="<?php echo $S['uid']?>"<?php if($account==$S['uid']):?> selected="selected"<?php endif?>>ㆍ<?php echo $S['name']?></option>
<?php endwhile?>
<?php if(!db_num_rows($SITES)):?>
<option value="">등록된 사이트가 없습니다.</option>
<?php endif?>
</select>
</div>
<div class="clear"></div>
</div>
<table summary="접속기록 리스트입니다.">
<caption>접속기록</caption>
<colgroup>
<col width="70">
<col width="150">
<col>
<col width="120">
<col width="110">
</colgroup>
<thead>
<tr>
<th scope="col" class="side1">번호</th>
<th scope="col">아이피</th>
<th scope="col">접속경로</th>
<th scope="col">브라우져</th>
<th scope="col" class="side2">날짜</th>
</tr>
</thead>
<tbody>

View File

@@ -0,0 +1,24 @@
#mypage_main {padding:20px 0 0 0;}
#mypage_main .photo {position:absolute;top:110px;left:690px;width:50px;height:50px;margin:3px 0 20px 20px;background:url('../../../../../../_var/simbol/0.gif') center center no-repeat;}
#mypage_main table {width:650px;border-spacing:0px;border-collapse:collapse;letter-spacing:-1px;border-top:#E6E6E6 dotted 1px;color:#888;margin:0 0 20px 0;}
#mypage_main table caption {display:none;}
#mypage_main table thead {display:none;}
#mypage_main tbody td {padding:10px 0 10px 0;border-bottom:#E6E6E6 dotted 1px;color:#888;}
#mypage_main .key {padding-left:20px;color:#111;}
#mypage_main .post {width:760px;height:300px;overflow:auto;}

View File

@@ -0,0 +1,151 @@
<?php
include_once $g['dir_module_skin'].'_menu.php';
$levelnum = getDbData($table['s_mbrlevel'],'gid=1','*');
$levelname= getDbData($table['s_mbrlevel'],'uid='.$M['level'],'*');
$sosokname= getDbData($table['s_mbrgroup'],'uid='.$M['sosok'],'*');
$joinsite = getDbData($table['s_site'],'uid='.$M['site'],'*');
$M1 = getUidData($table['s_mbrid'],$M['memberuid']);
$lastlogdate = -getRemainDate($M['last_log']);
?>
<div id="mypage_main">
<div class="photo"><?php if($M['photo']):?><img src="<?php echo $g['url_root']?>/_var/simbol/<?php echo $M['photo']?>" alt="<?php echo $M['photo']?>" /><?php endif?></div>
<table summary="<?php echo $M[$_HS['nametype']]?>님의 회원 요약정보입니다.">
<caption>회원요약정보</caption>
<colgroup>
<col width="120">
<col>
<col width="120">
<col>
</colgroup>
<thead>
<tr>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="key">이름</td>
<td><?php echo $M['name']?></td>
<td class="key">닉네임</td>
<td><?php echo $M['nic']?></td>
</tr>
<tr>
<td class="key">아이디</td>
<td><?php echo $M1['id']?></td>
<td class="key">가입일</td>
<td><?php echo getDateFormat($M['d_regis'],'Y/m/d H:i')?></td>
</tr>
<tr>
<td class="key">최근접속</td>
<td><?php echo getDateFormat($M['last_log'],'Y/m/d H:i')?> (<?php echo $lastlogdate?$lastlogdate.'일전':'오늘'?>)</td>
<td class="key">연락처</td>
<td><?php echo $M['tel2']?$M['tel2']:$M['tel1']?></td>
</tr>
<tr>
<td class="key">이메일</td>
<td><?php echo $M['email']?></td>
<td class="key">지역</td>
<td><?php echo $M['addr0']=='해외'?$M['addr0']:$M['addr1']?></td>
</tr>
<tr>
<td class="key">나이/성별</td>
<td><?php if($M['birth1']):?><?php echo getAge($M['birth1'])?>세<?php endif?><?php if($M['birth1']&&$M['sex']):?> / <?php endif?><?php if($M['sex']):?><?php echo getSex($M['sex'])?>성<?php endif?></td>
<td class="key">생년월일</td>
<td><?php if($M['birth1']):?><?php echo $M['birth1']?>/<?php echo substr($M['birth2'],0,2)?>/<?php echo substr($M['birth2'],2,2)?><?php endif?></td>
</tr>
<tr>
<td class="key">회원그룹</td>
<td><?php echo $sosokname['name']?></td>
<td class="key">회원등급</td>
<td><?php echo $levelname['name']?> (<?php echo $M['level']?> / <?php echo $levelnum['uid']?>)</td>
</tr>
<tr>
<td class="key">가입사이트</td>
<td><?php echo $joinsite['name']?></td>
<td class="key">포인트</td>
<td>
<?php echo number_format($M['point'])?> (사용 : <?php echo number_format($M['usepoint'])?>)
(적립 : <?php echo number_format($M['cash'])?>)
(예치 : <?php echo number_format($M['money'])?>)
</td>

View File

@@ -0,0 +1,151 @@
<?php
include_once $g['dir_module_skin'].'_menu.php';
$levelnum = getDbData($table['s_mbrlevel'],'gid=1','*');
$levelname= getDbData($table['s_mbrlevel'],'uid='.$M['level'],'*');
$sosokname= getDbData($table['s_mbrgroup'],'uid='.$M['sosok'],'*');
$joinsite = getDbData($table['s_site'],'uid='.$M['site'],'*');
$M1 = getUidData($table['s_mbrid'],$M['memberuid']);
$lastlogdate = -getRemainDate($M['last_log']);
?>
<div id="mypage_main">
<div class="photo"><?php if($M['photo']):?><img src="<?php echo $g['url_root']?>/_var/simbol/<?php echo $M['photo']?>" alt="<?php echo $M['photo']?>" /><?php endif?></div>
<table summary="<?php echo $M[$_HS['nametype']]?>님의 회원 요약정보입니다.">
<caption>회원요약정보</caption>
<colgroup>
<col width="120">
<col>
<col width="120">
<col>
</colgroup>
<thead>
<tr>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="key">이름</td>
<td><?php echo $M['name']?></td>
<td class="key">닉네임</td>
<td><?php echo $M['nic']?></td>
</tr>
<tr>
<td class="key">아이디</td>
<td><?php echo $M1['id']?></td>
<td class="key">가입일</td>
<td><?php echo getDateFormat($M['d_regis'],'Y/m/d H:i')?></td>
</tr>
<tr>
<td class="key">최근접속</td>
<td><?php echo getDateFormat($M['last_log'],'Y/m/d H:i')?> (<?php echo $lastlogdate?$lastlogdate.'일전':'오늘'?>)</td>
<td class="key">연락처</td>
<td><?php echo $M['tel2']?$M['tel2']:$M['tel1']?></td>
</tr>
<tr>
<td class="key">이메일</td>
<td><?php echo $M['email']?></td>
<td class="key">지역</td>
<td><?php echo $M['addr0']=='해외'?$M['addr0']:$M['addr1']?></td>
</tr>
<tr>
<td class="key">나이/성별</td>
<td><?php if($M['birth1']):?><?php echo getAge($M['birth1'])?>세<?php endif?><?php if($M['birth1']&&$M['sex']):?> / <?php endif?><?php if($M['sex']):?><?php echo getSex($M['sex'])?>성<?php endif?></td>
<td class="key">생년월일</td>
<td><?php if($M['birth1']):?><?php echo $M['birth1']?>/<?php echo substr($M['birth2'],0,2)?>/<?php echo substr($M['birth2'],2,2)?><?php endif?></td>
</tr>
<tr>
<td class="key">회원그룹</td>
<td><?php echo $sosokname['name']?></td>
<td class="key">회원등급</td>
<td><?php echo $levelname['name']?> (<?php echo $M['level']?> / <?php echo $levelnum['uid']?>)</td>
</tr>
<tr>
<td class="key">가입사이트</td>
<td><?php echo $joinsite['name']?></td>
<td class="key">포인트</td>
<td>
<?php echo number_format($M['point'])?> (사용 : <?php echo number_format($M['usepoint'])?>)
(적립 : <?php echo number_format($M['cash'])?>)
(예치 : <?php echo number_format($M['money'])?>)
</td>

View File

@@ -0,0 +1,30 @@
/* list */
#bbslist {margin:auto;padding:0 0 30px 0;}
#bbslist .info {height:28px;}
#bbslist .info .article {float:left;font-size:11px;font-family:gothic,dotum;color:#c0c0c0;padding:5px 0 0 5px;}
#bbslist .info .article a {position:relative;top:3px;left:3px;}
#bbslist .info .category {float:right;}
#bbslist .info .category select .sline {color:#c0c0c0;}
#bbslist table {width:100%;border-spacing:0px;border-collapse:collapse;}
#bbslist table caption {display:none;}
#bbslist thead th {height:28px;border-top:#D2D2D2 solid 1px;border-bottom:#D2D2D2 solid 1px;background:url('../../../../../../_core/image/_public/bg_list_tt.jpg');font-size:11px;font-family:dotum;font-weight:normal;color:#787878;}
#bbslist thead .side1 {border-left:#D2D2D2 solid 1px;}
#bbslist thead .side2 {border-right:#D2D2D2 solid 1px;}
#bbslist tbody .noticetr td {background:url('');background:#FAFAFA;border-bottom:#EBEBEB solid 1px;}
#bbslist tbody .noticetr td a {font-weight:bold;}
#bbslist tbody td {text-align:center;color:#888888;font-family:arial;font-size:10px;border-bottom:#E6E6E6 solid 1px;letter-spacing:-1px;}

View File

@@ -0,0 +1,172 @@
<?php
include_once $g['dir_module_skin'].'_menu.php';
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
$bbsque = 'mbruid='.$M['memberuid'];
if ($account) $bbsque .= ' and site='.$account;
if ($where && $keyword)
{
if (strstr('[name][nic][id][ip]',$where)) $bbsque .= " and ".$where."='".$keyword."'";
else if ($where == 'term') $bbsque .= " and d_regis like '".$keyword."%'";
else $bbsque .= getSearchSql($where,$keyword,$ikeyword,'or');
}
$RCD = getDbArray($table['s_oneline'],$bbsque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_oneline'],$bbsque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div id="bbslist">
<div class="info">
<div class="article">
<?php echo number_format($NUM)?>개(<?php echo $p?>/<?php echo $TPG?>페이지)
</div>
<div class="category">
<select name="account" class="account" onchange="goHref('<?php echo str_replace('&amp;','&',$g['url_reset'])?>&page=<?php echo $page?>&account='+this.value);">
<option value="">&nbsp;+ 전체사이트</option>
<option value="">----------------</option>
<?php $SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1)?>
<?php while($S = db_fetch_array($SITES)):?>
<option value="<?php echo $S['uid']?>"<?php if($account==$S['uid']):?> selected="selected"<?php endif?>>ㆍ<?php echo $S['name']?></option>
<?php endwhile?>
<?php if(!db_num_rows($SITES)):?>
<option value="">등록된 사이트가 없습니다.</option>
<?php endif?>
</select>
</div>
<div class="clear"></div>
</div>
<form name="procForm" 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="comment" />
<input type="hidden" name="a" value="" />
<table summary="한줄의견리스트 입니다.">
<caption>한줄의견리스트</caption>
<colgroup>
<col width="30">
<col width="50">
<col>
<col width="90">
</colgroup>
<thead>
<tr>
<th scope="col" class="side1"><img src="<?php echo $g['img_core']?>/_public/ico_check_01.gif" class="hand" alt="" onclick="chkFlag('oneline_members[]');" /></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)):?>
<?php $_R=getUidData($table['s_comment'],$R['parent'])?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<tr>
<td><input type="checkbox" name="oneline_members[]" value="<?php echo $R['uid']?>" /></td>
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
<td class="sbj">
<?php if($R['mobile']):?><img src="<?php echo $g['img_core']?>/_public/ico_mobile.gif" class="imgpos" alt="모바일" title="모바일(<?php echo $R['mobile']?>)로 등록된 글입니다" /><?php endif?>
<a href="<?php echo getCyncUrl($_R['cync'].',CMT:'.$_R['uid'].',s:'.$R['site'])?>#CMT" target="_blank"><?php echo getStrCut($R['content'],40,'..')?></a>
<?php if(getNew($R['d_regis'],24)):?><span class="new">new</span><?php endif?>
</td>
<td><?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?></td>
</tr>
<?php endwhile?>
<?php if(!$NUM):?>

View File

@@ -0,0 +1,19 @@
#paperlist {padding:0 0 30px 0;}
#paperlist .info {height:28px;}
#paperlist .info .article {float:left;font-size:11px;font-family:gothic,dotum;color:#c0c0c0;padding:5px 0 0 5px;}
#paperlist .info .category {float:right;}
#paperlist table {width:100%;border-spacing:0px;border-collapse:collapse;}
#paperlist table caption {display:none;}
#paperlist thead th {height:28px;border-top:#D2D2D2 solid 1px;border-bottom:#D2D2D2 solid 1px;background:url('../../../../../../_core/image/_public/bg_list_tt.jpg');font-size:11px;font-family:dotum;font-weight:normal;color:#787878;}
#paperlist thead .side1 {border-left:#D2D2D2 solid 1px;}
#paperlist thead .side2 {border-right:#D2D2D2 solid 1px;}
#paperlist tbody td {text-align:center;color:#888888;font-family:arial;font-size:10px;border-bottom:#E6E6E6 solid 1px;letter-spacing:-1px;}

View File

@@ -0,0 +1,201 @@
<?php
include_once $g['dir_module_skin'].'_menu.php';
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
if ($inbox == 3)
{
$sqlque = 'by_mbruid='.$M['memberuid'];
}
else
{
$sqlque = 'my_mbruid='.$M['memberuid'];
if ($inbox) $sqlque .= " and inbox='".$inbox."'";
if ($where && $keyword)
{
$sqlque .= getSearchSql($where,$keyword,$ikeyword,'or');
}
}
$RCD = getDbArray($table['s_paper'],$sqlque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_paper'],$sqlque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div id="paperlist">
<div class="info">
<div class="article">
<?php echo number_format($NUM)?>개(<?php echo $p?>/<?php echo $TPG?>페이지)
</div>
<div class="category">
<select onchange="goHref('<?php echo str_replace('&amp;','&',$g['url_page'])?>&inbox='+this.value);">
<option value="">&nbsp;+ 전체</option>
<option value="">-------------</option>
<option value="1"<?php if($inbox==1):?> selected="selected"<?php endif?>>받은쪽지함</option>
<option value="2"<?php if($inbox==2):?> selected="selected"<?php endif?>>쪽지보관함</option>
<option value="3"<?php if($inbox==3):?> selected="selected"<?php endif?>>보낸쪽지함</option>
</select>
</div>
<div class="clear"></div>
</div>
<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 summary="쪽지 리스트입니다.">
<caption>쪽지</caption>
<colgroup>
<col width="30">
<col width="50">
<col width="80">
<col width="20">
<col>
<col width="90">
</colgroup>
<thead>
<tr>
<th scope="col" class="side1"><img src="<?php echo $g['img_core']?>/_public/ico_check_01.gif" class="hand" alt="" onclick="chkFlag('members[]');" /></th>
<th scope="col">번호</th>
<th scope="col"><?php echo $inbox==3?'받는이':'보낸이'?></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)):?>
<?php $R['content']=str_replace('&nbsp;',' ',$R['content'])?>
<?php $M=getDbData($table['s_mbrdata'],'memberuid='.$R[($index==3?'m':'b').'y_mbruid'],'*')?>
<tr>
<td><input type="checkbox" name="members[]" value="<?php echo $R['uid']?>" /></td>
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
<td class="cat"><?php echo $M[$_HS['nametype']]?$M[$_HS['nametype']]:'시스템'?></td>
<td><img src="<?php echo $g['img_core']?>/_public/ico_paper.gif" alt=""<?php if($R['d_read']):?> title="<?php echo getDateFormat($R['d_read'],'Y.m.d H:i 열람')?>" class="isread"<?php endif?> /></td>
<td class="sbj">
<a href="#." title="<?php echo getStrCut(htmlspecialchars(strip_tags($R['content'])),100,'...')?>" onmouseover="qTilePop(this);" onmouseout="qTilePopKill(this);"><?php echo getStrCut(strip_tags($R['content']),50,'..')?></a>
<?php if(getNew($R['d_regis'],24)):?><span class="new">new</span><?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>1</td>
<td class="cat">시스템</td>
<td><img src="<?php echo $g['img_core']?>/_public/ico_paper.gif" alt="" /></td>
<td class="sbj1">쪽지가 없습니다.</td>
<td><?php echo getDateFormat($date['totime'],'Y.m.d H:i')?></td>

View File

@@ -0,0 +1,16 @@
#pointlist {padding:0 0 30px 0;}
#pointlist .info {height:28px;}
#pointlist .info .article {float:left;font-size:11px;font-family:gothic,dotum;color:#c0c0c0;padding:5px 0 0 5px;}
#pointlist .info .category {float:right;}
#pointlist table {width:100%;border-spacing:0px;border-collapse:collapse;}
#pointlist table caption {display:none;}
#pointlist thead th {height:28px;border-top:#D2D2D2 solid 1px;border-bottom:#D2D2D2 solid 1px;background:url('../../../../../../_core/image/_public/bg_list_tt.jpg');font-size:11px;font-family:dotum;font-weight:normal;color:#787878;}
#pointlist thead .side1 {border-left:#D2D2D2 solid 1px;}

View File

@@ -0,0 +1,205 @@
<?php
include_once $g['dir_module_skin'].'_menu.php';
$type = $type ? $type : 'point';
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
$sqlque = 'my_mbruid='.$M['memberuid'];
if ($price == '1') $sqlque .= ' and price > 0';
if ($price == '2') $sqlque .= ' and price < 0';
if ($where && $keyword)
{
$sqlque .= getSearchSql($where,$keyword,$ikeyword,'or');
}
$RCD = getDbArray($table['s_'.$type],$sqlque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_'.$type],$sqlque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div id="pointlist">
<div class="info">
<div class="article">
<span class="tx">
<a class="<?php if($type=='point'):?>b <?php endif?>hand" onclick="document.hideForm.type.value='point';document.hideForm.submit();">포인트</a> |
<a class="<?php if($type=='cash'):?>b <?php endif?>hand" onclick="document.hideForm.type.value='cash';document.hideForm.submit();">적립금</a> |
<a class="<?php if($type=='money'):?>b <?php endif?>hand" onclick="document.hideForm.type.value='money';document.hideForm.submit();">예치금</a>
</span>
<?php echo number_format($M[$type])?> (<?php echo $p?>/<?php echo $TPG?>페이지)
</div>
<div class="category">
<form name="giveForm" action="<?php echo $g['s']?>/" method="post" target="_action_frame_<?php echo $m?>" onsubmit="return giveCheck(this);">
<input type="hidden" name="r" value="<?php echo $r?>" />
<input type="hidden" name="m" value="<?php echo $m?>" />
<input type="hidden" name="a" value="admin_action" />
<input type="hidden" name="act" value="give_point" />
<input type="checkbox" name="mbrmembers[]" value="<?php echo $M['memberuid']?>" checked="checked" class="hide" />
<input type="hidden" name="pointType" value="<?php echo $type?>" />
<select name="how" class="sm">
<option value="+">+</option>
<option value="-">-</option>
</select>
<input type="text" name="price" size="5" class="input" /><?php echo $type=='point'?'P':'원'?> | 지급사유 :
<input type="text" name="comment" size="35" class="input" />
<input type="submit" class="btngray" value="지급(차감)" />
</form>
</div>
<div class="clear"></div>
</div>
<form name="hideForm" action="<?php echo $g['s']?>/" method="get">
<input type="hidden" name="r" value="<?php echo $r?>" />
<input type="hidden" name="m" value="<?php echo $m?>" />
<input type="hidden" name="iframe" value="<?php echo $iframe?>" />
<input type="hidden" name="front" value="<?php echo $front?>" />
<input type="hidden" name="mbruid" value="<?php echo $mbruid?>" />
<input type="hidden" name="page" value="<?php echo $page?>" />
<input type="hidden" name="type" value="<?php echo $type?>" />
<input type="hidden" name="price" value="<?php echo $price?>" />
</form>
<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 summary="포인트 리스트입니다.">
<caption>포인트</caption>
<colgroup>
<col width="30">
<col width="50">
<col width="80">
<col>
<col width="90">
</colgroup>
<thead>
<tr>
<th scope="col" class="side1"><img src="<?php echo $g['img_core']?>/_public/ico_check_01.gif" class="hand" alt="" onclick="chkFlag('members[]');" /></th>
<th scope="col">번호</th>
<th scope="col">
<select onchange="document.hideForm.price.value=this.value;document.hideForm.submit();">
<option value="">&nbsp;+ 전체</option>
<option value="">-----</option>
<option value="1"<?php if($price=='1'):?> selected="selected"<?php endif?>>획득</option>
<option value="2"<?php if($price=='2'):?> selected="selected"<?php endif?>>사용</option>
</select>
</th>
<th scope="col">내역</th>
<th scope="col" class="side2">날짜</th>
</tr>
</thead>
<tbody>

View File

@@ -0,0 +1,31 @@
/* list */
#bbslist {margin:auto;padding:0 0 30px 0;}
#bbslist .info {height:28px;}
#bbslist .info .article {float:left;font-size:11px;font-family:gothic,dotum;color:#c0c0c0;padding:5px 0 0 5px;}
#bbslist .info .article a {position:relative;top:3px;left:3px;}
#bbslist .info .category {float:right;}
#bbslist .info .category select .sline {color:#c0c0c0;}
#bbslist table {width:100%;border-spacing:0px;border-collapse:collapse;}
#bbslist table caption {display:none;}
#bbslist thead th {height:28px;border-top:#D2D2D2 solid 1px;border-bottom:#D2D2D2 solid 1px;background:url('../../../../../../_core/image/_public/bg_list_tt.jpg');font-size:11px;font-family:dotum;font-weight:normal;color:#787878;}
#bbslist thead .side1 {border-left:#D2D2D2 solid 1px;}
#bbslist thead .side2 {border-right:#D2D2D2 solid 1px;}
#bbslist tbody .noticetr td {background:url('');background:#FAFAFA;border-bottom:#EBEBEB solid 1px;}
#bbslist tbody .noticetr td a {font-weight:bold;}
#bbslist tbody td {text-align:center;color:#888888;font-family:arial;font-size:10px;border-bottom:#E6E6E6 solid 1px;letter-spacing:-1px;}
#bbslist .bbsid {font-size:11px;font-family:arial;}

View File

@@ -0,0 +1,205 @@
<?php
include_once $g['dir_module_skin'].'_menu.php';
$sort = $sort ? $sort : 'gid';
$orderby= $orderby ? $orderby : 'asc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
$bbsque = 'mbruid='.$M['memberuid'];
if ($account) $bbsque .= ' and site='.$account;
if ($bid) $bbsque .= ' and bbs='.$bid;
if ($where && $keyword)
{
if (strstr('[name][nic][id][ip]',$where)) $bbsque .= " and ".$where."='".$keyword."'";
else if ($where == 'term') $bbsque .= " and d_regis like '".$keyword."%'";
else $bbsque .= getSearchSql($where,$keyword,$ikeyword,'or');
}
$RCD = getDbArray($table['bbsdata'],$bbsque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['bbsdata'],$bbsque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div id="bbslist">
<div class="info">
<div class="article">
<?php echo number_format($NUM)?>개(<?php echo $p?>/<?php echo $TPG?>페이지)
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=bbs&amp;mbruid=<?php echo $M['memberuid']?>&amp;mod=rss" target="_blank"><img src="<?php echo $g['img_core']?>/_public/ico_rss.gif" alt="rss" /></a>
</div>
<div class="category">
<select name="account" class="account" onchange="goHref('<?php echo str_replace('&amp;','&',$g['url_reset'])?>&page=<?php echo $page?>&bid=<?php echo $bid?>&account='+this.value);">
<option value="">&nbsp;+ 전체사이트</option>
<option value="">----------------</option>
<?php $SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1)?>
<?php while($S = db_fetch_array($SITES)):?>
<option value="<?php echo $S['uid']?>"<?php if($account==$S['uid']):?> selected="selected"<?php endif?>>ㆍ<?php echo $S['name']?></option>
<?php endwhile?>
<?php if(!db_num_rows($SITES)):?>
<option value="">등록된 사이트가 없습니다.</option>
<?php endif?>
</select>
<select name="bid" onchange="goHref('<?php echo str_replace('&amp;','&',$g['url_reset'])?>&page=<?php echo $page?>&account=<?php echo $account?>&bid='+this.value);">
<option value="">&nbsp;+ 전체게시판</option>
<option value="">----------------</option>
<?php $SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1)?>
<?php $_BBSLIST = getDbArray($table['bbslist'],'','*','gid','asc',0,1)?>
<?php while($_B=db_fetch_array($_BBSLIST)):?>
<option value="<?php echo $_B['uid']?>"<?php if($_B['uid']==$bid):?> selected="selected"<?php endif?>>ㆍ<?php echo $_B['name']?>(<?php echo $_B['id']?>)</option>
<?php endwhile?>
<?php if(!db_num_rows($_BBSLIST)):?>
<option value="">등록된 게시판이 없습니다.</option>
<?php endif?>
</select>
</div>
<div class="clear"></div>
</div>
<form name="procForm" 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="bbs" />
<input type="hidden" name="a" value="" />
<table summary="<?php echo $B['name']?$B['name']:'전체'?> 게시물리스트 입니다.">
<caption><?php echo $B['name']?$B['name']:'전체게시물'?></caption>
<colgroup>
<col width="30">
<col width="50">
<col width="80">
<col>
<col width="70">
<col width="90">
</colgroup>
<thead>
<tr>
<th scope="col" class="side1"><img src="<?php echo $g['img_core']?>/_public/ico_check_01.gif" class="hand" alt="" onclick="chkFlag('post_members[]');" /></th>
<th scope="col">번호</th>
<th scope="col">게시판</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)):?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<tr>
<td><input type="checkbox" name="post_members[]" value="<?php echo $R['uid']?>" /></td>
<td>
<?php if($R['uid'] != $uid):?>
<?php echo $NUM-((($p-1)*$recnum)+$_rec++)?>
<?php else:$_rec++?>
<span class="now">&gt;&gt;</span>
<?php endif?>
</td>
<td class="bbsid"><?php echo $R['bbsid']?></td>

View File

@@ -0,0 +1,18 @@
#scraplist {padding:0 0 30px 0;}
#scraplist .info {height:28px;}
#scraplist .info .article {float:left;font-size:11px;font-family:gothic,dotum;color:#c0c0c0;padding:5px 0 0 5px;}
#scraplist .info .category {float:right;}
#scraplist table {width:100%;border-spacing:0px;border-collapse:collapse;}
#scraplist table caption {display:none;}
#scraplist thead th {height:28px;border-top:#D2D2D2 solid 1px;border-bottom:#D2D2D2 solid 1px;background:url('../../../../../../_core/image/_public/bg_list_tt.jpg');font-size:11px;font-family:dotum;font-weight:normal;color:#787878;}
#scraplist thead .side1 {border-left:#D2D2D2 solid 1px;}
#scraplist thead .side2 {border-right:#D2D2D2 solid 1px;}

View File

@@ -0,0 +1,172 @@
<?php
include_once $g['dir_module_skin'].'_menu.php';
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
$sqlque = 'mbruid='.$M['memberuid'];
if ($category) $sqlque .= " and category='".$category."'";
if ($where && $keyword)
{
$sqlque .= getSearchSql($where,$keyword,$ikeyword,'or');
}
$RCD = getDbArray($table['s_scrap'],$sqlque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_scrap'],$sqlque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div id="scraplist">
<div class="info">
<div class="article">
<?php echo number_format($NUM)?>개(<?php echo $p?>/<?php echo $TPG?>페이지)
</div>
<div class="category">
<select onchange="goHref('<?php echo str_replace('&amp;','&',$g['url_page'])?>&category='+this.value);">
<option value="">&nbsp;+ 전체</option>
<option value="">-------------</option>
<?php $_CATS = getDbSelect($table['s_scrap'],"mbruid=".$M['memberuid']." and category<>'' group by category",'category')?>
<?php while($_R=db_fetch_array($_CATS)):?>
<option value="<?php echo $_R['category']?>"<?php if($_R['category']==$category):?> selected="selected"<?php endif?>>ㆍ<?php echo $_R['category']?></option>
<?php endwhile?>
</select>
</div>
<div class="clear"></div>
</div>
<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 summary="스크랩 리스트입니다.">
<caption>스크랩</caption>
<colgroup>
<col width="30">
<col width="50">
<col width="100">
<col>
<col width="90">
</colgroup>
<thead>
<tr>
<th scope="col" class="side1"><img src="<?php echo $g['img_core']?>/_public/ico_check_01.gif" class="hand" alt="" onclick="chkFlag('members[]');" /></th>
<th scope="col">번호</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 $NUM-((($p-1)*$recnum)+$_rec++)?></td>
<td class="cat"><?php echo $R['category']?></td>
<td class="sbj">
<a href="<?php echo $R['url']?>" target="_blank"><?php echo $R['subject']?></a>
<?php if(getNew($R['d_regis'],24)):?><span class="new">new</span><?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>1</td>

View File

@@ -0,0 +1 @@
부스트트랩 4 심플형

View File

@@ -0,0 +1,39 @@
.nav-link.filter-item {
padding: 8px 10px;
margin-bottom: 2px;
overflow: hidden;
font-size: 14px;
color: #586069;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
border-radius: 3px;
}
.nav-link.filter-item:hover {
text-decoration: none;
background-color: #eaecef;
color: #586069;
}
.card-header .btn-sm {
padding: .15rem .4rem;
font-size: .875rem;
background-color: #fff;
background-image: none;
border-radius: 2px
}
.card .list-group-item .btn-sm {
padding: .15rem .4rem;
font-size: .875rem;
background-color: #fff;
background-image: none;
border-radius: 2px
}
.card .list-group-item .media-body p {
display: inline-block;
line-height: 1.4;
font-size: 12px;
color: #999
}

View File

@@ -0,0 +1,37 @@
<nav class="nav flex-column nav-pills">
<a class="nav-link filter-item d-flex justify-content-between align-items-center<?php echo !$module&&!$fromsys?' active':'' ?>"
href="<?php echo $pageHome ?>">
전체보기
<span class="badge badge-pill"><?php echo number_format(getDbRows($table['s_notice'],'mbruid='.$my['uid']))?></span>
</a>
<a class="nav-link filter-item d-flex justify-content-between align-items-center<?php echo $fromsys?' active':'' ?>"
href="<?php echo $pageHome ?>?fromsys=Y">
시스템 알림
<span class="badge badge-pill"><?php echo number_format(getDbRows($table['s_notice'],'mbruid='.$my['uid'].' and frommbr=0'))?></span>
</a>
</nav>
<hr>
<nav class="nav flex-column nav-pills">
<?php $_MODULES=getDbArray($table['s_module'],'','*','gid','asc',0,1)?>
<?php while($_MD=db_fetch_array($_MODULES)):?>
<a class="nav-link filter-item justify-content-between align-items-center <?php echo $module==$_MD['id']?' active ':'' ?><?php if(strstr($d['ntfc']['cut_modules'],'['.$_MD['id'].']')):?>d-none<?php else: ?>d-flex<?php endif?>"
href="<?php echo $pageHome ?>?module=<?php echo $_MD['id']?>" id="module_members_<?php echo $_MD['id']?>">
<?php echo $_MD['name']?>
<span class="badge badge-pill"><?php echo number_format(getDbRows($table['s_notice'],'mbruid='.$my['uid'].' and frommodule="'.$_MD['id'].'"'))?></span>
</a>
<?php endwhile?>
</nav>
<hr>
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=notification&amp;a=multi_delete_user&amp;deltype=delete_all" class="btn btn-light btn-block" onclick="return hrefCheck(this,true,'정말로 전체 알림 삭제를 하시겠습니까?');">
<i class="fa fa-trash-o fa-fw" aria-hidden="true"></i>
알림함 비우기
</a>
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;mod=settings&amp;page=noti" class="btn btn-light btn-block">
<i class="fa fa-cog fa-fw" aria-hidden="true"></i>
알림 설정
</a>

View File

@@ -0,0 +1,59 @@
<div class="modal fade" tabindex="-1" role="dialog" id="modal-noti">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header bg-light align-items-center">
<h5 class="modal-title">
<i class="fa fa-bell-o fa-fw" aria-hidden="true"></i> 알림
<span class="badge badge-light align-text-top" data-role="from"></span>
</h5>
<div class="text-muted">
<i class="fa fa-clock-o fa-fw" aria-hidden="true"></i> <span data-role="d_regis">2018.10.12</span>
</div>
</div>
<div class="modal-body">
<p data-role="message"></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-dismiss="modal">닫기</button>
<a class="btn btn-primary" data-role="referer" target="_blank">내용확인</a>
</div>
</div>
</div>
</div>
<script>
var modal_noti = $('#modal-noti') // 알림보기 팝업
$(function() {
$(document).on('show.bs.modal','#sheet-noti',function(event){
var item = $(event.relatedTarget)
var uid = item.data('uid')
var from = item.data('from')
modal_noti.find('[data-role="from"]').text(from)
$.post(rooturl+'/?r='+raccount+'&m=notification&a=get_notiData',{
uid : uid
},function(response){
var result = $.parseJSON(response);
var referer=result.referer;
var d_regis=result.d_regis;
var message=result.message;
modal_noti.find('[data-role="message"]').html(message)
modal_noti.find('[data-role="d_regis"]').text(d_regis)
if (referer) modal_noti.find('[data-role="referer"]').attr('href',referer)
else modal_noti.find('[data-role="referer"]').addClass('d-none')
});
})
$(document).on('hidden.bs.modal',modal_noti,function(event){
//내용 초기화
modal_noti.find('[data-role="from"]').html('')
modal_noti.find('[data-role="referer"]').removeClass('d-none')
modal_noti.find('[data-role="message"]').text('')
modal_noti.find('[data-role="d_regis"]').text('')
})
});
</script>

View File

@@ -0,0 +1,296 @@
<?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);
$pageHome = './noti';
if ($module) {
$pageLink = './noti?module='.$module.'&amp;';
} else {
$pageLink = './noti?';
}
//모든 알림 읽음처리
getDbUpdate($table['s_notice'],"d_read='".$date['totime']."'",$sqlque);
getDbUpdate($table['s_mbrdata'],'num_notice=0','memberuid='.$my['uid']);
?>
<div class="container">
<div class="subhead mt-0">
<h2 class="subhead-heading">
<i class="fa fa-bell-o fa-fw" aria-hidden="true"></i> 내 알림함
</h2>
<span class="text-muted">알림을 수신하면 웹 사이트내의 정보는 물론 회원님이 언급되거나 관련된 정보들을 실시간으로 받아보실 수 있습니다.</span>
</div>
<div class="row mt-3">
<div class="col-3">
<?php include $g['dir_module_skin'].'_nav.php';?>
</div><!-- /.col-3 -->
<div class="col-9">
<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>
<?php if($NUM):?>
<div class="d-flex justify-content-center my-4">
<ul class="pagination mb-0">
<?php echo getPageLink(10,$p,$TPG,'')?>
</ul>
</div>
<?php endif?>
</div><!-- /.col-9 -->
</div><!-- /.row -->
</div><!-- /.container -->
<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>

View File

@@ -0,0 +1,11 @@
<div class="jumbotron jumbotron-fluid bg-light py-5 mb-0">
<div class="container">
<h1 class="display-2 text-center">404</h1>
<p class="lead text-center text-muted">페이지를 찾을수 없습니다.</p>
</div>
</div>
<script type="text/javascript">
// $('.navbar').attr('hidden',true)
document.title = 'Page not found · <?php echo $g['browtitle']?>';
</script>

View File

@@ -0,0 +1,148 @@
.page-wrapper {
margin-top: 20px
}
.page-nav {
padding-right: 16px !important;
}
.page-nav .btn::after {
content: ''
}
.page-nav .btn.active::after {
content: ' 취소'
}
.vcard-fullname {
margin-bottom: 2px;
font-size: 26px;
line-height: 30px;
}
.vcard-username {
font-size: 16px;
font-style: normal;
font-weight: 300;
line-height: 24px;
color: #666;
}
.vcard-detail {
padding-left: 22px;
font-size: 14px
}
.vcard-detail .fa {
margin-left: -22px;
}
.avatar-group-item {
display: inline-block;
margin-bottom: 3px;
}
.avatar {
display: inline-block;
overflow: hidden;
line-height: 1;
vertical-align: middle;
border-radius: 3px;
}
.page-main {
padding-left: 8px !important;
}
.user-profile-nav {
background-color: #fff;
border-bottom: solid 1px #d1d5da;
}
.user-profile-nav .underline-nav {
height: 62px;
display: table;
}
.user-profile-nav .underline-nav .nav-link {
display: table-cell;
padding-right: 15px;
padding-left: 15px;
color: #586069;
vertical-align: middle;
border-bottom: 2px solid transparent;
}
.user-profile-nav .underline-nav .nav-link.active {
color: #24292e;
border-bottom-color: #e36209;
}
.page-main .Subhead {
display: -webkit-box;
display: -webkit-flex;
display: flex;
padding-bottom: 8px;
margin-bottom: 20px;
border-bottom: 1px #e1e4e8 solid;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
}
.page-main .Subhead-heading {
margin-bottom: 0;
font-size: 24px;
font-weight: normal;
-webkit-box-flex: 1;
-webkit-flex: 1 1 auto;
flex: 1 1 auto;
}
/*org*/
.pagehead {
padding-top: 20px;
padding-bottom: 0;
margin-bottom: 20px;
color: #666;
background-color: #fafbfc;
border-bottom: 1px solid #eee;
}
.pagehead .avatar {
width: 100px;
}
.org-name {
font-weight: normal;
color: #333;
}
.pagehead .nav-tabs {
position: relative;
top: 1px;
margin-top: -5px;
}
.pagehead .nav-tabs .nav-link:focus,
.pagehead .nav-tabs .nav-link:hover {
border-color: transparent;
}
.pagehead .nav-tabs .nav-link {
padding: 7px 15px 8px;
font-size: 16px;
color: #586069;
white-space: nowrap;
border: solid transparent;
border-width: 3px 1px 1px;
border-radius: 3px 3px 0 0;
}
.pagehead .nav-tabs .nav-link.active {
color: #24292e;
background-color: #fff;
border-color: #e36209 #e1e4e8 transparent;
}
.pagehead .nav-tabs .nav-link .badge-light {
display: inline-block;
padding: 2px 5px;
font-size: 12px;
font-weight: 600;
line-height: 1;
color: #444d56;
background-color: rgba(27,31,35,0.08);
border-radius: 20px;
}
/* list-group */
.list-group-flush .list-group-item {
border-style: dotted;
}
[data-role="follow"].active {
background-color: #e0e0e0 !important;
color: #696969 !important;
border: none !important
}
[data-role="follow"].active::after {
content: '취소'
}

View File

@@ -0,0 +1,8 @@
$( document ).ready(function() {
$('[data-toggle="actionIframe"] , [data-act="actionIframe"]').click(function() {
getIframeForAction('');
frames.__iframe_for_action__.location.href = $(this).attr("data-url");
});
})

View File

@@ -0,0 +1,51 @@
<?php
//동기화URL
function getSyncUrl($sync){
if (!$sync) return $GLOBALS['g']['r'];
$_r = getArrayString($sync);
$_r = $_r['data'][5];
if ($GLOBALS['_HS']['rewrite']&&strpos('_'.$_r,'m:bbs,bid:'))
{
$_r = str_replace('m:bbs','b',$_r);
$_r = str_replace(',bid:','/',$_r);
$_r = str_replace(',uid:','/',$_r);
$_r = str_replace(',CMT:','/',$_r);
$_r = str_replace(',s:','/s',$_r);
return $GLOBALS['g']['r'].'/'.$_r;
}
else return $GLOBALS['g']['s'].'/?'.($GLOBALS['_HS']['usescode']?'r='.$GLOBALS['_HS']['id'].'&amp;':'').str_replace(':','=',str_replace(',','&amp;',$_r));
}
$para_str = $_HS['rewrite']?'/':'&page=';
?>
<div class="user-profile-nav">
<nav class="nav underline-nav">
<a class="nav-link f16<?php if ($page=='main'): ?> active<?php endif; ?>" href="<?php echo getProfileLink($_MP['uid']) ?>">홈</a>
<a class="nav-link f16<?php if ($page=='post'): ?> active<?php endif; ?>" href="<?php echo getProfileLink($_MP['uid']).$para_str ?>post">
포스트
</a>
<a class="nav-link f16<?php if ($page=='list'): ?> active<?php endif; ?>" href="<?php echo getProfileLink($_MP['uid']).$para_str ?>list">
리스트
</a>
<a class="nav-link f16<?php if ($page=='bbs'): ?> active<?php endif; ?>" href="<?php echo getProfileLink($_MP['uid']).$para_str ?>bbs">
게시판
</a>
<a class="nav-link f16<?php if ($page=='comment'): ?> active<?php endif; ?>" href="<?php echo getProfileLink($_MP['uid']).$para_str ?>comment">
댓글
</a>
<a class="nav-link f16<?php if ($page=='oneline'): ?> active<?php endif; ?>" href="<?php echo getProfileLink($_MP['uid']).$para_str ?>oneline">
한줄의견
</a>
<a class="nav-link f16<?php if ($page=='follower'): ?> active<?php endif; ?>" href="<?php echo getProfileLink($_MP['uid']).$para_str ?>follower">
<span data-toggle="tooltip" title="<?php echo $_MP['nic'] ?>님을 구독하는 사람">팔로워</span>
<span class="badge"> <?php echo getDbRows($table['s_friend'],'by_mbruid='.$_MP['uid'])?></span>
</a>
<a class="nav-link f16<?php if ($page=='following'): ?> active<?php endif; ?>" href="<?php echo getProfileLink($_MP['uid']).$para_str ?>following">
<span data-toggle="tooltip" title="<?php echo $_MP['nic'] ?>님이 구독하는 사람">팔로잉</span>
<span class="badge"> <?php echo getDbRows($table['s_friend'],'my_mbruid='.$_MP['uid'])?></span>
</a>
</nav>
</div>

View File

@@ -0,0 +1,74 @@
<?php
$wdgvar['limit'] = 3; //전체 출력수
$wdgvar['recnum'] =3; //한 열에 출력할 카드 갯수
$wdgvar['title'] ='최근 리스트';
$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='.$_MP['uid'].' and site='.$s;
if ($my['uid']) $listque .= ' and display > 3'; // 회원공개와 전체공개 포스트 출력
else $listque .= ' and display = 5'; // 전체공개 포스트만 출력
$_RCD=getDbArray($table['postlist'],$listque,'*','gid','asc',$wdgvar['limit'],1);
$_NUM = getDbRows($table['postlist'],$listque);
?>
<section class="widget-post-card-01">
<header class="d-flex justify-content-between align-items-center py-2">
<strong><?php echo $wdgvar['title']?></strong>
</header>
<?php if ($_NUM): ?>
<div class="row gutter-half" data-role="post-list">
<?php $i=0;foreach($_RCD as $R):$i++;?>
<div class="col">
<div class="card border-0" id="item-<?php echo $_R['uid'] ?>">
<a class="position-relative" href="<?php echo getListLink($R,1) ?>">
<img src="<?php echo getPreviewResize(getListImageSrc($R['uid']),'320x180') ?>" alt="" class="card-img-top border">
<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 py-3 px-0">
<h6 class="card-title mb-0 line-clamp-2">
<a class="muted-link" href="<?php echo getListLink($R,1) ?>">
<?php echo getStrCut($R['name'],100,'..')?>
</a>
</h6>
<time class="text-muted small" data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_regis'],'c')?>"></time>
<?php if ($_IS_PROFILEOWN): ?>
<span class="badge badge-light"><?php echo $R['display']!=5?$g['displaySet']['label'][$R['display']]:'' ?></span>
<?php endif; ?>
</div>
</div><!-- /.card -->
</div><!-- /.col -->
<?php
$print_card_num++; // 카드 출력될 때마 1씩 증가
$lack_card_num = $total_card_num - $print_card_num;
?>
<?php if(!($i%$recnum)):?></div><div class="row gutter-half mt-3" data-role="post-list"><?php endif?>
<?php endforeach?>
<?php if($lack_card_num ):?>
<?php for($j=0;$j<$lack_card_num;$j++):?>
<div class="col"></div>
<?php endfor?>
<?php endif?>
</div> <!-- /.row -->
<?php else: ?>
<div class="p-5 text-muted text-center border mb-3">
리스트가 없습니다.
</div>
<?php endif; ?>
</section><!-- /.widget -->

View File

@@ -0,0 +1,77 @@
<?php
$wdgvar['limit'] = 3; //전체 출력수
$wdgvar['recnum'] =3; //한 열에 출력할 카드 갯수
$wdgvar['title'] ='최근 포스트';
$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='.$_MP['uid'].' and site='.$s;
if ($my['uid']) $postque .= ' and display > 3'; // 회원공개와 전체공개 포스트 출력
else $postque .= ' and display = 5'; // 전체공개 포스트만 출력
$_RCD=getDbArray($table['postmember'],$postque,'*','gid','asc',$wdgvar['limit'],1);
while($_R = db_fetch_array($_RCD)) $RCD[] = getDbData($table['postdata'],'gid='.$_R['gid'],'*');
$_NUM = getDbRows($table['postmember'],$postque);
?>
<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']):?>
<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="row gutter-half" data-role="post-list">
<?php $i=0;foreach($RCD as $R):$i++;?>
<div class="col">
<div class="card border-0" id="item-<?php echo $_R['uid'] ?>">
<a class="text-nowrap text-truncate muted-link position-relative" href="<?php echo getPostLink($R,1) ?>">
<img src="<?php echo getPreviewResize(getUpImageSrc($R),'320x180') ?>" alt="" class="card-img-top border">
<time class="badge badge-dark rounded-0 position-absolute f14" style="right:1px;bottom:1px"><?php echo getUpImageTime($R) ?></time>
</a>
<div class="card-body py-3 px-0">
<h6 class="card-title mb-0 line-clamp-2">
<a class="muted-link" href="<?php echo getPostLink($R,1) ?>">
<?php echo getStrCut(stripslashes($R['subject']),100,'..')?>
</a>
</h6>
<time class="text-muted small" data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_regis'],'c')?>"></time>
<span class="badge badge-light"><?php echo checkPostOwner($R) && $R['display']!=5?$g['displaySet']['label'][$R['display']]:'' ?></span>
</div>
</div><!-- /.card -->
</div><!-- /.col -->
<?php
$print_card_num++; // 카드 출력될 때마 1씩 증가
$lack_card_num = $total_card_num - $print_card_num;
?>
<?php if(!($i%$recnum)):?></div><div class="row gutter-half mt-3" data-role="post-list"><?php endif?>
<?php endforeach?>
<?php if($lack_card_num ):?>
<?php for($j=0;$j<$lack_card_num;$j++):?>
<div class="col"></div>
<?php endfor?>
<?php endif?>
</div> <!-- /.row -->
<?php else: ?>
<div class="p-5 text-muted text-center border mb-3">
포스트가 없습니다.
</div>
<?php endif; ?>
</section><!-- /.widget -->

View File

@@ -0,0 +1,83 @@
<div class="text-center">
<img src="<?php echo getAvatarSrc($_MP['uid'],'230') ?>" width="230" height="230" alt="" class="rounded img-fluid">
</div>
<div class="vcard-names-container pt-3">
<h1 class="vcard-names">
<span class="p-name vcard-fullname d-block" itemprop="name">
<?php echo $_MP['nic'] ?>
<?php if($my['uid']==$_MP['uid']):?>
<small class="text-muted">(나)</small>
<?php endif; ?>
</span>
<span class="p-nickname vcard-username d-block">@<?php echo $mbrid ?></span>
</h1>
</div>
<p class="mb-3 text-gray">
<?php if ($_MP['bio']): ?>
<?php echo $_MP['bio']?>
<?php else: ?>
<a href="<?php echo RW('mod=settings')?>?focus_bio=1">소개말 추가</a>
<?php endif; ?>
</p>
<?php if($my['uid']):?>
<?php if($my['uid']!=$_MP['uid']):?>
<?php $_isFollowing = getDbRows($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$_MP['uid']); ?>
<button class="btn btn-block btn-light<?php echo $_isFollowing ?' active':'' ?>"
data-act="actionIframe"
data-url="<?php echo $g['url_action']?>profile_follow&amp;mbruid=<?php echo $_MP['uid']?>"
data-toggle="button">
팔로우
</button>
<?php endif?>
<?php endif?>
<ul class="vcard-details border-top border-gray-light mt-3 pt-2 list-unstyled">
<li aria-label="Email" class="vcard-detail pt-1 text-truncate">
<?php if ($my['uid']): ?>
<?php if ($_MP['email_profile']): ?>
<i class="fa fa-envelope-o fa-fw" aria-hidden="true"></i>
<a href="mailto:<?php echo $_MP['email_profile'] ?>" class="muted-link"><?php echo $_MP['email_profile'] ?></a>
<?php endif; ?>
<?php else: ?>
<i class="fa fa-envelope-o fa-fw" aria-hidden="true"></i> <a href="/login">로그인후 확인가능</a>
<?php endif; ?>
</li>
<?php if ($_MP['home']): ?>
<li aria-label="Blog or website" class="vcard-detail pt-1 text-truncate">
<i class="fa fa-link fa-fw" aria-hidden="true"></i>
<a href="<?php echo $_MP['home'] ?>" target="_blank" class="muted-link"><?php echo $_MP['home'] ?></a>
</li>
<?php endif; ?>
<?php if ($_MP['company']): ?>
<li aria-label="Blog or website" class="vcard-detail pt-1 text-truncate">
<i class="fa fa-building-o fa-fw" aria-hidden="true"></i> <?php echo $_MP['company'] ?>
</li>
<?php endif; ?>
</ul>
<?php if ($my['uid']): ?>
<ul class="vcard-details border-gray-light py-2 list-unstyled mb-0">
<li class="pt-1 text-truncate">
ㆍ나이/성별 : <?php if($_MP['birth1']):?><?php echo getAge($_MP['birth1'])?>세<?php else:?><span>미등록</span><?php endif?> (<?php if($_MP['sex']):?><?php echo $_MP['sex']==1?'남성':'여성'?><?php else:?><span>미등록</span><?php endif?>)
</li>
<li class="pt-1 text-truncate">
ㆍ분야 : <?php if($_MP['job']):?><?php echo $_MP['job']?><?php if($g['profile'][1]):?> <?php echo getAge($g['profile'][1])?>년차<?php endif?><?php else:?><span>미등록</span><?php endif?>
</li>
<li class="pt-1 text-truncate">
ㆍ가입일자 : <?php echo getDateFormat($_MP['d_regis'],'Y.m.d')?>
</li>
<li class="pt-1 text-truncate">
ㆍ<span class="cx">포인트</span> : <?php echo number_format($_MP['point'])?> P
</li>
<li class="pt-1 text-truncate">
ㆍ<span class="cx">회원등급</span> : <?php echo $g['grade']['m'.$_MP['level']]?> <?php echo $_MP['level']?>
</li>
</ul>
<?php endif; ?>

View File

@@ -0,0 +1,152 @@
<?php
$sort = $sort ? $sort : 'gid';
$orderby= $orderby ? $orderby : 'asc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
$bbsque = 'mbruid='.$_MP['uid'].' and site='.$s;
if ($where && $keyword)
{
if (strstr('[name][nic][id][ip]',$where)) $bbsque .= " and ".$where."='".$keyword."'";
else if ($where == 'term') $bbsque .= " and d_regis like '".$keyword."%'";
else $bbsque .= getSearchSql($where,$keyword,$ikeyword,'or');
}
$RCD = getDbArray($table['bbsdata'],$bbsque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['bbsdata'],$bbsque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div class="page-wrapper row">
<div class="col-3 page-nav">
<?php include $g['dir_module_skin'].'_vcard.php';?>
</div>
<div class="col-9 page-main">
<?php include $g['dir_module_skin'].'_nav.php';?>
<section>
<header class="d-flex justify-content-between mt-4 mb-2">
<div>
<?php echo number_format($NUM)?>개 <small class="text-muted">(<?php echo $p?>/<?php echo $TPG?>페이지)</small>
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=bbs&amp;mbruid=<?php echo $_MP['uid']?>&amp;mod=rss" target="_blank" class="ml-2 muted-link">
<i class="fa fa-rss-square" aria-hidden="true"></i> RSS
</a>
</div>
</header>
<table class="table text-center">
<colgroup>
<col width="50">
<col>
<col width="70">
<col width="100">
</colgroup>
<thead class="thead-light">
<tr>
<th scope="col" class="side1">번호</th>
<th scope="col">제목</th>
<th scope="col">조회</th>
<th scope="col">날짜</th>
</tr>
</thead>
<tbody>
<?php while($R=db_fetch_array($RCD)):?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<?php $R['sbjlink']=getBbsPostLink($R)?>
<tr>
<td>
<?php if($R['uid'] != $uid):?>
<?php echo $NUM-((($p-1)*$recnum)+$_rec++)?>
<?php else:$_rec++?>
<span class="now">&gt;&gt;</span>
<?php endif?>
</td>
<td class="text-left">
<?php if($R['mobile']):?><i class="fa fa-mobile fa-lg"></i><?php endif?>
<?php if($R['category']):?>
<span class="badge badge-secondary"><?php echo $R['category']?></span>
<?php endif?>
<a href="<?php echo $R['sbjlink']?>" class="muted-link">
<?php echo getStrCut($R['subject'],$d['bbs']['sbjcut'],'')?>
</a>
<?php if(strstr($R['content'],'.jpg') || strstr($R['content'],'.png')):?>
<span class="badge badge-light" data-toggle="tooltip" title="사진">
<i class="fa fa-camera-retro fa-lg"></i>
</span>
<?php endif?>
<?php if($R['upload']):?>
<span class="badge badge-light" data-toggle="tooltip" title="첨부파일">
<i class="fa fa-paperclip fa-lg"></i>
</span>
<?php endif?>
<?php if($R['hidden']):?><span class="badge badge-light" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span><?php endif?>
<?php if($R['comment']):?><span class="badge badge-light"><?php echo $R['comment']?><?php echo $R['oneline']?'+'.$R['oneline']:''?></span><?php endif?>
<?php if(getNew($R['d_regis'],24)):?><small class="text-danger"><small>New</small></span><?php endif?>
</td>
<td class="small"><?php echo $R['hit']?></td>
<td>
<time class="small text-muted"><?php echo getDateFormat($R['d_regis'],'Y.m.d')?></time>
</td>
</tr>
<?php endwhile?>
<?php if(!$NUM):?>
<tr>
<td colspan="4" class="py-5 text-muted">
게시물이 없습니다.
</td>
</tr>
<?php endif?>
</tbody>
</table>
<footer class="d-flex justify-content-between align-items-center my-4">
<div class="">
<?php if ($NUM > $recnum): ?>
<ul class="pagination mb-0">
<?php echo getPageLink(10,$p,$TPG,$_N)?>
</ul>
<?php endif; ?>
</div>
<form name="bbssearchf" action="<?php echo$g['page_reset']?>" class="form-inline">
<?php if ($_HS['rewrite']): ?>
<input type="hidden" name="sort" value="<?php echo $sort?>">
<?php else: ?>
<input type="hidden" name="r" value="<?php echo $r?>">
<?php if($_mod):?>
<input type="hidden" name="mod" value="<?php echo $_mod?>">
<?php else:?>
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="front" value="<?php echo $front?>">
<?php endif?>
<input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="sort" value="<?php echo $sort?>">
<input type="hidden" name="orderby" value="<?php echo $orderby?>">
<input type="hidden" name="recnum" value="<?php echo $recnum?>">
<input type="hidden" name="type" value="<?php echo $type?>" />
<input type="hidden" name="mbrid" value="<?php echo $_MP['id']?>">
<?php endif; ?>
<select name="where" class="form-control custom-select ml-1">
<option value="subject|tag"<?php if($where=='subject|tag'):?> selected="selected"<?php endif?>>제목+태그</option>
<option value="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
</select>
<input type="text" name="keyword" size="30" value="<?php echo $_keyword?>" class="form-control ml-2">
<button class="btn btn-light ml-2" type="submit">검색</button>
<?php if ($keyword): ?>
<a class="btn btn-light ml-1" href="<?php echo $g['page_reset']?>">리셋</a>
<?php endif; ?>
</form>
</footer>
</section>
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->

View File

@@ -0,0 +1,143 @@
<?php
//댓글링크
function getCommentLink($arr)
{
$sync_arr=explode('|',$arr['sync']);
$B = getUidData($sync_arr[0],$sync_arr[2]);
return RW('m='.$sync_arr[1].'&bid='.$B['bbsid'].'&uid='.$sync_arr[2].($GLOBALS['s']!=$arr['site']?'&s='.$arr['site']:''.'#CMT-'.$arr['uid']));
}
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'asc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
$bbsque = 'mbruid='.$_MP['uid'].' and site='.$s;
if ($where && $keyword)
{
if (strstr('[name][nic][id][ip]',$where)) $bbsque .= " and ".$where."='".$keyword."'";
else if ($where == 'term') $bbsque .= " and d_regis like '".$keyword."%'";
else $bbsque .= getSearchSql($where,$keyword,$ikeyword,'or');
}
$RCD = getDbArray($table['s_comment'],$bbsque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_comment'],$bbsque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div class="page-wrapper row">
<div class="col-3 page-nav">
<?php include $g['dir_module_skin'].'_vcard.php';?>
</div>
<div class="col-9 page-main">
<?php include $g['dir_module_skin'].'_nav.php';?>
<section>
<header class="d-flex justify-content-between mt-4 mb-2">
<div>
<?php echo number_format($NUM)?>개 <small class="text-muted">(<?php echo $p?>/<?php echo $TPG?>페이지)</small>
</div>
</header>
<table class="table text-center">
<colgroup>
<col width="50">
<col>
<col width="120">
</colgroup>
<thead class="thead-light">
<tr>
<th scope="col" class="side1">번호</th>
<th scope="col">제목</th>
<th scope="col" class="side2">날짜</th>
</tr>
</thead>
<tbody>
<?php while($R=db_fetch_array($RCD)):?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<tr>
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
<td class="text-left">
<?php if($R['mobile']):?><i class="fa fa-mobile fa-lg"></i><?php endif?>
<a href="<?php echo getCommentLink($R)?>" target="_blank" class="muted-link"><?php echo $R['subject']?></a>
<?php if(strstr($R['content'],'.jpg')):?>
<span class="badge badge-light" data-toggle="tooltip" title="사진">
<i class="fa fa-camera-retro fa-lg"></i>
</span>
<?php endif?>
<?php if($R['upload']):?>
<span class="badge badge-light" data-toggle="tooltip" title="첨부파일">
<i class="fa fa-paperclip fa-lg"></i>
</span>
<?php endif?>
<?php if($R['hidden']):?><span class="badge badge-light" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span><?php endif?>
<?php if($R['oneline']):?><span class="badge badge-light"><?php echo $R['oneline']?></span><?php endif?>
<?php if(getNew($R['d_regis'],24)):?><small class="text-danger">new</small><?php endif?>
</td>
<td>
<time class="small text-muted"><?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?></time>
</td>
</tr>
<?php endwhile?>
<?php if(!$NUM):?>
<tr>
<td colspan="3" class="py-5 text-muted">
댓글이 없습니다.
</td>
</tr>
<?php endif?>
</tbody>
</table>
<footer class="d-flex justify-content-between align-items-center my-4">
<div class="">
<?php if ($NUM > $recnum): ?>
<ul class="pagination mb-0">
<?php echo getPageLink(5,$p,$TPG,$_N)?>
</ul>
<?php endif; ?>
</div>
<form name="bbssearchf" action="<?php echo$g['page_reset']?>" class="form-inline">
<?php if ($_HS['rewrite']): ?>
<input type="hidden" name="sort" value="<?php echo $sort?>">
<?php else: ?>
<input type="hidden" name="r" value="<?php echo $r?>">
<?php if($_mod):?>
<input type="hidden" name="mod" value="<?php echo $_mod?>">
<?php else:?>
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="front" value="<?php echo $front?>">
<?php endif?>
<input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="sort" value="<?php echo $sort?>">
<input type="hidden" name="orderby" value="<?php echo $orderby?>">
<input type="hidden" name="recnum" value="<?php echo $recnum?>">
<input type="hidden" name="type" value="<?php echo $type?>" />
<input type="hidden" name="mbrid" value="<?php echo $_MP['id']?>">
<?php endif; ?>
<select name="where" class="form-control custom-select">
<option value="subject"<?php if($where=='subject'):?> selected="selected"<?php endif?>>제목</option>
<option value="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
</select>
<input type="text" name="keyword" size="30" value="<?php echo $_keyword?>" class="form-control ml-2">
<button class="btn btn-light ml-2" type="submit">검색</button>
<?php if ($keyword): ?>
<a class="btn btn-light ml-1" href="<?php echo $g['page_reset']?>">리셋</a>
<?php endif; ?>
</form>
</footer>
</section>
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->

View File

@@ -0,0 +1,101 @@
<?php
$sort = 'uid';
$orderby= 'desc';
$recnum = 15;
$mbrque = 'by_mbruid='.$_MP['uid'];
if ($where && $keyword) $mbrque .= getSearchSql($where,$keyword,$ikeyword,'or');
$RCD = getDbArray($table['s_friend'],$mbrque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_friend'],$mbrque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div class="page-wrapper row">
<div class="col-3 page-nav">
<?php include $g['dir_module_skin'].'_vcard.php';?>
</div>
<div class="col-9 page-main">
<?php include $g['dir_module_skin'].'_nav.php';?>
<ul class="list-group list-group-flush border-top-0">
<?php $i=0;while($_R=db_fetch_array($RCD)):$i++?>
<?php $num_follower = getProfileInfo($_R['my_mbruid'],'num_follower');?>
<?php $_isFollowing = getDbRows($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$_R['my_mbruid']); ?>
<li class="list-group-item d-flex justify-content-between align-items-center px-0" data-mbruid="<?php echo $_R['my_mbruid'] ?>">
<div class="media w-75 align-items-center">
<a href="<?php echo getProfileLink($_R['my_mbruid'])?>" class="mr-3">
<img alt="" class="rounded-lg border" src="<?php echo getAvatarSrc($_R['my_mbruid'],'50') ?>" width="50" height="50" >
</a>
<div class="media-body">
<a href="<?php echo getProfileLink($_R['my_mbruid'])?>" class="text-decoration-none text-reset">
<span class="f4 link-gray-dark"><?php echo getProfileInfo($_R['my_mbruid'],'nic')?></span>
</a>
<p class="text-muted small mb-0">
구독자 <span data-role="num_follower"><?php echo number_format($num_follower)?></span>명
</p>
</div>
</div><!-- /.media -->
<div class="">
<?php if ($my['uid']): ?>
<?php if($my['uid']!=$_R['my_mbruid']):?>
<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.'&amp;m=member&amp;a=profile_follow&amp;mbruid='.$_R['my_mbruid']?>">
팔로우
</button>
<?php endif?>
<?php else: ?>
<span class="dropdown">
<button type="button" class="btn btn-primary" data-toggle="dropdown">
팔로우
</button>
<div class="dropdown-menu dropdown-menu-right shadow" style="min-width: 350px;">
<div class="py-3 px-4">
<h6><?php echo $M1[$_HS['nametype']] ?>님의 포스트를 구독하시겠습니까?</h6>
<p class="f13 text-muted mb-0">구독하려면 로그인하세요.</p>
</div>
<div class="dropdown-divider"></div>
<div class="px-3 text-right">
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#modal-login">
로그인
</button>
</div>
</div>
</span>
<?php endif; ?>
</div>
</li><!-- /.list-group-item -->
<?php endwhile?>
</ul>
<?php if(!$NUM):?>
<div class="d-flex align-items-center justify-content-center" style="height: 40vh">
<div class="text-muted">자료가 없습니다.</div>
</div>
<?php else:?>
<nav aria-label="Page navigation" class="mt-4">
<?php if ($NUM > $recnum): ?>
<ul class="pagination justify-content-center">
<?php echo getPageLink(10,$p,$TPG,$_N)?>
</ul>
<?php endif; ?>
</nav>
<?php endif?>
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->

View File

@@ -0,0 +1,101 @@
<?php
$sort = 'uid';
$orderby= 'desc';
$recnum = 15;
$mbrque = 'my_mbruid='.$_MP['uid'];
if ($where && $keyword) $mbrque .= getSearchSql($where,$keyword,$ikeyword,'or');
$RCD = getDbArray($table['s_friend'],$mbrque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_friend'],$mbrque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div class="page-wrapper row">
<div class="col-3 page-nav">
<?php include $g['dir_module_skin'].'_vcard.php';?>
</div>
<div class="col-9 page-main">
<?php include $g['dir_module_skin'].'_nav.php';?>
<ul class="list-group list-group-flush border-top-0">
<?php $i=0;while($_R=db_fetch_array($RCD)):$i++?>
<?php $num_follower = getProfileInfo($_R['by_mbruid'],'num_follower');?>
<?php $_isFollowing = getDbRows($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$_R['by_mbruid']); ?>
<li class="list-group-item d-flex justify-content-between align-items-center px-0" data-mbruid="<?php echo $_R['by_mbruid'] ?>">
<div class="media w-75 align-items-center">
<a href="<?php echo getProfileLink($_R['by_mbruid'])?>" class="mr-3">
<img alt="" class="rounded-lg border" src="<?php echo getAvatarSrc($_R['by_mbruid'],'50') ?>" width="50" height="50" >
</a>
<div class="media-body">
<a href="<?php echo getProfileLink($_R['by_mbruid'])?>" class="text-decoration-none text-reset">
<span class="f4 link-gray-dark"><?php echo getProfileInfo($_R['by_mbruid'],'nic')?></span>
</a>
<p class="text-muted small mb-0">
구독자 <span data-role="num_follower"><?php echo number_format($num_follower)?></span>명
</p>
</div>
</div><!-- /.media -->
<div class="">
<?php if ($my['uid']): ?>
<?php if($my['uid']!=$_R['by_mbruid']):?>
<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.'&amp;m=member&amp;a=profile_follow&amp;mbruid='.$_R['by_mbruid']?>">
팔로우
</button>
<?php endif?>
<?php else: ?>
<span class="dropdown">
<button type="button" class="btn btn-primary" data-toggle="dropdown">
팔로우
</button>
<div class="dropdown-menu dropdown-menu-right shadow" style="min-width: 350px;">
<div class="py-3 px-4">
<h6><?php echo $M1[$_HS['nametype']] ?>님의 포스트를 구독하시겠습니까?</h6>
<p class="f13 text-muted mb-0">구독하려면 로그인하세요.</p>
</div>
<div class="dropdown-divider"></div>
<div class="px-3 text-right">
<button type="button" class="btn btn-link btn-sm" data-toggle="modal" data-target="#modal-login">
로그인
</button>
</div>
</div>
</span>
<?php endif; ?>
</div>
</li><!-- /.list-group-item -->
<?php endwhile?>
</ul>
<?php if(!$NUM):?>
<div class="d-flex align-items-center justify-content-center" style="height: 40vh">
<div class="text-muted">자료가 없습니다.</div>
</div>
<?php else:?>
<nav aria-label="Page navigation" class="mt-4">
<?php if ($NUM > $recnum): ?>
<ul class="pagination justify-content-center">
<?php echo getPageLink(10,$p,$TPG,$_N)?>
</ul>
<?php endif; ?>
</nav>
<?php endif?>
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->

View File

@@ -0,0 +1,187 @@
<?php
$sort = $sort ? $sort : 'gid';
$orderby= $orderby ? $orderby : 'asc';
$recnum = $recnum && $recnum < 200 ? $recnum : 12;
$listque = 'mbruid='.$_MP['uid'].' and site='.$s;
$where = 'name|tag';
if ($sort != 'gid') $orderby= 'desc';
if ($my['uid']) $listque .= ' and display > 3'; // 회원공개와 전체공개 포스트 출력
else $listque .= ' and display = 5'; // 전체공개 포스트만 출력
if ($where && $keyword)
{
if (strstr('[name][nic][id][ip]',$where)) $listque .= " and ".$where."='".$keyword."'";
else if ($where == 'term') $listque .= " and d_regis like '".$keyword."%'";
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);
$c_recnum = 3; // 한 열에 출력할 카드 갯수
$totalCardDeck=ceil($NUM/$c_recnum); // card-deck 갯수 ($NUM 은 해당 데이타의 총 card 갯수 getDbRows 이용)
$total_card_num = $totalCardDeck*$c_recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
$lack_card_num = $total_card_num;
switch ($sort) {
case 'd_regis' : $sort_txt='생성순';break;
case 'd_last' : $sort_txt='최신순';break;
default : $sort_txt='기본';break;
}
?>
<div class="page-wrapper row">
<div class="col-3 page-nav">
<?php include $g['dir_module_skin'].'_vcard.php';?>
</div>
<div class="col-9 page-main">
<?php include $g['dir_module_skin'].'_nav.php';?>
<section>
<header class="d-flex justify-content-between align-items-end my-3">
<div>
<?php echo number_format($NUM)?>개 <small class="text-muted">(<?php echo $p?>/<?php echo $TPG?>페이지)</small>
</div>
<form name="listsearchf" action="<?php echo $g['page_reset'] ?>" method="get" class="form-inline">
<?php if ($_HS['rewrite']): ?>
<input type="hidden" name="sort" value="<?php echo $sort?>">
<?php else: ?>
<input type="hidden" name="r" value="<?php echo $r?>">
<?php if($_mod):?>
<input type="hidden" name="mod" value="<?php echo $_mod?>">
<?php else:?>
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="front" value="<?php echo $front?>">
<?php endif?>
<input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="sort" value="<?php echo $sort?>">
<input type="hidden" name="orderby" value="<?php echo $orderby?>">
<input type="hidden" name="recnum" value="<?php echo $recnum?>">
<input type="hidden" name="type" value="<?php echo $type?>" />
<input type="hidden" name="mbrid" value="<?php echo $_MP['id']?>">
<?php endif; ?>
<div class="dropdown" data-role="sort">
<a class="btn btn-white btn-sm 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" style="min-width: 85px;">
<button class="dropdown-item d-flex justify-content-between align-items-center<?php echo $sort=='gid'?' active':'' ?>" type="button" data-value="gid">
기본
</button>
<button class="dropdown-item d-flex justify-content-between align-items-center<?php echo $sort=='d_regis'?' active':'' ?>" type="button" data-value="d_regis">
생성순
</button>
<button class="dropdown-item d-flex justify-content-between align-items-center<?php echo $sort=='d_last'?' active':'' ?>" type="button" data-value="d_last">
최신순
</button>
</div>
</div>
<input type="text" name="keyword" size="30" value="<?php echo $_keyword?>" class="form-control form-control-sm ml-2" placeholder="제목 또는 태그 검색">
<button class="btn btn-white btn-sm ml-1" type="submit">검색</button>
<?php if ($keyword): ?>
<a class="btn btn-light btn-sm ml-1" href="<?php echo $g['page_reset'] ?>">리셋</a>
<?php endif; ?>
<?php if ($_IS_PROFILEOWN): ?>
<a href="<?php echo RW('mod=dashboard&page=list')?>" class="btn btn-light btn-sm ml-2 text-danger">관리</a>
<?php endif; ?>
</form>
</header>
<div class="card-deck" data-plugin="markjs">
<?php $i=0;while($R=db_fetch_array($RCD)):$i++?>
<div class="card border-0">
<a href="<?php echo getListLink($R,1) ?>" class="position-relative">
<img class="img-fluid" src="<?php echo getPreviewResize(getListImageSrc($R['uid']),'320x180') ?>" alt="">
<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 px-0 pt-2 pb-4">
<h5 class="card-title h6 mb-1">
<a class="text-decoration-none text-reset" href="<?php echo getListLink($R,1)?>">
<?php echo $R['name']?>
</a>
</h5>
<p class="card-text text-muted f13">
<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?>
<?php if ($_IS_PROFILEOWN): ?>
<span class="badge badge-secondary ml-2 align-top"><?php echo $R['display']!=5?$g['displaySet']['label'][$R['display']]:'' ?></span>
<?php endif; ?>
</p>
</div>
</div><!-- /.card -->
<?php
$print_card_num++; // 카드 출력될 때마 1씩 증가
$lack_card_num = $total_card_num - $print_card_num;
?>
<?php if(!($i%$c_recnum)):?></div><div class="card-deck"><?php endif?>
<?php endwhile?>
<?php if($lack_card_num ):?>
<?php for($j=0;$j<$lack_card_num;$j++):?>
<div class="card border-0"></div>
<?php endfor?>
<?php endif?>
</div>
<?php if(!$NUM):?>
<div class="d-flex align-items-center justify-content-center" style="height: 40vh">
<div class="text-muted">리스트가 없습니다.</div>
</div>
<?php endif?>
<footer class="d-flex justify-content-center align-items-center my-4">
<?php if ($NUM > $recnum): ?>
<ul class="pagination mb-0">
<?php echo getPageLink(10,$p,$TPG,$_N)?>
</ul>
<?php endif; ?>
</footer>
</section>
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->
<script>
$( document ).ready(function() {
// 툴바
$('[name="listsearchf"] .dropdown-item').click(function(){
var form = $('[name="listsearchf"]');
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>

View File

@@ -0,0 +1,99 @@
<?php
$levelnum = getDbData($table['s_mbrlevel'],'gid=1','*');
$levelname= getDbData($table['s_mbrlevel'],'uid='.$_MP['level'],'*');
?>
<div class="page-wrapper row">
<div class="col-3 page-nav">
<?php include $g['dir_module_skin'].'_vcard.php';?>
</div>
<div class="col-9 page-main">
<?php include $g['dir_module_skin'].'_nav.php';?>
<div class="mt-3">
<?php include $g['dir_module_skin'].'_newPost.php';?>
</div>
<?php include $g['dir_module_skin'].'_newList.php';?>
<div class="row mt-3">
<div class="col-6">
<h2 class="f16 p-2 font-weight-normal mt-4 mb-0">
<i class="fa fa-file-text-o mr-1" aria-hidden="true"></i> 게시판
</h2>
<ul class="list-group list-group-flush">
<?php $_POST = getDbArray($table['bbsdata'],'site='.$s.' and mbruid='.$_MP['uid'],'*','gid','asc',10,1)?>
<?php while($_R=db_fetch_array($_POST)):?>
<?php $_R['mobile']=isMobileConnect($_R['agent'])?>
<li class="list-group-item px-1 py-2 f13">
<a href="<?php echo getBbsPostLink($_R)?>" class="muted-link" target="_blank">
<?php echo getStrCut($_R['subject'],29,'..')?>
</a>
<?php if($_R['mobile']):?><i class="fa fa-mobile fa-lg"></i><?php endif?>
<?php if(strstr($_R['content'],'.jpg')):?>
<span class="badge badge-light" data-toggle="tooltip" title="사진">
<i class="fa fa-camera-retro fa-lg"></i>
</span>
<?php endif?>
<?php if($_R['upload']):?>
<span class="badge badge-light" data-toggle="tooltip" title="첨부파일">
<i class="fa fa-paperclip fa-lg"></i>
</span>
<?php endif?>
<?php if($_R['hidden']):?><span class="badge badge-light" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span><?php endif?>
<?php if($_R['comment']):?><span class="badge badge-light"><?php echo $_R['comment']?><?php echo $_R['oneline']?'+'.$_R['oneline']:''?></span><?php endif?>
<?php if(getNew($_R['d_regis'],24)):?><small class="text-danger">n</small><?php endif?>
</li>
<?php endwhile?>
<?php if(!db_num_rows($_POST)):?>
<li class="list-group-item">등록된 게시물이 없습니다.</li>
<?php endif?>
</ul>
</div><!-- /.col-6 -->
<div class="col-6 border-left">
<h2 class="f16 font-weight-normal mt-4 mb-2">
<i class="fa fa-commenting-o mr-1" aria-hidden="true"></i> 댓글
</h2>
<ul class="list-group list-group-flush">
<?php $_POST = getDbArray($table['s_comment'],'site='.$s.' and mbruid='.$_MP['uid'],'*','uid','asc',10,1)?>
<?php while($_R=db_fetch_array($_POST)):?>
<?php $_R['mobile']=isMobileConnect($_R['agent'])?>
<li class="list-group-item px-1 py-2 f13">
<a href="<?php echo getSyncUrl($_R['sync'].',CMT:'.$_R['uid'].',s:'.$_R['site'])?>#CMT" class="muted-link" target="_blank">
<?php echo getStrCut($_R['subject'],29,'..')?>
</a>
<?php if($_R['mobile']):?><i class="fa fa-mobile fa-lg"></i><?php endif?>
<?php if(strstr($_R['content'],'.jpg')):?>
<span class="badge badge-light" data-toggle="tooltip" title="사진">
<i class="fa fa-camera-retro fa-lg"></i>
</span>
<?php endif?>
<?php if($_R['upload']):?>
<span class="badge badge-light" data-toggle="tooltip" title="첨부파일">
<i class="fa fa-paperclip fa-lg"></i>
</span>
<?php endif?>
<?php if($_R['hidden']):?><span class="badge badge-light" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span><?php endif?>
<?php if($_R['oneline']):?><span class="badge badge-light"><?php echo $_R['oneline']?></span><?php endif?>
<?php if(getNew($_R['d_regis'],24)):?><small class="text-danger">n</small><?php endif?>
</li>
<?php endwhile?>
<?php if(!db_num_rows($_POST)):?>
<li class="list-group-item">등록된 댓글이 없습니다.</li>
<?php endif?>
</ul>
</div><!-- /.col-6 -->
</div><!-- /.row -->
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->

View File

@@ -0,0 +1,129 @@
<?php
//한줄의견링크
function getOnelineLink($arr)
{
global $table;
$C = getUidData($table['s_comment'],$arr['parent']);
$sync_arr=explode('|',$C['sync']);
$B = getUidData($sync_arr[0],$sync_arr[2]);
return RW('m='.$sync_arr[1].'&bid='.$B['bbsid'].'&uid='.$sync_arr[2].($GLOBALS['s']!=$arr['site']?'&s='.$arr['site']:''.'#OLN-'.$arr['uid']));
}
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
$bbsque = 'mbruid='.$_MP['uid'].' and site='.$s;
$where = 'content';
if ($where && $keyword)
{
if (strstr('[name][nic][id][ip]',$where)) $bbsque .= " and ".$where."='".$keyword."'";
else if ($where == 'term') $bbsque .= " and d_regis like '".$keyword."%'";
else $bbsque .= getSearchSql($where,$keyword,$ikeyword,'or');
}
$RCD = getDbArray($table['s_oneline'],$bbsque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_oneline'],$bbsque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div class="page-wrapper row">
<div class="col-3 page-nav">
<?php include $g['dir_module_skin'].'_vcard.php';?>
</div>
<div class="col-9 page-main">
<?php include $g['dir_module_skin'].'_nav.php';?>
<section>
<header class="d-flex justify-content-between mt-4 mb-2">
<div>
<?php echo number_format($NUM)?>개 <small class="text-muted">(<?php echo $p?>/<?php echo $TPG?>페이지)</small>
</div>
</header>
<table class="table text-center">
<colgroup>
<col width="80">
<col>
<col width="120">
</colgroup>
<thead class="thead-light">
<tr>
<th scope="col" class="side1">번호</th>
<th scope="col">제목</th>
<th scope="col" class="side2">날짜</th>
</tr>
</thead>
<tbody>
<?php while($R=db_fetch_array($RCD)):?>
<tr>
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
<td class="text-left">
<a href="<?php echo getOnelineLink($R)?>" target="_blank" class="muted-link"><?php echo strip_tags($R['content'])?></a>
<?php if($R['hidden']):?><span class="badge badge-light" data-toggle="tooltip" title="비밀글"><i class="fa fa-lock fa-lg"></i></span><?php endif?>
<?php if(getNew($R['d_regis'],24)):?><small class="text-danger">new</small><?php endif?>
</td>
<td>
<time class="small text-muted"><?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?></time>
</td>
</tr>
<?php endwhile?>
<?php if(!$NUM):?>
<tr>
<td colspan="3" class="py-5 text-muted">
한줄의견이 없습니다.
</td>
</tr>
<?php endif?>
</tbody>
</table>
<footer class="d-flex justify-content-between align-items-center my-4">
<div class="">
<?php if ($NUM > $recnum): ?>
<ul class="pagination mb-0">
<?php echo getPageLink(5,$p,$TPG,$_N)?>
</ul>
<?php endif; ?>
</div>
<form name="bbssearchf" action="<?php echo$g['page_reset']?>" class="form-inline">
<?php if ($_HS['rewrite']): ?>
<input type="hidden" name="sort" value="<?php echo $sort?>">
<?php else: ?>
<input type="hidden" name="r" value="<?php echo $r?>">
<?php if($_mod):?>
<input type="hidden" name="mod" value="<?php echo $_mod?>">
<?php else:?>
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="front" value="<?php echo $front?>">
<?php endif?>
<input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="sort" value="<?php echo $sort?>">
<input type="hidden" name="orderby" value="<?php echo $orderby?>">
<input type="hidden" name="recnum" value="<?php echo $recnum?>">
<input type="hidden" name="type" value="<?php echo $type?>" />
<input type="hidden" name="mbrid" value="<?php echo $_MP['id']?>">
<?php endif; ?>
<input type="text" name="keyword" size="30" value="<?php echo $_keyword?>" class="form-control ml-2">
<button class="btn btn-light ml-2" type="submit">검색</button>
<?php if ($keyword): ?>
<a class="btn btn-light ml-1" href="<?php echo $g['page_reset']?>">리셋</a>
<?php endif; ?>
</form>
</footer>
</section>
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->

View File

@@ -0,0 +1,223 @@
<?php
$sort = $sort ? $sort : 'gid';
$orderby= $orderby ? $orderby : 'asc';
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
$postque = 'mbruid='.$_MP['uid'].' and site='.$s;
if ($my['uid']) $postque .= ' and display > 3'; // 회원공개와 전체공개 포스트 출력
else $postque .= ' and display = 5'; // 전체공개 포스트만 출력
if ($sort == 'gid' && !$keyword) {
$TCD = getDbArray($table['postmember'],$postque,'*',$sort,$orderby,$recnum,$p);
while($_R = db_fetch_array($TCD)) $RCD[] = getDbData($table['postdata'],'gid='.$_R['gid'],'*');
$NUM = getDbRows($table['postmember'],$postque);
} else {
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');
}
$orderby = 'desc';
$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);
switch ($sort) {
case 'gid' : $sort_txt='생성순';break;
case 'hit' : $sort_txt='조회순';break;
case 'likes' : $sort_txt='추천순';break;
case 'comment' : $sort_txt='댓글순';break;
default : $sort_txt='최신순';break;
}
?>
<div class="page-wrapper row">
<div class="col-3 page-nav">
<?php include $g['dir_module_skin'].'_vcard.php';?>
</div>
<div class="col-9 page-main">
<?php include $g['dir_module_skin'].'_nav.php';?>
<section>
<header class="d-flex justify-content-between align-items-center my-3">
<div>
<?php echo number_format($NUM)?>개 <small class="text-muted">(<?php echo $p?>/<?php echo $TPG?>페이지)</small>
</div>
<form name="postsearchf" method="get" action="<?php echo $g['page_reset'] ?>" class="form-inline">
<?php if ($_HS['rewrite']): ?>
<input type="hidden" name="sort" value="<?php echo $sort?>">
<?php else: ?>
<input type="hidden" name="r" value="<?php echo $r?>">
<?php if($_mod):?>
<input type="hidden" name="mod" value="<?php echo $_mod?>">
<?php else:?>
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="front" value="<?php echo $front?>">
<?php endif?>
<input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="sort" value="<?php echo $sort?>">
<input type="hidden" name="orderby" value="<?php echo $orderby?>">
<input type="hidden" name="recnum" value="<?php echo $recnum?>">
<input type="hidden" name="type" value="<?php echo $type?>" />
<input type="hidden" name="mbrid" value="<?php echo $_MP['id']?>">
<?php endif; ?>
<div class="dropdown" data-role="sort">
<a class="btn btn-white btn-sm 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" style="min-width: 100px;">
<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>
<select name="where" class="form-control custom-select custom-select-sm ml-1">
<option value="subject|tag"<?php if($where=='subject|tag'):?> selected="selected"<?php endif?>>제목+태그</option>
<option value="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
</select>
<input type="text" name="keyword" size="30" value="<?php echo $_keyword?>" class="form-control form-control-sm ml-1">
<button class="btn btn-white btn-sm ml-1" type="submit">검색</button>
<?php if ($keyword): ?>
<a class="btn btn-light btn-sm ml-1" href="<?php echo $g['page_reset']?>">리셋</a>
<?php endif; ?>
<?php if ($_IS_PROFILEOWN): ?>
<a href="<?php echo RW('mod=dashboard&page='.$page)?>" class="btn btn-white text-danger btn-sm ml-2">관리</a>
<?php endif; ?>
</form><!-- /.form-inline -->
</header>
<ul class="list-unstyled" data-plugin="markjs">
<?php if (!empty($RCD)): ?>
<?php foreach($RCD as $R):?>
<li class="media mt-4">
<a href="<?php echo getPostLink($R,1) ?>" class="position-relative mr-3">
<img class="border" src="<?php echo getPreviewResize(getUpImageSrc($R),'180x100') ?>" 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">
<h5 class="my-1 font-weight-light line-clamp-2">
<a href="<?php echo getPostLink($R,1) ?>" class="text-reset text-decoration-none" ><?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">추천 <?php echo $R['likes']?> </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>
<?php if(getNew($R['d_regis'],12)):?><small class="text-danger">new</small><?php endif?>
</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; ?>
<div class="">
<?php if ($R['tag']): ?>
<span class="f13 text-muted mr-1">
<!-- 태그 -->
<?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; ?>
<span class="badge badge-secondary"><?php echo checkPostOwner($R) && $R['display']!=5?$g['displaySet']['label'][$R['display']]:'' ?></span>
</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>
<footer class="d-flex justify-content-between mt-5">
<div class=""></div>
<?php if ($NUM > $recnum): ?>
<ul class="pagination mb-0">
<?php echo getPageLink(10,$p,$TPG,$_N)?>
</ul>
<?php endif; ?>
<div class="">
</div>
</footer>
</section>
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->
<script>
$( document ).ready(function() {
// 툴바
$('[name="postsearchf"] .dropdown-item').click(function(){
var form = $('[name="postsearchf"]');
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>

View File

@@ -0,0 +1,17 @@
.nav-link.filter-item {
padding: 8px 10px;
margin-bottom: 2px;
overflow: hidden;
font-size: 14px;
color: #586069;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
border-radius: 3px;
}
.nav-link.filter-item:hover {
text-decoration: none;
background-color: #eaecef;
color: #586069;
}

View File

@@ -0,0 +1,20 @@
<div class="user-profile-nav">
<nav class="nav underline-nav">
<a class="nav-link f16<?php if ($page=='main'): ?> active<?php endif; ?>" href="/<?php echo $mbrid ?>">요약</a>
<a class="nav-link f16<?php if ($page=='bbs'): ?> active<?php endif; ?>" href="/<?php echo $mbrid ?>?page=project" data-toggle="tooltip" title="프로젝트">
게시물 <span class="badge badge-pill badge-light"> <?php echo $NUM_PROJECT ?> </span>
</a>
<a class="nav-link f16<?php if ($page=='comment'): ?> active<?php endif; ?>" href="/<?php echo $mbrid ?>?page=project" data-toggle="tooltip" title="프로젝트">
댓글 <span class="badge badge-pill badge-light"> <?php echo $NUM_PROJECT ?> </span>
</a>
<a class="nav-link f16<?php if ($page=='follower'): ?> active<?php endif; ?>" href="/<?php echo $mbrid ?>?page=follower" data-toggle="tooltip" title="팔로워">
팔로워
<span class="badge badge-pill badge-light"> <?php echo getDbRows($table['s_friend'],'by_mbruid='.$_MH['uid'])?></span>
</a>
<a class="nav-link f16<?php if ($page=='following'): ?> active<?php endif; ?>" href="/<?php echo $mbrid ?>?page=following" data-toggle="tooltip" title="팔로잉">
팔로잉
<span class="badge badge-pill badge-light"> <?php echo getDbRows($table['s_friend'],'my_mbruid='.$_MH['uid'])?></span>
</a>
</nav>
</div>

View File

@@ -0,0 +1,174 @@
<?php
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 200 ? $recnum : 20;
$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);
?>
<div class="container">
<div class="subhead mt-0">
<h2 class="subhead-heading">
<i class="fa fa-bookmark-o fa-fw" aria-hidden="true"></i> 내 저장함
</h2>
<span class="text-muted">스크랩한 게시물을 모아볼수 있습니다.</span>
</div>
<div class="row mt-3">
<div class="col-3">
<nav class="nav flex-column nav-pills">
<a class="nav-link filter-item d-flex justify-content-between align-items-center<?php echo !$category?' active':'' ?>" href="<?php echo $g['url_page']?>">
전체보기
<span class="badge badge-pill"><?php echo number_format(getDbRows($table['s_saved'],'mbruid='.$my['uid']))?></span>
</a>
<?php $_CATS = getDbSelect($table['s_saved'],"mbruid=".$my['uid']." and category<>'' group by category",'category')?>
<?php while($_R=db_fetch_array($_CATS)):?>
<a class="nav-link filter-item d-flex justify-content-between align-items-center<?php if($_R['category']==$category):?> active<?php endif?>" href="<?php echo $g['url_page']?>&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?>
</nav>
</div><!-- /.col-3 -->
<div class="col-9">
<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 -->
<ul class="pagination mb-0">
<?php echo getPageLink(10,$p,$TPG,'')?>
</ul>
</div>
</form>
</div><!-- /.col-9 -->
</div><!-- /.row -->
</div><!-- /.container -->
<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>

View File

@@ -0,0 +1,4 @@
<!-- timeago -->
<?php getImport('jquery-timeago','jquery.timeago',false,'js')?>
<?php getImport('jquery-timeago','locales/jquery.timeago.ko',false,'js')?>

View File

@@ -0,0 +1,292 @@
<script>
var reauth_naver= '<?php echo getConnectUrl('naver',$d['connect']['key_n'],$d['connect']['secret_n'],$g['url_root'].'/'.$r.'/oauth/naver','reauthenticate')?>';
var reauth_kakao= '<?php echo getConnectUrl('kakao',$d['connect']['key_k'],$d['connect']['secret_k'],$g['url_root'].'/'.$r.'/oauth/kakao','reauthenticate')?>';
var reauth_google= '<?php echo getConnectUrl('google',$d['connect']['key_g'],$d['connect']['secret_g'],$g['url_root'].'/'.$r.'/oauth/google','reauthenticate')?>';
var reauth_facebook= '<?php echo getConnectUrl('facebook',$d['connect']['key_f'],$d['connect']['secret_f'],$g['url_root'].'/'.$r.'/oauth/facebook','reauthenticate')?>';
var reauth_instagram= '<?php echo getConnectUrl('instagram',$d['connect']['key_i'],$d['connect']['secret_i'],$g['url_root'].'/'.$r.'/oauth/instagram','reauthenticate')?>';
</script>
<!-- 소셜로그인으로 생성된 소셜전용 회원계정일때 -->
<?php if (!$my['last_pw']): ?>
<div class="card mb-5">
<div class="card-header">
<div class="media text-muted my-3">
<i class="fa fa-lock fa-4x mx-4" aria-hidden="true"></i>
<div class="media-body">
<h5 class="mb-1">개인정보 잠금</h5>
<small>개인정보를 안전하게 보호하기 위해, 로그인 후 <mark><?php echo $d['member']['settings_expire'] ?>분</mark>이 경과하면 본인인증을 다시 한번 확인합니다.<br>
<?php echo $my['nic']; ?>님의
마지막 로그인 일시는 <mark><time data-plugin="timeago" datetime="<?php echo getDateFormat($my['last_log'],'c')?>"></time></mark>
(<?php echo getDateFormat($my['last_log'],'Y.m.d H:i')?>) 입니다.<br>
회원 정보는 개인정보 취급방침에 따라 안전하게 보호되며, 회원님의 동의 없이 공개 또는 제 3자에게 제공되지 않습니다.</small>
</div>
</div>
</div>
<ul class="list-group list-group-flush">
<?php if ($d['connect']['use_n'] && $my_naver['uid']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://naver.com" target="_blank" class="muted-link">
<img class="rounded-circle" src="<?php echo $g['img_core']?>/sns/naver.png" alt="네이버" width="28">
네이버
</a>
</div>
<div class="">
<button type="button" class="btn btn-outline-primary" data-reauth="naver" role="button">
재인증 하기
</button>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_k'] && $my_kakao['uid']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://kakao.com" target="_blank" class="muted-link">
<img class="rounded-circle" src="<?php echo $g['img_core']?>/sns/kakao.png" alt="카카오" width="28">
카카오
</a>
</div>
<div class="">
<button type="button" class="btn btn-outline-primary" data-reauth="kakao" role="button">
재인증 하기
</button>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_g'] && $my_google['uid']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://google.com" target="_blank" class="muted-link">
<img class="rounded-circle" src="<?php echo $g['img_core']?>/sns/google.png" alt="구글" width="28">
구글
</a>
</div>
<div class="">
<button type="button" class="btn btn-outline-primary" data-reauth="google" role="button">
재인증 하기
</button>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_f'] && $my_facebook['uid']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://facebook.com" target="_blank" class="muted-link">
<img class="rounded-circle" src="<?php echo $g['img_core']?>/sns/facebook.png" alt="페이스북" width="28">
페이스북
</a>
</div>
<div class="">
<button type="button" class="btn btn-outline-primary" data-reauth="facebook" role="button">
재인증 하기
</button>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_i'] && $my_instagram['uid']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://instagram.com" target="_blank" class="muted-link">
<img class="rounded-circle" src="<?php echo $g['img_core']?>/sns/instagram.png" alt="인스타그램" width="28">
인스타그램
</a>
</div>
<div class="">
<button type="button" class="btn btn-outline-primary" data-reauth="instagram" role="button">
재인증 하기
</button>
</div>
</li>
<?php endif; ?>
</ul>
</div><!-- /.card -->
<?php else: ?>
<!-- 패스워드를 직접 등록한 회원계정일때 -->
<div class="card mb-5">
<div class="card-header">
<div class="media text-muted my-3">
<i class="fa fa-lock fa-4x mx-4" aria-hidden="true"></i>
<div class="media-body">
<h5 class="mb-1">개인정보 잠금</h5>
<small>개인정보를 안전하게 보호하기 위해, 로그인 후 <mark><?php echo $d['member']['settings_expire'] ?>분</mark>이 경과하면 본인인증을 다시 한번 확인합니다.<br>
<?php echo $my['nic']; ?>님의
마지막 로그인 일시는 <mark><time data-plugin="timeago" datetime="<?php echo getDateFormat($my['last_log'],'c')?>"></time></mark>
(<?php echo getDateFormat($my['last_log'],'Y.m.d H:i')?>) 입니다.<br>
회원 정보는 개인정보 취급방침에 따라 안전하게 보호되며, 회원님의 동의 없이 공개 또는 제 3자에게 제공되지 않습니다.</small>
</div>
</div>
<ul class="nav nav-tabs card-header-tabs mt-4">
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#pane-passwd" id="tab-passwd">비밀번호로 인증 </a>
</li>
<?php if ($my_naver['uid'] || $my_kakao['uid'] || $my_google['uid'] || $my_facebook['uid'] || $my_instagram['uid']): ?>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#pane-social" id="tab-social">소셜계정으로 인증</a>
</li>
<?php endif; ?>
</ul>
</div>
<div class="tab-content">
<div class="tab-pane fade" id="pane-passwd" role="tabpanel">
<div class="card-body">
<form id="page-confirmPW" action="<?php echo $g['s']?>/" method="post">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="pwConfirm">
<input type="hidden" name="form" value="">
<input type="hidden" name="id" value="<?php echo $my['id'] ?>">
<?php if ($my['email']): ?>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center">계정 이메일</label>
<div class="col-sm-10 pt-2">
<?php echo $my['email'] ?>
</div>
</div>
<?php endif; ?>
<?php if ($my['phone']): ?>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center">계정 휴대폰</label>
<div class="col-sm-10 pt-2">
<?php echo substr($my['phone'], 0,3).'-'.substr($my['phone'], 3,4).'-'.substr($my['phone'], 7,4) ?>
</div>
</div>
<?php endif; ?>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center">패스워드</label>
<div class="col-sm-8">
<input type="password" name="pw" id="password" class="form-control form-control-lg" placeholder="" tabindex="2" required="" value="" autocomplete="new-pw">
<div class="invalid-feedback mt-2" data-role="passwordErrorBlock"></div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center"></label>
<div class="col-sm-8">
<div class="d-flex justify-content-between align-items-center">
<button class="btn btn-light" type="submit" data-role="submit" tabindex="3">
<span class="not-loading">확인하기</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 확인중 ...</span>
</button>
<a href="#modal-pwReset" data-toggle="modal">비밀번호를 분실했어요.</a>
</div>
</div>
</div>
</form>
</div><!-- /.card-body -->
</div><!-- /.tab-pane -->
<div class="tab-pane fade" id="pane-social" role="tabpanel">
<ul class="list-group list-group-flush">
<?php if ($d['connect']['use_n'] && $my_naver['uid']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://naver.com" target="_blank" class="muted-link">
<img class="rounded-circle" src="<?php echo $g['img_core']?>/sns/naver.png" alt="네이버" width="28">
네이버
</a>
</div>
<div class="">
<button type="button" class="btn btn-outline-primary" data-reauth="naver" role="button">
재인증 하기
</button>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_k'] && $my_kakao['uid']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://kakao.com" target="_blank" class="muted-link">
<img class="rounded-circle" src="<?php echo $g['img_core']?>/sns/kakao.png" alt="카카오" width="28">
카카오
</a>
</div>
<div class="">
<button type="button" class="btn btn-outline-primary" data-reauth="kakao" role="button">
재인증 하기
</button>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_g'] && $my_google['uid']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://google.com" target="_blank" class="muted-link">
<img class="rounded-circle" src="<?php echo $g['img_core']?>/sns/google.png" alt="구글" width="28">
구글
</a>
</div>
<div class="">
<button type="button" class="btn btn-outline-primary" data-reauth="google" role="button">
재인증 하기
</button>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_f'] && $my_facebook['uid']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://facebook.com" target="_blank" class="muted-link">
<img class="rounded-circle" src="<?php echo $g['img_core']?>/sns/facebook.png" alt="페이스북" width="28">
페이스북
</a>
</div>
<div class="">
<button type="button" class="btn btn-outline-primary" data-reauth="facebook" role="button">
재인증 하기
</button>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_i'] && $my_instagram['uid']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://instagram.com" target="_blank" class="muted-link">
<img class="rounded-circle" src="<?php echo $g['img_core']?>/sns/instagram.png" alt="인스타그램" width="28">
인스타그램
</a>
</div>
<div class="">
<button type="button" class="btn btn-outline-primary" data-reauth="instagram" role="button">
재인증 하기
</button>
</div>
</li>
<?php endif; ?>
</ul>
</div><!-- /.tab-pane -->
</div><!-- /.tab-content -->
</div><!-- /.card -->
<?php endif; ?>

View File

@@ -0,0 +1,81 @@
.page-wrapper {
margin-top: 20px
}
.page-nav {
/*padding-left: 0*/
}
.page-nav .card-header {
padding: 8px 10px;
font-size: 13px;
font-weight: 600;
line-height: 20px;
color: #586069;
background-color: #f3f5f8;
border-bottom: none
}
.page-nav .list-group-item {
padding: 8px 10px;
color: #24292e;
}
.page-nav .list-group-item.selected::before {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 2px;
content: "";
background-color: #e36209;
}
.page-nav .list-group-item-action {
color: #0366d6;
}
.page-main {
/*padding-right: 0*/
}
/*column*/
.column {
float: left;
padding-right: 10px;
padding-left: 10px;
}
.two-thirds {
width: 66.666667%;
}
.edit-profile-avatar {
width: 200px;
}
/*forms*/
.form-group .form-control.short {
width: 250px;
}
.edit-profile-avatar dd .position-absolute {
top: 130px;
right: 30px;
color: #fff;
text-shadow:#999999 2px 2px 2px
}
.bg-warning {
color: #856404 !important;
background-color: #fff3cd !important;
border-color: #ffeeba !important;
}
/* card group */
.col-3 .card,
.col-4 .card {
margin-bottom: 15px
}
.grayscale {
-webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
filter: grayscale(100%);
}
.filter {
filter: alpha(opacity=20);
opacity: 0.2;
}

View File

@@ -0,0 +1,77 @@
$(function () {
$('[data-toggle="avatar"]').click(function() {
$("#rb-upfile-avatar").click();
});
$("#rb-upfile-avatar").change(function() {
var f = document.MbrPhotoForm;
getIframeForAction(f);
f.submit();
});
$('[data-toggle="cover"]').click(function() {
$("#rb-upfile-cover").click();
});
$("#rb-upfile-cover").change(function() {
var f = document.MbrCoverForm;
getIframeForAction(f);
f.submit();
});
//본인확인을 위한 로그인
$('#page-confirmPW').submit(function(e){
e.preventDefault();
e.stopPropagation();
var form = $(this)
siteLogin(form)
});
//외부서비스 사용자 인증요청
$('[data-reauth]').on("click", function(){
var provider = $(this).data('reauth')
// /core/engine/cssjs.engine.php 참고
if (provider=='naver') var target = reauth_naver
if (provider=='kakao') var target = reauth_kakao
if (provider=='google') var target = reauth_google
if (provider=='facebook') var target = reauth_facebook
if (provider=='instagram') var target = reauth_instagram
var referer = window.location.href // 연결후, 원래 페이지 복귀를 위해
$("body").isLoading({
text: "연결 중..",
position: "overlay"
});
$.post(rooturl+'/?r='+raccount+'&m=connect&a=save_referer',{
referer : referer
},function(response,status){
if(status=='success'){
document.location = target;
}else{
alert(status);
}
});
});
// 최근탭 고정처리
var tab = Cookies.get('lock-nav');
if (tab=='social') $('#tab-social').tab('show')
else $('#tab-passwd').tab('show')
$('[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var button = $(e.target) // newly activated tab
var id = button.attr('href')
if (id=='#pane-passwd') Cookies.set('lock-nav', 'passwd');
else Cookies.set('lock-nav', 'social');
})
// 로그인 에러 흔적 초기화
$("#page-confirmPW").find('.form-control').keyup(function() {
$(this).removeClass('is-invalid')
});
})

View File

@@ -0,0 +1,35 @@
<div class="card mb-3">
<div class="card-header">
설정하기
</div>
<div class="list-group list-group-flush">
<a href="<?php echo RW('mod=settings&page=main')?>" class="list-group-item list-group-item-action<?php if($page=='main'):?> selected<?php endif?>">
프로필 관리
</a>
<a href="<?php echo RW('mod=settings&page=account')?>" class="list-group-item list-group-item-action<?php if($page=='account'):?> selected<?php endif?>">
회원계정 관리
</a>
<?php if ($d['member']['login_social']): ?>
<a href="<?php echo RW('mod=settings&page=connect')?>" class="list-group-item list-group-item-action<?php if($page=='connect'):?> selected<?php endif?>">
연결계정 관리
</a>
<?php endif; ?>
<a href="<?php echo RW('mod=settings&page=email')?>" class="list-group-item list-group-item-action<?php if($page=='email'):?> selected<?php endif?>">
이메일 관리
</a>
<a href="<?php echo RW('mod=settings&page=phone')?>" class="list-group-item list-group-item-action<?php if($page=='phone'):?> selected<?php endif?>">
휴대폰 관리
</a>
<a href="<?php echo RW('mod=settings&page=shipping')?>" class="list-group-item list-group-item-action<?php if($page=='shipping'):?> selected<?php endif?>">
배송지 관리
</a>
<a href="<?php echo RW('mod=settings&page=noti')?>" class="list-group-item list-group-item-action<?php if($page=='noti'):?> selected<?php endif?>">
알림 설정
</a>
<?php if ($g['push_active']): ?>
<a href="<?php echo RW('mod=settings&page=pwa')?>" class="d-none list-group-item list-group-item-action<?php if($page=='pwa'):?> selected<?php endif?>">
웹앱 설치내역
</a>
<?php endif; ?>
</div>
</div>

View File

@@ -0,0 +1,393 @@
<?php include_once $g['dir_module_skin'].'_header.php'?>
<div class="page-wrapper row">
<nav class="col-3 page-nav">
<?php include_once $g['dir_module_skin'].'_nav.php'?>
</nav>
<div class="col-9 page-main">
<?php if (!getValid($my['last_log'],$d['member']['settings_expire'])): //로그인 후 경과시간 비교(분 ?>
<div class="subhead mt-0">
<h2 class="subhead-heading">회원계정 관리</h2>
</div>
<?php include_once $g['dir_module_skin'].'_lock.php'?>
<?php else: ?>
<div class="subhead mt-0">
<h2 class="subhead-heading">비밀번호 <?php echo $my['last_pw']?'변경':'등록' ?></h2>
</div>
<form class="card" id="pwChangeForm" role="form" action="<?php echo $g['s']?>/" method="post">
<div class="card-header">
<div class="media">
<i class="fa fa-key fa-3x mx-3" aria-hidden="true"></i>
<div class="media-body">
<?php if ($my['last_pw']): ?>
현재 비밀번호는 <mark><?php echo getDateFormat($my['last_pw'],'Y.m.d')?></mark> 에 변경(등록)되었으며 <mark><?php echo -getRemainDate($my['last_pw'])?>일</mark>이 경과되었습니다. <br>
비밀번호는 가급적 주기적으로 변경해 주세요.
<?php else: ?>
본 계정은 소셜로그인을 통해 가입된 계정으로 현재 비밀번호가 등록되어 있지 않습니다.<br>
비밀번호를 등록하면 비밀번호를 통한 로그인이 가능합니다.
<?php endif; ?>
</div>
</div>
</div>
<div class="card-body">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="settings_account">
<input type="hidden" name="act" value="pw">
<input type="hidden" name="check_pw1" value="0">
<input type="hidden" name="check_pw2" value="0">
<div class="form-group row">
<label class="col-sm-2 col-form-label">신규 비밀번호</label>
<div class="col-sm-10">
<input type="password" class="form-control w-50" name="pw1" value="" onkeyup="pw1Check();" placeholder="비밀번호(6~16자리)">
<div class="invalid-tooltip" id="pw1-feedback"></div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">비밀번호 확인</label>
<div class="col-sm-10">
<input type="password" class="form-control w-50" name="pw2" value="" placeholder="한번 더 입력하세요.">
<div class="invalid-tooltip" id="pw2-feedback"></div>
</div>
</div>
</div><!-- ./card-body -->
<div class="card-footer d-flex justify-content-between align-items-center">
<?php if ($my['last_pw']): ?>
<button type="submit" class="btn btn-light">
<span class="not-loading">변경하기</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 변경중 ...</span>
</button>
<?php else: ?>
<span></span>
<button type="submit" class="btn btn-light">
<span class="not-loading">등록하기</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 등록중 ...</span>
</button>
<?php endif; ?>
</div>
</form><!-- /.card -->
<div class="subhead mt-5">
<h2 class="subhead-heading">아이디 변경</h2>
</div>
<div class="card">
<div class="card-body">
<ul class="list-unstyled">
<li>· 회원님의 공개 프로필 주소는 <a href="/@<?php echo $my['id'] ?>" target="_blank"><?php echo $_SERVER['HTTP_HOST']; ?>/@<?php echo $my['id'] ?></a> 입니다.</li>
<li>· 아이디는 계정이 만들어질때 자동으로 생성되며 중복되지 않을 경우 변경등록이 가능합니다.</li>
<li>· 아이디는 로그인 및 공개 프로필 주소에 활용됩니다.</li>
</ul>
<hr>
<form id="idChangeForm" role="form" action="<?php echo $g['s']?>/" method="post">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="settings_account">
<input type="hidden" name="act" value="id">
<input type="hidden" name="check_id" value="1">
<div class="form-group row my-5">
<label class="col-sm-2 col-form-label text-center">아이디</label>
<div class="col-sm-10">
<div class="input-group w-75 position-relative mb-0">
<input type="text" class="form-control" name="id" placeholder="아이디" value="<?php echo $my['id'] ?>" size="13" maxlength="13" onkeyup="idCheck(this,'id-feedback');">
<div class="invalid-tooltip" id="id-feedback"></div>
<div class="input-group-append">
<button type="submit" class="btn btn-light">
<span class="not-loading">변경하기</span>
<span class="is-loading">처리중 ...</span>
</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="subhead mt-5">
<h2 class="subhead-heading">회원탈퇴</h2>
</div>
<form class="card" name="procForm" role="form" action="<?php echo $g['s']?>/" method="post">
<div class="card-header">
<div class="media">
<i class="fa fa-user-times fa-3x mx-3" aria-hidden="true"></i>
<div class="media-body">
사용하고 계신 아이디 (<code><?php echo $my['id'] ?></code>) 는 탈퇴할 경우 재사용 및 복구가 불가능합니다. <br>
탈퇴한 아이디는 본인과 타인 모두 재사용 및 복구가 불가하오니 신중하게 선택하시기 바랍니다.
</div>
</div>
</div>
<div class="card-body">
<ul class="list-unstyled">
<li>· 탈퇴 후 회원정보 및 개인형 서비스 이용기록은 모두 삭제됩니다.</li>
<li>· 회원정보 및 개인형 서비스 이용기록은 모두 삭제되며, 삭제된 데이터는 복구되지 않습니다.</li>
<li>· 삭제되는 내용을 확인하시고 필요한 데이터는 미리 백업을 해주세요.</li>
<li>· 탈퇴 후에는 아이디 (<code><?php echo $my['id'] ?></code>)로 다시 가입할 수 없으며 아이디와 데이터는 복구할 수 없습니다.</li>
<li>· 게시판형 서비스에 남아 있는 게시글과 댓글은 탈퇴 후 삭제할 수 없습니다.</li>
</ul>
<div class="custom-control custom-checkbox f16">
<input type="checkbox" class="custom-control-input" id="reaveCheck">
<label class="custom-control-label" for="reaveCheck">위 내용을 모두 확인하였습니다.</label>
</div>
<hr>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center">아이디</label>
<div class="col-sm-10">
<input type="text" name="id" readonly class="form-control-plaintext" value="<?php echo $my['id'] ?>">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center">이름</label>
<div class="col-sm-10">
<input type="text" name="name" readonly class="form-control-plaintext" value="<?php echo $my['name'] ?>">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center">비밀번호</label>
<div class="col-sm-8">
<input type="password" name="pw" id="password" class="form-control form-control-lg" placeholder="" required="" autocomplete="new-pw">
<div class="invalid-feedback mt-2" data-role="passwordErrorBlock"></div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center"></label>
<div class="col-sm-8">
<input type="password" name="pw2" class="form-control form-control-lg" placeholder="다시 한번 입력해주세요." required="" value="">
<div class="invalid-feedback mt-2" data-role="passwordErrorBlock"></div>
<p class="mt-3 mb-0 text-muted">회원탈퇴를 원하시면 비밀번호를 입력하신 후 ‘탈퇴하기’ 버튼을 클릭해 주세요.</p>
</div>
</div>
</div>
<div class="card-footer d-flex justify-content-between align-items-center">
<a href="<?php echo RW('mod=password_reset')?>">비밀번호를 분실했어요.</a>
<button type="submit" class="btn btn-light text-danger">탈퇴하기</button>
</div>
</form><!-- /.card -->
<script type="text/javascript">
var f_pw = getId('pwChangeForm'); // dom 선택자
var form_pw = $('#pwChangeForm'); // jquery 선택자
var f_id = getId('idChangeForm'); // dom 선택자
var form_id = $('#idChangeForm'); // jquery 선택자
function pw1Check() {
var layer = 'pw1-feedback';
if (!f_pw.pw1.value) {
f_pw.pw1.classList.remove('is-valid','is-invalid');
} else {
f_pw.classList.remove('was-validated');
f_pw.pw1.classList.add('is-invalid');
f_pw.pw1.classList.remove('is-valid');
if (f_pw.pw1.value.length < 6 || f_pw.pw1.value.length > 16)
{
getId(layer).innerHTML = '영문/숫자/특수문자중 2개 이상의 조합으로 최소 6~16자로 입력하셔야 합니다.';
f_pw.pw1.focus();
f_pw.check_pw1.value = '0';
return false;
}
if (getTypeCheck(f_pw.pw1.value,"abcdefghijklmnopqrstuvwxyz"))
{
getId(layer).innerHTML = '비밀번호가 영문만으로 입력되었습니다.\n비밀번호는 영문/숫자/특수문자중 2개 이상의 조합으로 최소 6자이상 입력하셔야 합니다.';
f_pw.pw1.focus();
f_pw.check_pw1.value = '0';
return false;
}
if (getTypeCheck(f_pw.pw1.value,"1234567890"))
{
getId(layer).innerHTML = '비밀번호가 숫자만으로 입력되었습니다.\n비밀번호는 영문/숫자/특수문자중 2개 이상의 조합으로 최소 6자이상 입력하셔야 합니다.';
f_pw.pw1.focus();
f_pw.check_pw1.value = '0';
return false;
}
f_pw.pw1.classList.add('is-valid');
f_pw.pw1.classList.remove('is-invalid');
getId(layer).innerHTML = '';
f_pw.check_pw1.value = '1';
}
}
function pw2Check() {
var layer = 'pw2-feedback';
if (!f_pw.pw1.value) {
f_pw.pw2.value = '';
f_pw.pw1.focus();
} else {
f_pw.classList.remove('was-validated');
f_pw.pw2.classList.add('is-invalid');
f_pw.pw2.classList.remove('is-valid');
if (f_pw.pw1.value != f_pw.pw2.value)
{
getId(layer).innerHTML = '비밀번호가 일치하지 않습니다.';
f_pw.classList.remove('was-validated');
f_pw.pw2.focus();
f_pw.check_pw2.value = '0';
return false;
}
f_pw.pw2.classList.add('is-valid');
f_pw.pw2.classList.remove('is-invalid');
getId(layer).innerHTML = '';
f_pw.check_pw2.value = '1';
}
}
function idCheck(obj,layer) {
if (!obj.value)
{
eval('obj.form.check_'+obj.name).value = '0';
obj.classList.remove('is-invalid');
getId(layer).innerHTML = '';
}
else {
if (obj.value.length < 4 || obj.value.length > 13 || !getTypeCheck(obj.value,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_"))
{
obj.form.check_id.value = '0';
obj.classList.add('is-invalid');
obj.focus();
getId(layer).innerHTML = '4~13자 이내에서 영문 대소문자,숫자,_ 만 사용할 수 있습니다';
return false;
} else {
obj.form.check_id.value = '1';
obj.classList.remove('is-invalid');
}
}
}
$(function () {
putCookieAlert('member_settings_result') // 실행결과 알림 메시지 출력
//비밀번호 변경시 입력항목 유용성 체크
form_pw.find('[name="pw2"]').keyup(function(){
$(this).removeClass('is-invalid is-valid')
});
// 비밀번호 변경 실행
f_pw.addEventListener('submit', function(event) {
event.preventDefault();
event.stopPropagation();
if (f_pw.pw1.value == '') {
f_pw.pw1.focus()
f_pw.pw1.classList.add('is-invalid')
getId('pw1-feedback').innerHTML = '패스워드를 입력해주세요.';
return false;
}
if (f_pw.check_pw1.value == '0') {
f_pw.pw2.value = ''
f_pw.pw2.classList.remove('is-valid','is-invalid');
f_pw.check_pw2.value = '0'
f_pw.pw1.focus();
return false;
}
pw2Check()
if (f_pw.pw2.value == '') {
f_pw.pw2.focus()
f_pw.pw2.classList.add('is-invalid')
getId('pw2-feedback').innerHTML = '패스워드를 한번더 입력해주세요.';
return false;
}
if (f_pw.check_pw1.value == '0' || f_pw.check_pw2.value == '0') {
return false;
}
form_pw.find('[type="submit"]').attr("disabled",true);
f_pw.classList.add('was-validated');
form_pw.find('.form-control').removeClass('is-invalid') //에러이력 초기화
setTimeout(function(){
getIframeForAction(f_pw);
f_pw.submit();
}, 500);
});
//아이디 변경 실행
f_id.addEventListener('submit', function(event) {
event.preventDefault();
event.stopPropagation();
if (f_id.id.value == '') {
f_id.id.focus()
f_id.id.classList.add('is-invalid')
getId('id-feedback').innerHTML = '아이디를 입력해주세요.';
return false;
}
if (f_id.check_id.value == '0') {
f_id.id.value = ''
f_id.id.classList.remove('is-valid','is-invalid');
f_id.check_id.value = '0'
f_id.id.focus();
return false;
}
form_id.find('[type="submit"]').attr("disabled",true);
form_id.find('.form-control').removeClass('is-invalid') //에러이력 초기화
setTimeout(function(){
getIframeForAction(f_id);
f_id.submit();
}, 300);
});
$('[data-toggle="actionIframe"]').click(function() {
getIframeForAction('');
frames.__iframe_for_action__.location.href = $(this).attr("data-url");
});
})
</script>
<?php endif; ?>
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->
<?php include_once $g['dir_module_skin'].'_footer.php'?>

View File

@@ -0,0 +1,176 @@
<?php include_once $g['dir_module_skin'].'_header.php'?>
<div class="page-wrapper row">
<nav class="col-3 page-nav">
<?php include_once $g['dir_module_skin'].'_nav.php'?>
</nav>
<div class="col-9 page-main">
<div class="subhead mt-0">
<h2 class="subhead-heading">연결계정 관리</h2>
</div>
<?php if (!getValid($my['last_log'],$d['member']['settings_expire'])): //로그인 후 경과시간 비교(분 ?>
<?php include_once $g['dir_module_skin'].'_lock.php'?>
<?php else: ?>
<p class="text-muted">외부의 소셜미디어 계정을 연결하고 통합관리 합니다. 연결된 소셜미디어로 사용자인증 및 연결을 지원합니다.</p>
<ul class="list-group">
<?php if ($d['connect']['use_n']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://naver.com" target="_blank" class="muted-link">
<img class="rounded-circle<?php echo !$my_naver['uid']?' filter grayscale':'' ?>" src="<?php echo $g['img_core']?>/sns/naver.png" alt="네이버" width="28">
네이버
</a>
</div>
<div class="">
<?php if ($my_naver['uid']): ?>
<small class="mr-3 text-muted">
<?php echo getDateFormat($my_naver['d_regis'],'Y.m.d H:i') ?> 연결
</small>
<button type="button" class="btn btn-outline-secondary" data-act="del" data-uid="<?php echo $my_naver['uid'] ?>">
연결끊기
</button>
<?php else: ?>
<button type="button" class="btn btn-outline-primary" data-connect="naver" role="button">
연결하기
</button>
<?php endif; ?>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_k']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://kakao.com" target="_blank" class="muted-link">
<img class="rounded-circle<?php echo !$my_kakao['uid']?' filter grayscale':'' ?>" src="<?php echo $g['img_core']?>/sns/kakao.png" alt="카카오" width="28">
카카오
</a>
</div>
<div class="">
<?php if ($my_kakao['uid']): ?>
<small class="mr-3 text-muted">
<?php echo getDateFormat($my_kakao['d_regis'],'Y.m.d H:i') ?> 연결
</small>
<button type="button" class="btn btn-outline-secondary" data-act="del" data-uid="<?php echo $my_kakao['uid'] ?>">
연결끊기
</button>
<?php else: ?>
<button type="button" class="btn btn-outline-primary" data-connect="kakao" role="button">
연결하기
</button>
<?php endif; ?>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_g']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://google.com" target="_blank" class="muted-link">
<img class="rounded-circle<?php echo !$my_google['uid']?' filter grayscale':'' ?>" src="<?php echo $g['img_core']?>/sns/google.png" alt="구글" width="28">
구글
</a>
</div>
<div class="">
<?php if ($my_google['uid']): ?>
<small class="mr-3 text-muted">
<?php echo getDateFormat($my_google['d_regis'],'Y.m.d H:i') ?> 연결
</small>
<button type="button" class="btn btn-outline-secondary" data-act="del" data-uid="<?php echo $my_google['uid'] ?>">
연결끊기
</button>
<?php else: ?>
<button type="button" class="btn btn-outline-primary" data-connect="google" role="button">
연결하기
</button>
<?php endif; ?>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_f']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://facebook.com" target="_blank" class="muted-link">
<img class="rounded-circle<?php echo !$my_facebook['uid']?' filter grayscale':'' ?>" src="<?php echo $g['img_core']?>/sns/facebook.png" alt="페이스북" width="28">
페이스북
</a>
</div>
<div class="">
<?php if ($my_facebook['uid']): ?>
<small class="mr-3 text-muted">
<?php echo getDateFormat($my_facebook['d_regis'],'Y.m.d H:i') ?> 연결
</small>
<button type="button" class="btn btn-outline-secondary" data-act="del" data-uid="<?php echo $my_facebook['uid'] ?>">
연결끊기
</button>
<?php else: ?>
<button type="button" class="btn btn-outline-primary" data-connect="facebook" role="button">
연결하기
</button>
<?php endif; ?>
</div>
</li>
<?php endif; ?>
<?php if ($d['connect']['use_i']): ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="">
<a href="http://instagram.com" target="_blank" class="muted-link">
<img class="rounded-circle<?php echo !$my_instagram['uid']?' filter grayscale':'' ?>" src="<?php echo $g['img_core']?>/sns/instagram.png" alt="인스타그램" width="28">
인스타그램
</a>
</div>
<div class="">
<?php if ($my_instagram['uid']): ?>
<small class="mr-3 text-muted">
<?php echo getDateFormat($my_instagram['d_regis'],'Y.m.d H:i') ?> 연결
</small>
<button type="button" class="btn btn-outline-secondary" data-act="del" data-uid="<?php echo $my_instagram['uid'] ?>">
연결끊기
</button>
<?php else: ?>
<button type="button" class="btn btn-outline-primary" data-connect="instagram" role="button">
연결하기
</button>
<?php endif; ?>
</div>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->
<?php include_once $g['dir_module_skin'].'_footer.php'?>
<script type="text/javascript">
$(function () {
putCookieAlert('member_settings_result') // 실행결과 알림 메시지 출력
// sns 삭제
$('[data-act="del"]').click(function() {
if (confirm('정말로 연결을 끊으시겠습니까? ')){
var uid = $(this).data('uid')
var act = 'del'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_connect&act='+act+'&uid='+uid
$(this).attr('disabled',true)
getIframeForAction();
frames.__iframe_for_action__.location.href = url;
}
});
})
</script>

View File

@@ -0,0 +1,428 @@
<?php
$sqlque0 = 'mbruid='.$my['uid'];
$sqlque1 = 'mbruid='.$my['uid'].' and base=1 and backup=0';
$sqlque2 = 'mbruid='.$my['uid'].' and base=0';
$sqlque3 = 'mbruid='.$my['uid'].' and backup=0 and d_verified<>0';
$sqlque4 = 'mbruid='.$my['uid'].' and base=0 and d_verified<>0';
$PCD = getDbArray($table['s_mbremail'],$sqlque1,'*','uid','asc',0,1);
$RCD = getDbArray($table['s_mbremail'],$sqlque2,'*','uid','asc',0,1);
$VCD = getDbArray($table['s_mbremail'],$sqlque3,'*','uid','asc',0,1);
$SCD = getDbArray($table['s_mbremail'],$sqlque4,'*','uid','asc',0,1);
$NUM = getDbRows($table['s_mbremail'],$sqlque0);
$NUM_VCD = getDbRows($table['s_mbremail'],$sqlque3);
?>
<?php include_once $g['dir_module_skin'].'_header.php'?>
<div class="page-wrapper row">
<nav class="col-3 page-nav">
<?php include_once $g['dir_module_skin'].'_nav.php'?>
</nav>
<div class="col-9 page-main">
<div class="subhead mt-0">
<h2 class="subhead-heading">이메일 관리</h2>
</div>
<?php if (!getValid($my['last_log'],$d['member']['settings_expire'])): //로그인 후 경과시간 비교(분 ?>
<?php include_once $g['dir_module_skin'].'_lock.php'?>
<?php else: ?>
<?php if (!$NUM): ?>
<div class="card p-5 text-center text-muted">
<i class="fa fa-envelope-o fa-3x mb-2" aria-hidden="true"></i>
등록된 이메일이 없습니다.
</div>
<?php endif; ?>
<ul class="list-group">
<?php while($P=db_fetch_array($PCD)):?>
<?php $codeValid=getValid($P['d_code'],$d['member']['settings_keyexpire']); ?>
<li class="list-group-item" id="item-<?php echo $P['uid'] ?>">
<div class=" d-flex justify-content-between align-items-center">
<?php if ($P['d_verified']): ?>
<div>
<i class="fa fa-envelope-o fa-fw text-muted" aria-hidden="true"></i>
<strong><?php echo $P['email'] ?></strong>
<?php if ($P['base']): ?><span class="badge badge-primary">기본</span><?php endif; ?>
<?php if ($my['email_profile']==$P['email']): ?><span class="badge badge-light">프로필 공개</span><?php endif; ?>
<?php if ($my['email_noti']==$P['email']): ?><span class="badge badge-light">알림수신</span><?php endif; ?>
</div>
<?php else: ?>
<div>
<i class="fa fa-envelope-o fa-fw text-muted" aria-hidden="true"></i>
<span class="text-muted"><?php echo $P['email'] ?></span>
<?php if ($P['base']): ?><span class="badge badge-primary">기본</span><?php endif; ?>
<span class="badge badge-secondary">미인증</span>
</div>
<div>
<button type="button" class="btn btn-sm btn-light" data-act="send_code" data-uid="<?php echo $P['uid'] ?>">
<span class="not-loading"><?php echo $codeValid?'재발송':'본인확인 인증번호 발송' ?></span>
<span class="is-loading">발송중..</span>
</button>
</div>
<?php endif; ?>
</div>
<div class="<?php echo $P['d_code'] && $codeValid?'':'d-none' ?>" data-role="verify_email_area">
<div class=" d-flex justify-content-between align-items-center">
<div style="width: 35%">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">인증번호</span>
</div>
<input type="number" class="form-control" name="confirm_code_<?php echo $P['uid'] ?>" data-role="code">
<div class="invalid-tooltip"></div>
<div class="input-group-append">
<button class="btn btn-light" type="button" data-act="confirm_code" data-uid="<?php echo $P['uid'] ?>">
<span class="not-loading">확인</span>
<span class="is-loading">확인중..</span>
</button>
</div>
</div>
</div>
<div class="mt-2 text-right">
<small class="form-text text-success mb-2">
인증번호를 발송했습니다.(유효시간 <?php echo $d['member']['settings_keyexpire'] ?>분)
<span
data-role="countdown"
data-countdown="<?php echo $P['d_code']?date("Y/m/d H:i:s",strtotime ("+".$d['member']['settings_keyexpire']." minutes",strtotime($P['d_code']))):''; ?>">
</span>
<br>인증번호가 오지 않으면 입력하신 정보가 정확한지 확인하여 주세요.
</small>
</div>
</div><!-- /.d-flex -->
</div><!-- /#verify_email_area -->
</li>
<?php endwhile?>
<?php while($R=db_fetch_array($RCD)):?>
<?php $codeValid=getValid($R['d_code'],$d['member']['settings_keyexpire']); ?>
<li class="list-group-item" id="item-<?php echo $R['uid'] ?>">
<div class=" d-flex justify-content-between align-items-center">
<?php if ($R['d_verified']): ?>
<div>
<i class="fa fa-envelope-o fa-fw text-muted" aria-hidden="true"></i> <?php echo $R['email'] ?>
<?php if ($R['backup']): ?><span class="badge badge-warning">백업</span><?php endif; ?>
<?php if ($my['email_profile']==$R['email']): ?><span class="badge badge-light">프로필 공개</span><?php endif; ?>
<?php if ($my['email_noti']==$R['email']): ?><span class="badge badge-light">알림수신</span><?php endif; ?>
</div>
<div>
<?php if (!$R['base']): ?>
<button type="button" class="btn btn-link muted-link py-0" data-act="del" data-toggle="tooltip" title="삭제" data-uid="<?php echo $R['uid'] ?>">
<i class="fa fa-trash-o fa-lg" aria-hidden="true"></i>
</button>
<?php endif; ?>
</div>
<?php else: ?>
<div>
<span class="text-muted"><?php echo $R['email'] ?></span>
<span class="badge badge-secondary">미인증</span>
</div>
<div>
<button type="button" class="btn btn-sm btn-light" data-act="send_code" data-uid="<?php echo $R['uid'] ?>">
<span class="not-loading"><?php echo $codeValid?'재발송':'본인확인 인증번호 발송' ?></span>
<span class="is-loading">발송중..</span>
</button>
<button type="button" class="btn btn-link muted-link py-0" data-act="del" data-toggle="tooltip" title="삭제" data-uid="<?php echo $R['uid'] ?>">
<i class="fa fa-trash-o fa-lg" aria-hidden="true"></i>
</button>
</div>
<?php endif; ?>
</div><!-- /.d-flex -->
<div class="<?php echo $R['d_code'] && $codeValid?'':'d-none' ?>" data-role="verify_email_area">
<div class=" d-flex justify-content-between align-items-center">
<div style="width: 35%">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">인증번호</span>
</div>
<input type="number" class="form-control" name="confirm_code_<?php echo $R['uid'] ?>" data-role="code">
<div class="invalid-tooltip"></div>
<div class="input-group-append">
<button class="btn btn-light" type="button" data-act="confirm_code" data-uid="<?php echo $R['uid'] ?>">
<span class="not-loading">확인</span>
<span class="is-loading">확인중..</span>
</button>
</div>
</div>
</div>
<div class="mt-2 text-right">
<small class="form-text text-success mb-2">
인증번호를 발송했습니다.(유효시간 <?php echo $d['member']['settings_keyexpire'] ?>분)
<span
data-role="countdown"
data-countdown="<?php echo $R['d_code']?date("Y/m/d H:i:s",strtotime ("+".$d['member']['settings_keyexpire']." minutes",strtotime($R['d_code']))):''; ?>">
</span>
<br>인증번호가 오지 않으면 입력하신 정보가 정확한지 확인하여 주세요.
</small>
</div>
</div><!-- /.d-flex -->
</div><!-- /#verify_email_area -->
</li>
<?php endwhile?>
</ul>
<form class="my-4" id="emailsForm" role="form" action="<?php echo $g['s']?>/" method="post" novalidate>
<fieldset<?php echo ($NUM==5)?' disabled':'' ?>>
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="settings_email">
<input type="hidden" name="act" value="add">
<label class="font-weight-bold">이메일 추가</label>
<div class="form-inline">
<input type="email" name="email" class="form-control" style="width: 50%" required placeholder="<?php echo ($NUM==5)?'최대 5개까지 추가할 수 있습니다.':'' ?>">
<button type="submit" class="btn btn-light ml-2<?php echo ($NUM==5)?' d-none':'' ?>">
<span class="not-loading">추가</span>
<span class="is-loading">추가중..</span>
</button>
<div class="invalid-feedback mt-2">이메일을 입력해주세요.</div>
</div>
</fieldset>
</form>
<?php if ($NUM): ?>
<hr>
<div class="mt-4">
<label class="font-weight-bold">기본 이메일</label>
<p>기본 이메일은 계정과 관련된 주요알림을 수신합니다.</p>
<div class="form-inline" id="save-primary">
<select class="form-control custom-select">
<?php if ($NUM_VCD): ?>
<?php while($V=db_fetch_array($VCD)):?>
<option value="<?php echo $V['uid'] ?>"<?php echo $V['base']?' selected':'' ?>>
<?php echo $V['email'] ?>
</option>
<?php endwhile?>
<?php else: ?>
<option value="">인증된 이메일이 없습니다.</option>
<?php endif; ?>
</select>
<?php if ($NUM_VCD): ?>
<button type="button" class="btn btn-light ml-2 js-submit" >
<span class="not-loading">저장</span>
<span class="is-loading">저장중..</span>
</button>
<?php endif; ?>
</div>
<small class="form-text text-muted mt-2">
본인인증된 메일만 지정할 수 있습니다.
</small>
</div>
<hr>
<div class="mt-4">
<label class="font-weight-bold">백업 이메일</label>
<p>
백업 이메일은 기본 이메일을 사용할 수 없을때, 비밀번호 초기화를 위해 사용됩니다.
</p>
<div class="form-inline" id="save-backup">
<select class="form-control custom-select">
<option value="all"<?php echo ($my['email_backup']==1)?' selected':'' ?>>인증된 메일전체</option>
<option value="none"<?php echo ($my['email_backup']==0)?' selected':'' ?>>기본 이메일만 사용</option>
<option disabled>---------------</option>
<?php while($S=db_fetch_array($SCD)):?>
<option value="<?php echo $S['uid'] ?>"<?php echo $S['backup']?' selected':'' ?>>
<?php echo $S['email'] ?>
</option>
<?php endwhile?>
</select>
<button type="button" class="btn btn-light ml-2 js-submit">
<span class="not-loading">저장</span>
<span class="is-loading">저장중..</span>
</button>
</div>
<small class="form-text text-muted mt-2">
본인인증된 메일만 지정할 수 있습니다.
</small>
</div>
<hr>
<h4 class="mt-4">환경 설정</h3>
<div class="mt-3" id="save-config">
<div class="custom-control custom-radio mt-2">
<input type="radio" id="mailing_1" name="mailing" value="1"<?php if($my['mailing']):?> checked="checked"<?php endif?> class="custom-control-input">
<label class="custom-control-label" for="mailing_1">뉴스레터나 공지이메일을 수신받겠습니다.</label>
</div>
<div class="custom-control custom-radio mt-2">
<input type="radio" id="mailing_0" name="mailing" value="0"<?php if(!$my['mailing']):?> checked="checked"<?php endif?> class="custom-control-input">
<label class="custom-control-label" for="mailing_0">계정과 관련된 메일만 수신합니다.</label>
</div>
<button type="button" class="btn btn-light mt-4 js-submit">
<span class="not-loading">저장</span>
<span class="is-loading">저장중..</span>
</button>
</div>
<?php endif; ?>
<?php endif; ?>
</div><!-- /.page-main -->
</div><!-- /.row -->
<?php include_once $g['dir_module_skin'].'_footer.php'?>
<!-- https://github.com/hilios/jQuery.countdown -->
<?php getImport('jquery.countdown','jquery.countdown.min','2.2.0','js')?>
<script>
var form = $('#emailsForm')
var f = document.getElementById('emailsForm');
function doCountdown() {
$(document).find('[data-countdown]').each(function() {
var $this = $(this), finalDate = $(this).data('countdown');
$this.countdown(finalDate, function(event) {
$this.html('['+event.strftime('%M:%S')+']');
});
});
};
$(function () {
doCountdown(); //인증번호 유효시간 카운트다운
putCookieAlert('member_settings_result') // 실행결과 알림 메시지 출력
// 본인인증 코드발송
$('[data-act="send_code"').click(function() {
var uid = $(this).data('uid')
var act = 'send_code'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_email&act='+act+'&uid='+uid
$(this).attr('disabled',true)
getIframeForAction();
frames.__iframe_for_action__.location.href = url;
$(this).text('재발송')
});
// 본인인증 코드 확인
$('[data-act="confirm_code"').click(function() {
var uid = $(this).data('uid')
var item = $('#item-'+uid)
var input = $('[name=confirm_code_'+uid+']')
var tooltip = item.find('.invalid-tooltip')
var code = input.val()
if (!code) {
tooltip.text('인증번호를 입력해주세요.')
input.focus().addClass('is-invalid')
return false;
}
var act = 'confirm_code'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_email&act='+act+'&uid='+uid+'&code='+code
$(this).attr('disabled',true)
getIframeForAction();
frames.__iframe_for_action__.location.href = url;
});
// 상태표시 흔적 및 실행버튼 초기화
form.find('[name="email"]').keyup(function(){
$(this).removeClass('is-invalid is-valid')
form.find('[type="submit"]').attr("disabled",false);
});
$('[data-role="code"]').keyup(function(){
$(this).removeClass('is-invalid is-valid')
});
// 이메일 삭제
$('[data-act="del"]').click(function() {
if (confirm('정말로 삭제하시겠습니까? ')){
var uid = $(this).data('uid')
var act = 'del'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_email&act='+act+'&uid='+uid
$(this).attr('disabled',true)
getIframeForAction();
frames.__iframe_for_action__.location.href = url;
}
});
// 기본 이메일 저장
$('#save-primary').find('.js-submit').click(function() {
var form = $('#save-primary')
var uid = form.find('select').val()
var act = 'save_primary'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_email&act='+act+'&uid='+uid
$(this).attr('disabled',true)
getIframeForAction();
setTimeout(function(){
frames.__iframe_for_action__.location.href = url;
}, 500);
});
// 백업 이메일 저장
$('#save-backup').find('.js-submit').click(function() {
var form = $('#save-backup')
var uid = form.find('select').val()
var act = 'save_backup'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_email&act='+act+'&uid='+uid
$(this).attr('disabled',true)
getIframeForAction();
setTimeout(function(){
frames.__iframe_for_action__.location.href = url;
}, 500);
});
// 환경설정 저장
$('#save-config').find('.js-submit').click(function() {
var form = $('#save-config')
var mailing = form.find(':radio[name="mailing"]:checked').val();
var act = 'save_config'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_email&act='+act+'&mailing='+mailing
$(this).attr('disabled',true)
getIframeForAction();
setTimeout(function(){
frames.__iframe_for_action__.location.href = url;
}, 300);
});
})
$('#emailsForm').submit(function() {
var form = $(this)
var layer = form.find('.invalid-feedback')
var input = form.find('[name="email"]')
var btn = form.find('[type="submit"]')
var obj = f.email
getIframeForAction(f);
// 상태초기화
input.removeClass('is-invalid is-valid')
btn.attr("disabled",false);
if (f.checkValidity() === false) {
input.focus()
input.addClass('is-invalid')
layer.text('이메일을 입력해주세요.')
return false;
}
if (!chkEmailAddr(obj.value)) {
input.focus()
input.addClass('is-invalid')
layer.text('이메일 형식이 아닙니다.')
return false;
}
btn.attr("disabled",true);
});
</script>

View File

@@ -0,0 +1,94 @@
<div class="page-wrapper row">
<nav class="col-3 page-nav">
<?php include_once $g['dir_module_skin'].'_nav.php'?>
</nav>
<div class="col-9 page-main">
<div class="subhead mt-0">
<h2 class="subhead-heading">회원탈퇴</h2>
</div>
<form class="card" name="procForm" role="form" action="<?php echo $g['s']?>/" method="post">
<div class="card-header">
<div class="media">
<i class="fa fa-user-times fa-3x mx-3" aria-hidden="true"></i>
<div class="media-body">
사용하고 계신 아이디 (<code><?php echo $my['id'] ?></code>) 는 탈퇴할 경우 재사용 및 복구가 불가능합니다. <br>
탈퇴한 아이디는 본인과 타인 모두 재사용 및 복구가 불가하오니 신중하게 선택하시기 바랍니다.
</div>
</div>
</div>
<div class="card-body">
<ul class="list-unstyled">
<li>· 탈퇴 후 회원정보 및 개인형 서비스 이용기록은 모두 삭제됩니다.</li>
<li>· 회원정보 및 개인형 서비스 이용기록은 모두 삭제되며, 삭제된 데이터는 복구되지 않습니다.</li>
<li>· 삭제되는 내용을 확인하시고 필요한 데이터는 미리 백업을 해주세요.</li>
<li>· 탈퇴 후에는 아이디 (<code><?php echo $my['id'] ?></code>)로 다시 가입할 수 없으며 아이디와 데이터는 복구할 수 없습니다.</li>
<li>· 게시판형 서비스에 남아 있는 게시글과 댓글은 탈퇴 후 삭제할 수 없습니다.</li>
</ul>
<div class="custom-control custom-checkbox f16">
<input type="checkbox" class="custom-control-input" id="reaveCheck">
<label class="custom-control-label" for="reaveCheck">위 내용을 모두 확인하였습니다.</label>
</div>
<hr>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center">아이디</label>
<div class="col-sm-10">
<input type="text" name="id" readonly class="form-control-plaintext" value="<?php echo $my['id'] ?>">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center">이름</label>
<div class="col-sm-10">
<input type="text" name="name" readonly class="form-control-plaintext" value="<?php echo $my['name'] ?>">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center">패스워드</label>
<div class="col-sm-8">
<input type="password" name="pw" id="password" class="form-control form-control-lg" placeholder="" required="" autocomplete="new-pw">
<div class="invalid-feedback mt-2" data-role="passwordErrorBlock"></div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-center"></label>
<div class="col-sm-8">
<input type="password" name="pw2" class="form-control form-control-lg" placeholder="다시 한번 입력해주세요." required="" value="">
<div class="invalid-feedback mt-2" data-role="passwordErrorBlock"></div>
<p class="mt-3 mb-0 text-muted">회원탈퇴를 원하시면 비밀번호를 입력하신 후 ‘탈퇴하기’ 버튼을 클릭해 주세요.</p>
</div>
</div>
</div>
<div class="card-footer d-flex justify-content-between align-items-center">
<a href="<?php echo RW('mod=password_reset')?>">패스워드를 분실했어요.</a>
<button type="submit" class="btn btn-light text-danger">탈퇴하기</button>
</div>
</form><!-- /.card -->
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->
<script type="text/javascript">
</script>

View File

@@ -0,0 +1,591 @@
<?php
$sqlque= 'mbruid='.$my['uid'].' and d_verified<>0';
$RCD = getDbArray($table['s_mbremail'],$sqlque,'*','uid','asc',0,1);
$PCD = getDbArray($table['s_mbrphone'],$sqlque,'*','uid','asc',0,1);
?>
<?php include_once $g['dir_module_skin'].'_header.php'?>
<div class="page-wrapper row">
<nav class="col-3 page-nav">
<?php include_once $g['dir_module_skin'].'_nav.php'?>
</nav>
<div class="col-9 page-main">
<div class="subhead mt-0">
<h2 class="subhead-heading">프로필 관리</h2>
</div>
<?php if (!getValid($my['last_log'],$d['member']['settings_expire'])): //로그인 후 경과시간 비교(분 ?>
<?php include_once $g['dir_module_skin'].'_lock.php'?>
<?php else: ?>
<!-- 프로필 커버 이미지 -->
<div class="d-flex justify-content-between align-items-end bg-light border p-3 mt-3 mb-4" style="height:255px;background-size: cover;background-image: url('<?php echo getCoverSrc($my['uid'],'940','255') ?>');">
<div class="">
<button type="button" data-toggle="cover" class="btn btn-light">
<span class="fa fa-upload fa-lg"></span> 사진 업로드
</button>
</div>
<?php if($my['cover']):?>
<a class="btn btn-light" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;a=cover_delete&amp;reload=Y" title="<?php echo $my['cover']?>" onclick="return hrefCheck(this,true,'정말로 삭제 하시겠습니까?');">
<i class="fa fa-trash fa-fw" aria-hidden="true"></i> 현재 사진삭제
</a>
<?php endif?>
</div>
<div class="clearfix">
<form class="float-left" id="memberForm" role="form" action="<?php echo $g['s']?>/" method="post" style="width: 500px;" novalidate>
<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="settings_main">
<input type="hidden" name="act" value="info">
<input type="hidden" name="check_nic" value="<?php echo $my['nic']?1:0?>">
<div class="form-group">
<label>이름 <span class="text-danger">*</span></label>
<input type="text" class="form-control" name="name" value="<?php echo $my['name']?>" maxlength="10" required>
</div>
<?php if($d['member']['form_settings_nic']):?>
<div class="form-group">
<label>닉네임<?php if($d['member']['form_settings_nic_required']):?> <span class="text-danger">*</span><?php endif?></label>
<input type="text" class="form-control" name="nic" value="<?php echo $my['nic']?>" maxlength="20" onblur="sameCheck(this,'hLayernic');">
<div class="invalid-feedback" id="hLayernic"></div>
<small class="form-text text-muted mt-2">
웹사이트에서 사용하고 싶은 이름을 입력해 주세요 (8자이내 중복불가)
</small>
</div>
<?php endif?>
<?php if($d['member']['form_settings_email_profile']):?>
<div class="form-group" id="select-email-profile">
<label>공개 이메일 <?php if($d['member']['form_settings_email_profile_required']):?><span class="text-danger">*</span><?php endif?></label>
<?php if ($my['email']): ?>
<select class="form-control custom-select" name="email_profile"<?php if($d['member']['form_settings_email_profile_required']):?> required<?php endif?>>
<option value="">선택하세요.</option>
<?php while($R=db_fetch_array($RCD)):?>
<option value="<?php echo $R['email'] ?>"<?php echo ($my['email_profile']==$R['email'])?' selected':'' ?>>
<?php echo $R['email'] ?>
</option>
<?php endwhile?>
</select>
<div class="invalid-feedback mt-2">프로필에 공개할 이메일을 선택하세요.</div>
<small class="form-text text-muted mt-2">
<a href="<?php echo $g['url_reset']?>&amp;page=email">이메일 관리</a>에서 이메일을 추가할수 있으며, 본인인증된 메일만 지정할수 있습니다.
</small>
<?php else: ?>
<select class="form-control custom-select" onChange="window.document.location.href=this.options[this.selectedIndex].value;">
<option value="">선택하세요.</option>
<option value="<?php echo $g['url_reset']?>&amp;page=email">메일 추가하기</option>
</select>
<small class="form-text text-muted mt-2">
본인인증된 메일만 추가할 수 있습니다.
</small>
<?php endif; ?>
</div>
<?php endif?>
<hr>
<?php if($d['member']['form_settings_birth']):?>
<div class="form-group">
<label>생년월일<?php if($d['member']['form_settings_birth_required']):?> <span class="text-danger">*</span><?php endif?></label>
<div class="form-inline">
<select class="form-control custom-select" name="birth_1">
<option value="">년도</option>
<?php for($i = substr($date['today'],0,4); $i > 1930; $i--):?>
<option value="<?php echo $i?>"<?php if($my['birth1']==$i):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="birth_2">
<option value="">월</option>
<?php $birth_2=substr($my['birth2'],0,2)?>
<?php for($i = 1; $i < 13; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($birth_2==$i):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="birth_3">
<option value="">일</option>
<?php $birth_3=substr($my['birth2'],2,2)?>
<?php for($i = 1; $i < 32; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($birth_3==$i):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<div class="custom-control custom-checkbox ml-3">
<input type="checkbox" class="custom-control-input" name="birthtype" id="birthtype" value="1"<?php if($my['birthtype']):?> checked="checked"<?php endif?>>
<label class="custom-control-label" for="birthtype">음력</label>
</div>
<div class="invalid-feedback mt-2">
생년월일을 지정해 주세요.
</div>
</div><!-- /.form-inline -->
</div>
<?php endif?>
<?php if($d['member']['form_settings_sex']):?>
<div class="form-group">
<label>성별 <?php if($d['member']['form_settings_sex_required']):?><span class="text-danger">*</span><?php endif?></label>
<div id="radio-sex">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="sex_1" name="sex" class="custom-control-input" value="1"<?php if($my['sex']==1):?> checked="checked"<?php endif?> required>
<label class="custom-control-label" for="sex_1">남성</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="sex_2" name="sex" class="custom-control-input" value="2"<?php if($my['sex']==2):?> checked="checked"<?php endif?> required>
<label class="custom-control-label text-nowrap" for="sex_2">여성</label>
<div class="invalid-feedback ml-4">성별을 선택해 주세요.</div>
</div>
</div>
</div>
<?php endif?>
<?php if($d['member']['form_settings_bio']):?>
<div class="form-group">
<label>간단소개<?php if($d['member']['form_settings_bio_required']):?> <span class="text-danger">*</span><?php endif?></label>
<textarea class="form-control" name="bio" rows="3" placeholder="간략한 소개글을 입력해주세요."><?php echo $my['bio']?></textarea>
<div class="invalid-feedback">
간단소개를 입력해 주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_settings_home']):?>
<div class="form-group">
<label>홈페이지<?php if($d['member']['form_settings_home_required']):?> <span class="text-danger">*</span><?php endif?></label>
<input type="text" class="form-control" name="home" value="<?php echo $my['home']?>" placeholder="URL을 입력하세요.">
<div class="invalid-feedback">
홈페이지 주소를 입력해주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_settings_tel']):?>
<div class="form-group">
<label>일반전화 <?php if($d['member']['form_settings_tel_required']):?><span class="text-danger">*</span><?php endif?></label>
<?php $tel1=explode('-',$my['tel'])?>
<div class="form-inline">
<input type="text" name="tel_1" value="<?php echo $tel1[0]?>" maxlength="4" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="tel_2" value="<?php echo $tel1[1]?>" maxlength="4" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="tel_3" value="<?php echo $tel1[2]?>" maxlength="4" size="4" class="form-control">
<div class="invalid-feedback">
전화번호를 입력해주세요.
</div>
</div><!-- /.form-inline -->
</div>
<?php endif?>
<?php if($d['member']['form_settings_location']):?>
<div class="form-group">
<label>거주지역<?php if($d['member']['form_settings_location_required']):?> <span class="text-danger">*</span><?php endif?></label>
<select class="form-control custom-select" name="location">
<option value="">&nbsp;+ 선택하세요</option>
<option value="" disabled>------------------</option>
<?php
$_tmpvfile = $g['path_module'].$m.'/var/location.txt';
$_location=file($_tmpvfile);
?>
<?php foreach($_location as $_val):?>
<option value="<?php echo trim($_val)?>"<?php if(trim($_val)==$my['location']):?> selected="selected"<?php endif?>>ㆍ<?php echo trim($_val)?></option>
<?php endforeach?>
</select>
<div class="invalid-feedback">
거주지를 선택해 주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_settings_job']):?>
<div class="form-group">
<label>직업<?php if($d['member']['form_settings_job_required']):?> <span class="text-danger">*</span><?php endif?></label>
<select class="form-control custom-select" name="job">
<option value="">&nbsp;+ 선택하세요</option>
<option value="" disabled>------------------</option>
<?php
$_tmpvfile = $g['path_module'].$m.'/var/job.txt';
$_job=file($_tmpvfile);
?>
<?php foreach($_job as $_val):?>
<option value="<?php echo trim($_val)?>"<?php if(trim($_val)==$my['job']):?> selected="selected"<?php endif?>>ㆍ<?php echo trim($_val)?></option>
<?php endforeach?>
</select>
<div class="invalid-feedback">
직업을 선택해 주세요.
</div>
</div>
<?php endif?>
<?php if($d['member']['form_settings_marr']):?>
<div class="form-group">
<label>결혼기념일<?php if($d['member']['form_settings_marr_required']):?> <span class="text-danger">*</span><?php endif?></label>
<div class="form-inline">
<select class="form-control custom-select" name="marr_1">
<option value="">년도</option>
<?php for($i = substr($date['today'],0,4); $i > 1930; $i--):?>
<option value="<?php echo $i?>"<?php if($i==$my['marr1']):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="marr_2">
<option value="">월</option>
<?php for($i = 1; $i < 13; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($i==substr($my['marr2'],0,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<select class="form-control custom-select ml-2" name="marr_3">
<option value="">일</option>
<?php for($i = 1; $i < 32; $i++):?>
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($i==substr($my['marr2'],2,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
<?php endfor?>
</select>
<div class="invalid-feedback">
결혼기념일을 입력해주세요.
</div>
</div><!-- /.form-inline -->
</div>
<?php endif?>
<?php if($d['member']['form_settings_add']):?>
<?php $g['memberAddFieldSite'] = $g['path_var'].'site/'.$_HS['id'].'/member.add_field.txt'; ?>
<?php $_add = file_exists($g['memberAddFieldSite']) ? file($g['memberAddFieldSite']) : file($g['path_module'].'member/var/add_field.txt');?>
<?php foreach($_add as $_key):?>
<?php $_val = explode('|',trim($_key))?>
<?php if($_val[6]) continue?>
<?php $_myadd1 = explode($_val[0].'^^^',$my['addfield'])?>
<?php $_myadd2 = explode('|||',$_myadd1[1])?>
<div class="form-group">
<label><?php echo $_val[1]?><?php if($_val[5]):?> <span class="text-danger">*</span><?php endif?></label>
<div class="">
<?php if($_val[2]=='text'):?>
<input type="text" name="add_<?php echo $_val[0]?>" class="form-control" value="<?php echo $_myadd2[0]?>" <?php if($_val[5]):?> required<?php endif?>>
<?php endif?>
<?php if($_val[2]=='password'):?>
<input type="password" name="add_<?php echo $_val[0]?>" class="form-control" value="<?php echo $_myadd2[0]?>" <?php if($_val[5]):?> required<?php endif?>>
<?php endif?>
<?php if($_val[2]=='select'): $_skey=explode(',',$_val[3])?>
<select name="add_<?php echo $_val[0]?>" class="form-control custom-select"<?php if($_val[5]):?> required<?php endif?>>
<option value="">&nbsp;+ 선택하세요</option>
<?php foreach($_skey as $_sval):?>
<option value="<?php echo trim($_sval)?>"<?php if(trim($_sval)==$_myadd2[0]):?> selected="selected"<?php endif?>>ㆍ<?php echo trim($_sval)?></option>
<?php endforeach?>
</select>
<?php endif?>
<?php if($_val[2]=='radio'): $_skey=explode(',',$_val[3])?>
<div class="shift">
<?php foreach($_skey as $_sval):?>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>" name="add_<?php echo $_val[0]?>" value="<?php echo trim($_sval)?>"<?php if(trim($_sval)==$_myadd2[0]):?> checked="checked"<?php endif?> class="custom-control-input">
<label class="custom-control-label" for="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>"><?php echo trim($_sval)?></label>
</div>
<?php endforeach?>
</div>
<?php endif?>
<?php if($_val[2]=='checkbox'): $_skey=explode(',',$_val[3])?>
<div class="shift">
<?php foreach($_skey as $_sval):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>" name="add_<?php echo $_val[0]?>[]" value="<?php echo trim($_sval)?>"<?php if(strstr($_myadd2[0],'['.trim($_sval).']')):?> checked="checked"<?php endif?> >
<label class="custom-control-label" for="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>"><?php echo trim($_sval)?></label>
</div>
<?php endforeach?>
</div>
<?php endif?>
<?php if($_val[2]=='textarea'):?>
<textarea name="add_<?php echo $_val[0]?>" rows="5" class="form-control" <?php if($_val[5]):?> required<?php endif?>><?php echo $_myadd2[0]?></textarea>
<?php endif?>
</div>
</div>
<?php endforeach?>
<?php endif?>
<div class="mt-4">
<button type="submit" class="btn btn-primary btn-block js-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>
</form>
<?php if($d['member']['form_settings_avatar']):?>
<aside class="edit-profile-avatar float-right">
<dl class="form-group">
<dt class="mb-2">프로필 사진</dt>
<dd>
<div data-toggle="avatar" role="button" class="position-relative rounded border">
<img src="<?php echo getAvatarSrc($my['uid'],'200') ?>" width="200" height="200" alt="" class="">
<i class="position-absolute fa fa-upload fa-3x" aria-hidden="true" data-toggle="tooltip" title="사진을 변경합니다." data-placement="right"></i>
</div>
<div class="mt-2">
<?php if($my['photo']):?>
<a class="btn btn-light btn-block" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;a=avatar_delete&amp;reload=Y" title="<?php echo $my['photo']?>" onclick="return hrefCheck(this,true,'정말로 삭제 하시겠습니까?');">
<i class="fa fa-trash fa-fw" aria-hidden="true"></i> 현재 사진삭제
</a>
<?php else: ?>
<div class="text-center">
<small class="text-muted">gif/jpg/png - 250*250픽셀 이상</small>
</div>
<?php endif?>
</div>
<form name="MbrPhotoForm" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="avatar">
<input type="file" name="upfile" id="rb-upfile-avatar" accept="image/gif, image/jpg, image/jpeg, image/png" class="d-none">
</form>
<form name="MbrCoverForm" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="cover">
<input type="file" name="upfile" id="rb-upfile-cover" accept="image/gif, image/jpg, image/jpeg, image/png" class="d-none">
</form>
</dd>
</dl>
</aside><!-- /.edit-profile-avatar -->
<?php endif; ?>
</div>
<?php endif; ?>
</div><!-- /.page-main -->
</div><!-- /.row -->
<?php include_once $g['dir_module_skin'].'_footer.php'?>
<script>
var f = document.getElementById("memberForm"); //dom 선택자
var form = $('#memberForm'); //jquery 선택자
function sameCheck(obj,layer) {
if (!obj.value)
{
eval('obj.form.check_'+obj.name).value = '0';
getId(layer).innerHTML = '';
}
else
{
form.find('.form-control').removeClass('is-valid is-invalid') //에러항목 초기화
if (obj.name == 'email')
{
if (!chkEmailAddr(obj.value))
{
obj.form.check_email.value = '0';
obj.focus();
getId(layer).innerHTML = '이메일형식이 아닙니다.';
return false;
}
}
frames._action_frame_<?php echo $m?>.location.href = '<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&a=same_check&fname=' + obj.name + '&fvalue=' + obj.value + '&flayer=' + layer;
}
}
$(function () {
putCookieAlert('member_settings_result') // 실행결과 알림 메시지 출력
f.addEventListener('submit', function(event) {
event.preventDefault();
event.stopPropagation();
form.find('.form-control').removeClass('is-invalid') // 에러이력 초기화
if (f.check_nic.value == '0')
{
f.nic.classList.add('is-invalid')
f.nic.focus();
return false;
}
<?php if($d['member']['form_settings_email_profile']&&$d['member']['form_settings_email_profile_required']):?>
if (f.email_profile.value == '')
{
getId('select-email-profile').classList.add('was-validated');
f.email_profile.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_settings_birth']&&$d['member']['form_settings_birth_required']):?>
if (f.birth_1.value == '')
{
f.birth_1.classList.add('is-invalid');
f.birth_1.focus();
return false;
}
if (f.birth_2.value == '')
{
f.birth_2.classList.add('is-invalid');
f.birth_2.focus();
return false;
}
if (f.birth_3.value == '')
{
f.birth_3.classList.add('is-invalid');
f.birth_3.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_settings_sex']&&$d['member']['form_settings_sex_required']):?>
if (f.sex[0].checked == false && f.sex[1].checked == false)
{
getId('radio-sex').classList.add('was-validated');
f.sex[0].focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_settings_bio']&&$d['member']['form_settings_bio_required']):?>
if (f.bio.value == '')
{
f.bio.classList.add('is-invalid');
f.bio.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_settings_home']&&$d['member']['form_settings_home_required']):?>
if (f.home.value == '')
{
f.home.classList.add('is-invalid');
f.home.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_settings_tel']&&$d['member']['form_settings_tel_required']):?>
if (f.tel_1.value == '')
{
f.tel_1.classList.add('is-invalid');
f.tel_1.focus();
return false;
}
if (f.tel_2.value == '')
{
f.tel_2.classList.add('is-invalid');
f.tel_2.focus();
return false;
}
if (f.tel_3.value == '')
{
f.tel_3.classList.add('is-invalid');
f.tel_3.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_settings_location']&&$d['member']['form_settings_location_required']):?>
if (f.location.value == '')
{
f.location.classList.add('is-invalid');
f.location.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_settings_job']&&$d['member']['form_settings_job_required']):?>
if (f.job.value == '')
{
f.job.classList.add('is-invalid');
f.job.focus();
return false;
}
<?php endif?>
<?php if($d['member']['form_settings_marr']&&$d['member']['form_settings_marr_required']):?>
if (f.marr_1.value == '')
{
f.marr_1.classList.add('is-invalid');
f.marr_1.focus();
return false;
}
if (f.marr_2.value == '')
{
f.marr_2.classList.add('is-invalid');
f.marr_2.focus();
return false;
}
if (f.marr_3.value == '')
{
f.marr_3.classList.add('is-invalid');
f.marr_3.focus();
return false;
}
<?php endif?>
//가입 추가항목 체크
<?php if($d['member']['form_settings_add']):?>
var radioarray;
var checkarray;
var i;
var j = 0;
<?php foreach($_add as $_key):?>
<?php $_val = explode('|',trim($_key))?>
<?php if(!$_val[5]||$_val[6]) continue?>
<?php if($_val[2]=='text' || $_val[2]=='password' || $_val[2]=='select' || $_val[2]=='textarea'):?>
if (f.add_<?php echo $_val[0]?>.value == '')
{
alert('<?php echo $_val[1]?>이(가) <?php echo $_val[2]=='select'?'선택':'입력'?>되지 않았습니다. ');
f.add_<?php echo $_val[0]?>.focus();
return false;
}
<?php endif?>
<?php if($_val[2]=='radio'):?>
j = 0;
radioarray = f.add_<?php echo $_val[0]?>;
for (i = 0; i < radioarray.length; i++)
{
if (radioarray[i].checked == true) j++;
}
if (!j)
{
alert('<?php echo $_val[1]?>이(가) 선택되지 않았습니다. ');
radioarray[0].focus();
return false;
}
<?php endif?>
<?php if($_val[2]=='checkbox'):?>
j = 0;
checkarray = document.getElementsByName("add_<?php echo $_val[0]?>[]");
for (i = 0; i < checkarray.length; i++)
{
if (checkarray[i].checked == true) j++;
}
if (!j)
{
alert('<?php echo $_val[1]?>이(가) 선택되지 않았습니다. ');
checkarray[0].focus();
return false;
}
<?php endif?>
<?php endforeach?>
<?php endif?>
$('.js-submit').attr("disabled",true);
setTimeout(function(){
getIframeForAction(f);
f.submit();
}, 500);
});
})
</script>

View File

@@ -0,0 +1,541 @@
<?php
$emailque= 'mbruid='.$my['uid'].' and d_verified<>0';
$RCD = getDbArray($table['s_mbremail'],$emailque,'*','uid','asc',0,1);
$NT_DATA = explode('|',$my['noticeconf']);
$nt_web = $NT_DATA[0];
$nt_email = $NT_DATA[1];
$nt_fcm = $NT_DATA[2];
$nt_modules = getArrayString($NT_DATA[3]);
$nt_members = getArrayString($NT_DATA[4]);
$phone_que = 'mbruid='.$my['uid'].' and device="phone"';
$tablet_que = 'mbruid='.$my['uid'].' and device="tablet"';
$desktop_que = 'mbruid='.$my['uid'].' and device="desktop"';
$PTK = getDbData($table['s_iidtoken'],$phone_que,'*');
$TTK = getDbData($table['s_iidtoken'],$tablet_que,'*');
$DTK = getDbData($table['s_iidtoken'],$desktop_que,'*');
?>
<?php getImport('font-kimsq','css/font-kimsq',false,'css')?>
<?php include_once $g['dir_module_skin'].'_header.php'?>
<div class="page-wrapper row">
<nav class="col-3 page-nav">
<?php include_once $g['dir_module_skin'].'_nav.php'?>
</nav>
<div class="col-9 page-main">
<div class="subhead mt-0">
<h2 class="subhead-heading">알림 관리</h2>
</div>
<?php if (!getValid($my['last_log'],$d['member']['settings_expire'])): //로그인 후 경과시간 비교(분 ?>
<?php include_once $g['dir_module_skin'].'_lock.php'?>
<?php else: ?>
<p>알림을 수신하면 웹 사이트내의 정보는 물론 회원님이 언급되거나 관련된 정보들을 실시간으로 받아보실 수 있습니다.</p>
<div id="save-config">
<form name="procForm" 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="notice_config_user">
<div class="card mb-3">
<div class="card-header d-flex justify-content-between align-items-center">
사이트 알림
<div class="btn-group btn-group-sm btn-group-toggle" data-toggle="buttons">
<label class="btn <?php if($nt_web==''):?>btn-primary active<?php else:?>btn-light<?php endif?>" onclick="btnCheck(this);">
<input type="radio" value="" name="nt_web"<?php if($nt_web==''):?> checked<?php endif?> id="nt_web" autocomplete="off"> ON
</label>
<label class="btn <?php if($nt_web=='1'):?>btn-secondary active<?php else:?>btn-light<?php endif?>" onclick="btnCheck(this);">
<input type="radio" value="1" name="nt_web"<?php if($nt_web=='1'):?> checked<?php endif?> id="nt_web_1" autocomplete="off"> OFF
</label>
</div>
</div>
<?php if ($nt_web==''): ?>
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="media w-75">
<i class="fa fa-envelope-o fa-fx mr-4 fa-2x text-muted align-self-center" aria-hidden="true"></i>
<div class="media-body">
이메일 알림
<div class="input-group mt-1">
<select class="form-control custom-select" name="email_noti">
<option value="">사용안함</option>
<?php while($R=db_fetch_array($RCD)):?>
<option value="<?php echo $R['email'] ?>"<?php echo ($my['email_noti']==$R['email'])?' selected':'' ?>>
<?php echo $R['email'] ?>
</option>
<?php endwhile?>
</select>
<div class="invalid-tooltip">
이메일을 저장해 주세요.
</div>
<div class="input-group-append">
<button class="btn btn-outline-secondary js-submit" type="button">
<span class="not-loading">저장</span>
<span class="is-loading">저장중..</span>
</button>
</div>
</div>
<small class="form-text text-muted mt-2">
알림발송시 지정된 이메일로도 알림내용이 발송됩니다.<br>
<a href="<?php echo $g['url_reset']?>&amp;page=email">이메일 관리</a>에서 추가 할수있으며, 본인인증된 메일만 추가할 수 있습니다.
</small>
</div>
</div>
<div class="btn-group btn-group-sm btn-group-toggle" data-toggle="buttons" id="nt_email" data-email="<?php echo $my['email_noti']?>">
<label class="btn <?php if($nt_email=='1'):?>btn-primary active<?php else:?>btn-light<?php endif?>">
<input type="radio" value="1" name="nt_email"<?php if($nt_email=='1'):?> checked<?php endif?> autocomplete="off" id="nt_email_1" <?php echo $my['email_noti']?'':'disabled'?>> ON
</label>
<label class="btn <?php if($nt_email==''):?>btn-secondary active<?php else:?>btn-light<?php endif?>">
<input type="radio" value="" name="nt_email"<?php if($nt_email==''):?> checked<?php endif?> autocomplete="off" id="nt_email_0"> OFF
</label>
</div>
</li>
<?php if ($g['push_active']==1): ?>
<li class="list-group-item" id="permission_div" style="display: none">
<div class="w-100">
<div class="media w-100">
<i class="fa fa-bolt mr-3 fa-fw fa-2x text-muted align-self-center" aria-hidden="true"></i>
<div class="media-body">
푸시 알림 <span class="badge badge-pill badge-light"></span>
<small class="d-block note mt-2 pr-3">
데스크탑 푸시알림을 수신하면 공지사항은 물론 회원님이 게시글에 대한 피드백 또는 내가 언급된 글에 대한 정보들을 실시간으로 받아보실 수 있습니다.
</small>
</div>
<button class="btn btn-light" id="RequestPermission">권한요청</button>
</div>
</div>
</li>
<li class="list-group-item" id="push_setting" style="display: none">
<div class="media w-100">
<i class="fa fa-bolt mr-3 fa-fw fa-2x text-muted align-self-center" aria-hidden="true"></i>
<div class="media-body">
푸시 알림 <span class="badge badge-pill badge-light"></span>
<small class="d-block note mt-2 pr-3">
알림발송시 푸시 알림으로 알림내용이 발송됩니다.
</small>
</div>
<div class="btn-group btn-group-sm btn-group-toggle" data-toggle="buttons" id="nt_fcm">
<label class="btn <?php if($nt_fcm=='1'):?>btn-primary active<?php else:?>btn-light<?php endif?>">
<input type="radio" value="1" name="nt_fcm"<?php if($nt_fcm=='1'):?> checked<?php endif?> autocomplete="off" id="nt_fcm_1"> ON
</label>
<label class="btn <?php if($nt_fcm==''):?>btn-secondary active<?php else:?>btn-light<?php endif?>">
<input type="radio" value="" name="nt_fcm"<?php if($nt_fcm==''):?> checked<?php endif?> autocomplete="off" id="nt_fcm_0"> OFF
</label>
</div>
</div>
</li>
<li class="list-group-item" id="push_disabled" style="display: none">
<div class="media w-100">
<span class="fa-stack fa-lg align-self-center text-muted mr-3">
<i class="fa fa-bolt fa-stack-1x"></i>
<i class="fa fa-ban fa-stack-2x"></i>
</span>
<div class="media-body">
푸시 알림 <span class="badge badge-pill badge-light text-danger align-text-top">차단됨</span>
<small class="d-block note mt-2 pr-3">
알림발송이 차단 되었습니다. 상태를 해제하려면 브라우저의 설정변경이 필요합니다.
<a class="ml-1" href="chrome://settings/content/notifications" target="_blank">자세히보기</a>
</small>
</div>
</div>
</li>
<?php elseif ($g['push_active']==2): ?>
<li class="list-group-item">
<div class="media w-100">
<i class="fa fa-bolt mr-3 fa-fw fa-2x text-muted align-self-center" aria-hidden="true"></i>
<div class="media-body">
푸시 알림 <span class="badge badge-pill badge-light text-muted align-text-top">점검중</span>
<small class="d-block note mt-2 pr-3 text-danger">
푸시알림을 위한 연결정보가 없습니다. 관리자에게 문의하세요.
</small>
</div>
</div>
</li>
<?php else: ?>
<li class="list-group-item">
<div class="media w-100">
<i class="fa fa-bolt mr-3 fa-fw fa-2x text-muted align-self-center" aria-hidden="true"></i>
<div class="media-body">
푸시 알림 <span class="badge badge-pill badge-light text-muted align-text-top">미지원</span>
<small class="d-block note mt-2 pr-3">
푸시알림이 지원되지 않는 브라우저 입니다.<br>지원 브라우저 : 크롬(Chrome), 파이어폭스(Firefox)
</small>
</div>
</div>
</li>
<?php endif; ?>
</ul>
<?php else: ?>
<div class="card-block p-5 note text-center">
알림이 꺼져서 소식을 받을 수 없습니다.<br>알림을 켜서 글, 댓글, 나를 언급한 글 등 중요알림을 받아보세요.
</div>
<?php endif; ?>
</div>
<?php if ($nt_web==''): ?>
<?php if ($nt_fcm=='1'): ?>
<div class="card" id="token_div" style="display: none;" class="mt-4">
<div class="card-header d-flex justify-content-between align-items-center">
<span>
인스턴스 토큰
<i class="fa fa-question-circle-o" aria-hidden="true" role="button"
data-toggle="popover" title="인스턴스 ID 토큰"
data-content="<span class='text-muted f12'>처음 시작할 때 클라이언트 앱 인스턴스에 대한 등록 토큰이 생성됩니다.
Instance ID는 앱의 인스턴스마다의 고유한 값입니다.<br><br>[ 다음과 같은 경우에 토큰은 변경됩니다. ]<br>
- 인스턴스 ID를 삭제할 경우<br>- 앱이 새 기기에서 복원된 경우<br>- 사용자가 앱을 제거/재설치한 경우<br>- 사용자가 앱 데이터를 초기화한 경우</span>
">
</i>
</span>
<button class="btn btn-light btn-sm js-sendTest"
data-toggle="popover" title="푸시알림 테스트"
data-content="<span class='text-muted f12'>등록된 토큰을 기반으로 데스크탑과 모바일로<br>푸시알림 메시지가 각각 발송됩니다.<br>알림이 수신된다면 정상적으로 셋팅된 것입니다.<br><br>알림이 수신되지 않는다면 토큰을 <mark>재발급</mark> 해주세요. </span>">
<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 class="card-body">
<div class="media">
<span class="mr-3 text-center">
<i class="fa fa-desktop fa-3x align-self-center fa-border text-muted" aria-hidden="true"></i><br>
<span class="mt-3 f12 text-muted">데스크탑 전용</span>
</span>
<div class="media-body">
<p class="mb-2" style="word-break: break-all;">
<span class="token note"></span>
</p>
<div class="d-flex justify-content-between">
<div>
<span class="badge badge-pill badge-secondary"><?php echo $DTK['browser'] ?> <?php echo $DTK['version'] ?></span>
<span class="badge badge-pill badge-light">
등록일시 : <?php echo getDateFormat($DTK['d_update']?$DTK['d_update']:$DTK['d_regis'],'Y.m.d H:i')?>
</span>
</div>
<button class="btn btn-light btn-sm js-deleteToken">
<i class="fa fa-refresh fa-fw" aria-hidden="true"></i>
재발급
</button>
</div><!-- /.d-flex -->
</div>
</div>
<hr>
<div class="media">
<span class="mr-3 text-center">
<i class="fa fa-mobile fa-3x fa-border text-muted" aria-hidden="true" style="width: 70px"></i><br>
<span class="mt-3 f12 text-muted">스마트폰 전용</span>
</span>
<div class="media-body align-self-center">
<?php if ($PTK['token']): ?>
<p class="mb-2" style="word-break: break-all;">
<span class="note"><?php echo $PTK['token'] ?></span>
</p>
<div class="d-flex justify-content-between">
<div>
<span class="badge badge-pill badge-secondary"><?php echo $PTK['browser'] ?> <?php echo $PTK['version'] ?></span>
<span class="badge badge-pill badge-light">
등록일시 : <?php echo getDateFormat($PTK['d_update']?$PTK['d_update']:$PTK['d_regis'],'Y.m.d H:i')?>
</span>
</div>
<div>
<span class="badge badge-light">재발급은 스마트폰에서만 지원됩니다.</span>
</div>
</div><!-- /.d-flex -->
<?php else: ?>
<div class="d-flex justify-content-between mb-4">
<span class="note">저장된 토큰이 없습니다.</span>
<div>
<span class="badge badge-light">발급은 스마트폰에서만 가능합니다.</span>
</div>
</div>
<?php endif; ?>
</div>
</div>
<hr>
<div class="media">
<span class="mr-3 text-center">
<i class="fa fa-tablet fa-3x fa-border text-muted" aria-hidden="true" style="width: 70px"></i><br>
<span class="mt-3 f12 text-muted">태블릿 전용</span>
</span>
<div class="media-body align-self-center">
<?php if ($TTK['token']): ?>
<p class="mb-2" style="word-break: break-all;">
<span class="note"><?php echo $TTK['token'] ?></span>
</p>
<div class="d-flex justify-content-between">
<div>
<span class="badge badge-pill badge-secondary"><?php echo $TTK['browser'] ?> <?php echo $TTK['version'] ?></span>
<span class="badge badge-pill badge-light">
등록일시 : <?php echo getDateFormat($TTK['d_update']?$TTK['d_update']:$TTK['d_regis'],'Y.m.d H:i')?>
</span>
</div>
<div>
<span class="badge badge-light">재발급은 스마트폰에서만 지원됩니다.</span>
</div>
</div><!-- /.d-flex -->
<?php else: ?>
<div class="d-flex justify-content-between mb-4">
<span class="note">저장된 토큰이 없습니다.</span>
<div>
<span class="badge badge-light">발급은 태블릿에서만 가능합니다.</span>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
<div class="card-footer">
<span class="note">
인스턴스 토큰은 푸시알림에 활용되며 기기별로 1개만 저장 됩니다.<br>
접속기기가 변경되면 토큰 또한 변경되며, 변경된 토큰정보는 로그인 후 갱신저장 됩니다.<br>
푸시알림이 수신되지 않는다면, 토큰 '재발급'을 시도해 보세요. 알림 메시지를 받았다면 정상 입니다.
</span>
</div>
</div>
<?php endif; ?>
<div class="card my-3">
<div class="card-header">
모듈별 설정
</div>
<ul class="list-group list-group-flush">
<?php $_MODULES=getDbArray($table['s_module'],'','*','gid','asc',0,1)?>
<?php while($_MD=db_fetch_array($_MODULES)):?>
<li class="list-group-item justify-content-between list-group-item-action align-items-center<?php if(strstr($d['ntfc']['cut_modules'],'['.$_MD['id'].']')):?> d-none<?php else: ?> d-flex<?php endif?>">
<div class="media w-75">
<i class="<?php echo $_MD['icon']?> fa-fw fa-2x mr-3 align-self-center text-muted"></i>
<div class="media-body">
<h5 class="mt-0"><?php echo $_MD['name']?> <span class="badge badge-pill badge-light align-text-top"><?php echo ucfirst($_MD['id'])?></span></h5>
<p class="note">내글에 댓글등록시, 좋아요/싫어요시</p>
</div>
</div>
<div class="btn-group btn-group-sm btn-group-toggle module_members" role="group" data-toggle="buttons" data-module="<?php echo $_MD['id']?>">
<button type="button" class="btn btn-<?php if(strstr($NT_DATA[3],'['.$_MD['id'].']') === false):?>primary active<?php else: ?>light<?php endif?>" data-act="on">ON</button>
<button type="button" class="btn btn-<?php if(strstr($NT_DATA[3],'['.$_MD['id'].']')):?>secondary active<?php else: ?>light<?php endif?>" data-act="off">OFF</button>
</div>
</li>
<?php endwhile?>
</ul>
</div><!-- /.card -->
<div class="card mb-3">
<div class="card-header">
<i class="fa fa-ban fa-fw fa-lg" aria-hidden="true"></i>
알림발송이 차단된 회원
</div>
<ul class="list-group list-group-flush">
<?php $_i=0;foreach($nt_members['data'] as $_md):?>
<?php $_R=getDbData($table['s_mbrdata'],'memberuid='.$_md,'*')?>
<li class="list-group-item d-flex justify-content-between list-group-item-action align-items-center">
<div class="media">
<a class="mr-3" href="<?php echo getProfileLink($_R['memberuid']) ?>"
data-toggle="getMemberLayer"
data-mbruid="<?php echo $_R['memberuid'] ?>">
<img class="rounded " src="<?php echo getAvatarSrc($_R['memberuid'],'36') ?>" alt="" width=36>
</a>
<div class="media-body">
<h5 class="f14 mt-0 mb-1">
<?php if($_R['name']):?>
<a class="muted-link" href="<?php echo getProfileLink($_R['memberuid']) ?>"
data-toggle="getMemberLayer"
data-mbruid="<?php echo $_R['memberuid'] ?>">
<?php echo $_R['name']?> <span class="badge badge-pill badge-light align-text-top"><?php echo $_R['nic']?></span>
</a>
<?php else: ?>
<span class="badge badge-pill badge-light">시스템</span>
<?php endif?>
</h5>
<small><?php echo getDateFormat($_R['d_regis'],'Y.m.d')?> 가입</small>
</div>
</div>
<a class="btn btn-light btn-sm" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=notification&amp;a=notice_config_user&amp;member_uid=<?php echo $_R['memberuid']?>" onclick="return hrefCheck(this,true,'정말로 해제하시겠습니까?');">
해제
</a>
</li>
<?php $_i++;endforeach?>
</ul>
<?php if(!$nt_members['count']):?>
<div class="rb-none text-center p-5 text-muted f12">
차단된 회원이 없습니다.<br>
<a href="<?php echo RW('mod=noti')?>">내 알림함</a> 에서 차단할 회원을 지정할 수 있습니다.
</div>
<?php endif?>
</div><!-- /.card -->
<?php endif; ?>
</form>
</div><!-- /#save-config -->
<?php endif; ?>
</div><!-- /.page-main -->
</div><!-- /.row -->
<?php include_once $g['dir_module_skin'].'_footer.php'?>
<script>
var f = document.procForm;
$(function () {
putCookieAlert('member_settings_result') // 실행결과 알림 메시지 출력
// 지정된 이메일이 없는 경우, 이메일 알림을 설정을 시도할 경우 에러출력
$('#nt_email_1:disabled').parent('.btn').click(function() {
$('[name="email_noti"]').addClass('is-invalid')
});
//알림설정 저장
$('[data-toggle="buttons"]').find('[type="radio"]').change(function(){
var btn_group = $(this).closest('.btn-group')
var btn = $(this).closest('.btn')
btn_group.find('.btn').removeClass('btn-primary').addClass('btn-light')
btn.addClass('btn-primary').removeClass('btn-light')
getIframeForAction(f);
f.submit();
});
// 이메일 저장
$('#save-config').find('.js-submit').click(function() {
var form = $('#save-config')
var email_noti = form.find('[name=email_noti]').val();
var act = 'save_config'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_noti&act='+act+'&email_noti='+email_noti
$(this).attr('disabled',true)
getIframeForAction();
frames.__iframe_for_action__.location.href = url;
});
//모듈별 차단설정
$('.module_members').find('.btn').click(function() {
var btn = $(this)
var btn_group = btn.closest('.btn-group')
var mid = btn_group.data('module')
var act = btn.data('act')
if (act=='on'){
btn_group.find('.btn').removeClass('btn-secondary btn-primary').addClass('btn-light')
btn.addClass('btn-primary').removeClass('btn-light')
var url = rooturl+'/?r='+raccount+'&m=notification&a=notice_config_user&module_id='+mid
} else {
btn.addClass('btn-secondary').removeClass('btn-light')
var url = rooturl+'/?r='+raccount+'&m=notification&a=multi_delete_user&module_id='+mid+'&deltype=off_module'
}
console.log(url)
getIframeForAction();
frames.__iframe_for_action__.location.href = url;
});
//게시물 목록에서 프로필 풍선(popover) 띄우기
$('[data-toggle="getMemberLayer"]').popover({
container: 'body',
trigger: 'manual',
html: true,
content: function () {
var uid = $(this).attr('data-uid')
var mbruid = $(this).attr('data-mbruid')
var type = 'popover'
$.post(rooturl+'/?r='+raccount+'&m=member&a=get_profileData',{
mbruid : mbruid,
type : type
},function(response){
var result = $.parseJSON(response);
var profile=result.profile;
$('#popover-item-'+uid).html(profile);
});
return '<div id="popover-item-'+uid+'" class="p-1">불러오는 중...</div>';
}
})
.on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
});
}).on("mouseleave", function () {
var _this = this;
setTimeout(function () {
if (!$(".popover:hover").length) {
$(_this).popover("hide");
}
}, 30);
});
$('#RequestPermission').click(function(event) {
event.preventDefault();
requestPermission()
});
$('.js-deleteToken').click(function(event) {
event.preventDefault();
deleteToken()
});
$('.js-sendTest').click(function(event) {
event.preventDefault();
var btn = $(this)
var popover = $('[data-toggle="popover"]')
popover.popover('hide')
btn.attr('disabled',true)
var title = '<?php echo $_HS['name'] ?> 데스크탑에서 보낸 푸시알림'
var message = '푸시알림이 정상적으로 수신되었습니다.'
$.post(rooturl+'/?r='+raccount+'&m=notification&a=push_testonly',{
mbruid : '<?php echo $my['uid'] ?>',
title : title,
message : message
},function(response){
var result = $.parseJSON(response);
var error=result.error;
if (!error) {
btn.attr('disabled',false)
console.log('테스트 푸시알림이 수신 되었습니다.')
}
});
});
$('[data-toggle="popover"]').popover({
trigger: 'hover',
html : true
})
})
</script>

View File

@@ -0,0 +1,426 @@
<?php
$sqlque0 = 'mbruid='.$my['uid'];
$sqlque1 = 'mbruid='.$my['uid'].' and base=1 and backup=0';
$sqlque2 = 'mbruid='.$my['uid'].' and base=0';
$sqlque3 = 'mbruid='.$my['uid'].' and backup=0 and d_verified<>0';
$sqlque4 = 'mbruid='.$my['uid'].' and base=0 and d_verified<>0';
$PCD = getDbArray($table['s_mbrphone'],$sqlque1,'*','uid','asc',0,1);
$RCD = getDbArray($table['s_mbrphone'],$sqlque2,'*','uid','asc',0,1);
$VCD = getDbArray($table['s_mbrphone'],$sqlque3,'*','uid','asc',0,1);
$SCD = getDbArray($table['s_mbrphone'],$sqlque4,'*','uid','asc',0,1);
$NUM = getDbRows($table['s_mbrphone'],$sqlque0);
$NUM_VCD = getDbRows($table['s_mbrphone'],$sqlque3);
?>
<?php include_once $g['dir_module_skin'].'_header.php'?>
<div class="page-wrapper row">
<nav class="col-3 page-nav">
<?php include_once $g['dir_module_skin'].'_nav.php'?>
</nav>
<div class="col-9 page-main">
<div class="subhead mt-0">
<h2 class="subhead-heading">휴대폰 관리</h2>
</div>
<?php if (!getValid($my['last_log'],$d['member']['settings_expire'])): //로그인 후 경과시간 비교(분 ?>
<?php include_once $g['dir_module_skin'].'_lock.php'?>
<?php else: ?>
<?php if (!$NUM): ?>
<div class="card p-5 text-center text-muted">
<i class="fa fa-mobile fa-3x mb-2" aria-hidden="true"></i>
등록된 휴대폰이 없습니다.
</div>
<?php endif; ?>
<ul class="list-group">
<?php while($P=db_fetch_array($PCD)):?>
<?php $codeValid=getValid($P['d_code'],$d['member']['settings_keyexpire']); ?>
<li class="list-group-item" id="item-<?php echo $P['uid'] ?>">
<div class=" d-flex justify-content-between align-items-center">
<?php if ($P['d_verified']): ?>
<div>
<i class="fa fa-mobile fa-lg fa-fw text-muted" aria-hidden="true"></i>
<strong><?php echo substr($P['phone'],0,3) ?>-<?php echo substr($P['phone'],3,4) ?>-<?php echo substr($P['phone'],7,4) ?></strong>
<?php if ($P['base']): ?><span class="badge badge-primary">기본</span><?php endif; ?>
</div>
<?php else: ?>
<div>
<i class="fa fa-mobile fa-lg fa-fw text-muted" aria-hidden="true"></i>
<strong><?php echo substr($P['phone'],0,3) ?>-<?php echo substr($P['phone'],3,4) ?>-<?php echo substr($P['phone'],7,4) ?></strong>
<?php if ($P['base']): ?><span class="badge badge-primary">기본</span><?php endif; ?>
<span class="badge badge-secondary">미인증</span>
</div>
<div>
<button type="button" class="btn btn-sm btn-light" data-act="send_code" data-uid="<?php echo $P['uid'] ?>">
<span class="not-loading"><?php echo $codeValid?'재발송':'본인확인 인증번호 발송' ?></span>
<span class="is-loading">발송중..</span>
</button>
</div>
<?php endif; ?>
</div>
<div class="<?php echo $P['d_code'] && $codeValid?'':'d-none' ?>" data-role="verify_phone_area">
<div class=" d-flex justify-content-between align-items-center">
<div style="width: 35%">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">인증번호</span>
</div>
<input type="number" class="form-control" name="confirm_code_<?php echo $P['uid'] ?>" data-role="code">
<div class="invalid-tooltip"></div>
<div class="input-group-append">
<button class="btn btn-light" type="button" data-act="confirm_code" data-uid="<?php echo $P['uid'] ?>">
<span class="not-loading">확인</span>
<span class="is-loading">확인중..</span>
</button>
</div>
</div>
</div>
<div class="mt-2 text-right">
<small class="form-text text-success mb-2">
인증번호를 발송했습니다.(유효시간 <?php echo $d['member']['settings_keyexpire'] ?>분)
<span
data-role="countdown"
data-countdown="<?php echo $P['d_code']?date("Y/m/d H:i:s",strtotime ("+".$d['member']['settings_keyexpire']." minutes",strtotime($P['d_code']))):''; ?>">
</span>
<br>인증번호가 오지 않으면 입력하신 정보가 정확한지 확인하여 주세요.
</small>
</div>
</div><!-- /.d-flex -->
</div><!-- /#verify_phone_area -->
</li>
<?php endwhile?>
<?php while($R=db_fetch_array($RCD)):?>
<?php $codeValid=getValid($R['d_code'],$d['member']['settings_keyexpire']); ?>
<li class="list-group-item" id="item-<?php echo $R['uid'] ?>">
<div class=" d-flex justify-content-between align-items-center">
<?php if ($R['d_verified']): ?>
<div>
<i class="fa fa-mobile fa-lg fa-fw text-muted" aria-hidden="true"></i>
<?php echo substr($R['phone'],0,3) ?>-<?php echo substr($R['phone'],3,4) ?>-<?php echo substr($R['phone'],7,4) ?>
<?php if ($R['backup']): ?><span class="badge badge-warning">백업</span><?php endif; ?>
</div>
<div>
<?php if (!$R['base']): ?>
<button type="button" class="btn btn-link muted-link py-0" data-act="del" data-toggle="tooltip" title="삭제" data-uid="<?php echo $R['uid'] ?>">
<i class="fa fa-trash-o fa-lg" aria-hidden="true"></i>
</button>
<?php endif; ?>
</div>
<?php else: ?>
<div>
<span class="text-muted">
<?php echo substr($R['phone'],0,3) ?>-<?php echo substr($R['phone'],3,4) ?>-<?php echo substr($R['phone'],7,4) ?>
</span>
<span class="badge badge-secondary">미인증</span>
</div>
<div>
<button type="button" class="btn btn-sm btn-light" data-act="send_code" data-value="<?php echo $R['phone'] ?>" data-uid="<?php echo $R['uid'] ?>">
<span class="not-loading"><?php echo $codeValid?'재발송':'본인확인 인증번호 발송' ?></span>
<span class="is-loading">발송중..</span>
</button>
<button type="button" class="btn btn-link muted-link py-0" data-act="del" data-toggle="tooltip" title="삭제" data-uid="<?php echo $R['uid'] ?>">
<i class="fa fa-trash-o fa-lg" aria-hidden="true"></i>
</button>
</div>
<?php endif; ?>
</div><!-- /.d-flex -->
<div class="<?php echo $R['d_code'] && $codeValid?'':'d-none' ?>" data-role="verify_phone_area">
<div class=" d-flex justify-content-between align-items-center">
<div style="width: 35%">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">인증번호</span>
</div>
<input type="number" class="form-control" name="confirm_code_<?php echo $R['uid'] ?>" data-role="code">
<div class="invalid-tooltip"></div>
<div class="input-group-append">
<button class="btn btn-light" type="button" data-act="confirm_code" data-uid="<?php echo $R['uid'] ?>">
<span class="not-loading">확인</span>
<span class="is-loading">확인중..</span>
</button>
</div>
</div>
</div>
<div class="mt-2 text-right">
<small class="form-text text-success mb-2">
인증번호를 발송했습니다.(유효시간 <?php echo $d['member']['settings_keyexpire'] ?>분)
<span
data-role="countdown"
data-countdown="<?php echo $R['d_code']?date("Y/m/d H:i:s",strtotime ("+".$d['member']['settings_keyexpire']." minutes",strtotime($R['d_code']))):''; ?>">
</span>
<br>인증번호가 오지 않으면 입력하신 정보가 정확한지 확인하여 주세요.
</small>
</div>
</div><!-- /.d-flex -->
</div><!-- /#verify_phone_area -->
</li>
<?php endwhile?>
</ul>
<p class="mt-1 text-muted">
<small>본인인증된 휴대폰만 기본 휴대폰으로 지정할 수 있습니다.</small>
</p>
<form class="my-4" id="phonesForm" role="form" action="<?php echo $g['s']?>/" method="post" novalidate>
<fieldset<?php echo ($NUM==5)?' disabled':'' ?>>
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="settings_phone">
<input type="hidden" name="act" value="add">
<label class="font-weight-bold">휴대폰 추가</label>
<div class="form-inline">
<input type="tel" name="phone" class="form-control" style="width: 30%" required placeholder="<?php echo ($NUM==3)?'최대 3개까지 추가할 수 있습니다.':'' ?>">
<button type="submit" class="btn btn-light ml-2<?php echo ($NUM==5)?' d-none':'' ?>">
<span class="not-loading">추가</span>
<span class="is-loading">추가중..</span>
</button>
<div class="invalid-feedback mt-2">휴대폰을 입력해주세요.</div>
</div>
</fieldset>
</form>
<?php if ($NUM): ?>
<hr>
<div class="mt-4">
<label class="font-weight-bold">기본 휴대폰</label>
<p>기본 휴대폰은 계정과 관련된 주요알림을 수신합니다.</p>
<div class="form-inline" id="save-primary">
<select class="form-control custom-select">
<?php if ($NUM_VCD): ?>
<?php while($V=db_fetch_array($VCD)):?>
<option value="<?php echo $V['uid'] ?>"<?php echo $V['base']?' selected':'' ?>>
<?php echo substr($V['phone'],0,3) ?>-<?php echo substr($V['phone'],3,4) ?>-<?php echo substr($V['phone'],7,4) ?>
</option>
<?php endwhile?>
<?php else: ?>
<option value="">인증된 휴대폰이 없습니다.</option>
<?php endif; ?>
</select>
<?php if ($NUM_VCD): ?>
<button type="button" class="btn btn-light ml-2 js-submit" >
<span class="not-loading">저장</span>
<span class="is-loading">저장중..</span>
</button>
<?php endif; ?>
</div>
</div>
<hr>
<div class="mt-4">
<label class="font-weight-bold">백업 휴대폰</label>
<p>
백업 휴대폰은 기본 휴대폰을 사용할 수 없을때, 비밀번호 초기화를 위해 사용됩니다.
</p>
<div class="form-inline" id="save-backup">
<select class="form-control custom-select">
<option value="all"<?php echo ($my['phone_backup']==1)?' selected':'' ?>>인증된 메일전체</option>
<option value="none"<?php echo ($my['phone_backup']==0)?' selected':'' ?>>기본 휴대폰만 사용</option>
<?php while($S=db_fetch_array($SCD)):?>
<option value="<?php echo $S['uid'] ?>"<?php echo $S['backup']?' selected':'' ?>>
<?php echo substr($S['phone'],0,3) ?>-<?php echo substr($S['phone'],3,4) ?>-<?php echo substr($S['phone'],7,4) ?>
</option>
<?php endwhile?>
</select>
<button type="button" class="btn btn-light ml-2 js-submit">
<span class="not-loading">저장</span>
<span class="is-loading">저장중..</span>
</button>
</div>
</div>
<hr>
<h4 class="mt-4">환경 설정</h3>
<div class="mt-3" id="save-config">
<div class="custom-control custom-radio mt-2">
<input type="radio" id="sms_1" name="sms" value="1"<?php if($my['sms']):?> checked="checked"<?php endif?> class="custom-control-input">
<label class="custom-control-label" for="sms_1">이벤트와 공지 SMS를 수신 받겠습니다.</label>
</div>
<div class="custom-control custom-radio mt-2">
<input type="radio" id="sms_0" name="sms" value="0"<?php if(!$my['sms']):?> checked="checked"<?php endif?> class="custom-control-input">
<label class="custom-control-label" for="sms_0">계정과 관련된 SMS만 수신합니다.</label>
</div>
<button type="button" class="btn btn-light mt-4 js-submit">
<span class="not-loading">저장</span>
<span class="is-loading">저장중..</span>
</button>
</div>
<?php endif; ?>
<?php endif; ?>
</div><!-- /.page-main -->
</div><!-- /.row -->
<?php include_once $g['dir_module_skin'].'_footer.php'?>
<!-- https://github.com/hilios/jQuery.countdown -->
<?php getImport('jquery.countdown','jquery.countdown.min','2.2.0','js')?>
<script>
var form = $('#phonesForm')
var f = document.getElementById('phonesForm');
function doCountdown() {
$(document).find('[data-countdown]').each(function() {
var $this = $(this), finalDate = $(this).data('countdown');
$this.countdown(finalDate, function(event) {
$this.html('['+event.strftime('%M:%S')+']');
});
});
};
$(function () {
doCountdown(); //인증번호 유효시간 카운트다운
putCookieAlert('member_settings_result') // 실행결과 알림 메시지 출력
// 본인인증 코드발송
$('[data-act="send_code"').click(function() {
var uid = $(this).data('uid')
var act = 'send_code'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_phone&act='+act+'&uid='+uid
$(this).attr('disabled',true)
getIframeForAction();
frames.__iframe_for_action__.location.href = url;
$(this).text('재발송')
});
// 본인인증 코드 확인
$('[data-act="confirm_code"').click(function() {
var uid = $(this).data('uid')
var item = $('#item-'+uid)
var input = $('[name=confirm_code_'+uid+']')
var tooltip = item.find('.invalid-tooltip')
var code = input.val()
if (!code) {
tooltip.text('인증번호를 입력해주세요.')
input.focus().addClass('is-invalid')
return false;
}
var act = 'confirm_code'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_phone&act='+act+'&uid='+uid+'&code='+code
$(this).attr('disabled',true)
getIframeForAction();
frames.__iframe_for_action__.location.href = url;
});
// 상태표시 흔적 및 실행버튼 초기화
form.find('[name="phone"]').keyup(function(){
$(this).removeClass('is-invalid is-valid')
form.find('[type="submit"]').attr("disabled",false);
});
$('[data-role="code"]').keyup(function(){
$(this).removeClass('is-invalid is-valid')
});
// 휴대폰 삭제
$('[data-act="del"]').click(function() {
if (confirm('정말로 삭제하시겠습니까? ')){
var uid = $(this).data('uid')
var act = 'del'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_phone&act='+act+'&uid='+uid
$(this).attr('disabled',true)
getIframeForAction();
frames.__iframe_for_action__.location.href = url;
}
});
// 기본 휴대폰 저장
$('#save-primary').find('.js-submit').click(function() {
var form = $('#save-primary')
var uid = form.find('select').val()
var act = 'save_primary'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_phone&act='+act+'&uid='+uid
$(this).attr('disabled',true)
getIframeForAction();
setTimeout(function(){
frames.__iframe_for_action__.location.href = url;
}, 500);
});
// 백업 휴대폰 저장
$('#save-backup').find('.js-submit').click(function() {
var form = $('#save-backup')
var uid = form.find('select').val()
var act = 'save_backup'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_phone&act='+act+'&uid='+uid
$(this).attr('disabled',true)
getIframeForAction();
setTimeout(function(){
frames.__iframe_for_action__.location.href = url;
}, 500);
});
// 환경설정 저장
$('#save-config').find('.js-submit').click(function() {
var form = $('#save-config')
var sms = form.find(':radio[name="sms"]:checked').val();
var act = 'save_config'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_phone&act='+act+'&sms='+sms
$(this).attr('disabled',true)
getIframeForAction();
setTimeout(function(){
frames.__iframe_for_action__.location.href = url;
}, 300);
});
})
$('#phonesForm').submit(function() {
var form = $(this)
var layer = form.find('.invalid-feedback')
var input = form.find('[name="phone"]')
var btn = form.find('[type="submit"]')
var obj = f.phone
getIframeForAction(f);
// 상태초기화
input.removeClass('is-invalid is-valid')
btn.attr("disabled",false);
if (f.checkValidity() === false) {
input.focus()
input.addClass('is-invalid')
layer.text('휴대폰 번호를 입력해주세요.')
return false;
}
if (!chkPhoneNumber(obj.value)) {
input.focus()
input.addClass('is-invalid')
layer.text('휴대폰 번호 형식이 아닙니다.')
return false;
}
btn.attr("disabled",true);
});
</script>

View File

@@ -0,0 +1,198 @@
<div class="page-wrapper row">
<nav class="col-3 page-nav">
<?php include_once $g['dir_module_skin'].'_nav.php'?>
</nav>
<div class="col-9 page-main">
<div class="subhead mt-0">
<h2 class="subhead-heading">비밀번호 <?php echo $my['last_pw']?'변경':'등록' ?></h2>
</div>
<form class="card" name="procForm" id="procForm" role="form" action="<?php echo $g['s']?>/" method="post">
<div class="card-header">
<div class="media">
<i class="fa fa-key fa-3x mx-3" aria-hidden="true"></i>
<div class="media-body">
<?php if ($my['last_pw']): ?>
현재 비밀번호는 <mark><?php echo getDateFormat($my['last_pw'],'Y.m.d')?></mark> 에 변경(등록)되었으며 <mark><?php echo -getRemainDate($my['last_pw'])?>일</mark>이 경과되었습니다. <br>
비밀번호는 가급적 주기적으로 변경해 주세요.
<?php else: ?>
본 계정은 소셜로그인을 통해 가입된 계정으로 현재 비밀번호가 등록되어 있지 않습니다.<br>
비밀번호를 등록하면 비밀번호를 통한 로그인이 가능합니다.
<?php endif; ?>
</div>
</div>
</div>
<div class="card-body">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="c" value="<?php echo $c?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="front" value="<?php echo $front?>">
<input type="hidden" name="a" value="settings_main">
<input type="hidden" name="act" value="pw">
<input type="hidden" name="check_pw" value="">
<?php if ($my['last_pw']): ?>
<div class="form-group row">
<label class="col-sm-2 col-form-label">현재 패스워드</label>
<div class="col-sm-10">
<input type="password" class="form-control w-50" name="pw" value="" id="user_old_password" required autofocus>
<small class="form-text text-muted"></small>
</div>
</div>
<?php else: ?>
<div class="form-group row">
<label class="col-sm-2 col-form-label">아이디</label>
<div class="col-sm-10 mt-2">
<?php echo $my['id'] ?>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">이메일</label>
<div class="col-sm-10 mt-2">
<?php echo $my['email']?$my['email']:'미등록' ?>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">휴대폰</label>
<div class="col-sm-10 mt-2">
<?php echo $my['phone']?$my['phone']:'미등록' ?>
</div>
</div>
<?php endif; ?>
<div class="form-group row">
<label class="col-sm-2 col-form-label">신규 패스워드</label>
<div class="col-sm-10">
<input type="password" class="form-control w-50" name="pw1" value="" id="user_new_password" required onblur="pw1Check();">
<div class="invalid-feedback mt-2" id="pw1-feedback">비밀번호를 입력해주세요.</div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">패스워드 확인</label>
<div class="col-sm-10">
<input type="password" class="form-control w-50" name="pw2" value="" id="user_confirm_new_password" required onblur="pw2Check();">
<div class="invalid-feedback" id="pw2-feedback">다시한번 입력해 주세요.</div>
<small class="form-text text-muted mt-3">비밀번호를 한번 더 입력하세요. 비밀번호는 잊지 않도록 주의하시기 바랍니다.</small>
</div>
</div>
</div><!-- ./card-body -->
<div class="card-footer d-flex justify-content-between align-items-center">
<?php if ($my['last_pw']): ?>
<a href="<?php echo RW('mod=password_reset')?>">패스워드를 분실했어요.</a>
<button type="submit" class="btn btn-light">
<span class="not-loading">변경하기</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 변경중 ...</span>
</button>
<?php else: ?>
<span></span>
<button type="submit" class="btn btn-light">
<span class="not-loading">등록하기</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 등록중 ...</span>
</button>
<?php endif; ?>
</div>
</form><!-- /.card -->
</div><!-- /.page-main -->
</div><!-- /.page-wrapper -->
<script type="text/javascript">
var f = document.procForm;
var pw1 = getId('user_new_password');
var pw2 = getId('user_confirm_new_password');
function pw1Check() {
var layer = 'pw1-feedback';
if (!pw1.value) {
pw1.classList.remove('is-valid','is-invalid');
} else {
f.classList.remove('was-validated');
pw1.classList.add('is-invalid');
pw1.classList.remove('is-valid');
if (f.pw1.value.length < 8 || f.pw1.value.length > 16)
{
getId(layer).innerHTML = '비밀번호는 영문/숫자/특수문자중 2개 이상의 조합으로 최소 8~16자로 입력하셔야 합니다.';
f.pw1.focus();
return false;
}
if (getTypeCheck(f.pw1.value,"abcdefghijklmnopqrstuvwxyz"))
{
getId(layer).innerHTML = '비밀번호가 영문만으로 입력되었습니다.\n비밀번호는 영문/숫자/특수문자중 2개 이상의 조합으로 최소 8자이상 입력하셔야 합니다.';
f.pw1.focus();
return false;
}
if (getTypeCheck(f.pw1.value,"1234567890"))
{
getId(layer).innerHTML = '비밀번호가 숫자만으로 입력되었습니다.\n비밀번호는 영문/숫자/특수문자중 2개 이상의 조합으로 최소 8자이상 입력하셔야 합니다.';
f.pw1.focus();
return false;
}
pw1.classList.add('is-valid');
pw1.classList.remove('is-invalid');
getId(layer).innerHTML = '';
}
}
function pw2Check() {
var layer = 'pw2-feedback';
if (!f.pw1.value) {
f.pw2.value = '';
f.pw1.focus();
} else {
f.classList.remove('was-validated');
pw2.classList.add('is-invalid');
pw2.classList.remove('is-valid');
if (f.pw1.value != f.pw2.value)
{
getId(layer).innerHTML = '비밀번호가 일치하지 않습니다.';
f.classList.remove('was-validated');
f.pw2.focus();
f.check_pw.value = '0';
return false;
}
pw2.classList.add('is-valid');
pw2.classList.remove('is-invalid');
getId(layer).innerHTML = '';
f.check_pw.value = '1';
}
}
$(function () {
$('#procForm').submit( function(e){
e.preventDefault();
e.stopPropagation();
var form = $(this)
var formID = form.attr('id')
var f = document.getElementById(formID);
form.find('[name="form"]').val('#'+formID);
form.find('[type="submit"]').attr("disabled",true);
form.find('.form-control').removeClass('is-invalid') //에러이력 초기화
setTimeout(function(){
getIframeForAction(f);
f.submit();
}, 500);
}
);
})
</script>

View File

@@ -0,0 +1,77 @@
<?php
$phone_que = 'mbruid='.$my['uid'].' and device="phone"';
$tablet_que = 'mbruid='.$my['uid'].' and device="tablet"';
$desktop_que = 'mbruid='.$my['uid'].' and device="desktop"';
$PTK = getDbData($table['s_iidtoken'],$phone_que,'*');
$TTK = getDbData($table['s_iidtoken'],$tablet_que,'*');
$DTK = getDbData($table['s_iidtoken'],$desktop_que,'*');
?>
<?php include_once $g['dir_module_skin'].'_header.php'?>
<div class="page-wrapper row">
<nav class="col-3 page-nav">
<?php include_once $g['dir_module_skin'].'_nav.php'?>
</nav>
<div class="col-9 page-main">
<div class="subhead mt-0">
<h2 class="subhead-heading">웹앱 설치내역</h2>
</div>
<?php if (!getValid($my['last_log'],$d['member']['settings_expire'])): //로그인 후 경과시간 비교(분 ?>
<?php include_once $g['dir_module_skin'].'_lock.php'?>
<?php else: ?>
<p class="note">웹앱은 안드로이드 크롬 및 내장 브라우저의 기능인 '홈 화면에 추가' 를 통해 내 폰에 설치할 수 있습니다. 두번째 접속시에는 자동으로 '홈 화면에 추가' 대화상자가 자동으로 호출되어 쉬운 설치를 지원합니다.</p>
<div class="card mt-2">
<div class="card-header">
서비스 워커
</div>
<div class="card-body">
<button class="js-install-sw btn btn-outline-primary">서비스워커 설치</button>
<button class="js-uninstall-sw btn btn-outline-primary">서비스 워커 제거</button>
</div>
</div>
<?php endif; ?>
</div><!-- /.page-main -->
</div><!-- /.row -->
<?php include_once $g['dir_module_skin'].'_footer.php'?>
<script>
const installSW = document.querySelector('.js-install-sw');
const uninstallSW = document.querySelector('.js-uninstall-sw');
installSW.addEventListener('click', () => {
navigator.serviceWorker.register('<?php echo $g['s']?>/sw.js');
navigator.serviceWorker.register('<?php echo $g['s']?>/firebase-messaging-sw.js');
});
uninstallSW.addEventListener('click', () => {
navigator.serviceWorker.getRegistration('/')
.then((reg) => {
return reg.unregister();
})
});
putCookieAlert('member_settings_result') // 실행결과 알림 메시지 출력
$('[data-toggle="popover"]').popover({
trigger: 'hover',
html : true
})
</script>

View File

@@ -0,0 +1,418 @@
<?php
$sqlque0 = 'mbruid='.$my['uid'];
$sqlque1 = 'mbruid='.$my['uid'].' and base=1';
$sqlque2 = 'mbruid='.$my['uid'].' and base=0';
$PCD = getDbArray($table['s_mbrshipping'],$sqlque1,'*','uid','asc',0,1);
$RCD = getDbArray($table['s_mbrshipping'],$sqlque2,'*','uid','asc',0,1);
$NUM = getDbRows($table['s_mbrshipping'],$sqlque0);
?>
<?php include_once $g['dir_module_skin'].'_header.php'?>
<div class="page-wrapper row">
<nav class="col-3 page-nav">
<?php include_once $g['dir_module_skin'].'_nav.php'?>
</nav>
<div class="col-9 page-main">
<div class="subhead mt-0">
<h2 class="subhead-heading">배송지 관리</h2>
</div>
<?php if (!getValid($my['last_log'],$d['member']['settings_expire'])): //로그인 후 경과시간 비교(분 ?>
<?php include_once $g['dir_module_skin'].'_lock.php'?>
<?php else: ?>
<?php if ($NUM): ?>
<div class="d-flex justify-content-between align-items-end mb-2">
<div class="">
<span>총 <?php echo $NUM ?>건</span>
</div>
</div>
<table class="table text-center">
<thead class="thead-light">
<tr>
<th scope="col">배송지</th>
<th scope="col">주소</th>
<th scope="col">연락처</th>
<th scope="col"></th>
</tr>
</thead>
<tbody class="f13">
<?php while($P=db_fetch_array($PCD)):?>
<tr>
<th scope="row" class="align-middle">
<?php echo $P['label'] ?><br><small class="text-muted"><?php echo $P['name'] ?></small><br><span class="badge badge-primary">기본배송지</span></th>
<td class="text-left">
<span class="text-muted"><?php echo $P['zip'] ?></span><br>
<?php echo $P['addr1'] ?><br><?php echo $P['addr2'] ?>
</td>
<td class="align-middle">
<?php echo $P['tel1'] ?><br>
<?php echo $P['tel2'] ?>
</td>
<td class="align-middle">
<button type="button" class="btn btn-light btn-sm" data-toggle="modal" data-target="#modal-shipping" data-uid="<?php echo $P['uid'] ?>" data-act="edit">수정</button>
<button type="button" class="btn btn-light btn-sm" data-act="del" data-uid="<?php echo $P['uid'] ?>">삭제</button>
</td>
</tr>
<?php endwhile?>
<?php while($R=db_fetch_array($RCD)):?>
<tr>
<th scope="row" class="align-middle"><?php echo $R['label'] ?><br><small class="text-muted"><?php echo $R['name'] ?></small></th>
<td class="text-left">
<span class="text-muted"><?php echo $R['zip'] ?></span><br>
<?php echo $R['addr1'] ?><br><?php echo $R['addr2'] ?>
</td>
<td class="align-middle">
<?php echo $R['tel1'] ?><br>
<?php echo $R['tel2'] ?>
</td>
<td class="align-middle">
<button type="button" class="btn btn-light btn-sm" data-toggle="modal" data-target="#modal-shipping" data-uid="<?php echo $R['uid'] ?>" data-act="edit">수정</button>
<button type="button" class="btn btn-light btn-sm" data-act="del" data-uid="<?php echo $R['uid'] ?>">삭제</button>
</td>
</tr>
<?php endwhile?>
</tbody>
</table>
<div class="text-right">
<button type="button" class="btn btn-outline-primary" data-toggle="modal" data-target="#modal-shipping" data-act="add">
배송지 등록
</button>
</div>
<?php else: ?>
<div class="card p-5 my-4 text-center text-muted">
<i class="fa fa-truck fa-3x" aria-hidden="true"></i><br>
등록된 배송지가 없습니다. <br>
쇼핑에서 사용할 배송지를 관리하실 수 있습니다.<br>
자주 쓰는 배송지를 편리하게 통합 관리 하세요!<br>
<button type="button" class="btn btn-link" data-toggle="modal" data-target="#modal-shipping" data-act="add">
배송지 등록
</button>
</div>
<?php endif; ?>
<div class="modal fade" tabindex="-1" role="dialog" id="modal-shipping">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
<i class="fa fa-truck fa-fw fa-lg" aria-hidden="true"></i>
<span data-role="title">배송지 정보 상세</span>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form id="shippingForm" role="form" action="<?php echo $g['s']?>/" method="post" >
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="settings_shipping">
<input type="hidden" name="act" value="">
<input type="hidden" name="uid" value="">
<div class="form-group row">
<label class="col-sm-2 col-form-label text-nowrap">배송지명</label>
<div class="col-sm-10">
<input type="text" name="label" class="form-control w-50" placeholder="">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-nowrap">수령인 <span class="text-danger">*</span></label>
<div class="col-sm-10">
<input type="text" name="name" class="form-control w-50" placeholder="" required>
<div class="invalid-feedback">수령인을 입력해주세요.</div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-nowrap">주소 <span class="text-danger">*</span></label>
<div class="col-sm-10">
<div class="form-row mb-2">
<div class="col-3">
<input type="text" class="form-control" name="zip" value="" id="zip" maxlength="5" size="5" readonly required>
</div>
<div class="col-6">
<button type="button" class="btn btn-light" role="button" id="execDaumPostcode">우편번호찾기</button>
</div>
</div><!-- /.form-row -->
<div class="form-row">
<div class="form-group col-12">
<input type="text" class="form-control mb-2" name="addr1" id="addr1" value="" readonly>
<input type="text" class="form-control" name="addr2" id="addr2" value="" required>
<div class="invalid-feedback">
주소를 입력해주세요.
</div>
</div>
</div><!-- /.form-row -->
</div>
</div><!-- /.form-group -->
<div class="form-group row">
<label class="col-sm-2 col-form-label text-nowrap">연락처 <span class="text-danger">*</span></label>
<div class="col-sm-10">
<div class="form-inline">
<input type="text" name="tel1_1" value="" maxlength="4" size="4" class="form-control" required><span class="px-1">-</span>
<input type="text" name="tel1_2" value="" maxlength="4" size="4" class="form-control" required><span class="px-1">-</span>
<input type="text" name="tel1_3" value="" maxlength="4" size="4" class="form-control" required>
<div class="invalid-feedback">
전화번호를 입력해주세요.
</div>
</div><!-- /.form-inline -->
<div class="invalid-feedback"></div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-nowrap">연락처2</label>
<div class="col-sm-10">
<div class="form-inline">
<input type="text" name="tel2_1" value="" maxlength="4" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="tel2_2" value="" maxlength="4" size="4" class="form-control"><span class="px-1">-</span>
<input type="text" name="tel2_3" value="" maxlength="4" size="4" class="form-control">
<div class="invalid-feedback">
전화번호를 입력해주세요.
</div>
</div><!-- /.form-inline -->
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-nowrap">기본배송지</label>
<div class="col-sm-10">
<div class="custom-control custom-checkbox mt-2">
<input type="checkbox" class="custom-control-input" id="base" name="base" value="1">
<label class="custom-control-label" for="base">기본 배송지로 설정</label>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer d-flex justify-content-between">
<button type="button" class="btn btn-light" data-dismiss="modal">닫기</button>
<button type="button" class="btn btn-primary" data-role="submit">
<span class="not-loading">저장</span>
<span class="is-loading">저장중..</span>
</button>
</div>
</div>
</div>
</div>
<!-- Modal : 우편번호 찾기 -->
<div id="modal-DaumPostcode" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">우편번호 찾기</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body p-0" id="postLayer" style="height: 500px">
</div>
</div>
</div>
</div>
<?php endif; ?>
</div><!-- /.page-main -->
</div><!-- /.row -->
<?php include_once $g['dir_module_skin'].'_footer.php'?>
<?php if($_SERVER['HTTPS'] == 'on'):?>
<script src="https://ssl.daumcdn.net/dmaps/map_js_init/postcode.v2.js"></script>
<?php else:?>
<script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script>
<?php endif?>
<script>
var f = document.getElementById("shippingForm")
var form = $('#shippingForm')
var modal = $('#modal-shipping')
form.submit(function(event){
if (f.checkValidity() === false) {
modal.find('[data-role="submit"]').attr('disabled',false)
var name = modal.find('[name="name"]')
var addr1 = modal.find('[name="addr1"]')
var addr2 = modal.find('[name="addr2"]')
var tel1_1= modal.find('[name="tel1_1"]')
var tel1_2= modal.find('[name="tel1_2"]')
var tel1_3= modal.find('[name="tel1_3"]')
if (!name.val()) name.addClass('is-invalid').focus()
if (!addr1.val()) addr1.addClass('is-invalid')
if (!addr2.val()) addr2.addClass('is-invalid')
if (!tel1_1.val()) tel1_1.addClass('is-invalid')
if (!tel1_2.val()) tel1_2.addClass('is-invalid')
if (!tel1_3.val()) tel1_3.addClass('is-invalid')
event.preventDefault();
event.stopPropagation();
}
});
$(function () {
putCookieAlert('member_settings_result') // 실행결과 알림 메시지 출력
modal.on('show.bs.modal', function (e) {
var button = $(e.relatedTarget) // Button that triggered the modal
var uid = button.data('uid')
var act = button.data('act')
//항목 초기화
modal.find('[type="text"]').val('').removeClass('is-invalid')
modal.find('[name="base"]').attr('checked',false)
modal.find('fieldset').attr('disabled',false)
modal.find('[data-role="submit"]').attr('disabled',false)
//액션구분
modal.find('[name="act"]').val(act)
if (uid) {
$.post(rooturl+'/?r='+raccount+'&m=member&a=settings_shipping',{
act : 'get_data',
uid : uid
},function(response){
var result = $.parseJSON(response);
var title = '배송지 정보 상세'
var label = result.label
var name = result.name
var zip = result.zip
var addr1 = result.addr1
var addr2 = result.addr2
var tel1 = result.tel1
var tel2 = result.tel2
var base = result.base
modal.find('[name="label"]').val(label)
modal.find('[name="name"]').val(name)
modal.find('[name="zip"]').val(zip)
modal.find('[name="addr1"]').val(addr1)
modal.find('[name="addr2"]').val(addr2)
if (tel1) {
var tel1 = result.tel1.split('-')
modal.find('[name="tel1_1"]').val(tel1[0])
modal.find('[name="tel1_2"]').val(tel1[1])
modal.find('[name="tel1_3"]').val(tel1[2])
}
if (tel2) {
var tel2 = result.tel2.split('-')
modal.find('[name="tel2_1"]').val(tel2[0])
modal.find('[name="tel2_2"]').val(tel2[1])
modal.find('[name="tel2_3"]').val(tel2[2])
}
if (base==1) modal.find('[name="base"]').attr('checked',true)
});
} else {
var title = '배송지 등록'
}
modal.find('[data-role="title"]').text(title)
modal.find('[name="uid"]').val(uid)
})
modal.on('shown.bs.modal', function (e) {
var button = $(e.relatedTarget)
var uid = button.data('uid')
if (!uid) modal.find('[name="label"]').trigger('focus')
})
$('[data-act="del"]').click(function() {
if (confirm('정말로 삭제하시겠습니까? ')){
var uid = $(this).data('uid')
var act = 'del'
var url = rooturl+'/?r='+raccount+'&m=member&a=settings_shipping&act='+act+'&uid='+uid
getIframeForAction();
frames.__iframe_for_action__.location.href = url;
}
});
modal.find('[data-role="submit"]').click(function() {
$(this).attr('disabled',true)
getIframeForAction(f);
setTimeout(function(){
modal.find('#shippingForm').submit()
// modal.modal('hide')
}, 500);
});
// 폼유효성 상태표시 흔적 초기화
form.find('[type="text"]').keyup(function(){
$(this).removeClass('is-invalid is-valid')
});
$("#execDaumPostcode").click(function() {
// 우편번호 찾기 화면을 넣을 element
var element_wrap = document.getElementById('postLayer');
function execDaumPostcode() {
daum.postcode.load(function(){
new daum.Postcode({
oncomplete: function(data) {
// 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
// 각 주소의 노출 규칙에 따라 주소를 조합한다.
// 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
var fullAddr = data.address; // 최종 주소 변수
var extraAddr = ''; // 조합형 주소 변수
// 기본 주소가 도로명 타입일때 조합한다.
if(data.addressType === 'R'){
//법정동명이 있을 경우 추가한다.
if(data.bname !== ''){
extraAddr += data.bname;
}
// 건물명이 있을 경우 추가한다.
if(data.buildingName !== ''){
extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName);
}
// 조합형주소의 유무에 따라 양쪽에 괄호를 추가하여 최종 주소를 만든다.
fullAddr += (extraAddr !== '' ? ' ('+ extraAddr +')' : '');
}
// 우편번호와 주소 정보를 해당 필드에 넣는다.
document.getElementById('zip').value = data.zonecode; //5자리 새우편번호 사용
document.getElementById('addr1').value = fullAddr;
$('#modal-DaumPostcode').modal('hide')// 우편번호 검색모달을 숨김
$('#addr1').removeClass('is-invalid') //에러표시 초기화
$('#addr2').focus()
},
// 우편번호 찾기 화면 크기가 조정되었을때 실행할 코드를 작성하는 부분. iframe을 넣은 element의 높이값을 조정한다.
width : '100%',
height : '100%'
}).embed(element_wrap);
});
element_wrap.style.display = 'block';
$('#modal-DaumPostcode').modal('show')
}
execDaumPostcode()
})
})
</script>