first
This commit is contained in:
29
modules/post/admin/_info.php
Normal file
29
modules/post/admin/_info.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
$license_local = $g['path_module'].$module.'/LICENSE';
|
||||
$license_global = $g['path_root'].'LICENSE';
|
||||
|
||||
if (file_exists($license_local)) $license = $license_local;
|
||||
else $license = $license_global;
|
||||
?>
|
||||
|
||||
<link href="<?php echo $g['s']?>/_core/css/github-markdown.css" rel="stylesheet">
|
||||
<?php getImport('jquery-markdown','jquery.markdown','0.0.10','js')?>
|
||||
|
||||
<?php @include $g['path_module'].$module.'/var/var.moduleinfo.php' ?>
|
||||
|
||||
<article class="rb-docs markdown-body px-5 pt-3">
|
||||
<h1><?php echo sprintf('%s 모듈정보',ucfirst($MD['name']))?></h1>
|
||||
|
||||
<div class="pb-5 readme">
|
||||
<?php readfile($g['path_module'].$module.'/README.md')?>
|
||||
</div>
|
||||
|
||||
<div class="pb-5">
|
||||
<h2>라이센스</h2>
|
||||
<textarea class="form-control" rows="10"><?php readfile($license)?></textarea>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(".markdown-body .readme").markdown();
|
||||
</script>
|
||||
35
modules/post/admin/_uploader.php
Normal file
35
modules/post/admin/_uploader.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<div data-role="attach">
|
||||
|
||||
<!--
|
||||
module : 첨부파일 사용 모듈 ,
|
||||
theme : 첨부파일 테마 ,
|
||||
attach_handler_file : 파일첨부 실행 엘리먼트 ,
|
||||
attach_handler_photo : 사진첨부 실행 엘리먼트 ,
|
||||
parent_data : 수정시 필요한 해당 포스트 데이타 배열 변수,
|
||||
attach_handler_getModalList : 업로드 리스트 모달로 호출용 엘리먼트 (class 인 경우 . 까지 넘긴다.) -->
|
||||
|
||||
<?php
|
||||
// 설정값 세팅
|
||||
// $parent_table=$wdgvar['parent_table'];
|
||||
// $parent_uid=$wdgvar['parent_uid'];
|
||||
// $parent_field=$wdgvar['parent_field'];
|
||||
// $attach_mod=$wdgvar['attach_mod']; // main, list...
|
||||
// $attach_object_type=$wdgvar['attach_object_type'];//첨부 대상에 따른 분류 : photo, file, link, video....
|
||||
// $attach_tmpcode=$wdgvar['attach_tmpcode'];//첨부 대상에 따른 분류 : photo, file, link, video....
|
||||
// $attach_featuredImg_form_name=$wdgvar['featuredImg_form_name'];//첨부 대상에 따른 분류 : photo, file, link, video....
|
||||
// $attach_wdgvar_id=$wdgvar['widget_uid'];
|
||||
|
||||
$attachSkin = '_desktop/bs4-simple'; // 업로드 테마
|
||||
$parent_module=$module; // 첨부파일 사용하는 모듈
|
||||
$parent_data=$R; // 해당 포스트 데이타 (수정시 필요)
|
||||
$attach_module_theme=$attachSkin; // 첨부파일 테마
|
||||
$attach_handler_file='[data-role="attach-handler-file"]'; //파일첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
|
||||
$attach_handler_photo='[data-role="attach-handler-photo"]'; // 사진첨부 실행 엘리먼트 button or 기타 엘리먼트 data-role="" 형태로 하는 것을 권고
|
||||
$attach_handler_getModalList='.getModalList'; // 첨부파일 리스트 호출 handler
|
||||
$editor_type=$editor_type; // 에디터 타입 : html,markdown
|
||||
$attach_object_type= 'photo';//첨부 대상에 따른 분류 : photo, file, link, video....
|
||||
|
||||
include $g['path_module'].'mediaset/attach.php'; // 함수 인클루드
|
||||
?>
|
||||
|
||||
</div>
|
||||
114
modules/post/admin/category.css
Normal file
114
modules/post/admin/category.css
Normal file
@@ -0,0 +1,114 @@
|
||||
#accordion > .card .card-body {
|
||||
height: calc(100vh - 10rem);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.rb-tree .fa-mobile {
|
||||
font-size: 18px;
|
||||
color: #999
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
display: block;
|
||||
margin: 5px 0;
|
||||
padding: 10px;
|
||||
text-decoration: none;
|
||||
border: 1px solid #ccc;
|
||||
background: #eee;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
cursor: move;
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.dd-handle:hover {
|
||||
color: #2ea8e5;
|
||||
}
|
||||
|
||||
.dd-item > button {
|
||||
display: block;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
margin: 5px 0;
|
||||
padding: 0;
|
||||
text-indent: 100%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.dd-dragel .dd-handle {
|
||||
-webkit-box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, .1);
|
||||
box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, .1);
|
||||
}
|
||||
505
modules/post/admin/category.php
Normal file
505
modules/post/admin/category.php
Normal file
@@ -0,0 +1,505 @@
|
||||
<style>
|
||||
/*임시*/
|
||||
input[type=radio],
|
||||
input[type=checkbox] {
|
||||
margin-left: -1.25rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
|
||||
include_once $g['path_module'].$module.'/_main.php';
|
||||
$ISCAT = getDbRows($table[$module.'category'],'');
|
||||
|
||||
if($cat){
|
||||
$CINFO = getUidData($table[$module.'category'],$cat);
|
||||
$ctarr = getPostCategoryCodeToPath($table[$module.'category'],$cat,0);
|
||||
$ctnum = count($ctarr);
|
||||
for ($i = 0; $i < $ctnum; $i++) {
|
||||
$CXA[] = $ctarr[$i]['uid'];
|
||||
$CINFO['code'] .= $ctarr[$i]['id'].($i < $ctnum-1 ? '/' : '');
|
||||
$_code .= $ctarr[$i]['uid'].($i < $ctnum-1 ? '/' : '');
|
||||
}
|
||||
$code = $code ? $code : $_code;
|
||||
}
|
||||
$catcode = '';
|
||||
$is_fcategory = $CINFO['uid'] && $vtype != 'sub';
|
||||
$is_regismode = !$CINFO['uid'] || $vtype == 'sub';
|
||||
|
||||
if ($is_regismode){ $CINFO['name'] = '';
|
||||
$CINFO['hidden'] = '';
|
||||
$CINFO['imghead'] = '';
|
||||
$CINFO['imgfoot'] = '';
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="catebody" class="row">
|
||||
<div id="category" class="col-sm-4 col-md-4 col-lg-3 sidebar">
|
||||
|
||||
<div id="accordion">
|
||||
|
||||
<div class="card border-0">
|
||||
<div class="card-header p-0">
|
||||
<a class="d-block accordion-toggle muted-link<?php if($_SESSION['post_category_collapse']):?> collapsed<?php endif?>"
|
||||
data-toggle="collapse"
|
||||
onclick="sessionSetting('post_category_collapse','','','');"
|
||||
href="#categoryTree">
|
||||
<i class="fa fa-sitemap fa-lg fa-fw"></i>
|
||||
분류
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse<?php if(!$_SESSION['post_category_collapse']):?> show<?php endif?>" id="categoryTree" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<?php if($ISCAT):?>
|
||||
|
||||
<?php $_treeOptions=array('site'=>$s,'table'=>$table[$module.'category'],'dispNum'=>true,'dispHidden'=>false,'dispCheckbox'=>false,'allOpen'=>false,'bookmark'=>'site-cafe-info')?>
|
||||
<?php $_treeOptions['link'] = $g['adm_href'].'&cat='?>
|
||||
<?php echo getTreeMenu($_treeOptions,$code,0,0,'')?>
|
||||
|
||||
<?php else:?>
|
||||
<div class="none">등록된 카테고리가 없습니다.</div>
|
||||
<?php endif?>
|
||||
</div><!-- /.card-body -->
|
||||
</div>
|
||||
</div><!-- /.card -->
|
||||
|
||||
<?php if($CINFO['is_child']||(!$cat&&$ISCAT)):?>
|
||||
<div class="card">
|
||||
<div class="card-header p-0">
|
||||
<a class="d-block accordion-toggle muted-link<?php if($_SESSION['post_category_collapse']!='order'):?> collapsed<?php endif?>"
|
||||
data-toggle="collapse"
|
||||
onclick="sessionSetting('post_category_collapse','order','','');"
|
||||
href="#categoryOrder">
|
||||
<i class="fa fa-retweet fa-lg fa-fw"></i>
|
||||
순서 조정
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse<?php if($_SESSION['post_category_collapse']=='order'):?> show<?php endif?>" id="categoryOrder" data-parent="#accordion" >
|
||||
<form 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 $module?>">
|
||||
<input type="hidden" name="a" value="modifycategorygid">
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="dd" id="nestable-category">
|
||||
<ol class="dd-list">
|
||||
<?php $_MENUS=getDbSelect($table[$module.'category'],'site='.$s.' and parent='.intval($CINFO['uid']).' and depth='.($CINFO['depth']+1).' order by gid asc','*')?>
|
||||
<?php while($_M=db_fetch_array($_MENUS)):?>
|
||||
<li class="dd-item" data-id="<?php echo $_i?>">
|
||||
<input type="checkbox" name="categorymembers[]" value="<?php echo $_M['uid']?>" checked class="d-none">
|
||||
<div class="dd-handle"><i class="fa fa-arrows fa-fw"></i> <?php echo $_M['name']?></div>
|
||||
</li>
|
||||
<?php $_i++;endwhile?>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</div><!-- /.card-body -->
|
||||
|
||||
</form>
|
||||
|
||||
<!-- nestable : https://github.com/dbushell/Nestable -->
|
||||
<?php getImport('nestable','jquery.nestable',false,'js') ?>
|
||||
<script>
|
||||
$('#nestable-category').nestable();
|
||||
$('.dd').on('change', function() {
|
||||
var f = document.forms[0];
|
||||
getIframeForAction(f);
|
||||
f.submit();
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="catinfo" class="col-sm-8 col-md-8 ml-sm-auto col-xl-9">
|
||||
<form name="procForm" action="<?php echo $g['s']?>/" method="post" target="_action_frame_<?php echo $m?>" enctype="multipart/form-data" onsubmit="return saveCheck(this);" autocomplete="off">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>" />
|
||||
<input type="hidden" name="m" value="<?php echo $module?>" />
|
||||
<input type="hidden" name="a" value="regiscategory" />
|
||||
<input type="hidden" name="cat" value="<?php echo $CINFO['uid']?>" />
|
||||
<input type="hidden" name="code" value="<?php echo $code?>">
|
||||
<input type="hidden" name="vtype" value="<?php echo $vtype?>" />
|
||||
<input type="hidden" name="depth" value="<?php echo intval($CINFO['depth'])?>" />
|
||||
<input type="hidden" name="parent" value="<?php echo intval($CINFO['uid'])?>" />
|
||||
<div class="d-flex justify-content-between my-3">
|
||||
<h3 class="mb-0">
|
||||
<?php if($is_regismode):?>
|
||||
<?php if($vtype == 'sub'):?>하위 카테고리 만들기<?php else:?>최상위 카테고리 만들기<?php endif?>
|
||||
<?php else:?>
|
||||
카테고리 등록정보
|
||||
<?php endif?>
|
||||
</h3>
|
||||
<div>
|
||||
<a class="btn btn-light" href="<?php echo $g['adm_href']?>&type=makesite">최상위카테고리 등록</a>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<small class="text-muted">
|
||||
<?php if($is_regismode):?>
|
||||
복수의 카테고리을 한번에 등록하시려면 카테고리명을 콤마(,)로 구분해 주세요.<br />
|
||||
보기)정치경제,문화예술,비즈니스
|
||||
<?php else:?>
|
||||
속성을 변경하려면 설정값을 변경한 후 [속성변경] 버튼을 클릭해주세요.<br />
|
||||
카테고리을 삭제하면 소속된 하위카테고리까지 모두 삭제됩니다.
|
||||
<?php endif?>
|
||||
</small>
|
||||
</p>
|
||||
<?php if($vtype == 'sub'):?>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">상위 카테고리</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<ol class="breadcrumb">
|
||||
<?php for ($i = 0; $i < $ctnum; $i++): ?>
|
||||
<li class="breadcrumb-item"><?php echo $ctarr[$i]['name']?></li>
|
||||
<?php $catcode .= $ctarr[$i]['id'].'/'; endfor?>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php if($cat):?>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">상위 카테고리</label>
|
||||
<div class="col-md-10 col-lg-9 form-inline">
|
||||
<ol class="breadcrumb">
|
||||
<?php for ($i = 0; $i < $ctnum-1; $i++): ?>
|
||||
<li class="breadcrumb-item"><?php echo $ctarr[$i]['name']?></li>
|
||||
<?php
|
||||
$delparent=$ctarr[$i]['uid'];
|
||||
$catcode .= $ctarr[$i]['id'].'/';
|
||||
endfor
|
||||
?>
|
||||
<?php if(!$delparent):?>
|
||||
<li class="breadcrumb-item active" aria-current="page">최상위카테고리</li>
|
||||
<?php endif?>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<?php endif?>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">카테고리 명칭</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<div class="input-group input-group-lg">
|
||||
<input type="text" name="name" value="<?php echo $CINFO['name']?>" class="form-control sname<?php echo $is_fcategory?1:2?>"<?php if(!$code || $vtype):?> autofocus<?php endif?>>
|
||||
<?php if($is_fcategory):?>
|
||||
<span class="input-group-append">
|
||||
<?php if($CINFO['depth']<5):?>
|
||||
<a class="btn btn-light" href="<?php echo $g['adm_href']?>&cat=<?php echo $cat?>&code=<?php echo $code?>&vtype=sub" data-toggle="tooltip" title="하위 카테고리만들기">
|
||||
<i class="fa fa-share fa-rotate-90 fa-lg"></i>
|
||||
</a>
|
||||
<?php endif?>
|
||||
<a class="btn btn-light"
|
||||
href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $module?>&a=deletecategory&cat=<?php echo $cat?>&parent=<?php echo $delparent?>"
|
||||
target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 삭제하시겠습니까? ')" data-toggle="tooltip" title="카테고리삭제">
|
||||
<i class="fa fa-trash-o fa-lg"></i>
|
||||
</a>
|
||||
</span>
|
||||
<?php endif?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row rb-outside">
|
||||
<label class="col-lg-2 col-form-label text-lg-right">코드</label>
|
||||
<div class="col-lg-10 col-xl-9">
|
||||
<input class="form-control" placeholder="미등록시 자동생성 됩니다." type="text" name="id" value="<?php echo $CINFO['id']?>" maxlength="20">
|
||||
<button type="button" class="btn btn-link text-muted mt-2 pl-0" data-toggle="collapse" data-target="#guide_menucode">
|
||||
<i class="fa fa-question-circle fa-fw"></i>
|
||||
카테고리를 잘 표현할 수 있는 단어로 입력해 주세요.
|
||||
</button>
|
||||
|
||||
<div id="guide_menucode" class="collapse">
|
||||
<small>
|
||||
<ul class="form-text text-muted pl-3 mt-2">
|
||||
<li>영문대소문자/숫자/_/- 조합으로 등록할 수 있습니다.</li>
|
||||
<li>보기) 호출주소 : <code><?php echo RW('category=CODE')?></code></li>
|
||||
<li>코드는 중복될 수 없습니다.</li>
|
||||
</ul>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($CINFO['uid']&&!$vtype):?>
|
||||
<?php $_url = $g['s'].'/?r='.$r.'&m=post&cat='.$CINFO['id'].'&code='.$code?>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label text-lg-right">주소</label>
|
||||
<div class="col-lg-10 col-xl-9">
|
||||
|
||||
<div class="input-group" style="margin-bottom: 5px">
|
||||
<input id="_url_m_1_" type="text" class="form-control" value="<?php echo $_url?>" readonly>
|
||||
<span class="input-group-append">
|
||||
<a href="#." class="btn btn-light js-clipboard" data-tooltip="tooltip" title="클립보드에 복사" data-clipboard-target="#_url_m_1_"><i class="fa fa-clipboard"></i></a>
|
||||
<a href="<?php echo $_url?>" target="_blank" class="btn btn-light" data-tooltip="tooltip" title="접속">Go!</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">숨김처리</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<div class="form-check form-check-inline">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" type="checkbox" name="hidden" id="cat_hidden" value="1"<?php if($CINFO['hidden']):?> checked="checked"<?php endif?>> 카테고리숨김
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" type="checkbox" name="reject" id="cat_reject" value="1"<?php if($CINFO['reject']):?> checked="checked"<?php endif?>> 카테고리차단
|
||||
</label>
|
||||
</div>
|
||||
<small class="form-text text-muted">
|
||||
<strong>카테고리숨김 : </strong>메뉴를 출력하지 않습니다.(링크접근 가능)<br>
|
||||
<strong>카테고리차단 : </strong>메뉴의 접근을 차단합니다.(링크접근 불가)
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">포스트 출력</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<div class="input-group w-25">
|
||||
<input type="text" name="recnum" value="<?php echo $CINFO['recnum']?$CINFO['recnum']:20?>" size="3" class="form-control">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">개</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">레이아웃</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<select name="layout" class="form-control custom-select">
|
||||
<option value="">포스트 대표레이아웃</option>
|
||||
<?php $dirs = opendir($g['path_layout'])?>
|
||||
<?php while(false !== ($tpl = readdir($dirs))):?>
|
||||
<?php if($tpl=='.' || $tpl == '..' || $tpl == '_blank' || is_file($g['path_layout'].$tpl))continue?>
|
||||
<?php $dirs1 = opendir($g['path_layout'].$tpl)?>
|
||||
<?php while(false !== ($tpl1 = readdir($dirs1))):?>
|
||||
<?php if(!strstr($tpl1,'.php') || $tpl1=='_main.php')continue?>
|
||||
<option value="<?php echo $tpl?>/<?php echo $tpl1?>"<?php if($CINFO['layout']==$tpl.'/'.$tpl1):?> selected="selected"<?php endif?>>ㆍ<?php echo getFolderName($g['path_layout'].$tpl)?>(<?php echo str_replace('.php','',$tpl1)?>)</option>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs1)?>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center"><span class="badge badge-dark">모바일</span></label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<select name="layout_mobile" class="form-control custom-select">
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">카테고리 테마</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<select name="skin" class="form-control custom-select">
|
||||
<option value="">포스트 대표테마</option>
|
||||
<?php $tdir = $g['path_module'].$module.'/themes/_desktop/'?>
|
||||
<?php $dirs = opendir($tdir)?>
|
||||
<?php while(false !== ($skin = readdir($dirs))):?>
|
||||
<?php if($skin=='.' || $skin == '..' || is_file($tdir.$skin))continue?>
|
||||
<option value="_desktop/<?php echo $skin?>" title="<?php echo $skin?>"<?php if($CINFO['skin']=='_desktop/'.$skin):?> selected="selected"<?php endif?>>ㆍ<?php echo getFolderName($tdir.$skin)?>(<?php echo $skin?>)</option>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center"><span class="badge badge-dark">모바일</span></label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<select name="skin_mobile" class="form-control custom-select">
|
||||
<option value="">포스트 대표테마</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">소속메뉴</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<select name="sosokmenu" class="form-control custom-select">
|
||||
<option value="">사용안함</option>
|
||||
<?php include_once $g['path_core'].'function/menu1.func.php' ?>
|
||||
<?php $cat=$CINFO['sosokmenu']?>
|
||||
<?php getMenuShowSelect($s,$table['s_menu'],0,0,0,0,0,'')?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-center">대표이미지</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<div class="input-group">
|
||||
<input class="form-control rb-modal-photo-drop" onmousedown="_mediasetField='meta_image_src&dfiles='+this.value;" data-tooltip="tooltip" data-toggle="modal" data-target="#modal_window" type="text" name="featured_img" id="meta_image_src" value="<?php echo $CINFO['featured_img']?>">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-light rb-modal-photo1" type="button" title="포토셋" data-tooltip="tooltip" data-toggle="modal" data-target="#modal_window">
|
||||
<i class="fa fa-photo fa-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($CINFO['uid']):?>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">코드확장</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<div class="form-check form-check-inline">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" type="checkbox" <?php if($CINFO['imghead']||is_file($g['path_file'].$module.'/code/'.sprintf('%05d',$CINFO['uid']).'.header.php')):?> checked="checked"<?php endif?> disabled="disabled">
|
||||
카테고리 헤더
|
||||
<button class="btn btn-sm btn-light ml-2" type="button" data-toggle="collapse" data-target="#menu_header" aria-expanded="false" aria-controls="menu_header">
|
||||
<i class="fa fa-angle-down" aria-hidden="true"></i>
|
||||
</button>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" type="checkbox" <?php if($CINFO['imgfoot']||is_file($g['path_file'].$module.'/code/'.sprintf('%05d',$CINFO['uid']).'.footer.php')):?> checked="checked"<?php endif?> disabled="disabled">
|
||||
카테고리 풋터
|
||||
<button class="btn btn-sm btn-light ml-2" type="button" data-toggle="collapse" data-target="#menu_footer" aria-expanded="false" aria-controls="menu_footer">
|
||||
<i class="fa fa-angle-down" aria-hidden="true"></i>
|
||||
</button>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="menu_header" class="collapse multi-collapse">
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">헤더파일</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<input type="file" name="imghead" class="upfile" />
|
||||
<?php if($CINFO['imghead']):?>
|
||||
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $module?>&a=category_file_delete&cat=<?php echo $CINFO['uid']?>&dtype=head" target="_action_frame_<?php echo $m?>" class="u" onclick="return confirm('정말로 삭제하시겠습니까? ');">삭제</a>
|
||||
<?php else:?>
|
||||
<span>(gif/jpg/png/swf 가능)</span>
|
||||
<?php endif?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">헤더코드</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<textarea name="codhead" class="form-control" rows="4" id="codheadArea"><?php if(is_file($g['path_file'].$module.'/code/'.sprintf('%05d',$CINFO['uid']).'.header.php')) echo htmlspecialchars(implode('',file($g['path_file'].$module.'/code/'.sprintf('%05d',$CINFO['uid']).'.header.php')))?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="menu_footer" class="collapse multi-collapse">
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">풋터파일</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<input type="file" name="imgfoot" class="upfile" />
|
||||
<?php if($CINFO['imgfoot']):?>
|
||||
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=admin&module=filemanager&front=main&editmode=Y&pwd=./modules/<?php echo $module?>/var/files/&file=<?php echo $CINFO['imgfoot']?>" target="_blank" title="<?php echo $CINFO['imgfoot']?>" class="u">파일수정</a>
|
||||
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $module?>&a=category_file_delete&cat=<?php echo $CINFO['uid']?>&dtype=foot" target="_action_frame_<?php echo $m?>" class="u" onclick="return confirm('정말로 삭제하시겠습니까? ');">삭제</a>
|
||||
<?php else:?>
|
||||
<span>(gif/jpg/png/swf 가능)</span>
|
||||
<?php endif?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-md-2 col-form-label text-center">풋터코드</label>
|
||||
<div class="col-md-10 col-lg-9">
|
||||
<textarea name="codfoot" id="codfootArea" class="form-control" rows="4"><?php if(is_file($g['path_file'].$module.'/code/'.sprintf('%05d',$CINFO['uid']).'.footer.php')) echo htmlspecialchars(implode('',file($g['path_file'].$module.'/code/'.sprintf('%05d',$CINFO['uid']).'.footer.php')))?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<div class="form-group row my-4">
|
||||
<div class="col-2"></div>
|
||||
<div class="col-10">
|
||||
<?php if($is_fcategory && $CINFO['is_child']):?>
|
||||
<div class="custom-control custom-checkbox mb-4">
|
||||
<input type="checkbox" class="custom-control-input" name="subcopy" id="cubcopy" value="1" checked="checked">
|
||||
<label class="custom-control-label" for="cubcopy">이 설정(숨김처리,레이아웃)을 하위카테고리에도 일괄적용합니다.</label>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
<?php if($vtype=='sub'):?><input type="button" class="btn btn-light" value="등록취소" onclick="history.back();" /><?php endif?>
|
||||
<input type="submit" class="btn btn-primary" value="<?php echo $is_fcategory?'카테고리속성 변경':'신규카테고리 등록'?>" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var orderopen = false;
|
||||
|
||||
//사이트 셀렉터 출력
|
||||
$('[data-role="siteSelector"]').removeClass('d-none')
|
||||
|
||||
function orderOpen() {
|
||||
if (orderopen == false) {
|
||||
getId('menuorder').style.display = 'block';
|
||||
orderopen = true;
|
||||
} else {
|
||||
getId('menuorder').style.display = 'none';
|
||||
orderopen = false;
|
||||
}
|
||||
}
|
||||
|
||||
function displaySelect(obj) {
|
||||
var f = document.procForm;
|
||||
if (obj.value == '1') {
|
||||
getId('jointBox').style.display = 'block';
|
||||
getId('widgetBox').style.display = 'none';
|
||||
getId('codeBox').style.display = 'none';
|
||||
f.joint.focus();
|
||||
} else if (obj.value == '2') {
|
||||
getId('jointBox').style.display = 'none';
|
||||
getId('widgetBox').style.display = 'block';
|
||||
getId('codeBox').style.display = 'none';
|
||||
} else if (obj.value == '3') {
|
||||
getId('jointBox').style.display = 'none';
|
||||
getId('widgetBox').style.display = 'none';
|
||||
getId('codeBox').style.display = 'block';
|
||||
} else {
|
||||
getId('jointBox').style.display = 'none';
|
||||
getId('widgetBox').style.display = 'none';
|
||||
getId('codeBox').style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function codShowHide(layer, show, hide, img) {
|
||||
if (getId(layer).style.display != show) {
|
||||
getId(layer).style.display = show;
|
||||
img.src = img.src.replace('ico_under', 'ico_over');
|
||||
setCookie('ck_' + layer, show, 1);
|
||||
} else {
|
||||
getId(layer).style.display = hide;
|
||||
img.src = img.src.replace('ico_over', 'ico_under');
|
||||
setCookie('ck_' + layer, hide, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function saveCheck(f) {
|
||||
if (f.name.value == '') {
|
||||
alert('카테고리명칭을 입력해 주세요. ');
|
||||
f.name.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
putCookieAlert('result_post_category') // 실행결과 알림 메시지 출력
|
||||
|
||||
$('.rb-modal-photo1').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&m=mediaset&mdfile=modal.photo.media&dropfield=meta_image_src')?>');
|
||||
});
|
||||
$('.rb-modal-photo-drop').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&m=mediaset&mdfile=modal.photo.media&dropfield=')?>'+_mediasetField);
|
||||
});
|
||||
|
||||
</script>
|
||||
462
modules/post/admin/config.php
Normal file
462
modules/post/admin/config.php
Normal file
@@ -0,0 +1,462 @@
|
||||
<form class="row no-gutters" role="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 $module?>">
|
||||
<input type="hidden" name="a" value="config">
|
||||
|
||||
<div class="col-sm-3 col-md-3 col-xl-3 d-none d-sm-block sidebar">
|
||||
<div class="card border-0">
|
||||
<div class="card-header">
|
||||
메뉴
|
||||
</div>
|
||||
<div class="list-group list-group-flush" id="list-tab" role="tablist">
|
||||
<a class="list-group-item d-flex justify-content-between align-items-center list-group-item-action<?php if(!$_SESSION['post_config_nav'] || $_SESSION['post_config_nav']=='basic'):?> active<?php endif?>" data-toggle="list" href="#basic" role="tab" onclick="sessionSetting('post_config_nav','basic','','');" aria-selected="false">
|
||||
일반
|
||||
</a>
|
||||
<a class="list-group-item d-flex justify-content-between align-items-center list-group-item-action<?php if($_SESSION['post_config_nav']=='theme'):?> active<?php endif?>" data-toggle="list" href="#theme" role="tab" onclick="sessionSetting('post_config_nav','theme','','');" aria-selected="true">
|
||||
레이아웃/테마
|
||||
</a>
|
||||
<a class="list-group-item d-flex justify-content-between align-items-center list-group-item-action<?php if($_SESSION['post_config_nav']=='perm'):?> active<?php endif?>" data-toggle="list" href="#perm" role="tab" onclick="sessionSetting('post_config_nav','perm','','');" aria-selected="true">
|
||||
권한설정
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.sidebar -->
|
||||
|
||||
<div class="col-sm-9 col-md-9 ml-sm-auto col-xl-9">
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane <?php if(!$_SESSION['post_config_nav'] || $_SESSION['post_config_nav']=='basic'):?> show active<?php endif?>" id="basic">
|
||||
|
||||
<div class="card border-0 rounded-0 mb-0">
|
||||
<div class="card-header page-body-header">
|
||||
일반 설정
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-md-right">평가 제한</label>
|
||||
<div class="col-md-10 col-xl-9">
|
||||
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="denylikemy" name="denylikemy" value="1" <?php if($d['post']['denylikemy']):?> checked<?php endif?>>
|
||||
<label class="custom-control-label" for="denylikemy">내글에 대한 좋아요와 싫어요 참여를 제한합니다.</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-md-right">조회수 증가</label>
|
||||
<div class="col-md-10 col-xl-9">
|
||||
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" id="hitcount_1" name="hitcount" value="1" <?php if($d['post']['hitcount']):?> checked<?php endif?> class="custom-control-input">
|
||||
<label class="custom-control-label" for="hitcount_1">무조건 증가</label>
|
||||
</div>
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" id="hitcount_0" name="hitcount" value="0"<?php if(!$d['post']['hitcount']):?> checked<?php endif?> class="custom-control-input">
|
||||
<label class="custom-control-label" for="hitcount_0">1회만 증가</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-md-right">목록 출력수</label>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">페이지당</span>
|
||||
</div>
|
||||
<input type="text" name="recnum" value="<?php echo $d['post']['recnum']?$d['post']['recnum']:20?>" class="form-control text-center">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">개</span>
|
||||
</div>
|
||||
</div>
|
||||
<small class="form-text text-muted">한페이지에 출력할 포스트의 수</small>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">라인당</span>
|
||||
</div>
|
||||
<input type="text" name="rownum" value="<?php echo $d['post']['rownum']?$d['post']['rownum']:'4'?>" class="form-control text-center">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">개</span>
|
||||
</div>
|
||||
</div>
|
||||
<small class="form-text text-muted">한줄에 표시할 카드의 수, 카드형 레이아웃에 해당</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-md-right">새글 유지시간</label>
|
||||
<div class="col-md-4 col-xl-3">
|
||||
<div class="input-group">
|
||||
<input type="text" name="newtime" value="<?php echo $d['post']['newtime']?$d['post']['newtime']:24?>" class="form-control">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
<small class="form-text text-muted">새글로 인식되는 시간</small>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-md-right">불량글 처리</label>
|
||||
<div class="col-md-10 col-xl-9">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="singo_del"name="singo_del" value="1" <?php if($d['post']['singo_del']):?> checked<?php endif?> >
|
||||
<label class="custom-control-label" for="singo_del">신고건 수가</label>
|
||||
</div>
|
||||
<div class="input-group ml-3">
|
||||
<input type="text" name="singo_del_num" value="<?php echo $d['post']['singo_del_num']?>" class="form-control">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">건 이상인 경우</span>
|
||||
</div>
|
||||
</div>
|
||||
<select name="singo_del_act" class="form-control custom-select ml-2">
|
||||
<option value="1"<?php if($d['post']['singo_del_act']==1):?> selected="selected"<?php endif?>>자동삭제</option>
|
||||
<option value="2"<?php if($d['post']['singo_del_act']==2):?> selected="selected"<?php endif?>>비밀처리</option>
|
||||
</select>
|
||||
|
||||
</div> <!-- .form-inline -->
|
||||
</div> <!-- .col-sm-10 -->
|
||||
</div> <!-- .form-group -->
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-md-right">제한단어</label>
|
||||
<div class="col-md-10 col-xl-9">
|
||||
<textarea name="badword" rows="5" class="form-control"><?php echo $d['post']['badword']?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-md-right">제한단어 처리</label>
|
||||
<div class="col-sm-10">
|
||||
|
||||
<div class="custom-control custom-radio">
|
||||
<input type="radio" id="badword_action_0" class="custom-control-input" name="badword_action" value="0" <?php if($d['post']['badword_action']==0):?> checked<?php endif?>>
|
||||
<label class="custom-control-label" for="badword_action_0">제한단어 체크하지 않음</label>
|
||||
</div>
|
||||
<div class="custom-control custom-radio">
|
||||
<input type="radio" id="badword_action_1" class="custom-control-input" name="badword_action" value="1"<?php if($d['post']['badword_action']==1):?> checked<?php endif?>>
|
||||
<label class="custom-control-label" for="badword_action_1">등록을 차단함</label>
|
||||
</div>
|
||||
<div class="custom-control custom-radio">
|
||||
<input type="radio" id="badword_action_2" class="custom-control-input" name="badword_action" value="2"<?php if($d['post']['badword_action']==2):?> checked<?php endif?>>
|
||||
<label class="custom-control-label" for="badword_action_2">
|
||||
제한단어를 다음의 문자로 치환하여 등록함
|
||||
<input type="text" name="badword_escape" value="<?php echo $d['post']['badword_escape']?>" maxlength="1" class="d-inline form-control form-control-sm mt-2">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div><!-- .col-sm-10 -->
|
||||
</div>
|
||||
</div><!-- /.card-body -->
|
||||
</div><!-- /.card -->
|
||||
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane <?php if($_SESSION['post_config_nav']=='theme'):?> show active<?php endif?>" id="theme">
|
||||
|
||||
<div class="card border-0 rounded-0 mb-0">
|
||||
<div class="card-header page-body-header">
|
||||
<i class="fa fa-columns fa-fw" aria-hidden="true"></i> 레이아웃 설정
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label text-lg-right">레이아웃</label>
|
||||
<div class="col-lg-10 col-xl-9">
|
||||
|
||||
<select name="layout" class="form-control custom-select">
|
||||
<option value="">사이트 대표 레이아웃</option>
|
||||
<option disabled>--------------------</option>
|
||||
<?php $dirs = opendir($g['path_layout'])?>
|
||||
<?php while(false !== ($tpl = readdir($dirs))):?>
|
||||
<?php if($tpl=='.' || $tpl == '..' || $tpl == '_blank' || is_file($g['path_layout'].$tpl))continue?>
|
||||
<?php $dirs1 = opendir($g['path_layout'].$tpl)?>
|
||||
<optgroup label="<?php echo getFolderName($g['path_layout'].$tpl)?>">
|
||||
<?php while(false !== ($tpl1 = readdir($dirs1))):?>
|
||||
<?php if(!strstr($tpl1,'.php') || $tpl1=='_main.php')continue?>
|
||||
<option value="<?php echo $tpl?>/<?php echo $tpl1?>"<?php if($d['post']['layout']==$tpl.'/'.$tpl1):?> selected="selected"<?php endif?>><?php echo $tpl?> > <?php echo str_replace('.php','',$tpl1)?></option>
|
||||
<?php endwhile?>
|
||||
</optgroup>
|
||||
<?php closedir($dirs1)?>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label text-lg-right">
|
||||
<span class="badge badge-dark">모바일 접속</span>
|
||||
</label>
|
||||
<div class="col-lg-10 col-xl-9">
|
||||
|
||||
<select name="m_layout" class="form-control custom-select" id="" tabindex="-1">
|
||||
<?php if ($_HS['m_layout']): ?>
|
||||
<option value="0">사이트 레이아웃</option>
|
||||
<?php else: ?>
|
||||
<option value="0"> 사용안함 (기본 레이아웃 적용)</option>
|
||||
<?php endif; ?>
|
||||
<option disabled>--------------------</option>
|
||||
<?php $dirs = opendir($g['path_layout'])?>
|
||||
<?php while(false !== ($tpl = readdir($dirs))):?>
|
||||
<?php if($tpl=='.' || $tpl == '..' || $tpl == '_blank' || is_file($g['path_layout'].$tpl))continue?>
|
||||
<?php $dirs1 = opendir($g['path_layout'].$tpl)?>
|
||||
<optgroup label="<?php echo getFolderName($g['path_layout'].$tpl)?>">
|
||||
<?php while(false !== ($tpl1 = readdir($dirs1))):?>
|
||||
<?php if(!strstr($tpl1,'.php') || $tpl1=='_main.php')continue?>
|
||||
<option value="<?php echo $tpl?>/<?php echo $tpl1?>"<?php if($d['post']['m_layout']==$tpl.'/'.$tpl1):?> selected="selected"<?php endif?>><?php echo $tpl?> > <?php echo str_replace('.php','',$tpl1)?></option>
|
||||
<?php endwhile?>
|
||||
</optgroup>
|
||||
<?php closedir($dirs1)?>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.card-body -->
|
||||
</div><!-- /.card -->
|
||||
|
||||
|
||||
<div class="card border-left-0 rounded-0 mb-0">
|
||||
<div class="card-header page-body-header">
|
||||
<i class="fa fa-picture-o fa-fw" aria-hidden="true"></i> 테마 설정
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-md-right">
|
||||
대표 테마
|
||||
</label>
|
||||
<div class="col-md-10 col-xl-9">
|
||||
<select name="skin_main" class="form-control custom-select">
|
||||
<option value="">선택하세요</option>
|
||||
<option value="" disabled>--------------------------------</option>
|
||||
|
||||
<optgroup label="데스크탑">
|
||||
<?php $tdir = $g['path_module'].$module.'/themes/_desktop/'?>
|
||||
<?php $dirs = opendir($tdir)?>
|
||||
<?php while(false !== ($skin = readdir($dirs))):?>
|
||||
<?php if($skin=='.' || $skin == '..' || is_file($tdir.$skin))continue?>
|
||||
<option value="_desktop/<?php echo $skin?>" title="<?php echo $skin?>"<?php if($d['post']['skin_main']=='_desktop/'.$skin):?> selected="selected"<?php endif?>>ㆍ<?php echo getFolderName($tdir.$skin)?>(<?php echo $skin?>)</option>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</optgroup>
|
||||
<optgroup label="모바일">
|
||||
<?php $tdir = $g['path_module'].$module.'/themes/_mobile/'?>
|
||||
<?php $dirs = opendir($tdir)?>
|
||||
<?php while(false !== ($skin = readdir($dirs))):?>
|
||||
<?php if($skin=='.' || $skin == '..' || is_file($tdir.$skin))continue?>
|
||||
<option value="_mobile/<?php echo $skin?>" title="<?php echo $skin?>"<?php if($d['post']['skin_main']=='_mobile/'.$skin):?> selected="selected"<?php endif?>>ㆍ<?php echo getFolderName($tdir.$skin)?>(<?php echo $skin?>)</option>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</optgroup>
|
||||
|
||||
</select>
|
||||
<small class="form-text text-muted">
|
||||
지정된 대표테마는 포스트설정시 별도의 테마지정없이 자동으로 적용됩니다.
|
||||
가장 많이 사용하는 테마를 지정해 주세요.
|
||||
</small>
|
||||
</div> <!-- .col-sm-10 -->
|
||||
</div> <!-- .form-group -->
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-md-right">
|
||||
<span class="badge badge-dark">모바일 대표테마</span>
|
||||
</label>
|
||||
<div class="col-md-10 col-xl-9">
|
||||
<select name="skin_mobile" class="form-control custom-select">
|
||||
<option value="">모바일 테마 사용안함</option>
|
||||
<option value="" disabled>--------------------------------</option>
|
||||
<optgroup label="모바일">
|
||||
<?php $tdir = $g['path_module'].$module.'/themes/_mobile/'?>
|
||||
<?php $dirs = opendir($tdir)?>
|
||||
<?php while(false !== ($skin = readdir($dirs))):?>
|
||||
<?php if($skin=='.' || $skin == '..' || is_file($tdir.$skin))continue?>
|
||||
<option value="_mobile/<?php echo $skin?>" title="<?php echo $skin?>"<?php if($d['post']['skin_mobile']=='_mobile/'.$skin):?> selected="selected"<?php endif?>>ㆍ<?php echo getFolderName($tdir.$skin)?>(<?php echo $skin?>)</option>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</optgroup>
|
||||
<optgroup label="데스크탑">
|
||||
<?php $tdir = $g['path_module'].$module.'/themes/_desktop/'?>
|
||||
<?php $dirs = opendir($tdir)?>
|
||||
<?php while(false !== ($skin = readdir($dirs))):?>
|
||||
<?php if($skin=='.' || $skin == '..' || is_file($tdir.$skin))continue?>
|
||||
<option value="_desktop/<?php echo $skin?>" title="<?php echo $skin?>"<?php if($d['post']['skin_mobile']=='_desktop/'.$skin):?> selected="selected"<?php endif?>>ㆍ<?php echo getFolderName($tdir.$skin)?>(<?php echo $skin?>)</option>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</optgroup>
|
||||
</select>
|
||||
<small class="form-text text-muted">
|
||||
선택하지 않으면 데스크탑 대표테마로 설정됩니다.
|
||||
</small>
|
||||
</div> <!-- .col-sm-10 -->
|
||||
</div> <!-- .form-group -->
|
||||
|
||||
|
||||
</div><!-- /.card-body -->
|
||||
</div><!-- /.card -->
|
||||
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane <?php if($_SESSION['post_config_nav']=='perm'):?> show active<?php endif?>" id="perm">
|
||||
|
||||
<div class="card border-0 rounded-0 mb-0">
|
||||
<div class="card-header page-body-header">
|
||||
포스트 작성
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<fieldset>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label text-lg-right">허용등급</label>
|
||||
<div class="col-lg-10 col-xl-9">
|
||||
<select name="perm_l_write" class="form-control custom-select">
|
||||
<option value="0"> + 전체허용</option>
|
||||
<option value="0">--------------------------------</option>
|
||||
<?php $_LEVEL=getDbArray($table['s_mbrlevel'],'','*','uid','asc',0,1)?>
|
||||
<?php while($_L=db_fetch_array($_LEVEL)):?>
|
||||
<option value="<?php echo $_L['uid']?>"<?php if($_L['uid']==$d['post']['perm_l_write']):?> selected="selected"<?php endif?>>ㆍ<?php echo $_L['name']?>(<?php echo number_format($_L['num'])?>) 이상</option>
|
||||
<?php if($_L['gid'])break; endwhile?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label text-lg-right">차단그룹</label>
|
||||
<div class="col-lg-10 col-xl-9">
|
||||
<select name="perm_g_write" class="form-control custom-select" multiple size="5">
|
||||
<option value=""<?php if(!$d['post']['perm_g_write']):?> selected="selected"<?php endif?>>ㆍ차단안함</option>
|
||||
<?php $_SOSOK=getDbArray($table['s_mbrgroup'],'','*','gid','asc',0,1)?>
|
||||
<?php while($_S=db_fetch_array($_SOSOK)):?>
|
||||
<option value="<?php echo $_S['uid']?>"<?php if(strstr($d['post']['perm_g_write'],'['.$_S['uid'].']')):?> selected="selected"<?php endif?>>ㆍ<?php echo $_S['name']?>(<?php echo number_format($_S['num'])?>)</option>
|
||||
<?php endwhile?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</div><!-- /.card-body -->
|
||||
</div><!-- /.card -->
|
||||
|
||||
|
||||
<div class="card border-left-0 rounded-0 mb-0">
|
||||
<div class="card-header page-body-header">
|
||||
카테고리 지정
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<fieldset>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label text-lg-right">허용등급</label>
|
||||
<div class="col-lg-10 col-xl-9">
|
||||
<select name="perm_l_category" class="form-control custom-select">
|
||||
<option value="0"> + 전체허용</option>
|
||||
<option value="0">--------------------------------</option>
|
||||
<?php $_LEVEL=getDbArray($table['s_mbrlevel'],'','*','uid','asc',0,1)?>
|
||||
<?php while($_L=db_fetch_array($_LEVEL)):?>
|
||||
<option value="<?php echo $_L['uid']?>"<?php if($_L['uid']==$d['post']['perm_l_category']):?> selected="selected"<?php endif?>>ㆍ<?php echo $_L['name']?>(<?php echo number_format($_L['num'])?>) 이상</option>
|
||||
<?php if($_L['gid'])break; endwhile?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label text-lg-right">차단그룹</label>
|
||||
<div class="col-lg-10 col-xl-9">
|
||||
<select name="perm_g_category" class="form-control custom-select" multiple size="5">
|
||||
<option value=""<?php if(!$d['post']['perm_g_category']):?> selected="selected"<?php endif?>>ㆍ차단안함</option>
|
||||
<?php $_SOSOK=getDbArray($table['s_mbrgroup'],'','*','gid','asc',0,1)?>
|
||||
<?php while($_S=db_fetch_array($_SOSOK)):?>
|
||||
<option value="<?php echo $_S['uid']?>"<?php if(strstr($d['post']['perm_g_category'],'['.$_S['uid'].']')):?> selected="selected"<?php endif?>>ㆍ<?php echo $_S['name']?>(<?php echo number_format($_S['num'])?>)</option>
|
||||
<?php endwhile?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</div><!-- /.card-body -->
|
||||
</div><!-- /.card -->
|
||||
|
||||
<div class="card rounded-0 mb-0 d-none">
|
||||
<div class="card-header">
|
||||
상품연결
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<fieldset>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label text-lg-right">허용등급</label>
|
||||
<div class="col-lg-10 col-xl-9">
|
||||
<select name="perm_l_goods" class="form-control custom-select">
|
||||
<option value="0"> + 전체허용</option>
|
||||
<option value="0">--------------------------------</option>
|
||||
<?php $_LEVEL=getDbArray($table['s_mbrlevel'],'','*','uid','asc',0,1)?>
|
||||
<?php while($_L=db_fetch_array($_LEVEL)):?>
|
||||
<option value="<?php echo $_L['uid']?>"<?php if($_L['uid']==$d['post']['perm_l_goods']):?> selected="selected"<?php endif?>>ㆍ<?php echo $_L['name']?>(<?php echo number_format($_L['num'])?>) 이상</option>
|
||||
<?php if($_L['gid'])break; endwhile?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label text-lg-right">차단그룹</label>
|
||||
<div class="col-lg-10 col-xl-9">
|
||||
<select name="perm_g_goods" class="form-control custom-select" multiple size="5">
|
||||
<option value=""<?php if(!$d['post']['perm_g_goods']):?> selected="selected"<?php endif?>>ㆍ차단안함</option>
|
||||
<?php $_SOSOK=getDbArray($table['s_mbrgroup'],'','*','gid','asc',0,1)?>
|
||||
<?php while($_S=db_fetch_array($_SOSOK)):?>
|
||||
<option value="<?php echo $_S['uid']?>"<?php if(strstr($d['post']['perm_g_goods'],'['.$_S['uid'].']')):?> selected="selected"<?php endif?>>ㆍ<?php echo $_S['name']?>(<?php echo number_format($_S['num'])?>)</option>
|
||||
<?php endwhile?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</div><!-- /.card-body -->
|
||||
</div><!-- /.card -->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="offset-md-2 col-md-10 col-xl-9">
|
||||
<button type="submit" class="btn btn-outline-primary btn-block my-4">저장하기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.tab-content -->
|
||||
|
||||
</div><!-- /.col -->
|
||||
|
||||
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
|
||||
//사이트 셀렉터 출력
|
||||
$('[data-role="siteSelector"]').removeClass('d-none')
|
||||
|
||||
putCookieAlert('post_config_result') // 실행결과 알림 메시지 출력
|
||||
|
||||
function saveCheck(f)
|
||||
{
|
||||
if (f.skin_main.value == '')
|
||||
{
|
||||
alert('대표테마를 선택해 주세요. ');
|
||||
f.skin_main.focus();
|
||||
return false;
|
||||
}
|
||||
// if (f.skin_mobile.value == '')
|
||||
// {
|
||||
// alert('모바일테마를 선택해 주세요. ');
|
||||
// f.skin_mobile.focus();
|
||||
// return false;
|
||||
// }
|
||||
getIframeForAction(f);
|
||||
f.submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
368
modules/post/admin/list.php
Normal file
368
modules/post/admin/list.php
Normal file
@@ -0,0 +1,368 @@
|
||||
<?php
|
||||
include $g['path_module'].$module.'/var/var.php';
|
||||
$bbs_time=$d['bbs']['time']; // 아래 $d 배열과 충돌을 피하기 위해서 별도로 지정
|
||||
$sort = $sort ? $sort : 'gid';
|
||||
$orderby= $orderby ? $orderby : 'desc';
|
||||
$recnum = $recnum && $recnum < 301 ? $recnum : 30;
|
||||
$listque = 'uid';
|
||||
$account = $SD['uid'];
|
||||
if ($account) $listque .= ' and site='.$account;
|
||||
|
||||
if ($where && $keyw)
|
||||
{
|
||||
if (strstr('[id]',$where)) $listque .= " and ".$where."='".$keyw."'";
|
||||
else $listque .= getSearchSql($where,$keyw,$ikeyword,'or');
|
||||
}
|
||||
|
||||
$RCD = getDbArray($table[$module.'list'],$listque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table[$module.'list'],$listque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
$SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1);
|
||||
$SITEN = db_num_rows($SITES);
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-4 col-md-4 col-xl-3 d-none sidebar">
|
||||
|
||||
<div id="accordion" role="tablist" style="height: calc(100vh - 10rem);">
|
||||
<form name="procForm" 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="module" value="<?php echo $module?>">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
|
||||
<div class="card border-0">
|
||||
<div class="card-header p-0">
|
||||
<a class="d-block muted-link collapsed" href="#collapse-sort" data-toggle="collapse" role="button" aria-expanded="true" aria-controls="collapse-sort">
|
||||
정렬
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapse-sort" class="collapse" role="tabpanel" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="btn-group btn-group-toggle btn-group-sm mb-2" data-toggle="buttons">
|
||||
<label class="btn btn-light<?php if($sort=='gid'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="gid" name="sort"<?php if($sort=='gid'):?> checked<?php endif?>> 지정순서
|
||||
</label>
|
||||
<label class="btn btn-light<?php if($sort=='uid'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="uid" name="sort"<?php if($sort=='uid'):?> checked<?php endif?>> 개설일
|
||||
</label>
|
||||
<label class="btn btn-light<?php if($sort=='num_r'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="num_r" name="sort"<?php if($sort=='num_r'):?> checked<?php endif?>> 게시물수
|
||||
</label>
|
||||
<label class="btn btn-light<?php if($sort=='d_last'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="d_last" name="sort"<?php if($sort=='d_last'):?> checked<?php endif?>> 최근게시
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="btn-group btn-group-toggle btn-group-sm mb-3" data-toggle="buttons">
|
||||
<label class="btn btn-light<?php if($orderby=='desc'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="desc" name="orderby"<?php if($orderby=='desc'):?> checked<?php endif?>> <i class="fa fa-sort-amount-desc"></i> 정순
|
||||
</label>
|
||||
<label class="btn btn-light<?php if($orderby=='asc'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="asc" name="orderby"<?php if($orderby=='asc'):?> checked<?php endif?>> <i class="fa fa-sort-amount-asc"></i> 역순
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">출력수</span>
|
||||
</div>
|
||||
<select name="recnum" onchange="this.form.submit();" class="form-control custom-select">
|
||||
<option value="20"<?php if($recnum==20):?> selected="selected"<?php endif?>>20 개</option>
|
||||
<option value="35"<?php if($recnum==35):?> selected="selected"<?php endif?>>35 개</option>
|
||||
<option value="50"<?php if($recnum==50):?> selected="selected"<?php endif?>>50 개</option>
|
||||
<option value="75"<?php if($recnum==75):?> selected="selected"<?php endif?>>75 개</option>
|
||||
<option value="90"<?php if($recnum==90):?> selected="selected"<?php endif?>>90 개</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .card -->
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header p-0">
|
||||
<a class="collapsed d-block muted-link" href="#collapse-search" data-toggle="collapse" href="#collapse-search" role="button" aria-expanded="false" aria-controls="collapse-search">
|
||||
리스트 검색
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse<?php if($_SESSION['sh_mediaset']):?> show<?php endif?>" id="collapse-search">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<select name="where" class="form-control custom-select" style="width: 30px">
|
||||
<option value="name"<?php if($where=='name'):?> selected="selected"<?php endif?>>리스트명</option>
|
||||
<option value="id"<?php if($where=='id'):?> selected="selected"<?php endif?>>아이디</option>
|
||||
</select>
|
||||
|
||||
<input type="text" name="keyw" value="<?php echo stripslashes($keyw)?>" class="form-control">
|
||||
|
||||
</div>
|
||||
<button class="btn btn-outline-secondary" type="submit">검색</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 고급검색 시작 -->
|
||||
<div id="search-more" class="collapse<?php if($_SESSION['sh_mediaset']):?> in<?php endif?>">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-1 control-label">검색</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-btn hidden-xs" style="width:165px">
|
||||
<select name="where" class="form-control btn btn-light">
|
||||
<option value="name"<?php if($where=='name'):?> selected="selected"<?php endif?>>리스트명</option>
|
||||
<option value="id"<?php if($where=='id'):?> selected="selected"<?php endif?>>아이디</option>
|
||||
</select>
|
||||
</span>
|
||||
<input type="text" name="keyw" value="<?php echo stripslashes($keyw)?>" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="submit">검색</button>
|
||||
</span>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-light" type="button" onclick="location.href='<?php echo $g['adm_href']?>';">리셋</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .form-group -->
|
||||
</div>
|
||||
<!-- 고급검색 끝 -->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-1 col-sm-10">
|
||||
<button type="button" class="btn btn-link rb-advance<?php if(!$_SESSION['sh_mediaset']):?> collapsed<?php endif?>" data-toggle="collapse" data-target="#search-more" onclick="sessionSetting('sh_mediaset','1','','1');">고급검색 <small></small></button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- .rb-heading well well-sm : 검색영역 회색 박스 -->
|
||||
|
||||
<?php if($NUM):?>
|
||||
<div class="p-2">
|
||||
<a href="<?php echo $g['adm_href']?>" class="btn btn-light btn-block">검색조건 초기화</a>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
</div><!-- /.sidebar -->
|
||||
<div class="col-sm-12 col-md-12 col-xl-12">
|
||||
|
||||
<div class="card p-2 mb-0 bg-dark d-flex justify-content-between pr-4">
|
||||
|
||||
<form class="form-inline" name="procForm" 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="module" value="<?php echo $module?>">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
|
||||
<select class="form-control custom-select" name="sort" onchange="this.form.submit();">
|
||||
<option value="gid" selected="selected">지정순서</option>
|
||||
<option value="uid">개설일</option>
|
||||
<option value="num_r">게시물수</option>
|
||||
<option value="d_last">최근게시</option>
|
||||
</select>
|
||||
|
||||
<select class="form-control custom-select" name="orderby" onchange="this.form.submit();">
|
||||
<option value="desc">역순</option>
|
||||
<option value="asc" selected="selected">정순</option>
|
||||
</select>
|
||||
|
||||
<select class="form-control custom-select mr-sm-2" name="recnum" onchange="this.form.submit();">
|
||||
<option value="30" selected="selected">30개</option>
|
||||
<option value="60">60개</option>
|
||||
<option value="90">90개</option>
|
||||
<option value="120">120개</option>
|
||||
<option value="150">150개</option>
|
||||
<option value="180">180개</option>
|
||||
<option value="210">210개</option>
|
||||
<option value="240">240개</option>
|
||||
<option value="270">270개</option>
|
||||
<option value="300">300개</option>
|
||||
</select>
|
||||
|
||||
<select class="form-control custom-select mr-sm-1" name="where">
|
||||
<option value="name">리스트명</option>
|
||||
<option value="id">아이디</option>
|
||||
</select>
|
||||
|
||||
<label class="sr-only" for="inlineFormInputName2">검색</label>
|
||||
<input type="text" class="form-control mr-sm-2" placeholder="" name="keyw" value="<?php echo stripslashes($keyw)?>" >
|
||||
|
||||
<button type="submit" class="btn btn-light">검색</button>
|
||||
<button type="button" class="btn btn-light" onclick="location.href='<?php echo $g['adm_href']?>';">리셋</button>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php if($NUM):?>
|
||||
|
||||
|
||||
<!-- 리스트 시작 -->
|
||||
<form class="card rounded-0 border-0" name="listForm" action="<?php echo $g['s']?>/" method="post">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $module?>">
|
||||
<input type="hidden" name="a" value="">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped text-center mb-0">
|
||||
<thead class="small text-muted">
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>아이디</th>
|
||||
<th>리스트명</th>
|
||||
<th>게시물</th>
|
||||
<th>업데이트</th>
|
||||
<th>상태</th>
|
||||
<th>등록자</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<?php $L=getOverTime($date['totime'],$R['d_last'])?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
|
||||
<td><a href="<?php echo getListLink($R,0) ?>" target="_blank"><?php echo $R['id']?></a></td>
|
||||
<td><span><?php echo $R['name']?></span></td>
|
||||
<td>
|
||||
<span class="badge badge-pill badge-dark"><?php echo number_format($R['num'])?></span>
|
||||
</td>
|
||||
<td>
|
||||
<time class="small text-muted" data-plugin="timeago" datetime="<?php echo getDateFormat($R['d_last'],'c')?>">
|
||||
<?php echo getDateFormat($R['d_last'],'Y.m.d')?>
|
||||
</time>
|
||||
<?php if(getNew($R['d_last'],24)):?> <small class="text-danger">N</small><?php endif?>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $g['displaySet']['label'][$R['display']]?></span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="badge badge-pill badge-dark"><?php echo getProfileInfo($R['mbruid'],$_HS['nametype'])?></span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a class="btn btn-light" href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $module?>&a=deletelist&uid=<?php echo $R['uid']?>&usertype=admin" onclick="return hrefCheck(this,true,'정말로 삭제하시겠습니까?');" class="del">삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
<div class="card-footer d-flex justify-content-between">
|
||||
<div>
|
||||
<button type="button" onclick="chkFlag('bbs_members[]');checkboxCheck();" class="btn btn-sm btn-light">선택/해제</button>
|
||||
<button type="button" onclick="actCheck('multi_config');" class="btn btn-sm btn-light" id="rb-action-btn">수정</button>
|
||||
</div>
|
||||
<ul class="pagination">
|
||||
<script>getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
<?php //echo getPageLink(5,$p,$TPG,'')?>
|
||||
</ul>
|
||||
</div><!-- .card-footer -->
|
||||
</form><!-- .card -->
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<div class="text-center text-muted d-flex align-items-center justify-content-center" style="height: calc(100vh - 10rem);">
|
||||
<div><i class="fa fa-exclamation-circle fa-3x mb-3" aria-hidden="true"></i>
|
||||
<p>등록된 리스트가 없습니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif?>
|
||||
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
|
||||
|
||||
<!-- timeago -->
|
||||
<?php getImport('jquery-timeago','jquery.timeago','1.6.1','js')?>
|
||||
<?php getImport('jquery-timeago','locales/jquery.timeago.ko','1.6.1','js')?>
|
||||
|
||||
<!-- basic -->
|
||||
<script>
|
||||
|
||||
$(function () {
|
||||
|
||||
//사이트 셀렉터 출력
|
||||
$('[data-role="siteSelector"]').removeClass('d-none')
|
||||
|
||||
$('[data-plugin="timeago"]').timeago();
|
||||
|
||||
$('[data-toggle="popover"]').popover({
|
||||
html: true,
|
||||
trigger: 'hover'
|
||||
})
|
||||
|
||||
putCookieAlert('list_action_result') // 실행결과 알림 메시지 출력
|
||||
|
||||
})
|
||||
|
||||
$(".checkAll-file-user").click(function(){
|
||||
$(".rb-file-user").prop("checked",$(".checkAll-file-user").prop("checked"));
|
||||
checkboxCheck();
|
||||
});
|
||||
function checkboxCheck()
|
||||
{
|
||||
var f = document.listForm;
|
||||
var l = document.getElementsByName('bbs_members[]');
|
||||
var n = l.length;
|
||||
var i;
|
||||
var j=0;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if (l[i].checked == true) j++;
|
||||
}
|
||||
if (j) getId('rb-action-btn').disabled = false;
|
||||
else getId('rb-action-btn').disabled = true;
|
||||
}
|
||||
|
||||
function dropDate(date1,date2)
|
||||
{
|
||||
var f = document.procForm;
|
||||
f.d_start.value = date1;
|
||||
f.d_finish.value = date2;
|
||||
f.submit();
|
||||
}
|
||||
function actCheck(act)
|
||||
{
|
||||
var f = document.listForm;
|
||||
var l = document.getElementsByName('bbs_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 == 'multi_config')
|
||||
{
|
||||
if (confirm('정말로 실행하시겠습니까? '))
|
||||
{
|
||||
getIframeForAction(f);
|
||||
f.a.value = act;
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
0
modules/post/admin/main.css
Normal file
0
modules/post/admin/main.css
Normal file
374
modules/post/admin/main.php
Normal file
374
modules/post/admin/main.php
Normal file
@@ -0,0 +1,374 @@
|
||||
<?php
|
||||
$SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1);
|
||||
$SITEN = db_num_rows($SITES);
|
||||
$sort = $sort ? $sort : 'gid';
|
||||
$orderby= $orderby ? $orderby : 'asc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 20;
|
||||
$_WHERE='uid>0';
|
||||
$account = $SD['uid'];
|
||||
if($account) $_WHERE .=' and site='.$account;
|
||||
if ($d_start) $_WHERE .= ' and d_regis > '.str_replace('/','',$d_start).'000000';
|
||||
if ($d_finish) $_WHERE .= ' and d_regis < '.str_replace('/','',$d_finish).'240000';
|
||||
if ($display) $_WHERE .= ' and display='.$display;
|
||||
if ($category) $_WHERE .= " and category ='".$category."'";
|
||||
if ($hidden) $_WHERE .= ' and hidden=1';
|
||||
if ($where && $keyw)
|
||||
{
|
||||
if (strstr('[name][nic][id][ip]',$where)) $_WHERE .= " and ".$where."='".$keyw."'";
|
||||
else $_WHERE .= getSearchSql($where,$keyw,$ikeyword,'or');
|
||||
}
|
||||
$RCD = getDbArray($table[$module.'data'],$_WHERE,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table[$module.'data'],$_WHERE);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
?>
|
||||
|
||||
<div class="row no-gutters">
|
||||
|
||||
<nav class="col-sm-4 col-md-4 col-xl-3 d-none d-sm-block sidebar sidebar-right">
|
||||
|
||||
<form name="procForm" action="<?php echo $g['s']?>/" method="get" autocomplete="off">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="module" value="<?php echo $module?>">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
|
||||
<div id="accordion" role="tablist">
|
||||
<div class="card border-0">
|
||||
<div class="card-header p-0" role="tab">
|
||||
<a class="d-block muted-link<?php if($_SESSION['bbs_post_collapse']!='filter'):?> collapsed<?php endif?>" data-toggle="collapse" href="#collapse-filter" role="button" aria-expanded="true" aria-controls="collapseOne" onclick="sessionSetting('bbs_post_collapse','filter','','');">
|
||||
필터
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="collapse-filter" class="collapse<?php if($_SESSION['bbs_post_collapse']=='filter'):?> show<?php endif?>" role="tabpanel" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="input-daterange input-group input-group-sm mb-2" id="datepicker">
|
||||
<input type="text" class="form-control" name="d_start" placeholder="시작일 선택" value="<?php echo $d_start?>">
|
||||
<input type="text" class="form-control" name="d_finish" placeholder="종료일 선택" value="<?php echo $d_finish?>">
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-light" type="submit">기간적용</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<span class="btn-group btn-group-toggle">
|
||||
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo date('Y/m/d',mktime(0,0,0,substr($date['today'],4,2),substr($date['today'],6,2)-1,substr($date['today'],0,4)))?>','<?php echo date('Y/m/d',mktime(0,0,0,substr($date['today'],4,2),substr($date['today'],6,2)-1,substr($date['today'],0,4)))?>');">어제</button>
|
||||
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo getDateFormat($date['today'],'Y/m/d')?>','<?php echo getDateFormat($date['today'],'Y/m/d')?>');">오늘</button>
|
||||
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo date('Y/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'],'Y/m/d')?>');">일주</button>
|
||||
</span>
|
||||
|
||||
<span class="btn-group btn-group-toggle">
|
||||
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo date('Y/m/d',mktime(0,0,0,substr($date['today'],4,2)-1,substr($date['today'],6,2),substr($date['today'],0,4)))?>','<?php echo getDateFormat($date['today'],'Y/m/d')?>');">한달</button>
|
||||
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo getDateFormat(substr($date['today'],0,6).'01','Y/m/d')?>','<?php echo getDateFormat($date['today'],'Y/m/d')?>');">당월</button>
|
||||
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo date('Y/m/',mktime(0,0,0,substr($date['today'],4,2)-1,substr($date['today'],6,2),substr($date['today'],0,4)))?>01','<?php echo date('Y/m/',mktime(0,0,0,substr($date['today'],4,2)-1,substr($date['today'],6,2),substr($date['today'],0,4)))?>31');">전월</button>
|
||||
<button class="btn btn-light" type="button" onclick="dropDate('','');">전체</button>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header p-0" role="tab">
|
||||
<a class="d-block muted-link<?php if($_SESSION['bbs_post_collapse']!='sort'):?> collapsed<?php endif?>" data-toggle="collapse" href="#collapse-sort" role="button" aria-expanded="false" aria-controls="collapseTwo" onclick="sessionSetting('bbs_post_collapse','sort','','');">
|
||||
정렬
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapse-sort" class="collapse<?php if($_SESSION['bbs_post_collapse']=='sort'):?> show<?php endif?>" role="tabpanel" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="btn-toolbar">
|
||||
<div class="btn-group btn-group-sm btn-group-toggle mb-2" data-toggle="buttons">
|
||||
<label class="btn btn-light<?php if($sort=='gid'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="gid" name="sort"<?php if($sort=='gid'):?> checked<?php endif?>> 등록일
|
||||
</label>
|
||||
<label class="btn btn-light<?php if($sort=='hit'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="hit" name="sort"<?php if($sort=='hit'):?> checked<?php endif?>> 조회
|
||||
</label>
|
||||
<label class="btn btn-light<?php if($sort=='down'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="down" name="sort"<?php if($sort=='down'):?> checked<?php endif?>> 다운
|
||||
</label>
|
||||
<label class="btn btn-light<?php if($sort=='comment'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="comment" name="sort"<?php if($sort=='comment'):?> checked<?php endif?>> 댓글
|
||||
</label>
|
||||
<label class="btn btn-light<?php if($sort=='oneline'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="oneline" name="sort"<?php if($sort=='oneline'):?> checked<?php endif?>> 한줄의견
|
||||
</label>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm btn-group-toggle mb-2" data-toggle="buttons">
|
||||
<label class="btn btn-light<?php if($sort=='likes'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="likes" name="sort"<?php if($sort=='likes'):?> checked<?php endif?>> 좋아요
|
||||
</label>
|
||||
<label class="btn btn-light<?php if($sort=='dislikes'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="dislikes" name="sort"<?php if($sort=='dislikes'):?> checked<?php endif?>> 싫어요
|
||||
</label>
|
||||
<label class="btn btn-light<?php if($sort=='report'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="report" name="sort"<?php if($sort=='report'):?> checked<?php endif?>> 신고
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="btn-group btn-group-sm btn-group-toggle mb-2" data-toggle="buttons">
|
||||
<label class="btn btn-light<?php if($orderby=='desc'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="desc" name="orderby"<?php if($orderby=='desc'):?> checked<?php endif?>> <i class="fa fa-sort-amount-desc"></i>역순
|
||||
</label>
|
||||
<label class="btn btn-light<?php if($orderby=='asc'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="asc" name="orderby"<?php if($orderby=='asc'):?> checked<?php endif?>> <i class="fa fa-sort-amount-asc"></i>정순
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header p-0" role="tab">
|
||||
<a class="d-block muted-link<?php if($_SESSION['bbs_post_collapse']!='search'):?> collapsed<?php endif?>" data-toggle="collapse" href="#collapse-search" role="button" aria-expanded="false" aria-controls="collapseTwo" onclick="sessionSetting('bbs_post_collapse','search','','');">
|
||||
검색
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapse-search" class="collapse<?php if($_SESSION['bbs_post_collapse']=='search'):?> show<?php endif?>" role="tabpanel" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
|
||||
<select name="where" class="form-control custom-select mb-2">
|
||||
<option value="subject|tag"<?php if($where=='subject|tag'):?> selected="selected"<?php endif?>>제목+태그</option>
|
||||
<option value="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
|
||||
<option value="nic"<?php if($where=='review'):?> selected="selected"<?php endif?>>리뷰</option>
|
||||
<option value="ip"<?php if($where=='ip'):?> selected="selected"<?php endif?>>아이피</option>
|
||||
</select>
|
||||
<input type="text" name="keyw" value="<?php echo stripslashes($keyw)?>" class="form-control mb-2">
|
||||
<button class="btn btn-light btn-block" type="submit">검색</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-3">
|
||||
<div class="input-group input-group-sm mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text">출력수</label>
|
||||
</div>
|
||||
<select name="recnum" onchange="this.form.submit();" class="form-control custom-select">
|
||||
<option value="20"<?php if($recnum==20):?> selected="selected"<?php endif?>>20개</option>
|
||||
<option value="35"<?php if($recnum==35):?> selected="selected"<?php endif?>>35개</option>
|
||||
<option value="50"<?php if($recnum==50):?> selected="selected"<?php endif?>>50개</option>
|
||||
<option value="75"<?php if($recnum==75):?> selected="selected"<?php endif?>>75개</option>
|
||||
<option value="90"<?php if($recnum==90):?> selected="selected"<?php endif?>>90개</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<?php if($NUM):?>
|
||||
<div style="padding: .74rem">
|
||||
<a href="<?php echo $g['adm_href']?>" class="btn btn-block btn-light<?php echo $keyw?' active':'' ?>">검색조건 초기화</a>
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</nav>
|
||||
<div class="col-sm-8 col-md-8 mr-sm-auto col-xl-9">
|
||||
|
||||
<?php if($NUM):?>
|
||||
<form class="card rounded-0 border-0" name="listForm" action="<?php echo $g['s']?>/" method="post">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $module?>">
|
||||
<input type="hidden" name="a" value="">
|
||||
|
||||
<div class="card-header border-0 page-body-header">
|
||||
<?php echo number_format($NUM)?> 개
|
||||
<span class="badge badge-pill badge-dark"><?php echo $p?>/<?php echo $TPG?> 페이지</span>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-striped text-center mb-0">
|
||||
<thead class="small text-muted">
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>상태</th>
|
||||
<th>제목</th>
|
||||
<th>등록자</th>
|
||||
<th>조회</th>
|
||||
<th>생성일시</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-muted">
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<?php $R['mobile']=isMobileConnect($R['agent'])?>
|
||||
<tr>
|
||||
<td>
|
||||
<small class="text-muted"><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></small>
|
||||
</td>
|
||||
<td>
|
||||
<small class="text-muted"><span class="badge badge-pill badge-dark"><?php echo $g['displaySet']['label'][$R['display']]?></span></small>
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<a class="muted-link" href="<?php echo getPostLink($R,0) ?>" target="_blank">
|
||||
<?php echo getStrCut($R['subject'],'30','..')?>
|
||||
</a>
|
||||
<?php if(getNew($R['d_regis'],24)):?><small class="text-danger">new</small><?php endif?>
|
||||
</td>
|
||||
<?php if($R['id']):?>
|
||||
<td>
|
||||
<a href="#" data-toggle="modal" data-target="#modal_window" class="rb-modal-mbrinfo muted-link" onmousedown="mbrIdDrop('<?php echo $R['mbruid']?>','post');">
|
||||
<?php echo $R[$_HS['nametype']]?>
|
||||
</a>
|
||||
</td>
|
||||
<?php else:?>
|
||||
<td><?php echo getProfileInfo($R['mbruid'],$_HS['nametype'])?></td>
|
||||
<?php endif?>
|
||||
<td><strong><?php echo $R['hit']?></strong></td>
|
||||
<td>
|
||||
<small class="text-muted"><?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?></small>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-light btn-sm" href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $module?>&a=delete&cid=<?php echo $R['cid']?>&usertype=admin" onclick="return hrefCheck(this,true,'정말로 삭제하시겠습니까?');" class="del">
|
||||
삭제
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
<div class="card-footer d-flex justify-content-between py-5">
|
||||
<div>
|
||||
|
||||
</div>
|
||||
<ul class="pagination mb-0">
|
||||
<script>getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
</ul>
|
||||
<div class="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<?php else: ?>
|
||||
<div class="text-center text-muted d-flex align-items-center justify-content-center" style="height: calc(100vh - 10rem);">
|
||||
<div><i class="fa fa-exclamation-circle fa-3x mb-3" aria-hidden="true"></i>
|
||||
<p>등록된 포스트가 없습니다.</p>
|
||||
<a href="<?php echo RW('m=post&mod=write')?>" target="_blank" class="btn btn-outline-primary btn-block">
|
||||
<i class="fa fa-plus"></i> 새 포스트 작성
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
|
||||
|
||||
<!-- bootstrap-datepicker, http://eternicode.github.io/bootstrap-datepicker/ -->
|
||||
<?php getImport('bootstrap-datepicker','css/datepicker3',false,'css')?>
|
||||
<?php getImport('bootstrap-datepicker','js/bootstrap-datepicker',false,'js')?>
|
||||
<?php getImport('bootstrap-datepicker','js/locales/bootstrap-datepicker.kr',false,'js')?>
|
||||
|
||||
<?php include $g['path_module'].'member/admin/_modal.php';?>
|
||||
|
||||
<script>
|
||||
|
||||
putCookieAlert('post_action_result') // 실행결과 알림 메시지 출력
|
||||
|
||||
$('.input-daterange').datepicker({
|
||||
format: "yyyy/mm/dd",
|
||||
todayBtn: "linked",
|
||||
language: "kr",
|
||||
calendarWeeks: true,
|
||||
todayHighlight: true,
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
//사이트 셀렉터 출력
|
||||
$('[data-role="siteSelector"]').removeClass('d-none')
|
||||
|
||||
// 선택박스 체크 이벤트 핸들러
|
||||
$(".checkAll-post-user").click(function(){
|
||||
$(".rb-post-user").prop("checked",$(".checkAll-post-user").prop("checked"));
|
||||
checkboxCheck();
|
||||
});
|
||||
// 선택박스 체크시 액션버튼 활성화 함수
|
||||
function checkboxCheck()
|
||||
{
|
||||
var f = document.listForm;
|
||||
var l = document.getElementsByName('post_members[]');
|
||||
var n = l.length;
|
||||
var i;
|
||||
var j=0;
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if (l[i].checked == true) j++;
|
||||
}
|
||||
if (j) $('.rb-action-btn').prop("disabled",false);
|
||||
else $('.rb-action-btn').prop("disabled",true);
|
||||
}
|
||||
// 기간 검색 적용 함수
|
||||
function dropDate(date1,date2)
|
||||
{
|
||||
var f = document.procForm;
|
||||
f.d_start.value = date1;
|
||||
f.d_finish.value = date2;
|
||||
f.submit();
|
||||
}
|
||||
function actCheck(act)
|
||||
{
|
||||
var f = document.listForm;
|
||||
var l = document.getElementsByName('post_members[]');
|
||||
var n = l.length;
|
||||
var j = 0;
|
||||
var i;
|
||||
var s = '';
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if(l[i].checked == true)
|
||||
{
|
||||
j++;
|
||||
s += '['+l[i].value+']';
|
||||
}
|
||||
}
|
||||
if (!j)
|
||||
{
|
||||
alert('선택된 게시물이 없습니다. ');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (act == 'multi_delete')
|
||||
{
|
||||
if(confirm('정말로 삭제하시겠습니까? '))
|
||||
{
|
||||
getIframeForAction(f);
|
||||
f.a.value = act;
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
else {
|
||||
OpenWindow('<?php echo $g['s']?>/?r=<?php echo $r?>&iframe=Y&m=<?php echo $m?>&module=<?php echo $module?>&front=movecopy&type='+act+'&postuid='+s);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// 회원 이름,닉네임 클릭시 uid & mod( 탭 정보 : info, main, post 등) 지정하는 함수
|
||||
var _mbrModalUid;
|
||||
var _mbrModalMod;
|
||||
function mbrIdDrop(uid,mod)
|
||||
{
|
||||
_mbrModalUid = uid;
|
||||
_mbrModalMod = mod;
|
||||
}
|
||||
|
||||
// 회원정보 modal 호출하는 함수 : 위에서 지정한 회원 uid & mod 로 호출한다 .
|
||||
$('.rb-modal-mbrinfo').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&m=admin&module=member&front=modal.mbrinfo&uid=')?>'+_mbrModalUid+'&tab='+_mbrModalMod);
|
||||
});
|
||||
|
||||
</script>
|
||||
149
modules/post/admin/post_regis.css
Normal file
149
modules/post/admin/post_regis.css
Normal file
@@ -0,0 +1,149 @@
|
||||
html,
|
||||
#rb-body,
|
||||
#content-main,
|
||||
#rb-admin-page-content,
|
||||
.rb-post-regis {
|
||||
min-height: 100%;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.rb-post-regis {
|
||||
position: fixed;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
padding-top:53px;
|
||||
background-color:#fafafa
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.rb-post-regis .form-control {
|
||||
color: #495057;
|
||||
background-color: #fff;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 0;
|
||||
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
|
||||
}
|
||||
|
||||
.rb-post-regis header {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 64px;
|
||||
z-index: 99;
|
||||
}
|
||||
.document-editor__toolbar {
|
||||
position: fixed;
|
||||
top: 117px;
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
.document-editor {
|
||||
position: absolute;
|
||||
top: 157px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: auto;
|
||||
-webkit-transition-property: left,right,top,bottom,width,margin;
|
||||
transition-property: left,right,top,bottom,width,margin;
|
||||
-webkit-transition-duration: .2s;
|
||||
transition-duration: .2s;
|
||||
}
|
||||
|
||||
.rb-fixed-sidebar .document-editor {
|
||||
right: 350px;
|
||||
}
|
||||
|
||||
.rb-fixed-sidebar{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.rb-attach-sidebar {
|
||||
position: fixed;
|
||||
top: 157px;
|
||||
bottom:0;
|
||||
right: -350px;
|
||||
left:auto;
|
||||
width: 350px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
box-shadow: -1px 0 3px rgba(0, 0, 0, 0.5);
|
||||
-webkit-transition: 250ms cubic-bezier(0.1,.57,.1,1);
|
||||
transition: 250ms cubic-bezier(0.1,.57,.1,1);
|
||||
-webkit-transform: translate(0px,0) translateZ(0px);
|
||||
-ms-transform: translate(0px,0) translateZ(0px);
|
||||
transform: translate(0px,0) translateZ(0px);
|
||||
}
|
||||
|
||||
.rb-fixed-sidebar .rb-attach-sidebar {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.rb-attach-sidebar .nav-tabs .nav-item {
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
.rb-attach-sidebar .nav-tabs .nav-link {
|
||||
padding: 14px 12px;
|
||||
font-size: 14px;
|
||||
line-height: 14px;
|
||||
color: #586069;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
border-top-left-radius: .25rem;
|
||||
border-top-right-radius: .25rem;
|
||||
}
|
||||
.rb-attach-sidebar .nav-tabs .nav-link.active {
|
||||
color: #495057;
|
||||
background-color: #fff;
|
||||
border-color: #ddd #ddd #fff;
|
||||
}
|
||||
.rb-attach-sidebar.nav-tabs .nav-link:not(.active) {
|
||||
border-right: none
|
||||
}
|
||||
.rb-attach-sidebar .nav-tabs a:not(.active):hover,
|
||||
.rb-attach-sidebar .nav-tabs a:not(.active):focus {
|
||||
border-top-color: transparent;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom: 0
|
||||
}
|
||||
.rb-attach-sidebar .nav-tabs .nav-link.active:first-child {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
.rb-attach-sidebar label {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.opener {
|
||||
position: fixed;
|
||||
right: 40px;
|
||||
bottom: 15px;
|
||||
}
|
||||
|
||||
.opener .btn {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%
|
||||
}
|
||||
|
||||
.rb-fixed-sidebar .opener {
|
||||
display: none
|
||||
}
|
||||
|
||||
.ck-toc:empty {
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
.ck-toc:empty::before {
|
||||
content: "문서에 추가한 제목이 여기 표시됩니다.";
|
||||
color: rgb(153, 153, 153);
|
||||
}
|
||||
287
modules/post/admin/post_regis.php
Normal file
287
modules/post/admin/post_regis.php
Normal file
@@ -0,0 +1,287 @@
|
||||
<?php
|
||||
|
||||
$R=array();
|
||||
$upfile = '';
|
||||
|
||||
if ($uid) {
|
||||
$R=getUidData($table[$module.'data'],$uid);
|
||||
|
||||
$u_arr = getArrayString($R['upfiles']);
|
||||
$_tmp=array();
|
||||
$i=0;
|
||||
foreach ($u_arr['data'] as $val) {
|
||||
$U=getUidData($table['s_upload'],$val);
|
||||
if(!$U['fileonly']) $_tmp[$i]=$val;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$insert_array='';
|
||||
// 중괄로로 재조립
|
||||
foreach ($_tmp as $uid) {
|
||||
$insert_array.='['.$uid.']';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!-- smooth-scroll : https://github.com/cferdinandi/smooth-scroll -->
|
||||
<?php getImport('smooth-scroll','smooth-scroll.polyfills.min','16.1.0','js') ?>
|
||||
|
||||
<div class="rb-post-regis<?php if($_SESSION['editor_sidebar']=='right'):?> rb-fixed-sidebar<?php endif?>">
|
||||
<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="<?php echo $module?>">
|
||||
<input type="hidden" name="a" value="regis_post">
|
||||
<input type="hidden" name="uid" value="<?php echo $R['uid']?>">
|
||||
<input type="hidden" name="category_members">
|
||||
<input type="hidden" name="upload" id="upfilesValue" value="<?php echo $R['upload']?>">
|
||||
<input type="hidden" name="featured_img" value="<?php echo $R['featured_img'] ?>">
|
||||
<input type="hidden" name="html" value="HTML">
|
||||
<input type="hidden" name="content" value="">
|
||||
|
||||
<header class="d-flex justify-content-between align-items-center py-2 pl-4 pr-5 bg-white">
|
||||
<div class="form-group w-50 mb-0">
|
||||
<label class="sr-only">제목</label>
|
||||
<input type="text" name="subject" value="<?php echo $R['subject']?$R['subject']:'[제목없음]'?>" class="form-control-plaintext px-2 py-0" placeholder="제목을 입력하세요">
|
||||
</div>
|
||||
<div class="">
|
||||
<a class="btn btn-light" href="<?php echo $g['adm_href'] ?>&front=main" title="매장보기">
|
||||
포스트 목록
|
||||
</a>
|
||||
|
||||
<?php if ($uid): ?>
|
||||
<a class="btn btn btn-outline-success" href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $module?>&mod=view&cid=<?php echo $R['cid']?>" target="_blank">
|
||||
보기
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="btn btn-primary 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>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<?php
|
||||
$__SRC__ = getContents($R['content'],$R['html']);
|
||||
include $g['path_plugin'].'ckeditor5/import.desktop.post.php';
|
||||
?>
|
||||
</main>
|
||||
|
||||
<aside class="rb-attach-sidebar bg-white">
|
||||
|
||||
<div class="sidebar-header d-flex justify-content-between align-items-center pt-1 px-2 position-absolute" style="top:1px;right:1px;">
|
||||
<div class=""></div>
|
||||
<button type="button" class="close js-closeSidebar btn" aria-label="Close" data-toggle="tooltip" title="첨부패널 닫기">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-pills nav-fill" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link rounded-0 border-top-0 border-left-0<?php if(!$_SESSION['editor_sidebar_tab']):?> active<?php endif?>" id="tab-file" data-toggle="tab" href="#pane-file" role="tab" aria-controls="file" aria-selected="true" onclick="sessionSetting('editor_sidebar_tab','','','');">
|
||||
첨부
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link rounded-0 border-top-0 <?php if($_SESSION['editor_sidebar_tab']=='link'):?> active<?php endif?>" id="tab-link" data-toggle="tab" href="#pane-link" role="tab" aria-controls="media" aria-selected="false" onclick="sessionSetting('editor_sidebar_tab','link','','');">
|
||||
링크
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link rounded-0 border-top-0 <?php if($_SESSION['editor_sidebar_tab']=='category'):?> active<?php endif?>" id="tab-category" data-toggle="tab" href="#pane-category" role="tab" aria-controls="media" aria-selected="false" onclick="sessionSetting('editor_sidebar_tab','category','','');">
|
||||
카테고리
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link rounded-0 border-top-0 <?php if($_SESSION['editor_sidebar_tab']=='toc'):?> active<?php endif?>" id="tab-toc" data-toggle="tab" href="#pane-toc" role="tab" aria-controls="media" aria-selected="false" onclick="sessionSetting('editor_sidebar_tab','toc','','');">
|
||||
목차
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link rounded-0 border-top-0 border-right-0<?php if($_SESSION['editor_sidebar_tab']=='cog'):?> active<?php endif?>" id="tab-cog" data-toggle="tab" href="#pane-cog" role="tab" aria-controls="media" aria-selected="false" onclick="sessionSetting('editor_sidebar_tab','cog','','');">
|
||||
설정
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content mt-3">
|
||||
<div class="tab-pane px-2<?php if(!$_SESSION['editor_sidebar_tab']):?> show active <?php endif?>" id="pane-file" role="tabpanel">
|
||||
<?php getWidget('_default/attach',array('parent_module'=>'post','theme'=>'_desktop/bs4-default-attach','attach_handler_photo'=>'[data-role="attach-handler-photo"]','parent_data'=>$R,'attach_object_type'=>'file','wysiwyg'=>'Y'));?>
|
||||
|
||||
<p>
|
||||
<small class="text-muted">
|
||||
사진,파일,비디오,오디오를 한번에 최대 최대 <?php echo str_replace('M','',ini_get('upload_max_filesize'))?>MB 까지 업로드 할수 있습니다.<br>
|
||||
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
<div class="tab-pane px-2<?php if($_SESSION['editor_sidebar_tab']=='link'):?> show active <?php endif?>" id="pane-link" role="tabpanel">
|
||||
|
||||
<?php getWidget('_default/attach',array('parent_module'=>'post','theme'=>'_desktop/bs4-default-link','attach_handler_photo'=>'[data-role="attach-handler-photo"]','parent_data'=>$R,'wysiwyg'=>'Y'));?>
|
||||
|
||||
</div><!-- /.tab-pane -->
|
||||
<div class="tab-pane px-4<?php if($_SESSION['editor_sidebar_tab']=='toc'):?> show active <?php endif?>" id="pane-toc" role="tabpanel">
|
||||
|
||||
<ul id="toc" class=" ck-toc list-unstyled"></ul>
|
||||
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane px-4<?php if($_SESSION['editor_sidebar_tab']=='category'):?> show active <?php endif?>" id="pane-category" role="tabpanel">
|
||||
<?php $_treeOptions=array('site'=>$s,'table'=>$table[$module.'category'],'dispNum'=>true,'dispHidden'=>false,'dispCheckbox'=>true,'allOpen'=>true,'bookmark'=>'site-menu-info')?>
|
||||
<?php $_treeOptions['link'] = $g['adm_href'].'&cat='?>
|
||||
<?php echo getTreePostCategoryCheck($_treeOptions,$uid,0,0,'')?>
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane px-4<?php if($_SESSION['editor_sidebar_tab']=='cog'):?> show active <?php endif?>" id="pane-cog" role="tabpanel">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="sr-only">요약설명</label>
|
||||
<textarea class="form-control" rows="2" name="review" placeholder="요약설명을 입력하세요"><?php echo $R['review']?></textarea>
|
||||
<small class="form-text text-muted">500자 이내로 등록할 수 있으며 태그를 사용할 수 있습니다.</small>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group mt-4">
|
||||
<label class="sr-only">태그</label>
|
||||
<input type="text" name="tag" value="<?php echo $R['tag']?>" class="form-control" placeholder="태그를 입력하세요">
|
||||
<small class="form-text text-muted">콤마(,)로 구분하여 입력해 주세요.</small>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
연결메뉴
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<select name="linkedmenu" class="form-control custom-select">
|
||||
<option value="">사용 안함</option>
|
||||
<option disabled>--------------------</option>
|
||||
<?php include_once $g['path_core'].'function/menu1.func.php'?>
|
||||
<?php $cat=$R['linkedmenu']?>
|
||||
<?php getMenuShowSelect($s,$table['s_menu'],0,0,0,0,0,'')?>
|
||||
</select>
|
||||
<small class="form-text text-muted">
|
||||
이 포스트를 메뉴에 연결하였을 경우 해당메뉴를 지정해 주세요.<br>
|
||||
연결메뉴를 지정하면 로케이션이 동기화 됩니다.
|
||||
</small>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
연결 상품
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<input class="form-control" name="linkedshop" type="text" placeholder="연결할 상품" value="<?php echo $R['linkedshop']?>">
|
||||
<small class="form-text text-muted">
|
||||
[상품고유번호][상품고유번호].. 형식으로 입력해주세요
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
</div><!-- /.tab-content -->
|
||||
|
||||
</aside>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 요약부분 글자수 체크 -->
|
||||
<?php getImport('bootstrap-maxlength','bootstrap-maxlength.min',false,'js') ?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
//사이트 셀렉터 출력
|
||||
$('[data-role="siteSelector"]').removeClass('d-none')
|
||||
|
||||
putCookieAlert('result_post_regis') // 실행결과 알림 메시지 출력
|
||||
|
||||
// $("#toc").toc({content: ".ck-content", headings: "h2,h3,h4"});
|
||||
|
||||
var scroll = new SmoothScroll('a[href*="#"]');
|
||||
|
||||
$(".js-openSidebar").click(function(){
|
||||
$('.rb-post-regis').addClass('rb-fixed-sidebar');
|
||||
sessionSetting('editor_sidebar','right','','');
|
||||
});
|
||||
|
||||
$(".js-closeSidebar").click(function(){
|
||||
$('.rb-post-regis').removeClass('rb-fixed-sidebar');
|
||||
sessionSetting('editor_sidebar','','','');
|
||||
$('[data-toggle="tooltip"]').tooltip('hide')
|
||||
});
|
||||
|
||||
$(".js-submit").click(function(e) {
|
||||
$(this).attr("disabled",true);
|
||||
|
||||
var f = document.procForm;
|
||||
if (f.subject.value == '')
|
||||
{
|
||||
alert('제목 입력해 주세요.');
|
||||
f.subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var editorData = editor.getData();
|
||||
$('[name="content"]').val(editorData);
|
||||
|
||||
// 카테고리 체크
|
||||
var cat_sel=$('input[name="tree_members[]"]');
|
||||
var cat_sel_n=cat_sel.length;
|
||||
var cat_arr=$('input[name="tree_members[]"]:checked').map(function(){return $(this).val();}).get();
|
||||
var cat_n=cat_arr.length;
|
||||
|
||||
if(cat_sel_n>0 && cat_arr==''){
|
||||
alert('지정된 카테고리가 없습니다.\n적어도 하나이상의 카테고리를 지정해 주세요.');
|
||||
return false;
|
||||
} else {
|
||||
var s='';
|
||||
for (var i=0;i <cat_n;i++) {
|
||||
if(cat_arr[i]!='') s += '['+cat_arr[i]+']';
|
||||
}
|
||||
f.category_members.value = s;
|
||||
}
|
||||
|
||||
// 대표이미지가 없을 경우, 첫번째 업로드 사진을 지정함
|
||||
var featured_img_input = $('input[name="featured_img"]'); // 대표이미지 input
|
||||
var featured_img_uid = $(featured_img_input).val();
|
||||
if(featured_img_uid ==0){ // 대표이미지로 지정된 값이 없는 경우
|
||||
var first_attach_img_li = $('.rb-attach-photo li:first'); // 첫번째 첨부된 이미지 리스트 li
|
||||
var first_attach_img_uid = $(first_attach_img_li).attr('data-id');
|
||||
featured_img_input.val(first_attach_img_uid);
|
||||
}
|
||||
|
||||
// 첨부파일 uid 를 upfiles 값에 추가하기
|
||||
var attachfiles=$('input[name="attachfiles[]"]').map(function(){return $(this).val()}).get();
|
||||
var new_upfiles='';
|
||||
if(attachfiles){
|
||||
for(var i=0;i<attachfiles.length;i++) {
|
||||
new_upfiles+=attachfiles[i];
|
||||
}
|
||||
$('input[name="upload"]').val(new_upfiles);
|
||||
}
|
||||
|
||||
// $("#toc").empty().toc({content: ".ck-content", headings: "h2,h3,h4"}); // TOC 갱신
|
||||
|
||||
setTimeout(function(){
|
||||
getIframeForAction(f);
|
||||
f.submit();
|
||||
}, 500);
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
11
modules/post/admin/readme.php
Normal file
11
modules/post/admin/readme.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<link href="<?php echo $g['s']?>/_core/css/github-markdown.css" rel="stylesheet">
|
||||
|
||||
<div class="px-5 py-4 markdown-body">
|
||||
<?php @readfile($g['path_module'].$module.'/README.md')?>
|
||||
</div>
|
||||
|
||||
<?php getImport('jquery-markdown','jquery.markdown','0.0.10','js')?>
|
||||
|
||||
<script>
|
||||
$('.markdown-body').markdown();
|
||||
</script>
|
||||
4
modules/post/admin/theme.css
Normal file
4
modules/post/admin/theme.css
Normal file
@@ -0,0 +1,4 @@
|
||||
.nav-tabs .editor .nav-link.active {
|
||||
background-color: #252822;
|
||||
border-bottom-color: #252822
|
||||
}
|
||||
235
modules/post/admin/theme.php
Normal file
235
modules/post/admin/theme.php
Normal file
@@ -0,0 +1,235 @@
|
||||
<link href="<?php echo $g['s']?>/_core/css/github-markdown.css" rel="stylesheet">
|
||||
<style>
|
||||
#__code__ {
|
||||
font-weight: normal;
|
||||
font-family: Menlo,Monaco,Consolas,"Courier New",monospace !important;
|
||||
}
|
||||
</style>
|
||||
<?php getImport('jquery-markdown','jquery.markdown','0.0.10','js')?>
|
||||
|
||||
<?php getImport('codemirror','lib/codemirror',false,'css')?>
|
||||
<?php getImport('codemirror','lib/codemirror',false,'js')?>
|
||||
<?php getImport('codemirror','theme/'.$d['admin']['codeeidt'],false,'css')?>
|
||||
<?php getImport('codemirror','addon/display/fullscreen',false,'css')?>
|
||||
<?php getImport('codemirror','addon/display/fullscreen',false,'js')?>
|
||||
<?php getImport('codemirror','mode/htmlmixed/htmlmixed',false,'js')?>
|
||||
<?php getImport('codemirror','mode/xml/xml',false,'js')?>
|
||||
<?php getImport('codemirror','mode/javascript/javascript',false,'js')?>
|
||||
<?php getImport('codemirror','mode/css/css',false,'js')?>
|
||||
<?php getImport('codemirror','mode/htmlmixed/htmlmixed',false,'js')?>
|
||||
<?php getImport('codemirror','mode/clike/clike',false,'js')?>
|
||||
<?php getImport('codemirror','mode/php/php',false,'js')?>
|
||||
|
||||
<div class="row no-gutters">
|
||||
<div class="col-sm-4 col-md-4 col-lg-3 d-none d-sm-block sidebar"><!-- 좌측영역 시작 -->
|
||||
<div class="card border-0">
|
||||
<div class="card-header f13">
|
||||
테마 리스트
|
||||
</div>
|
||||
|
||||
<div class="list-group list-group-flush">
|
||||
<?php $i=0?>
|
||||
<?php $xdir = $g['path_module'].$module.'/themes/'?>
|
||||
<?php $tdir = $xdir.'_desktop/'?>
|
||||
<?php $dirs = opendir($tdir)?>
|
||||
<?php while(false !== ($skin = readdir($dirs))):?>
|
||||
<?php if($skin=='.' || $skin == '..' || is_file($tdir.$skin))continue?>
|
||||
<?php $i++?>
|
||||
<a href="<?php echo $g['adm_href']?>&theme=_desktop/<?php echo $skin?>" class="list-group-item list-group-item-action d-flex align-items-center<?php if($theme=='_desktop/'.$skin):?> border border-primary<?php endif?>">
|
||||
<span><?php echo getFolderName($tdir.$skin)?></span>
|
||||
<span class="badge badge-<?php echo $theme=='_desktop/'.$skin?'primary':'dark' ?> badge-pill ml-auto"><?php echo $skin?></span>
|
||||
</a>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
<?php $tdir = $xdir.'_mobile/'?>
|
||||
<?php $dirs = opendir($tdir)?>
|
||||
<?php while(false !== ($skin = readdir($dirs))):?>
|
||||
<?php if($skin=='.' || $skin == '..' || is_file($tdir.$skin))continue?>
|
||||
<?php $i++?>
|
||||
<a href="<?php echo $g['adm_href']?>&theme=_mobile/<?php echo $skin?>" class="list-group-item list-group-item-action d-flex align-items-center<?php if($theme=='_mobile/'.$skin):?> border border-primary<?php endif?>">
|
||||
<span><?php echo getFolderName($tdir.$skin)?></span>
|
||||
<span class="badge badge-<?php echo $theme=='_mobile/'.$skin?'primary':'dark' ?> badge-pill ml-auto"><?php echo $skin?></span>
|
||||
</a>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</div>
|
||||
|
||||
<?php if(!$i):?>
|
||||
<div class="none">등록된 테마가 없습니다.</div>
|
||||
<?php endif?>
|
||||
|
||||
|
||||
</div> <!-- 좌측 card 끝 -->
|
||||
</div> <!-- 좌측 영역 끝 -->
|
||||
<div class="col-sm-8 col-md-8 col-lg-9 ml-sm-auto ">
|
||||
|
||||
<?php if($theme):?>
|
||||
<form class="card rounded-0 border-0" 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 $module?>" />
|
||||
<input type="hidden" name="a" value="theme_config" />
|
||||
<input type="hidden" name="theme" value="<?php echo $theme?>" />
|
||||
|
||||
<div class="card-header p-0 page-body-header">
|
||||
<ol class="breadcrumb rounded-0 mb-0 bg-transparent text-muted">
|
||||
<?php $_theme =explode('/' , $theme); ?>
|
||||
<li class="breadcrumb-item">root</li>
|
||||
<li class="breadcrumb-item">modules</li>
|
||||
<li class="breadcrumb-item"><?php echo $module?></li>
|
||||
<li class="breadcrumb-item">themes</li>
|
||||
<li class="breadcrumb-item"><?php echo $_theme[0]?></li>
|
||||
<li class="breadcrumb-item"><?php echo $_theme[1]?></li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link js-tooltip<?php if(!$_COOKIE['moduleBbsThemeTab']||$_COOKIE['moduleBbsThemeTab']=='readme'):?> active<?php endif?>" href="#readme" data-toggle="tab" onclick="setCookie('moduleBbsThemeTab','readme',1);" title="README.md" data-placement="bottom">
|
||||
안내문서
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item editor">
|
||||
<a class="nav-link js-tooltip<?php if($_COOKIE['moduleBbsThemeTab']=='editor'):?> active<?php endif?>" href="#var" data-toggle="tab" onclick="setCookie('moduleBbsThemeTab','editor','1');" title="_var.php" data-placement="bottom">
|
||||
설정 변수
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane <?php if(!$_COOKIE['moduleBbsThemeTab']||$_COOKIE['moduleBbsThemeTab']=='readme'):?> show active<?php endif?>" id="readme" role="tabpanel" aria-labelledby="readme-tab">
|
||||
|
||||
<?php if (is_file($g['path_module'].$module.'/themes/'.$theme.'/README.md')): ?>
|
||||
<div class="markdown-body px-4 py-0 readme">
|
||||
<?php readfile($g['path_module'].$module.'/themes/'.$theme.'/README.md')?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
|
||||
<div class="text-center text-muted d-flex align-items-center justify-content-center" style="height: calc(100vh - 10rem);">
|
||||
<div><i class="fa fa-exclamation-circle fa-3x mb-3" aria-hidden="true"></i>
|
||||
<p>테마 안내문서가 없습니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (is_file($g['path_module'].$module.'/themes/'.$theme.'/LICENSE')): ?>
|
||||
<div class="py-5 px-4">
|
||||
<h5>라이센스</h5>
|
||||
<textarea class="form-control" rows="10"><?php readfile($g['path_module'].$module.'/themes/'.$theme.'/LICENSE')?></textarea>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane pr-2<?php if($_COOKIE['moduleBbsThemeTab']=='editor'):?> show active<?php endif?>" id="var" role="tabpanel" aria-labelledby="var-tab">
|
||||
|
||||
<div class="">
|
||||
<div class="rb-codeview">
|
||||
<div class="rb-codeview-body">
|
||||
<textarea name="theme_var" id="__code__" class="form-control" rows="30"><?php echo implode('',file($g['path_module'].$module.'/themes/'.$theme.'/_var.php'))?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="rb-codeview-footer p-2">
|
||||
<div class="form-row mb-2">
|
||||
<div class="col pt-2 text-muted">
|
||||
테마명 : <?php echo getFolderName($g['path_module'].$module.'/themes/'.$theme)?>
|
||||
</div>
|
||||
<div class="col">
|
||||
|
||||
</div>
|
||||
<div class="col text-right pt-2 text-muted">
|
||||
<small><?php echo count(file($g['path_module'].$module.'/themes/'.$theme.'/_var.php')).' lines'?></small></li>
|
||||
<small class="ml-3"><?php echo getSizeFormat(@filesize($g['path_module'].$module.'/themes/'.$theme.'/_var.php'),2)?></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!--.rb-codeview -->
|
||||
</div> <!--.rb-files -->
|
||||
<div class="card-footer">
|
||||
|
||||
<button type="submit" class="btn btn-outline-primary">저장하기</button>
|
||||
<span class="ml-3 text-muted">이 테마를 사용하는 모든 댓글목록에 위의 설정값이 적용됩니다.</span>
|
||||
<?php if($theme):?>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-outline-danger" href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $module?>&a=theme_delete&theme=<?php echo $theme?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 이 테마를 삭제하시겠습니까? ');">테마삭제</a>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
</div>
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
</div><!-- /.tab-content -->
|
||||
|
||||
|
||||
|
||||
<?php else:?>
|
||||
|
||||
<div class="text-center text-muted d-flex align-items-center justify-content-center" style="height: calc(100vh - 10rem);">
|
||||
<div class="">
|
||||
<i class="fa fa fa-picture-o fa-3x mb-3" aria-hidden="true"></i>
|
||||
<p>테마를 선택해 주세요.</p>
|
||||
<p class="small">테마설정은 해당 테마를 사용하는 모든 댓글목록에 적용됩니다.</p>
|
||||
|
||||
<ul class="list list-unstyled small">
|
||||
<li>테마는 댓글목록의 외형을 변경할 수 있는 요소입니다.</li>
|
||||
<li>테마설정은 댓글목록의 외형만 제어하며 댓글목록의 내부시스템에는 영향을 주지 않습니다.</li>
|
||||
<li>테마의 속성을 변경하면 해당테마를 사용하는 모든 댓글목록에 적용됩니다.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php endif?>
|
||||
|
||||
</form>
|
||||
</div> <!-- 우측영역 끝 -->
|
||||
</div> <!--.row -->
|
||||
|
||||
|
||||
<?php if($d['admin']['codeeidt'] && $theme):?>
|
||||
<!-- codemirror -->
|
||||
<style>
|
||||
.CodeMirror {
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
font-family: Menlo,Monaco,Consolas,"Courier New",monospace !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
(function() {
|
||||
$(".markdown-body").markdown();
|
||||
|
||||
putCookieAlert('result_comment_theme') // 실행결과 알림 메시지 출력
|
||||
|
||||
var editor = CodeMirror.fromTextArea(getId('__code__'), {
|
||||
mode: "<?php echo $codeset[$codeext]?$codeset[$codeext]:'application/x-httpd-php'?>",
|
||||
indentUnit: 2,
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
indentWithTabs: true,
|
||||
theme: '<?php echo $d['admin']['codeeidt']?>'
|
||||
});
|
||||
editor.setSize('100%','500px');
|
||||
_isCodeEdit = true;
|
||||
})();
|
||||
|
||||
</script>
|
||||
<!-- @codemirror -->
|
||||
<?php endif?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function saveCheck(f)
|
||||
{
|
||||
return confirm('정말로 실행하시겠습니까? ');
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
8
modules/post/admin/var/var.menu.php
Normal file
8
modules/post/admin/var/var.menu.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$d['amenu']['config'] = '환경설정';
|
||||
$d['amenu']['main'] = '포스트';
|
||||
$d['amenu']['list'] = '리스트';
|
||||
$d['amenu']['category'] = '카테고리';
|
||||
$d['amenu']['theme'] = '테마';
|
||||
$d['amenu']['readme'] = '도움말';
|
||||
?>
|
||||
Reference in New Issue
Block a user