first
This commit is contained in:
4
modules/site/README.md
Normal file
4
modules/site/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
## Copyright and license
|
||||
Copyright 2020 Redblock, Inc.
|
||||
|
||||
Licensed under the [RBL](https://kimsq.com/p/rbl) License
|
||||
14
modules/site/action/a.clear_wcache.php
Normal file
14
modules/site/action/a.clear_wcache.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
include $g['path_core'].'function/dir.func.php';
|
||||
|
||||
$w_dir = $g['path_tmp'].'widget';
|
||||
DirDelete($w_dir);
|
||||
mkdir($w_dir,0707);
|
||||
@chmod($w_dir,0707);
|
||||
|
||||
getLink('reload','parent.frames._ADMPNL_.','위젯 캐시가 재생성 되었습니다.','');
|
||||
?>
|
||||
37
modules/site/action/a.deletelayoutpage.php
Normal file
37
modules/site/action/a.deletelayoutpage.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$_HS = getDbData($table['s_site'],"id='".$r."'",'*');
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
|
||||
$layout = dirname($_HS['m_layout']);
|
||||
$noti_type = 'default';
|
||||
} else {
|
||||
$layout = dirname($_HS['layout']);
|
||||
$noti_type = 'success';
|
||||
}
|
||||
|
||||
//사이트별 레이아웃 메인화면 위젯
|
||||
$g['layoutPageVarForSite'] = $g['path_var'].'site/'.$r.'/layout.'.$layout.'.'.$page.'.php';
|
||||
@unlink($g['layoutPageVarForSite'] );
|
||||
|
||||
$result=array();
|
||||
$result['error'] = false;
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
|
||||
|
||||
include $g['path_layout'].$layout.'/_var/_var.'.$page.'.php';
|
||||
$result['list'] = getWidgetListEdit($d['layout'][$area]);
|
||||
|
||||
} else {
|
||||
|
||||
setrawcookie('site_common_result', rawurlencode('구성이 초기화 되었습니다|'.$noti_type.'')); // 처리여부 cookie 저장
|
||||
|
||||
}
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
|
||||
?>
|
||||
55
modules/site/action/a.deletemenu.php
Normal file
55
modules/site/action/a.deletemenu.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
if (!$cat) getLink('./?m=admin&module='.$m.'&front=menu','parent.','','');
|
||||
|
||||
include $g['path_core'].'function/menu.func.php';
|
||||
$subQue = getMenuCodeToSql($table['s_menu'],$cat,'uid');
|
||||
|
||||
if ($subQue)
|
||||
{
|
||||
$DAT = getDbSelect($table['s_menu'],$subQue,'*');
|
||||
while($R=db_fetch_array($DAT))
|
||||
{
|
||||
getDbDelete($table['s_menu'],'uid='.$R['uid']);
|
||||
getDbDelete($table['s_seo'],'rel=1 and parent='.$R['uid']);
|
||||
|
||||
$_xfile = $g['path_page'].$r.'-menus/'.$R['id'];
|
||||
|
||||
unlink($_xfile.'.php');
|
||||
@unlink($_xfile.'.mobile.php');
|
||||
@unlink($_xfile.'.css');
|
||||
@unlink($_xfile.'.js');
|
||||
@unlink($_xfile.'.header.php');
|
||||
@unlink($_xfile.'.footer.php');
|
||||
|
||||
@unlink($_xfile.'.txt');
|
||||
@unlink($_xfile.'.cache');
|
||||
@unlink($_xfile.'.mobile.cache');
|
||||
|
||||
@unlink($g['path_var'].'menu/'.$R['imghead']);
|
||||
@unlink($g['path_var'].'menu/'.$R['imgfoot']);
|
||||
}
|
||||
|
||||
if ($parent)
|
||||
{
|
||||
if (!getDbRows($table['s_menu'],'parent='.$parent))
|
||||
{
|
||||
getDbUpdate($table['s_menu'],'is_child=0','uid='.$parent);
|
||||
}
|
||||
}
|
||||
db_query("OPTIMIZE TABLE ".$table['s_menu'],$DB_CONNECT);
|
||||
}
|
||||
|
||||
setrawcookie('result_menu', rawurlencode('메뉴가 삭제 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
|
||||
if ($back=='Y')
|
||||
{
|
||||
getLink($g['s'].'/?r='.$r.'&m=admin&module='.$m.'&front=menu','parent.','','');
|
||||
}
|
||||
else {
|
||||
getLink($g['s'].'/?r='.$r.'&m=admin&module='.$m.'&front=menu&cat='.$parent.'&code='.$code,'parent.','','');
|
||||
}
|
||||
?>
|
||||
39
modules/site/action/a.deletepage.php
Normal file
39
modules/site/action/a.deletepage.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$R = getUidData($table['s_page'],$uid);
|
||||
|
||||
getDbDelete($table['s_page'],'uid='.$R['uid']);
|
||||
getDbDelete($table['s_seo'],'rel=2 and parent='.$R['uid']);
|
||||
|
||||
$_xfile = $g['path_page'].$r.'-pages/'.$R['id'];
|
||||
|
||||
unlink($_xfile.'.php');
|
||||
|
||||
@unlink($_xfile.'.mobile.php');
|
||||
@unlink($_xfile.'.css');
|
||||
@unlink($_xfile.'.js');
|
||||
|
||||
@unlink($_xfile.'.txt');
|
||||
@unlink($_xfile.'.cache');
|
||||
@unlink($_xfile.'.mobile.cache');
|
||||
|
||||
if($_HS['startpage'] && $_HS['startpage'] == $R['uid'])
|
||||
{
|
||||
getDbUpdate($table['s_site'],'startpage=0','uid='.$s);
|
||||
}
|
||||
|
||||
db_query("OPTIMIZE TABLE ".$table['s_page'],$DB_CONNECT);
|
||||
|
||||
setrawcookie('result_page', rawurlencode('페이지가 삭제 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
|
||||
if ($back=='Y')
|
||||
{
|
||||
getLink($g['s'].'/?r='.$r.'&m=admin&module='.$m.'&front=page','parent.','','');
|
||||
}
|
||||
else {
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
?>
|
||||
59
modules/site/action/a.deletesite.php
Normal file
59
modules/site/action/a.deletesite.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$exists_bbs = getDbRows($table['bbslist'],'site='.$account);
|
||||
if ($exists_bbs) {
|
||||
setrawcookie('result_site', rawurlencode('사이트에 소속된 게시판을 삭제해 주세요.|danger'));
|
||||
getLink('reload','parent.parent.','','');
|
||||
}
|
||||
|
||||
$R = getUidData($table['s_site'],$account);
|
||||
if ($R['uid'])
|
||||
{
|
||||
getDbDelete($table['s_site'],'uid='.$R['uid']);
|
||||
getDbDelete($table['s_seo'],'rel=0 and parent='.$R['uid']);
|
||||
|
||||
$_MENUS = getDbSelect($table['s_menu'],'site='.$R['uid'].' order by gid asc','*');
|
||||
while($_M = db_fetch_array($_MENUS))
|
||||
{
|
||||
@unlink($g['path_var'].'menu/'.$_M['imghead']);
|
||||
@unlink($g['path_var'].'menu/'.$_M['imgfoot']);
|
||||
|
||||
getDbDelete($table['s_seo'],'rel=1 and parent='.$_M['uid']);
|
||||
}
|
||||
|
||||
$_PAGES = getDbSelect($table['s_page'],'site='.$R['uid'].' order by uid asc','*');
|
||||
while($_P = db_fetch_array($_PAGES))
|
||||
{
|
||||
getDbDelete($table['s_seo'],'rel=2 and parent='.$_P['uid']);
|
||||
}
|
||||
|
||||
getDbDelete($table['s_menu'],'site='.$R['uid']);
|
||||
getDbDelete($table['s_page'],'site='.$R['uid']);
|
||||
getDbDelete($table['s_uploadcat'],'site='.$R['uid']);
|
||||
|
||||
db_query("OPTIMIZE TABLE ".$table['s_site'],$DB_CONNECT);
|
||||
db_query("OPTIMIZE TABLE ".$table['s_menu'],$DB_CONNECT);
|
||||
db_query("OPTIMIZE TABLE ".$table['s_page'],$DB_CONNECT);
|
||||
db_query("OPTIMIZE TABLE ".$table['s_seo'],$DB_CONNECT);
|
||||
db_query("OPTIMIZE TABLE ".$table['s_uploadcat'],$DB_CONNECT);
|
||||
|
||||
unlink($g['path_var'].'sitephp/'.$account.'.php');
|
||||
|
||||
include $g['path_core'].'function/dir.func.php';
|
||||
if(is_dir($g['path_page'].$R['id'].'-menus')) DirDelete($g['path_page'].$R['id'].'-menus');
|
||||
if(is_dir($g['path_page'].$R['id'].'-pages')) DirDelete($g['path_page'].$R['id'].'-pages');
|
||||
if(is_dir($g['path_var'].'site/'.$R['id'])) DirDelete($g['path_var'].'site/'.$R['id']);
|
||||
}
|
||||
setrawcookie('result_site', rawurlencode('사이트가 삭제 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
|
||||
if (!getDbRows($table['s_site'],''))
|
||||
{
|
||||
getLink($g['s'].'/','parent.parent.','','');
|
||||
}
|
||||
else {
|
||||
getLink($g['s'].'/?m=admin&pickmodule='.$m.'&panel=Y','parent.parent.','','');
|
||||
}
|
||||
?>
|
||||
15
modules/site/action/a.deletewidget.php
Normal file
15
modules/site/action/a.deletewidget.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$pwd = trim($pwd);
|
||||
|
||||
if (!$pwd || !strstr(substr($pwd,0,10),'widget')) exit;
|
||||
|
||||
include $g['path_core'].'function/dir.func.php';
|
||||
DirDelete($pwd);
|
||||
|
||||
$newPwd = str_replace('/'.basename($pwd).'/','/',$pwd);
|
||||
getLink($g['s'].'/?r='.$r.'&system=popup.widget&iframe=Y&isWcode=Y&pwd='.urlencode($newPwd),'parent.','','');
|
||||
?>
|
||||
238
modules/site/action/a.dumpmenu.php
Normal file
238
modules/site/action/a.dumpmenu.php
Normal file
@@ -0,0 +1,238 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
//메뉴->XML출력
|
||||
function getMenuXml($site,$table,$j,$parent,$depth,$uid,$code)
|
||||
{
|
||||
global $g;
|
||||
static $j,$string;
|
||||
$xdepth = $depth+1;
|
||||
|
||||
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'depth='.$xdepth.' and parent='.$parent.' and hidden=0 order by gid asc','*');
|
||||
while($C=db_fetch_array($CD))
|
||||
{
|
||||
$j++;
|
||||
$code = $code.$C['id'].'/';
|
||||
$_code = substr($code,0,strlen($code)-1);
|
||||
|
||||
if ($xdepth==1)
|
||||
{
|
||||
$string .= "\t<!-- ".$C['name']."-->\n\t";
|
||||
}
|
||||
else {
|
||||
for ($i = 0; $i < $xdepth; $i++) $string .= "\t";
|
||||
}
|
||||
$string .= '<depth'.$xdepth.' name="'.$C['name'].'" ename="'.$C['id'].'" link="'.RW('c='.$_code).'" target="'.$C['target'];
|
||||
|
||||
if ($C['is_child'])
|
||||
{
|
||||
$string .= '">'."\n";
|
||||
getMenuXml($site,$table,$j,$C['uid'],$C['depth'],$uid,$code);
|
||||
|
||||
for ($i = 0; $i < $xdepth; $i++) $string .= "\t";
|
||||
$string .= '</depth'.$xdepth.'>'."\n";
|
||||
}
|
||||
else {
|
||||
$string .= '" />'."\n";
|
||||
}
|
||||
if ($xdepth==1) $string .= "\n";
|
||||
$code = '';
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
//메뉴->XLS출력
|
||||
function getMenuXls($site,$table,$j,$parent,$depth,$uid,$mset,$code)
|
||||
{
|
||||
global $g,$r;
|
||||
static $j,$string;
|
||||
$xdepth = $depth+1;
|
||||
|
||||
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'depth='.$xdepth.' and parent='.$parent.' order by gid asc','*');
|
||||
while($C=db_fetch_array($CD))
|
||||
{
|
||||
$j++;
|
||||
$code = $code.$C['id'].'/';
|
||||
$_code = substr($code,0,strlen($code)-1);
|
||||
|
||||
$string .= '<tr>';
|
||||
$string .= '<td>'.$xdepth.'</td>';
|
||||
$string .= '<td>'.($xdepth==1?$C['name']:'').'</td>';
|
||||
$string .= '<td>'.($xdepth==2?$C['name']:'').'</td>';
|
||||
$string .= '<td>'.($xdepth==3?$C['name']:'').'</td>';
|
||||
$string .= '<td>'.($xdepth==4?$C['name']:'').'</td>';
|
||||
$string .= '<td>'.($xdepth==5?$C['name']:'').'</td>';
|
||||
$string .= '<td>'.$C['uid'].'</td>';
|
||||
$string .= '<td>'.$C['id'].'</td>';
|
||||
$string .= '<td>'.RW('c='.$_code).'</td>';
|
||||
$string .= '<td>'.$g['s'].'/index.php?r='.$r.'&c='.$_code.'</td>';
|
||||
$string .= '<td>'.$mset[$C['menutype']].'</td>';
|
||||
$string .= '<td>'.($C['mobile']?'Y':'').'</td>';
|
||||
$string .= '<td>'.($C['target']?'Y':'').'</td>';
|
||||
$string .= '<td>'.($C['hidden']?'Y':'').'</td>';
|
||||
$string .= '<td>'.($C['reject']?'Y':'').'</td>';
|
||||
$string .= '<td>'.($C['redirect']?'Y':'').'</td>';
|
||||
$string .= '<td>'.$C['joint'].'</td>';
|
||||
$string .= '</tr>';
|
||||
|
||||
if ($C['is_child'])
|
||||
{
|
||||
getMenuXls($site,$table,$j,$C['uid'],$C['depth'],$uid,$mset,$code);
|
||||
}
|
||||
$code = '';
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
//메뉴->TXT출력
|
||||
function getMenuTxt($site,$table,$j,$parent,$depth,$uid,$code)
|
||||
{
|
||||
global $g;
|
||||
static $j,$string;
|
||||
$xdepth = $depth+1;
|
||||
|
||||
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'depth='.$xdepth.' and parent='.$parent.' order by gid asc','*');
|
||||
while($C=db_fetch_array($CD))
|
||||
{
|
||||
$j++;
|
||||
$code = $code.$C['id'].'/';
|
||||
$_code = substr($code,0,strlen($code)-1);
|
||||
|
||||
for ($i = 0; $i < $depth; $i++) $string .= "\t";
|
||||
$string .= '['.$xdepth.']'.($C['hidden']?'[숨김]':'').($C['reject']?'[차단]':'').($C['target']?'[새창]':'').$C['name']." = ".RW('c='.$_code)."\r\n";
|
||||
|
||||
if ($C['is_child'])
|
||||
{
|
||||
getMenuTxt($site,$table,$j,$C['uid'],$C['depth'],$uid,$code);
|
||||
}
|
||||
if ($xdepth==1) $string .= "\r\n";
|
||||
|
||||
$code = '';
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
//메뉴->패키지용
|
||||
function getMenuPackage($site,$table,$j,$parent,$depth,$uid)
|
||||
{
|
||||
global $g;
|
||||
static $j,$string;
|
||||
$xdepth = $depth+1;
|
||||
|
||||
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'depth='.$xdepth.' and parent='.$parent.' order by gid asc','*');
|
||||
while($C=db_fetch_array($CD))
|
||||
{
|
||||
$_parent = $C['parent'] ? getDbData($table,($site?'site='.$site.' and ':'').'uid='.$C['parent'],'id') : array();
|
||||
$j++;
|
||||
for ($i = 0; $i < $depth; $i++) $string .= "\t";
|
||||
$string .= "\tarray('name'=>'".$C['name']."','id'=>'".$C['id']."','menutype'=>'".$C['menutype']."','mobile'=>'".$C['mobile']."','hidden'=>'".$C['hidden']."','target'=>'".$C['target']."','redirect'=>'".$C['redirect']."','joint'=>'".$C['joint']."','layout'=>'".$C['layout']."','imghead'=>'".$C['imghead']."','imgfoot'=>'".$C['imgfoot']."','imgicon'=>'".$C['imgicon']."','addinfo'=>'".$C['addinfo']."','depth'=>'".$C['depth']."','parent'=>'".$_parent['id']."','is_child'=>'".$C['is_child']."','gid'=>'".$C['gid']."',),\r\n";
|
||||
|
||||
if ($C['is_child'])
|
||||
{
|
||||
getMenuPackage($site,$table,$j,$C['uid'],$C['depth'],$uid);
|
||||
}
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
if ($type == 'xml')
|
||||
{
|
||||
$filename = 'menu_'.$_HS['id'].'.xml';
|
||||
$filepath = $g['path_var'].'xml/'.$filename;
|
||||
|
||||
$fp = fopen($filepath,'w');
|
||||
fwrite($fp,"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
|
||||
fwrite($fp,"<menu>\n\n");
|
||||
fwrite($fp,"\t<!-- ".$_HS['name']."-메뉴구조 -->\n");
|
||||
fwrite($fp,getMenuXml($s,$table['s_menu'],0,0,0,0,''));
|
||||
fwrite($fp,"</menu>\n");
|
||||
fclose($fp);
|
||||
@chmod($filepath,0707);
|
||||
|
||||
$filesize = filesize($filepath);
|
||||
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Length: " .$filesize);
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
header("Cache-Control: private, must-revalidate");
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
|
||||
$fp = fopen($filepath, 'rb');
|
||||
if (!fpassthru($fp)) fclose($fp);
|
||||
exit;
|
||||
|
||||
}
|
||||
else if($type == 'xls')
|
||||
{
|
||||
|
||||
header("Content-type: application/vnd.ms-excel;" );
|
||||
header("Content-Disposition: attachment; filename=menu_".$_HS['id'].".xls" );
|
||||
header("Content-Description: PHP4 Generated Data" );
|
||||
|
||||
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
|
||||
echo '<table border="1">';
|
||||
echo '<thead>';
|
||||
echo '<th>단계</th>';
|
||||
echo '<th>1차메뉴</th>';
|
||||
echo '<th>2차메뉴</th>';
|
||||
echo '<th>3차메뉴</th>';
|
||||
echo '<th>4차메뉴</th>';
|
||||
echo '<th>5차메뉴</th>';
|
||||
echo '<th>고유키(PK)</th>';
|
||||
echo '<th>메뉴코드</th>';
|
||||
echo '<th>현재주소</th>';
|
||||
echo '<th>물리주소</th>';
|
||||
echo '<th>메뉴형식</th>';
|
||||
echo '<th>모바일</th>';
|
||||
echo '<th>새창</th>';
|
||||
echo '<th>숨김</th>';
|
||||
echo '<th>차단</th>';
|
||||
echo '<th>리다이렉트</th>';
|
||||
echo '<th>연결주소</th>';
|
||||
echo '</thead>';
|
||||
echo '<tbody>';
|
||||
echo getMenuXls($s,$table['s_menu'],0,0,0,0,array('','모듈','위젯','코딩'),'');
|
||||
echo '</tbody>';
|
||||
echo '</table>';
|
||||
exit;
|
||||
}
|
||||
else if($type == 'txt')
|
||||
{
|
||||
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Disposition: attachment; filename=menu_".$_HS['id'].".txt" );
|
||||
header("Content-Description: PHP4 Generated Data" );
|
||||
echo $_HS['name']."-메뉴구조\r\n";
|
||||
echo "-------------------------------------------------------------------------\r\n\r\n";
|
||||
echo getMenuTxt($s,$table['s_menu'],0,0,0,0,'');
|
||||
exit;
|
||||
}
|
||||
else if($type == 'package_menu')
|
||||
{
|
||||
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Disposition: attachment; filename=var.menu.php" );
|
||||
header("Content-Description: PHP4 Generated Data" );
|
||||
echo "<?php\r\n";
|
||||
echo "\$d['package']['menus'] = array(\r\n";
|
||||
echo getMenuPackage($s,$table['s_menu'],0,0,0,0);
|
||||
echo ");\r\n";
|
||||
echo "?>\r\n";
|
||||
exit;
|
||||
}
|
||||
else if($type == 'package_page')
|
||||
{
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Disposition: attachment; filename=var.page.php" );
|
||||
header("Content-Description: PHP4 Generated Data" );
|
||||
echo "<?php\r\n";
|
||||
echo "\$d['package']['pages'] = array(\r\n";
|
||||
$PAGES = getDbArray($table['s_page'],'site='.$s,'*','d_update','desc',0,1);
|
||||
while($R = db_fetch_array($PAGES))
|
||||
{
|
||||
echo "\tarray('name'=>'".$R['name']."','id'=>'".$R['id']."','pagetype'=>'".$R['pagetype']."','ismain'=>'".$R['ismain']."','mobile'=>'".$R['mobile']."','category'=>'".$R['category']."','layout'=>'".$R['layout']."','joint'=>'".$R['joint']."','linkedmenu'=>'".$R['linkedmenu']."'),\r\n";
|
||||
}
|
||||
echo ");\r\n";
|
||||
echo "?>\r\n";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
42
modules/site/action/a.get_postData.php
Normal file
42
modules/site/action/a.get_postData.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$result=array();
|
||||
$result['error']=false;
|
||||
|
||||
if ($_mtype == 'page')
|
||||
{
|
||||
|
||||
if (is_file($g['path_page'].$r.'-pages/'.$id.'.mobile.php')) {
|
||||
$_filekind = $r.'-pages/'.$id.'.mobile';
|
||||
} else {
|
||||
$_filekind = $r.'-pages/'.$id;
|
||||
}
|
||||
|
||||
$_filesbj = $_HP['name'];
|
||||
}
|
||||
if ($_mtype == 'menu')
|
||||
{
|
||||
if (is_file($g['path_page'].$r.'-menus/'.$id.'.mobile.php')) {
|
||||
$_filekind = $r.'-menus/'.$id.'.mobile';
|
||||
} else {
|
||||
$_filekind = $r.'-menus/'.$id;
|
||||
}
|
||||
|
||||
$_filesbj = $_HM['name'];
|
||||
}
|
||||
|
||||
$__SRC__ = is_file($g['path_page'].$_filekind.'.php') ? implode('',file($g['path_page'].$_filekind.'.php')) : '';
|
||||
|
||||
if (!$__SRC__) {
|
||||
$result['error']='존재하기 않는 페이지 입니다.';
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$result['article'] = getContents($__SRC__,'HTML');
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
30
modules/site/action/a.get_sitecode.php
Normal file
30
modules/site/action/a.get_sitecode.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$_HS = getDbData($table['s_site'],"id='".$r."'",'*');
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
|
||||
$layout = dirname($_HS['m_layout']);
|
||||
} else {
|
||||
$layout = dirname($_HS['layout']);
|
||||
}
|
||||
|
||||
include_once $g['path_layout'].$layout.'/_var/_var.php';
|
||||
|
||||
$fdset = array($d['layout']['site_code']);
|
||||
|
||||
$svfile = $g['path_var'].'sitephp/'.$s.'.php';
|
||||
include_once $svfile;
|
||||
|
||||
$result=array();
|
||||
$result['error'] = false;
|
||||
|
||||
foreach ($fdset as $val) {
|
||||
$result[$val] = $d['site'][$val];
|
||||
}
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
302
modules/site/action/a.get_widgetConfig.php
Normal file
302
modules/site/action/a.get_widgetConfig.php
Normal file
@@ -0,0 +1,302 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$readme_file = $g['path_widget'].$widget.'/readme.txt';
|
||||
$readme_skin = @fopen($readme_file, 'r');
|
||||
$readme = @fread($readme_skin, filesize($readme_file));
|
||||
$readme = nl2br($readme);
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y'&& !$panel) $is_mobile = 1;
|
||||
else $is_mobile = 0;
|
||||
|
||||
//카테고리출력
|
||||
function getCategoryShowSelect($table,$j,$parent,$depth,$uid,$hidden,$cat) {
|
||||
static $j;
|
||||
$html = '';
|
||||
$CD=getDbSelect($table,'depth='.($depth+1).' and parent='.$parent.($hidden ? ' and hidden=0':'').' order by gid asc','*');
|
||||
while($C=db_fetch_array($CD)){
|
||||
$j++;
|
||||
$html .= '<option class="selectcat'.$C['depth'].'" value="'.$C['uid'].'" data-category="'.$C['name'].'" '.($C['uid']==$cat?' selected="selected"':'').'>';
|
||||
if(!$depth) $html .= 'ㆍ';
|
||||
for($i=1;$i<$C['depth'];$i++) $html .= ' ';
|
||||
if ($C['depth'] > 1) $html .= 'ㄴ';
|
||||
$html .= $C['name'].'</option>';
|
||||
if ($C['is_child']) $html .= getCategoryShowSelect($table,$j,$C['uid'],$C['depth'],$uid,$hidden,$cat);
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
//메뉴 출력
|
||||
function getMenuShowSelect($site,$table,$j,$parent,$depth,$uid,$hidden,$id) {
|
||||
global $cat,$_isUid;
|
||||
static $j;
|
||||
$html = '';
|
||||
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'depth='.($depth+1).' and parent='.$parent.($hidden ? ' and hidden=0':'').' order by gid asc','*');
|
||||
while($C=db_fetch_array($CD)){
|
||||
$nId = ($id?$id.'/':'').$C[$_isUid.'id'];
|
||||
$j++;
|
||||
$html .= '<option class="selectcat'.$C['depth'].'" value="'.$nId.'"'.($nId==$cat?' selected':'').'>';
|
||||
for($i=1;$i<$C['depth'];$i++) $html .= ' ';
|
||||
if ($C['depth'] > 1) $html .= 'ㄴ';
|
||||
$html .= $C['name'].($C['num']?' ('.$C['num'].')':'').'</option>';
|
||||
if ($C['is_child']) $html .= getMenuShowSelect($site,$table,$j,$C['uid'],$C['depth'],$uid,$hidden,$nId);
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
$widget = $_POST['widget'];
|
||||
$wdgvar = $_POST['wdgvar'];
|
||||
$area = $_POST['area'];
|
||||
|
||||
$wdgvar = str_replace('[','', $wdgvar);
|
||||
$wdgvar = str_replace(']','', $wdgvar);
|
||||
|
||||
$wdgvar_arr = explode('^',$wdgvar);
|
||||
$wdgkey_arr = explode(',',$wdgvar_arr[3]);
|
||||
$_wdgvar = array();
|
||||
foreach ($wdgkey_arr as $key) {
|
||||
$key_arr = explode('=',$key);
|
||||
$_wdgvar[$key_arr[0]]=$key_arr[1];
|
||||
}
|
||||
|
||||
if (file_exists($g['path_widget'].$widget.'/_var.config.php')) {
|
||||
include_once $g['path_widget'].$widget.'/_var.config.php';
|
||||
|
||||
$d['layout']['dom'] = array();
|
||||
|
||||
$html='';
|
||||
$_i=1;
|
||||
foreach ($d['widget']['dom'] as $_key => $_val) {
|
||||
$__i=sprintf('%02d',$_i);
|
||||
|
||||
if ($is_mobile) {
|
||||
$html .= '<div class="">
|
||||
|
||||
<div class="">';
|
||||
} else {
|
||||
$html .= '<div class="modal-content border-0 rounded-0" style="height:100%">
|
||||
<div class="modal-header bg-primary text-white rounded-0 d-flex justify-content-between align-items-center py-2">
|
||||
<span data-dismiss="modal" role="button"><i class="fa fa-chevron-left mr-2" aria-hidden="true"></i>'.$_val[0].'</span>
|
||||
<small class=""></span>
|
||||
</div>
|
||||
<div class="modal-body" style="overflow:auto" data-role="form">';
|
||||
}
|
||||
|
||||
if (count($_val[1])) {
|
||||
|
||||
foreach ($_val[1] as $_v) {
|
||||
$html .= '<div class="form-group">';
|
||||
|
||||
if ($_v[1]!='hidden') {
|
||||
$html .= '<label class="text-muted f12 mb-1">'.$_v[2].'</label>';
|
||||
}
|
||||
|
||||
if ($_v[1]=='hidden') {
|
||||
$html .= '<input type="hidden" name="'.$_v[0].'" value="'.$_v[3].'">';
|
||||
}
|
||||
|
||||
if ($_v[1]=='input') {
|
||||
$html .= '<input type="text" class="form-control" name="'.$_v[0].'" value="'.stripslashes($_wdgvar[$_v[0]]).'" placeholder="'.$_v[3].'" autocomplete="off">';
|
||||
}
|
||||
|
||||
if ($_v[1]=='select') {
|
||||
$html .= '<select name="'.$_v[0].'" class="form-control custom-select">';
|
||||
$_sk=explode(',',$_v[3]);
|
||||
foreach ($_sk as $_sa) {
|
||||
$_sa1=explode('=',$_sa);
|
||||
if ($_wdgvar[$_v[0]]) {
|
||||
$html .= '<option value="'.$_sa1[1].'" '.($_sa1[1]==$_wdgvar[$_v[0]]?' selected':'').' >'.$_sa1[0].'</option>';
|
||||
} else {
|
||||
$html .= '<option value="'.$_sa1[1].'" '.($_sa1[1]==$_v[4]?' selected':'').' >'.$_sa1[0].'</option>';
|
||||
}
|
||||
}
|
||||
$html .= '</select>';
|
||||
}
|
||||
|
||||
if ($_v[1]=='radio') {
|
||||
$_sk=explode(',',$_v[3]);
|
||||
foreach ($_sk as $_sa) {
|
||||
$_sa1=explode('=',$_sa);
|
||||
$html .= '<label class="rb-rabel"><input type="radio" name="'.$_v[0].'" value="'.$_sa1[1].'"> '.$_sa1[0].'</label>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($_v[1]=='checkbox') {
|
||||
$_sk=explode(',',$_v[3]);
|
||||
foreach ($_sk as $_sa) {
|
||||
$_sa1=explode('=',$_sa);
|
||||
$html .= '<label class="rb-rabel"><input type="checkbox" name="'.$_v[0].'" value="'.$_sa1[1].'"> '.$_sa1[0].'</label>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($_v[1]=='textarea') {
|
||||
$html .= '<textarea type="text" rows="'.$_v[3].'" class="form-control" name="'.$_v[0].'">'.stripslashes($_wdgvar[$_v[0]]).'</textarea>';
|
||||
}
|
||||
|
||||
if ($_v[1]=='postlist') {
|
||||
$html .= '<div class="input-group">';
|
||||
$html .= '<select name="'.$_v[0].'" class="form-control custom-select" size="1">
|
||||
<option value="">선택하세요.</option>
|
||||
<option value="" disabled>----------------------------------</option>';
|
||||
$_sk=explode(',',$_v[3]);
|
||||
$POSTLIST = getDbArray($table['postlist_member'],'site='.$s.' and mbruid="'.$my['uid'].'" and display<>1','*','gid','asc',0,1);
|
||||
while ($R=db_fetch_array($POSTLIST)) {
|
||||
$L = getUidData($table['postlist'],$R['list']);
|
||||
$html .= '<option data-name="'.$L['name'].'" value="'.$L['id'].'" '.($L['id']==$_wdgvar[$_v[0]]?' selected':'').'>
|
||||
ㆍ'.$L['name'].'
|
||||
</option>';
|
||||
}
|
||||
$html .= '</select>';
|
||||
$html .= '<div class="input-group-append input-group-btn"><button class="btn btn-white btn-light" type="button" data-toggle="tooltip" title="리스트 추가" data-act="make" data-mod="postlist">+</button></div>';
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
if ($_v[1]=='postcat') {
|
||||
$html .= '<select name="'.$_v[0].'" class="form-control custom-select">
|
||||
<option value="">선택하세요.</option>
|
||||
<option value="" disabled>----------------------------------</option>';
|
||||
$html .= getCategoryShowSelect($table['postcategory'],0,0,0,0,0,$_wdgvar[$_v[0]]);
|
||||
$html .= '</select>';
|
||||
}
|
||||
|
||||
if ($_v[1]=='mediasetcat') {
|
||||
$html .= '<div class="input-group">';
|
||||
$html .= '<select name="'.$_v[0].'" class="form-control custom-select">
|
||||
<option value="">선택하세요.</option>
|
||||
<option value="" disabled>----------------------------------</option>';
|
||||
|
||||
$MEDIASETCAT = getDbArray($table['s_uploadcat'],'site='.$s.' and mbruid="'.$my['uid'].'" and hidden=0','*','gid','asc',0,1);
|
||||
while ($R=db_fetch_array($MEDIASETCAT)) {
|
||||
if ($R['uid']==1 || $R['uid']==2) continue;
|
||||
$html .= '<option data-name="'.$R['name'].'" value="'.$R['name'].'" '.($R['name']==$_wdgvar[$_v[0]]?' selected':'').'>
|
||||
ㆍ'.$R['name'].'
|
||||
</option>';
|
||||
}
|
||||
|
||||
$html .= '</select>';
|
||||
$html .= '<div class="input-group-append input-group-btn"><button class="btn btn-white btn-light rb-modal-photo" type="button" data-toggle="modal" data-target="#modal_window" title="포토셋 열기">+</button></div>';
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
if ($_v[1]=='menu') {
|
||||
$cat = $_wdgvar[$_v[0]];
|
||||
$html .= '<div class="input-group">';
|
||||
$html .= '<select name="'.$_v[0].'" class="form-control custom-select" size="1">
|
||||
<option value="">선택하세요</option>
|
||||
<option value="" disabled>----------------------------------</option>';
|
||||
$html .= getMenuShowSelect($s,$table['s_menu'],0,0,0,0,0,'');
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
if ($_v[1]=='bbs') {
|
||||
$html .= '<div class="input-group">';
|
||||
$html .= '<select name="'.$_v[0].'" class="form-control custom-select" size="1">
|
||||
<option value="">선택하세요</option>
|
||||
<option value="" disabled>----------------------------------</option>';
|
||||
$BBSLIST = getDbArray($table['bbslist'],'','*','gid','asc',0,1);
|
||||
while ($R=db_fetch_array($BBSLIST)) {
|
||||
$html .= '<option value="'.$R['id'].'" '.($R['id']==$_wdgvar[$_v[0]]?' selected':'').' data-name="'.$R['name'].'" data-link="'.RW('m=bbs&bid='.$R['id']).'">
|
||||
ㆍ'.$R['name'].'('.$R['id'].')
|
||||
</option>';
|
||||
}
|
||||
$html .= '</select>';
|
||||
$html .= '<div class="input-group-append input-group-btn"><button class="btn btn-white btn-light" type="button" data-toggle="tooltip" title="게시판 추가" data-act="make" data-mod="bbs">+</button></div>';
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
if ($_v[1]=='date') {
|
||||
|
||||
$html .= '<div class="input-group input-daterange">
|
||||
<input type="text" class="form-control" name="" id="" value="">
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-light" type="button"><i class="fa fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>';
|
||||
}
|
||||
|
||||
if ($_v[1]=='color') {
|
||||
$html .= '<div class="input-group">
|
||||
<input type="text" class="form-control" name="layout_'.$_key.'_'.$_v[0].'" id="layout_'.$_key.'_'.$_v[0].'" value="">
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-light" type="button" data-toggle="modal"
|
||||
data-target=".bs-example-modal-sm"
|
||||
onclick="getColorLayer(getId("layout_'.$_key.'_'. $_v[0].').value.replace("#",""),"layout_'.$_key.'_'.$_v[0].');"><i class="fa fa-tint"></i></button>
|
||||
</span>
|
||||
</div>';
|
||||
}
|
||||
|
||||
if ($_v[1]=='mediaset') {
|
||||
$html .= '<div class="input-group">
|
||||
<input type="text" class="form-control rb-modal-photo-drop js-tooltip" value="" onmousedown="" title="선택된 사진" data-toggle="modal" data-target="#modal_window">
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-light rb-modal-photo-drop js-tooltip" type="button" title="포토셋" data-toggle="modal" data-target="#modal_window"><i class="fa fa-picture-o"></i></button>
|
||||
</span>
|
||||
</div>';
|
||||
}
|
||||
|
||||
if ($_v[1]=='videoset') {
|
||||
$html .= '<div class="input-group">
|
||||
<input type="text" class="form-control rb-modal-video-drop js-tooltip" name="" id="" value="" onmousedown="" title="선택된 비디오" data-toggle="modal" data-target="#modal_window">
|
||||
<span class="input-group-append">
|
||||
<button onmousedown="" class="btn btn-light rb-modal-video-drop js-tooltip" type="button" title="비디오셋" data-toggle="modal" data-target="#modal_window"><i class="fa fa-video-camera"></i></button>
|
||||
</span>
|
||||
</div>';
|
||||
}
|
||||
|
||||
|
||||
$html .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$html .= '<div class="text-right mt-4"><a class="text-muted f12" data-toggle="collapse" href="#widgetMore"><u>위젯정보</u></a></div>';
|
||||
|
||||
$html .= '<div class="collapse" id="widgetMore">
|
||||
|
||||
|
||||
<blockquote class="blockquote py-3 text-muted">'.$readme.'</blockquote>
|
||||
<div class="card mt-2 p-2 shadow-sm"><img src="/widgets/'.$widget.'/thumb.png" class="img-fluid" style="filter: grayscale(100%);"></div>
|
||||
|
||||
<dl class="row f12 text-muted mt-5 mb-0 mx-1">
|
||||
<dt class="col-3 col-xs-3">위젯명</dt>
|
||||
<dd class="col-9 col-xs-9 pl-0">'.$_val[0].'</dd>
|
||||
<dt class="col-3 col-xs-3">경로</dt>
|
||||
<dd class="col-9 col-xs-9 pl-0">/widgets/'.$widget.'</dd>
|
||||
</dl>
|
||||
|
||||
<div class="form-group mb-0 mx-1"><label class="text-muted f12 mb-1 font-weight-bold">삽입코드</label><div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control rounded-0 text-muted" id="widgetCode" readonly>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-white js-clipboard text-muted rounded-0" data-act="code" type="button" data-toggle="tooltip" title="" data-clipboard-target="#widgetCode">추출</button>
|
||||
</div>
|
||||
</div></div></div>';
|
||||
|
||||
|
||||
$html .= '</div>';
|
||||
|
||||
if (!$is_mobile) {
|
||||
$html .= '<footer class="modal-footer d-flex rounded-0 py-1 rb-tab-pane-bottom bg-white">
|
||||
<div class="flex-fill"><button type="button" data-act="cancel" data-dismiss="modal" class="btn btn-link text-reset btn-block">취소</button></div>
|
||||
<div class="flex-fill"><button type="button" data-act="save" data-mod="'.($wdgvar?'edit':'add').'" data-area="'.$area.'" class="btn btn-link btn-block">
|
||||
<span class="not-loading">'.($wdgvar?'적용':'추가').'</span>
|
||||
<span class="is-loading"><div class="spinner-border spinner-border-sm" role="status"><span class="sr-only">처리중...</span></div></span>
|
||||
</button></div>
|
||||
</footer>';
|
||||
}
|
||||
|
||||
$html .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$result=array();
|
||||
$result['error'] = false;
|
||||
|
||||
$result['widget'] = $widget;
|
||||
$result['widget_name'] = $_val[0];
|
||||
$result['page'] = $html;
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
20
modules/site/action/a.get_widgetGuide.php
Normal file
20
modules/site/action/a.get_widgetGuide.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$widget = $_POST['widget'];
|
||||
|
||||
$result=array();
|
||||
$result['error'] = false;
|
||||
|
||||
$readme_file = $g['path_widget'].$widget.'/readme.txt';
|
||||
$readme_skin = @fopen($readme_file, 'r');
|
||||
$readme = @fread($readme_skin, filesize($readme_file));
|
||||
|
||||
$result['readme'] = nl2br($readme);
|
||||
$result['thumb'] = $g['path_widget'].$widget.'/thumb.png';
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
20
modules/site/action/a.get_widgetPage.php
Normal file
20
modules/site/action/a.get_widgetPage.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$g['layoutPageVarForSite'] = $g['path_var'].'site/'.$r.'/layout.'.$layout.'.'.$page.'.php';
|
||||
$_tmpdfile = is_file($g['layoutPageVarForSite']) ? $g['layoutPageVarForSite'] : $g['path_layout'].$layout.'/_var/_var.'.$page.'.php';
|
||||
include $_tmpdfile;
|
||||
|
||||
$result['list'] = getWidgetListEdit($d['layout']['main_widgets'],'');
|
||||
|
||||
if (is_file($g['layoutPageVarForSite'])) {
|
||||
$result['layoutPageVarForSite'] = true;
|
||||
} else {
|
||||
$result['layoutPageVarForSite'] = false;
|
||||
}
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
28
modules/site/action/a.getsublayout.php
Normal file
28
modules/site/action/a.getsublayout.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
?>
|
||||
|
||||
<script>
|
||||
var tags = '';
|
||||
var block = parent.getId('<?php echo $sid?>');
|
||||
<?php if($layout):?>
|
||||
tags += '<select class="form-control<?php echo $sclass?' '.$sclass:''?>" name="<?php echo $sname?>">';
|
||||
<?php $dirs1 = opendir($g['path_layout'].$layout)?>
|
||||
<?php while(false !== ($tpl1 = readdir($dirs1))):?>
|
||||
<?php if(!strstr($tpl1,'.php') || $tpl1=='_main.php')continue?>
|
||||
tags += '<option value="<?php echo $tpl1?>"><?php echo str_replace('.php','',$tpl1)?></option>';
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs1)?>
|
||||
<?php else:?>
|
||||
tags += '<select class="form-control<?php echo $sclass?' '.$sclass:''?>" name="<?php echo $sname?>" disabled>';
|
||||
tags += '<option>서브 레이아웃</option>';
|
||||
<?php endif?>
|
||||
tags += '</select>';
|
||||
block.innerHTML = tags;
|
||||
</script>
|
||||
|
||||
<?php
|
||||
exit;
|
||||
?>
|
||||
23
modules/site/action/a.inscheck.php
Normal file
23
modules/site/action/a.inscheck.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
checkAdmin(0);
|
||||
$instFp = $g['path_var'].'install.txt';
|
||||
$instIp = is_file($instFp) ? implode('',file($instFp)) : $_SERVER['REMOTE_ADDR'];
|
||||
?>
|
||||
|
||||
<?php if(!strstr($instIp,'127.0.')&&!strstr($instIp,'192.168.')):?>
|
||||
<?php include_once $g['path_module'].'market/var/var.php'?>
|
||||
<?php $fp=fopen($instFp,'w');fwrite($fp,$_SERVER['REMOTE_ADDR']);fclose($fp);@chmod($instFp,0707);?>
|
||||
<form name="installForm" action="<?php echo $d['market']['url']?>" method="post" target="_action_frame_<?php echo $m?>">
|
||||
<input type="hidden" name="m" value="qmarket" />
|
||||
<input type="hidden" name="a" value="rb_install" />
|
||||
<input type="hidden" name="url" value="<?php echo $g['url_root']?>" />
|
||||
<input type="hidden" name="ip" value="<?php echo $_SERVER['REMOTE_ADDR']?>" />
|
||||
<input type="hidden" name="server" value="<?php echo $_SERVER['SERVER_SOFTWARE']?>" />
|
||||
<input type="hidden" name="version" value="<?php echo $d['admin']['version']?>" />
|
||||
<input type="hidden" name="language" value="<?php echo $g['sys_selectlang']?>" />
|
||||
</form>
|
||||
<script>
|
||||
window.onload=function(){document.installForm.submit();}
|
||||
</script>
|
||||
<?php endif?>
|
||||
160
modules/site/action/a.login.php
Normal file
160
modules/site/action/a.login.php
Normal file
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$history = $__target ? '-1' : '';
|
||||
$id = trim($_POST['id']);
|
||||
$pw = trim($_POST['pw']);
|
||||
|
||||
if (!$id || !$pw) getLink('reload','parent.','이메일과 패스워드를 입력해 주세요.',$history);
|
||||
|
||||
if (strpos($id,'@') && strpos($id,'.')) {
|
||||
$M2 = getDbData($table['s_mbremail'],"email='".$id."'",'*');
|
||||
$M = getUidData($table['s_mbrid'],$M2['mbruid']);
|
||||
$M1 = getDbData($table['s_mbrdata'],'memberuid='.$M['uid'],'*');
|
||||
} else if (substr($id,0,3)=='010' || substr($id,0,3)=='011' || substr($id,0,3)=='016' || substr($id,0,3)=='017' || substr($id,0,3)=='018' || substr($id,0,3)=='019') {
|
||||
$M2 = getDbData($table['s_mbrphone'],"phone='".$id."'",'*');
|
||||
$M = getUidData($table['s_mbrid'],$M2['mbruid']);
|
||||
$M1 = getDbData($table['s_mbrdata'],'memberuid='.$M['uid'],'*');
|
||||
} else {
|
||||
$M = getDbData($table['s_mbrid'],"id='".$id."'",'*');
|
||||
$M1 = getDbData($table['s_mbrdata'],'memberuid='.$M['uid'],'*');
|
||||
}
|
||||
|
||||
if (!$M['uid'] || $M1['auth'] == 4) {
|
||||
echo "<script>";
|
||||
echo "parent.$('".$form."').removeClass('was-validated');";
|
||||
echo "parent.$('".$form."').find('[type=submit]').prop('disabled', false);";
|
||||
echo "parent.$('".$form."').find('[data-role=idErrorBlock]').text('존재하지 않는 계정입니다.');";
|
||||
echo "parent.$('".$form."').find('[name=id]').focus().addClass('is-invalid');";
|
||||
echo "</script>";
|
||||
exit();
|
||||
}
|
||||
if ($M1['auth'] == 2) getLink('reload','parent.','회원님은 인증보류 상태입니다.',$history);
|
||||
if ($M1['auth'] == 3) getLink('reload','parent.','회원님은 본인 인증대기 상태입니다.',$history);
|
||||
|
||||
$password_alert = "<script>";
|
||||
$password_alert .= "parent.$('".$form."').removeClass('was-validated');";
|
||||
$password_alert .= "parent.$('".$form."').find('[type=submit]').prop('disabled', false);";
|
||||
$password_alert .= "parent.$('".$form."').find('[data-role=passwordErrorBlock]').text('패스워드가 일치하지 않습니다.');";
|
||||
$password_alert .= "parent.$('".$form."').find('[name=pw]').val('').focus().addClass('is-invalid');";
|
||||
$password_alert .= "</script>";
|
||||
|
||||
if (strlen($M['pw']) == 60) {
|
||||
if (!password_verify($pw,$M['pw']) && !password_verify($pw,$M1['tmpcode'])) {
|
||||
echo $password_alert;
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
if ($M['pw'] != getCrypt($pw,$M1['d_regis']) && $M1['tmpcode'] != getCrypt($pw,$M1['d_regis'])) {
|
||||
echo $password_alert;
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
if ($usertype == 'admin')
|
||||
if (!$M1['admin']) getLink('reload','parent.','회원님은 관리자가 아닙니다.',$history);
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"tmpcode='',num_login=num_login+1,now_log=1,last_log='".$date['totime']."'",'memberuid='.$M['uid']);
|
||||
getDbUpdate($table['s_referer'],'mbruid='.$M['uid'],"d_regis like '".$date['today']."%' and site=".$s." and mbruid=0 and ip='".$_SERVER['REMOTE_ADDR']."'");
|
||||
|
||||
//소셜 로그인 후, 계정통합 처리
|
||||
if ($snsuid && $snsname) {
|
||||
$d_regis = $date['totime'];
|
||||
|
||||
// SNS에 등록된 아바타가 있고, 회원정보에 저장된 아바타가 없을 경우
|
||||
if (!$M['photo'] && $_photo) {
|
||||
if (strpos($_photo,'facebook'))
|
||||
{
|
||||
$_facebookHeaders = get_headers($_photo, 1);
|
||||
if (array_key_exists('Location', $_facebookHeaders))
|
||||
{
|
||||
$_photo = $_facebookHeaders['Location'];
|
||||
$_photodata = getCURLData($_photo,'');
|
||||
}
|
||||
}
|
||||
else {
|
||||
$_photodata = getCURLData($_photo,'');
|
||||
}
|
||||
|
||||
if ($_photodata)
|
||||
{
|
||||
$fileExt = 'jpg';
|
||||
$fp = fopen($g['path_var'].'avatar/snstmp.jpg','w');
|
||||
fwrite($fp,$_photodata);
|
||||
fclose($fp);
|
||||
|
||||
$photo = $id.'.'.$fileExt;
|
||||
$saveFile1 = $g['path_var'].'avatar/'.$photo;
|
||||
|
||||
include $g['path_core'].'function/thumb.func.php';
|
||||
ResizeWidth($g['path_var'].'avatar/snstmp.jpg',$saveFile1,360);
|
||||
|
||||
@chmod($saveFile1,0707);
|
||||
unlink($g['path_var'].'avatar/snstmp.jpg');
|
||||
}
|
||||
getDbUpdate($table['s_mbrdata'],"photo='".$photo."'",'memberuid='.$M['uid']); // 회원정보 아바타 이미지 저장
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"sns='".$snsname."'",'memberuid='.$M['uid']); // 회원정보 sns 로그인 기록
|
||||
getDbUpdate($table['s_mbremail'],"d_verified='".$d_regis."'",'mbruid='.$M['uid'].' and email="'.$id.'"'); // // 소셜미디어에서 전달받은 이메일 본인확인 처리
|
||||
|
||||
getDbInsert($table['s_mbrsns'],'mbruid,sns,id,access_token,refresh_token,expires_in,d_regis',"'".$M['uid']."','".$snsname."','$snsuid','$sns_access_token','$sns_refresh_token','$sns_expires_in','$d_regis'");
|
||||
$_SESSION['SL'] = ''; // 소셜로그인 세션 초기화
|
||||
}
|
||||
|
||||
if($login_cookie=='checked'){
|
||||
setAccessToken($M1['memberuid'],'login');
|
||||
}
|
||||
|
||||
$_SESSION['mbr_uid'] = $M['uid'];
|
||||
$_SESSION['mbr_pw'] = $M['pw'];
|
||||
$referer = $referer ? urldecode($referer) : $_SERVER['HTTP_REFERER'];
|
||||
$referer = str_replace('&panel=Y','',$referer);
|
||||
$referer = str_replace('&a=logout','',$referer);
|
||||
|
||||
$fmktile = mktime();
|
||||
$ffolder = $g['path_tmp'].'session/';
|
||||
$opendir = opendir($ffolder);
|
||||
while(false !== ($file = readdir($opendir)))
|
||||
{
|
||||
if(!is_file($ffolder.$file)) continue;
|
||||
if($fmktile - filemtime($ffolder.$file) > 1800 ) unlink($ffolder.$file);
|
||||
}
|
||||
closedir($opendir);
|
||||
|
||||
if ($usertype == 'admin' || $M1['admin']) {
|
||||
if (!$M1['super'] && !$M1['adm_site']) getLink($g['s'].'/?r='.$r,'parent.','관리 사이트가 지정되지 않았습니다.','');
|
||||
if ($M1['adm_site']) {
|
||||
$_siteArray = getArrayString($M1['adm_site']);
|
||||
$SD = getUidData($table['s_site'],$_siteArray[data][0]);
|
||||
$r = $SD['id'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($usertype == 'admin' && $M1['admin']) {
|
||||
if ($pickgoods) {
|
||||
getLink($g['s'].'/?r='.$r.'&panel=Y&pickmodule=market&pickgoods='.$pickgoods.'&important=panel','parent.parent.','','');
|
||||
} else {
|
||||
getLink($g['s'].'/?r='.$r.'&panel=Y&pickmodule=dashboard&important=panel','parent.parent.','','');
|
||||
}
|
||||
}
|
||||
|
||||
if ($M1['admin']) {
|
||||
setrawcookie('site_common_result', rawurlencode('관리자 로그인 되었습니다.|default')); // 알림처리를 위한 로그인 상태 cookie 저장
|
||||
|
||||
$site = getUidData($table['s_site'],$s);
|
||||
$site_array = explode('/',$site['layout']);
|
||||
$nopanel_file = $g['path_layout'].$site_array[0].'/_var/nopanel.txt';
|
||||
|
||||
if (is_file($nopanel_file) || ($g['mobile']&&$_SESSION['pcmode']!='Y')) {
|
||||
getLink($referer?$referer:$g['s'].'/?r='.$r,'parent.','','');
|
||||
} else {
|
||||
getLink($g['s'].'/?r='.$r.'&_admpnl_='.urlencode($referer).'&panel=Y','parent.','','');
|
||||
}
|
||||
|
||||
} else {
|
||||
setrawcookie('site_common_result', rawurlencode($M1['name'].'님 로그인 되었습니다.')); // 알림처리를 위한 로그인 상태 cookie 저장
|
||||
getLink($referer?$referer:$g['s'].'/?r='.$r,'parent.','','');
|
||||
}
|
||||
|
||||
?>
|
||||
19
modules/site/action/a.logout.php
Normal file
19
modules/site/action/a.logout.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if ($my['uid'])
|
||||
{
|
||||
getDbUpdate($table['s_mbrdata'],"now_log=0,sns=''",'memberuid='.$my['uid']);
|
||||
$_SESSION['mbr_logout'] = '1';
|
||||
unset($_SESSION['mbr_uid']);
|
||||
unset($_SESSION['SL']); //소셜로그인 세션 삭제
|
||||
setAccessToken($my['uid'],'logout'); // 토큰 데이타 삭제 및 쿠키 초기화
|
||||
}
|
||||
|
||||
$referer = $referer ? urldecode($referer) : $_SERVER['HTTP_REFERER'];
|
||||
$referer = explode('&_admpnl_',$referer);
|
||||
$referer = $referer[0];
|
||||
|
||||
setrawcookie('site_common_result', rawurlencode('로그아웃 되었습니다.')); // 처리여부 cookie 저장
|
||||
getLink($referer,'top.','','');
|
||||
?>
|
||||
14
modules/site/action/a.menu_file_delete.php
Normal file
14
modules/site/action/a.menu_file_delete.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$R = getUidData($table['s_menu'],$cat);
|
||||
if ($R['img'.$dtype])
|
||||
{
|
||||
getDbUpdate($table['s_menu'],"img".$dtype."=''",'uid='.$R['uid']);
|
||||
unlink($g['path_var'].'menu/'.$R['img'.$dtype]);
|
||||
}
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
7
modules/site/action/a.mobilemode.php
Normal file
7
modules/site/action/a.mobilemode.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$_SESSION['pcmode'] = '';
|
||||
|
||||
getLink($referer ? urldecode($referer) : $_SERVER['HTTP_REFERER'],'','','');
|
||||
?>
|
||||
10
modules/site/action/a.modifymenugid.php
Normal file
10
modules/site/action/a.modifymenugid.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$i = 0;
|
||||
foreach($menumembers as $val) getDbUpdate($table['s_menu'],'gid='.($i++),'uid='.$val);
|
||||
setrawcookie('result_menu', rawurlencode('순서가 변경되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
7
modules/site/action/a.pcmode.php
Normal file
7
modules/site/action/a.pcmode.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$_SESSION['pcmode'] = 'Y';
|
||||
|
||||
getLink($referer ? urldecode($referer) : ($_SERVER['HTTP_REFERER']?$_SERVER['HTTP_REFERER']:$g['s'].'/?r='.$r.'&m=admin'),'','','');
|
||||
?>
|
||||
64
modules/site/action/a.regisSiteManifest.php
Normal file
64
modules/site/action/a.regisSiteManifest.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$tmpname = $_FILES['site_manifest_icon']['tmp_name'];
|
||||
$realname = $_FILES['site_manifest_icon']['name'];
|
||||
$iconsURL = $g['s'].'/_core/images/touch/';
|
||||
|
||||
if ($tmpname && is_uploaded_file($tmpname)) {
|
||||
$fileExt = strtolower(getExt($realname));
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
$fileName = 'homescreen.'.$fileExt;
|
||||
$iconsURL = $g['s'].'/_var/site/'.$r.'/';
|
||||
$saveFile = $g['path_var'].'site/'.$r.'/'.$fileName;
|
||||
|
||||
if (!strstr('[gif][jpg][png]',$fileExt)) {
|
||||
getLink('reload','parent.','허용되지 않는 확장자 입니다..','');
|
||||
}
|
||||
|
||||
move_uploaded_file($tmpname,$saveFile);
|
||||
@chmod($saveFile,0707);
|
||||
|
||||
} else {
|
||||
if (!$tmpname && $site_manifest_icon_del) {
|
||||
unlink( $g['path_var'].'site/'.$r.'/homescreen.jpg');
|
||||
unlink( $g['path_var'].'site/'.$r.'/homescreen.png');
|
||||
unlink( $g['path_var'].'site/'.$r.'/homescreen.gif');
|
||||
$iconsURL = $g['s'].'/_core/images/touch/';
|
||||
$fileExt = 'png';
|
||||
}
|
||||
}
|
||||
|
||||
//사이트별 매니페스트
|
||||
$g['manifestForSite'] = $g['path_var'].'site/'.$r.'/manifest.json'; // 사이트 회원모듈 변수파일
|
||||
$_manifestfile = $g['manifestForSite'] ? $g['manifestForSite'] : $g['path_module'].'site/var/manifest.json';
|
||||
include $_manifestfile;
|
||||
$fp = fopen($_manifestfile,'w');
|
||||
$icons = array(
|
||||
array('src'=>$iconsURL.'homescreen-128x128.png','sizes'=>'128x128','type'=>'image/png'),
|
||||
array('src'=>$iconsURL.'homescreen-144x144.png','sizes'=>'144x144','type'=>'image/png'),
|
||||
array('src'=>$iconsURL.'homescreen-168x168.png','sizes'=>'168x168','type'=>'image/png'),
|
||||
array('src'=>$iconsURL.'homescreen-192x192.png','sizes'=>'192x192','type'=>'image/png'),
|
||||
array('src'=>$iconsURL.'homescreen-512x512.png','sizes'=>'512x512','type'=>'image/png')
|
||||
);
|
||||
$myObj->name = $site_manifest_name;
|
||||
$myObj->short_name = $site_manifest_short_name;
|
||||
$myObj->icons = $icons;
|
||||
$myObj->start_url = '/';
|
||||
$myObj->display = $site_manifest_display;
|
||||
$myObj->background_color = $site_manifest_background_color;
|
||||
$myObj->theme_color = $site_manifest_theme_color;
|
||||
if ($site_manifest_orientation) $myObj->orientation = $site_manifest_orientation;
|
||||
$myObj->gcm_sender_id = '103953800507'; //FCM 자바스크립트 클라이언트에 공통되는 고정된 값입니다.
|
||||
$manifestJSON = json_encode($myObj,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
|
||||
$_manifestJSON = str_replace("\/", "/", $manifestJSON);
|
||||
fwrite($fp, $_manifestJSON );
|
||||
fclose($fp);
|
||||
@chmod($_manifestfile,0707);
|
||||
|
||||
// getLink('reload','parent.frames._ADMPNL_.','변경되었습니다.','');
|
||||
setrawcookie('site_common_result', rawurlencode('변경 되었습니다.')); // 알림처리를 위한 로그인 상태 cookie 저장
|
||||
getLink('reload','parent.frames._ADMPNL_.','','');
|
||||
?>
|
||||
31
modules/site/action/a.regislayoutpage.php
Normal file
31
modules/site/action/a.regislayoutpage.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$_HS = getDbData($table['s_site'],"id='".$r."'",'*');
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
|
||||
$layout = dirname($_HS['m_layout']);
|
||||
$notify_type = 'default';
|
||||
} else {
|
||||
$layout = dirname($_HS['layout']);
|
||||
$notify_type = 'success';
|
||||
}
|
||||
|
||||
$g['layoutPageVarForSite'] = $g['path_var'].'site/'.$r.'/layout.'.$layout.'.'.$page.'.php';
|
||||
$_tmpdfile = is_file($g['layoutPageVarForSite']) ? $g['layoutPageVarForSite'] : $g['path_layout'].$layout.'/_var/_var.'.$page.'.php';
|
||||
|
||||
include $_tmpdfile;
|
||||
|
||||
$fp = fopen($g['layoutPageVarForSite'],'w');
|
||||
fwrite($fp, "<?php\n");
|
||||
fwrite($fp, "\$d['layout']['main_widgets'] = \"".trim($main_widgets)."\";\n");
|
||||
fwrite($fp, "?>");
|
||||
fclose($fp);
|
||||
@chmod($g['layoutPageVarForSite'],0707);
|
||||
|
||||
setrawcookie('site_common_result', rawurlencode('저장 되었습니다'));
|
||||
getLink('reload','parent.frames._ADMPNL_.','','');
|
||||
|
||||
?>
|
||||
84
modules/site/action/a.regislayoutpanel.php
Normal file
84
modules/site/action/a.regislayoutpanel.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
$device = $_POST['device'];
|
||||
|
||||
$_HS = getDbData($table['s_site'],"id='".$r."'",'*');
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
|
||||
$layout = dirname($_HS['m_layout']);
|
||||
$device = 'mobile';
|
||||
} else {
|
||||
$layout = dirname($_HS['layout']);
|
||||
$device = 'desktop';
|
||||
}
|
||||
|
||||
$g['layoutVarForSite'] = $g['path_var'].'site/'.$r.'/layout.'.$layout.'.var.php';
|
||||
$_tmpdfile = is_file($g['layoutVarForSite']) ? $g['layoutVarForSite'] : $g['path_layout'].$layout.'/_var/_var.php';
|
||||
include $themelang2 ? $themelang2 : $themelang1;
|
||||
include $_tmpdfile;
|
||||
|
||||
$fp = fopen($g['layoutVarForSite'],'w');
|
||||
fwrite($fp, "<?php\n");
|
||||
|
||||
foreach($d['layout']['dom'] as $_key => $_val)
|
||||
{
|
||||
if(!count($_val[2])) continue;
|
||||
foreach($_val[2] as $_v)
|
||||
{
|
||||
if($_v[1] == 'checkbox')
|
||||
{
|
||||
foreach(${'layout_'.$_key.'_'.$_v[0].'_chk'} as $_chk)
|
||||
{
|
||||
${'layout_'.$_key.'_'.$_v[0]} .= $_chk.',';
|
||||
}
|
||||
|
||||
fwrite($fp, "\$d['layout']['".$_key.'_'.$_v[0]."'] = \"".trim(${'layout_'.$_key.'_'.$_v[0]})."\";\n");
|
||||
${'layout_'.$_key.'_'.$_v[0]} = '';
|
||||
}
|
||||
else if ($_v[1] == 'textarea')
|
||||
{
|
||||
fwrite($fp, "\$d['layout']['".$_key.'_'.$_v[0]."'] = \"".htmlspecialchars(str_replace('$','',trim(${'layout_'.$_key.'_'.$_v[0]})))."\";\n");
|
||||
}
|
||||
else if ($_v[1] == 'file')
|
||||
{
|
||||
|
||||
$tmpname = $_FILES['layout_'.$_key.'_'.$_v[0]]['tmp_name'];
|
||||
if (is_uploaded_file($tmpname))
|
||||
{
|
||||
$realname = $_FILES['layout_'.$_key.'_'.$_v[0]]['name'];
|
||||
$fileExt = strtolower(getExt($realname));
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
$fileName = $_key.'_'.$_v[0].'.'.$fileExt;
|
||||
$saveFile = $g['path_var'].'site/'.$r.'/'.$fileName;
|
||||
if (!strstr('[gif][jpg][png][swf]',$fileExt))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
move_uploaded_file($tmpname,$saveFile);
|
||||
@chmod($saveFile,0707);
|
||||
}
|
||||
else {
|
||||
$fileName = $d['layout'][$_key.'_'.$_v[0]];
|
||||
if ($fileName && ${'layout_'.$_key.'_'.$_v[0].'_del'})
|
||||
{
|
||||
unlink( $g['path_var'].'site/'.$r.'/'.$fileName);
|
||||
$fileName = '';
|
||||
}
|
||||
}
|
||||
fwrite($fp, "\$d['layout']['".$_key.'_'.$_v[0]."'] = \"".$fileName."\";\n");
|
||||
}
|
||||
else {
|
||||
fwrite($fp, "\$d['layout']['".$_key.'_'.$_v[0]."'] = \"".htmlspecialchars(str_replace('$','',trim(${'layout_'.$_key.'_'.$_v[0]})))."\";\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fwrite($fp, "?>");
|
||||
fclose($fp);
|
||||
@chmod($g['layoutVarForSite'],0707);
|
||||
setrawcookie('site_common_result', rawurlencode('변경 되었습니다.')); // 알림처리를 위한 로그인 상태 cookie 저장
|
||||
getLink('reload','parent.frames._ADMPNL_.','','');
|
||||
?>
|
||||
97
modules/site/action/a.regislayoutsite.php
Normal file
97
modules/site/action/a.regislayoutsite.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$_HS = getDbData($table['s_site'],"id='".$r."'",'*');
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
|
||||
$layout = dirname($_HS['m_layout']);
|
||||
$device = 'mobile';
|
||||
} else {
|
||||
$layout = dirname($_HS['layout']);
|
||||
$device = 'desktop';
|
||||
}
|
||||
|
||||
//사이트별 레이아웃 설정 변수
|
||||
$g['layoutVarForSite'] = $g['path_var'].'site/'.$r.'/layout.'.$layout.'.var.php';
|
||||
include $g['path_layout'].$layout.'/_var/_var.config.php';
|
||||
|
||||
$fp = fopen($g['layoutVarForSite'],'w');
|
||||
fwrite($fp, "<?php\n");
|
||||
|
||||
foreach($d['layout']['dom'] as $_key => $_val)
|
||||
{
|
||||
if(!count($_val[2])) continue;
|
||||
foreach($_val[2] as $_v)
|
||||
{
|
||||
if($_v[1] == 'checkbox')
|
||||
{
|
||||
foreach(${'layout_'.$_key.'_'.$_v[0].'_chk'} as $_chk)
|
||||
{
|
||||
${'layout_'.$_key.'_'.$_v[0]} .= $_chk.',';
|
||||
}
|
||||
|
||||
fwrite($fp, "\$d['layout']['".$_key.'_'.$_v[0]."'] = \"".trim(${'layout_'.$_key.'_'.$_v[0]})."\";\n");
|
||||
${'layout_'.$_key.'_'.$_v[0]} = '';
|
||||
}
|
||||
else if ($_v[1] == 'textarea')
|
||||
{
|
||||
fwrite($fp, "\$d['layout']['".$_key.'_'.$_v[0]."'] = \"".htmlspecialchars(str_replace('$','',trim(${'layout_'.$_key.'_'.$_v[0]})))."\";\n");
|
||||
}
|
||||
else if ($_v[1] == 'file')
|
||||
{
|
||||
|
||||
$tmpname = $_FILES['layout_'.$_key.'_'.$_v[0]]['tmp_name'];
|
||||
if (is_uploaded_file($tmpname))
|
||||
{
|
||||
$realname = $_FILES['layout_'.$_key.'_'.$_v[0]]['name'];
|
||||
$fileExt = strtolower(getExt($realname));
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
$fileName = $r.'_'.$_key.'_'.$_v[0].'.'.$fileExt;
|
||||
$saveFile = $g['path_layout'].$layout.'/_var/'.$fileName;
|
||||
if (!strstr('[gif][jpg][png][swf]',$fileExt))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
move_uploaded_file($tmpname,$saveFile);
|
||||
@chmod($saveFile,0707);
|
||||
}
|
||||
else {
|
||||
$fileName = $d['layout'][$_key.'_'.$_v[0]];
|
||||
if ($fileName && ${'layout_'.$_key.'_'.$_v[0].'_del'})
|
||||
{
|
||||
unlink( $g['path_layout'].$layout.'/_var/'.$fileName);
|
||||
$fileName = '';
|
||||
}
|
||||
}
|
||||
fwrite($fp, "\$d['layout']['".$_key.'_'.$_v[0]."'] = \"".$fileName."\";\n");
|
||||
}
|
||||
else {
|
||||
fwrite($fp, "\$d['layout']['".$_key.'_'.$_v[0]."'] = \"".htmlspecialchars(str_replace('$','',trim(${'layout_'.$_key.'_'.$_v[0]})))."\";\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fwrite($fp, "?>");
|
||||
fclose($fp);
|
||||
@chmod($g['layoutVarForSite'],0707);
|
||||
|
||||
if ($send_mod=='ajax') {
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$.notify({message: "저장 되었습니다"},{type: "default"});';
|
||||
echo 'parent.$("[data-act=submit]").attr("disabled", false);';
|
||||
echo '</script>';
|
||||
exit();
|
||||
|
||||
} else {
|
||||
|
||||
setrawcookie('site_common_result', rawurlencode('저장 되었습니다|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
259
modules/site/action/a.regismenu.php
Normal file
259
modules/site/action/a.regismenu.php
Normal file
@@ -0,0 +1,259 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
if ($menutype==3) {
|
||||
$joint = $joint_menu;
|
||||
$redirect = 1;
|
||||
}
|
||||
|
||||
$joint = trim(str_replace('&','&',$joint));
|
||||
$codhead = trim($codhead);
|
||||
$codfoot = trim($codfoot);
|
||||
$addinfo = trim($addinfo);
|
||||
$id = trim($id);
|
||||
$title = trim($title);
|
||||
$keywords = trim($keywords);
|
||||
$description = trim($description);
|
||||
$classification = trim($classification);
|
||||
$addattr = trim($addattr);
|
||||
$upload = trim($upload);
|
||||
$image_src = trim($image_src);
|
||||
|
||||
if (!$redirect&&(strstr($joint,'&c=')||strstr($joint,'?c=')))
|
||||
{
|
||||
getLink('','','연결주소에 사용할 수 없는 파라미터가 있습니다.','');
|
||||
}
|
||||
if(!$redirect&&$menutype==1)
|
||||
{
|
||||
include $g['path_core'].'function/menu.func.php';
|
||||
}
|
||||
|
||||
// 임시-icon 필드 없는 경우, 생성
|
||||
$_tmp = db_query("SHOW COLUMNS FROM ".$table['s_menu']." WHERE `Field` = 'imgicon'",$DB_CONNECT);
|
||||
if(!db_num_rows($_tmp)) {
|
||||
$_tmp = ("alter table ".$table['s_menu']." ADD imgicon varchar(100) NOT NULL");
|
||||
db_query($_tmp, $DB_CONNECT);
|
||||
}
|
||||
|
||||
if ($cat && !$vtype)
|
||||
{
|
||||
$R = getUidData($table['s_menu'],$cat);
|
||||
$imghead = $R['imghead'];
|
||||
$imgfoot = $R['imgfoot'];
|
||||
$imgset = array('head','foot','icon');
|
||||
|
||||
if ($id != $R['id'])
|
||||
{
|
||||
$ISMCODE = getDbData($table['s_menu'],"id='".$id."' and site=".$s,'*');
|
||||
if ($ISMCODE['uid']) getLink('','',sprintf('메뉴코드 [%s] 는 다른메뉴 [%s] 에서 사용중입니다.',$ISMCODE['id'],$ISMCODE['name']),'');
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 3; $i++)
|
||||
{
|
||||
$tmpname = $_FILES['img'.$imgset[$i]]['tmp_name'];
|
||||
$realname = $_FILES['img'.$imgset[$i]]['name'];
|
||||
$fileExt = strtolower(getExt($realname));
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
$userimg = sprintf('%05d',$R['uid']).'_'.$imgset[$i].'.'.$fileExt;
|
||||
$saveFile = $g['path_var'].'menu/'.$userimg;
|
||||
|
||||
if (is_uploaded_file($tmpname))
|
||||
{
|
||||
if (!strstr('[gif][jpg][png]',$fileExt))
|
||||
{
|
||||
getLink('','','헤더/풋터파일은 gif/jpg/png 파일만 등록할 수 있습니다.','');
|
||||
}
|
||||
move_uploaded_file($tmpname,$saveFile);
|
||||
@chmod($saveFile,0707);
|
||||
|
||||
${'img'.$imgset[$i]} = $userimg;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$redirect&&$menutype==1&&strstr($joint,'cync=Y'))
|
||||
{
|
||||
$ctarr = getMenuCodeToPath($table['s_menu'],$R['uid'],0);
|
||||
$catcode = '';
|
||||
$ctnum = count($ctarr);
|
||||
for ($i = 0; $i < $ctnum; $i++) $catcode .= $ctarr[$i]['id'].'/';
|
||||
$c = substr($catcode,0,strlen($catcode)-1);
|
||||
$joint = str_replace('cync=Y','cync=['.$m.'][c'.$R['uid'].'][,,,][][][c:'.$c.']',$joint);
|
||||
}
|
||||
|
||||
$QVAL = "id='$id',menutype='$menutype',mobile='$mobile',hidden='$hidden',reject='$reject',name='$name',target='$target',";
|
||||
$QVAL.= "redirect='$redirect',joint='$joint',perm_g='$perm_g',perm_l='$perm_l',";
|
||||
$QVAL.= "layout='$layout',m_layout='$m_layout',imghead='$imghead',imgfoot='$imgfoot',addattr='$addattr',addinfo='$addinfo',upload='$upload',imgicon='$imgicon'";
|
||||
getDbUpdate($table['s_menu'],$QVAL,'uid='.$cat);
|
||||
|
||||
$_SEO = getDbData($table['s_seo'],'uid='.(int)$seouid,'uid');
|
||||
if($_SEO['uid']) getDbUpdate($table['s_seo'],"title='$title',keywords='$keywords',description='$description',classification='$classification',image_src='$image_src'",'uid='.$_SEO['uid']);
|
||||
else getDbInsert($table['s_seo'],'rel,parent,title,keywords,description,classification,image_src',"'1','$cat','$title','$keywords','$description','$classification','$image_src'");
|
||||
|
||||
|
||||
$vfile = $g['path_page'].$r.'-menus/'.$id;
|
||||
if ($id != $R['id'])
|
||||
{
|
||||
$vfile1 = $g['path_page'].$r.'-menus/'.$R['id'];
|
||||
rename($vfile1.'.php',$vfile.'.php');
|
||||
if(is_file($vfile1.'.css')) rename($vfile1.'.css',$vfile.'.css');
|
||||
if(is_file($vfile1.'.js')) rename($vfile1.'.js',$vfile.'.js');
|
||||
if(is_file($vfile1.'.header.php')) rename($vfile1.'.header.php',$vfile.'.header.php');
|
||||
if(is_file($vfile1.'.footer.php')) rename($vfile1.'.footer.php',$vfile.'.footer.php');
|
||||
if(is_file($vfile1.'.txt')) rename($vfile1.'.txt',$vfile.'.txt');
|
||||
if(is_file($vfile1.'.cache')) rename($vfile1.'.cache',$vfile.'.cache');
|
||||
if(is_file($vfile1.'.mobile.cache')) rename($vfile1.'.mobile.cache',$vfile.'.mobile.cache');
|
||||
}
|
||||
|
||||
if (trim($codhead))
|
||||
{
|
||||
$fp = fopen($vfile.'.header.php','w');
|
||||
fwrite($fp, trim(stripslashes($codhead)));
|
||||
fclose($fp);
|
||||
@chmod($vfile.'.header.php',0707);
|
||||
}
|
||||
else {
|
||||
if(is_file($vfile.'.header.php'))
|
||||
{
|
||||
unlink($vfile.'.header.php');
|
||||
}
|
||||
}
|
||||
|
||||
if (trim($codfoot))
|
||||
{
|
||||
$fp = fopen($vfile.'.footer.php','w');
|
||||
fwrite($fp, trim(stripslashes($codfoot)));
|
||||
fclose($fp);
|
||||
@chmod($vfile.'.footer.php',0707);
|
||||
}
|
||||
else {
|
||||
if(is_file($vfile.'.footer.php'))
|
||||
{
|
||||
unlink($vfile.'.footer.php');
|
||||
}
|
||||
}
|
||||
|
||||
if ($cachetime)
|
||||
{
|
||||
$fp = fopen($vfile.'.txt','w');
|
||||
fwrite($fp, $cachetime);
|
||||
fclose($fp);
|
||||
@chmod($vfile.'.txt',0707);
|
||||
}
|
||||
else {
|
||||
if(is_file($vfile.'.txt'))
|
||||
{
|
||||
unlink($vfile.'.txt');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($subcopy == 1)
|
||||
{
|
||||
include_once $g['path_core'].'function/menu.func.php';
|
||||
$subQue = getMenuCodeToSql($table['s_menu'],$cat,'uid');
|
||||
if ($subQue)
|
||||
{
|
||||
getDbUpdate($table['s_menu'],"hidden='".$hidden."',reject='".$reject."',perm_g='".$perm_g."',perm_l='".$perm_l."',layout='".$layout."',m_layout='".$m_layout."'","uid <> ".$cat." and (".$subQue.")");
|
||||
}
|
||||
}
|
||||
setrawcookie('result_menu', rawurlencode('메뉴 등록정보가 변경 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
else {
|
||||
|
||||
$MAXC = getDbCnt($table['s_menu'],'max(gid)','depth='.($depth+1).' and parent='.$parent);
|
||||
$sarr = explode(',' , trim($name));
|
||||
$slen = count($sarr);
|
||||
|
||||
for ($i = 0 ; $i < $slen; $i++)
|
||||
{
|
||||
if (!$sarr[$i]) continue;
|
||||
|
||||
$gid = $MAXC+1+$i;
|
||||
$xdepth = $depth+1;
|
||||
$xname = trim($sarr[$i]);
|
||||
$xnarr = explode('=',$xname);
|
||||
|
||||
$QKEY = "gid,site,is_child,parent,depth,id,menutype,mobile,hidden,reject,name,target,redirect,joint,perm_g,perm_l,layout,m_layout,imghead,imgfoot,addattr,num,d_last,addinfo,upload,imgicon";
|
||||
$QVAL = "'$gid','".$_HS['uid']."','0','$parent','$xdepth','$xnarr[1]','$menutype','$mobile','$hidden','$reject','$xnarr[0]','$target','$redirect','$joint','$perm_g','$perm_l','$layout','$m_layout','','','$addattr','0','','$addinfo','$upload','$imgicon'";
|
||||
|
||||
getDbInsert($table['s_menu'],$QKEY,$QVAL);
|
||||
$lastmenu = getDbCnt($table['s_menu'],'max(uid)','');
|
||||
getDbInsert($table['s_seo'],'rel,parent,title,keywords,description,classification,image_src',"'1','$lastmenu','$title','$keywords','$description','$classification','$image_src'");
|
||||
|
||||
|
||||
if(!$redirect&&$menutype==1&&strstr($joint,'cync=Y'))
|
||||
{
|
||||
$ctarr = getMenuCodeToPath($table['s_menu'],$lastmenu,0);
|
||||
$catcode = '';
|
||||
$ctnum = count($ctarr);
|
||||
for ($j = 0; $j < $ctnum; $j++) $catcode .= $ctarr[$j]['id'].'/';
|
||||
$c = substr($catcode,0,strlen($catcode)-1);
|
||||
$joint = str_replace('cync=Y','cync=['.$m.'][c'.$lastmenu.'][,,,][][][c:'.$c.']',$joint);
|
||||
}
|
||||
if (!$xnarr[1])
|
||||
{
|
||||
$_newId = $lastmenu;
|
||||
getDbUpdate($table['s_menu'],"id='".$lastmenu."',joint='".$joint."'",'uid='.$lastmenu);
|
||||
}
|
||||
else {
|
||||
$_newId = $xnarr[1];
|
||||
$ISMCODE = getDbData($table['s_menu'],"uid<> ".$lastmenu." and id='".$xnarr[1]."' and site=".$s,'*');
|
||||
if ($ISMCODE['uid'])
|
||||
{
|
||||
$_newId = $lastmenu;
|
||||
getDbUpdate($table['s_menu'],"id='".$lastmenu."',joint='".$joint."'",'uid='.$lastmenu);
|
||||
}
|
||||
}
|
||||
|
||||
$mfile = $g['path_page'].$r.'-menus/'.$_newId;
|
||||
|
||||
$fp = fopen($mfile.'.php','w');
|
||||
fwrite($fp,'');
|
||||
fclose($fp);
|
||||
@chmod($mfile.'.php',0707);
|
||||
|
||||
if (trim($codhead))
|
||||
{
|
||||
$fp = fopen($mfile.'.header.php','w');
|
||||
fwrite($fp, trim(stripslashes($codhead)));
|
||||
fclose($fp);
|
||||
@chmod($mfile.'.header.php',0707);
|
||||
}
|
||||
|
||||
if (trim($codfoot))
|
||||
{
|
||||
$fp = fopen($mfile.'.footer.php','w');
|
||||
fwrite($fp, trim(stripslashes($codfoot)));
|
||||
fclose($fp);
|
||||
@chmod($mfile.'.footer.php',0707);
|
||||
}
|
||||
|
||||
if ($cachetime)
|
||||
{
|
||||
$fp = fopen($mfile.'.txt','w');
|
||||
fwrite($fp, $cachetime);
|
||||
fclose($fp);
|
||||
@chmod($mfile.'.txt',0707);
|
||||
}
|
||||
}
|
||||
|
||||
if ($parent)
|
||||
{
|
||||
getDbUpdate($table['s_menu'],'is_child=1','uid='.$parent);
|
||||
}
|
||||
db_query("OPTIMIZE TABLE ".$table['s_menu'],$DB_CONNECT);
|
||||
|
||||
if ($i > 1)
|
||||
{
|
||||
setrawcookie('result_menu', rawurlencode('복수의 메뉴가 등록 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink($g['s'].'/?r='.$r.'&m=admin&module='.$m.'&front=menu&cat='.$parent.'&code='.$code.'&vtype='.$vtype,'parent.','','');
|
||||
}
|
||||
else {
|
||||
setrawcookie('result_menu', rawurlencode('메뉴가 등록 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink($g['s'].'/?r='.$r.'&m=admin&module='.$m.'&front=menu&cat='.$lastmenu.'&code='.($code?$code.'/'.$lastmenu:$lastmenu).'#site-menu-info','parent.','','');
|
||||
}
|
||||
}
|
||||
?>
|
||||
114
modules/site/action/a.regispage.php
Normal file
114
modules/site/action/a.regispage.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$id = trim($id);
|
||||
$category = trim($category);
|
||||
$name = trim($name);
|
||||
$joint = trim(str_replace('&','&',$joint));
|
||||
$hit = 0;
|
||||
$d_regis = $date['totime'];
|
||||
$title = trim($title);
|
||||
$keywords = trim($keywords);
|
||||
$description = trim($description);
|
||||
$classification = trim($classification);
|
||||
$upload = trim($upload);
|
||||
$image_src = trim($image_src);
|
||||
$extra = trim($extra);
|
||||
|
||||
if (strstr($joint,'&c=')||strstr($joint,'?c='))
|
||||
{
|
||||
getLink('','','연결주소에 사용할 수 없는 파라미터가 있습니다.','');
|
||||
}
|
||||
|
||||
if (($orign_id && $orign_id != $id) || !$orign_id)
|
||||
{
|
||||
$R = getDbData($table['s_page'],"site=".$s." and id='".$id."'",'*');
|
||||
if ($R['uid']) getLink('','','동일한 아이디의 페이지가 존재합니다.','');
|
||||
}
|
||||
|
||||
if ($uid)
|
||||
{
|
||||
|
||||
if ($orign_id != $id)
|
||||
{
|
||||
$mfile1 = $g['path_page'].$r.'-pages/'.$orign_id.'.php';
|
||||
$mfile2 = $g['path_page'].$r.'-pages/'.$id.'.php';
|
||||
@rename($mfile1,$mfile2);
|
||||
@chmod($mfile2,0707);
|
||||
@unlink($g['path_page'].$r.'-pages/'.$orign_id.'.txt');
|
||||
}
|
||||
if ($cachetime)
|
||||
{
|
||||
$fp = fopen($g['path_page'].$r.'-pages/'.$id.'.txt','w');
|
||||
fwrite($fp, $cachetime);
|
||||
fclose($fp);
|
||||
@chmod($g['path_page'].$r.'-pages/'.$id.'.txt',0707);
|
||||
}
|
||||
else {
|
||||
if (file_exists($g['path_page'].$r.'-pages/'.$id.'.txt'))
|
||||
{
|
||||
unlink($g['path_page'].$r.'-pages/'.$id.'.txt');
|
||||
}
|
||||
}
|
||||
|
||||
$QVAL = "pagetype='$pagetype',ismain='$ismain',mobile='$mobile',id='$id',category='$category',name='$name',perm_g='$perm_g',perm_l='$perm_l',layout='$layout',m_layout='$m_layout',joint='$joint',linkedmenu='$linkedmenu',d_last='$d_regis',upload='$upload',extra='$extra'";
|
||||
getDbUpdate($table['s_page'],$QVAL,'uid='.$uid);
|
||||
|
||||
$_SEO = getDbData($table['s_seo'],'uid='.(int)$seouid,'uid');
|
||||
if($_SEO['uid']) getDbUpdate($table['s_seo'],"title='$title',keywords='$keywords',description='$description',classification='$classification',image_src='$image_src'",'uid='.$_SEO['uid']);
|
||||
else getDbInsert($table['s_seo'],'rel,parent,title,keywords,description,classification,image_src',"'2','$uid','$title','$keywords','$description','$classification','$image_src'");
|
||||
|
||||
if ($backgo)
|
||||
{
|
||||
if ($iframe=='Y') getLink(RW('mod='.$id),'parent.parent.','','');
|
||||
else getLink(RW('mod='.$id),'parent.','','');
|
||||
}
|
||||
else {
|
||||
setrawcookie('result_page', rawurlencode('페이지 등록정보가 변경 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
$sarr = explode(',' , trim($name));
|
||||
$slen = count($sarr);
|
||||
|
||||
for ($i = 0 ; $i < $slen; $i++)
|
||||
{
|
||||
if (!$sarr[$i]) continue;
|
||||
|
||||
$xname = trim($sarr[$i]);
|
||||
$xnarr = explode('=',$xname);
|
||||
$xnid = $xnarr[1] ? $xnarr[1] : $id;
|
||||
|
||||
if(getDbRows($table['s_page'],"site=".$s." and id='".$xnid."'")) continue;
|
||||
|
||||
$mfile = $g['path_page'].$r.'-pages/'.$xnid.'.php';
|
||||
$fp = fopen($mfile,'w');
|
||||
fwrite($fp,'');
|
||||
fclose($fp);
|
||||
@chmod($mfile,0707);
|
||||
|
||||
if ($cachetime)
|
||||
{
|
||||
$fp = fopen($g['path_page'].$r.'-pages/'.$xnid.'.txt','w');
|
||||
fwrite($fp, $cachetime);
|
||||
fclose($fp);
|
||||
@chmod($g['path_page'].$r.'-pages/'.$xnid.'.txt',0707);
|
||||
}
|
||||
|
||||
$QKEY = "site,pagetype,ismain,mobile,id,category,name,perm_g,perm_l,layout,m_layout,joint,hit,linkedmenu,d_regis,d_last,upload,mbruid,extra";
|
||||
$QVAL = "'$s','$pagetype','$ismain','$mobile','$xnid','$category','$xnarr[0]','$perm_g','$perm_l','$layout','$m_layout','$joint','$hit','$linkedmenu','$d_regis','$d_regis','$upload','".$my['uid']."','$extra'";
|
||||
getDbInsert($table['s_page'],$QKEY,$QVAL);
|
||||
$lastpage = getDbCnt($table['s_page'],'max(uid)','');
|
||||
getDbInsert($table['s_seo'],'rel,parent,title,keywords,description,classification,image_src',"'2','$lastpage','$title','$keywords','$description','$classification','$image_src'");
|
||||
|
||||
}
|
||||
|
||||
db_query("OPTIMIZE TABLE ".$table['s_page'],$DB_CONNECT);
|
||||
setrawcookie('result_page', rawurlencode('페이지가 등록 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink($g['s'].'/?r='.$r.'&m=admin&module='.$m.'&front=page&uid='.$lastpage.'&cat='.urlencode($cat).'&renum='.$recnum.'&p='.$p.'&keyw='.urlencode($keyw),'parent.','','');
|
||||
}
|
||||
?>
|
||||
161
modules/site/action/a.regissite.php
Normal file
161
modules/site/action/a.regissite.php
Normal file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$id = trim($id);
|
||||
$name = trim($name);
|
||||
$label = trim($label);
|
||||
$title = trim($title);
|
||||
$headercode = trim($headercode);
|
||||
$footercode = trim($footercode);
|
||||
$meta_title = trim($meta_title);
|
||||
$meta_keywords = trim($meta_keywords);
|
||||
$meta_description = trim($meta_description);
|
||||
$meta_classification = trim($meta_classification);
|
||||
$meta_image_src = trim($meta_image_src);
|
||||
|
||||
if ($site_uid)
|
||||
{
|
||||
$ISID = getDbData($Table['s_site'],"uid<>".$site_uid." and id='".$id."'",'*');
|
||||
if ($ISID['uid']) getLink('','','이미 동일한 명칭의 사이트 코드가 존재합니다.','');
|
||||
|
||||
if(strstr(','.$d['admin']['site_cutid'].',',','.$id.',')) {
|
||||
getLink('','','사용할 수 없는 사이트 코드 입니다.','');
|
||||
}
|
||||
|
||||
if ($iconaction)
|
||||
{
|
||||
getDbUpdate($table['s_site'],"icon='$icon'",'uid='.$site_uid);
|
||||
exit;
|
||||
}
|
||||
|
||||
$QVAL = "id='$id',name='$name',label='$label',title='$title',titlefix='$titlefix',icon='$icon',layout='$layout',startpage='$startpage',m_layout='$m_layout',m_startpage='$m_startpage',lang='$sitelang',open='$open',dtd='$dtd',nametype='$nametype',timecal='$timecal',rewrite='$rewrite',buffer='$buffer',usescode='$usescode',headercode='$headercode',footercode='$footercode'";
|
||||
getDbUpdate($table['s_site'],$QVAL,'uid='.$site_uid);
|
||||
|
||||
$_SEO = getDbData($table['s_seo'],'uid='.(int)$seouid,'uid');
|
||||
if($_SEO['uid']) getDbUpdate($table['s_seo'],"title='$meta_title',keywords='$meta_keywords',description='$meta_description',classification='$meta_classification',image_src='$meta_image_src'",'uid='.$_SEO['uid']);
|
||||
else getDbInsert($table['s_seo'],'rel,parent,title,keywords,description,classification,image_src',"'0','$site_uid','$meta_title','$meta_keywords','$meta_description','$meta_classification','$meta_image_src'");
|
||||
|
||||
$vfile = $g['path_var'].'sitephp/'.$site_uid.'.php';
|
||||
$fp = fopen($vfile,'w');
|
||||
fwrite($fp, trim(stripslashes($sitephpcode)));
|
||||
fclose($fp);
|
||||
@chmod($vfile,0707);
|
||||
|
||||
if ($r != $id)
|
||||
{
|
||||
rename($g['path_page'].$r.'-menus',$g['path_page'].$id.'-menus');
|
||||
rename($g['path_page'].$r.'-pages',$g['path_page'].$id.'-pages');
|
||||
rename($g['path_var'].'site/'.$r,$g['path_var'].'site/'.$id);
|
||||
}
|
||||
setrawcookie('result_site', rawurlencode('사이트가 등록정보가 변경되었습니다.|success')); // 처리여부 cookie 저장
|
||||
if ($r != $id || $name != $_HS['name'])
|
||||
{
|
||||
getLink($g['s'].'/?r='.$id.'&pickmodule='.$m.'&panel=Y','parent.parent.','','');
|
||||
}
|
||||
else {
|
||||
if ($iframe=='Y') getLink('reload','parent.parent.','','');
|
||||
else getLink('reload','parent.','','');
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
if (!$id)
|
||||
{
|
||||
$id = 's'.date('His');
|
||||
}
|
||||
if (!$title)
|
||||
{
|
||||
$title = $name;
|
||||
}
|
||||
|
||||
$ISID = getDbData($Table['s_site'],"id='".$id."'",'*');
|
||||
if ($ISID['uid']) getLink('','','이미 동일한 명칭의 사이트 코드가 존재합니다.','');
|
||||
|
||||
$MAXC = getDbCnt($table['s_site'],'max(gid)','');
|
||||
$gid = $MAXC + 1;
|
||||
$name = $name?trim($name):trim($label);
|
||||
|
||||
$QKEY = "gid,id,name,label,title,titlefix,icon,layout,startpage,m_layout,m_startpage,lang,open,dtd,nametype,timecal,rewrite,buffer,usescode,headercode,footercode";
|
||||
$QVAL = "'$gid','$id','$name','$label','$title','$titlefix','$icon','$layout','$startpage','$m_layout','$m_startpage','$sitelang','$open','$dtd','$nametype','$timecal','$rewrite','$buffer','$usescode','$headercode','$footercode'";
|
||||
getDbInsert($table['s_site'],$QKEY,$QVAL);
|
||||
$LASTUID = getDbCnt($table['s_site'],'max(uid)','');
|
||||
db_query("OPTIMIZE TABLE ".$table['s_site'],$DB_CONNECT);
|
||||
getDbInsert($table['s_seo'],'rel,parent,title,keywords,description,classification,image_src',"'0','$LASTUID','$meta_title','$meta_keywords','$meta_description','$meta_classification','$meta_image_src'");
|
||||
|
||||
|
||||
$vfile = $g['path_var'].'sitephp/'.$LASTUID.'.php';
|
||||
$fp = fopen($vfile,'w');
|
||||
fwrite($fp, trim(stripslashes($sitephpcode)));
|
||||
fclose($fp);
|
||||
@chmod($vfile,0707);
|
||||
|
||||
mkdir($g['path_page'].$id.'-menus',0707);
|
||||
mkdir($g['path_page'].$id.'-pages',0707);
|
||||
mkdir($g['path_page'].$id.'-menus/images',0707);
|
||||
mkdir($g['path_page'].$id.'-pages/images',0707);
|
||||
mkdir($g['path_var'].'site/'.$id,0707);
|
||||
@chmod($g['path_page'].$id.'-menus',0707);
|
||||
@chmod($g['path_page'].$id.'-pages',0707);
|
||||
@chmod($g['path_page'].$id.'-menus/images',0707);
|
||||
@chmod($g['path_page'].$id.'-pages/images',0707);
|
||||
@chmod($g['path_var'].'site/'.$id,0707);
|
||||
|
||||
$mfile = $g['path_page'].$id.'-menus/_main';
|
||||
$fp = fopen($mfile.'.css','w');
|
||||
fwrite($fp,'');
|
||||
fclose($fp);
|
||||
@chmod($mfile.'.css',0707);
|
||||
$fp = fopen($mfile.'.js','w');
|
||||
fwrite($fp,'');
|
||||
fclose($fp);
|
||||
@chmod($mfile.'.js',0707);
|
||||
|
||||
$pfile = $g['path_page'].$id.'-pages/_main';
|
||||
$fp = fopen($pfile.'.css','w');
|
||||
fwrite($fp,'');
|
||||
fclose($fp);
|
||||
@chmod($pfile.'.css',0707);
|
||||
$fp = fopen($pfile.'.js','w');
|
||||
fwrite($fp,'');
|
||||
fclose($fp);
|
||||
@chmod($pfile.'.js',0707);
|
||||
|
||||
//매니페스트 파일생성
|
||||
$manifestfile = $g['path_var'].'site/'.$id.'/manifest.json';
|
||||
$fp = fopen($manifestfile,'w');
|
||||
$iconsURL = $g['s'].'/_core/images/touch/';
|
||||
$icons = array(
|
||||
array('src'=>$iconsURL.'homescreen-128x128.png','sizes'=>'128x128','type'=>'image/png'),
|
||||
array('src'=>$iconsURL.'homescreen-144x144.png','sizes'=>'144x144','type'=>'image/png'),
|
||||
array('src'=>$iconsURL.'homescreen-168x168.png','sizes'=>'168x168','type'=>'image/png'),
|
||||
array('src'=>$iconsURL.'homescreen-192x192.png','sizes'=>'192x192','type'=>'image/png'),
|
||||
array('src'=>$iconsURL.'homescreen-512x512.png','sizes'=>'512x512','type'=>'image/png')
|
||||
);
|
||||
|
||||
$mnObj->name = $name;
|
||||
$mnObj->short_name = $name;
|
||||
$mnObj->icons = $icons;
|
||||
$mnObj->start_url = '/';
|
||||
$mnObj->display = 'standalone';
|
||||
$mnObj->background_color = '#333';
|
||||
$mnObj->theme_color = '#333';
|
||||
$mnObj->gcm_sender_id = '103953800507'; //FCM 자바스크립트 클라이언트에 공통되는 고정된 값입니다.
|
||||
|
||||
$manifestJSON = json_encode($mnObj,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
|
||||
$_manifestJSON = str_replace("\/", "/", $manifestJSON);
|
||||
fwrite($fp, $_manifestJSON);
|
||||
fclose($fp);
|
||||
@chmod($manifestfile,0707);
|
||||
|
||||
setrawcookie('result_site', rawurlencode('사이트가 등록 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
if ($nosite=='Y')
|
||||
{
|
||||
getLink($g['s'].'/?r='.$id.'&m=admin&pickmodule='.$m.'&panel=Y','parent.','','');
|
||||
}
|
||||
else {
|
||||
getLink($g['s'].'/?r='.$id.'&m=admin&pickmodule='.$m.'&panel=Y','parent.parent.','','');
|
||||
}
|
||||
}
|
||||
?>
|
||||
34
modules/site/action/a.regissitepanel.php
Normal file
34
modules/site/action/a.regissitepanel.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$id = trim($id);
|
||||
$name = trim($name);
|
||||
$title = trim($title);
|
||||
|
||||
if ($site_uid)
|
||||
{
|
||||
$ISID = getDbData($Table['s_site'],"uid<>".$site_uid." and id='".$id."'",'*');
|
||||
if ($ISID['uid']) getLink('','','이미 동일한 명칭의 계정아이디가 존재합니다.','');
|
||||
|
||||
$QVAL = "id='$id',name='$name',title='$title',layout='$layout',startpage='$startpage',m_layout='$m_layout',m_startpage='$m_startpage',open='$open'";
|
||||
getDbUpdate($table['s_site'],$QVAL,'uid='.$site_uid);
|
||||
|
||||
if ($_HS['id'] != $id)
|
||||
{
|
||||
rename($g['path_page'].$_HS['id'].'-menus',$g['path_page'].$id.'-menus');
|
||||
rename($g['path_page'].$_HS['id'].'-pages',$g['path_page'].$id.'-pages');
|
||||
}
|
||||
}
|
||||
|
||||
if ($_HS['id'] != $id || $_HS['name'] != $name)
|
||||
{
|
||||
getLink($g['s'].'/?r='.$id.'&panel=Y&_admpnl_='.urlencode($referer),'parent.parent.','변경되었습니다','');
|
||||
}
|
||||
else {
|
||||
//getLink('reload','parent.frames._ADMPNL_.','변경되었습니다','');
|
||||
setrawcookie('site_common_result', rawurlencode('변경 되었습니다.')); // 알림처리를 위한 로그인 상태 cookie 저장
|
||||
getLink('reload','parent.frames._ADMPNL_.','','');
|
||||
}
|
||||
?>
|
||||
14
modules/site/action/a.sessionsetting.php
Normal file
14
modules/site/action/a.sessionsetting.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
if ($check) $_SESSION[$name] = $_SESSION[$name] ? '' : $value;
|
||||
else $_SESSION[$name] = $value;
|
||||
|
||||
if ($target)
|
||||
{
|
||||
getLink('reload',$target,'','');
|
||||
}
|
||||
exit;
|
||||
?>
|
||||
10
modules/site/action/a.siteorder_update.php
Normal file
10
modules/site/action/a.siteorder_update.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$i=0;
|
||||
foreach($sitemembers as $val) getDbUpdate($table['s_site'],'gid='.($i++),'uid='.$val);
|
||||
|
||||
getLink('','','','');
|
||||
?>
|
||||
92
modules/site/action/a.sourcewrite.php
Normal file
92
modules/site/action/a.sourcewrite.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
if ($wysiwyg == 'Y') {
|
||||
|
||||
$__SRC__ = trim(stripslashes($source));
|
||||
$source = preg_replace("'<tmp[^>]*?>'si",'',$__SRC__);
|
||||
|
||||
$__MSRC__ = trim(stripslashes($mobile));
|
||||
$mobile = $__MSRC__;
|
||||
}
|
||||
|
||||
$seo_src = '['.$featured_img.']';
|
||||
|
||||
if($editFilter) include $g['path_plugin'].$editFilter.'/filter.php';
|
||||
|
||||
$vfile = $type == 'menu' ? $g['path_page'].$r.'-menus/'.$id : $g['path_page'].$r.'-pages/'.$id;
|
||||
|
||||
$fp = fopen($vfile.'.php','w');
|
||||
fwrite($fp, trim(stripslashes($source)));
|
||||
fclose($fp);
|
||||
@chmod($vfile.'.php',0707);
|
||||
|
||||
if (trim($mobile))
|
||||
{
|
||||
$fp = fopen($vfile.'.mobile.php','w');
|
||||
fwrite($fp, trim(stripslashes($mobile)));
|
||||
fclose($fp);
|
||||
@chmod($vfile.'.mobile.php',0707);
|
||||
}
|
||||
else {
|
||||
if(is_file($vfile.'.mobile.php'))
|
||||
{
|
||||
unlink($vfile.'.mobile.php');
|
||||
}
|
||||
}
|
||||
|
||||
if (trim($css))
|
||||
{
|
||||
$fp = fopen($vfile.'.css','w');
|
||||
fwrite($fp, trim(stripslashes($css))."\n");
|
||||
fclose($fp);
|
||||
@chmod($vfile.'.css',0707);
|
||||
}
|
||||
else {
|
||||
if(is_file($vfile.'.css'))
|
||||
{
|
||||
unlink($vfile.'.css');
|
||||
}
|
||||
}
|
||||
|
||||
if (trim($js))
|
||||
{
|
||||
$fp = fopen($vfile.'.js','w');
|
||||
fwrite($fp, trim(stripslashes($js))."\n");
|
||||
fclose($fp);
|
||||
@chmod($vfile.'.js',0707);
|
||||
}
|
||||
else {
|
||||
if(is_file($vfile.'.js'))
|
||||
{
|
||||
unlink($vfile.'.js');
|
||||
}
|
||||
}
|
||||
|
||||
$cachefile_mobile = str_replace('.php','.cache',$vfile.'.mobile');
|
||||
if(file_exists($cachefile_mobile)) unlink($cachefile_mobile);
|
||||
|
||||
if ($type == 'menu') {
|
||||
getDbUpdate($table['s_menu'],"upload='".$upload."',featured_img='".$featured_img."',d_last='".$date['totime']."'",'uid='.$uid);
|
||||
$_SEO = getDbData($table['s_seo'],'rel=1 and parent='.$uid,'image_src');
|
||||
if (!$_SEO['image_src']) getDbUpdate($table['s_seo'],"image_src='$seo_src'",'parent='.$uid);
|
||||
|
||||
} else {
|
||||
getDbUpdate($table['s_page'],"upload='".$upload."',featured_img='".$featured_img."',d_last='".$date['totime']."'",'uid='.$uid);
|
||||
$_SEO = getDbData($table['s_seo'],'rel=2 and parent='.$uid,'image_src');
|
||||
if (!$_SEO['image_src']) getDbUpdate($table['s_seo'],"image_src='$seo_src'",'parent='.$uid);
|
||||
}
|
||||
|
||||
$cachefile_pc = str_replace('.php','.cache',$vfile);
|
||||
if(file_exists($cachefile_pc)) unlink($cachefile_pc);
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$.notify({message: "저장 되었습니다."},{type: "success"});';
|
||||
echo 'parent.$("[data-role=d_last]").text("'.getDateFormat($date['totime'],'Y.m.d H:i').'");';
|
||||
echo 'parent.$(".js-submit").prop("disabled",false);';
|
||||
echo '</script>';
|
||||
|
||||
exit;
|
||||
?>
|
||||
4
modules/site/admin.php
Normal file
4
modules/site/admin.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
include $g['path_module'].$module.'/admin/'.$front.'.php';
|
||||
?>
|
||||
475
modules/site/admin/_edit.css
Normal file
475
modules/site/admin/_edit.css
Normal 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
|
||||
}
|
||||
560
modules/site/admin/_edit.php
Normal file
560
modules/site/admin/_edit.php
Normal 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.'&m='.$m.'&module='.$module.'&front='.$_mtype.'&uid='.$uid.'&cat='.urlencode($cat).'&p='.$p.'&recnum='.$recnum.'&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.'&m='.$m.'&module='.$module.'&front='.$_mtype.'&cat='.$uid.'&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?>&m=<?php echo $m?>&module=<?php echo $module?>&front=_edit&_mtype=<?php echo $_mtype?>&type=source&uid=<?php echo $uid?>&cat=<?php echo $cat?>&code=<?php echo $code?>">소스코드 편집</a>
|
||||
<?php else: ?>
|
||||
<a class="dropdown-item" href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&module=<?php echo $module?>&front=_edit&_mtype=<?php echo $_mtype?>&type=source&wysiwyg=Y&uid=<?php echo $uid?>&cat=<?php echo $cat?>&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?>&m=<?php echo $module?>&a=deletemenu&cat=<?php echo $cat?>&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?>&m=<?php echo $m?>&module=<?php echo $module?>&front=_edit&_mtype=<?php echo $_mtype?>&type=source&uid=<?php echo $uid?>&cat=<?php echo $cat?>&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?>&m=<?php echo $m?>&module=<?php echo $module?>&front=_edit&_mtype=<?php echo $_mtype?>&type=source&markdown=Y&mobileOnly=Y&uid=<?php echo $uid?>&cat=<?php echo $cat?>&code=<?php echo $code?>" class="alert-link">모바일 전용파일</a>을 생성해 주세요.<br>
|
||||
<?php endif; ?>
|
||||
|
||||
PHP 또는 Javascript 가 포함된 경우에는 <a href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&module=<?php echo $module?>&front=_edit&_mtype=<?php echo $_mtype?>&type=source&uid=<?php echo $uid?>&cat=<?php echo $cat?>&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?>&m=<?php echo $m?>&module=<?php echo $module?>&front=<?php echo $_mtype?>&uid=<?php echo $uid?>&cat=<?php echo urlencode($cat)?>&p=<?php echo $p?>&recnum=<?php echo $recnum?>&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?>&m=<?php echo $m?>&module=<?php echo $module?>&front=<?php echo $_mtype?>&cat=<?php echo $uid?>&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">×</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('&system=popup.widget&isWcode=Y')?>');
|
||||
});
|
||||
$('.rb-modal-widgetedit').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&system=popup.widget&isWcode=Y&isEdit=Y')?>');
|
||||
});
|
||||
$('.rb-modal-photoset').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&m=mediaset&mdfile=modal.photo.media&dropfield=editor')?>');
|
||||
});
|
||||
$('.rb-modal-videoset').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&m=mediaset&mdfile=modal.video.media&dropfield=editor')?>');
|
||||
});
|
||||
$('.rb-modal-widgetcall').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&system=popup.widget')?>&dropfield=-1');
|
||||
});
|
||||
$('.rb-modal-widgetcall-modify').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&system=popup.widget')?>&dropfield='+_Wdropfield+'&option='+_Woption);
|
||||
});
|
||||
|
||||
putCookieAlert('site_edit_result') // 실행결과 알림 메시지 출력
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
29
modules/site/admin/_info.php
Normal file
29
modules/site/admin/_info.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
$license_local = $g['path_module'].$module.'/LICENSE';
|
||||
$license_global = $g['path_root'].'LICENSE';
|
||||
|
||||
if (file_exists($license_local)) $license = $license_local;
|
||||
else $license = $license_global;
|
||||
?>
|
||||
|
||||
<link href="<?php echo $g['s']?>/_core/css/github-markdown.css" rel="stylesheet">
|
||||
<?php getImport('jquery-markdown','jquery.markdown','0.0.10','js')?>
|
||||
|
||||
<?php @include $g['path_module'].$module.'/var/var.moduleinfo.php' ?>
|
||||
|
||||
<article class="rb-docs markdown-body px-5 pt-3">
|
||||
<h1><?php echo sprintf('%s 모듈정보',ucfirst($MD['name']))?></h1>
|
||||
|
||||
<div class="pb-5 readme">
|
||||
<?php readfile($g['path_module'].$module.'/README.md')?>
|
||||
</div>
|
||||
|
||||
<div class="pb-5">
|
||||
<h2>라이센스</h2>
|
||||
<textarea class="form-control" rows="10"><?php readfile($license)?></textarea>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(".markdown-body .readme").markdown();
|
||||
</script>
|
||||
266
modules/site/admin/main.css
Normal file
266
modules/site/admin/main.css
Normal 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
839
modules/site/admin/main.php
Normal 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']?>&m=<?php echo $m?>&pickmodule=<?php echo $module?>&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']?>&m=<?php echo $m?>&pickmodule=<?php echo $module?>&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']?>&type=makesite&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?>&m=<?php echo $module?>&a=deletesite&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><title> </title></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?>&m=<?php echo $m?>&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?>&m=<?php echo $m?>&module=<?php echo $module?>&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><title> </title></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&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?>&m=<?php echo $m?>&module=domain&selsite=<?php echo $R['uid']?>&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><head> </head></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></body></html></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><?php ?></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><meta name="title" content=""></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><meta name="description" content=""></code> 내부에 삽입됩니다.<br>
|
||||
검색 결과에 표시되는 문자를 지정합니다. 설명글은 엔터없이 입력해 주세요.<br>
|
||||
보기)웹 프레임워크의 혁신 - 킴스큐 Rb 에 대한 다운로드,팁 공유등을 제공합니다. <a href="http://moz.com/learn/seo/meta-description" target="_blank">참고</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><meta name="keywords" content=""></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><meta name="robots" content=""></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('&m=mediaset&mdfile=modal.photo.media&dropfield=meta_image_src')?>');
|
||||
});
|
||||
$('.rb-modal-photo-drop').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&m=mediaset&mdfile=modal.photo.media&dropfield=')?>'+_mediasetField);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 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
114
modules/site/admin/menu.css
Normal 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
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
180
modules/site/admin/page.css
Normal 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
891
modules/site/admin/page.php
Normal 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']?>&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']?>&uid=<?php echo $PR['uid']?>&recnum=<?php echo $recnum?>&p=<?php echo $p?>&cat=<?php echo urlencode($cat)?>&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?>&m=<?php echo $module?>&a=dumpmenu&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?>&m=<?php echo $module?>&a=deletepage&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">기본 : </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="<?php echo RW('mod=<?php echo $R['id']?>') ?>" 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><meta name="title" content=""></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><meta name="description" content=""></code> 내부에 삽입됩니다.<br>
|
||||
검색 결과에 표시되는 문자를 지정합니다.<br>설명글은 엔터없이 입력해 주세요.<br>
|
||||
보기)웹 프레임워크의 혁신 - 킴스큐 Rb 에 대한 다운로드,팁 공유등을 제공합니다. <a href="http://moz.com/learn/seo/meta-description" target="_blank">참고</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><meta name="keywords" content=""></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><meta name="robots" content=""></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"> 사용안함 (기본 레이아웃 적용)</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"> 사용안함 (기본 레이아웃 적용)</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('&system=popup.joint&dropfield=jointf&cmodule=[site]')?>');
|
||||
});
|
||||
$('.rb-modal-photo').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&m=mediaset&mdfile=modal.photo.media&dropfield=mediaset')?>');
|
||||
});
|
||||
$('.rb-modal-photo1').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&m=mediaset&mdfile=modal.photo.media&dropfield=meta_image_src')?>');
|
||||
});
|
||||
$('.rb-modal-video').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&m=mediaset&mdfile=modal.video.media&dropfield=mediaset')?>');
|
||||
});
|
||||
$('.rb-modal-photo-drop').on('click',function() {
|
||||
modalSetting('modal_window','<?php echo getModalLink('&m=mediaset&mdfile=modal.photo.media&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>
|
||||
66
modules/site/admin/var/var.joint.php
Normal file
66
modules/site/admin/var/var.joint.php
Normal 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=""> + 페이지분류</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">
|
||||
5
modules/site/admin/var/var.menu.php
Normal file
5
modules/site/admin/var/var.menu.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$d['amenu']['main'] ='사이트';
|
||||
$d['amenu']['menu'] = '메뉴';
|
||||
$d['amenu']['page'] = '페이지';
|
||||
?>
|
||||
59
modules/site/for-searching/_desktop/page.php
Normal file
59
modules/site/for-searching/_desktop/page.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**************************************************************
|
||||
아래의 변수를 이용합니다.
|
||||
$_iscallpage 통합검색 이거나 더보기일경우 true 아니면 false
|
||||
$where 검색위치
|
||||
$keyword 검색키워드
|
||||
$orderby (desc 최신순 / asc 오래된순)
|
||||
$d['search']['num1'] 전체검색 출력수
|
||||
$d['search']['num2'] 전용검색 한 페이당 출력수
|
||||
$d['search']['term'] 검색기간(월단위)
|
||||
|
||||
검색결과 DIV id 정의방법 : <div id="rb-search-모듈id-검색파일명"> ... </div>
|
||||
***************************************************************
|
||||
검색결과 추출 예제 ::
|
||||
|
||||
$sqlque = ''; // 검색용 SQL 초기화
|
||||
if ($keyword)
|
||||
{
|
||||
$sqlque .= getSearchSql('검색필드',$keyword,'','or'); //검색필드 설정방법 : 1개의 필드 -> 필드명 , 복수의 필드 -> 필드명을 |(파이프) 로 구분
|
||||
}
|
||||
|
||||
// 더보기 검색일 경우에만 실행함
|
||||
if ($swhere == $_key)
|
||||
{
|
||||
$sort = 'uid'; // 기본 정렬필드
|
||||
$RCD = getDbArray($table['테이블명'],$sqlque,'*',$sort,$orderby,$d['search']['num'.($swhere=='all'?1:2)],$p);
|
||||
while($_R = db_fetch_array($RCD))
|
||||
{
|
||||
echo $_R['필드네임'];
|
||||
}
|
||||
}
|
||||
$_ResultArray['num'][$_key] = getDbRows($table['테이블명'],$sqlque); // 검색어에 해당되는 결과갯수 <- 무조건 실행해야 됨
|
||||
**************************************************************
|
||||
아래의 예제는 실제로 페이지를 검색하는 샘플입니다.
|
||||
페이징,더보기,검색결과 없을경우 안내등은 모두 자동으로 처리되니 결과 리스트만 출력해 주시면 됩니다.
|
||||
최초 설치시 "이용약관" 이나 "개인정보" 로 검색하시면 결과값을 얻으실 수 있습니다.
|
||||
**************************************************************/
|
||||
?>
|
||||
|
||||
<?php
|
||||
$sqlque = 'uid';
|
||||
$sqlque .= getSearchSql('name',$keyword,'','or'); // 게시물 제목과 내용 검색
|
||||
$orderby = 'desc';
|
||||
|
||||
if($_iscallpage):
|
||||
$RCD = getDbArray($table['s_page'],$sqlque,'*','uid',$orderby,$d['search']['num'.($swhere=='all'?1:2)],$p);
|
||||
?>
|
||||
<article>
|
||||
<ol class="mb-0">
|
||||
<?php while($_R=db_fetch_array($RCD)):?>
|
||||
<li><a href="<?php echo RW('mod='.$_R['id'].'') ?>"><?php echo $_R['name']?></a></li>
|
||||
<?php endwhile?>
|
||||
</ol>
|
||||
</article>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
$_ResultArray['num'][$_key] = getDbRows($table['s_page'],$sqlque);
|
||||
?>
|
||||
59
modules/site/for-searching/_mobile/page.php
Normal file
59
modules/site/for-searching/_mobile/page.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**************************************************************
|
||||
아래의 변수를 이용합니다.
|
||||
$_iscallpage 통합검색 이거나 더보기일경우 true 아니면 false
|
||||
$where 검색위치
|
||||
$keyword 검색키워드
|
||||
$orderby (desc 최신순 / asc 오래된순)
|
||||
$d['search']['num1'] 전체검색 출력수
|
||||
$d['search']['num2'] 전용검색 한 페이당 출력수
|
||||
$d['search']['term'] 검색기간(월단위)
|
||||
|
||||
검색결과 DIV id 정의방법 : <div id="rb-search-모듈id-검색파일명"> ... </div>
|
||||
***************************************************************
|
||||
검색결과 추출 예제 ::
|
||||
|
||||
$sqlque = ''; // 검색용 SQL 초기화
|
||||
if ($keyword)
|
||||
{
|
||||
$sqlque .= getSearchSql('검색필드',$keyword,'','or'); //검색필드 설정방법 : 1개의 필드 -> 필드명 , 복수의 필드 -> 필드명을 |(파이프) 로 구분
|
||||
}
|
||||
|
||||
// 더보기 검색일 경우에만 실행함
|
||||
if ($swhere == $_key)
|
||||
{
|
||||
$sort = 'uid'; // 기본 정렬필드
|
||||
$RCD = getDbArray($table['테이블명'],$sqlque,'*',$sort,$orderby,$d['search']['num'.($swhere=='all'?1:2)],$p);
|
||||
while($_R = db_fetch_array($RCD))
|
||||
{
|
||||
echo $_R['필드네임'];
|
||||
}
|
||||
}
|
||||
$_ResultArray['num'][$_key] = getDbRows($table['테이블명'],$sqlque); // 검색어에 해당되는 결과갯수 <- 무조건 실행해야 됨
|
||||
**************************************************************
|
||||
아래의 예제는 실제로 페이지를 검색하는 샘플입니다.
|
||||
페이징,더보기,검색결과 없을경우 안내등은 모두 자동으로 처리되니 결과 리스트만 출력해 주시면 됩니다.
|
||||
최초 설치시 "이용약관" 이나 "개인정보" 로 검색하시면 결과값을 얻으실 수 있습니다.
|
||||
**************************************************************/
|
||||
?>
|
||||
|
||||
<?php
|
||||
$sqlque = 'uid';
|
||||
$sqlque .= getSearchSql('name',$keyword,'','or'); // 게시물 제목과 내용 검색
|
||||
$orderby = 'desc';
|
||||
|
||||
if($_iscallpage):
|
||||
$RCD = getDbArray($table['s_page'],$sqlque,'*','uid',$orderby,$d['search']['num'.($swhere=='all'?1:2)],$p);
|
||||
?>
|
||||
<article>
|
||||
<ol class="mb-0">
|
||||
<?php while($_R=db_fetch_array($RCD)):?>
|
||||
<li><a href="<?php echo RW('mod='.$_R['id'].'') ?>"><?php echo $_R['name']?></a></li>
|
||||
<?php endwhile?>
|
||||
</ol>
|
||||
</article>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
$_ResultArray['num'][$_key] = getDbRows($table['s_page'],$sqlque);
|
||||
?>
|
||||
178
modules/site/main.php
Normal file
178
modules/site/main.php
Normal file
@@ -0,0 +1,178 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
if ($system)
|
||||
{
|
||||
if (strpos('[popup.joint][popup.widget]',$system))
|
||||
{
|
||||
if (!$my['admin'])
|
||||
{
|
||||
$system = 'nopage';
|
||||
}
|
||||
}
|
||||
$g['dir_module_skin'] = $g['dir_module'].'pages/';
|
||||
$g['url_module_skin'] = $g['url_module'].'/pages';
|
||||
$g['img_module_skin'] = $g['url_module_skin'].'/images';
|
||||
$g['dir_module_mode'] = $g['dir_module_skin'].$system;
|
||||
$g['url_module_mode'] = $g['url_module_skin'].'/'.$system;
|
||||
$g['main'] = $g['dir_module_mode'].'.php';
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SEO_SITE = getDbData($table['s_seo'],'rel=0 and parent='.$_HS['uid'],'*');
|
||||
|
||||
if ($_HM['uid'])
|
||||
{
|
||||
if (!$my['admin'])
|
||||
{
|
||||
if ($_HM['perm_l'] > $my['level'] || strpos('_'.$_HM['perm_g'],'['.$my['sosok'].']'))
|
||||
{
|
||||
getLink($g['s'].'/?r='.$r.'&system=guide.perm&_menu='.$_HM['uid'],'','','');
|
||||
}
|
||||
}
|
||||
if($_HM['menutype'] == 1)
|
||||
{
|
||||
if($m == $g['sys_module'])
|
||||
{
|
||||
if (!$mod) $_HP = getUidData($table['s_page'],$_HS['startpage']);
|
||||
else $_HP = getDbData($table['s_page'],"id='".$mod."'",'*');
|
||||
if($_HP['uid']) $_HM['layout'] = $_HP['layout'];
|
||||
}
|
||||
else {
|
||||
getLink($g['s'].'/?r='.$r,'','','');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$g['dir_module_skin'] = $g['path_page'].$r.'-menus/';
|
||||
$g['url_module_skin'] = $g['s'].'/pages/'.$r.'-menus';
|
||||
$g['img_module_skin'] = $g['url_module_skin'].'/images';
|
||||
$g['dir_module_mode'] = $g['dir_module_skin'].$_HM['id'];
|
||||
$g['url_module_mode'] = $g['url_module_skin'].'/'.$_HM['id'];
|
||||
$g['main'] = $g['path_page'].$r.'-menus/'.$_HM['id'].'.php';
|
||||
if ($g['device'])
|
||||
{
|
||||
if (is_file($g['path_page'].$r.'-menus/'.$_HM['id'].'.mobile.php'))
|
||||
{
|
||||
$g['main'] = $g['path_page'].$r.'-menus/'.$_HM['id'].'.mobile.php';
|
||||
}
|
||||
}
|
||||
$d['page']['cctime'] = $g['path_page'].$r.'-menus/'.$_HM['id'].'.txt';
|
||||
$d['page']['source'] = $g['main'];
|
||||
}
|
||||
$_SEO = getDbData($table['s_seo'],'rel=1 and parent='.$_HM['uid'],'*');
|
||||
if ($_SEO['uid'])
|
||||
{
|
||||
$g['meta_tit'] = $_SEO['title'];
|
||||
$g['meta_key'] = $_SEO['keywords'];
|
||||
$g['meta_des'] = $_SEO['description'];
|
||||
$g['meta_bot'] = $_SEO['classification'];
|
||||
if ($_SEO['image_src']) $g['meta_img'] = getMetaImage($_SEO['image_src']);
|
||||
else $g['meta_img'] = $_SEO_SITE['image_src']?getMetaImage($_SEO_SITE['image_src']):$g['img_core'].'/noimage_kimsq.png';
|
||||
}
|
||||
else {
|
||||
$g['meta_tit'] = $_HM['name'];
|
||||
}
|
||||
}
|
||||
if ($_HP['uid'])
|
||||
{
|
||||
if (!$my['admin'])
|
||||
{
|
||||
if ($_HP['perm_l'] > $my['level'] || strpos('_'.$_HP['perm_g'],'['.$my['sosok'].']'))
|
||||
{
|
||||
getLink($g['s'].'/?r='.$r.'&system=guide.perm&_page='.$_HP['uid'],'','','');
|
||||
}
|
||||
}
|
||||
if ($_HP['pagetype'] == 1)
|
||||
{
|
||||
getLink($g['s'].'/?r='.$r,'','','');
|
||||
}
|
||||
else
|
||||
{
|
||||
$_HM['layout'] = $_HP['layout'];
|
||||
$_HM['m_layout'] = $_HP['m_layout']?$_HP['m_layout']:$_HP['layout'];
|
||||
$g['dir_module_skin'] = $g['path_page'].$r.'-pages/';
|
||||
$g['url_module_skin'] = $g['s'].'/pages/'.$r.'-pages';
|
||||
$g['img_module_skin'] = $g['url_module_skin'].'/images';
|
||||
$g['dir_module_mode'] = $g['dir_module_skin'].$_HP['id'];
|
||||
$g['url_module_mode'] = $g['url_module_skin'].'/'.$_HP['id'];
|
||||
$g['main'] = $g['path_page'].$r.'-pages/'.$_HP['id'].'.php';
|
||||
if ($g['device'])
|
||||
{
|
||||
if (is_file($g['path_page'].$r.'-pages/'.$_HP['id'].'.mobile.php'))
|
||||
{
|
||||
$g['main'] = $g['path_page'].$r.'-pages/'.$_HP['id'].'.mobile.php';
|
||||
}
|
||||
}
|
||||
$d['page']['cctime'] = $g['path_page'].$r.'-pages/'.$_HP['id'].'.txt';
|
||||
$d['page']['source'] = $g['main'];
|
||||
}
|
||||
if($_HP['linkedmenu'])
|
||||
{
|
||||
$_CA = explode('/',$_HP['linkedmenu']);
|
||||
$g['location'] = '<a href="'.RW(0).'">HOME</a>';
|
||||
$_tmp['count'] = count($_CA);
|
||||
$_tmp['split_id'] = '';
|
||||
for ($_i = 0; $_i < $_tmp['count']; $_i++)
|
||||
{
|
||||
$_tmp['location'] = getDbData($table['s_menu'],"id='".$_CA[$_i]."'",'*');
|
||||
$_tmp['split_id'].= ($_i?'/':'').$_tmp['location']['id'];
|
||||
$g['location'] .= ' > <a href="'.RW('c='.$_tmp['split_id']).'">'.$_tmp['location']['name'].'</a>';
|
||||
}
|
||||
$g['location'] .= ' > <a href="'.RW('mod='.$_HP['id']).'">'.$_HP['name'].'</a>';
|
||||
}
|
||||
$_SEO = getDbData($table['s_seo'],'rel=2 and parent='.$_HP['uid'],'*');
|
||||
if ($_SEO['uid']) {
|
||||
if ($_HP['ismain']) {
|
||||
$g['meta_tit'] = $_SEO['title']?$_SEO['title']:$_SEO_SITE['title'];
|
||||
$g['meta_key'] = $_SEO['keywords']?$_SEO['keywords']:$_SEO_SITE['keywords'];
|
||||
$g['meta_des'] = $_SEO['description']?$_SEO['description']:$_SEO_SITE['description'];
|
||||
$g['meta_bot'] = $_SEO['classification']?$_SEO['classification']:$_SEO_SITE['classification'];
|
||||
} else {
|
||||
$g['meta_tit'] = $_SEO['title'];
|
||||
$g['meta_key'] = $_SEO['keywords'];
|
||||
$g['meta_des'] = $_SEO['description'];
|
||||
$g['meta_bot'] = $_SEO['classification'];
|
||||
}
|
||||
if ($_SEO['image_src']) $g['meta_img'] = getMetaImage($_SEO['image_src']);
|
||||
else $g['meta_img'] = $_SEO_SITE['image_src']?getMetaImage($_SEO_SITE['image_src']):$g['img_core'].'/noimage_kimsq.png';
|
||||
} else {
|
||||
$g['meta_tit'] = $_HP['name'];
|
||||
$g['meta_key'] = $_HP['name'].','.$_HP['name'];
|
||||
}
|
||||
}
|
||||
if(!is_file($g['main']))
|
||||
{
|
||||
if ($_HM['uid'])
|
||||
{
|
||||
getLink($g['s'].'/?r='.$r,'','','');
|
||||
}
|
||||
else {
|
||||
if ($g['device'])
|
||||
{
|
||||
if ($_HS['m_startpage'])
|
||||
{
|
||||
getLink($g['s'].'/?r='.$r,'','','');
|
||||
}
|
||||
else {
|
||||
$d['site_layout'] = dirname($_HS['m_layout']?$_HS['m_layout']:$_HS['layout']);
|
||||
$g['dir_module_mode'] = $g['path_layout'].$d['site_layout'].'/_pages/main';
|
||||
$g['url_module_mode'] = $g['s'].'/layouts/'.$d['site_layout'].'/_pages/main';
|
||||
$g['main'] = $g['path_layout'].$d['site_layout'].'/_pages/main.php';
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($_HS['startpage'])
|
||||
{
|
||||
getLink($g['s'].'/?r='.$r,'','','');
|
||||
}
|
||||
else {
|
||||
$d['site_layout'] = dirname($_HS['layout']);
|
||||
$g['dir_module_mode'] = $g['path_layout'].$d['site_layout'].'/_pages/main';
|
||||
$g['url_module_mode'] = $g['s'].'/layouts/'.$d['site_layout'].'/_pages/main';
|
||||
$g['main'] = $g['path_layout'].$d['site_layout'].'/_pages/main.php';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
1
modules/site/name.txt
Normal file
1
modules/site/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
사이트
|
||||
10
modules/site/pages/guide.install.css
Normal file
10
modules/site/pages/guide.install.css
Normal file
@@ -0,0 +1,10 @@
|
||||
body,
|
||||
.fullscreen {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
padding: 30vh;
|
||||
}
|
||||
|
||||
#qrcode img {
|
||||
margin : 30px auto
|
||||
}
|
||||
34
modules/site/pages/guide.install.php
Normal file
34
modules/site/pages/guide.install.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="text-center" style="margin-top: -100px">
|
||||
<h1>
|
||||
<i class="kf kf-bi-06 fa-lg d-block mb-4" title="KimsQ is Kind" data-tooltip="tooltip"></i>
|
||||
설치가 완료되었습니다.
|
||||
</h1>
|
||||
<p class="text-muted">
|
||||
<?php echo sprintf('%s님, 이 페이지를 보고 계시면 킴스큐가 정상적으로 설치된 것입니다.',$my['name'])?><br>
|
||||
이제 킴스큐를 시작할 준비가 되셨습니다.
|
||||
</p>
|
||||
|
||||
<div id="qrcode"></div>
|
||||
|
||||
<a href="<?php echo RW(0) ?>" class="btn btn-primary btn-lg animated bounce delay-3">
|
||||
시작하기
|
||||
</a>
|
||||
</div>
|
||||
<script src="//cdn.jsdelivr.net/npm/davidshimjs-qrcodejs@0.0.2/qrcode.min.js"></script>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', 'UA-55876126-3', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
var qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||
text: '<?php echo $g['url_root'].$g['s'] ?>',
|
||||
width: 150,
|
||||
height: 150,
|
||||
colorDark : "#333",
|
||||
colorLight : "#f8f9fa",
|
||||
correctLevel : QRCode.CorrectLevel.H
|
||||
});
|
||||
</script>
|
||||
35
modules/site/pages/guide.perm.css
Normal file
35
modules/site/pages/guide.perm.css
Normal file
@@ -0,0 +1,35 @@
|
||||
html,
|
||||
body,
|
||||
#content,
|
||||
#content-main,
|
||||
.rb-guide-wrapper {
|
||||
height: 98% !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Open Sans", '돋움', dotum, sans-serif;
|
||||
}
|
||||
|
||||
.rb-guide-wrapper {
|
||||
display: table;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner .container {
|
||||
margin-top: -100px;
|
||||
line-height: 1.8
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner h1 .fa {
|
||||
margin-bottom: 15px
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner h1 .fa.text-muted {
|
||||
color: #B4B3B3
|
||||
}
|
||||
26
modules/site/pages/guide.perm.php
Normal file
26
modules/site/pages/guide.perm.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<meta name="robots" content="noindex">
|
||||
|
||||
<div class="rb-guide-wrapper">
|
||||
<div class="rb-guide-wrapper-inner">
|
||||
<div class="container">
|
||||
<h1>
|
||||
<i class="fa fa-lock fa-3x text-muted"></i><br>
|
||||
서비스 안내
|
||||
</h1>
|
||||
<p class="text-muted">
|
||||
요청하신 페이지는 권한이 있어야 접근하실 수 있습니다.<br class="hidden-xs">
|
||||
로그인하신 후에 이용하세요.<br class="hidden-xs">
|
||||
로그인을 하신 후에도 이 페이지가 출력되면 회원등급 권한이 없는 경우입니다.
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" class="btn btn-default" onclick="goBack();">이전으로</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
}
|
||||
</script>
|
||||
35
modules/site/pages/guide.stopsite.css
Normal file
35
modules/site/pages/guide.stopsite.css
Normal file
@@ -0,0 +1,35 @@
|
||||
html,
|
||||
body,
|
||||
#content,
|
||||
#content-main,
|
||||
.rb-guide-wrapper {
|
||||
height: 98% !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Open Sans", '돋움', dotum, sans-serif;
|
||||
}
|
||||
|
||||
.rb-guide-wrapper {
|
||||
display: table;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner .container {
|
||||
margin-top: -100px;
|
||||
line-height: 1.8
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner h1 .fa {
|
||||
margin-bottom: 15px
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner h1 .fa.text-muted {
|
||||
color: #B4B3B3
|
||||
}
|
||||
25
modules/site/pages/guide.stopsite.php
Normal file
25
modules/site/pages/guide.stopsite.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<meta name="robots" content="noindex">
|
||||
|
||||
<div class="rb-guide-wrapper">
|
||||
<div class="rb-guide-wrapper-inner">
|
||||
<div class="container">
|
||||
<h1>
|
||||
<i class="fa fa-exclamation-triangle fa-3x text-muted"></i><br>
|
||||
서비스 안내
|
||||
</h1>
|
||||
<p class="text-muted">
|
||||
서비스가 일시적으로 중단되었거나 서버 작업중에 있습니다.<br class="hidden-xs">
|
||||
작업이 완료되는대로 재오픈될 예정입니다.
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" class="btn btn-default" onclick="goBack();">이전으로</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
}
|
||||
</script>
|
||||
BIN
modules/site/pages/images/btn_conf.gif
Normal file
BIN
modules/site/pages/images/btn_conf.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 857 B |
BIN
modules/site/pages/images/btn_del.gif
Normal file
BIN
modules/site/pages/images/btn_del.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 889 B |
BIN
modules/site/pages/images/btn_move.gif
Normal file
BIN
modules/site/pages/images/btn_move.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 860 B |
BIN
modules/site/pages/images/btn_resize.gif
Normal file
BIN
modules/site/pages/images/btn_resize.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 869 B |
BIN
modules/site/pages/images/thumb_small.gif
Normal file
BIN
modules/site/pages/images/thumb_small.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
182
modules/site/pages/modal.icons.php
Normal file
182
modules/site/pages/modal.icons.php
Normal file
@@ -0,0 +1,182 @@
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#kf" data-toggle="tab">kimsQ</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#awesome" data-toggle="tab">Awesome</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content icon-gallery">
|
||||
<div class="tab-pane active" id="kf">
|
||||
<h5>Default Modules</h5>
|
||||
<ul class="icon-list kf">
|
||||
<li><span class="kf-comment" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-bbs" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-analysis" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-admin" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-widget" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-upload" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-tag" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-home" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-search" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-popup" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-notify" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-module" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-member" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-media" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-market" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-layout" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-domain" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-device" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-dbmanager" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-dashboard" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="kf-contents" onclick="iconDrop(this.className);"></span></li>
|
||||
</ul>
|
||||
<h5>kimsQ BI</h5>
|
||||
<ul class="icon-list kf">
|
||||
<li><span class="fa kf-bi-03" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="fa kf-bi-04" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="fa kf-bi-05" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="fa kf-bi-06" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="fa kf-bi-07" onclick="iconDrop(this.className);"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-pane" id="awesome">
|
||||
<h5 class="text-primary">Brand Icons <small></small></h5>
|
||||
<ul class="icon-list awesome">
|
||||
<li title="android"><span class="fa fa-android" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="apple"><span class="fa fa-apple" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="google-plus"><span class="fa fa-google-plus" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="twitter"><span class="fa fa-twitter" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="facebook"><span class="fa fa-facebook" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="html5"><span class="fa fa-html5" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="css3"><span class="fa fa-css3" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="dropbox"><span class="fa fa-dropbox" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="flickr"><span class="fa fa-flickr" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="github"><span class="fa fa-github" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="github-alt"><span class="fa fa-github-alt" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="instagram"><span class="fa fa-instagram" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="linkedin"><span class="fa fa-linkedin" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="linux"><span class="fa fa-linux" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="pinterest"><span class="fa fa-pinterest" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="skype"><span class="fa fa-skype" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="vimeo"><span class="fa fa-vimeo-square" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="windows"><span class="fa fa-windows" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="youtube"><span class="fa fa-youtube" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="dribbble"><span class="fa fa-dribbble" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="foursquare"><span class="fa fa-foursquare" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="tumblr"><span class="fa fa-tumblr" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="pagelines"><span class="fa fa-pagelines" onclick="iconDrop(this.className);"></span></li>
|
||||
<li title="maxcdn"><span class="fa fa-maxcdn" onclick="iconDrop(this.className);"></span></li>
|
||||
</ul>
|
||||
<h5 class="text-primary">Web Application Icons <small>(업데이트 예정)</small></h5>
|
||||
<ul class="icon-list awesome">
|
||||
<li><span class="fa fa-adjust" onclick="iconDrop(this.className);"></span></li>
|
||||
<li><span class="fa fa-anchor" onclick="iconDrop(this.className);"></span></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- @부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴 -->
|
||||
|
||||
<div id="_modal_header" hidden>
|
||||
<h4 class="modal-title" id="myModalLabel"><i class="fa fa-flag"></i> 아이콘 갤러리</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="_modal_footer" hidden>
|
||||
<button type="button" class="btn btn-default" aria-hidden="true" data-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function iconDrop(val)
|
||||
{
|
||||
parent.iconDrop(val);
|
||||
}
|
||||
function modalSetting()
|
||||
{
|
||||
parent.getId('modal_window_dialog_modal_window').style.width = '100%';
|
||||
parent.getId('modal_window_dialog_modal_window').style.paddingRight = '20px';
|
||||
parent.getId('modal_window_dialog_modal_window').style.maxWidth = '600px';
|
||||
parent.getId('_modal_iframe_modal_window').style.height = '450px'
|
||||
parent.getId('_modal_body_modal_window').style.height = '450px';
|
||||
|
||||
|
||||
parent.getId('_modal_header_modal_window').innerHTML = getId('_modal_header').innerHTML;
|
||||
parent.getId('_modal_header_modal_window').className = 'modal-header';
|
||||
parent.getId('_modal_header_modal_window').style.background = '#3F424B';
|
||||
parent.getId('_modal_header_modal_window').style.color = '#fff';
|
||||
parent.getId('_modal_body_modal_window').style.padding = '0';
|
||||
parent.getId('_modal_body_modal_window').style.margin = '0';
|
||||
|
||||
parent.getId('_modal_footer_modal_window').innerHTML = getId('_modal_footer').innerHTML;
|
||||
parent.getId('_modal_footer_modal_window').className = 'modal-footer';
|
||||
}
|
||||
modalSetting();
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
#rb-body {
|
||||
background-color: #fff;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
/*icon-gallery*/
|
||||
|
||||
.icon-gallery {
|
||||
height: 380px;
|
||||
overflow: auto;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.icon-gallery .icon-list {
|
||||
padding-left: 0;
|
||||
padding-bottom: 1px;
|
||||
margin-bottom: 20px;
|
||||
list-style: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
.icon-gallery .icon-list li {
|
||||
float: left;
|
||||
width: 12.5%;
|
||||
padding: 10px;
|
||||
margin: 0 -1px -1px 0;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
text-align: center;
|
||||
border: 1px solid #ddd;
|
||||
list-style-type: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.icon-gallery .kf span {
|
||||
font-size: 30px;
|
||||
}
|
||||
.icon-gallery .awesome span {
|
||||
font-size: 30px;
|
||||
}
|
||||
.icon-gallery .icon-list .glyphicon {
|
||||
font-size: 25px;
|
||||
}
|
||||
.icon-gallery .icon-list .glyphicon-class {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
.icon-gallery .icon-list li:hover {
|
||||
background-color: rgba(86,61,124,.1);
|
||||
}
|
||||
|
||||
.icon-gallery .icon-list li.active {
|
||||
background-color: rgba(86,61,124,.1);
|
||||
}
|
||||
</style>
|
||||
35
modules/site/pages/nopage.css
Normal file
35
modules/site/pages/nopage.css
Normal file
@@ -0,0 +1,35 @@
|
||||
html,
|
||||
body,
|
||||
#content,
|
||||
#content-main,
|
||||
.rb-guide-wrapper {
|
||||
height: 98% !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Open Sans", '돋움', dotum, sans-serif;
|
||||
}
|
||||
|
||||
.rb-guide-wrapper {
|
||||
display: table;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner .container {
|
||||
margin-top: -100px;
|
||||
line-height: 1.8
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner h1 .fa {
|
||||
margin-bottom: 15px
|
||||
}
|
||||
|
||||
.rb-guide-wrapper-inner h1 .fa.text-muted {
|
||||
color: #B4B3B3
|
||||
}
|
||||
25
modules/site/pages/nopage.php
Normal file
25
modules/site/pages/nopage.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<meta name="robots" content="noindex">
|
||||
|
||||
<div class="rb-guide-wrapper">
|
||||
<div class="rb-guide-wrapper-inner">
|
||||
<div class="container">
|
||||
<h1>
|
||||
<i class="fa fa-exclamation-circle fa-3x text-muted"></i><br>
|
||||
페이지를 찾을 수 없습니다.
|
||||
</h1>
|
||||
<p class="text-muted">
|
||||
요청하신 페이지는 존재하지 않거나 컨텐츠연결이 잘못된 상태입니다.<br class="hidden-xs">
|
||||
관리자로 로그인하시면 요청하신 페이지를 직접 만드시거나 페이지에 대한 세부설정을 확인하실 수 있습니다.
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" class="btn btn-default" onclick="goBack();">이전으로</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
}
|
||||
</script>
|
||||
67
modules/site/pages/popup.joint.css
Normal file
67
modules/site/pages/popup.joint.css
Normal file
@@ -0,0 +1,67 @@
|
||||
#jointbox {
|
||||
width: 100%;
|
||||
height: 550px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#jointbox .category {
|
||||
float: left;
|
||||
width: 205px;
|
||||
height: 100%;
|
||||
margin-right: -200px;
|
||||
padding: 0;
|
||||
border-right: #dfdfdf dashed 1px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#jointbox .category .list-group-item:first-child {
|
||||
border-top: 0;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
#jointbox .category .list-group-item:last-child {
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
#jointbox .category .list-group-item {
|
||||
border-left: 0;
|
||||
border-right: 0
|
||||
}
|
||||
|
||||
#jointbox .content {
|
||||
margin-left: 205px;
|
||||
height: 430px;
|
||||
padding: 20px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#jointbox .content .none {
|
||||
color: #c0c0c0;
|
||||
text-align: center;
|
||||
padding-top: 70px;
|
||||
}
|
||||
|
||||
#jointbox .list-group-item {
|
||||
padding: 8px 5px 3px 7px;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
#jointbox {
|
||||
overflow: auto;
|
||||
}
|
||||
#jointbox .category {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border: 0;
|
||||
}
|
||||
#jointbox .content {
|
||||
float: left;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-left: 0;
|
||||
padding: 10px 10px 120px 10px;
|
||||
}
|
||||
}
|
||||
70
modules/site/pages/popup.joint.php
Normal file
70
modules/site/pages/popup.joint.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<div id="jointbox">
|
||||
<div class="category">
|
||||
<div class="list-group">
|
||||
<?php $MODULES = getDbArray($table['s_module'],'','*','gid','asc',0,1)?>
|
||||
<?php while($R=db_fetch_array($MODULES)):?>
|
||||
<?php $_jfile0 = $g['path_module'].$R['id'].'/admin/var/var.joint.php'?>
|
||||
<?php if(!is_file($_jfile0)||strstr($cmodule,'['.$R['id'].']'))continue?>
|
||||
<?php if($smodule==$R['id']) $g['var_joint_file'] = is_file($_jfile0)?$_jfile0:(is_file($_jfile1)?$_jfile1:$_jfile2)?>
|
||||
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&system=<?php echo $system?>&iframe=<?php echo $iframe?>&dropfield=<?php echo $dropfield?>&smodule=<?php echo $R['id']?>&cmodule=<?php echo $cmodule?>" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center<?php if($smodule==$R['id']):?> active<?php endif?>"><span><i class="kf fa-fw <?php echo $R['icon']?$R['icon']:'kf-'.$R['id']?>"></i> <?php echo $R['name']?></span><span class="badge badge-light badge-pill"><?php echo $R['id']?></span></a>
|
||||
<?php endwhile?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php if($smodule):?>
|
||||
<?php include $g['var_joint_file'] ?>
|
||||
<?php else:?>
|
||||
<div class="none">
|
||||
<i class="kf kf-module fa-5x"></i><br><br>
|
||||
연결할 모듈을 선택하세요.
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- @부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴 -->
|
||||
|
||||
<div id="_modal_header" class="hidden">
|
||||
<h4 class="modal-title"><i class="kf-module kf-lg"></i> 모듈 연결하기</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
|
||||
<div id="_modal_footer" class="hidden">
|
||||
<?php if($dropButtonUrl):?>
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" aria-hidden="true" id="_modalclosebtn_">닫기</button>
|
||||
<button type="button" class="btn btn-primary" onclick="frames._modal_iframe_modal_window.dropJoint('<?php echo $dropButtonUrl?>');">모듈연결</button>
|
||||
<?php else:?>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" aria-hidden="true" id="_modalclosebtn_">닫기</button>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function dropJoint(m)
|
||||
{
|
||||
var f = parent.getId('<?php echo $dropfield?>');
|
||||
f.value = m;
|
||||
parent.$('#modal_window').modal('hide');
|
||||
}
|
||||
function modalSetting()
|
||||
{
|
||||
parent.getId('modal_window_dialog_modal_window').style.width = '100%';
|
||||
parent.getId('modal_window_dialog_modal_window').style.paddingRight = '20px';
|
||||
parent.getId('modal_window_dialog_modal_window').style.maxWidth = '800px';
|
||||
parent.getId('_modal_iframe_modal_window').style.height = '430px';
|
||||
parent.getId('_modal_body_modal_window').style.height = '430px';
|
||||
|
||||
parent.getId('_modal_header_modal_window').innerHTML = getId('_modal_header').innerHTML;
|
||||
parent.getId('_modal_header_modal_window').className = 'modal-header';
|
||||
parent.getId('_modal_body_modal_window').style.padding = '0';
|
||||
parent.getId('_modal_body_modal_window').style.margin = '0';
|
||||
|
||||
parent.getId('_modal_footer_modal_window').innerHTML = getId('_modal_footer').innerHTML;
|
||||
parent.getId('_modal_footer_modal_window').className = 'modal-footer';
|
||||
}
|
||||
modalSetting();
|
||||
</script>
|
||||
3
modules/site/pages/popup.login.css
Normal file
3
modules/site/pages/popup.login.css
Normal file
@@ -0,0 +1,3 @@
|
||||
#rb-modal-body {
|
||||
padding: 20px;
|
||||
}
|
||||
91
modules/site/pages/popup.login.php
Normal file
91
modules/site/pages/popup.login.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<div id="rb-modal-body">
|
||||
<form name="LayoutLogForm" action="<?php echo $g['s']?>/" method="post" onsubmit="return layoutLogCheck(this);" role="form">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="a" value="login">
|
||||
<input type="hidden" name="referer" value="">
|
||||
<input type="hidden" name="isModal" value="Y">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="username">아이디 또는 이메일</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-user"></i></span>
|
||||
<input type="text" value="<?php echo getArrayCookie($_COOKIE['svshop'],'|',0)?>" id="username" name="id" placeholder="아이디 또는 이메일" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="password">Password</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||
<input type="password" id="password" name="pw" value="<?php echo getArrayCookie($_COOKIE['svshop'],'|',1)?>" placeholder="패스워드" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label><input name="idpwsave" class="rb-confirm" type="checkbox" value="checked"<?php if($_COOKIE['svshop']):?> checked<?php endif?>> 아이디/패스워드 기억하기</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block btn-lg">로그인</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!----------------------------------------------------------------------------
|
||||
@부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴
|
||||
----------------------------------------------------------------------------->
|
||||
|
||||
<div id="_modal_header" class="hidden">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel"><i class="fa fa-sign-in fa-lg"></i> 로그인 </h4>
|
||||
</div>
|
||||
|
||||
<div id="_modal_footer" class="hidden">
|
||||
<a href="#" class="btn btn-default btn-block" data-dismiss="modal" aria-hidden="true">닫기</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var bootmsg = '<div class="media"><div class="media-body" style="font-size:12px;">';
|
||||
bootmsg+= '<h4 class="media-heading">로그인 정보를 저장하시겠습니까?</h4>';
|
||||
bootmsg+= '로그인 정보를 저장할 경우 다음접속시 정보를 입력하지 않으셔도 되지만,PC를 여러사람이 사용하는 공공장소에서는 체크하지 마세요.<br>';
|
||||
bootmsg+= '</div></div>';
|
||||
|
||||
$('.rb-confirm').on('click', function() {
|
||||
bootbox.confirm(bootmsg, function(result){
|
||||
document.LayoutLogForm.idpwsave.checked = result;
|
||||
});
|
||||
$('.bootbox .media-heading').css({'font-weight':'bold','margin-bottom':'8px'});
|
||||
$('.bootbox .modal-footer').css({'margin-top':'0','background-color':'#f2f2f2'});
|
||||
$('.bootbox .modal-footer .btn-default').addClass('pull-left');
|
||||
});
|
||||
function layoutLogCheck(f)
|
||||
{
|
||||
if (f.id.value == '')
|
||||
{
|
||||
alert('아이디나 이메일주소를 입력해 주세요.');
|
||||
f.id.focus();
|
||||
return false;
|
||||
}
|
||||
if (f.pw.value == '')
|
||||
{
|
||||
alert('패스워드를 입력해 주세요.');
|
||||
f.pw.focus();
|
||||
return false;
|
||||
}
|
||||
f.referer.value = parent.location.href;
|
||||
getIframeForAction(f);
|
||||
return true;
|
||||
}
|
||||
function modalSetting()
|
||||
{
|
||||
parent.getId('modal_window_dialog_modal_window').style.width = '100%';
|
||||
parent.getId('modal_window_dialog_modal_window').style.paddingRight = '20px';
|
||||
parent.getId('modal_window_dialog_modal_window').style.maxWidth = '400px';
|
||||
parent.getId('_modal_iframe_modal_window').style.height = '210px';
|
||||
parent.getId('_modal_body_modal_window').style.height = '210px';
|
||||
|
||||
parent.getId('_modal_header_modal_window').innerHTML = getId('_modal_header').innerHTML;
|
||||
parent.getId('_modal_header_modal_window').className = 'modal-header';
|
||||
parent.getId('_modal_body_modal_window').style.padding = '0';
|
||||
parent.getId('_modal_body_modal_window').style.margin = '0';
|
||||
|
||||
parent.getId('_modal_footer_modal_window').innerHTML = getId('_modal_footer').innerHTML;
|
||||
parent.getId('_modal_footer_modal_window').className = 'modal-footer';
|
||||
}
|
||||
modalSetting();
|
||||
</script>
|
||||
0
modules/site/pages/popup.notification.css
Normal file
0
modules/site/pages/popup.notification.css
Normal file
357
modules/site/pages/popup.notification.php
Normal file
357
modules/site/pages/popup.notification.php
Normal file
@@ -0,0 +1,357 @@
|
||||
<?php
|
||||
$g['notiVarForSite'] = $g['path_var'].'site/'.$r.'/notification.var.php';
|
||||
include_once file_exists($g['notiVarForSite']) ? $g['notiVarForSite'] : $g['path_module'].'notification/var/var.php';
|
||||
if($callMod == 'config')
|
||||
{
|
||||
$NT_DATA = explode('|',$my['noticeconf']);
|
||||
$nt_web = $NT_DATA[0];
|
||||
$nt_email = $NT_DATA[1];
|
||||
$nt_fcm = $NT_DATA[2];
|
||||
$nt_modules = getArrayString($NT_DATA[3]);
|
||||
$nt_members = getArrayString($NT_DATA[4]);
|
||||
$_SESSION['sh_notify_auto_del'] = '';
|
||||
$_SESSION['sh_notify_popup'] = '';
|
||||
}
|
||||
else if ($callMod == 'view')
|
||||
{
|
||||
$recnum = 1000;
|
||||
$NUM = getDbRows($table['s_notice'],'mbruid='.$my['uid']);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="rb-modal-body" class="modal-body bg-light">
|
||||
<?php if($callMod == 'config'):?>
|
||||
<div class="callMod-config">
|
||||
<form name="procForm" class="form-horizontal" action="<?php echo $g['s']?>/" method="post">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="notification">
|
||||
<input type="hidden" name="a" value="notice_config_user">
|
||||
|
||||
<p class="mb-3 small text-muted">
|
||||
알림을 수신하면 웹 사이트내의 정보는 물론 회원님이 언급되거나 관련된 정보들을<br>실시간으로 받아보실 수 있습니다.
|
||||
</p>
|
||||
|
||||
<ul class="list-group mb-3">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
알림 수신설정
|
||||
<div class="btn-group btn-group-sm btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn <?php if($nt_web==''):?>btn-primary active<?php else:?>btn-secondary<?php endif?>" onclick="btnCheck(this);">
|
||||
<input type="radio" value="" name="nt_rcv"<?php if($nt_web==''):?> checked<?php endif?> id="nt_rcv" autocomplete="off"> 받음
|
||||
</label>
|
||||
<label class="btn <?php if($nt_web=='1'):?>btn-primary active<?php else:?>btn-secondary<?php endif?>" onclick="btnCheck(this);">
|
||||
<input type="radio" value="1" name="nt_rcv"<?php if($nt_web=='1'):?> checked<?php endif?> id="nt_rcv_1" autocomplete="off"> 받지않음
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
알림 수신방법
|
||||
<div class="btn-group btn-group-sm btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn <?php if($nt_webtype==''):?>btn-primary active<?php else:?>btn-secondary<?php endif?>" onclick="btnCheck(this);">
|
||||
<input type="radio" value="" name="nt_rcvtype"<?php if($nt_webtype==''):?> checked<?php endif?> id="nt_rcvtype" autocomplete="off"> 갯수변동
|
||||
</label>
|
||||
<label class="btn <?php if($nt_webtype=='1'):?>btn-primary active<?php else:?>btn-secondary<?php endif?>" onclick="btnCheck(this);">
|
||||
<input type="radio" value="1" name="nt_rcvtype"<?php if($nt_webtype=='1'):?> checked<?php endif?> id="nt_rcvtype_1" autocomplete="off"> 갯수변동+팝업
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
이메일 연동
|
||||
<div class="btn-group btn-group-sm btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn <?php if($nt_email=='1'):?>btn-primary active<?php else:?>btn-secondary<?php endif?>" onclick="btnCheck(this);">
|
||||
<input type="radio" value="1" name="nt_email"<?php if($nt_email=='1'):?> checked<?php endif?> id="nt_email_1" autocomplete="off"> 이메일도 받음
|
||||
</label>
|
||||
<label class="btn <?php if($nt_email==''):?>btn-primary active<?php else:?>btn-secondary<?php endif?>" onclick="btnCheck(this);">
|
||||
<input type="radio" value="" name="nt_email"<?php if($nt_email==''):?> checked<?php endif?> id="nt_email" autocomplete="off"> 연동안함
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
수신후 삭제처리
|
||||
<div class="btn-group btn-group-sm btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn <?php if($nt_webdel=='1'):?>btn-primary active<?php else:?>btn-secondary<?php endif?>" onclick="btnCheck(this);">
|
||||
<input type="radio" value="1" name="nt_rcvdel"<?php if($nt_webdel=='1'):?> checked<?php endif?> id="nt_rcvdel_1" autocomplete="off"> 자동삭제
|
||||
</label>
|
||||
<label class="btn <?php if($nt_webdel==''):?>btn-primary active<?php else:?>btn-secondary<?php endif?>" onclick="btnCheck(this);">
|
||||
<input type="radio" value="" name="nt_rcvdel"<?php if($nt_webdel==''):?> checked<?php endif?> id="nt_rcvdel" autocomplete="off"> 수동삭제
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header border-bottom-0">
|
||||
알림보내기 차단중인 곳
|
||||
</div>
|
||||
<table class="table table-hover text-center mb-0 f13">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rb-tbl-left"><span>모듈명 (보낸 곳)</span></th>
|
||||
<th class="rb-tbl-right">차단해제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($nt_modules['data'] as $_md):?>
|
||||
<?php $_R=getDbData($table['s_module'],"id='".$_md."'",'*')?>
|
||||
<tr>
|
||||
<td class="rb-tbl-left">
|
||||
<span>
|
||||
<i class="<?php echo $_R['icon']?>"></i>
|
||||
<?php echo $_R['name']?>
|
||||
<small> <?php echo ucfirst($_R['id'])?></small>
|
||||
</span>
|
||||
</td>
|
||||
<td class="rb-tbl-right">
|
||||
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=notification&a=notice_config_user&module_id=<?php echo $_R['id']?>" onclick="return hrefCheck(this,true,'정말로 해제하시겠습니까?');">해제</a>
|
||||
</td>
|
||||
<tr>
|
||||
<?php endforeach?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(!$nt_modules['count']):?>
|
||||
<div class="rb-none small text-center text-muted p-5">
|
||||
차단된 곳이 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div><!-- /.card -->
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header border-bottom-0">
|
||||
알림보내기 차단중인 회원
|
||||
</div>
|
||||
<table class="table table-hover text-center text-muted mb-0 f13">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rb-tbl-left"><span>회원명</span></th>
|
||||
<th class="rb-tbl-right">차단해제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $_i=0;foreach($nt_members['data'] as $_md):?>
|
||||
<?php $_R=getDbData($table['s_mbrdata'],'memberuid='.$_md,'*')?>
|
||||
<tr>
|
||||
<td class="rb-tbl-left">
|
||||
<span>
|
||||
<a href="#." id='_rb-popover-from-<?php echo $_i?>' data-placement="right" data-popover="popover" data-content="<div id='rb-popover-from-<?php echo $_i?>'><script>getPopover('member','<?php echo $_R['memberuid']?>','rb-popover-from-<?php echo $_i?>')</script></div>">
|
||||
<i class="glyphicon glyphicon-user"></i>
|
||||
<?php echo $_R['nic']?> (<?php echo $_R['name']?>)
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
<td class="rb-tbl-right">
|
||||
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=notification&a=notice_config_user&member_uid=<?php echo $_R['memberuid']?>" onclick="return hrefCheck(this,true,'정말로 해제하시겠습니까?');">해제</a>
|
||||
</td>
|
||||
<tr>
|
||||
<?php $_i++;endforeach?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(!$nt_members['count']):?>
|
||||
<div class="rb-none small text-center p-5">
|
||||
차단된 회원이 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div><!-- /.card -->
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<form name="listForm" action="<?php echo $g['s']?>/" method="post">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="notification">
|
||||
<input type="hidden" name="a" value="">
|
||||
<input type="hidden" name="deltype" value="">
|
||||
<div id="rb-notifications-layer" class="list-group callMod-<?php echo $callMod?>">
|
||||
<!-- 여기에 알림정보를 실시간으로 받아옴 -->
|
||||
</div>
|
||||
</form>
|
||||
<?php if($callMod=='view'):?>
|
||||
<div class="mt-3">
|
||||
<fieldset<?php if(!$NUM):?> disabled<?php endif?>>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<div class="btn-group dropup">
|
||||
<a class="btn btn-secondary" href="#." onclick="actCheck('multi_delete_user','cut_member');">
|
||||
차단
|
||||
</a>
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown">
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<h6 class="dropdown-header">알림 차단 처리</h6>
|
||||
<a class="dropdown-item" href="#." onclick="actCheck('multi_delete_user','cut_member');">보낸회원 차단하기</a>
|
||||
<a class="dropdown-item" href="#." onclick="actCheck('multi_delete_user','cut_module');">보낸곳 차단하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button type="button" onclick="chkFlag('noti_members[]');noti_check_all();" class="btn btn-secondary checkAll-noti-user">
|
||||
<i class="fa fa-check" aria-hidden="true"></i>
|
||||
</button>
|
||||
<div class="btn-group dropup">
|
||||
<a class="btn btn-secondary" href="#." onclick="actCheck('multi_delete_user','delete_select');">삭제</a>
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown">
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<h6 class="dropdown-header">일괄 삭제 처리</h6>
|
||||
<a class="dropdown-item" href="#." onclick="actCheck('multi_delete_user','delete_read');">읽은알림 삭제</a>
|
||||
<a class="dropdown-item" href="#." onclick="actCheck('multi_delete_user','delete_all');">전체알림 삭제</a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- @부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴 -->
|
||||
|
||||
|
||||
<div id="_modal_header" class="hidden">
|
||||
<h4 class="modal-title" id="myModalLabel">
|
||||
<i class="fa fa-bell-o"></i> 알림
|
||||
<?php if($callMod=='config'):?>설정
|
||||
<?php elseif($callMod=='view'):?>
|
||||
<span class="badge badge-pill badge-light">전체</span>
|
||||
<span id="rb-notification-modal-num" class="badge badge-pill badge-light"><?php echo $NUM?></span>
|
||||
<?php else:?>
|
||||
<span id="rb-notification-modal-num" class="badge badge-pill badge-light">x</span>
|
||||
<?php endif?>
|
||||
</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
|
||||
<div id="_modal_footer" class="d-none">
|
||||
<div class="d-flex justify-content-between w-100">
|
||||
<div class="btn-group btn-group-justified">
|
||||
<a href="#." class="btn btn-link" onclick="frames._modal_iframe_modal_window.getViewNotification('view');">전체보기</a>
|
||||
<a href="#." class="btn btn-link" onclick="frames._modal_iframe_modal_window.getViewNotification('config');">설정</a>
|
||||
</div>
|
||||
<a href="#." class="btn btn-link" data-dismiss="modal" aria-hidden="true" id="_close_btn_">닫기</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function actCheck(act,type)
|
||||
{
|
||||
var f = document.listForm;
|
||||
var l = document.getElementsByName('noti_members[]');
|
||||
var n = l.length;
|
||||
var j = 0;
|
||||
var i;
|
||||
|
||||
if (type == 'delete_all' || type == 'delete_read')
|
||||
{
|
||||
if (confirm('정말로 일괄 삭제하시겠습니까?'))
|
||||
{
|
||||
getIframeForAction(f);
|
||||
f.a.value = act;
|
||||
f.deltype.value = type;
|
||||
f.submit();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if(l[i].checked == true)
|
||||
{
|
||||
j++;
|
||||
}
|
||||
}
|
||||
if (!j)
|
||||
{
|
||||
alert('선택된 알림이 없습니다. ');
|
||||
return false;
|
||||
}
|
||||
|
||||
var xtypestr = type == 'delete_select' ? '정말로 삭제 하시겠습니까?' : '정말로 차단 하시겠습니까?';
|
||||
|
||||
if(confirm(xtypestr))
|
||||
{
|
||||
getIframeForAction(f);
|
||||
f.a.value = act;
|
||||
f.deltype.value = type;
|
||||
f.submit();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function noti_check_child(obj)
|
||||
{
|
||||
noti_check_all();
|
||||
}
|
||||
function noti_check_all()
|
||||
{
|
||||
var l = document.getElementsByName('noti_members[]');
|
||||
var n = l.length;
|
||||
var i;
|
||||
var val;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
val = l[i].value.split('|');
|
||||
if (l[i].checked == true) getId('noti-'+val[0]).className = 'btn btn-primary ';
|
||||
else getId('noti-'+val[0]).className = 'btn btn-secondary';
|
||||
}
|
||||
}
|
||||
function btnCheckSubmit()
|
||||
{
|
||||
var f = document.procForm;
|
||||
getIframeForAction(f);
|
||||
f.submit();
|
||||
}
|
||||
function btnCheck(obj)
|
||||
{
|
||||
obj.parentNode.children[0].className = 'btn btn-secondary';
|
||||
obj.parentNode.children[1].className = 'btn btn-secondary';
|
||||
obj.className = 'btn btn-primary';
|
||||
setTimeout("btnCheckSubmit();",100);
|
||||
}
|
||||
function getViewNotification(type)
|
||||
{
|
||||
location.href = rooturl + '/?r=' + raccount + '&iframe=Y&system=<?php echo $system?>&callMod='+type;
|
||||
}
|
||||
function getNotificationNum(num)
|
||||
{
|
||||
<?php if(!$callMod):?>
|
||||
var badge = parent.getId('rb-notification-modal-num');
|
||||
var _num = (num >= <?php echo $d['ntfc']['num']?> ? '+<?php echo $d['ntfc']['num']?>' : num);
|
||||
badge.innerHTML = _num;
|
||||
if(_num > 0) badge.style.background = '#ff0000';
|
||||
<?php endif?>
|
||||
}
|
||||
function modalSetting()
|
||||
{
|
||||
<?php if($callMod != 'config'):?>
|
||||
getId('rb-notifications-layer').innerHTML = getAjaxData('<?php echo $g['s']?>/?r=<?php echo $r?>&m=notification&a=notice_check¬icedata=Y&isModal=Y&callMod=<?php echo $callMod?>&p=<?php echo $p?>&recnum=<?php echo $recnum?$recnum:10?>');
|
||||
<?php endif?>
|
||||
|
||||
var ht = 400;
|
||||
|
||||
parent.getId('modal_window_dialog_modal_window').style.width = '100%';
|
||||
parent.getId('modal_window_dialog_modal_window').style.paddingRight = '20px';
|
||||
parent.getId('modal_window_dialog_modal_window').style.maxWidth = '550px';
|
||||
parent.getId('_modal_iframe_modal_window').style.height = '450px';
|
||||
parent.getId('_modal_body_modal_window').style.height = '450px';
|
||||
|
||||
parent.getId('_modal_header_modal_window').innerHTML = getId('_modal_header').innerHTML;
|
||||
parent.getId('_modal_header_modal_window').className = 'modal-header';
|
||||
parent.getId('_modal_body_modal_window').style.padding = '0';
|
||||
parent.getId('_modal_body_modal_window').style.margin = '0';
|
||||
|
||||
parent.getId('_modal_footer_modal_window').innerHTML = getId('_modal_footer').innerHTML;
|
||||
parent.getId('_modal_footer_modal_window').className = 'modal-footer';
|
||||
}
|
||||
modalSetting();
|
||||
</script>
|
||||
29
modules/site/pages/popup.popover.css
Normal file
29
modules/site/pages/popup.popover.css
Normal file
@@ -0,0 +1,29 @@
|
||||
/* popover user profile */
|
||||
#rb-member-profile .close {
|
||||
position: relative;
|
||||
top: -5px;
|
||||
}
|
||||
#rb-member-profile .media {
|
||||
padding: 0;
|
||||
border: 0
|
||||
}
|
||||
#rb-member-profile .media-object {
|
||||
width: 100px;
|
||||
height: 100px
|
||||
}
|
||||
#rb-member-profile.media-body {
|
||||
position: relative;
|
||||
}
|
||||
#rb-member-profile .media-body .rb-log {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
font-size: 12px
|
||||
}
|
||||
#rb-member-profile .media-heading {
|
||||
padding-top: 2px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#rb-member-profile {
|
||||
font-size: 12px;
|
||||
}
|
||||
33
modules/site/pages/popup.popover.php
Normal file
33
modules/site/pages/popup.popover.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
$M = array_merge(getUidData($table['s_mbrid'],$mbruid),getDbData($table['s_mbrdata'],'memberuid='.(int)$mbruid,'*'));
|
||||
?>
|
||||
|
||||
|
||||
<div id="rb-member-profile" class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="<?php echo $g['s']?>/_var/avatar/180.<?php echo $M['photo']?$M['photo']:'0.gif'?>">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">
|
||||
<span data-placement="bottom" data-tooltip="tooltip" title="<?php echo $M['name']?>"><?php echo $M['nic']?>님</span>
|
||||
<button class="close pull-right" type="button" onclick="hidePopover('<?php echo $layer?>');">×</button>
|
||||
</h4>
|
||||
<p class="text-muted">서울특별시</p>
|
||||
<p class="rb-log" data-tooltip="tooltip" title="<?php echo getDateFormat($M['last_log'],'Y.m.d H:i')?>">
|
||||
최근접속 (<time class="timeago" data-toggle="tooltip" datetime="<?php echo getDateFormat($M['last_log'],'c')?>"></time>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- timeago -->
|
||||
<?php getImport('jquery-timeago','jquery.timeago',false,'js')?>
|
||||
<?php getImport('jquery-timeago','locales/jquery.timeago.ko',false,'js')?>
|
||||
<script>
|
||||
jQuery(document).ready(function() {
|
||||
$(".rb-log time").timeago();
|
||||
});
|
||||
function hidePopover(id)
|
||||
{
|
||||
parent.$('#_'+id).click();
|
||||
}
|
||||
</script>
|
||||
BIN
modules/site/pages/popup.snippet.css
Normal file
BIN
modules/site/pages/popup.snippet.css
Normal file
Binary file not shown.
23
modules/site/pages/popup.snippet.php
Normal file
23
modules/site/pages/popup.snippet.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<div id="snippetbox">
|
||||
<iframe src="http://docs.kimsq.com/rb2/_snippet/index.php?selectLang=<?php echo $lang['admin']['flag']?>" width="100%" height="600" frameborder="0"></iframe>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function modalSetting()
|
||||
{
|
||||
parent.getId('modal_window_dialog_modal_window').style.width = '100%';
|
||||
parent.getId('modal_window_dialog_modal_window').style.paddingRight = '20px';
|
||||
parent.getId('modal_window_dialog_modal_window').style.maxWidth = '1000px';
|
||||
parent.getId('_modal_iframe_modal_window').style.height = '600px';
|
||||
parent.getId('_modal_body_modal_window').style.height = '630px';
|
||||
|
||||
parent.getId('_modal_header_modal_window').innerHTML = getId('_modal_header').innerHTML;
|
||||
parent.getId('_modal_header_modal_window').className = 'modal-header';
|
||||
parent.getId('_modal_body_modal_window').style.padding = '0';
|
||||
parent.getId('_modal_body_modal_window').style.margin = '0';
|
||||
|
||||
parent.getId('_modal_footer_modal_window').innerHTML = getId('_modal_footer').innerHTML;
|
||||
parent.getId('_modal_footer_modal_window').className = 'modal-footer';
|
||||
}
|
||||
modalSetting();
|
||||
</script>
|
||||
69
modules/site/pages/popup.widget.code.php
Normal file
69
modules/site/pages/popup.widget.code.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-code fa-lg"></i> 위젯코드</h5>
|
||||
<button type="button" class="close js-hideModal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea id="rb-widget-code-area" class="form-control border border-primary" readonly></textarea>
|
||||
</div>
|
||||
<div class="modal-footer d-flex justify-content-between">
|
||||
<button type="button" class="btn btn-outline-primary btn-block js-hideModal" data-plugin="clipboard" data-clipboard-target="#rb-widget-code-area">복사하기</button>
|
||||
</div>
|
||||
|
||||
<!-- clipboard.js : https://github.com/zenorocha/clipboard.js -->
|
||||
<?php getImport('clipboard','clipboard.min','1.5.5','js') ?>
|
||||
|
||||
<script>
|
||||
|
||||
$(function () {
|
||||
var clipboard = new Clipboard('[data-plugin="clipboard"]');
|
||||
|
||||
setTimeout(function(){
|
||||
$('#rb-widget-code-area').focus().select();
|
||||
|
||||
$('#rb-widget-code-area').focus(function(){
|
||||
$(this).on("mouseup.a keyup.a", function(e){
|
||||
$(this).off("mouseup.a keyup.a").select();
|
||||
});
|
||||
});
|
||||
}, 300);
|
||||
|
||||
$(".js-hideModal").click(function() {
|
||||
setTimeout(function(){
|
||||
hideModal()
|
||||
}, 100);
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
function hideModal(){
|
||||
parent.$('.rb-modal-x').modal('hide');
|
||||
}
|
||||
|
||||
|
||||
function modalSetting(){
|
||||
getId('rb-widget-code-area').innerHTML = parent.frames._modal_iframe_modal_window.getId('rb-widget-code-result').value;
|
||||
parent.getId('_modal_dialog_top_').style.top = '120px';
|
||||
parent.getId('_modal_dialog_top_').style.paddingRight = '20px';
|
||||
parent.getId('_modal_dialog_top_').style.width = '100%';
|
||||
parent.getId('_modal_dialog_top_').style.maxWidth = '600px';
|
||||
parent.getId('_modal_iframe_sub_').style.height = '250px';
|
||||
}
|
||||
modalSetting();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#rb-widget-code-area {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
padding: 10px;
|
||||
line-height: 150%;
|
||||
font-size: 12px;
|
||||
background-color: #eee;
|
||||
min-height: 80px;
|
||||
}
|
||||
#rb-widget-code-area::selection {
|
||||
background: rgba(255,238,51,0.99);
|
||||
}
|
||||
</style>
|
||||
112
modules/site/pages/popup.widget.css
Normal file
112
modules/site/pages/popup.widget.css
Normal file
@@ -0,0 +1,112 @@
|
||||
#widgetbox {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#widgetbox .category {
|
||||
position: absolute;
|
||||
left:0;
|
||||
top: 0;
|
||||
bottom:0;
|
||||
width: 205px;
|
||||
height: 100%;
|
||||
margin-right: -200px;
|
||||
padding: 0;
|
||||
border-right: #dfdfdf solid 1px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#widgetbox .category .list-group-item:first-child {
|
||||
border-top: 0;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
#widgetbox .category .list-group-item:last-child {
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
#widgetbox .category .list-group-item {
|
||||
padding: .55rem .75rem;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
|
||||
#widgetbox .content {
|
||||
margin-left: 205px;
|
||||
/* height: 430px; */
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#widgetbox .content .none {
|
||||
color: #c0c0c0;
|
||||
text-align: center;
|
||||
padding-top: 70px;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
#widgetbox {
|
||||
overflow: auto;
|
||||
}
|
||||
#widgetbox .category {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border: 0;
|
||||
}
|
||||
#widgetbox .category span {
|
||||
width: 100%;
|
||||
}
|
||||
#widgetbox .content {
|
||||
float: left;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-left: 0;
|
||||
padding: 10px 10px 120px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-tabs {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
.nav-tabs .nav-item:first-child .nav-link {
|
||||
border-left: 0
|
||||
}
|
||||
.nav-tabs .nav-link {
|
||||
text-align: center;
|
||||
padding: .5rem 2rem;
|
||||
border-right: 1px solid #ccc;
|
||||
border-bottom: 0;
|
||||
color: #999;
|
||||
background-color: rgba(0, 0, 0, 0.03);
|
||||
border-radius: 0;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
.nav-tabs .nav-link.active {
|
||||
color: #333;
|
||||
background-color: inherit;
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0;
|
||||
border-bottom-color: #fff;
|
||||
border-top: 1px solid #007bff;
|
||||
}
|
||||
|
||||
.position-relative .js-del {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 5px
|
||||
}
|
||||
|
||||
#mjointbox h5 {
|
||||
border-bottom:#dfdfdf dashed 1px;
|
||||
padding:5px 0 15px 0;
|
||||
margin:0 0 30px 0
|
||||
}
|
||||
#mjointbox .rb-label {
|
||||
font-weight:normal;
|
||||
cursor:pointer
|
||||
}
|
||||
267
modules/site/pages/popup.widget.php
Normal file
267
modules/site/pages/popup.widget.php
Normal file
@@ -0,0 +1,267 @@
|
||||
<?php
|
||||
$step_start = 1;
|
||||
$pwd_start = $g['path_widget'];
|
||||
$g['adm_href'] = $g['s']."/?r=".$r."&system=".$system."&iframe=".$iframe.($dropfield?"&dropfield=".$dropfield:'').($option?"&option=".$option:'').($isWcode?"&isWcode=".$isWcode:'').($isEdit?"&isEdit=".$isEdit:'');
|
||||
|
||||
if ($option)
|
||||
{
|
||||
$wdgvar=array();
|
||||
//$swval=explode(',',getKRtoUTF(urldecode(str_replace('[!]','&',$option))));
|
||||
$swval=explode(',',urldecode(str_replace('[!]','&',$option)));
|
||||
$swidget=$swval[0];
|
||||
$pwd = $pwd_start.$swidget.'/';
|
||||
|
||||
foreach($swval as $_cval)
|
||||
{
|
||||
$_xval=explode('^',$_cval);
|
||||
$wdgvar[$_xval[0]]=$_xval[1];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$pwd = $pwd ? urldecode($pwd) : $pwd_start;
|
||||
$swidget = is_file($pwd.'main.php') ? str_replace($g['path_widget'],'',$pwd) : '';
|
||||
if ($swidget) $swidget = substr($swidget,0,strlen($swidget)-1);
|
||||
}
|
||||
|
||||
|
||||
if (strstr($pwd,'..'))
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','close');
|
||||
}
|
||||
if(!is_dir($pwd))
|
||||
{
|
||||
getLink('','','존재하지 않는 폴더입니다.','close');
|
||||
}
|
||||
|
||||
function getDirexists($dir)
|
||||
{
|
||||
$opendir = opendir($dir);
|
||||
while(false !== ($file = readdir($opendir)))
|
||||
{
|
||||
if(is_dir($dir.'/'.$file) && !strstr('[.][..][images][data]',$file)){$fex = 1; break;}
|
||||
}
|
||||
closedir($opendir);
|
||||
return $fex;
|
||||
}
|
||||
function getPrintdir( $nTab, $filepath, $files, $state ,$dir_ex)
|
||||
{
|
||||
global $g,$pwd,$file,$step_start;
|
||||
|
||||
if($step_start) { $nTab = $nTab - $step_start; }
|
||||
$css = strstr($pwd,$filepath) ? ' active' : '';
|
||||
$fname1 = getKRtoUTF($files);
|
||||
$fname2 = getFolderName($filepath);
|
||||
|
||||
echo '<a href="'.$g['adm_href'].'&pwd='.urlencode($filepath).'" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center';
|
||||
if($state && $dir_ex) {
|
||||
echo '"><span><i class="fa fa-folder-o"></i> ';
|
||||
}
|
||||
else if (!$state && $dir_ex) {
|
||||
echo '"><span><i class="fa fa-folder-open-o"></i> ';
|
||||
}
|
||||
else {
|
||||
echo $css.'" style="color:#'.($css?'fff':'999').'"><span class="pl-3"<i class="fa fa-puzzle-piece"></i> ';
|
||||
}
|
||||
echo $fname2.'</span></a>';
|
||||
}
|
||||
function getDirlist($dirpath,$nStep)
|
||||
{
|
||||
global $pwd;
|
||||
$arrPath = explode('/', $pwd );
|
||||
|
||||
if( $dir_handle = opendir($dirpath) )
|
||||
{
|
||||
while( false !== ($files = readdir($dir_handle)) )
|
||||
{
|
||||
$subDir = $dirpath.$files.'/';
|
||||
if(is_dir($subDir) && !strstr('[.][..][images][data]',$files))
|
||||
{
|
||||
getPrintdir( $nStep, $subDir, $files, !strstr($pwd,$subDir) , getDirexists($subDir) );
|
||||
if( $arrPath[$nStep+1] == $files ) {
|
||||
getDirlist( $subDir, $nStep+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir( $dir_handle );
|
||||
}
|
||||
function getWidgetPreviewImg($path)
|
||||
{
|
||||
if (is_file($path.'.jpg')) return $path.'.jpg';
|
||||
if (is_file($path.'.gif')) return $path.'.gif';
|
||||
if (is_file($path.'.png')) return $path.'.png';
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
|
||||
<link href="<?php echo $g['s']?>/_core/css/github-markdown.css" rel="stylesheet">
|
||||
|
||||
<div id="widgetbox">
|
||||
<div class="category bg-light">
|
||||
<?php getDirlist($pwd_start,$step_start)?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php if($swidget):?>
|
||||
<?php if($option):?>
|
||||
<input type="hidden" id="s_w" value="">
|
||||
<input type="hidden" id="s_h" value="">
|
||||
<input type="hidden" id="s_t" value="">
|
||||
<input type="hidden" id="s_l" value="">
|
||||
<?php endif?>
|
||||
|
||||
<div class="position-relative">
|
||||
<ul class="nav nav-tabs f14" role="tablist">
|
||||
<li class="nav-item"><a class="nav-link active" href="#code" role="tab" data-toggle="tab">설정하기</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#preview" role="tab" data-toggle="tab">미리보기</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#readme" role="tab" data-toggle="tab">사용안내</a></li>
|
||||
</ul>
|
||||
<?php if($isWcode=='Y'):?>
|
||||
<div class="js-del">
|
||||
<a class="btn btn-link muted-link btn-sm" href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&a=deletewidget&pwd=<?php echo $pwd?>" title="삭제" data-tooltip="tooltip" data-placement="left" onclick="return hrefCheck(this,true,'정말로 삭제하시겠습니까?');">
|
||||
<i class="fa fa-trash-o fa-fw"></i>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div><!-- /.position-relative -->
|
||||
|
||||
<div class="tab-content p-3">
|
||||
<div class="tab-pane active f14" id="code">
|
||||
<?php include $g['path_widget'].$swidget.'/admin.php' ?>
|
||||
</div>
|
||||
<div class="tab-pane" id="preview">
|
||||
<?php $_widgetPreview=getWidgetPreviewImg($g['path_widget'].$swidget.'/thumb')?>
|
||||
<?php if($_widgetPreview):?>
|
||||
<div class="text-center mt-4">
|
||||
<a href="<?php echo $_widgetPreview?>" target="_blank">
|
||||
<img src="<?php echo $_widgetPreview?>" class="img-fluid" alt="">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php else:?>
|
||||
<div class="none">
|
||||
<i class="fa fa-puzzle-piece fa-5x"></i><br><br>
|
||||
미리보기가 없습니다.
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="readme">
|
||||
<div class="bg-light text-center text-muted f12 rounded border p-2">
|
||||
위젯파일 경로: <span class="ml-2"><?php echo $g['path_widget'].$swidget ?>/main.php</span>
|
||||
</div>
|
||||
<?php $markdown_readme = $g['path_widget'].$swidget.'/README.md';?>
|
||||
<?php if (file_exists($markdown_readme)): ?>
|
||||
<div class="pb-5 readme">
|
||||
<?php readfile($g['path_widget'].$swidget.'/README.md')?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="d-flex align-items-center justify-content-center" style="height: calc(100vh - 5.53rem);">
|
||||
<div class="text-muted text-center">
|
||||
<h1><i class="fa fa-file-text-o" aria-hidden="true"></i></h1>
|
||||
<small>안내문서가 없습니다.</small>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php else:?>
|
||||
<div class="d-flex align-items-center justify-content-center" style="height: calc(100vh - 5.53rem);">
|
||||
<div class="text-muted text-center">
|
||||
<h1><i class="fa fa-mouse-pointer" aria-hidden="true"></i></h1>
|
||||
<small>추가할 위젯을 선택하세요.</small>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<textarea id="rb-widget-code-result" class="hidden"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- @부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴 -->
|
||||
|
||||
<div id="_modal_header" hidden>
|
||||
<h5 class="modal-title">
|
||||
<i class="kf-widget kf-lg"></i>
|
||||
위젯 선택하기
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="_modal_footer" hidden>
|
||||
<button type="button" class="btn btn-light pull-left" data-dismiss="modal" aria-hidden="true" id="_modalclosebtn_">닫기</button>
|
||||
<?php if(!$isWcode||$isEdit):?>
|
||||
<?php if($isCodeOnly):?>
|
||||
<button type="button" class="btn btn-primary" onclick="frames._modal_iframe_modal_window._widgetCode();modalSetting('.rb-modal-x','<?php echo getModalLink('site/pages/popup.widget.code')?>');" data-toggle="modal" data-target=".rb-modal-x"<?php if(!$swidget):?> disabled<?php endif?>>
|
||||
<i class="fa fa-code fa-lg"></i> 코드보기
|
||||
</a>
|
||||
<button type="button" class="btn btn-light" disabled>위젯코드만 지원</button>
|
||||
<?php else:?>
|
||||
<button type="button" class="btn btn-light" onclick="frames._modal_iframe_modal_window._widgetCode();modalSetting('.rb-modal-x','<?php echo getModalLink('site/pages/popup.widget.code')?>');" data-toggle="modal" data-target=".rb-modal-x"<?php if(!$swidget):?> disabled<?php endif?>>
|
||||
<i class="fa fa-code fa-lg"></i> 코드보기
|
||||
</a>
|
||||
<button type="button" class="btn btn-primary" onclick="frames._modal_iframe_modal_window._saveCheck(<?php echo $isEdit?1:0?>);"<?php if(!$swidget):?> disabled<?php endif?>>삽입하기</button>
|
||||
<?php endif?>
|
||||
<?php else:?>
|
||||
<button type="button" class="btn btn-primary" onclick="frames._modal_iframe_modal_window._widgetCode();modalSetting('.rb-modal-x','<?php echo getModalLink('site/pages/popup.widget.code')?>');" data-toggle="modal" data-target=".rb-modal-x"<?php if(!$swidget):?> disabled<?php endif?>>
|
||||
<i class="fa fa-code fa-lg"></i> 코드보기
|
||||
</a>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
|
||||
<?php getImport('jquery-markdown','jquery.markdown','0.0.10','js')?>
|
||||
|
||||
<script>
|
||||
|
||||
$("#readme .readme").markdown();
|
||||
|
||||
function _widgetCode()
|
||||
{
|
||||
getId('rb-widget-code-result').innerHTML = widgetCode(0);
|
||||
}
|
||||
function _saveCheck(n)
|
||||
{
|
||||
saveCheck(n);
|
||||
parent.$('#modal_window').modal('hide');
|
||||
}
|
||||
function dropJoint(m)
|
||||
{
|
||||
var f = opener.getId('<?php echo $dropfield?>');
|
||||
f.value = m;
|
||||
f.focus();
|
||||
top.close();
|
||||
}
|
||||
|
||||
<?php if($swidget && $option):?>
|
||||
var dp = <?php echo $dropfield?>;
|
||||
var sz = parent.moveObject[dp];
|
||||
getId('s_w').value = parseInt(sz.style.width);
|
||||
getId('s_h').value = parseInt(sz.style.height);
|
||||
getId('s_t').value = parseInt(sz.style.top);
|
||||
getId('s_l').value = parseInt(sz.style.left);
|
||||
<?php endif?>
|
||||
|
||||
function modalSetting(){
|
||||
parent.getId('modal_window_dialog_modal_window').style.paddingRight = '20px';
|
||||
parent.getId('modal_window_dialog_modal_window').style.maxWidth = '800px';
|
||||
parent.getId('_modal_iframe_modal_window').style.height = '580px';
|
||||
parent.getId('_modal_body_modal_window').style.height = '580px';
|
||||
|
||||
parent.getId('_modal_header_modal_window').innerHTML = getId('_modal_header').innerHTML;
|
||||
parent.getId('_modal_header_modal_window').className = 'modal-header';
|
||||
parent.getId('_modal_body_modal_window').style.padding = '0';
|
||||
parent.getId('_modal_body_modal_window').style.margin = '0';
|
||||
|
||||
parent.getId('_modal_footer_modal_window').innerHTML = getId('_modal_footer').innerHTML;
|
||||
parent.getId('_modal_footer_modal_window').className = 'modal-footer';
|
||||
}
|
||||
|
||||
modalSetting();
|
||||
|
||||
|
||||
</script>
|
||||
36
modules/site/var/manifest.json
Normal file
36
modules/site/var/manifest.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "킴스큐",
|
||||
"short_name": "킴스큐",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/_core/images/touch/homescreen-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/_core/images/touch/homescreen-128x128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/_core/images/touch/homescreen-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/_core/images/touch/homescreen-168x168.png",
|
||||
"sizes": "168x168",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/_core/images/touch/homescreen-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"background_color": "#221E1F",
|
||||
"theme_color": "#221E1F",
|
||||
"gcm_sender_id": "103953800507"
|
||||
}
|
||||
11
modules/site/var/var.moduleinfo.php
Normal file
11
modules/site/var/var.moduleinfo.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/*
|
||||
각각의 링크를 제공하려면 다음과 같은 형식으로 지정해 주세요.
|
||||
이 링크는 관리자모드 모듈정보 링크에 사용됩니다.
|
||||
*/
|
||||
$d['moduleinfo']['market'] = 'http://www.kimsq.co.kr/market'; // 마켓
|
||||
$d['moduleinfo']['github'] = 'https://github.com/kimsQ/rb'; // 저장소
|
||||
$d['moduleinfo']['issue'] = 'https://github.com/kimsQ/rb/issues'; // 이슈접수
|
||||
$d['moduleinfo']['website'] = 'http://www.kimsq.co.kr/'; // 웹사이트
|
||||
$d['moduleinfo']['help'] = 'http://docs.kimsq.com/rb2/docs/c/Users/modules/site'; // 도움말
|
||||
?>
|
||||
Reference in New Issue
Block a user