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

View File

@@ -0,0 +1,475 @@
html,
#rb-body,
#content-main,
#rb-admin-page-content,
#rb-page-source {
min-height: 100%;
background-color: #fff;
}
#rb-page-source {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
padding-top: 53px;
background-color: #fafafa
}
#rb-page-source nav {
position: fixed;
left: 0;
right: 0;
height: 64px;
z-index: 99
}
.document-editor__toolbar {
position: fixed;
top: 117px;
right: 0;
left: 0;
}
.document-editor {
position: absolute;
top: 157px;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
-webkit-transition-property: left, right, top, bottom, width, margin;
transition-property: left, right, top, bottom, width, margin;
-webkit-transition-duration: .2s;
transition-duration: .2s;
font-family: 'NotoSans', 'Malgun Gothic', '맑은 고딕','Apple SD Gothic Neo', '돋움', dotum, sans-serif;
}
.document-editor .ck-content h2 {
font-weight: 600 !important
}
.document-editor .ck-content h3,
.document-editor .ck-content h4 {
font-weight: 400 !important
}
.document-editor .ck-content p {
font-family: 'NotoSans', 'Malgun Gothic', '맑은 고딕','Apple SD Gothic Neo', '돋움', dotum, sans-serif !important;
}
.rb-fixed-sidebar .document-editor {
right: 350px;
}
.rb-fixed-sidebar {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.rb-attach-sidebar {
position: fixed;
top: 118px;
bottom: 0;
right: -350px;
left: auto;
width: 350px;
overflow-x: hidden;
overflow-y: scroll;
box-shadow: -1px 0 3px rgba(0, 0, 0, 0.5);
-webkit-transition: 250ms cubic-bezier(0.1, .57, .1, 1);
transition: 250ms cubic-bezier(0.1, .57, .1, 1);
-webkit-transform: translate(0px, 0) translateZ(0px);
-ms-transform: translate(0px, 0) translateZ(0px);
transform: translate(0px, 0) translateZ(0px);
}
.rb-fixed-sidebar .rb-attach-sidebar {
right: 0;
}
.rb-docs .rb-attach-sidebar {
top: 157px;
}
.opener {
position: fixed;
right: 40px;
bottom: 15px;
}
.opener .btn {
width: 50px;
height: 50px;
border-radius: 50%
}
.rb-fixed-sidebar .opener {
display: none
}
#rb-page-source {
color: #333;
font-family: 'Apple SD Gothic Neo', Dotum, '돋움', sans-serif;
font-size: 14px;
line-height: 1.5;
}
#rb-page-source .nav-link {
padding: .5rem .7rem;
color: #444
}
#rb-page-source .dropdown-toggle::after {
display: inline-block;
content: "";
border: none
}
#rb-page-source .dropdown-menu {
margin-top: -3px;
border-radius: 0;
}
#rb-page-source .btn.btn-light {
background-color: #fff;
color: #343b43;
border: 1px solid #ddd;
}
#rb-page-source .btn.btn-light:hover {
background-color: #f4f4f4;
}
#rb-page-source .panel-body {
padding: 0;
}
#rb-page-source .btn-outline-primary {
color: #007bff;
background-color: transparent;
background-image: none;
border-color: #007bff;
}
#rb-page-source .panel-body textarea {
border: 0;
font-family: "Courier new", arial, dotum;
background: #000;
color: #fff;
}
#rb-page-source .CodeMirror .CodeMirror-scroll {
font-size: 12px;
font-weight: normal;
}
.timeline-comment .previewable-comment-form {
display: none;
}
.is-comment-editing .previewable-comment-form {
display: block;
}
.is-comment-editing .edit-comment-hide {
display: none;
}
.is-comment-editing .timeline-comment-header {
display: none;
}
#rb-page-source .media .card-header {
padding: .75rem 1.25rem;
margin-left: -.5rem;
margin-right: -.5rem;
margin-bottom: 0;
background-color: #f6f8fa;
border-bottom: 1px solid rgba(0, 0, 0, .125);
}
#rb-page-source .card-header-tabs {
border-bottom: 0;
}
#rb-page-source .nav-tabs .nav-item {
margin-bottom: -1px;
}
#rb-page-source .nav-tabs .nav-link {
padding: 14px 12px;
font-size: 14px;
line-height: 14px;
color: #586069;
cursor: pointer;
background-color: transparent;
border-top-left-radius: .25rem;
border-top-right-radius: .25rem;
}
#rb-page-source .nav-tabs .nav-link.active {
color: #495057;
background-color: #fff;
border-color: #ddd #ddd #fff;
}
#rb-page-source .nav-tabs .nav-link:not(.active) {
border-right: none
}
#rb-page-source .nav-tabs a:not(.active):hover,
#rb-page-source .nav-tabs a:not(.active):focus {
border-top-color: transparent;
border-left-color: transparent;
border-right-color: transparent;
border-bottom: 0
}
#rb-page-source .nav-tabs .nav-link.active:first-child {
border-left: 1px solid #ddd;
}
#rb-page-source .editor-toolbar {
position: absolute;
top: 3px;
right: 0;
border: 0
}
#rb-page-source .editor-preview {
background: #fff;
}
#rb-page-source .media .CodeMirror {
border-radius: 4px !important;
background-color: #fafbfc;
}
#rb-page-source .CodeMirror-scroll {
padding-bottom: 55px;
}
#rb-page-source .media .CodeMirror.CodeMirror-focused {
background-color: #fff;
border-color: #2188ff;
outline: none;
box-shadow: inset 0 1px 2px rgba(27, 31, 35, 0.075), 0 0 0 0.2em rgba(3, 102, 214, 0.3);
}
.preview .editor-toolbar {
display: none
}
.editor-toolbar.disabled-for-preview {
display: none
}
.preview .CodeMirror,
#rb-page-source .disabled-for-preview~.CodeMirror {
border: 0 !important
}
#rb-page-source .editor-preview.editor-preview-active:empty::before {
content: '미리 볼 내용이 없습니다.';
color: #999
}
#rb-page-source .disabled-for-preview~.editor-statusbar {
display: none
}
#rb-page-source .editor-statusbar {
display: none
}
#rb-page-source .attach-files {
position: absolute;
bottom: 10px;
z-index: 8;
left: 1px;
right: 1px;
border-top: 1px dashed #dfe2e5;
padding: 0 10px;
margin: 0;
font-size: 13px;
line-height: 28px;
color: #586069;
background-color: #fafbfc;
}
#rb-page-source .position-relative.preview {
margin-bottom: 10px;
border-bottom: 1px solid #e1e4e8;
}
#rb-page-source .preview .attach-files {
visibility: hidden;
}
#rb-page-source .CodeMirror-wrap:focus~.attach-files {
border-color: #2188ff;
}
#rb-page-source .card .list-group-flush .list-group-item:last-child {
border-bottom: none;
}
.is-comment-editing .CodeMirror,
.is-comment-editing .CodeMirror-scroll {
min-height: 100px !important;
max-height: 500px !important;
}
#rb-page-source .editor-preview.editor-preview-active:empty::before {
content: '미리 볼 내용이 없습니다.';
color: #999;
}
/* markdown-body */
#rb-page-source .markdown-body .form-control,
#rb-page-source .markdown-body,
#rb-page-source .markdown-body p {
color: #24292e;
!important;
}
#rb-page-source .markdown-body h1,
#rb-page-source .markdown-body h2,
#rb-page-source .markdown-body h3,
#rb-page-source .markdown-body h4 {
color: #333 !important
}
#rb-page-source .markdown-body a {
color: #6698e8 !important
}
#rb-page-source .markdown-body h1,
#rb-page-source .markdown-body h2 {
border-bottom: 1px solid #ddd !important;
}
#rb-page-widget {}
#rb-page-widget .posrel {
position: relative;
height: 700px;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: auto;
}
.rb-codeview {
border-top: 1px solid #dfdfdf;
}
.rb-codeview-header,
.rb-codeview-footer {
font: 12px "Helvetica Neue", Helvetica, arial, freesans, clean, sans-serif;
text-shadow: 1px 1px rgba(255, 255, 255, 0.8);
overflow: hidden;
color: #999;
}
.rb-codeview-header .breadcrumb {
background-color: transparent;
margin-bottom: 0;
padding: 0;
line-height: 30px
}
.rb-codeview-header .btn {
line-height: 20px;
margin-top: 4px;
border-radius: 3px
}
.rb-codeview-header {
border-bottom: 1px solid #ddd;
padding: 5px 10px;
text-shadow: 0 1px 0 #fff;
border-bottom: 1px solid #d8d8d8;
background-color: #eaeaea;
background-image: -moz-linear-gradient(#fafafa, #eaeaea);
background-image: -webkit-linear-gradient(#fafafa, #eaeaea);
background-image: linear-gradient(#fafafa, #eaeaea);
background-repeat: repeat-x;
}
.rb-codeview-body {
font-family: Consolas, "Liberation Mono", Courier, monospace;
}
.rb-codeview-body textarea {
overflow: auto;
border: none;
padding: 15px;
line-height: 150%;
background: #000000;
color: #ffffff;
font-size: 12px;
border-radius: 0
}
.rb-codeview-footer {
border-top: 1px solid #ddd;
padding: 10px;
background-color: #e8e8e8;
background-image: -webkit-linear-gradient(#fafafa, #e8e8e8);
background-image: linear-gradient(#fafafa, #e8e8e8);
background-repeat: repeat-x;
}
.rb-codeview-footer ul {
margin-bottom: 0
}
.rb-codeview-footer li:first-child,
.rb-codeview-footer li:last-child {
border-left: 0;
box-shadow: inset 0 0 0 transparent;
padding-left: 0;
margin-left: 0;
}
.rb-codeview-footer li {
display: inline-block;
color: #555555;
padding-left: 9px;
margin-left: 5px;
border-left: 1px solid #c1c1c1;
box-shadow: inset 1px 0 0 #fff;
font-size: 12px;
}
#tab-edit-area {
position: absolute;
top: 117px;
left: 0;
right: 350px;
bottom: 0;
overflow-y: auto;
overflow-x: hidden;
}
#tab-edit-area .card-header {
background-color: rgba(0, 0, 0, .7);
}
.editor-preview .mejs-player {
margin-bottom: 1rem
}
.CodeMirror-code {
font-size: 13px
}

View File

@@ -0,0 +1,560 @@
<?php
if ($_mtype == 'page')
{
$_HP = getUidData($table['s_page'],$uid);
$_filekind = $r.'-pages/'.$_HP['id'];
$_filetype= '페이지';
$_filesbj = $_HP['name'];
$_infopage = $g['s'].'/?r='. $r.'&amp;m='.$m.'&amp;module='.$module.'&amp;front='.$_mtype.'&amp;uid='.$uid.'&amp;cat='.urlencode($cat).'&amp;p='.$p.'&amp;recnum='.$recnum.'&amp;keyw='.urlencode($keyw);
}
if ($_mtype == 'menu')
{
$_HM = getUidData($table['s_menu'],$uid);
$_filekind = $r.'-menus/'.$_HM['id'];
$_filetype = '메뉴';
$_filesbj = $_HM['name'];
$_infopage = $g['s'].'/?r='. $r.'&amp;m='.$m.'&amp;module='.$module.'&amp;front='.$_mtype.'&amp;cat='.$uid.'&amp;code='.$code;
include $g['path_core'].'function/menu.func.php';
$ctarr = getMenuCodeToPath($table['s_menu'],$_HM['uid'],0);
$ctnum = count($ctarr);
$_HM['code'] = '';
for ($i = 0; $i < $ctnum; $i++) $_HM['code'] .= $ctarr[$i]['id'].($i < $ctnum-1 ? '/' : '');
}
$filekind_array = explode('/', $_filekind);
if($type == 'source'):
$_editArray = array(
'source' => array('','HTML (Basic)','.php'),
'mobile' => array('mobile','HTML (Mobile Only)','.mobile.php'),
'css' => array('css','CSS','.css'),
'js' => array('js','Javascript','.js'),
);
$source = is_file($g['path_page'].$_filekind.'.php') ? implode('',file($g['path_page'].$_filekind.'.php')) : '' ;
$mobile = is_file($g['path_page'].$_filekind.'.mobile.php') ? implode('',file($g['path_page'].$_filekind.'.mobile.php')) : '';
?>
<!-- timeago -->
<?php getImport('jquery-timeago','jquery.timeago',false,'js')?>
<?php getImport('jquery-timeago','locales/jquery.timeago.ko',false,'js')?>
<!-- 직접 꾸미기 -->
<div id="rb-page-source" class="<?php echo $wysiwyg=='Y'?'rb-docs':'' ?><?php if($_SESSION['editor_sidebar']=='right'):?> rb-fixed-sidebar<?php endif?>">
<nav class="d-flex align-items-center py-2 pl-4 pr-5 bg-white">
<a href="<?php echo $_infopage?>" class="text-center">
<i class="fa fa-file-text fa-2x" data-toggle="tooltip" title="등록정보"></i>
</a>
<div class="ml-1">
<h4 class="h5 mt-2 mb-0 ml-3">
<?php echo $_filesbj?> <span class="badge badge-primary"><?php echo $mobileOnly?'모바일 전용':'' ?></span>
</h4>
<div class="d-flex">
<ul class="nav ml-2">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle pb-1" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
파일
</a>
<div class="dropdown-menu">
<?php if ($wysiwyg=='Y'): ?>
<a class="dropdown-item" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=_edit&amp;_mtype=<?php echo $_mtype?>&amp;type=source&amp;uid=<?php echo $uid?>&amp;cat=<?php echo $cat?>&amp;code=<?php echo $code?>">소스코드 편집</a>
<?php else: ?>
<a class="dropdown-item" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=_edit&amp;_mtype=<?php echo $_mtype?>&amp;type=source&amp;wysiwyg=Y&amp;uid=<?php echo $uid?>&amp;cat=<?php echo $cat?>&amp;code=<?php echo $code?>">에디터 편집</a>
<?php endif; ?>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $module?>&amp;a=deletemenu&amp;cat=<?php echo $cat?>&amp;back=Y" onclick="return hrefCheck(this,true,'정말로 삭제하시겠습니까?');"><?php echo $_mtype=='menu'?'메뉴':'페이지' ?> 삭제</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle pb-1" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
삽입
</a>
<div class="dropdown-menu">
<?php if($wysiwyg=='Y'):?>
<a class="dropdown-item rb-modal-photoset" href="#." data-toggle="modal" data-target="#modal_window">포토셋</a>
<a class="dropdown-item rb-modal-videoset" href="#." data-toggle="modal" data-target="#modal_window">비디오셋</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item rb-modal-widgetcode" href="#." onclick="InserHTMLtoEditor('<hr>')">가로줄</a>
<a class="dropdown-item rb-modal-widgetedit" href="#." data-toggle="modal" data-target="#modal_window">위젯</a>
<?php else:?>
<a class="dropdown-item rb-modal-widgetcode" href="#." data-toggle="modal" data-target="#modal_window">위젯</a>
<?php endif?>
</div>
</li>
</ul>
<?php if ($_HM['d_last'] || $_HP['d_last']): ?>
<div class="navbar-text text-muted ml-3">
<time class="timeago" datetime="<?php echo getDateFormat($_HM['d_last'],'c')?>" data-role="d_last">
<?php echo getDateFormat(($_mtype == 'menu')?$_HM['d_last']:$_HP['d_last'],'Y.m.d')?>
</time>
에 마지막으로 수정했습니다.
</div>
<?php endif; ?>
</div>
</div>
<div class="d-none">
<?php if ($wysiwyg=='Y'): ?>
<?php if ($mobileOnly): ?>
<div class="p-3 mb-3 alert-danger" role="alert" style="z-index:900">
<i class="fa fa-mobile fa-3x fa-pull-left" aria-hidden="true"></i>
본 파일은 <strong>모바일 전용</strong> 파일으로 모바일 기기에서만 출력됩니다. 내용이 없으면 자동삭제 됩니다.
PHP 또는 Javascript 가 포함된 경우에는 <a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=_edit&amp;_mtype=<?php echo $_mtype?>&amp;type=source&amp;uid=<?php echo $uid?>&amp;cat=<?php echo $cat?>&amp;code=<?php echo $code?>" class="alert-link"><i class="fa fa-code" aria-hidden="true"></i> 소스코드 편집모드</a> 를 이용해 주세요.
</div>
<?php $_filekind= $_filekind.'.mobile'; ?>
<?php else: ?>
<div class="p-3 mb-3 alert-danger mx-3 d-none" role="alert" style="z-index:900">
<?php if (is_file($g['path_page'].$_filekind.'.mobile.php')): ?>
<i class="fa fa-desktop fa-3x fa-pull-left" aria-hidden="true"></i>
본 파일은 데스크탑에서만 출력됩니다.
<?php else: ?>
<i class="fa fa-desktop fa-3x fa-pull-left" aria-hidden="true"></i>
<i class="fa fa-mobile fa-3x fa-pull-left" aria-hidden="true"></i>
본 파일은 모든 기기에서 출력됩니다. 모바일 전용 컨텐츠를 구분하려면 <a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=_edit&amp;_mtype=<?php echo $_mtype?>&amp;type=source&amp;markdown=Y&amp;mobileOnly=Y&amp;uid=<?php echo $uid?>&amp;cat=<?php echo $cat?>&amp;code=<?php echo $code?>" class="alert-link">모바일 전용파일</a>을 생성해 주세요.<br>
<?php endif; ?>
PHP 또는 Javascript 가 포함된 경우에는 <a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=_edit&amp;_mtype=<?php echo $_mtype?>&amp;type=source&amp;uid=<?php echo $uid?>&amp;cat=<?php echo $cat?>&amp;code=<?php echo $code?>" class="alert-link"><i class="fa fa-code" aria-hidden="true"></i> 소스코드 편집모드</a> 를 이용해 주세요.
</div>
<?php endif; ?>
<div class="mx-3">
<ol class="breadcrumb bg-white text-dark mb-0">
<li class="breadcrumb-item"><i class="fa fa-folder text-muted fa-fw" aria-hidden="true"></i> root</li>
<li class="breadcrumb-item">pages</li>
<?php if($_mtype=='menu'):?>
<li class="breadcrumb-item">menu</li>
<?php endif?>
<li class="breadcrumb-item"><?php echo $filekind_array[0]?></li>
<li class="breadcrumb-item active"><?php echo $filekind_array[1]?>.php</li>
</ol>
<div class="pr-3">
</div>
</div>
<?php endif; ?>
</div>
<div class="ml-auto rb-top-btnbox">
<?php if ($_mtype == 'page'):$_viewpage=RW('mod='.$_HP['id'])?>
<!-- 페이지 -->
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=<?php echo $_mtype?>&amp;uid=<?php echo $uid?>&amp;cat=<?php echo urlencode($cat)?>&amp;p=<?php echo $p?>&amp;recnum=<?php echo $recnum?>&amp;keyw=<?php echo urlencode($keyw)?>" class="btn btn-light border-0">
페이지 등록정보
</a>
<a href="<?php echo $_viewpage?>" class="btn btn-light border-0" target="_blank" data-toggle="tooltip" title="미리보기(새창)">
<i class="fa fa-share fa-lg" aria-hidden="true"></i>
</a>
<button type="button" class="btn btn-primary js-submit">
<span class="not-loading">
저장하기
</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i></span>
</button>
<?php else:$_viewpage=RW('c='.$_HM['code'])?>
<!-- 메뉴 -->
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=<?php echo $_mtype?>&amp;cat=<?php echo $uid?>&amp;code=<?php echo $code?>" class="btn btn-light border-0">
등록정보
</a>
<a href="<?php echo $_viewpage?>" class="btn btn-light border-0" target="_blank" data-toggle="tooltip" title="미리보기(새창)">
<i class="fa fa-share fa-lg" aria-hidden="true"></i>
</a>
<button type="button" class="btn btn-primary js-submit">
<span class="not-loading">
저장하기
</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i></span>
</button>
<?php endif?>
</div>
</nav>
<form name="procForm" action="<?php echo $g['s']?>/" method="post" onsubmit="return sourcecheck(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="sourcewrite">
<input type="hidden" name="type" value="<?php echo $_mtype?>">
<?php if ($wysiwyg=='Y'): ?>
<textarea name="source" hidden><?php echo $source ?></textarea>
<textarea name="mobile" hidden><?php echo $mobile ?></textarea>
<?php endif; ?>
<?php if($_mtype=='menu'):?>
<input type="hidden" name="uid" value="<?php echo $_HM['uid']?>">
<input type="hidden" name="id" value="<?php echo $_HM['id']?>">
<input type="hidden" name="upload" id="upfilesValue" value="<?php echo $_HM['upload']?>">
<input type="hidden" name="featured_img" value="<?php echo $_HM['featured_img']?>">
<?php else:?>
<input type="hidden" name="uid" value="<?php echo $_HP['uid']?>">
<input type="hidden" name="id" value="<?php echo $_HP['id']?>">
<input type="hidden" name="upload" id="upfilesValue" value="<?php echo $_HP['upload']?>">
<input type="hidden" name="featured_img" value="<?php echo $_HP['featured_img']?>">
<?php endif?>
<input type="hidden" name="wysiwyg" value="<?php echo $wysiwyg?>">
<input type="hidden" name="editFilter" value="<?php echo $d['admin']['editor']?>">
<?php
if($wysiwyg=='Y'):
$__SRC__ = is_file($g['path_page'].$_filekind.'.php') ? implode('',file($g['path_page'].$_filekind.'.php')) : '';
include $g['path_plugin'].$d['admin']['editor'].'/import.system.php';
?>
<?php else:?>
<div id="tab-edit-area">
<div class="form-group mb-0">
<div class="panel-group" id="accordion">
<?php $_i=1;foreach($_editArray as $_key => $_val):?>
<div class="card mb-0 rounded-0">
<div class="card-header p-0 rounded-0">
<a class="d-block collapsed muted-link" data-toggle="collapse" href="#site-code-<?php echo $_key?>" onclick="sessionSetting('sh_sys_page_edit','<?php echo $_key?>','','');">
<?php echo $_val[1]?>
<?php if(is_file($g['path_page'].$_filekind.$_val[2])):?><i class="fa fa-check-circle" title="내용있음" data-tooltip="tooltip"></i><?php endif?>
</a>
</div>
<div id="site-code-<?php echo $_key?>" class="panel-collapse collapse<?php if(($_key==$_SESSION['sh_sys_page_edit']) || (!$_SESSION['sh_sys_page_edit']&&$_i==1)):?> show<?php endif?>" data-parent="#accordion" >
<div class="rb-codeview">
<div class="rb-codeview-header d-flex justify-content-between align-items-center">
<ol class="breadcrumb">
<li class="breadcrumb-item"><i class="fa fa-folder" aria-hidden="true"></i></li>
<li class="breadcrumb-item">root</li>
<li class="breadcrumb-item">pages</li>
<?php if($_mtype=='menu'):?>
<li class="breadcrumb-item">menu</li>
<?php endif?>
<li class="breadcrumb-item active"><?php echo str_replace('menu/','',$_filekind).$_val[2]?></li>
</ol>
</div>
<div class="rb-codeview-body">
<textarea name="<?php echo $_key?>" id="code_<?php echo $_key?>" class="form-control f13 d-none" rows="35"><?php if(is_file($g['path_page'].$_filekind.$_val[2])) echo htmlspecialchars(implode('',file($g['path_page'].$_filekind.$_val[2])))?></textarea>
</div>
<div class="rb-codeview-footer">
<ul class="list-inline">
<li><code><?php echo is_file($g['path_page'].$_filekind.$_val[2])?count(file($g['path_page'].$_filekind.$_val[2])):'0'?> lines</code></li>
<li><code><?php echo is_file($g['path_page'].$_filekind.$_val[2])?getSizeFormat(@filesize($g['path_page'].$_filekind.$_val[2]),2):'0B'?></code></li>
<li class="pull-right">파일을 편집한 후 저장 버튼을 클릭하면 실시간으로 사용자 페이지에 적용됩니다.</li>
</ul>
</div>
</div>
</div>
</div>
<?php $_i++;endforeach?>
</div>
</div>
</div>
<?php endif?>
<div class="rb-attach-sidebar bg-white">
<div class="sidebar-header d-flex justify-content-between align-items-center pt-1 px-2 position-absolute" style="top:1px;right:1px;">
<div class=""></div>
<button type="button" class="close js-closeSidebar btn" aria-label="Close" data-toggle="tooltip" title="첨부패널 닫기">
<span aria-hidden="true">&times;</span>
</button>
</div>
<ul class="nav nav-tabs nav-fill" role="tablist">
<li class="nav-item">
<a class="nav-link rounded-0 border-top-0 border-left-0<?php if(!$_COOKIE['editor_sidebar_tab']):?> active<?php endif?>" id="tab-file" data-toggle="tab" href="#pane-file" role="tab" aria-controls="file" aria-selected="true" onclick="setCookie('editor_sidebar_tab','',1);">
첨부파일
</a>
</li>
<li class="nav-item">
<a class="nav-link rounded-0 border-top-0 <?php if($_COOKIE['editor_sidebar_tab']=='link'):?> active<?php endif?>" id="tab-link" data-toggle="tab" href="#pane-link" role="tab" aria-controls="media" aria-selected="false" onclick="setCookie('editor_sidebar_tab','link',1);">
외부링크
</a>
</li>
<li class="nav-item">
<a class="nav-link rounded-0 border-top-0 border-right-0<?php if($_COOKIE['editor_sidebar_tab']=='toc'):?> active<?php endif?>" id="tab-toc" data-toggle="tab" href="#pane-toc" role="tab" aria-controls="media" aria-selected="false" onclick="setCookie('editor_sidebar_tab','toc',1);">
목차
</a>
</li>
</ul>
<div class="tab-content mt-3">
<div class="tab-pane px-2<?php if(!$_COOKIE['editor_sidebar_tab']):?> show active <?php endif?>" id="pane-file" role="tabpanel">
<?php getWidget('_default/attach',array('parent_module'=>'site','theme'=>'_desktop/bs4-system-attach','attach_handler_photo'=>'[data-role="attach-handler-photo"]','parent_data'=>($_mtype=='page'?$_HP:$_HM),'attach_object_type'=>'file','wysiwyg'=>$wysiwyg));?>
<p>
<small class="text-muted">
사진,파일,비디오,오디오를 한번에 최대 최대 <?php echo str_replace('M','',ini_get('upload_max_filesize'))?>MB 까지 업로드 할수 있습니다.<br>
</small>
</p>
</div>
<div class="tab-pane px-2<?php if($_COOKIE['editor_sidebar_tab']=='link'):?> show active <?php endif?>" id="pane-link" role="tabpanel">
<?php getWidget('_default/attach',array('parent_module'=>'site','theme'=>'_desktop/bs4-system-link','attach_handler_photo'=>'[data-role="attach-handler-photo"]','parent_data'=>($_mtype=='page'?$_HP:$_HM),'wysiwyg'=>1));?>
</div><!-- /.tab-pane -->
<div class="tab-pane px-4<?php if($_COOKIE['editor_sidebar_tab']=='toc'):?> show active <?php endif?>" id="pane-toc" role="tabpanel">
<?php if ($wysiwyg): ?>
<nav id="toc" class="ml-3"></nav>
<?php else: ?>
<div class="text-center py-5 text-muted">
에디터 편집 화면에서 표시됩니다.
</div>
<?php endif; ?>
</div><!-- /.tab-pane -->
</div><!-- /.tab-content -->
</div><!-- .rb-attach-sidebar -->
</form>
</div>
<?php if($wysiwyg!='Y' && $d['admin']['codeeidt']):?>
<!-- codemirror -->
<style>
.CodeMirror {
font-weight: normal;
font-family: Menlo,Monaco,Consolas,"Courier New",monospace !important;
}
</style>
<?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')?>
<script>
$(function () {
var editor_php1 = CodeMirror.fromTextArea(getId('code_source'), {
mode: "application/x-httpd-php",
indentUnit: 2,
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);
}
}
});
var editor_php2 = CodeMirror.fromTextArea(getId('code_mobile'), {
mode: "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);
}
}
});
var editor_css = CodeMirror.fromTextArea(getId('code_css'), {
mode: "text/css",
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);
}
}
});
var editor_js = CodeMirror.fromTextArea(getId('code_js'), {
mode: "text/javascript",
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_php1.setSize('100%','450px');
editor_php2.setSize('100%','450px');
editor_css.setSize('100%','450px');
editor_js.setSize('100%','450px');
$('#site-code-source').on('shown.bs.collapse', function () {
editor_php1.refresh();
})
$('#site-code-mobile').on('shown.bs.collapse', function () {
editor_php2.refresh();
})
$('#site-code-css').on('shown.bs.collapse', function () {
editor_css.refresh();
})
$('#site-code-js').on('shown.bs.collapse', function () {
editor_js.refresh();
})
<?php if ($mobileOnly=='Y'): ?>
$('#site-code-mobile').collapse('show')
<?php endif; ?>
})
_isCodeEdit = true;
function _codefullscreen()
{
if(_nowArea == 'source') editor_php1.setOption('fullScreen', !editor_php1.getOption('fullScreen'));
if(_nowArea == 'mobile') editor_php2.setOption('fullScreen', !editor_php2.getOption('fullScreen'));
if(_nowArea == 'css') editor_css.setOption('fullScreen', !editor_css.getOption('fullScreen'));
if(_nowArea == 'js') editor_js.setOption('fullScreen', !editor_js.getOption('fullScreen'));
}
</script>
<!-- @codemirror -->
<?php endif?>
<script>
_nowArea = '';
$(".timeago").timeago();
$(".js-openSidebar").click(function(){
$('#rb-page-source').addClass('rb-fixed-sidebar');
sessionSetting('editor_sidebar','right','','');
});
$(".js-closeSidebar").click(function(){
$('#rb-page-source').removeClass('rb-fixed-sidebar');
sessionSetting('editor_sidebar','','','');
$('[data-toggle="tooltip"]').tooltip('hide')
});
$(".js-submit").click(function() {
$(this).attr("disabled",true);
var f = document.procForm;
<?php if ($wysiwyg=='Y'): ?>
var editorData = editor.getData();
<?php if ($mobileOnly=='Y'): ?>
$('[name="mobile"]').val(editorData);
<?php else: ?>
$('[name="source"]').val(editorData);
<?php endif; ?>
<?php endif; ?>
// 첨부파일 uid 를 upfiles 값에 추가하기
var attachfiles=$('input[name="attachfiles[]"]').map(function(){return $(this).val()}).get();
var new_upfiles='';
if(attachfiles){
for(var i=0;i<attachfiles.length;i++) {
new_upfiles+=attachfiles[i];
}
$('input[name="upload"]').val(new_upfiles);
}
$("#toc").empty();
doToc();
setTimeout(function(){
getIframeForAction(f);
f.submit();
}, 500);
});
getId('rb-more-tab-<?php echo $_mtype=='page'?'3':'2'?>').className = 'active';
</script>
<?php endif?>
<script>
function doToc() {
Toc.init({
$nav: $("#toc"),
$scope: $(".document-editor__editable-container h2,.document-editor__editable-container h3,.document-editor__editable-container h4")
});
}
// smoothScroll : https://github.com/cferdinandi/smooth-scroll
var scroll_content = new SmoothScroll('[data-toggle="toc"] a[href*="#"]',{
ignore: '[data-scroll-ignore]'
});
$(document).ready(function() {
Toc.init({
$nav: $("#toc"),
$scope: $(".document-editor__editable-container h2, .document-editor__editable-container h3")
});
$('.document-editor__editable-container').scrollspy({
target: '#toc'
});
$('.rb-modal-widgetcode').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;system=popup.widget&amp;isWcode=Y')?>');
});
$('.rb-modal-widgetedit').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;system=popup.widget&amp;isWcode=Y&amp;isEdit=Y')?>');
});
$('.rb-modal-photoset').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=mediaset&amp;mdfile=modal.photo.media&amp;dropfield=editor')?>');
});
$('.rb-modal-videoset').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=mediaset&amp;mdfile=modal.video.media&amp;dropfield=editor')?>');
});
$('.rb-modal-widgetcall').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;system=popup.widget')?>&amp;dropfield=-1');
});
$('.rb-modal-widgetcall-modify').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;system=popup.widget')?>&amp;dropfield='+_Wdropfield+'&amp;option='+_Woption);
});
putCookieAlert('site_edit_result') // 실행결과 알림 메시지 출력
});
</script>

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

