first
This commit is contained in:
198
modules/comment/admin/_add_fgroup.php
Normal file
198
modules/comment/admin/_add_fgroup.php
Normal file
@@ -0,0 +1,198 @@
|
||||
<!--
|
||||
// makebbs.php 의 추가설정 부분
|
||||
-->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">최근글 제외</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="display" value="1" <?php if($d['bbs']['display']):?> checked<?php endif?> class="form-control">
|
||||
<i></i>최근글 추출에서 제외합니다.
|
||||
</label>
|
||||
</div>
|
||||
<div class="help-text">
|
||||
<small class="text-muted">
|
||||
<a data-toggle="collapse" href="#bbs_display-guide"><i class="fa fa-question-circle fa-fw"></i>도움말</a>
|
||||
</small>
|
||||
</div>
|
||||
<p class="help-block collapse alert alert-warning" id="bbs_display-guide">
|
||||
<small>
|
||||
최근글 추출제외는 게시물등록시에 이 설정값을 따르므로<br />
|
||||
설정값을 중간에 변경하면 이전 게시물에 대해서는 적용되지 않습니다.<br />
|
||||
최근글 제외설정은 게시판 서비스전에 확정하여 주세요.<br />
|
||||
최근글에서 제외하면 통합검색에서도 제외됩니다.
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">쿼리 생략</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="hidelist" value="1" <?php if($d['bbs']['hidelist']):?> checked<?php endif?> class="form-control">
|
||||
<i></i>게시물가공 기본쿼리를 생략합니다.
|
||||
</label>
|
||||
</div>
|
||||
<div class="help-text">
|
||||
<small class="text-muted">
|
||||
<a data-toggle="collapse" href="#bbs_hidelist-guide"><i class="fa fa-question-circle fa-fw"></i>도움말</a>
|
||||
</small>
|
||||
</div>
|
||||
<p class="help-block collapse alert alert-warning" id="bbs_hidelist-guide">
|
||||
<small>
|
||||
종종 기본쿼리가 아닌 테마자체에서 데이터를 가공해야 하는 경우가 있습니다.<br />
|
||||
1:1상담게시판,일정관리 등 특수한 테마의 경우 쿼리생략이 요구되기도 합니다.<br />
|
||||
쿼리생략이 요구되는 테마를 사용할 경우 체크해 주세요.<br />
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">RSS 발행</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="rss" value="1" <?php if($d['bbs']['rss']):?> checked<?php endif?> class="form-control">
|
||||
<i></i>RSS발행을 허용합니다. <br /><small class="text-muted">(개별게시판별 RSS발행은 개별게시판 설정을 따름) </small>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">조회수 증가</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline" >
|
||||
<input type="radio" name="hitcount" value="1" <?php if($d['bbs']['hitcount']):?> checked<?php endif?> />
|
||||
무조건 증가
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="hitcount" value="0"<?php if(!$d['bbs']['hitcount']):?> checked<?php endif?> />
|
||||
1회만 증가
|
||||
</label>
|
||||
</div><!-- .col-sm-10 -->
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">게시물 출력</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="text" name="recnum" value="<?php echo $d['bbs']['recnum']?$d['bbs']['recnum']:20?>" class="form-control">
|
||||
<span class="input-group-addon">개</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 form-control-static text-muted">
|
||||
<small>한페이지에 출력할 게시물의 수</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">제목 끊기</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="text" name="sbjcut" value="<?php echo $d['bbs']['sbjcut']?$d['bbs']['sbjcut']:40?>" class="form-control">
|
||||
<span class="input-group-addon">자</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 form-control-static text-muted">
|
||||
<small>제목이 길 경우 보여줄 글자 수 </small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">새글 유지시간</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="text" name="newtime" value="<?php echo $d['bbs']['newtime']?$d['bbs']['newtime']:24?>" class="form-control">
|
||||
<span class="input-group-addon">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 text-muted form-control-static">
|
||||
<small> 새글로 인식되는 시간 </small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">등록 포인트</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="text" name="point1" value="<?php echo $d['bbs']['point1']?$d['bbs']['point1']:0?>" class="form-control">
|
||||
<span class="input-group-addon">포인트 지급</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 text-muted form-control-static">
|
||||
<small> 게시물 삭제시 환원됩니다. </small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">열람 포인트</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="text" name="point2" value="<?php echo $d['bbs']['point2']?$d['bbs']['point2']:0?>" class="form-control">
|
||||
<span class="input-group-addon">포인트 차감</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 text-muted form-control-static">
|
||||
<small> </small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">다운 포인트</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="text" name="point3" value="<?php echo $d['bbs']['point3']?$d['bbs']['point3']:0?>" class="form-control">
|
||||
<span class="input-group-addon">포인트 차감</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 text-muted form-control-static">
|
||||
<small> </small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">추가 관리자</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<input class="form-control" placeholder="" type="text" name="admin" value="<?php echo $d['bbs']['admin']?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default rb-help-btn" type="button" data-toggle="collapse" data-target="#bbs_admin-guide" data-tooltip="tooltip" title="도움말"><i class="fa fa-question-circle fa-lg"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<p class="help-block collapse alert alert-warning" id="bbs_admin-guide">
|
||||
<small>
|
||||
이 게시판에 대해서 관리자권한을 별도로 부여할 회원이 있을경우<br />
|
||||
회원아이디를 콤마(,)로 구분해서 등록해 주세요.<br />
|
||||
관리자로 지정될 경우 열람/수정/삭제등의 모든권한을 얻게 됩니다.
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">부가필드</label>
|
||||
<div class="col-md-10">
|
||||
<textarea name="adddata" class="form-control" rows="3"><?php echo htmlspecialchars($R['adddata'])?></textarea>
|
||||
<span class="help-block">
|
||||
이 게시판에 대해서 추가적인 정보가 필요할 경우 사용합니다.<br />
|
||||
필드명은 <code>[adddata]</code> 입니다.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
49
modules/comment/admin/_footer_fgroup.php
Normal file
49
modules/comment/admin/_footer_fgroup.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<!--
|
||||
// makebbs.php 의 픗터삽입 부분
|
||||
-->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">픗터 파일</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="file" name="imgfoot">
|
||||
<?php if($R['imgfoot']):?>
|
||||
<p class="form-control-static">
|
||||
<a class="btn bnt-link" href="<?php echo $g['r']?>/?m=<?php echo $module?>&a=bbs_file_delete&bid=<?php echo $R['id']?>&dtype=foot" target="_action_frame_<?php echo $m?>" onclick="return hrefCheck(this,true,'정말로 삭제하시겠습니까?');">삭제</a>
|
||||
<a class="btn btn-link" href="<?php echo $g['s']?>/modules/<?php echo $module?>/var/files/<?php echo $R['imgfoot']?>" target="_blank">등록파일 보기</a>
|
||||
</p>
|
||||
<?php else:?>
|
||||
<small class="help-block">(gif/jpg/png/swf 가능)</small>
|
||||
<?php endif?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">
|
||||
픗터 코드
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<p>
|
||||
<textarea name="codfoot" id="codfootArea" class="form-control" rows="5"><?php if(is_file($g['path_module'].$module.'/var/code/'.$R['id'].'.footer.php')) echo htmlspecialchars(implode('',file($g['path_module'].$module.'/var/code/'.$R['id'].'.footer.php')))?></textarea>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">
|
||||
노출 위치
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-sm-3">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="inc_foot_list" value="[l]"<?php if(strstr($R['putfoot'],'[l]')):?> checked <?php endif?> class="form-control"> <i></i>목록
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="inc_foot_view" value="[v]"<?php if(strstr($R['putfoot'],'[v]')):?> checked <?php endif?> class="form-control"><i></i>본문
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="inc_foot_write" value="[w]"<?php if(strstr($R['putfoot'],'[w]')):?> checked <?php endif?> class="form-control"><i></i>쓰기
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
49
modules/comment/admin/_header_fgroup.php
Normal file
49
modules/comment/admin/_header_fgroup.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<!--
|
||||
// makebbs.php 의 헤더삽입 부분
|
||||
-->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" >헤더 파일</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="file" name="imghead">
|
||||
<?php if($R['imghead']):?>
|
||||
<p class="form-control-static">
|
||||
<a class="btn bnt-link" href="<?php echo $g['r']?>/?m=<?php echo $module?>&a=bbs_file_delete&bid=<?php echo $R['id']?>&dtype=head" target="_action_frame_<?php echo $m?>" onclick="return hrefCheck(this,true,'정말로 삭제하시겠습니까?');">삭제</a>
|
||||
<a class="btn btn-link" href="<?php echo $g['s']?>/modules/<?php echo $module?>/var/files/<?php echo $R['imghead']?>" target="_blank">등록파일 보기</a>
|
||||
</p>
|
||||
<?php else:?>
|
||||
<small class="help-block">(gif/jpg/png/swf 가능)</small>
|
||||
<?php endif?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">
|
||||
헤더 코드
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<p>
|
||||
<textarea name="codhead" id="codheadArea" class="form-control" rows="5"><?php if(is_file($g['path_module'].$module.'/var/code/'.$R['id'].'.header.php')) echo htmlspecialchars(implode('',file($g['path_module'].$module.'/var/code/'.$R['id'].'.header.php')))?></textarea>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">
|
||||
노출 위치
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-sm-3">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="inc_head_list" value="[l]"<?php if(strstr($R['puthead'],'[l]')):?> checked <?php endif?> class="form-control"> <i></i>목록
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="inc_head_view" value="[v]"<?php if(strstr($R['puthead'],'[v]')):?> checked <?php endif?> class="form-control"><i></i>본문
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="inc_head_write" value="[w]"<?php if(strstr($R['puthead'],'[w]')):?> checked <?php endif?> class="form-control"><i></i>쓰기
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
29
modules/comment/admin/_info.php
Normal file
29
modules/comment/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>
|
||||
70
modules/comment/admin/_right_fgroup.php
Normal file
70
modules/comment/admin/_right_fgroup.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<!--
|
||||
// makebbs.php 의 권한설정 부분
|
||||
-->
|
||||
<div class="well well-lg">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<div class="col-sm-10">
|
||||
<h3><span class="label label-default">채팅 열람</label></h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">허용등급</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="perm_l_view" class="form-control">
|
||||
<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['bbs']['perm_l_view']):?> 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">
|
||||
<label class="col-sm-2 control-label">차단그룹</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="_perm_g_view" class="form-control" multiple size="5">
|
||||
<option value=""<?php if(!$d['bbs']['perm_g_view']):?> 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['bbs']['perm_g_view'],'['.$_S['uid'].']')):?> selected="selected"<?php endif?>>ㆍ<?php echo $_S['name']?>(<?php echo number_format($_S['num'])?>)</option>
|
||||
<?php endwhile?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .well-->
|
||||
|
||||
<div class="well well-lg">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<div class="col-sm-10">
|
||||
<h3><span class="label label-default">채팅 참여(글쓰기)</label></h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">허용등급</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="perm_l_write" class="form-control">
|
||||
<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['bbs']['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">
|
||||
<label class="col-sm-2 control-label">차단그룹</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="_perm_g_write" class="form-control" multiple size="5">
|
||||
<option value=""<?php if(!$d['bbs']['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['bbs']['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>
|
||||
</div> <!-- .well-->
|
||||
380
modules/comment/admin/comment.php
Normal file
380
modules/comment/admin/comment.php
Normal file
@@ -0,0 +1,380 @@
|
||||
<?php
|
||||
//동기화URL
|
||||
function getCyncUrl($cync)
|
||||
{
|
||||
if (!$cync) return $GLOBALS['g']['r'];
|
||||
$_r = getArrayString($cync);
|
||||
$_r = $_r['data'][5];
|
||||
if ($GLOBALS['_HS']['rewrite']&&strpos('_'.$_r,'m:bbs,bid:'))
|
||||
{
|
||||
$_r = str_replace('m:bbs','b',$_r);
|
||||
$_r = str_replace(',bid:','/',$_r);
|
||||
$_r = str_replace(',uid:','/',$_r);
|
||||
$_r = str_replace(',CMT:','/',$_r);
|
||||
$_r = str_replace(',s:','/s',$_r);
|
||||
return $GLOBALS['g']['r'].'/'.$_r;
|
||||
}
|
||||
else return $GLOBALS['g']['s'].'/?'.($GLOBALS['_HS']['usescode']?'r='.$GLOBALS['_HS']['id'].'&':'').str_replace(':','=',str_replace(',','&',$_r));
|
||||
}
|
||||
|
||||
$SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1);
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'asc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 20;
|
||||
$_WHERE='uid>0';
|
||||
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 ($bid) $_WHERE .= ' and bbs='.$bid;
|
||||
if ($category) $_WHERE .= " and category ='".$category."'";
|
||||
if ($notice) $_WHERE .= ' and notice=1';
|
||||
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['s_comment'],$_WHERE,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_comment'],$_WHERE);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
|
||||
?>
|
||||
<div class="page-header">
|
||||
<h4>댓글 리스트 </h4>
|
||||
</div>
|
||||
<form name="procForm" action="<?php echo $g['s']?>/" method="get" class="form-horizontal rb-form">
|
||||
<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="rb-heading well well-sm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-1 control-label">필터 </label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<select name="account" class="form-control input-sm" onchange="this.form.submit();">
|
||||
<option value="">+ 전체사이트</option>
|
||||
<option value="">--------------------</option>
|
||||
<?php while($S = db_fetch_array($SITES)):?>
|
||||
<option value="<?php echo $S['uid']?>"<?php if($account==$S['uid']):?> selected="selected"<?php endif?>>ㆍ<?php echo $S['name']?></option>
|
||||
<?php endwhile?>
|
||||
<?php if(!db_num_rows($SITES)):?>
|
||||
<option value="">등록된 사이트가 없습니다.</option>
|
||||
<?php endif?>
|
||||
</select>
|
||||
</div>
|
||||
</div> <!-- .row -->
|
||||
</div> <!-- .col-sm-10 -->
|
||||
</div> <!-- .form-group -->
|
||||
<!-- 고급검색 시작 -->
|
||||
<div id="search-more" class="collapse<?php if($_SESSION['sh_bbspost']):?> in<?php endif?>">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-1 control-label">옵션 </label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<label class="checkbox" style="margin-top:0">
|
||||
<input type="checkbox" name="notice" value="Y"<?php if($notice=='Y'):?> checked<?php endif?> onclick="this.form.submit();" class="form-control"> <i></i>공지글
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<label class="checkbox" style="margin-top:0">
|
||||
<input type="checkbox" name="hidden" value="Y"<?php if($hidden=='Y'):?> checked<?php endif?> onclick="this.form.submit();" class="form-control"><i></i>비밀글
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-1 control-label">기간</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-5">
|
||||
<div class="input-daterange input-group input-group-sm" id="datepicker">
|
||||
<input type="text" class="form-control" name="d_start" placeholder="시작일 선택" value="<?php echo $d_start?>">
|
||||
<span class="input-group-addon">~</span>
|
||||
<input type="text" class="form-control" name="d_finish" placeholder="종료일 선택" value="<?php echo $d_finish?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit">기간적용</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 hidden-xs">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" 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-default" 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-default" 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>
|
||||
<button class="btn btn-default" 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-default" 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-default" 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-default" type="button" onclick="dropDate('','');">전체</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hidden-xs">
|
||||
<label class="col-sm-1 control-label">정렬</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="btn-toolbar">
|
||||
<div class="btn-group btn-group-sm" data-toggle="buttons">
|
||||
<label class="btn btn-default<?php if($sort=='gid'):?> 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-default<?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-default<?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-default<?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>
|
||||
<label class="btn btn-default<?php if($sort=='score1'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="score1" name="sort"<?php if($sort=='score1'):?> checked<?php endif?>> 점수1
|
||||
</label>
|
||||
<label class="btn btn-default<?php if($sort=='score2'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="score2" name="sort"<?php if($sort=='score2'):?> checked<?php endif?>> 점수2
|
||||
</label>
|
||||
<label class="btn btn-default<?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" data-toggle="buttons">
|
||||
<label class="btn btn-default<?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-default<?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 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-default">
|
||||
<option value="subject"<?php if($where=='subject'):?> selected="selected"<?php endif?>>제목</option>
|
||||
<option value="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
|
||||
<option value="name"<?php if($where=='name'):?> selected="selected"<?php endif?>>이름</option>
|
||||
<option value="nic"<?php if($where=='nic'):?> selected="selected"<?php endif?>>닉네임</option>
|
||||
<option value="id"<?php if($where=='id'):?> selected="selected"<?php endif?>>아이디</option>
|
||||
<option value="ip"<?php if($where=='ip'):?> 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-default" type="submit">검색</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-1 control-label">출력</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<select name="recnum" onchange="this.form.submit();" class="form-control input-sm">
|
||||
<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 class="col-sm-2">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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_bbspost']):?> collapsed<?php endif?>" data-toggle="collapse" data-target="#search-more" onclick="sessionSetting('sh_bbspost','1','','1');">고급검색<small></small></button>
|
||||
<a href="<?php echo $g['adm_href']?>" class="btn btn-link">초기화</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="page-header">
|
||||
<h4>
|
||||
<small><?php echo number_format($NUM)?> 개 ( <?php echo $p?>/<?php echo $TPG.($TPG>1?'pages':'page')?> )</small>
|
||||
</h4>
|
||||
</div>
|
||||
<form name="listForm" action="<?php echo $g['s']?>/" method="post">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $module?>">
|
||||
<input type="hidden" name="a" value="">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><label data-tooltip="tooltip" title="선택"><input type="checkbox" class="checkAll-post-user"></label></th>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>이름</th>
|
||||
<th>조회</th>
|
||||
<th>다운</th>
|
||||
<th>점수1</th>
|
||||
<th>점수2</th>
|
||||
<th>신고</th>
|
||||
<th>날짜</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<?php $R['mobile']=isMobileConnect($R['agent'])?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="comment_members[]" value="<?php echo $R['uid']?>" class="rb-post-user" onclick="checkboxCheck();"/></td>
|
||||
<td>
|
||||
<?php echo $NUM-((($p-1)*$recnum)+$_rec++)?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($R['notice']):?><i class="fa fa-volume-up"></i><?php endif?>
|
||||
<?php if($R['mobile']):?><i class="fa fa-mobile f-lg"></i><?php endif?>
|
||||
<a href="<?php echo getCyncUrl($R['cync'].',CMT:'.$R['uid'].',s:'.$R['site'])?>#CMT" target="_blank"><?php echo $R['subject']?></a>
|
||||
<?php if(strstr($R['content'],'.jpg')):?><i class="fa fa-picture-o"></i><?php endif?>
|
||||
<?php if($R['upload']):?><i class="glyphicon glyphicon-floppy-disk"></i><?php endif?>
|
||||
<?php if($R['hidden']):?><i class="fa fa-lock fa-lg"></i><?php endif?>
|
||||
<?php if($R['oneline']):?><span class="comment">[<?php echo $R['oneline']?>]</span><?php endif?>
|
||||
<?php if(getNew($R['d_regis'],24)):?><small class="label label-danger">new</small><?php endif?>
|
||||
</td>
|
||||
<?php if($R['id']):?>
|
||||
<td><a href="javascript:OpenWindow('<?php echo $g['s']?>/?r=<?php echo $r?>&iframe=Y&m=member&front=manager&page=post&mbruid=<?php echo $R['mbruid']?>');" title="게시정보"><?php echo $R[$_HS['nametype']]?></a></td>
|
||||
<?php else:?>
|
||||
<td><?php echo $R[$_HS['nametype']]?></td>
|
||||
<?php endif?>
|
||||
<td><strong><?php echo $R['hit']?></strong></td>
|
||||
<td><?php echo $R['down']?></td>
|
||||
<td><?php echo $R['score1']?></td>
|
||||
<td><?php echo $R['score2']?></td>
|
||||
<td><?php echo $R['report']?></td>
|
||||
<td><?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?></td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(!$NUM):?>
|
||||
<div class="rb-none">게시물이 없습니다.</div>
|
||||
<?php endif?>
|
||||
<div class="rb-footer clearfix">
|
||||
<div class="pull-right">
|
||||
<ul class="pagination">
|
||||
<script>getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
<?php //echo getPageLink(5,$p,$TPG,'')?>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" onclick="chkFlag('comment_members[]');checkboxCheck();" class="btn btn-default btn-sm">선택/해제 </button>
|
||||
<button type="button" onclick="actCheck('comment_multi_delete');" class="btn btn-default btn-sm rb-action-btn" disabled>삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="MoveCopy" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Modal title</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
...
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- 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')?>
|
||||
<style type="text/css">
|
||||
.datepicker {z-index: 1151 !important;}
|
||||
</style>
|
||||
<script>
|
||||
|
||||
$('.input-daterange').datepicker({
|
||||
format: "yyyy/mm/dd",
|
||||
todayBtn: "linked",
|
||||
language: "kr",
|
||||
calendarWeeks: true,
|
||||
todayHighlight: true,
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
// 선택박스 체크 이벤트 핸들러
|
||||
$(".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('comment_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('comment_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 == 'comment_multi_delete')
|
||||
{
|
||||
if(confirm('정말로 삭제하시겠습니까? '))
|
||||
{
|
||||
getIframeForAction(f);
|
||||
f.a.value = act;
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
251
modules/comment/admin/config.php
Normal file
251
modules/comment/admin/config.php
Normal file
@@ -0,0 +1,251 @@
|
||||
|
||||
<form class="p-4" 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="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['comment']['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['comment']['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-md-10 col-xl-9 -->
|
||||
</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['comment']['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['comment']['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-md-10 col-xl-9 -->
|
||||
</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">
|
||||
<select name="skin_total" 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['comment']['skin_total']=='_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['comment']['skin_total']=='_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">
|
||||
통합보드란 모든 댓글목록 전체 게시물을 하나의 댓글목록으로 출력해 주는 서비스입니다.<br>
|
||||
사용하시려면 통합댓글목록용 테마를 지정해 주세요.
|
||||
통합댓글목록의 호출은 <code><a href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $module?>" target="_blank"><?php echo $g['r']?>/?m=<?php echo $module?></a></code> 입니다.
|
||||
</small>
|
||||
</div> <!-- .col-md-10 col-xl-9 -->
|
||||
</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">
|
||||
<div class="input-group w-25">
|
||||
<input type="text" name="recnum" value="<?php echo $d['comment']['recnum']?$d['comment']['recnum']:20?>" 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 form-inline">
|
||||
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="report_del" name="report_del" value="1" <?php if($d['comment']['report_del']):?> checked<?php endif?> >
|
||||
<label class="custom-control-label" for="report_del">신고건 수가</label>
|
||||
</div>
|
||||
|
||||
<div class="input-group ml-4">
|
||||
<input type="text" name="report_del_num" value="<?php echo $d['comment']['report_del_num']?>" class="form-control">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">건 이상인 경우</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<select name="report_del_act" class="form-control custom-select ml-4">
|
||||
<option value="1"<?php if($d['comment']['report_del_act']==1):?> selected="selected"<?php endif?>>자동삭제</option>
|
||||
<option value="2"<?php if($d['comment']['report_del_act']==2):?> selected="selected"<?php endif?>>비밀처리</option>
|
||||
</select>
|
||||
</div> <!-- .col-md-10 col-xl-9 -->
|
||||
</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['comment']['badword']?></textarea>
|
||||
</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">
|
||||
<input type="radio" id="badword_action_0" class="custom-control-input" name="badword_action" value="0" <?php if($d['comment']['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['comment']['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['comment']['badword_action']==2):?> checked<?php endif?>>
|
||||
<label class="custom-control-label" for="badword_action_2">제한단어를 다음의 문자로 치환하여 등록함</label>
|
||||
<input class="form-control w-25" type="text" name="badword_escape" value="<?php echo $d['comment']['badword_escape']?>" maxlength="1">
|
||||
</div>
|
||||
|
||||
</div><!-- .col-md-10 col-xl-9 -->
|
||||
</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-checkbox mt-1">
|
||||
<input type="checkbox" class="custom-control-input" id="commentdel" name="commentdel" value="1" <?php if($d['comment']['commentdel']):?> checked<?php endif?>>
|
||||
<label class="custom-control-label" for="commentdel">한줄의견 있는 댓글의 삭제를 제한합니다.</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">
|
||||
<div class="form-inline">
|
||||
<div class="input-group">
|
||||
<input type="text" name="newtime" value="<?php echo $d['comment']['newtime']?$d['comment']['newtime']:24?>" class="form-control">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
<small class="text-muted ml-2">새글로 인식되는 시간</small>
|
||||
</div><!-- /.form-inline -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-md-right">댓글 포인트</label>
|
||||
<div class="col-md-10">
|
||||
<div class="form-inline">
|
||||
<div class="input-group">
|
||||
<input type="text" name="give_point" value="<?php echo $d['comment']['give_point']?>" class="form-control">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">포인트 지급</span>
|
||||
</div>
|
||||
</div>
|
||||
<small class="text-muted ml-2">등록한 댓글을 삭제시 환원됩니다</small>
|
||||
</div><!-- /.form-inline -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-form-label text-md-right">한줄의견 포인트</label>
|
||||
<div class="col-md-10">
|
||||
<div class="form-inline">
|
||||
<div class="input-group">
|
||||
<input type="text" name="give_opoint" value="<?php echo $d['comment']['give_opoint']?>" class="form-control">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">포인트 지급</span>
|
||||
</div>
|
||||
</div>
|
||||
<small class="text-muted ml-2">등록한 한줄의견을 삭제시 환원됩니다</small>
|
||||
</div><!-- /.form-inline -->
|
||||
</div>
|
||||
</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>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
putCookieAlert('comment_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;
|
||||
// }
|
||||
if (confirm('정말로 실행하시겠습니까? '))
|
||||
{
|
||||
getIframeForAction(f);
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
1
modules/comment/admin/main.css
Normal file
1
modules/comment/admin/main.css
Normal file
@@ -0,0 +1 @@
|
||||
h6 {text-align: left;width: auto;line-height: 160%}
|
||||
382
modules/comment/admin/main.php
Normal file
382
modules/comment/admin/main.php
Normal file
@@ -0,0 +1,382 @@
|
||||
<?php
|
||||
//댓글링크
|
||||
function _getPostLink($arr)
|
||||
{
|
||||
$sync_arr=explode('|',$arr['sync']);
|
||||
$B = getUidData($sync_arr[0],$sync_arr[2]);
|
||||
return RW('m='.$sync_arr[1].'&bid='.$B['bbsid'].'&uid='.$sync_arr[2].($GLOBALS['s']!=$arr['site']?'&s='.$arr['site']:''.'#CMT-'.$arr['uid']));
|
||||
}
|
||||
$SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1);
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$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($bid) $_WHERE .= ' and bbs='.$bid;
|
||||
if($category) $_WHERE .= " and category ='".$category."'";
|
||||
if($notice) $_WHERE .= ' and notice=1';
|
||||
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['s_comment'],$_WHERE,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_comment'],$_WHERE);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
?>
|
||||
|
||||
<div class="row no-gutters">
|
||||
|
||||
<div 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">
|
||||
<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['comment_main_collapse']!='filter'):?> collapsed<?php endif?>" data-toggle="collapse" href="#collapse-filter" role="button" aria-expanded="true" aria-controls="collapseOne" onclick="sessionSetting('comment_main_collapse','filter','','');">
|
||||
필터
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="collapse-filter" class="collapse<?php if($_SESSION['comment_main_collapse']=='filter'):?> show<?php endif?>" role="tabpanel" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="mb-2">
|
||||
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="notice" name="notice" value="Y"<?php if($notice=='Y'):?> checked<?php endif?> onclick="this.form.submit();">
|
||||
<label class="custom-control-label" for="notice">공지글</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="hidden" name="hidden" value="Y"<?php if($hidden=='Y'):?> checked<?php endif?> onclick="this.form.submit();">
|
||||
<label class="custom-control-label" for="hidden">비밀글</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<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['comment_main_collapse']!='sort'):?> collapsed<?php endif?>" data-toggle="collapse" href="#collapse-sort" role="button" aria-expanded="false" aria-controls="collapseTwo" onclick="sessionSetting('comment_main_collapse','sort','','');">
|
||||
정렬
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapse-sort" class="collapse<?php if($_SESSION['comment_main_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=='d_regis'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="d_regis" name="sort"<?php if($sort=='d_regis'):?> 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=='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['comment_main_collapse']!='search'):?> collapsed<?php endif?>" data-toggle="collapse" href="#collapse-search" role="button" aria-expanded="false" aria-controls="collapseThree" onclick="sessionSetting('comment_main_collapse','search','','');">
|
||||
검색
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapse-search" class="collapse<?php if($_SESSION['comment_main_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="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
|
||||
<option value="name"<?php if($where=='name'):?> selected="selected"<?php endif?>>이름</option>
|
||||
<option value="nic"<?php if($where=='nic'):?> selected="selected"<?php endif?>>닉네임</option>
|
||||
<option value="id"<?php if($where=='id'):?> selected="selected"<?php endif?>>아이디</option>
|
||||
<option value="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):?>
|
||||
<a href="<?php echo $g['adm_href']?>" class="btn btn-block btn-light<?php echo $keyw?' active':'' ?>">검색조건 초기화</a>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div><!-- /.sidebar -->
|
||||
<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">
|
||||
<small><?php echo number_format($NUM)?> 개</small>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $p?>/<?php echo $TPG?> 페이지</span>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped text-center mb-0 f13">
|
||||
<thead class="small text-muted">
|
||||
<tr>
|
||||
<th><label data-tooltip="tooltip" title="선택"><input type="checkbox" class="checkAll-post-user"></label></th>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>이름</th>
|
||||
<th>좋아요</th>
|
||||
<th>싫어요</th>
|
||||
<th>신고</th>
|
||||
<th>날짜</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<?php $R['mobile']=isMobileConnect($R['agent'])?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="comment_members[]" value="<?php echo $R['uid']?>" class="rb-post-user" onclick="checkboxCheck();"/></td>
|
||||
<td>
|
||||
<?php echo $NUM-((($p-1)*$recnum)+$_rec++)?>
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<?php if($R['notice']):?><i class="fa fa-volume-up"></i><?php endif?>
|
||||
<?php if($R['mobile']):?><i class="fa fa-mobile f-lg"></i><?php endif?>
|
||||
<a href="<?php echo _getPostLink($R)?>" target="_blank" class="muted-link"><?php echo getStrCut($R['subject'],50,'..')?></a>
|
||||
<?php if(strstr($R['content'],'.jpg')):?><i class="fa fa-picture-o"></i><?php endif?>
|
||||
<?php if($R['upload']):?><i class="glyphicon glyphicon-floppy-disk"></i><?php endif?>
|
||||
<?php if($R['hidden']):?><i class="fa fa-lock fa-lg"></i><?php endif?>
|
||||
<?php if($R['comment']):?><span class="comment">[<?php echo $R['comment']?><?php if($R['oneline']):?>+<?php echo $R['oneline']?><?php endif?>]</span><?php endif?>
|
||||
<?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']?>','comment');">
|
||||
<?php echo $R[$_HS['nametype']]?>
|
||||
</a>
|
||||
</td>
|
||||
<?php else:?>
|
||||
<td><?php echo $R[$_HS['nametype']]?></td>
|
||||
<?php endif?>
|
||||
<td><?php echo $R['likes']?></td>
|
||||
<td><?php echo $R['dislikes']?></td>
|
||||
<td><?php echo $R['report']?></td>
|
||||
<td><time class="small text-muted"><?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?></time></td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="card-footer d-flex justify-content-between">
|
||||
|
||||
<div>
|
||||
<button type="button" onclick="chkFlag('comment_members[]');checkboxCheck();" class="btn btn-light btn-sm">선택/해제 </button>
|
||||
<button type="button" onclick="actCheck('comment_multi_delete');" class="btn btn-light btn-sm rb-action-btn" disabled>삭제</button>
|
||||
</div>
|
||||
|
||||
<ul class="pagination mb-0">
|
||||
<script>getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
</ul>
|
||||
|
||||
</div><!-- ./card-footer -->
|
||||
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
|
||||
<?php include $g['path_module'].'member/admin/_modal.php';?>
|
||||
|
||||
<!-- 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')?>
|
||||
<style type="text/css">
|
||||
.datepicker {z-index: 1151 !important;}
|
||||
</style>
|
||||
<script>
|
||||
|
||||
putCookieAlert('comment_post_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('comment_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('comment_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 == 'comment_multi_delete')
|
||||
{
|
||||
if(confirm('정말로 삭제하시겠습니까? '))
|
||||
{
|
||||
getIframeForAction(f);
|
||||
f.a.value = act;
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
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>
|
||||
332
modules/comment/admin/makebbs.css
Normal file
332
modules/comment/admin/makebbs.css
Normal file
@@ -0,0 +1,332 @@
|
||||
#rb-body .tab-content .form-group.tab-content {
|
||||
border: 0;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
#rb-body .tab-content .form-group {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.help-text {
|
||||
margin-top: 5px
|
||||
}
|
||||
|
||||
.dataTables_wrapper a{
|
||||
color: #666
|
||||
}
|
||||
|
||||
.form-horizontal .tab-content {
|
||||
border: 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0
|
||||
}
|
||||
|
||||
#rb-body .row,
|
||||
#rb-body .xrow {
|
||||
margin-right: -5px;
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
.rb-advance {
|
||||
border-top: 1px solid #EFEFEF;
|
||||
padding-top: 5px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px
|
||||
}
|
||||
|
||||
.rb-advance .btn span:before {
|
||||
content: "숨기기"
|
||||
}
|
||||
|
||||
.rb-advance .btn.collapsed span:before {
|
||||
content: "표시"
|
||||
}
|
||||
|
||||
.input-group-addon:first-child,
|
||||
.input-group-btn:last-child>.btn,
|
||||
.input-group-addon:last-child {
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
margin-top: 10px;
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.rb-guide {
|
||||
margin: 5px 0 0 0;
|
||||
padding: 15px;
|
||||
color: #777;
|
||||
border-top: 1px solid #eee;
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.form-horizontal .has-feedback.rb-outside .form-control-feedback {
|
||||
left: -925px;
|
||||
}
|
||||
|
||||
#page-settings {
|
||||
padding-top: 15px;
|
||||
margin-top: 40px;
|
||||
border-top: 1px solid #EFEFEF
|
||||
}
|
||||
|
||||
#page-settings .panel-default {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#page-settings .panel-default>.panel-heading {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#page-settings .panel-default .panel-title>a {
|
||||
color: #428bca;
|
||||
}
|
||||
|
||||
|
||||
/*panel-form*/
|
||||
|
||||
.rb-panelform {
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.rb-panelform .panel-body {
|
||||
padding: 0
|
||||
}
|
||||
|
||||
.rb-panelform .form-control {
|
||||
border-radius: 0
|
||||
}
|
||||
|
||||
|
||||
/*김성호추가*/
|
||||
.table {
|
||||
|
||||
}
|
||||
.table thead {
|
||||
border: 0;
|
||||
}
|
||||
.table thead td {
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
}
|
||||
.table tbody td a {
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
}
|
||||
.table tbody tr:hover {
|
||||
background: #efefef;
|
||||
cursor: pointer;
|
||||
}
|
||||
.table tbody td small {
|
||||
color: #999;
|
||||
font-size: 11px;
|
||||
}
|
||||
.rb-keyword-search input {
|
||||
border-top: #dfdfdf solid 1px;
|
||||
border-bottom: #dfdfdf solid 1px;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
}
|
||||
.rb-pagename span {
|
||||
padding-left: 34px;
|
||||
}
|
||||
.rb-time {
|
||||
width: 100px;
|
||||
font-size:13px;
|
||||
text-align:center;
|
||||
color:#999;
|
||||
}
|
||||
.table .active1 td {
|
||||
background-color: #428BCA;
|
||||
}
|
||||
.table .active1 td a,
|
||||
.table .active1 td small,
|
||||
.table .active1 .rb-time {
|
||||
color: #fff;
|
||||
}
|
||||
.rb-search-box {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.rb-search-box .input-group {
|
||||
width: 190px;
|
||||
}
|
||||
.rb-panel-footer {
|
||||
text-align: center;
|
||||
}
|
||||
.rb-panel-footer .pagination {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.form-horizontal .has-feedback.rb-outside .form-control-feedback {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
right: -25px;
|
||||
left: auto
|
||||
}
|
||||
|
||||
#page-settings .panel-body {
|
||||
padding-left:0;
|
||||
padding-right:0;
|
||||
}
|
||||
}
|
||||
|
||||
.rb-top-btnbox {
|
||||
position: relative;
|
||||
top:-10px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#rb-body .row,
|
||||
#rb-body .xrow {
|
||||
margin-right: -16px;
|
||||
margin-left: -16px;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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: inline-block;
|
||||
width:90%;
|
||||
margin: 5px 0;
|
||||
padding: 5px 10px;
|
||||
text-decoration: none;
|
||||
border: 1px solid #f1f1f1;
|
||||
|
||||
-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;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
.nopadding{padding:0 !important; }
|
||||
|
||||
/*고급설정 */
|
||||
#bbs-settings {
|
||||
border-top: 1px solid #efefef;
|
||||
margin-top: 40px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
#bbs-settings .panel-default {
|
||||
border: medium none;
|
||||
box-shadow: none;
|
||||
}
|
||||
#bbs-settings .panel-default > .panel-heading {
|
||||
background-color: transparent;
|
||||
border: medium none;
|
||||
}
|
||||
#bbs-settings .panel-default .panel-title > a {
|
||||
color: #428bca;
|
||||
}
|
||||
|
||||
.rb-form .checkbox-inline input, .rb-form .radio input, .rb-form .radio-inline input {
|
||||
left:0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.rb-label {
|
||||
cursor: pointer;
|
||||
font-weight: normal;
|
||||
margin-right: 15px;
|
||||
}
|
||||
434
modules/comment/admin/makebbs.php
Normal file
434
modules/comment/admin/makebbs.php
Normal file
@@ -0,0 +1,434 @@
|
||||
<?php
|
||||
$sort = $sort ? $sort : 'gid';
|
||||
$orderby= $orderby ? $orderby : 'asc';
|
||||
$recnum = $recnum && $recnum < 301 ? $recnum : 20;
|
||||
$bbsque ='uid>0';
|
||||
// 키원드 검색 추가
|
||||
if ($keyw)
|
||||
{
|
||||
$bbsque .= " and (id like '%".$keyw."%' or name like '%".$keyw."%')";
|
||||
}
|
||||
$RCD = getDbArray($table[$module.'list'],$bbsque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table[$module.'list'],$bbsque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
if ($uid)
|
||||
{
|
||||
$R = getUidData($table[$module.'list'],$uid);
|
||||
if ($R['uid'])
|
||||
{
|
||||
include_once $g['path_module'].$module.'/var/var.'.$R['id'].'.php';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-lg-3">
|
||||
<div class="panel panel-default"> <!-- 메뉴 리스트 패털 시작 -->
|
||||
|
||||
<!-- 메뉴 패널 헤더 : 아이콘 & 제목 -->
|
||||
<div class="panel-heading rb-icon">
|
||||
<div class="icon">
|
||||
<i class="fa fa-file-text-o fa-2x"></i>
|
||||
</div>
|
||||
<h4 class="panel-title">
|
||||
채팅방 리스트
|
||||
<span class="pull-right">
|
||||
<button type="button" class="btn btn-default btn-xs<?php if(!$_SESSION['sh_site_bbs_search']):?> collapsed<?php endif?>" data-toggle="collapse" data-target="#panel-search" data-tooltip="tooltip" title="검색필터" onclick="sessionSetting('sh_site_bbs_search','1','','1');getSearchFocus();"><i class="glyphicon glyphicon-search"></i></button>
|
||||
</span>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="panel-search" class="collapse<?php if($_SESSION['sh_site_bbs_search']):?> in<?php endif?>">
|
||||
<form role="form" 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="panel-heading rb-search-box">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><small>출력수</small></div>
|
||||
<div class="input-group-btn">
|
||||
<select class="form-control" name="recnum" onchange="this.form.submit();">
|
||||
<option value="15"<?php if($recnum==15):?> selected<?php endif?>>15</option>
|
||||
<option value="30"<?php if($recnum==30):?> selected<?php endif?>>30</option>
|
||||
<option value="60"<?php if($recnum==60):?> selected<?php endif?>>60</option>
|
||||
<option value="100"<?php if($recnum==100):?> selected<?php endif?>>100</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rb-keyword-search input-group input-group-sm">
|
||||
<input type="text" name="keyw" class="form-control" value="<?php echo $keyw?>" placeholder="아이디 or 이름">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="submit">검색</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="panel-body" style="border-top:1px solid #DEDEDE;">
|
||||
<?php if($NUM):?>
|
||||
<form name="bbsform" role="form" action="<?php echo $g['s']?>/" method="post" target="_orderframe_">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>" />
|
||||
<input type="hidden" name="m" value="<?php echo $module?>" />
|
||||
<input type="hidden" name="a" value="bbsorder_update" />
|
||||
<div class="dd" id="nestable-menu">
|
||||
<ul class="dd-list list-unstyled">
|
||||
<?php $_i=1;while($BR = db_fetch_array($RCD)):?>
|
||||
<li class="dd-item" data-id="<?php echo $_i?>">
|
||||
<input type="checkbox" name="bbsmembers[]" value="<?php echo $BR['uid']?>" checked class="hidden"/>
|
||||
<span class="dd-handle <?php if($BR['uid']==$R['uid']):?>alert alert-info<?php endif?>" ><i class="fa fa-arrows fa-fw"></i>
|
||||
<?php echo $BR['name']?>(<?php echo $BR['id']?>)
|
||||
</span>
|
||||
<span title="<?php echo number_format($BR['num_r'])?>개" data-tootip="tooltip">
|
||||
<a href="<?php echo $g['adm_href']?>&recnum=<?php echo $recnum?>&p=<?php echo $p?>&uid=<?php echo $BR['uid']?>" data-tooltip="tooltip" title="수정하기">
|
||||
<i class="glyphicon glyphicon-edit"></i>
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
<?php $_i++;endwhile?>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
<!-- nestable : https://github.com/dbushell/Nestable -->
|
||||
<?php getImport('nestable','jquery.nestable',false,'js') ?>
|
||||
<script>
|
||||
$('#nestable-menu').nestable();
|
||||
$('.dd').on('change', function() {
|
||||
var f = document.bbsform;
|
||||
getIframeForAction(f);
|
||||
f.submit();
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php else:?>
|
||||
<div class="none">등록된 채팅방이 없습니다.</div>
|
||||
<?php endif?>
|
||||
|
||||
</div>
|
||||
<div class="panel-footer rb-panel-footer">
|
||||
<ul class="pagination">
|
||||
<script>getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
<?php //echo getPageLink(5,$p,$TPG,'')?>
|
||||
</ul>
|
||||
</div>
|
||||
</div> <!-- 좌측 패널 끝 -->
|
||||
</div><!-- 좌측 내용 끝 -->
|
||||
<!-- 우측 내용 시작 -->
|
||||
<div id="tab-content-view" class="col-md-8 col-lg-9">
|
||||
<form name="procForm" class="form-horizontal rb-form" role="form" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data" 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="makebbs" />
|
||||
<input type="hidden" name="bid" value="<?php echo $R['id']?>" />
|
||||
<input type="hidden" name="perm_g_list" value="<?php echo $R['perm_g_list']?>" />
|
||||
<input type="hidden" name="perm_g_view" value="<?php echo $R['perm_g_view']?>" />
|
||||
<input type="hidden" name="perm_g_write" value="<?php echo $R['perm_g_write']?>" />
|
||||
<input type="hidden" name="perm_g_down" value="<?php echo $R['perm_g_down']?>" />
|
||||
|
||||
<div class="page-header">
|
||||
<h4>
|
||||
<?php if($R['uid']):?>
|
||||
채팅방 등록정보
|
||||
<div class="pull-right rb-top-btnbox hidden-xs">
|
||||
<a href="<?php echo $g['adm_href']?>" class="btn btn-default"><i class="fa fa-plus"></i> 새채팅방 만들기</a>
|
||||
</div>
|
||||
<?php else:?>
|
||||
새채팅방 만들기
|
||||
<?php endif?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">채팅방 이름</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<input class="form-control" placeholder="" type="text" name="name" value="<?php echo $R['name']?>"<?php if(!$R['uid'] && !$g['device']):?> autofocus<?php endif?>>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default rb-help-btn" type="button" data-toggle="collapse" data-target="#bbs_name-guide" data-tooltip="tooltip" title="도움말"><i class="fa fa-question-circle fa-lg"></i></button>
|
||||
</span>
|
||||
<?php if($R['uid']):?>
|
||||
<span class="input-group-btn">
|
||||
<a href="<?php echo RW('m='.$module.'&bid='.$R['id'])?>" target="_blank" class="btn btn-default" data-tooltip="tooltip" title="채팅방 보기">
|
||||
<i class="fa fa-link fa-lg"></i>
|
||||
</a>
|
||||
</span>
|
||||
<?php endif?>
|
||||
</div>
|
||||
<p class="help-block collapse alert alert-warning" id="bbs_name-guide">
|
||||
<small> 채팅방제목에 해당되며 한글,영문등 자유롭게 등록할 수 있습니다.</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">채팅방 아이디</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<input class="form-control" placeholder="" type="text" name="id" value="<?php echo $R['id']?>" <?php if($R['uid']):?>disabled<?php endif?>>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default rb-help-btn" type="button" data-toggle="collapse" data-target="#bbs_id-guide" data-tooltip="tooltip" title="도움말"><i class="fa fa-question-circle fa-lg"></i></button>
|
||||
</span>
|
||||
<?php if($R['uid']):?>
|
||||
<span class="input-group-btn">
|
||||
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $module?>&a=deletebbs&uid=<?php echo $R['uid']?>" onclick="return hrefCheck(this,true,'삭제하시면 모든 게시물이 지워지며 복구할 수 없습니다.\n정말로 삭제하시겠습니까?');" class="btn btn-default" data-tooltip="tooltip" title="삭제하기">
|
||||
<i class="fa fa-trash-o fa-lg"></i>
|
||||
</a>
|
||||
</span>
|
||||
<?php endif?>
|
||||
</div>
|
||||
<p class="help-block collapse alert alert-warning" id="bbs_id-guide">
|
||||
<small> 영문 대소문자+숫자+_ 조합으로 만듭니다.</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">방장 아이디</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<input class="form-control" placeholder="방장 아이디를 입력해주세요." type="text" name="owner_id" value="<?php echo $R['owner_id']?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default rb-help-btn" type="button" data-toggle="collapse" data-target="#owner-guide" data-tooltip="tooltip" title="도움말"><i class="fa fa-question-circle fa-lg"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<p class="help-block collapse alert alert-warning" id="owner-guide">
|
||||
<small>
|
||||
방장에게는 채팅방 설정/관리 권한이 주어집니다.<br />
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">채팅방 형식</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline" data-role="radio-ctype" data-type="1">
|
||||
<input type="radio" name="type" value="1"<?php if(!$R['type']||$R['type']==1):?> checked="checked"<?php endif?> /> 일반 채팅방
|
||||
</label>
|
||||
<label class="radio-inline" data-role="radio-ctype" data-type="2">
|
||||
<input type="radio" name="type" value="2"<?php if($R['type']==2):?> checked="checked"<?php endif?> /> 그룹 채팅방
|
||||
</label>
|
||||
<p class="help-block">
|
||||
<small>
|
||||
그룹 채팅방의 경우 권한설정과 상관 없이 지정된 멤버들에게만 열람/참여가 허용됩니다.<br />
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" data-role="members-wrapper" <?php if(!$R['type']||$R['type']==1):?>style="display:none;"<?php endif?>>
|
||||
<label class="col-sm-2 control-label">단톡멤버 아이디</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<input class="form-control" placeholder="" type="text" name="members" value="<?php echo $R['members']?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default rb-help-btn" type="button" data-toggle="collapse" data-target="#team_id-guide" data-tooltip="tooltip" title="도움말"><i class="fa fa-question-circle fa-lg"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<p class="help-block collapse alert alert-warning" id="team_id-guide">
|
||||
<small>
|
||||
단톡멤버 아이디를 콤마(,)로 구분해서 팀원을 등록해 주세요.<br />
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">오픈 시간</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group input-group-sm" style="width:100%;">
|
||||
<input type="text" name="t_start" value="<?php echo $R['t_start']?>" class="form-control tpicker" placeholder="시작 시간">
|
||||
<span class="input-group-addon">~</span>
|
||||
<input type="text" name="t_end" value="<?php echo $R['t_end']?>" class="form-control tpicker" placeholder="종료 시간">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">레이아웃</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="layout" class="form-control">
|
||||
<option value=""> + 사이트 대표레이아웃</option>
|
||||
<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)?>
|
||||
<option value="">--------------------------------</option>
|
||||
<?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['bbs']['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">
|
||||
<label class="col-sm-2 control-label">채팅방 테마 </label>
|
||||
<div class="col-sm-10">
|
||||
<select name="skin" class="form-control">
|
||||
<option value=""> + 채팅방 대표테마</option>
|
||||
<option value="">--------------------------------</option>
|
||||
<?php $tdir = $g['path_module'].$module.'/theme/_pc/'?>
|
||||
<?php $dirs = opendir($tdir)?>
|
||||
<?php while(false !== ($skin = readdir($dirs))):?>
|
||||
<?php if($skin=='.' || $skin == '..' || is_file($tdir.$skin))continue?>
|
||||
<option value="_pc/<?php echo $skin?>" title="<?php echo $skin?>"<?php if($d['bbs']['skin']=='_pc/'.$skin):?> selected="selected"<?php endif?>>ㆍ<?php echo getFolderName($tdir.$skin)?>(<?php echo $skin?>)</option>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</select>
|
||||
</div> <!-- .col-sm-10 -->
|
||||
</div> <!-- .form-group -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label text-muted">(모바일 접속)</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="m_skin" class="form-control">
|
||||
<option value=""> + 채팅방 모바일 대표테마</option>
|
||||
<option value="">--------------------------------</option>
|
||||
<?php $tdir = $g['path_module'].$module.'/theme/_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['bbs']['m_skin']=='_mobile/'.$skin):?> selected="selected"<?php endif?>>ㆍ<?php echo getFolderName($tdir.$skin)?>(<?php echo $skin?>)</option>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</select>
|
||||
</div> <!-- .col-sm-10 -->
|
||||
</div> <!-- .form-group -->
|
||||
|
||||
<!-- 추가설정 시작 : panel-group 으로 각각의 panel 을 묶는다.-->
|
||||
<div id="bbs-settings" class="panel-group" style="padding-left: 15px;">
|
||||
|
||||
<div id="bbs-settings-right" class="panel panel-default"><!--권한설정-->
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a onclick="boxDeco('right');" href="#bbs-settings-right-body" data-parent="#bbs-settings" data-toggle="collapse" class="collapsed">
|
||||
<i class="fa fa-caret-right fa-fw"></i>권한설정
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-collapse collapse" id="bbs-settings-right-body">
|
||||
<div class="panel-body">
|
||||
<!-- .form-group 나열 -->
|
||||
<?php include $g['path_module'].$module.'/admin/_right_fgroup.php';?>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<small class="text-muted">
|
||||
<i class="fa fa-info-circle fa-lg fa-fw"></i> 이상 권한설정 내용입니다.
|
||||
</small>
|
||||
</div>
|
||||
</div> <!-- .panel-body & .panel-footer : 숨겼다 보였다 하는 내용 -->
|
||||
</div> <!-- .panel 전체 -->
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-lg"><i class="fa fa-check fa-lg"></i> <?php echo $R['uid']?'채팅방속성 변경':'새채팅방 만들기'?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div> <!-- 우측내용 끝 -->
|
||||
</div> <!-- .row 전체 box -->
|
||||
<iframe name="_orderframe_" class="hide"></iframe>
|
||||
<?php getImport('bootstrap-timepicker','js/bootstrap-timepicker.min',false,'js')?>
|
||||
<?php getImport('bootstrap-timepicker','css/bootstrap-timepicker.min',false,'css')?>
|
||||
<script>
|
||||
$('.tpicker').timepicker({
|
||||
defaultTime : '',
|
||||
//showSeconds : true, // 초 노출
|
||||
showMeridian:true, // 24시 모드
|
||||
maxHours: 24,
|
||||
minuteStep : 15
|
||||
});
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
// 채팅방 타입 선택 이벤트
|
||||
$('[data-role="radio-ctype"]').on('click',function(){
|
||||
var members_wrapper = $('[data-role="members-wrapper"]');
|
||||
var type = $(this).data('type');
|
||||
if(type==1) $(members_wrapper).hide();
|
||||
else $(members_wrapper).show();
|
||||
});
|
||||
|
||||
// 추가설정 패널 디자인 조정
|
||||
function boxDeco(val)
|
||||
{
|
||||
var layer_arr=["add","right","hcode","fcode"]; // 레이어 배열
|
||||
var parent='bbs-settings-';
|
||||
var this_layer='bbs-settings-'+val;
|
||||
for(var i=0;i<layer_arr.length;i++)
|
||||
{
|
||||
if(layer_arr[i]!=val) $('#'+parent+layer_arr[i]).addClass("panel-default").removeClass("panel-primary");
|
||||
}
|
||||
$('#'+this_layer).addClass("panel-primary").removeClass("panel-default");
|
||||
}
|
||||
function saveCheck(f)
|
||||
{
|
||||
var l2 = f._perm_g_view;
|
||||
var n2 = l2.length;
|
||||
var l3 = f._perm_g_write;
|
||||
var n3 = l3.length;
|
||||
|
||||
var i;
|
||||
var s2 = '';
|
||||
var s3 = '';
|
||||
|
||||
for (i = 0; i < n2; i++)
|
||||
{
|
||||
if (l2[i].selected == true && l2[i].value != '')
|
||||
{
|
||||
s2 += '['+l2[i].value+']';
|
||||
}
|
||||
}
|
||||
for (i = 0; i < n3; i++)
|
||||
{
|
||||
if (l3[i].selected == true && l3[i].value != '')
|
||||
{
|
||||
s3 += '['+l3[i].value+']';
|
||||
}
|
||||
}
|
||||
|
||||
f.perm_g_view.value = s2;
|
||||
f.perm_g_write.value = s3;
|
||||
|
||||
if (f.name.value == '')
|
||||
{
|
||||
alert('채팅방이름을 입력해 주세요. ');
|
||||
f.name.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (f.bid.value == '')
|
||||
{
|
||||
if (f.id.value == '')
|
||||
{
|
||||
alert('채팅방아이디를 입력해 주세요. ');
|
||||
f.id.focus();
|
||||
return false;
|
||||
}
|
||||
if (!chkFnameValue(f.id.value))
|
||||
{
|
||||
alert('채팅방아이디는 영문 대소문자/숫자/_ 만 사용가능합니다. ');
|
||||
f.id.value = '';
|
||||
f.id.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (f.owner_id.value == '')
|
||||
{
|
||||
alert('방장아이디를 입력해 주세요. ');
|
||||
f.owner_id.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var type = $('input[name="type"]:checked').val();
|
||||
|
||||
if(type==2 && f.members.value==''){
|
||||
alert('단톡방 멤버를 입력해주세요. ');
|
||||
f.members.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
getIframeForAction(f);
|
||||
f.submit();
|
||||
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
150
modules/comment/admin/notidoc.php
Normal file
150
modules/comment/admin/notidoc.php
Normal file
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
function getMDname($id)
|
||||
{
|
||||
global $typeset;
|
||||
if ($typeset[$id]) return $typeset[$id];
|
||||
else return $id;
|
||||
}
|
||||
$typeset = array
|
||||
(
|
||||
'_regis_comment'=>'댓글 등록',
|
||||
'_regis_oneline'=>'한줄의견 등록'
|
||||
);
|
||||
$doc = $doc ? $doc : 'noti';
|
||||
$type = $type ? $type : '_regis_comment';
|
||||
?>
|
||||
|
||||
<div class="row no-gutters">
|
||||
<div class="col-sm-4 col-md-3 col-xl-3 d-none d-sm-block sidebar" id="tab-content-list">
|
||||
|
||||
<div class="card border-0">
|
||||
<div class="card-header">
|
||||
양식목록
|
||||
</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<?php $tdir = $g['path_module'].$module.'/var/noti/'?>
|
||||
<?php $dirs = opendir($tdir)?>
|
||||
<?php while(false !== ($skin = readdir($dirs))):?>
|
||||
<?php if($skin=='.' || $skin == '..')continue?>
|
||||
<?php $_type = str_replace('.php','',$skin)?>
|
||||
<a href="<?php echo $g['adm_href']?>&doc=noti&type=<?php echo $_type?>" class="list-group-item d-flex justify-content-between align-items-center list-group-item-action <?php if($_type==$type):?>active<?php endif?> doc-style pl-4">
|
||||
<?php echo getMDname($_type)?>
|
||||
<span class="badge badge-dark"><?php echo $_type?></span>
|
||||
</a>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</div>
|
||||
</div><!-- /.card -->
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-sm-8 col-md-9 ml-sm-auto col-xl-9" id="tab-content-view">
|
||||
|
||||
<form class="card 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="notidoc_regis">
|
||||
<input type="hidden" name="doc" value="<?php echo $doc?>">
|
||||
<input type="hidden" name="type" value="<?php echo $type?>">
|
||||
|
||||
<div class="card-header page-body-header">
|
||||
<i class="fa fa-bell-o fa-lg fa-fw"></i>
|
||||
<span><?php echo getMDname($type)?> <span class="badge badge-primary badge-pill">양식수정</span></span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="small text-muted">
|
||||
<ul class="pl-3">
|
||||
<li>내용에는 다음과 같은 치환문자를 사용할 수 있습니다.</li>
|
||||
<li>댓글등록회원 이름 : <code>{NAME}</code> / 댓글등록회원 닉네임 <code>{NICK}</code> / 게시판명 <code>{BBS}</code> / 댓글내용 <code>{SUBJECT}</code></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php include_once $g['path_module'].$module.'/var/noti/'.$type.'.php'; ?>
|
||||
<div class="card w-75">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-bell-o mr-1" aria-hidden="true"></i> 알림내용 편집
|
||||
</div>
|
||||
<div class="card-body" id="noti-msg">
|
||||
|
||||
<div class="media">
|
||||
<img class="mr-3" src="<?php echo $g['s'].'/files/avatar/0.svg' ?>" alt="회원 아바타" style="width: 100px">
|
||||
<div class="media-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="sr-only">타이틀</label>
|
||||
<input type="text" class="form-control" name="noti_title" value="<?php echo $d['comment']['noti_title'] ?>" placeholder="알림 제목을 입력해 주세요.">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="sr-only">메세지 입력</label>
|
||||
<textarea name="noti_body" class="form-control" placeholder="알림내용을 입력해 주세요." rows="5"><?php echo $d['comment']['noti_body'] ?></textarea>
|
||||
</div>
|
||||
<div class="form-group mb-0">
|
||||
<label>연결링크 버튼명</label>
|
||||
<input type="text" class="form-control" name="noti_button" value="<?php echo $d['comment']['noti_button'] ?>" placeholder="버튼명을 입력해 주세요.">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div><!-- /.card -->
|
||||
|
||||
</div><!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-outline-primary btn-block">수정</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.card-footer -->
|
||||
|
||||
</form><!-- /.card -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
function ToolCheck(compo) {
|
||||
frames.editFrame.showCompo();
|
||||
frames.editFrame.EditBox(compo);
|
||||
}
|
||||
|
||||
|
||||
function saveCheck(f) {
|
||||
|
||||
if (f.content.value == '')
|
||||
{
|
||||
$('.note-editable').focus();
|
||||
alert('내용을 입력해 주세요. ');
|
||||
return false;
|
||||
}
|
||||
if (f.newdoc.value != '')
|
||||
{
|
||||
if (!chkIdValue(f.newdoc.value))
|
||||
{
|
||||
alert('양식명은 영문소문자/숫자/_ 만 사용가능합니다. ');
|
||||
f.newdoc.value = '';
|
||||
f.newdoc.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
putCookieAlert('notidoc_result') // 실행결과 알림 메시지 출력
|
||||
|
||||
$('[data-toggle=tooltip]').tooltip();
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
384
modules/comment/admin/oneline.php
Normal file
384
modules/comment/admin/oneline.php
Normal file
@@ -0,0 +1,384 @@
|
||||
<?php
|
||||
//한줄의견링크
|
||||
function _getPostLink($arr)
|
||||
{
|
||||
global $table;
|
||||
$C = getUidData($table['s_comment'],$arr['parent']);
|
||||
$sync_arr=explode('|',$C['sync']);
|
||||
$B = getUidData($sync_arr[0],$sync_arr[2]);
|
||||
return RW('m='.$sync_arr[1].'&bid='.$B['bbsid'].'&uid='.$sync_arr[2].($GLOBALS['s']!=$arr['site']?'&s='.$arr['site']:''.'#OLN-'.$arr['uid']));
|
||||
}
|
||||
$SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1);
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'desc';
|
||||
$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($bid) $_WHERE .= ' and bbs='.$bid;
|
||||
if($category) $_WHERE .= " and category ='".$category."'";
|
||||
if($notice) $_WHERE .= ' and notice=1';
|
||||
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['s_oneline'],$_WHERE,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_oneline'],$_WHERE);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
?>
|
||||
|
||||
<div class="row no-gutters">
|
||||
|
||||
<div 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">
|
||||
<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['comment_oneline_collapse']!='filter'):?> collapsed<?php endif?>" data-toggle="collapse" href="#collapse-filter" role="button" aria-expanded="true" aria-controls="collapseOne" onclick="sessionSetting('comment_oneline_collapse','filter','','');">
|
||||
필터
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="collapse-filter" class="collapse<?php if($_SESSION['comment_oneline_collapse']=='filter'):?> show<?php endif?>" role="tabpanel" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="mb-2">
|
||||
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="notice" name="notice" value="Y"<?php if($notice=='Y'):?> checked<?php endif?> onclick="this.form.submit();">
|
||||
<label class="custom-control-label" for="notice">공지글</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="hidden" name="hidden" value="Y"<?php if($hidden=='Y'):?> checked<?php endif?> onclick="this.form.submit();">
|
||||
<label class="custom-control-label" for="hidden">비밀글</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<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['comment_oneline_collapse']!='sort'):?> collapsed<?php endif?>" data-toggle="collapse" href="#collapse-sort" role="button" aria-expanded="false" aria-controls="collapseTwo" onclick="sessionSetting('comment_oneline_collapse','sort','','');">
|
||||
정렬
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapse-sort" class="collapse<?php if($_SESSION['comment_oneline_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=='d_regis'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
|
||||
<input type="radio" value="d_regis" name="sort"<?php if($sort=='d_regis'):?> 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>
|
||||
</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['comment_oneline_collapse']!='search'):?> collapsed<?php endif?>" data-toggle="collapse" href="#collapse-search" role="button" aria-expanded="false" aria-controls="collapseThree" onclick="sessionSetting('comment_oneline_collapse','search','','');">
|
||||
검색
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapse-search" class="collapse<?php if($_SESSION['comment_oneline_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="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
|
||||
<option value="name"<?php if($where=='name'):?> selected="selected"<?php endif?>>이름</option>
|
||||
<option value="nic"<?php if($where=='nic'):?> selected="selected"<?php endif?>>닉네임</option>
|
||||
<option value="id"<?php if($where=='id'):?> selected="selected"<?php endif?>>아이디</option>
|
||||
<option value="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):?>
|
||||
<a href="<?php echo $g['adm_href']?>" class="btn btn-block btn-light<?php echo $keyw?' active':'' ?>">검색조건 초기화</a>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div><!-- /.sidebar -->
|
||||
<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">
|
||||
<small><?php echo number_format($NUM)?> 개</small>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $p?>/<?php echo $TPG?> 페이지</span>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped text-center mb-0 f13">
|
||||
<thead class="small text-muted">
|
||||
<tr>
|
||||
<th><label data-tooltip="tooltip" title="선택"><input type="checkbox" class="checkAll-post-user"></label></th>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>이름</th>
|
||||
<th>좋아요</th>
|
||||
<th>싫어요</th>
|
||||
<th>신고</th>
|
||||
<th>날짜</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<?php $R['mobile']=isMobileConnect($R['agent'])?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="oneline_members[]" value="<?php echo $R['uid']?>" class="rb-post-user" onclick="checkboxCheck();"/></td>
|
||||
<td>
|
||||
<?php echo $NUM-((($p-1)*$recnum)+$_rec++)?>
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<?php if($R['notice']):?><i class="fa fa-volume-up"></i><?php endif?>
|
||||
<?php if($R['mobile']):?><i class="fa fa-mobile f-lg"></i><?php endif?>
|
||||
<?php if($R['category']):?><strong>[<?php echo $R['category']?>]</strong><?php endif?>
|
||||
<a href="<?php echo _getPostLink($R)?>" target="_blank" class="muted-link">
|
||||
<?php echo getStrCut($R['content'],50,'..')?>
|
||||
</a>
|
||||
<?php if(strstr($R['content'],'.jpg')):?><i class="fa fa-picture-o"></i><?php endif?>
|
||||
<?php if($R['upload']):?><i class="glyphicon glyphicon-floppy-disk"></i><?php endif?>
|
||||
<?php if($R['hidden']):?><i class="fa fa-lock fa-lg"></i><?php endif?>
|
||||
<?php if($R['comment']):?><span class="comment">[<?php echo $R['comment']?><?php if($R['oneline']):?>+<?php echo $R['oneline']?><?php endif?>]</span><?php endif?>
|
||||
<?php if($R['trackback']):?><span class="trackback">[<?php echo $R['trackback']?>]</span><?php endif?>
|
||||
<?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']?>','oneline');">
|
||||
<?php echo $R[$_HS['nametype']]?>
|
||||
</a>
|
||||
</td>
|
||||
<?php else:?>
|
||||
<td><?php echo $R[$_HS['nametype']]?></td>
|
||||
<?php endif?>
|
||||
<td><?php echo $R['likes']?></td>
|
||||
<td><?php echo $R['dislikes']?></td>
|
||||
<td><?php echo $R['report']?></td>
|
||||
<td><time class="small text-muted"><?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?></time></td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="card-footer d-flex justify-content-between">
|
||||
|
||||
<div>
|
||||
<button type="button" onclick="chkFlag('oneline_members[]');checkboxCheck();" class="btn btn-light btn-sm">선택/해제 </button>
|
||||
<button type="button" onclick="actCheck('oneline_multi_delete');" class="btn btn-light btn-sm rb-action-btn" disabled>삭제</button>
|
||||
</div>
|
||||
|
||||
<ul class="pagination mb-0">
|
||||
<script>getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
</ul>
|
||||
|
||||
</div><!-- ./card-footer -->
|
||||
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
|
||||
<?php include $g['path_module'].'member/admin/_modal.php';?>
|
||||
|
||||
<!-- 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')?>
|
||||
<style type="text/css">
|
||||
.datepicker {z-index: 1151 !important;}
|
||||
</style>
|
||||
<script>
|
||||
putCookieAlert('comment_oneline_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('oneline_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('oneline_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 == 'oneline_multi_delete')
|
||||
{
|
||||
if(confirm('정말로 삭제하시겠습니까? '))
|
||||
{
|
||||
getIframeForAction(f);
|
||||
f.a.value = act;
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
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>
|
||||
117
modules/comment/admin/skin.css
Normal file
117
modules/comment/admin/skin.css
Normal file
@@ -0,0 +1,117 @@
|
||||
.table tbody tr:hover {
|
||||
background: none repeat scroll 0 0 #efefef;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
{
|
||||
padding: 15px 5px;
|
||||
}
|
||||
.rb-files {
|
||||
background: none repeat scroll 0 0 #eee;
|
||||
border-radius: 3px;
|
||||
margin-top: 20px;
|
||||
padding: 3px;
|
||||
}
|
||||
.rb-codeview {
|
||||
border: 1px solid #c9c9c9;
|
||||
border-radius: 3px;
|
||||
box-shadow: 1px 1px 0 0 rgba(222, 222, 222, 0.1) inset, 1px 1px 0 0 rgba(255, 255, 255, 1);
|
||||
}
|
||||
.rb-codeview-header, .rb-codeview-footer {
|
||||
color: #999;
|
||||
font: 12px "Helvetica Neue",Helvetica,arial,freesans,clean,sans-serif;
|
||||
overflow: hidden;
|
||||
text-shadow: 1px 1px rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
.rb-codeview-header .breadcrumb {
|
||||
background-color: transparent;
|
||||
line-height: 30px;
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.rb-codeview-header .btn {
|
||||
border-radius: 3px;
|
||||
line-height: 20px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.rb-codeview-header {
|
||||
background-color: #eaeaea;
|
||||
background-image: linear-gradient(#fafafa, #eaeaea);
|
||||
background-repeat: repeat-x;
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
padding: 5px 10px;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
.rb-codeview-body {
|
||||
font-family: Consolas,"Liberation Mono",Courier,monospace;
|
||||
}
|
||||
.rb-codeview-body textarea {
|
||||
background: none repeat scroll 0 0 #000000;
|
||||
border: medium none;
|
||||
border-radius: 0;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
line-height: 150%;
|
||||
overflow: auto;
|
||||
padding: 15px;
|
||||
}
|
||||
.rb-codeview-footer {
|
||||
background-color: #e8e8e8;
|
||||
background-image: linear-gradient(#fafafa, #e8e8e8);
|
||||
background-repeat: repeat-x;
|
||||
border-top: 1px solid #ddd;
|
||||
padding: 10px;
|
||||
}
|
||||
.rb-codeview-footer ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.rb-codeview-footer li:first-child, .rb-codeview-footer li:last-child {
|
||||
border-left: 0 none;
|
||||
box-shadow: 0 0 0 transparent inset;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rb-codeview-footer li {
|
||||
border-left: 1px solid #c1c1c1;
|
||||
box-shadow: 1px 0 0 #fff inset;
|
||||
color: #555555;
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
margin-left: 5px;
|
||||
padding-left: 9px;
|
||||
}
|
||||
.rb-submit {
|
||||
margin: 15px 0;
|
||||
}
|
||||
#rb-body.rb-device-connect .row .panel-default {
|
||||
margin-left: -14px;
|
||||
margin-right: -14px;
|
||||
}
|
||||
.rb-top-btnbox {
|
||||
position: relative;
|
||||
top: -10px;
|
||||
}
|
||||
.input-group {
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
.input-group .input-group-addon, .input-group .form-control {
|
||||
border: 0 none;
|
||||
}
|
||||
.input-group .input-group-addon {
|
||||
border-left: 1px solid #dfdfdf;
|
||||
border-right: 1px solid #dfdfdf;
|
||||
}
|
||||
.input-group .form-control {
|
||||
background: none repeat scroll 0 0 #fff;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.rb-nav-tabs {
|
||||
border: 10px solid #dfdfdf;
|
||||
}
|
||||
.rb-nav-tabs li {
|
||||
width: 33.333%;
|
||||
}
|
||||
.rb-nav-tabs li:last-child {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
191
modules/comment/admin/skin.php
Normal file
191
modules/comment/admin/skin.php
Normal file
@@ -0,0 +1,191 @@
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-lg-3"><!-- 좌측영역 시작 -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading rb-icon">
|
||||
<div class="icon"><i class="fa kf kf-layout fa-2x"></i> </div>
|
||||
<h4 class="panel-title">테마 리스트</h4>
|
||||
</div>
|
||||
<div class="panel-body" style="border-top:1px solid #DEDEDE;">
|
||||
<div>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<?php $i=0?>
|
||||
<?php $xdir = $g['path_module'].$module.'/theme/'?>
|
||||
<?php $tdir = $xdir.'_pc/'?>
|
||||
<?php $dirs = opendir($tdir)?>
|
||||
<?php while(false !== ($skin = readdir($dirs))):?>
|
||||
<?php if($skin=='.' || $skin == '..' || is_file($tdir.$skin))continue?>
|
||||
<?php $i++?>
|
||||
<tr>
|
||||
<td onclick="goHref('<?php echo $g['adm_href']?>&theme=_pc/<?php echo $skin?>');">
|
||||
<i class="fa fa-folder-o fa-lg"></i>
|
||||
<a href="#"><span class="<?php if($theme=='_pc/'.$skin):?>active<?php endif?>"><strong>[P]</strong><?php echo getFolderName($tdir.$skin)?></span></a><span class="id">(<?php echo $skin?>)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?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++?>
|
||||
<tr>
|
||||
<td onclick="goHref('<?php echo $g['adm_href']?>&theme=_mobile/<?php echo $skin?>');">
|
||||
<i class="fa fa-folder-o fa-lg"></i>
|
||||
<a href="#"><span class="<?php if($theme=='_mobile/'.$skin):?>active<?php endif?>"><strong>[M]</strong><?php echo getFolderName($tdir.$skin)?></span></a><span class="id">(<?php echo $skin?>)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php if(!$i):?>
|
||||
<div class="none">등록된 테마가 없습니다.</div>
|
||||
<?php endif?>
|
||||
</div> <!-- .panel-body -->
|
||||
</div> <!-- 좌측 패널 끝 -->
|
||||
</div> <!-- 좌측 영역 끝 -->
|
||||
<div class="col-md-8 col-lg-9">
|
||||
<div class="page-header">
|
||||
<h4>
|
||||
<?php if($theme):?>
|
||||
테마 세부설정 변수
|
||||
<div class="pull-right rb-top-btnbox hidden-xs">
|
||||
<a 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?>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<form name="procForm" action="<?php echo $g['s']?>/" method="post" target="_action_frame_<?php echo $m?>" onsubmit="return saveCheck(this);">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>" />
|
||||
<input type="hidden" name="m" value="<?php echo $module?>" />
|
||||
<input type="hidden" name="a" value="theme_config" />
|
||||
<input type="hidden" name="theme" value="<?php echo $theme?>" />
|
||||
|
||||
<?php if($theme):?>
|
||||
<div class="notice">
|
||||
<strong><?php echo getFolderName($xdir.$theme)?></strong> 테마가 선택되었습니다.<br />
|
||||
이 테마를 사용하는 모든 게시판에 아래의 설정값이 적용됩니다.
|
||||
</div>
|
||||
<div class="rb-files">
|
||||
<div class="rb-codeview">
|
||||
<div class="rb-codeview-header">
|
||||
<ol class="breadcrumb pull-left">
|
||||
<li>파일경로 :</li>
|
||||
<li>root</li>
|
||||
<li>modules</li>
|
||||
<li><?php echo $module?></li>
|
||||
<li>theme</li>
|
||||
<li><?php echo $theme?></li>
|
||||
<li>_var.php</li>
|
||||
</ol>
|
||||
<button type="button" class="btn btn-default btn-xs pull-right" data-tooltip="tooltip" title="전체화면" onclick="editFullSize('tab-edit-area',this);"><i class="fa fa-arrows-alt fa-lg"></i></button>
|
||||
</div>
|
||||
<div class="rb-codeview-body">
|
||||
<textarea name="theme_var" id="__code__" class="form-control" rows="35"><?php echo implode('',file($g['path_module'].$module.'/theme/'.$theme.'/_var.php'))?></textarea>
|
||||
</div>
|
||||
<div class="input-group hidden-xs">
|
||||
<span class="input-group-addon"><small>Theme Name</small></span>
|
||||
<input type="text" name="name" value="<?php echo getFolderName($g['path_module'].$module.'/theme/'.$theme)?>" class="form-control">
|
||||
|
||||
<span class="input-group-addon"><small>Theme Folder</small></span>
|
||||
<input type="text" name="newLayout" value="<?php echo $theme?>" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="rb-codeview-footer">
|
||||
<ul class="list-inline">
|
||||
<li><code><?php echo count(file($g['path_module'].$module.'/theme/'.$theme.'/_var.php')).' lines'?></code></li>
|
||||
<li><code><?php echo getSizeFormat(@filesize($g['path_module'].$module.'/theme/'.$theme.'/_var.php'),2).' Byte'?></code></li>
|
||||
<li class="pull-right">파일을 편집한 후 저장 버튼을 클릭하면 실시간으로 사용자 페이지에 적용됩니다.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div> <!--.rb-codeview -->
|
||||
</div> <!--.rb-files -->
|
||||
<div class="rb-submit">
|
||||
<button type="submit" class="btn btn-primary<?php if($g['device']):?> btn-block<?php endif?>">저장하기</button>
|
||||
</div>
|
||||
|
||||
<?php else:?>
|
||||
|
||||
<div class="help-block">
|
||||
테마가 선택되지 않았습니다. 테마를 선택해 주세요.<br />
|
||||
테마설정은 해당 테마를 사용하는 모든 게시판에 적용됩니다.
|
||||
</div>
|
||||
<div class="help-block">
|
||||
<ul class="list list-unstyled">
|
||||
<li>테마는 게시판의 외형을 변경할 수 있는 요소입니다.</li>
|
||||
<li>테마설정은 게시판의 외형만 제어하며 게시판의 내부시스템에는 영향을 주지 않습니다.</li>
|
||||
<li>테마의 속성을 변경하면 해당테마를 사용하는 모든 게시판에 적용됩니다.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php endif?>
|
||||
|
||||
</form>
|
||||
</div> <!-- 우측영역 끝 -->
|
||||
</div> <!--.row -->
|
||||
|
||||
<?php if($d['admin']['codeeidt']):?>
|
||||
<!-- codemirror -->
|
||||
<style>
|
||||
.CodeMirror {
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
font-family: Menlo,Monaco,Consolas,"Courier New",monospace !important;
|
||||
}
|
||||
</style>
|
||||
<?php getImport('codemirror','codemirror',false,'css')?>
|
||||
<?php getImport('codemirror','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/clike/clike',false,'js')?>
|
||||
<?php getImport('codemirror','mode/php/php',false,'js')?>
|
||||
<?php getImport('codemirror','mode/css/css',false,'js')?>
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(getId('__code__'), {
|
||||
mode: "<?php echo $codeset[$codeext]?$codeset[$codeext]:'application/x-httpd-php'?>",
|
||||
indentUnit: 4,
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
indentWithTabs: true,
|
||||
theme: '<?php echo $d['admin']['codeeidt']?>',
|
||||
extraKeys: {
|
||||
"F11": function(cm) {
|
||||
cm.setOption("fullScreen", !cm.getOption("fullScreen"));
|
||||
},
|
||||
"Esc": function(cm) {
|
||||
if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false);
|
||||
}
|
||||
}
|
||||
});
|
||||
editor.setSize('100%','550px');
|
||||
_isCodeEdit = true;
|
||||
function _codefullscreen()
|
||||
{
|
||||
editor.setOption('fullScreen', !editor.getOption('fullScreen'));
|
||||
}
|
||||
</script>
|
||||
<!-- @codemirror -->
|
||||
<?php endif?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function saveCheck(f)
|
||||
{
|
||||
return confirm('정말로 실행하시겠습니까? ');
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
235
modules/comment/admin/theme.php
Normal file
235
modules/comment/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>
|
||||
29
modules/comment/admin/var/var.joint.php
Normal file
29
modules/comment/admin/var/var.joint.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<div id="mjointbox">
|
||||
|
||||
<div class="title">
|
||||
이 모듈(댓글)을 연결하시겠습니까?
|
||||
</div>
|
||||
|
||||
<select id="comment_skin" class="form-control custom-select">
|
||||
<option value=""> + 댓글 대표테마</option>
|
||||
<option value="" disabled>--------------------------------</option>
|
||||
<?php $tdir = $g['path_module'].$smodule.'/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 echo getFolderName($tdir.$skin)?>(<?php echo $skin?>)</option>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</select>
|
||||
|
||||
<input type="checkbox" id="hidepost" value="1" /> 최근댓글 출력제외
|
||||
|
||||
<input type="button" value="연결" class="btn btn-light" onclick="dropJoint('<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $smodule?>'+(getId('comment_skin').value!=''?'&skin='+getId('comment_skin').value:'')+(getId('hidepost').checked==true?'&hidepost=1':'')+'&sync=Y');" />
|
||||
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
#mjointbox {}
|
||||
#mjointbox select {width:150px;padding:2px;}
|
||||
#mjointbox .title {border-bottom:#dfdfdf dashed 1px;padding:0 0 10px 0;margin:0 0 20px 0;}
|
||||
</style>
|
||||
7
modules/comment/admin/var/var.menu.php
Normal file
7
modules/comment/admin/var/var.menu.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$d['amenu']['config'] = '환경설정';
|
||||
$d['amenu']['main'] = '댓글';
|
||||
$d['amenu']['oneline'] = '한줄의견';
|
||||
$d['amenu']['notidoc'] = '알림양식';
|
||||
$d['amenu']['theme'] = '테마';
|
||||
?>
|
||||
Reference in New Issue
Block a user