266
modules/site/admin/main.css Normal file
View File

@@ -0,0 +1,266 @@
@charset "utf-8";
.well {
min-height: 20px;
margin-bottom: 20px;
background-color: rgb(245, 245, 245);
box-shadow: rgba(0, 0, 0, 0.05) 0 1px 1px inset;
padding: 19px;
border-width: 1px;
border-style: solid;
border-color: rgb(227, 227, 227);
border-image: initial;
border-radius: 4px;
}
#rb-body .page-header {
margin: 30px 0 20px;
}
#rb-body .page-header:first-child {
margin-top: 20px;
}
/**
* Nestable
*/
.dd-list {
position: relative;
margin: 0;
padding: 0;
list-style: none;
}
.dd-item {
position: relative;
margin: 6px;
padding: 0;
min-height: 20px;
font-size: 13px;
line-height: 20px;
height: 70px
}
.dd-placeholder,
.dd-empty {
background: #f2fbff;
border: 1px dashed #b6bcbf;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.dd-placeholder {}
.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);
}
.dd.well {
padding-bottom: 5px;
background-color: #f5f5f5;
position: relative;
min-height: 110px;
max-height: 200px;
overflow: auto;
}
.dd.well .rb-help {
color: #999;
}
.dd.well .rb-help:hover {
color: #777;
}
.dd-list.list-inline {
display: inline;
}
.dd-list.list-inline>li {
display: inline-block;
padding-right: 0;
padding-left: 0;
}
.dd-item {
width: 75px;
height: 69px;
}
.dd-list .dd-item {
position: relative;
color: #333;
text-decoration: none;
border: 1px solid #D5D5D5;
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.05);
background: #ffffff;
background: -moz-linear-gradient(top, #ffffff 0%, #f5f5f5 100%);
background: -webkit-linear-gradient(top, #ffffff 0%, #f5f5f5 100%);
background: -o-linear-gradient(top, #ffffff 0%, #f5f5f5 100%);
background: -ms-linear-gradient(top, #ffffff 0%, #f5f5f5 100%);
background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);
-webkit-border-radius: 3px;
border-radius: 3px;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.dd-list .dd-item.rb-active {
background-color: #007bff;
background-image: none;
border-color: #3278b3;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
.dd-list .dd-item.rb-active a {
color: #fff;
}
.dd-placeholder {
display: block;
position: relative;
top: -16px;
left: 11px;
width: 73px;
margin-right: 12px;
background: transparent;
}
.dd-handle {
cursor: move;
height: 67px;
z-index: 9999999;
background-color: transparent;
}
.dd-item a {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
color: #777;
background-color: transparent;
}
.dd-list .rb-site-icon {
display: block;
position: absolute;
top: 5px;
left: 20px;
line-height: 42px;
font-size: 30px;
text-align: center;
}
.dd-list .rb-site-label {
font-weight: normal;
position: absolute;
display: block;
top: 45px;
font-size: 13px;
text-align: center;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
/*white-space: nowrap;/**/
overflow: hidden;
width: 73px;
height: 15px;
}
.rb-add {
display: block;
margin: 20px;
padding: 10px;
background-color: transparent;
border-radius: 4px;
box-sizing: border-box;
-moz-box-sizing: border-box;
text-align: center;
color: #ccc;
border: 1px dashed #D5D5D5;
}
.rb-add.active {
border: 1px solid #007bff;
background-color: #007bff;
color: #ffffff;
}
.rb-add i {
display: inline-block;
}
.dd-list a:hover,
.dd-list .rb-add a:hover {
color: #2ea8e5;
text-decoration: none;
}
.dd-persistent {
pointer-events: none;
}
.form-horizontal .has-feedback.rb-outside .form-control-feedback {
left: -925px;
}
.input-group-btn:last-child>.btn,
.input-group-addon:last-child {
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
}
#site-advance .form-group {
margin-bottom: 25px;
}
.rb-guide dt {
margin-bottom: 5px
}
/*고급설정 표시*/
.rb-advance .btn .rb-ca1:before {
content: "▲"
}
.rb-advance .btn.collapsed .rb-ca1:before {
content: "▼"
}
.rb-advance .btn .rb-ca2:before {
content: "▼"
}
.rb-advance .btn.collapsed .rb-ca2:before {
content: "▲"
}
.form-group .panel-heading a {
text-decoration: none;
display: block;
}
@media(min-width: 1200px) {
.form-horizontal .has-feedback.rb-outside .form-control-feedback {
width: 46px;
height: 46px;
line-height: 46px;
right: -25px;
left: auto
}
}

839
modules/site/admin/main.php Normal file
View File

@@ -0,0 +1,839 @@
<?php
$R=array();
if ($my['super'] && !$my['adm_site']) {
$SITES = getDbArray($table['s_site'],'','*','gid','asc',0,$p);
$SITEN = db_num_rows($SITES);
} else {
$SITES = getArrayString($my['adm_site']);
$SITEN = $SITES[count];
}
$PAGES1 = getDbArray($table['s_page'],'site='.$s.' and ismain=1','*','uid','asc',0,$p);
$PAGES2 = getDbArray($table['s_page'],'site='.$s.' and mobile=1','*','uid','asc',0,$p);
if ($type != 'makesite')
{
$R = $_HS;
$_SEO = getDbData($table['s_seo'],'rel=0 and parent='.$R['uid'],'*');
}
if ($R['uid'])
{
$DOMAINS = getDbArray($table['s_domain'],'site='.$R['uid'],'*','gid','asc',0,$p);
$DOMAINN = db_num_rows($DOMAINS);
}
?>
<div class="container-fluid">
<div class="row">
<div class="col-sm-4 col-lg-4 col-xl-4 d-none d-sm-block sidebar">
<form action="<?php echo $g['s']?>/" method="post">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="siteorder_update">
<div class="dd py-4 pl-3" id="site-icons" style="height: calc(100vh - 10.5rem);overflow: auto;">
<ol class="dd-list list-inline">
<?php if ($my['super'] && !$my['adm_site']): ?>
<?php while($S = db_fetch_array($SITES)):?>
<li class="dd-item<?php if($S['uid']==$R['uid']):?> rb-active<?php endif?> mb-0" data-id="_site_<?php echo $S['id']?>_">
<input type="checkbox" name="sitemembers[]" value="<?php echo $S['uid']?>" class="d-none" checked>
<a href="<?php echo $g['s']?>/?r=<?php echo $S['id']?>&amp;m=<?php echo $m?>&amp;pickmodule=<?php echo $module?>&amp;panel=Y" target="_parent"<?php if($type=='makesite'):?> class="active"<?php endif?>>
<span class="rb-site-icon <?php echo $S['icon']?$S['icon']:'fa fa-home'?>" id="_site_icon_<?php echo $S['id']?>"></span>
<span class="rb-site-label"><?php echo $S['label']?></span>
</a>
<div class="dd-handle"></div>
</li>
<?php endwhile?>
<?php else: ?>
<?php $_i=0;foreach($SITES['data'] as $val):?>
<?php $_SD = getUidData($table['s_site'],$val); ?>
<li class="dd-item<?php if($_SD['uid']==$R['uid']):?> rb-active<?php endif?> mb-0" data-id="_site_<?php echo $_SD['id']?>_">
<input type="checkbox" name="sitemembers[]" value="<?php echo $_SD['uid']?>" class="d-none" checked>
<a href="<?php echo $g['s']?>/?r=<?php echo $_SD['id']?>&amp;m=<?php echo $m?>&amp;pickmodule=<?php echo $module?>&amp;panel=Y" target="_parent"<?php if($type=='makesite'):?> class="active"<?php endif?>>
<span class="rb-site-icon <?php echo $_SD['icon']?$_SD['icon']:'fa fa-home'?>" id="_site_icon_<?php echo $_SD['id']?>"></span>
<span class="rb-site-label"><?php echo $_SD['label']?></span>
</a>
<div class="dd-handle"></div>
</li>
<?php $_i++;endforeach?>
<?php endif; ?>
</ol>
</div>
<?php if ($my['super']): ?>
<a href="<?php echo $g['adm_href']?>&amp;type=makesite&amp;nosite=<?php echo $nosite?>" class="rb-add<?php if($type=='makesite'):?> active<?php endif?>" data-tooltip="tooltip" title="사이트 추가"><i class="fa fa-plus fa-3x"></i></a>
<?php endif; ?>
</form>
</div><!-- /.sidebar -->
<div class="col-sm-8 ml-sm-auto col-lg-8 col-xl-8 pt-3">
<form name="procForm" class="rb-form" action="<?php echo $g['s']?>/" method="post" 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="regissite">
<input type="hidden" name="site_uid" value="<?php echo $R['uid']?>">
<input type="hidden" name="seouid" value="<?php echo $_SEO['uid']?>">
<input type="hidden" name="usescode" value="<?php echo !$R['gid']?0:1?>">
<input type="hidden" name="icon" value="<?php echo $R['icon']?$R['icon']:'fa fa-home'?>">
<input type="hidden" name="backgo" value="admin">
<input type="hidden" name="iconaction" value="">
<input type="hidden" name="nosite" value="<?php echo $nosite?>">
<input type="hidden" name="layout" value="">
<input type="hidden" name="m_layout" value="">
<div class="page-header d-flex justify-content-between align-self-center mt-0" id="home-site-info">
<h4 class="h5 mb-0">
기본 정보
</h4>
<div class="custom-control custom-checkbox" data-toggle="collapse" data-target="#site-info">
<input type="checkbox" class="custom-control-input" id="customCheck1">
<label class="custom-control-label" for="customCheck1">사이트 코드</label>
</div>
</div>
<div class="form-group row rb-outside">
<label class="col-lg-2 col-form-label col-form-label-lg text-lg-right">라벨</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group input-group-lg">
<input type="text" name="label" value="<?php echo $R['label']?>" class="form-control"<?php if(!$R['uid'] && !$g['device']):?> autofocus<?php endif?> autocomplete="off" required>
<span class="input-group-append">
<button class="btn btn-light rb-modal-iconset" type="button" data-toggle="modal" data-target="#modal_window" data-tooltip="tooltip" title="라벨 아이콘"><i id="_label_icon_btn_" class="fa fa-globe fa-lg"></i></button>
<?php if($R['uid']):?>
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $module?>&amp;a=deletesite&amp;account=<?php echo $R['uid']?>" onclick="return hrefCheck(this,true,'사이트관련 모든 데이터가 삭제됩니다.\n정말로 선택된 사이트를 삭제하시겠습니까?');" class="btn btn-light rounded-0" data-tooltip="tooltip" title="사이트 삭제">
<i class="fa fa-trash-o fa-lg"></i>
</a>
<?php endif?>
</span>
</div>
</div>
</div>
<div class="collapse" id="site-info">
<div class="form-group row rb-outside">
<label class="col-lg-2 col-form-label col-form-label-lg text-lg-right">사이트명</label>
<div class="col-lg-10 col-xl-9">
<input class="form-control form-control-lg" placeholder="" type="text" name="name" value="<?php echo $R['name']?>">
<small class="form-text text-muted"><code>&lt;title&gt; &lt;/title&gt;</code>내부의 <code>{site}</code> 변수에 적용됩니다.</small>
</div>
</div>
<div class="form-group row rb-outside">
<label class="col-lg-2 col-form-label col-form-label-lg text-lg-right">코드</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group input-group-lg">
<input class="form-control" placeholder="미입력 시 자동으로 부여됩니다." type="text" name="id" value="<?php echo $R['id']?>" id="site-code">
<span class="input-group-append">
<button class="btn btn-light rb-help-btn rounded-0" type="button" data-toggle="collapse" data-tooltip="tooltip" title="사이트 코드" data-target="#guide_sitecode"><i class="fa fa-question fa-lg text-muted"></i></button>
</span>
</div>
<ul id="guide_sitecode" class="collapse form-text text-muted mt-3 pl-3">
<li><small>단일 도메인으로 복수의 사이트를 운영할 수 있습니다.</small></li>
<li><small>사이트별로 계정아이디를 등록합니다.(영문대/소문자+숫자+_ 조합으로 등록할 수 있습니다)</small></li>
<li><small>영문사이트 서비스 연결 예제 : <code>kimsq.com/rb/kr</code> , <code>kimsq.com/rb/en</code></small></li>
</ul>
</div>
</div>
</div>
<div class="page-header d-flex justify-content-between align-self-center mt-5" id="home-site-info">
<h4 class="h5 mb-0">
레이아웃
</h4>
<div class="custom-control custom-checkbox" data-toggle="collapse" data-target="#layout-mobile">
<input type="checkbox" class="custom-control-input" id="customCheck2"<?php if($R['m_layout']):?> checked<?php endif?>>
<label class="custom-control-label" for="customCheck2">모바일 전용 레이아웃 사용</label>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label col-form-label-lg text-lg-right">기본</label>
<div class="col-lg-10 col-xl-9">
<div class="form-row">
<?php $_layoutExp1=explode('/',$R['layout'])?>
<?php if (!is_dir($g['path_layout'].$_layoutExp1[0])): ?>
<div class="col-sm-12">
<div class="alert alert-danger">
지정된 <?php echo $g['path_layout'].$_layoutExp1[0] ?> 레이아웃이 존재하지 않습니다. 변경해 주세요.
</div>
</div>
<div class="col-sm-6" id="rb-layout-select">
<select class="form-control custom-select custom-select-lg" name="layout_1" required onchange="getSubLayout(this,'rb-layout-select2','layout_1_sub','custom-select custom-select-lg');" style="letter-spacing: -1px;">
<?php $dirs = opendir($g['path_layout'])?>
<?php $_i=0;while(false !== ($tpl = readdir($dirs))):?>
<?php if($tpl=='.' || $tpl == '..' || $tpl == '_blank' || is_file($g['path_layout'].$tpl))continue?>
<option value="<?php echo $tpl?>"><?php echo getFolderName($g['path_layout'].$tpl)?>(<?php echo $tpl?>)</option>
<?php $_i++;endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="col-sm-6" id="rb-layout-select2">
<select class="form-control custom-select custom-select-lg" name="layout_1_sub">
</select>
</div>
<?php else: ?>
<div class="col-sm-6" id="rb-layout-select">
<select class="form-control custom-select custom-select-lg" name="layout_1" required onchange="getSubLayout(this,'rb-layout-select2','layout_1_sub','custom-select custom-select-lg');" style="letter-spacing: -1px;">
<?php $dirs = opendir($g['path_layout'])?>
<?php $_i=0;while(false !== ($tpl = readdir($dirs))):?>
<?php if($tpl=='.' || $tpl == '..' || $tpl == '_blank' || is_file($g['path_layout'].$tpl))continue?>
<?php if(!$_i&&!$R['layout']) $_layoutExp1[0] = $tpl?>
<option value="<?php echo $tpl?>"<?php if($_layoutExp1[0]==$tpl):?> selected<?php endif?>><?php echo getFolderName($g['path_layout'].$tpl)?>(<?php echo $tpl?>)</option>
<?php $_i++;endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="col-sm-6" id="rb-layout-select2">
<select class="form-control custom-select custom-select-lg" name="layout_1_sub"<?php if(!$_layoutExp1[0]):?> disabled<?php endif?>>
<?php $dirs1 = opendir($g['path_layout'].$_layoutExp1[0])?>
<?php while(false !== ($tpl1 = readdir($dirs1))):?>
<?php if(!strstr($tpl1,'.php') || $tpl1=='_main.php')continue?>
<option value="<?php echo $tpl1?>"<?php if($_layoutExp1[1]==$tpl1):?> selected<?php endif?>><?php echo str_replace('.php','',$tpl1)?></option>
<?php endwhile?>
<?php closedir($dirs1)?>
</select>
</div>
<?php endif; ?>
</div>
</div>
</div>
<div class="collapse<?php if($R['m_layout']):?> show<?php endif?>" id="layout-mobile">
<div class="form-group row">
<label class="col-lg-2 col-form-label col-form-label-lg text-lg-right">모바일 전용</label>
<div class="col-lg-10 col-xl-9">
<div class="form-row">
<?php $_layoutExp2=explode('/',$R['m_layout'])?>
<?php if (!is_dir($g['path_layout'].$_layoutExp2[0])): ?>
<div class="col-sm-12">
<div class="alert alert-danger">
지정된 <?php echo $g['path_layout'].$_layoutExp2[0] ?> 레이아웃이 존재하지 않습니다. 변경해 주세요.
</div>
</div>
<div class="col-sm-6" id="rb-mlayout-select">
<select class="form-control custom-select custom-select-lg" name="m_layout_1" required onchange="getSubLayout(this,'rb-mlayout-select2','m_layout_1_sub','custom-select custom-select-lg');" style="letter-spacing: -1px;">
<option value="0">사용안함 (기본 레이아웃 적용)</option>
<option disabled>--------------------</option>
<?php $dirs = opendir($g['path_layout'])?>
<?php while(false !== ($tpl = readdir($dirs))):?>
<?php if($tpl=='.' || $tpl == '..' || $tpl == '_blank' || is_file($g['path_layout'].$tpl))continue?>
<option value="<?php echo $tpl?>"><?php echo getFolderName($g['path_layout'].$tpl)?> (<?php echo $tpl?>)</option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="col-sm-6" id="rb-mlayout-select2">
<select class="form-control custom-select custom-select-lg" name="m_layout_1_sub">
</select>
</div>
<?php else: ?>
<div class="col-sm-6" id="rb-mlayout-select">
<select class="form-control custom-select custom-select-lg" name="m_layout_1" required onchange="getSubLayout(this,'rb-mlayout-select2','m_layout_1_sub','custom-select custom-select-lg');" style="letter-spacing: -1px;">
<option value="0">사용안함 (기본 레이아웃 적용)</option>
<option disabled>--------------------</option>
<?php $dirs = opendir($g['path_layout'])?>
<?php while(false !== ($tpl = readdir($dirs))):?>
<?php if($tpl=='.' || $tpl == '..' || $tpl == '_blank' || is_file($g['path_layout'].$tpl))continue?>
<option value="<?php echo $tpl?>"<?php if($_layoutExp2[0]==$tpl):?> selected<?php endif?>><?php echo getFolderName($g['path_layout'].$tpl)?> (<?php echo $tpl?>)</option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="col-sm-6" id="rb-mlayout-select2">
<select class="form-control custom-select custom-select-lg" name="m_layout_1_sub"<?php if(!$R['m_layout']):?> disabled<?php endif?>>
<?php if(!$R['m_layout']):?><option>서브 레이아웃</option><?php endif?>
<?php $dirs1 = opendir($g['path_layout'].$_layoutExp2[0])?>
<?php while(false !== ($tpl1 = readdir($dirs1))):?>
<?php if(!strstr($tpl1,'.php') || $tpl1=='_main.php')continue?>
<option value="<?php echo $tpl1?>"<?php if($_layoutExp2[1]==$tpl1):?> selected<?php endif?>><?php echo str_replace('.php','',$tpl1)?></option>
<?php endwhile?>
<?php closedir($dirs1)?>
</select>
</div>
<?php endif; ?>
</div>
<span class="form-text">
<a class="badge badge-pill badge-dark" data-toggle="collapse" href="#guide_mobile">도움말</a>
</span>
<ul id="guide_mobile" class="collapse form-text text-muted pl-3">
<li><small>모바일기기로 접속시 출력할 사이트 레이아웃(UI)을 지정합니다.</small></li>
<li><small>모바일 전용 레이아웃을 지정하지 않으면 모바일 기기로 접속시 기본 레이아웃으로 적용됩니다.</small></li>
<li><small>모바일 기기에 대해 정의하려면 디바이스 설정 을 이용하세요. <a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=device">more</a></small></li>
</ul>
</div>
</div>
</div>
<div class="collapse<?php if($_SESSION['sh_site_main_1']):?> show<?php endif?>" id="site-advance"><!-- 고급설정 레이어 -->
<div class="page-header d-flex justify-content-between align-self-center mt-5">
<h4 class="h5 mb-0">메인 페이지</h4>
<div class="custom-control custom-checkbox" data-toggle="collapse" data-target="#index-mobile">
<input type="checkbox" class="custom-control-input" id="customCheck3" <?php if($R['m_startpage']):?> checked<?php endif?>>
<label class="custom-control-label" for="customCheck3">모바일 전용 메인 페이지 사용</label>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label col-form-label-lg text-lg-right">기본</label>
<div class="col-lg-10 col-xl-9">
<select class="form-control custom-select custom-select-lg" name="startpage" required>
<option>레이아웃에 포함된 메인페이지</option>
<option disabled><i class="fa fa-edit"></i>페이지 리스트 ↓</option>
<?php while($S = db_fetch_array($PAGES1)):?>
<option value="<?php echo $S['uid']?>"<?php if($R['startpage']==$S['uid']):?> selected<?php endif?>><?php echo $S['name']?>(<?php echo $S['id']?>)</option>
<?php endwhile?>
</select>
<span class="form-text">
<a class="badge badge-pill badge-dark" data-toggle="collapse" href="#guide_mainpage">도움말</a>
</span>
<div id="guide_mainpage" class="collapse form-text text-muted">
<li><small>메인페이지는 웹사이트에 접속했을때 레이아웃(틀)을 제외한 첫 화면을 의미합니다.</small></li>
<li><small>일반적으로 메인페이지는 레이아웃에 포함되어 있으나 임의의 페이지를 지정하여 대체할 수도 있습니다.</small></li>
<li><small>레이아웃에 포함되어 있는 메인페이지 대신 자체의 페이지를 사용하려면 해당 페이지를 지정해 주세요.</small></li>
<li><small>자체 페이지는 페이지에서 만들 수 있습니다. <a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=page">more</a></small></li>
</div>
</div>
</div>
<div class="collapse<?php if($R['m_startpage']):?> show<?php endif?>" id="index-mobile">
<div class="form-group row">
<label class="col-lg-2 col-form-label col-form-label-lg text-lg-right">모바일 전용</label>
<div class="col-lg-10 col-xl-9">
<select class="form-control custom-select custom-select-lg" name="m_startpage" required>
<option>레이아웃에 포함된 메인페이지</option>
<option disabled><i class="fa fa-edit"></i>페이지 리스트 ↓</option>
<?php while($S = db_fetch_array($PAGES2)):?>
<option value="<?php echo $S['uid']?>"<?php if($R['m_startpage']==$S['uid']):?> selected<?php endif?>><?php echo $S['name']?>(<?php echo $S['id']?>)</option>
<?php endwhile?>
</select>
</div>
</div>
</div>
<div class="page-header mt-5">
<h4 class="h5">고급 설정</h4>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">타이틀 구성</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group">
<input class="form-control" placeholder="" type="text" name="title" value="<?php echo $R['uid']?$R['title']:'{subject} | {site}'?>">
<span class="input-group-append">
<button class="btn btn-light rb-help-btn" type="button" data-toggle="collapse" data-target="#guide_title" data-tooltip="tooltip" title="도움말"><i class="fa fa-question fa-lg text-muted"></i></button>
</span>
</div>
<ul id="guide_title" class="collapse form-text text-muted pl-3 mt-3">
<li><small>입력내용은 브라우저의 <code>&lt;title&gt; &lt;/title&gt;</code> 내부에 출력됩니다.</small></li>
<li><small>검색엔진 결과 페이지와 소셜미디어 공유 링크 제목등에 사용됩니다.</small></li>
<li><small><code>{site}</code>에는 사이트명이 치환됩니다.</small></li>
<li><small><code>{subject}</code>에는 메뉴명, 페이지 제목등이 치환 됩니다.</small></li>
<li><small><code>{location}</code>에는 현재위치가 치환 됩니다.</small></li>
</ul>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">퍼포먼스</label>
<div class="col-sm-9 pt-1">
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="customCheck_rewrite" name="rewrite" value="1"<?php if($R['rewrite']):?> checked<?php endif?>>
<label class="custom-control-label" for="customCheck_rewrite">고유주소 (Permalink)</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="customCheck_buffer" name="buffer" value="1"<?php if($R['buffer']):?> checked<?php endif?>>
<label class="custom-control-label" for="customCheck_buffer">버퍼전송</label>
</div>
<a class="badge badge-pill badge-dark" data-toggle="collapse" href="#guide_rewrite">도움말</a>
<div id="guide_rewrite" class="collapse form-text text-muted">
<small>
<dl>
<dt>고유주소 사용</dt>
<dd>
<p>
긴 주소줄을 간단하게 줄일 수 있습니다.(서버에서 rewrite_mod 를 허용해야합니다)<br>
보기) <code>./?r=home&amp;c=menu</code> -> <code>/home/c/menu</code>
</p>
</dd>
</dl>
<hr>
<dl>
<dt>버퍼전송사용</dt>
<dd>
실행결과를 브라우져에 출력해주는 과정에서 버퍼에 담아두었다가 실행이 완료되면 화면에 출력해 줍니다.<br>
실행속도가 느릴경우 화면이 일부분만 출력되는 것을 한번에 열리도록 합니다.<br>
</dd>
</dl>
</small>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">연결 도메인</label>
<div class="col-sm-9">
<?php if($R['uid']):?>
<?php if($DOMAINN):?>
<ul class="list-unstyled">
<?php while($D=db_fetch_array($DOMAINS)):?>
<li class="pt-2">
<span class="fa fa-globe"></span>
<a href="//<?php echo $D['name']?>" target="_blank" class="muted-link"><?php echo $D['name']?></a>
</li>
<?php endwhile?>
</ul>
<?php else:?>
<div class="form-control-static">
<span class="text-muted">
<span class="fa fa-info-circle"></span>
연결된 도메인이 없습니다.
</span>
<a class="badge badge-pill badge-dark" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=domain&amp;selsite=<?php echo $R['uid']?>&amp;type=makedomain">도메인 연결하기</a>
</div>
<?php endif?>
<?php else:?>
<p class="form-control-static">
<span class="text-muted">
<span class="fa fa-info-circle"></span>
사이트 생성 후 연결할 수 있습니다.
</span>
</p>
<?php endif?>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">사이트 언어</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group">
<select name="sitelang" class="form-control custom-select">
<option value=""<?php if(!$R['lang']):?> selected<?php endif?>>시스템 언어 (<?php echo getFolderName($g['path_module'].$module.'/language/'.$d['admin']['syslang'])?>)</option>
<?php if(is_dir($g['path_module'].$module.'/language')):?>
<?php $dirs = opendir($g['path_module'].$module.'/language')?>
<?php while(false !== ($tpl = readdir($dirs))):?>
<?php if($tpl=='.'||$tpl=='..'||$tpl==$d['admin']['syslang'])continue?>
<option value="<?php echo $tpl?>"<?php if($R['lang']==$tpl):?> selected<?php endif?>><?php echo getFolderName($g['path_module'].$module.'/language/'.$tpl)?></option>
<?php endwhile?>
<?php closedir($dirs)?>
<?php endif?>
</select>
<span class="input-group-append">
<button class="btn btn-light rb-help-btn" type="button" data-toggle="collapse" data-tooltip="tooltip" title="도움말" data-target="#guide_language"><i class="fa fa-question fa-lg text-muted"></i></button>
</span>
</div>
<div id="guide_language" class="collapse form-text text-muted">
<small>
이 사이트의 사용자모드에 대한 언어를 제어합니다.<br>
<?php echo sprintf("지정된 언어가 포함되어 있지 않은 모듈이 사용될 경우에는 기본언어인 <strong>%s</strong>로 적용됩니다.",getFolderName($g['path_module'].$module.'/language/'.$d['admin']['syslang']))?>
</small>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">서비스상태</label>
<div class="col-sm-9 pt-1">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="open_1" name="open" value="1"<?php if(!$R['uid']||$R['open']=='1'):?> checked<?php endif?>>
<label class="custom-control-label" for="open_1">정상 서비스</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="open_2" name="open" value="2"<?php if($R['open']=='2'):?> checked<?php endif?>>
<label class="custom-control-label" for="open_2">관리자 오픈</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="open_3" name="open" value="3"<?php if($R['open']=='3'):?> checked<?php endif?>>
<label class="custom-control-label" for="open_3">정지</label>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">이름표시</label>
<div class="col-sm-9 pt-2">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="nametype_nic" name="nametype" value="nic"<?php if(!$R['uid'] || $R['nametype']=='nic'):?> checked<?php endif?>>
<label class="custom-control-label" for="nametype_nic">닉네임</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="nametype_name" name="nametype" value="name"<?php if($R['nametype']=='name'):?> checked<?php endif?>>
<label class="custom-control-label" for="nametype_name">이름</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="nametype_id" name="nametype" value="id"<?php if($R['nametype']=='id'):?> checked<?php endif?>>
<label class="custom-control-label" for="nametype_id">아이디</label>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">시간조정</label>
<div class="col-lg-10 col-xl-9">
<select class="form-control custom-select" name="timecal">
<?php for($i = -23; $i < 24; $i++):?>
<option value="<?php echo $i?>"<?php if($i == $R['timecal']):?> selected<?php endif?>><?php if($i > 0):?>+<?php endif?><?php echo $i?sprintf('%s 시간',$i):'조정안함'?></option>
<?php endfor?>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">코드삽입</label>
<div class="col-lg-10 col-xl-9">
<div class="panel-group">
<div class="card mb-2">
<div class="card-header p-0">
<a class="d-block muted-link collapsed" data-toggle="collapse" href="#site-code-head" onclick="sessionSetting('sh_site_main_2','1','','1');">
head 코드 <?php if($R['headercode']):?><i class="fa fa-check-circle" title="내용있음" data-tooltip="tooltip"></i><?php endif?>
<small><code>&lt;head&gt; &lt;/head&gt;</code> 태그 내부에 삽입할 코드를 등록해 주세요.</small>
</a>
</div>
<div id="site-code-head" class="panel-collapse collapse<?php if($_SESSION['sh_site_main_2']):?> show<?php endif?>">
<div class="card-body">
<textarea name="headercode" class="form-control" rows="7"><?php echo htmlspecialchars($R['headercode'])?></textarea>
</div>
</div>
</div>
<div class="card mb-2">
<div class="card-header p-0">
<a class="d-block muted-link collapsed" data-toggle="collapse" href="#site-code-foot" onclick="sessionSetting('sh_site_main_3','1','','1');">
foot 코드 <?php if($R['footercode']):?><i class="fa fa-check-circle" title="내용있음" data-tooltip="tooltip"></i><?php endif?>
<small><code>&lt;/body&gt;&lt;/html&gt;</code> 태그 직전에 삽입할 코드를 등록해 주세요.</small>
</a>
</div>
<div id="site-code-foot" class="panel-collapse collapse<?php if($_SESSION['sh_site_main_3']):?> show<?php endif?>">
<div class="card-body">
<textarea name="footercode" class="form-control" rows="7"><?php echo htmlspecialchars($R['footercode'])?></textarea>
</div>
</div>
</div>
<div class="card mb-2">
<div class="card-header p-0">
<a class="d-block muted-link collapsed" data-toggle="collapse" href="#site-code-php" onclick="sessionSetting('sh_site_main_4','1','','1');">
PHP코드 <?php if($R['uid']&&filesize($g['path_var'].'sitephp/'.$R['uid'].'.php')):?><i class="fa fa-check-circle" title="내용있음" data-tooltip="tooltip"></i><?php endif?>
<small>이 사이트 전용 <code>&lt;?php ?&gt;</code> 를 등록해 주세요.</small>
</a>
</div>
<div id="site-code-php" class="panel-collapse collapse<?php if($_SESSION['sh_site_main_4']):?> show<?php endif?>">
<div class="card-body">
<textarea name="sitephpcode" class="form-control" rows="7"><?php if($R['uid']&&is_file($g['path_var'].'sitephp/'.$R['uid'].'.php')) echo htmlspecialchars(implode('',file($g['path_var'].'sitephp/'.$R['uid'].'.php')))?></textarea>
</div>
</div>
</div>
<div class="card mb-2">
<div class="card-header p-0">
<a class="d-block muted-link collapsed" data-toggle="collapse" href="#site-code-googleanalytics" onclick="sessionSetting('sh_site_main_5','1','','1');">
구글 웹로그 분석 <?php if($R['dtd']):?><i class="fa fa-check-circle" title="내용있음" data-tooltip="tooltip"></i><?php endif?>
<small>이 사이트 전용 Google Analytics <code>추적 ID</code> 를 등록해 주세요.</small>
</a>
</div>
<div id="site-code-googleanalytics" class="panel-collapse collapse<?php if($_SESSION['sh_site_main_5']):?> show<?php endif?>">
<div class="card-body">
<input name="dtd" type="text" class="form-control input-lg" placeholder="" value="<?php echo $R['dtd']?>">
<small class="form-text">
<a href="http://www.google.com/analytics/" target="_blank">Google 웹로그 분석</a> 코드를 사이트에 추가하세요 (예 : <code>UA-000000-01</code>)
<a href="https://support.google.com/analytics/answer/1032385?hl=<?php echo $lang['site']['time1']?>" target="_blank">Tracking ID 찾기</a>,
<a href="https://support.google.com/analytics/?hl=<?php echo $lang['site']['time1']?>#topic=3544906" target="_blank">도움말</a>
</small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="rb-advance my-5">
<button type="button" class="btn btn-light<?php if(!$_SESSION['sh_site_main_1']):?> collapsed<?php endif?>" data-toggle="collapse" data-target="#site-advance" onclick="sessionSetting('sh_site_main_1','1','','1');">
고급설정 <small class="rb-ca2"></small>
</button>
<button type="button" class="btn btn-light<?php if(!$_SESSION['sh_site_main_m']):?> collapsed<?php endif?>" data-toggle="collapse" data-target="#site-meta" onclick="sessionSetting('sh_site_main_m','1','','1');">
메타설정 <small class="rb-ca1"></small>
</button>
</div>
<div class="collapse<?php if($_SESSION['sh_site_main_m']):?> show<?php endif?>" id="site-meta"><!-- 메타설정 레이어 -->
<div class="page-header">
<h4 class="mb-0">메타 설정</h4>
</div>
<div class="form-group row rb-outside">
<label class="col-lg-2 col-form-label text-lg-right">타이틀</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group">
<input type="text" class="form-control rb-title" name="meta_title" value="<?php echo $_SEO['title']?>" maxlength="60" placeholder="50-60자 내에서 작성해 주세요.">
<span class="input-group-append">
<button class="btn btn-light rb-help-btn" type="button" data-toggle="collapse" data-target="#guide_title_meta" data-tooltip="tooltip" title="도움말"><i class="fa fa-question fa-lg text-muted"></i></button>
</span>
</div>
<div class="form-text collapse mt-2" id="guide_title_meta">
<small>
<code>&lt;meta name=&quot;title&quot; content=&quot;&quot;&gt;</code> 내부에 삽입됩니다.
</small>
</div>
</div>
</div>
<div class="form-group row rb-outside">
<label class="col-lg-2 col-form-label text-lg-right">설명</label>
<div class="col-lg-10 col-xl-9">
<textarea name="meta_description" class="form-control rb-description" rows="5" placeholder="150-160자 내에서 작성해 주세요." maxlength="160"><?php echo $_SEO['description']?></textarea>
<a class="mt-2 badge badge-pill badge-dark" href="#guide_description" data-toggle="collapse" >도움말</a>
<div class="collapse" id="guide_description">
<small class="form-text text-muted">
<code>&lt;meta name=&quot;description&quot; content=&quot;&quot;&gt;</code> 내부에 삽입됩니다.<br>
검색 결과에 표시되는 문자를 지정합니다. 설명글은 엔터없이 입력해 주세요.<br>
보기)웹 프레임워크의 혁신 - 킴스큐 Rb 에 대한 다운로드,팁 공유등을 제공합니다. <a href=&quot;http://moz.com/learn/seo/meta-description&quot; target=&quot;_blank&quot;>참고</a>
</small>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">키워드</label>
<div class="col-lg-10 col-xl-9">
<input name="meta_keywords" class="form-control" placeholder="콤마(,)로 구분하여 입력해 주세요." value="<?php echo $_SEO['keywords']?>">
<small class="mt-2 badge badge-pill badge-dark"><a class="muted-link" href="#guide_keywords" data-toggle="collapse" >도움말</a></small>
<div class="collapse" id="guide_keywords">
<small class="form-text text-muted">
<code>&lt;meta name=&quot;keywords&quot; content=&quot;&quot;&gt;</code> 내부에 삽입됩니다.
핵심 키워드를 콤마로 구분하여 20개 미만으로 엔터없이 입력해 주세요.<br>
보기)킴스큐,킴스큐Rb,CMS,웹프레임워크,큐마켓
</small>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">크롤링</label>
<div class="col-lg-10 col-xl-9">
<input name="meta_classification" class="form-control" placeholder="" value="<?php echo $_SEO['uid']?$_SEO['classification']:'ALL'?>">
<a class="mt-2 badge badge-pill badge-dark" href="#guide_classification" data-toggle="collapse" >도움말</a>
<div class="form-text collapse" id="guide_classification">
<small class="form-text text-muted">
<code>&lt;meta name=&quot;robots&quot; content=&quot;&quot;&gt;</code> 내부에 삽입됩니다.
all,noindex,nofollow,none 등으로 지정할 수 있습니다.
</small>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">메타이미지</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group">
<input class="form-control rb-modal-photo-drop" onmousedown="_mediasetField='meta_image_src&dfiles='+this.value;" data-tooltip="tooltip" data-toggle="modal" data-target="#modal_window" type="text" name="meta_image_src" id="meta_image_src" value="<?php echo $_SEO['image_src']?$_SEO['image_src']:''?>">
<div class="input-group-append">
<button class="btn btn-light rb-modal-photo1" type="button" title="포토셋" data-tooltip="tooltip" data-toggle="modal" data-target="#modal_window">
<i class="fa fa-photo fa-lg"></i>
</button>
</div>
</div>
<a class="mt-2 badge badge-pill badge-dark" href="#guide_image_src" data-toggle="collapse" >도움말</a>
<div class="form-text collapse" id="guide_image_src">
<small class="form-text text-muted">
이미지를 등록하시면 소셜미디어에 이 이미지를 포함하여 전송할 수 있습니다.
이미지를 직접 지정하려면 이미지의 URL을 입력해 주세요.
</small>
</div>
</div>
</div>
</div>
<button class="btn btn-outline-primary btn-block btn-lg my-4" id="rb-submit-button" type="submit">
<?php echo $R['uid']?'사이트 속성 변경':'신규 사이트 만들기' ?>
</button>
</form>
</div><!-- /.container-fluid -->
</div>
</div>
<?php include $g['path_module'].$module.'/action/a.inscheck.php' ?>
<?php if($SITEN>1):?>
<!-- nestable : https://github.com/dbushell/Nestable -->
<?php getImport('nestable','jquery.nestable',false,'js')?>
<script>
$('#site-icons').nestable();
$('.dd').on('change', function() {
var f = document.forms[0];
getIframeForAction(f);
f.submit();
});
</script>
<?php endif?>
<!-- bootstrap-maxlength -->
<?php getImport('bootstrap-maxlength','bootstrap-maxlength.min',false,'js')?>
<script>
putCookieAlert('result_site') // 실행결과 알림 메시지 출력
$('#site-info').on('shown.bs.collapse', function () {
$('#site-code').focus()
})
$('input.rb-title').maxlength({
alwaysShow: true,
threshold: 10,
warningClass: "label label-success",
limitReachedClass: "label label-danger"
});
$('textarea.rb-description').maxlength({
alwaysShow: true,
threshold: 10,
warningClass: "label label-success",
limitReachedClass: "label label-danger"
});
</script>
<!-- modal -->
<script>
var _mediasetField='';
$(document).ready(function() {
$('.rb-modal-iconset').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('site/pages/modal.icons')?>');
});
$('.rb-modal-photo1').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=mediaset&amp;mdfile=modal.photo.media&amp;dropfield=meta_image_src')?>');
});
$('.rb-modal-photo-drop').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=mediaset&amp;mdfile=modal.photo.media&amp;dropfield=')?>'+_mediasetField);
});
});
</script>
<!-- bootstrap Validator -->
<?php getImport('bootstrap-validator','dist/css/bootstrapValidator.min',false,'css')?>
<?php getImport('bootstrap-validator','dist/js/bootstrapValidator.min',false,'js')?>
<script>
$('.form-horizontal').bootstrapValidator({
message: 'This value is not valid',
<?php if(!$g['device']):?>
feedbackIcons: {
valid: 'fa fa-check',
invalid: 'fa fa-times',
validating: 'fa fa-refresh'
},
<?php endif?>
fields: {
name: {
message: 'The menu is not valid',
validators: {
notEmpty: {
message: '사이트 라벨을 입력해 주세요.'
}
}
},
id: {
validators: {
notEmpty: {
message: '사이트 코드를 입력해 주세요.'
},
regexp: {
regexp: /^[a-zA-Z0-9_\-]+$/,
message: '사이트 코드는 영문대소문자/숫자/_/- 만 사용할 수 있습니다.'
}
}
},
}
});
</script>
<!-- basic -->
<script>
function saveCheck(f)
{
f.layout.value = f.layout_1.value + '/' + f.layout_1_sub.value;
if(f.m_layout_1.value != '0') f.m_layout.value = f.m_layout_1.value + '/' + f.m_layout_1_sub.value;
else f.m_layout.value = '';
getIframeForAction(f);
return true;
}
function iconDrop(val)
{
var f = document.procForm;
f.icon.value = val;
<?php if($type!='makesite'):?>
iconDropAply();
<?php else:?>
getId('_label_icon_btn_').className = '';
$('#_label_icon_btn_').addClass(val);
$('#modal_window').modal('hide');
<?php endif?>
}
function iconDropAply()
{
var f = document.procForm;
getIframeForAction(f);
f.iconaction.value = '1';
f.submit();
f.iconaction.value = '';
getId('_site_icon_<?php echo $R['id']?>').className = 'rb-site-icon';
$('#_site_icon_<?php echo $R['id']?>').addClass(f.icon.value);
$('#modal_window').modal('hide');
}
// 고급 설정
$('#site-code-head').on('shown.bs.collapse', function () {
$(this).find('textarea').focus()
})
$('#site-code-head').on('shown.bs.collapse', function () {
$(this).find('textarea').focus()
})
$('#site-code-foot').on('shown.bs.collapse', function () {
$(this).find('textarea').focus()
})
$('#site-code-php').on('shown.bs.collapse', function () {
$(this).find('textarea').focus()
})
$('#site-code-googleanalytics').on('shown.bs.collapse', function () {
$(this).find('input').focus()

114
modules/site/admin/menu.css Normal file
View File

@@ -0,0 +1,114 @@
#accordion>.card .card-body {
height: calc(100vh - 13.2rem);
overflow: auto;
}
.rb-tree .fa-mobile {
font-size: 18px;
color: #999
}
/**
* Nestable
*/
.dd {
position: relative;
display: block;
margin: 0;
padding: 0;
list-style: none;
font-size: 13px;
line-height: 20px;
}
.dd-list {
display: block;
position: relative;
margin: 0;
padding: 0;
list-style: none;
}
.dd-item,
.dd-empty,
.dd-placeholder {
display: block;
position: relative;
margin: 0;
padding: 0;
min-height: 20px;
line-height: 20px;
}
.dd-handle {
display: block;
margin: 5px 0;
padding: 10px;
text-decoration: none;
border: 1px solid rgba(0, 0, 0, .125);
background: #eee;
-webkit-border-radius: 3px;
border-radius: 3px;
box-sizing: border-box;
-moz-box-sizing: border-box;
cursor: move;
font-size: 13px
}
.dd-handle:hover {
color: #2ea8e5;
}
.dd-item>button {
display: block;
position: relative;
cursor: pointer;
float: left;
width: 35px;
height: 35px;
margin: 5px 0;
padding: 0;
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
border: 0;
background: transparent;
font-size: 13px;
line-height: 1;
text-align: center;
}
.dd-placeholder,
.dd-empty {
margin: 5px 0;
padding: 0;
min-height: 30px;
background: #f2fbff;
border: 1px dashed #b6bcbf;
box-sizing: border-box;
-moz-box-sizing: border-box
}
.dd-empty {
border: 1px dashed #bbb;
min-height: 100px;
background-color: #e5e5e5;
background-image: -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), background-image: -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), background-size: 60px 60px;
background-position: 0 0, 30px 30px;
}
.dd-dragel {
position: absolute;
pointer-events: none;
z-index: 9999;
}
.dd-dragel>.dd-item .dd-handle {
margin-top: 0;
}
.dd-dragel .dd-handle {
-webkit-box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, .1);
box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, .1);
}

1153
modules/site/admin/menu.php Normal file

File diff suppressed because it is too large Load Diff

180
modules/site/admin/page.css Normal file
View File

@@ -0,0 +1,180 @@
#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-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: "표시"
}
.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 {
margin-top: 30px;
}
#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;
}
.sidebar>.card .card-body {
height: calc(100vh - 10rem);
overflow: auto;
}
/*김성호추가*/
.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 {
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;
}
}

891
modules/site/admin/page.php Normal file
View File

@@ -0,0 +1,891 @@
<?php
$R = array();
$SITES = getDbArray($table['s_site'],'','*','gid','asc',0,$p);
$SITEN = db_num_rows($SITES);
$recnum = $recnum ? $recnum : 12;
$sendsql = 'site='.$_HS['uid'];
$sendsql.= $cat ? " and category='".$cat."'" : '';
if ($keyw)
{
$sendsql .= " and (id like '%".$keyw."%' or name like '%".$keyw."%' or category like '%".$keyw."%')";
}
$PAGES = getDbArray($table['s_page'],$sendsql,'*','d_last','desc',$recnum,$p);
$NUM = getDbRows($table['s_page'],$sendsql);
$TPG = getTotalPage($NUM,$recnum);
if ($uid)
{
$R = getUidData($table['s_page'],$uid);
$_SEO = getDbData($table['s_seo'],'rel=2 and parent='.$R['uid'],'*');
}
$pageType = array('','모듈연결','코드편집','문서편집');
?>
<div class="row no-gutters">
<div class="col-sm-4 col-md-4 col-xl-3 d-none d-sm-block sidebar">
<div class="card border-0">
<div class="card-header p-1 d-flex justify-content-between border-bottom-0">
<div class="dropdown">
<a class="btn btn-link muted-link dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-file-text-o fa-lg fa-fw"></i> <?php echo $cat?$cat:'전체페이지'?>
</a>
<div class="dropdown-menu">
<h6 class="dropdown-header">페이지 분류</h6>
<a class="dropdown-item<?php if(!$cat):?> active<?php endif?>" href="<?php echo $g['adm_href']?>">전체페이지</a>
<?php $_cats=array()?>
<?php $CATS=db_query("select *,count(*) as cnt from ".$table['s_page']." group by category",$DB_CONNECT)?>
<?php while($C=db_fetch_array($CATS)):$_cats[]=$C['category']?>
<a class="dropdown-item<?php if($C['category']==$cat):?> active<?php endif?>" href="<?php echo $g['adm_href']?>&amp;cat=<?php echo urlencode($C['category'])?>">
<?php echo $C['category']?> <small>(<?php echo $C['cnt']?>)</small>
</a>
<?php endwhile?>
</div>
</div>
<button type="button" class="btn btn-link muted-link btn-sm<?php if(!$_SESSION['sh_site_page_search']):?> collapsed<?php endif?>" data-toggle="collapse" data-target="#panel-search" data-tooltip="tooltip" title="검색필터" onclick="sessionSetting('sh_site_page_search','1','','1');getSearchFocus();">
<i class="fa fa-cog" aria-hidden="true"></i>
</button>
</div>
<div class="card-body p-0">
<div id="panel-search" class="collapse<?php if($_SESSION['sh_site_page_search']):?> show<?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?>">
<input type="hidden" name="cat" value="<?php echo $cat?>">
<div class="p-0">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text border-0">출력수</span>
</div>
<select class="form-control custom-select border-0" 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 class="rb-keyword-search">
<input type="text" name="keyw" class="form-control border-0" value="<?php echo $keyw?>" placeholder="페이지명,코드,분류명 검색">
</div>
</form>
</div>
<?php if ($NUM): ?>
<table id="page-list" class="table mb-0">
<thead>
<tr>
<td class="rb-pagename"><span>페이지명</span></td>
<td class="rb-time"><span>최종수정</span></td>
</tr>
</thead>
<tbody>
<?php $pageTypeIcon=array('','fa-link','fa-puzzle-piece','fa-file-text-o')?>
<?php while($PR = db_fetch_array($PAGES)):?>
<tr<?php if($uid==$PR['uid']):?> class="table-active"<?php endif?> data-tooltip="tooltip" title="">
<td onclick="goHref('<?php echo $g['adm_href']?>&amp;uid=<?php echo $PR['uid']?>&amp;recnum=<?php echo $recnum?>&amp;p=<?php echo $p?>&amp;cat=<?php echo urlencode($cat)?>&amp;keyw=<?php echo urlencode($keyw)?>#site-page-info');">
<a href="#.">
<span class="badge badge-dark badge-pill">
<i class="fa <?php echo $pageTypeIcon[$PR['pagetype']]?> fa-lg"></i>
</span>
<?php echo getStrCut($PR['name'],14,'..')?>
</a>
</td>
<td class="rb-time">
<span class="badge badge-dark"><?php echo $PR['id']?></span>
</td>
</tr>
<?php endwhile?>
</tbody>
</table>
<?php if ($TPG > 1): ?>
<nav class="mt-3">
<ul class="pagination pagination-sm justify-content-center mb-0">
<script>getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
</ul>
</nav>
<?php endif; ?>
<?php else: ?>
<div class="text-center text-muted d-flex align-items-center justify-content-center" style="height: calc(100vh - 15.6rem);">
<div><i class="fa fa-exclamation-circle fa-3x mb-2" aria-hidden="true"></i> <br>등록된 페이지가 없습니다. </div>
</div>
<?php endif; ?>
</div><!-- /.card-body -->
<div class="card-footer">
<a class="btn btn-light btn-block" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $module?>&amp;a=dumpmenu&amp;type=package_page" target="_action_frame_<?php echo $m?>"><i class="fa fa-download fa-lg"></i> 패키지용 데이터 받기</a>
</div>
</div>
</div>
<div id="tab-content-view" class="col-sm-8 col-md-8 ml-sm-auto col-xl-9">
<?php if($g['device']):?><a name="site-page-info"></a><?php endif?>
<form name="procForm" class="card rounded-0 border-0" role="form" action="<?php echo $g['s']?>/" method="post" onsubmit="return saveCheck(this);" autocomplete="off">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="regispage">
<input type="hidden" name="uid" value="<?php echo $R['uid']?>">
<input type="hidden" name="orign_id" value="<?php echo $R['id']?>">
<input type="hidden" name="perm_g" value="<?php echo $R['perm_g']?>">
<input type="hidden" name="seouid" value="<?php echo $_SEO['uid']?>">
<input type="hidden" name="layout" value="">
<input type="hidden" name="m_layout" value="">
<input type="hidden" name="cat" value="<?php echo $cat?>">
<input type="hidden" name="recnum" value="<?php echo $recnum?>">
<input type="hidden" name="keyw" value="<?php echo $keyw?>">
<input type="hidden" name="p" value="<?php echo $p?>">
<input type="hidden" name="pagetype" value="<?php echo $R['uid']?$R['pagetype']:3?>">
<div class="card-header d-flex justify-content-between align-items-center page-body-header">
<?php if($R['uid']):?>
<h4 class="h5 mb-0">페이지 등록정보 <span class="badge badge-primary badge-pill"><?php echo $R['name']?></span></h4>
<a href="<?php echo $g['adm_href']?>" class="btn btn-light"><i class="fa fa-plus"></i> 새 페이지</a>
<?php else:?>
새 페이지 만들기
<?php endif?>
</div><!-- /.card-header -->
<div class="card-body">
<div class="form-group row rb-outside">
<label class="col-lg-2 col-form-label col-form-label-lg text-lg-right">페이지명</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group input-group-lg">
<?php if($R['uid']):?>
<span class="input-group-append">
<button type="button" class="btn btn-light dropdown-toggle border-right-0" data-toggle="dropdown" data-tooltip="tooltip" title="문서의 형식">
<span id="rb-document-type"><?php echo $pageType[$R['pagetype']]?></span> <span class="caret"></span>
</button>
<div class="dropdown-menu" role="menu">
<a class="dropdown-item" href="#" onclick="docType(3,'<?php echo $pageType[3]?>');"><i class="fa fa-file-text-o"></i> <?php echo $pageType[3]?></a>
<a class="dropdown-item" href="#" onclick="docType(2,'<?php echo $pageType[2]?>');"><i class="fa fa-code"></i> <?php echo $pageType[2]?></a>
<a class="dropdown-item" href="#" onclick="docType(1,'<?php echo $pageType[1]?>');"><i class="kf kf-module"></i> <?php echo $pageType[1]?></a>
</div>
</span>
<?php endif?>
<input class="form-control" placeholder="" type="text" name="name" value="<?php echo $R['name']?>"<?php if(!$R['uid'] && !$g['device']):?> autofocus<?php endif?> autocomplete="off">
<span class="input-group-append">
<button class="btn btn-light rb-help-btn rounded-0" type="button" data-toggle="collapse" data-target="#guide_startpage" data-tooltip="tooltip" title="페이지 형식지정"><i class="fa fa-cog fa-lg"></i></button>
</span>
<?php if($R['uid']):?>
<span class="input-group-append">
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $module?>&amp;a=deletepage&amp;uid=<?php echo $R['uid']?>" onclick="return hrefCheck(this,true,'정말로 삭제하시겠습니까?');" class="btn btn-light rounded-0" data-tooltip="tooltip" title="삭제">
<i class="fa fa-trash-o fa-lg"></i>
</a>
</span>
<?php endif?>
</div>
</div>
</div>
<div id="guide_startpage" class="collapse">
<div class="row">
<div class="col-lg-10 col-xl-9 offset-lg-2">
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="ismain" name="ismain" value="1"<?php if($R['ismain']):?> checked<?php endif?>>
<label class="custom-control-label" for="ismain"><span class="fa fa-home"></span> 메인 페이지</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="mobile" name="mobile" value="1"<?php if($R['mobile']):?> checked<?php endif?>>
<label class="custom-control-label" for="mobile"><span class="fa fa-mobile"></span> 모바일 페이지</label>
</div>
<small class="form-text text-muted mb-3">
보기) 메인화면,로그인,회원가입,마이페이지,통합검색,이용약관,고객센터<br>
메인 페이지는 사이트 속성중 메인 페이지로 지정할 수 있습니다.<br>
메인화면으로 사용할 페이지일 경우 메인 페이지에 체크해 주세요.
</small>
</div>
</div>
<div class="form-group row rb-outside">
<label class="col-lg-2 col-form-label text-lg-right">코드</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group">
<input class="form-control" type="text" name="id" value="<?php echo $R['id']?$R['id']:'p'.$date['tohour']?>" maxlength="20" placeholder="">
<span class="input-group-append">
<button class="btn btn-light rb-help-btn" type="button" data-toggle="collapse" data-target="#guide_pagecode" data-tooltip="tooltip" title="도움말"><i class="fa fa-question fa-lg"></i></button>
</span>
</div>
<div id="guide_pagecode" class="collapse">
<small class="form-text text-muted">
페이지 호출시에 사용되는 코드이므로 가급적 페이지명을 잘 표현할 수 있는 영어로 입력해주세요.<br>
영문대소문자/숫자/_/- 조합으로 등록할 수 있습니다.<br>
보기) 페이지호출주소 : <code>./?mod=페이지코드</code>
</small>
</div>
</div>
</div>
</div>
<div class="form-group tab-content<?php if(!$R['uid']):?> d-none<?php endif?>">
<div class="form-group row<?php if($R['pagetype']!=2):?> d-none<?php endif?>" id="editBox2">
<div class="col-lg-10 col-xl-9 offset-lg-2">
<p class="text-muted small mb-1">파일경로</p>
<ol class="breadcrumb mb-2 py-1 small">
<li class="breadcrumb-item active">기본 &nbsp; : </li>
<li class="breadcrumb-item">pages</li>
<li class="breadcrumb-item"><?php echo $r ?>-pages</li>
<li class="breadcrumb-item"><a href="#" class="rb-modal-code" data-toggle="buttons"><?php echo $R['id']?$R['id']:'p'.$date['tohour']?>.php</a></li>
</ol>
<ol class="breadcrumb py-1 small">
<li class="breadcrumb-item active">모바일 : </li>
<li class="breadcrumb-item">pages</li>
<li class="breadcrumb-item"><?php echo $r ?>-pages</li>
<li class="breadcrumb-item"><a href="#" class="rb-modal-code-mobile" data-toggle="buttons"><?php echo $R['id']?$R['id']:'p'.$date['tohour']?>.mobile.php</a></li>
</ol>
<small>
<ul class="form-text text-muted pl-3 mt-3">
<li>직접편집은 <code>PHP</code> <code>HTML</code> <code>CSS</code> <code>JS</code> 코드로 직접 편집할 수 있습니다.</li>
<li>FTP로 접속후 텍스트 에디터를 통해 파일편집을 추천합니다.</li>
<li>간단한 편집은 <a href="#" data-toggle="buttons" class="badge badge-dark rb-modal-code"><i class="fa fa-code"></i> 편집기</a> 활용하시면 편리합니다.</li>
</ul>
</small>
</div>
</div>
<div class="form-group row<?php if($R['pagetype']!=3):?> d-none<?php endif?>" id="editBox3">
<div class="col-lg-10 col-xl-9 offset-lg-2">
<div class="btn-group">
<button type="button" class="btn btn-light rb-modal-wysiwyg">기본</button>
<button type="button" class="btn btn-light rb-modal-wysiwyg-mobile">모바일 전용</button>
</div>
<div class="form-text mt-2">
<small>
<ul class="form-text text-muted pl-3 mt-3">
<li>마크다운 문법을 사용하여 문서를 편집할 수 있습니다.</li>
<li>소스코드로 작성한 페이지를 마크다운으로 재편집하면 소스코드가 변형될 수 있으니 유의하세요.</li>
</ul>
</small>
</div>
</div>
</div>
<div class="form-group row<?php if($R['pagetype']!=1):?> d-none<?php endif?>" id="editBox1">
<div class="col-lg-10 col-xl-9 offset-lg-2">
<fieldset>
<div class="input-group">
<input type="text" name="joint" id="jointf" value="<?php echo $R['joint']?>" class="form-control">
<span class="input-group-append">
<button class="btn btn-light rb-modal-module" type="button" title="모듈연결" data-tooltip="tooltip" data-toggle="modal" data-target="#modal_window"><i class="fa fa-link fa-lg"></i></button>
<button class="btn btn-light" type="button" title="미리보기" data-tooltip="tooltip" onclick="getId('jointf').value!=''?window.open(getId('jointf').value):alert('모듈연결 주소를 등록해 주세요.');">Go!</button>
</span>
</div>
</fieldset>
<small class="form-text text-muted mt-2">
<ul class="list-unstyled mb-0">
<li>이 페이지에 연결시킬 모듈이 있을 경우 모듈연결을 클릭한 후 선택해 주세요.</li>
<li>모듈 연결주소가 지정되면 이 메뉴를 호출시 해당 연결주소의 모듈이 출력됩니다.</li>
<li>접근권한은 연결된 모듈의 권한설정을 따릅니다.</li>
</ul>
</small>
</div>
</div>
</div>
<?php if($R['uid']):?>
<?php $_url_1 = $g['s'].'/index.php?r='.$r.'&mod='.$R['id']?>
<?php $_url_2 = $g['s'].'/'.$r.'/p/'.$R['id']?>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">주소</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group mb-2">
<div class="input-group-prepend">
<span class="input-group-text">물리주소</span>
</div>
<input type="text" id="_url_m_1_" class="form-control" value="<?php echo $_url_1?>">
<span class="input-group-append">
<a href="#." class="btn btn-light js-clipboard" data-tooltip="tooltip" title="클립보드에 복사" data-clipboard-target="#_url_m_1_"><i class="fa fa-clipboard"></i></a>
<a href="<?php echo $_url_1?>" target="_blank" class="btn btn-light" data-tooltip="tooltip" title="접속">Go!</a>
</span>
</div>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">고유주소</span>
</div>
<input type="text" id="_url_m_2_" class="form-control" value="<?php echo $_url_2?>">
<span class="input-group-append">
<a href="#." class="btn btn-light js-clipboard" data-tooltip="tooltip" title="클립보드에 복사" data-clipboard-target="#_url_m_2_"><i class="fa fa-clipboard"></i></a>
<a href="<?php echo $_url_2?>" target="_blank" class="btn btn-light" data-tooltip="tooltip" title="접속">Go!</a>
</span>
</div>
<?php if (!$R['ismain']): ?>
<div class="input-group mt-2">
<div class="input-group-prepend">
<span class="input-group-text">코드삽입</span>
</div>
<input id="_url_m_3_" type="text" class="form-control" value="&lt;?php echo RW('mod=<?php echo $R['id']?>') ?&gt;" readonly>
<span class="input-group-append">
<a href="#." class="btn btn-light js-clipboard" data-tooltip="tooltip" title="클립보드에 복사" data-clipboard-target="#_url_m_3_"><i class="fa fa-clipboard"></i></a>
</span>
</div>
<?php endif; ?>
</div>
</div>
<?php endif?>
<div class="panel-group" id="page-settings">
<div class="card mb-2" id="page-settings-meta">
<div class="card-header p-0">
<a class="d-block pl-3 pr-4 muted-link<?php if(!$uid && $_SESSION['sh_site_page_1']!=1):?> collapsed<?php endif?>" data-toggle="collapse" href="#page-settings-meta-body">
메타설정
</a>
</div>
<div id="page-settings-meta-body" class="panel-collapse collapse<?php if($uid && $_SESSION['sh_site_page_1']==1):?> show<?php endif?>" data-parent="#page-settings">
<div class="card-body">
<div class="form-group row rb-outside">
<label class="col-lg-2 col-form-label text-lg-right">타이틀</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group">
<input type="text" class="form-control rb-title" name="title" value="<?php echo $_SEO['title']?>" maxlength="60" placeholder="50-60자 내에서 작성해 주세요.">
<span class="input-group-append">
<button class="btn btn-light rb-help-btn" type="button" data-toggle="collapse" data-target="#guide_title" data-tooltip="tooltip" title="도움말"><i class="fa fa-question fa-lg text-muted"></i></button>
</span>
</div>
<div class="help-block collapse" id="guide_title">
<small>
<code>&lt;meta name=&quot;title&quot; content=&quot;&quot;&gt;</code> 내부에 삽입됩니다.
</small>
</div>
</div>
</div>
<div class="form-group row rb-outside">
<label class="col-lg-2 col-form-label text-lg-right">설명</label>
<div class="col-lg-10 col-xl-9">
<textarea name="description" class="form-control rb-description_" rows="5" placeholder="150-160자 내에서 작성해 주세요."><?php echo $_SEO['description']?></textarea>
<a class="badge badge-pill badge-dark mt-2" href="#guide_description" data-toggle="collapse" ><i class="fa fa-question-circle fa-fw"></i>도움말</a>
<div class="collapse" id="guide_description">
<small class="help-block">
<code>&lt;meta name=&quot;description&quot; content=&quot;&quot;&gt;</code> 내부에 삽입됩니다.<br>
검색 결과에 표시되는 문자를 지정합니다.<br>설명글은 엔터없이 입력해 주세요.<br>
보기)웹 프레임워크의 혁신 - 킴스큐 Rb 에 대한 다운로드,팁 공유등을 제공합니다. <a href=&quot;http://moz.com/learn/seo/meta-description&quot; target=&quot;_blank&quot;>참고</a><br>
</small>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">키워드</label>
<div class="col-lg-10 col-xl-9">
<input name="keywords" class="form-control" placeholder="콤마(,)로 구분하여 입력해 주세요." value="<?php echo $_SEO['keywords']?>">
<a class="badge badge-pill badge-dark mt-2" href="#guide_keywords" data-toggle="collapse" ><i class="fa fa-question-circle fa-fw"></i>도움말</a>
<div class="help-block collapse" id="guide_keywords">
<small>
<code>&lt;meta name=&quot;keywords&quot; content=&quot;&quot;&gt;</code> 내부에 삽입됩니다.<br>
핵심 키워드를 콤마로 구분하여 20개 미만으로 엔터없이 입력해 주세요.<br>
보기)킴스큐,킴스큐Rb,CMS,웹프레임워크,큐마켓<br>
</small>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">크롤링</label>
<div class="col-lg-10 col-xl-9">
<input name="classification" class="form-control" placeholder="" value="<?php echo $_SEO['uid']?$_SEO['classification']:'ALL'?>">
<a class="badge badge-pill badge-dark mt-2" href="#guide_classification" data-toggle="collapse" ><i class="fa fa-question-circle fa-fw"></i>도움말</a>
<div class="help-block collapse" id="guide_classification">
<small class="help-block">
<code>&lt;meta name=&quot;robots&quot; content=&quot;&quot;&gt;</code> 내부에 삽입됩니다.<br>
all,noindex,nofollow,none 등으로 지정할 수 있습니다.<br>
</small>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">메타이미지</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group">
<input class="form-control rb-modal-photo-drop" onmousedown="_mediasetField='meta_image_src&dfiles='+this.value;" data-tooltip="tooltip" data-toggle="modal" data-target="#modal_window" type="text" name="image_src" id="meta_image_src" value="<?php echo $_SEO['image_src']?$_SEO['image_src']:''?>">
<div class="input-group-append">
<button class="btn btn-light rb-modal-photo1" type="button" title="포토셋" data-tooltip="tooltip" data-toggle="modal" data-target="#modal_window">
<i class="fa fa-photo fa-lg"></i>
</button>
</div>
</div>
<a class="badge badge-pill badge-dark mt-2" href="#guide_image_src" data-toggle="collapse" ><i class="fa fa-question-circle fa-fw"></i>도움말</a>
<div class="help-block collapse" id="guide_image_src">
<small class="help-block">
이미지를 등록하시면 소셜미디어에 이 이미지를 포함하여 전송할 수 있습니다.<br>
이미지를 직접 지정하려면 이미지의 URL을 입력해 주세요.<br>
</small>
</div>
</div>
</div>
</div>
<div class="card-footer">
<small class="text-muted">
<i class="fa fa-info-circle fa-lg fa-fw"></i> meta 정보 설정은 검색엔진최적화, 소셜미디어 최적화와 직접 관련이 있습니다.
</small>
</div>
</div>
</div>
<div class="card" id="page-settings-advance">
<div class="card-header p-0">
<a class="d-block pl-3 pr-4 muted-link<?php if(!$uid && $_SESSION['sh_site_page_1']!=2):?> collapsed<?php endif?>" data-toggle="collapse" href="#page-settings-advance-body">
고급설정
</a>
</div>
<div id="page-settings-advance-body" class="panel-collapse collapse<?php if($uid && $_SESSION['sh_site_page_1']==2):?> show<?php endif?>" data-parent="#page-settings">
<div class="card-body">
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">레이아웃</label>
<div class="col-lg-10 col-xl-9">
<div class="form-row">
<?php $_layoutExp1=explode('/',$R['layout'])?>
<?php if (!is_dir($g['path_layout'].$_layoutExp1[0])): ?>
<div class="col-sm-12">
<div class="alert alert-danger">
지정된 <?php echo $g['path_layout'].$_layoutExp1[0] ?> 레이아웃이 존재하지 않습니다. 변경해 주세요.
</div>
</div>
<div class="col-sm-6" id="rb-layout-select">
<select class="form-control custom-select" name="layout_1" required onchange="getSubLayout(this,'rb-layout-select2','layout_1_sub','custom-select');">
<?php $_layoutHexp=explode('/',$_HS['layout'])?>
<option value="0">사이트 레이아웃 (<?php echo $_layoutHexp[0]?>)</option>
<option disabled>--------------------</option>
<?php $dirs = opendir($g['path_layout'])?>
<?php while(false !== ($tpl = readdir($dirs))):?>
<?php if($tpl=='.' || $tpl == '..' || $tpl == '_blank' || is_file($g['path_layout'].$tpl))continue?>
<option value="<?php echo $tpl?>"><?php echo getFolderName($g['path_layout'].$tpl)?> (<?php echo $tpl?>)</option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="col-sm-6" id="rb-layout-select2">
<select class="form-control custom-select" name="layout_1_sub"<?php if(!$R['layout']):?> disabled<?php endif?>>
</select>
</div>
<?php else: ?>
<div class="col-sm-6" id="rb-layout-select">
<select class="form-control custom-select" name="layout_1" required onchange="getSubLayout(this,'rb-layout-select2','layout_1_sub','custom-select');">
<?php $_layoutHexp=explode('/',$_HS['layout'])?>
<option value="0">사이트 레이아웃 (<?php echo $_layoutHexp[0]?>)</option>
<option disabled>--------------------</option>
<?php $dirs = opendir($g['path_layout'])?>
<?php while(false !== ($tpl = readdir($dirs))):?>
<?php if($tpl=='.' || $tpl == '..' || $tpl == '_blank' || is_file($g['path_layout'].$tpl))continue?>
<option value="<?php echo $tpl?>"<?php if($_layoutExp1[0]==$tpl):?> selected<?php endif?>><?php echo getFolderName($g['path_layout'].$tpl)?> (<?php echo $tpl?>)</option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="col-sm-6" id="rb-layout-select2">
<select class="form-control custom-select" name="layout_1_sub"<?php if(!$R['layout']):?> disabled<?php endif?>>
<?php if(!$R['layout']):?><option>서브 레이아웃</option><?php endif?>
<?php $dirs1 = opendir($g['path_layout'].$_layoutExp1[0])?>
<?php while(false !== ($tpl1 = readdir($dirs1))):?>
<?php if(!strstr($tpl1,'.php') || $tpl1=='_main.php')continue?>
<option value="<?php echo $tpl1?>"<?php if($_layoutExp1[1]==$tpl1):?> selected<?php endif?>><?php echo str_replace('.php','',$tpl1)?></option>
<?php endwhile?>
<?php closedir($dirs1)?>
</select>
</div>
<?php endif; ?>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">
<span class="badge badge-dark">모바일</span>
</label>
<div class="col-lg-10 col-xl-9">
<div class="form-row">
<?php $_layoutExp1=explode('/',$R['m_layout'])?>
<?php if (!is_dir($g['path_layout'].$_layoutExp1[0])): ?>
<div class="col-sm-12">
<div class="alert alert-danger">
지정된 <?php echo $g['path_layout'].$_layoutExp1[0] ?> 레이아웃이 존재하지 않습니다. 변경해 주세요.
</div>
</div>
<div class="col-sm-6" id="rb-m_layout-select">
<select class="form-control custom-select" name="m_layout_1" onchange="getSubLayout(this,'rb-m_layout-select2','m_layout_1_sub','custom-select');">
<?php if ($_HS['m_layout']): ?>
<?php $_layoutHexp=explode('/',$_HS['m_layout'])?>
<option value="0">사이트 레이아웃 (<?php echo $_layoutHexp[0]?>)</option>
<?php else: ?>
<option value="0">&nbsp;사용안함 (기본 레이아웃 적용)</option>
<?php endif; ?>
<option disabled>--------------------</option>
<?php $dirs = opendir($g['path_layout'])?>
<?php while(false !== ($tpl = readdir($dirs))):?>
<?php if($tpl=='.' || $tpl == '..' || $tpl == '_blank' || is_file($g['path_layout'].$tpl))continue?>
<option value="<?php echo $tpl?>"><?php echo getFolderName($g['path_layout'].$tpl)?>(<?php echo $tpl?>)</option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="col-sm-6" id="rb-m_layout-select2">
<select class="form-control custom-select" name="m_layout_1_sub"<?php if(!$R['m_layout']):?> disabled<?php endif?>>
</select>
</div>
<?php else: ?>
<div class="col-sm-6" id="rb-m_layout-select">
<select class="form-control custom-select" name="m_layout_1" onchange="getSubLayout(this,'rb-m_layout-select2','m_layout_1_sub','custom-select');">
<?php if ($_HS['m_layout']): ?>
<?php $_layoutHexp=explode('/',$_HS['m_layout'])?>
<option value="0">사이트 레이아웃 (<?php echo $_layoutHexp[0]?>)</option>
<?php else: ?>
<option value="0">&nbsp;사용안함 (기본 레이아웃 적용)</option>
<?php endif; ?>
<option disabled>--------------------</option>
<?php $dirs = opendir($g['path_layout'])?>
<?php while(false !== ($tpl = readdir($dirs))):?>
<?php if($tpl=='.' || $tpl == '..' || $tpl == '_blank' || is_file($g['path_layout'].$tpl))continue?>
<option value="<?php echo $tpl?>"<?php if($_layoutExp1[0]==$tpl):?> selected<?php endif?>><?php echo getFolderName($g['path_layout'].$tpl)?>(<?php echo $tpl?>)</option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="col-sm-6" id="rb-m_layout-select2">
<select class="form-control custom-select" name="m_layout_1_sub"<?php if(!$R['m_layout']):?> disabled<?php endif?>>
<?php if(!$R['m_layout']):?><option value="0">서브 레이아웃</option><?php endif?>
<?php $dirs1 = opendir($g['path_layout'].$_layoutExp1[0])?>
<?php while(false !== ($tpl1 = readdir($dirs1))):?>
<?php if(!strstr($tpl1,'.php') || $tpl1=='_main.php')continue?>
<option value="<?php echo $tpl1?>"<?php if($_layoutExp1[1]==$tpl1):?> selected<?php endif?>><?php echo str_replace('.php','',$tpl1)?></option>
<?php endwhile?>
<?php closedir($dirs1)?>
</select>
</div>
<?php endif; ?>
</div>
<small class="d-block mt-2 form-text text-muted">모바일 레이아웃을 지정하지 않으면 데스크탑 레이아웃으로 설정됩니다.</small>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">분류</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group">
<input class="form-control" type="text" name="category" value="<?php echo $R['category']?$R['category']:$_cats[0]?>">
<div class="input-group-append">
<button class="btn btn-light dropdown-toggle" data-toggle="dropdown" type="button">
<span class="caret"></span>
</button>
<div class="dropdown-menu dropdown-menu-right">
<?php foreach($_cats as $_val):?>
<a class="dropdown-item" href="#." onclick="document.procForm.category.value=this.innerHTML;"><?php echo $_val?></a>
<?php endforeach?>
<?php if(count($_cats)):?>
<div class="dropdown-divider"></div>
<?php endif?>
<a class="dropdown-item" href="#." onclick="document.procForm.category.value='';document.procForm.category.focus();">직접입력</a>
</div>
</div>
</div>
<ul class="rb-guide" style="border-top:0;">
<li>관리가 편하도록 페이지분류를 적절히 지정하여 등록해 주세요.</li>
<li>페이지 분류는 직접 입력하거나 이미 등록된 분류를 선택할 수 있습니다.</li>
<li>분류를 직접입력하면 분류선택기에 자동으로 추가됩니다.</li>
</ul>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">소속메뉴</label>
<div class="col-lg-10 col-xl-9">
<select class="form-control custom-select" name="linkedmenu">
<option value="">사용안함</option>
<?php include $g['path_core'].'function/menu1.func.php'?>
<?php $cat=$R['linkedmenu']?>
<?php getMenuShowSelect($s,$table['s_menu'],0,0,0,0,0,'')?>
</select>
<a class="badge badge-pill badge-dark mt-2" data-toggle="collapse" href="#guide_sosok"><i class="fa fa-question-circle fa-fw"></i>도움말</a>
<ul id="guide_sosok" class="collapse">
<li>이 페이지의 소속메뉴가 종종 필요할 수 있습니다.</li>
<li>특정메뉴의 서브페이지로 사용되기를 원할경우 지정해 주세요.</li>
</ul>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">허용등급</label>
<div class="col-lg-10 col-xl-9">
<select class="form-control custom-select" name="perm_l">
<option value="">전체허용</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']==$R['perm_l']):?> selected<?php endif?>><?php echo sprintf('%s 이상',$_L['name'].'('.number_format($_L['num']).')')?></option>
<?php if($_L['gid'])break; endwhile?>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">차단그룹</label>
<div class="col-lg-10 col-xl-9">
<select class="form-control custom-select" name="_perm_g" multiple size="5">
<option value=""<?php if(!$R['perm_g']):?> 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($R['perm_g'],'['.$_S['uid'].']')):?> selected<?php endif?>><?php echo $_S['name']?>(<?php echo number_format($_S['num'])?>)</option>
<?php endwhile?>
</select>
<a class="badge badge-pill badge-dark mt-2" data-toggle="collapse" href="#guide_permg"><i class="fa fa-question-circle fa-fw"></i>도움말</a>
<ul id="guide_permg" class="collapse">
<li>복수의 그룹을 선택하려면 드래그하거나 <kbd>Ctrl</kbd> 를 누른다음 클릭해 주세요.</li>
</ul>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">캐시적용</label>
<div class="col-lg-10 col-xl-9">
<?php $cachefile = $g['path_page'].$r.'-pages/'.$R['id'].'.txt'?>
<?php $cachetime = file_exists($cachefile) ? implode('',file($cachefile)) : 0?>
<select name="cachetime" class="form-control custom-select">
<option value="">적용안함</option>
<?php for($i = 1; $i < 61; $i++):?>
<option value="<?php echo $i?>"<?php if($cachetime==$i):?> selected="selected"<?php endif?>><?php echo sprintf('%02d 분',$i)?></option>
<?php endfor?>
</select>
<a class="badge badge-pill badge-dark mt-2" data-toggle="collapse" href="#guide_cache"><i class="fa fa-question-circle fa-fw"></i>도움말</a>
<ul id="guide_cache" class="collapse">
<li>DB접속이 많거나 위젯을 많이 사용하는 메뉴일 경우 캐시를 적용하면 서버부하를 줄 일 수 있으며 속도를 높일 수 있습니다.</li>
<li class="text-danger">실시간 처리가 요구되는 메뉴일 경우 적용하지 마세요.</li>
</ul>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">미디어</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group">
<input class="form-control rb-modal-photo-drop" type="text" name="upload" id="mediaset" value="<?php echo $R['upload']?$R['upload']:''?>" onmousedown="_mediasetField='mediaset&dfiles='+this.value;" data-toggle="modal" data-target="#modal_window">
<div class="input-group-append">
<button class="btn btn-light rb-modal-photo" type="button" title="포토셋" data-tooltip="tooltip" data-toggle="modal" data-target="#modal_window">
<i class="fa fa-photo fa-lg"></i>
</button>
<button class="btn btn-light rb-modal-video" type="button" title="비디오셋" data-tooltip="tooltip" data-toggle="modal" data-target="#modal_window">
<i class="fa fa-video-camera fa-lg" aria-hidden="true"></i>
</button>
</div>
</div>
<a class="badge badge-pill badge-dark mt-2" data-toggle="collapse" href="#guide_mediaset"><i class="fa fa-question-circle fa-fw"></i>도움말</a>
<ul id="guide_mediaset" class="collapse">
<li>여기에 연결시킬 미디어 파일을 지정할 수 있습니다.</li>
<li>지정된 미디어는 필요에 따라 사용될 수 있습니다.</li>
</ul>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label text-lg-right">부가필드</label>
<div class="col-lg-10 col-xl-9">
<textarea name="extra" class="form-control" rows="3"><?php echo htmlspecialchars($R['extra'])?></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
<button class="btn btn-outline-primary btn-block btn-lg my-4" id="rb-submit-button" type="submit">
<?php echo $R['uid']?'속성변경':'신규페이지 등록' ?>
</button>
</div><!-- /.card-body -->
</form>
</div>
</div>
<!-- bootstrap-maxlength -->
<?php getImport('bootstrap-maxlength','bootstrap-maxlength.min',false,'js')?>
<script>
$('input.rb-title').maxlength({
alwaysShow: true,
threshold: 10,
warningClass: "label label-success",
limitReachedClass: "label label-danger"
});
$('textarea.rb-description').maxlength({
alwaysShow: true,
threshold: 10,
warningClass: "label label-success",
limitReachedClass: "label label-danger"
});
</script>
<!-- modal -->
<script>
var _mediasetField='';
$(document).ready(function() {
$('.rb-modal-code').on('click',function() {
goHref('<?php echo $g['s']?>/?r=<?php echo $r?>&m=admin&module=site&front=_edit&_mtype=page&uid=<?php echo $R['uid']?>&type=source&cat=<?php echo urlencode($cat)?>&p=<?php echo $p?>&recnum=<?php echo $recnum?>&keyw=<?php echo urlencode($keyw)?>');
});
$('.rb-modal-code-mobile').on('click',function() {
goHref('<?php echo $g['s']?>/?r=<?php echo $r?>&m=admin&module=site&front=_edit&_mtype=page&uid=<?php echo $R['uid']?>&type=source&cat=<?php echo urlencode($cat)?>&p=<?php echo $p?>&recnum=<?php echo $recnum?>&keyw=<?php echo urlencode($keyw)?>&mobileOnly=Y');
});
$('.rb-modal-wysiwyg').on('click',function() {
goHref('<?php echo $g['s']?>/?r=<?php echo $r?>&m=admin&module=site&front=_edit&_mtype=page&uid=<?php echo $R['uid']?>&type=source&wysiwyg=Y&cat=<?php echo urlencode($cat)?>&p=<?php echo $p?>&recnum=<?php echo $recnum?>&keyw=<?php echo urlencode($keyw)?>');
});
$('.rb-modal-wysiwyg-mobile').on('click',function() {
goHref('<?php echo $g['s']?>/?r=<?php echo $r?>&m=admin&module=site&front=_edit&_mtype=page&uid=<?php echo $R['uid']?>&type=source&wysiwyg=Y&cat=<?php echo urlencode($cat)?>&p=<?php echo $p?>&recnum=<?php echo $recnum?>&keyw=<?php echo urlencode($keyw)?>&mobileOnly=Y');
});
$('.rb-modal-module').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;system=popup.joint&amp;dropfield=jointf&amp;cmodule=[site]')?>');
});
$('.rb-modal-photo').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=mediaset&amp;mdfile=modal.photo.media&amp;dropfield=mediaset')?>');
});
$('.rb-modal-photo1').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=mediaset&amp;mdfile=modal.photo.media&amp;dropfield=meta_image_src')?>');
});
$('.rb-modal-video').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=mediaset&amp;mdfile=modal.video.media&amp;dropfield=mediaset')?>');
});
$('.rb-modal-photo-drop').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=mediaset&amp;mdfile=modal.photo.media&amp;dropfield=')?>'+_mediasetField);
});
$('#page-settings-meta-body').on('show.bs.collapse', function () {
sessionSetting('sh_site_page_1','1','','')
})
$('#page-settings-meta-body').on('hidden.bs.collapse', function () {
sessionSetting('sh_site_page_1','','','')
})
$('#page-settings-advance-body').on('show.bs.collapse', function () {
sessionSetting('sh_site_page_1','2','','')
})
$('#page-settings-advance-body').on('hidden.bs.collapse', function () {
sessionSetting('sh_site_page_1','','','')
})
});
</script>
<!-- bootstrap Validator -->
<?php getImport('bootstrap-validator','dist/css/bootstrapValidator.min',false,'css')?>
<?php getImport('bootstrap-validator','dist/js/bootstrapValidator.min',false,'js')?>
<script>
//사이트 셀렉터 출력
$('[data-role="siteSelector"]').removeClass('d-none')
putCookieAlert('result_page') // 실행결과 알림 메시지 출력
$('[name="procForm"]').bootstrapValidator({
message: 'This value is not valid',
<?php if(!$g['device']):?>
feedbackIcons: {
valid: 'fa fa-check',
invalid: 'fa fa-times',
validating: 'fa fa-refresh'
},
<?php endif?>
fields: {
name: {
message: 'The username is not valid',
validators: {
notEmpty: {
message: '페이지명을 입력해 주세요.'
}
}
},
id: {
validators: {
notEmpty: {
message: '페이지 코드를 입력해 주세요.'
},
regexp: {
regexp: /^[a-zA-Z0-9\_\-]+$/,
message: '페이지 코드는 영문대소문자/숫자/_/- 만 사용할 수 있습니다.'
}
}
},
}
});
</script>
<!-- basic -->
<script>
function saveCheck(f)
{
var l1 = f._perm_g;
var n1 = l1.length;
var i;
var s1 = '';
for (i = 0; i < n1; i++)
{
if (l1[i].selected == true && l1[i].value != '')
{
s1 += '['+l1[i].value+']';
}
}
f.perm_g.value = s1;
<?php if($R['pagetype']=='1'):?>
if (f.pagetype.value == '1')
{
if (f.joint.value == '')
{
alert('모듈을 연결해 주세요.');
f.joint.focus();
return false;
}
}
<?php endif?>
if(f.layout_1.value != '0') f.layout.value = f.layout_1.value + '/' + f.layout_1_sub.value;
else f.layout.value = '';
if(f.m_layout_1.value != '0') f.m_layout.value = f.m_layout_1.value + '/' + f.m_layout_1_sub.value;
else f.m_layout.value = '';
getIframeForAction(f);
//return confirm('정말로 실행하시겠습니까? ');
}
function boxDeco(layer1,layer2)
{
if(getId(layer1).className.indexOf('default') == -1) $("#"+layer1).addClass("border-light").removeClass("border-primary");
else $("#"+layer1).addClass("border-primary").removeClass("border-light");
$("#"+layer2).addClass("border-light").removeClass("border-primary");
}
function getSearchFocus()
{
if(getId('panel-search').className.indexOf('in') == -1) setTimeout("document.forms[0].keyw.focus();",100);
}
function docType(n,str)
{
getId('rb-document-type').innerHTML = str;
$('#editBox1').addClass('d-none');
$('#editBox2').addClass('d-none');
$('#editBox3').addClass('d-none');
$('#editBox'+n).removeClass('d-none');
if(document.procForm.layout_1.value != '0') document.procForm.layout.value = document.procForm.layout_1.value + '/' + document.procForm.layout_1_sub.value;
else document.procForm.layout.value = '';
if(document.procForm.m_layout_1.value != '0') document.procForm.m_layout.value = document.procForm.m_layout_1.value + '/' + document.procForm.m_layout_1_sub.value;
else document.procForm.m_layout.value = '';
getIframeForAction(document.procForm);
document.procForm.pagetype.value = n;
document.procForm.submit();
}
</script>

View File

@@ -0,0 +1,66 @@
<?php
$dropButtonUrl = ''; //모듈연결하기 버튼에 지정할 URL(미 지정시 모듈연결버튼 생략)
$recnum = 15;
$catque = 'site='.$s.' and pagetype>1';
if ($cat) $catque .= " and category='".$cat."'";
if ($_keyw) $catque .= " and ".$where." like '".$_keyw."%'";
$PAGES = getDbArray($table['s_page'],$catque,'*','uid','asc',$recnum,$p);
$NUM = getDbRows($table['s_page'],$catque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div id="mjointbox">
<div class="title">
<form class="form-inline rb-form" role="form" action="<?php echo $g['s']?>/" method="get">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="system" value="<?php echo $system?>">
<input type="hidden" name="iframe" value="<?php echo $iframe?>" />
<input type="hidden" name="dropfield" value="<?php echo $dropfield?>">
<input type="hidden" name="smodule" value="<?php echo $smodule?>">
<input type="hidden" name="cmodule" value="<?php echo $cmodule?>">
<input type="hidden" name="p" value="<?php echo $p?>">
<select class="form-control custom-select form-control-sm" name="cat" class="cat" onchange="this.form.submit();">
<option value="">&nbsp;+ 페이지분류</option>
<?php $_cats=array()?>
<?php $CATS=db_query("select *,count(*) as cnt from ".$table['s_page']." group by category",$DB_CONNECT)?>
<?php while($C=db_fetch_array($CATS)):$_cats[]=$C['category']?>
<option value="<?php echo $C['category']?>"<?php if($C['category']==$cat):?> selected<?php endif?>>ㆍ<?php echo $C['category']?> (<?php echo $C['cnt']?>)</option>
<?php endwhile?>
</select>
<select class="form-control custom-select form-control-sm ml-1" name="where">
<option value="name"<?php if($where == 'name'):?> selected="selected"<?php endif?>>페이지명</option>
<option value="id"<?php if($where == 'id'):?> selected="selected"<?php endif?>>페이지코드</option>
</select>
<input class="form-control form-control-sm ml-1" placeholder="" type="text" name="_keyw" size="10" value="<?php echo addslashes($_keyw)?>">
<input type="submit" value=" 검색 " class="btn btn-light btn-sm ml-1">
<input type="button" value=" 리셋 " class="btn btn-light btn-sm ml-1" onclick="this.form.p.value=1;this.form.cat.value='';this.form._keyw.value='';this.form.submit();">
</form>
</div>
<?php if($NUM):?>
<table class="table table-sm table-hover">
<?php while($PR = db_fetch_array($PAGES)):?>
<tr>
<td class="align-middle pl-2">
<a href="<?php echo RW('mod='.$PR['id'])?>" target="_blank" title="페이지보기" data-tooltip="tooltip" class="muted-link">

View File

@@ -0,0 +1,5 @@
<?php
$d['amenu']['main'] ='사이트';
$d['amenu']['menu'] = '메뉴';
$d['amenu']['page'] = '페이지';
?>