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

4
modules/admin/README.md Normal file
View File

@@ -0,0 +1,4 @@
## Copyright and license
Copyright 2020 Redblock, Inc.
Licensed under the [RBL](https://kimsq.com/p/rbl) License

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,52 @@
<?php
$table['s_module'] = $DB['head'].'_s_module';
$table['s_admpage'] = $DB['head'].'_s_admpage';
$table['s_mobile'] = $DB['head'].'_s_mobile';
$table['s_domain'] = $DB['head'].'_s_domain';
$table['s_menu'] = $DB['head'].'_s_menu';
$table['s_page'] = $DB['head'].'_s_page';
$table['s_site'] = $DB['head'].'_s_site';
$table['s_popup'] = $DB['head'].'_s_popup';
$table['s_mbrid'] = $DB['head'].'_s_mbrid';
$table['s_mbrdata'] = $DB['head'].'_s_mbrdata';
$table['s_mbrcomp'] = $DB['head'].'_s_mbrcomp';
$table['s_mbrlevel'] = $DB['head'].'_s_mbrlevel';
$table['s_mbrgroup'] = $DB['head'].'_s_mbrgroup';
$table['s_mbrsns'] = $DB['head'].'_s_mbrsns';
$table['s_mbrtoken'] = $DB['head'].'_s_mbrtoken';
$table['s_iidtoken'] = $DB['head'].'_s_iidtoken';
$table['s_mbremail'] = $DB['head'].'_s_mbremail';
$table['s_mbrphone'] = $DB['head'].'_s_mbrphone';
$table['s_mbrshipping'] = $DB['head'].'_s_mbrshipping';
$table['s_mbrmonth'] = $DB['head'].'_s_mbrmonth';
$table['s_mbrday'] = $DB['head'].'_s_mbrday';
$table['s_guestauth'] = $DB['head'].'_s_guestauth';
$table['s_code'] = $DB['head'].'_s_code';
$table['s_saved'] = $DB['head'].'_s_saved';
$table['s_paper'] = $DB['head'].'_s_paper';
$table['s_sms'] = $DB['head'].'_s_sms';
$table['s_friend'] = $DB['head'].'_s_friend';
$table['s_point'] = $DB['head'].'_s_point';
$table['s_cash'] = $DB['head'].'_s_cash';
$table['s_money'] = $DB['head'].'_s_money';
$table['s_userpic'] = $DB['head'].'_s_userpic';
$table['s_counter'] = $DB['head'].'_s_counter';
$table['s_referer'] = $DB['head'].'_s_referer';
$table['s_browser'] = $DB['head'].'_s_browser';
$table['s_inkey'] = $DB['head'].'_s_inkey';
$table['s_outkey'] = $DB['head'].'_s_outkey';
$table['s_upload'] = $DB['head'].'_s_upload';
$table['s_uploadcat'] = $DB['head'].'_s_uploadcat';
$table['s_comment'] = $DB['head'].'_s_comment';
$table['s_oneline'] = $DB['head'].'_s_oneline';
$table['s_opinion'] = $DB['head'].'_s_opinion';
$table['s_rating'] = $DB['head'].'_s_rating';
$table['s_numinfo'] = $DB['head'].'_s_numinfo';
$table['s_tag'] = $DB['head'].'_s_tag';
$table['s_seo'] = $DB['head'].'_s_seo';
$table['s_xtralog'] = $DB['head'].'_s_xtralog';
$table['s_notice'] = $DB['head'].'_s_notice';
$table['s_feed'] = $DB['head'].'_s_feed';
$table['s_history'] = $DB['head'].'_s_history';
$table['s_gitlog'] = $DB['head'].'_s_gitlog';
?>

View File

@@ -0,0 +1,49 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
foreach ($mbrmembers as $val)
{
if ($my['uid'] == $val) continue;
$M=getDbData($table['s_mbrid'],'uid='.$val,'*');
$_M=getDbData($table['s_mbrdata'],'memberuid='.$val,'*');
if($auth)
{
if ($auth == 'D')
{
getDbDelete($table['s_mbrid'],'uid='.$M['uid']);
getDbDelete($table['s_mbrdata'],'memberuid='.$M['uid']);
getDbDelete($table['s_mbrcomp'],'memberuid='.$M['uid']);
getDbDelete($table['s_paper'],'my_mbruid='.$M['uid']);
getDbDelete($table['s_point'],'my_mbruid='.$M['uid']);
getDbDelete($table['s_scrap'],'mbruid='.$M['uid']);
getDbDelete($table['s_friend'],'my_mbruid='.$M['uid'].' or by_mbruid='.$M['memberuid']);
getDbUpdate($table['s_mbrlevel'],'num=num-1','uid='.$_M['level']);
getDbUpdate($table['s_mbrgroup'],'num=num-1','uid='.$_M['sosok']);
getDbDelete($table['s_mbrsns'],'memberuid='.$M['uid']);
if (is_file($g['path_var'].'avatar/'.$M['photo']))
{
unlink($g['path_var'].'avatar/'.$M['photo']);
}
$fp = fopen($g['path_tmp'].'out/'.$M['id'].'.txt','w');
fwrite($fp,$date['totime']);
fclose($fp);
@chmod($g['path_tmp'].'out/'.$M['id'].'.txt',0707);
}
else if ($auth == 'A')
{
getDbUpdate($table['s_mbrdata'],"super=1,admin=1,adm_view='[admin]'",'memberuid='.$M['uid']);
}
else {
getDbUpdate($table['s_mbrdata'],"auth='$auth'",'memberuid='.$M['uid']);
}
}
else {
getDbUpdate($table['s_mbrdata'],"super=0,admin=0,adm_view='',adm_site=''",'memberuid='.$M['uid']);
}
}
setrawcookie('admin_admin_result', rawurlencode('처리 되었습니다.|success')); // 처리여부 cookie 저장
getLink('reload','parent.','','');
?>

View File

@@ -0,0 +1,126 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$id = trim($_POST['id']);
$pw = trim($_POST['pw1']);
$name = trim($_POST['name']);
$nic = trim($_POST['nic']);
$nic = $nic ? $nic : $name;
$email = trim($_POST['email']);
if (!$id || !$name) getLink('','','정말로 실행하시겠습니까?','');
if (!$check_id || !$check_nic || !$check_email)
{
getLink('','','정말로 실행하시겠습니까?','');
}
$tmpname = $_FILES['upfile']['tmp_name'];
$realname = $_FILES['upfile']['name'];
if ($avatar_delete)
{
$photo = '';
$saveFile1 = $g['path_var'].'avatar/'.$avatar;
}
else {
$photo = $avatar;
if (is_uploaded_file($tmpname))
{
$fileExt = strtolower(getExt($realname));
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
if (strstr('[jpg,png,gif]',$fileExt))
{
$wh = getimagesize($tmpname);
if ($wh[0] > 250 && $wh[1] > 250)
{
$photo = $id.'.'.$fileExt;
$saveFile1 = $g['path_var'].'avatar/'.$photo;
if (is_file($saveFile1)) unlink($saveFile1);
include $g['path_core'].'function/thumb.func.php';
move_uploaded_file($tmpname,$saveFile1);
ResizeWidth($saveFile1,$saveFile1,600);
@chmod($saveFile1,0707);
}
}
}
}
if ($uid)
{
$_M = getDbData($table['s_mbrdata'],'memberuid='.$uid,'d_regis');
if($pw!='')
{
$newPw = password_hash($pw, PASSWORD_DEFAULT);
getDbUpdate($table['s_mbrid'],"pw='".$newPw."'",'uid='.$uid);
if ($my['uid'] == $uid)
{
$_SESSION['mbr_pw'] = $newPw;
}
}
getDbUpdate($table['s_mbrdata'],"super='$super',email='$email',name='$name',nic='$nic',photo='$photo',phone='$phone'",'memberuid='.$uid);
setrawcookie('admin_admin_result', rawurlencode('수정 되었습니다.|success')); // 처리여부 cookie 저장
}
else {
getDbInsert($table['s_mbrid'],'site,id,pw',"'$s','$id','".password_hash($pw, PASSWORD_DEFAULT)."'");
$memberuid = getDbCnt($table['s_mbrid'],'max(uid)','');
$auth = 1;
$mygroup = 1;
$level = 1;
$comp = 0;
$adm_view = $admin ? '[admin]' : '';
$adm_site = '';
$home = '';
$birth1 = 0;
$birth2 = 0;
$birthtype = 0;
$job = '';
$marr1 = 0;
$marr2 = 0;
$sms = 1;
$mailing = 1;
$smail = 0;
$point = 0;
$usepoint = 0;
$money = 0;
$cash = 0;
$num_login = 1;
$bio = '';
$now_log = 0;
$last_log = '';
$last_pw = $date['totime'];
$is_paper = 0;
$d_regis = $date['totime'];
$sns = '';
$noticeconf = '';
$num_notice = 0;
$addfield = '';
$_QKEY = "memberuid,site,auth,mygroup,level,comp,super,admin,adm_view,adm_site,";
$_QKEY.= "email,name,nic,grade,photo,home,sex,birth1,birth2,birthtype,phone,tel,";
$_QKEY.= "job,marr1,marr2,sms,mailing,smail,point,usepoint,money,cash,num_login,bio,now_log,last_log,last_pw,is_paper,d_regis,tmpcode,sns,noticeconf,num_notice,addfield";
$_QVAL = "'$memberuid','$s','$auth','$mygroup','$level','$comp','$super','$admin','$adm_view','$adm_site',";
$_QVAL.= "'$email','$name','$nic','','$photo','$home','$sex','$birth1','$birth2','$birthtype','$phone','$tel',";
$_QVAL.= "'$job','$marr1','$marr2','$sms','$mailing','$smail','$point','$usepoint','$money','$cash','$num_login','$bio','$now_log','$last_log','$last_pw','$is_paper','$d_regis','','$sns','$noticeconf','$num_notice','$addfield'";
getDbInsert($table['s_mbrdata'],$_QKEY,$_QVAL);
getDbUpdate($table['s_mbrlevel'],'num=num+1','uid='.$level);
getDbUpdate($table['s_mbrgroup'],'num=num+1','uid='.$mygroup);
if ($email){
getDbInsert($table['s_mbremail'],'mbruid,email,base,backup,d_regis,d_code,d_verified',"'".$memberuid."','".$email."',1,0,'".$d_regis."','',''");
}
if ($phone) {
getDbInsert($table['s_mbrphone'],'mbruid,phone,base,backup,d_regis,d_code,d_verified',"'".$memberuid."','".$phone."',1,0,'".$d_regis."','',''");
}
setrawcookie('admin_admin_result', rawurlencode($name.'님이 추가 되었습니다.|success')); // 처리여부 cookie 저장
}
getLink('reload','parent.','','');
?>

View File

@@ -0,0 +1,79 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$result = false;
if ($type == 'id')
{
$isId = getDbRows($table['s_mbrid'],"id='".$fvalue."'");
if (!$isId && !is_file($g['path_tmp'].'out/'.$fvalue.'.txt')) $result = true;
if ($result):
?>
<script>
parent.getId('rb-idcheck').innerHTML = '<i class="fa fa-info-circle fa-lg fa-fw"></i>정상';
parent.document.procForm.check_id.value = '1';
parent.submitFlag = false;
</script>
<?php else:?>
<script>
parent.getId('rb-idcheck').innerHTML = '<i class="fa fa-question fa-lg fa-fw"></i>확인요망';
parent.document.procForm.check_id.value = '0';
parent.submitFlag = false;
</script>
<?php
endif;
}
else if ($type == 'nic')
{
if ($my['admin']) $result = true;
else {
if($my['uid']) $isId = getDbRows($table['s_mbrdata'],"nic='".$fvalue."' and nic<>'".$my['nic']."'");
else $isId = getDbRows($table['s_mbrdata'],"nic='".$fvalue."'");
if (!$isId) $result = true;
}
if ($result):
?>
<script>
parent.getId('rb-nickcheck').innerHTML = '<i class="fa fa-info-circle fa-lg fa-fw"></i>정상';
parent.document.procForm.check_nic.value = '1';
parent.submitFlag = false;
</script>
<?php else:?>
<script>
parent.getId('rb-nickcheck').innerHTML = '<i class="fa fa-question fa-lg fa-fw"></i>확인요망';
parent.document.procForm.check_nic.value = '0';
parent.submitFlag = false;
</script>
<?php
endif;
}
else if ($type == 'email')
{
if (strpos($fvalue,'@') && strpos($fvalue,'.'))
{
if ($my['admin']) $result = true;
else {
if ($my['uid']) $isId = getDbRows($table['s_mbrdata'],"email='".$fvalue."' and email <> '".$my['email']."'");
else $isId = getDbRows($table['s_mbrdata'],"email='".$fvalue."'");
if (!$isId) $result = true;
}
}
if ($result):
?>
<script>
parent.getId('rb-emailcheck').innerHTML = '<i class="fa fa-info-circle fa-lg fa-fw"></i>정상';
parent.document.procForm.check_email.value = '1';
parent.submitFlag = false;
</script>
<?php else:?>
<script>
parent.getId('rb-emailcheck').innerHTML = '<i class="fa fa-question fa-lg fa-fw"></i>확인요망';
parent.document.procForm.check_email.value = '0';
parent.submitFlag = false;
</script>
<?php
endif;
}
exit;
?>

View File

@@ -0,0 +1,16 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
if ($my['uid'] != 1 || $memberuid == 1) getLink('','','권한이 없습니다.','');
$perm = '';
foreach($module_members as $mds)
{
$perm .= '['.$mds.']';
}
getDbUpdate($table['s_mbrdata'],"adm_view='".$perm."'",'memberuid='.$memberuid);
setrawcookie('admin_admin_result', rawurlencode('반영 되었습니다.|success')); // 처리여부 cookie 저장
getLink('reload','parent.','','');
?>

View File

@@ -0,0 +1,16 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
if ($my['uid'] != 1 || $memberuid == 1) getLink('','','권한이 없습니다.','');
$perm = '';
foreach($module_members as $sts)
{
$perm .= '['.$sts.']';
}
getDbUpdate($table['s_mbrdata'],"adm_site='".$perm."'",'memberuid='.$memberuid);
setrawcookie('admin_admin_result', rawurlencode('관리 사이트가 지정 되었습니다.|success')); // 처리여부 cookie 저장
getLink('reload','parent.','','');
?>

View File

@@ -0,0 +1,47 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$memberuid = $my['uid'];
$url = $g['s'].'/?r='.$r.'&m='.$m.'&module='.$_addmodule.'&front='.$_addfront;
if(getDbRows($table['s_admpage'],'memberuid='.$memberuid." and url='".$url."'"))
{
getLink('','','이미 등록된 북마크입니다.','');
}
$maxgid = getDbCnt($table['s_admpage'],'max(gid)','memberuid='.$memberuid);
$MD = getDbData($table['s_module'],"id='".$_addmodule."'",'*');
include getLangFile($g['path_module'].$_addmodule.'/language/',$d['admin']['syslang'],'/lang.admin-menu.php');
$varfile = $g['path_module'].$_addmodule.'/admin/var/var.menu.php';
if (is_file($varfile))
{
include $varfile;
$name= $MD['name'].' - '.$d['amenu'][$_addfront];
}
else {
$name= $MD['name'];
}
$gid = $maxgid + 1;
getDbInsert($table['s_admpage'],'memberuid,gid,name,url',"'$memberuid','$gid','$name','$url'");
$bookmark_uid = getDbCnt($table['s_admpage'],'max(uid)','');
if ($_addmodule == 'admin' && $_addfront == 'bookmark')
{
getLink('reload','parent.','','');
}
else {
?>
<script>
parent.getId('_bookmark_star_').className = 'fa fa-lg fa-star rb-star-fill text-primary';
parent.getId('_bookmark_notyet_').className = 'btn-group btn-group-sm dropdown hidden';
parent.getId('_bookmark_already_').className = 'btn-group btn-group-sm dropdown';
parent.getId('_add_bookmark_').innerHTML <?php if(getDbRows($table['s_admpage'],'memberuid='.$my['uid'])>1):?>+<?php endif?>= '<a href="<?php echo $url?>" class="list-group-item" id="_now_bookmark_<?php echo $bookmark_uid?>"><i class="fa fa-fw fa-file-text-o"></i><?php echo $name?></a>';
</script>
<?php
exit;
}
?>

View File

@@ -0,0 +1,38 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
if ($deltype == 'hidden')
{
$memberuid = $my['uid'];
$url = $g['s'].'/?r='.$r.'&m='.$m.'&module='.$_addmodule.'&front='.$_addfront;
$bookmark_rcd = getDbData($table['s_admpage'],'memberuid='.$memberuid." and url='".$url."'",'uid');
$bookmark_uid = $bookmark_rcd['uid'];
if (!$bookmark_uid)
{
getLink('','','등록되지 않았거나 이미 삭제된 북마크입니다.','');
}
getDbDelete($table['s_admpage'],'uid='.$bookmark_uid);
?>
<script>
parent.getId('_bookmark_star_').className = 'fa fa-lg fa-star-o';
parent.getId('_bookmark_notyet_').className = 'btn-group btn-group-sm dropdown';
parent.getId('_bookmark_already_').className = 'btn-group btn-group-sm dropdown hidden';
parent.getId('_now_bookmark_<?php echo $bookmark_uid?>').className = 'list-group-item hidden';
<?php if(!getDbRows($table['s_admpage'],'memberuid='.$my['uid'])):?>
parent.getId('_add_bookmark_').innerHTML = '<a class="list-group-item"><i class="fa fa-fw fa-file-text-o"></i>등록된 북마크가 없습니다</a>';
<?php endif?>
</script>
<?php
exit;
}
else {
foreach ($bookmark_pages as $val)
{
getDbDelete($table['s_admpage'],'uid='.$val.' and memberuid='.$my['uid']);
}
getLink('reload','parent.','','');
}
?>

View File

@@ -0,0 +1,14 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$i = 0;
foreach ($bookmark_pages_order as $val)
{
$i++;
getDbUpdate($table['s_admpage'],'gid='.$i,'uid='.$val.' and memberuid='.$my['uid']);
}
getLink('','','','');
?>

View File

@@ -0,0 +1,83 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$fdset = array();
$fdset['config'] = array('themepc','pannellink','cache_flag','mailer','ses_key','ses_sec','ses_region','uninstall','dblclick','codeeidt','editor','syslang','sysmail','sysmodule','sms_tel','sms_id','sms_key','fcm_key','fcm_SenderId','fcm_VAPID','site_cutid');
$fdset['security'] = array('secu_tags','secu_domain','secu_param');
// system -> sys 필드명 변경
$_tmp1 = db_query("SHOW COLUMNS FROM ".$table['s_module']." WHERE `Field` = 'sys'",$DB_CONNECT);
if(!db_num_rows($_tmp1)) {
$_tmp1 = ("alter table ".$table['s_module']." CHANGE system sys TINYINT(4) not null");
db_query($_tmp1, $DB_CONNECT);
}
//제거탭 출력 주의 알림
if (!$d['admin']['uninstall'] && $uninstall)
{
$_message = '시스템 도구에서 <strong>제거</strong>(<code>Uninstall</code>) 탭이 출력되도록 설정되었습니다. 이 설정은 매우 위험할 수 있으니 확인하세요.';
$_referer = $g['s'].'/?r='.$r.'&m=admin&module=admin';
putNotice($my['uid'],$m,0,$_message,$_referer,'');
}
if ($act == 'config')
{
if ($d['admin']['syslang'] != $syslang)
{
$RCD = getDbArray($table['s_module'],'','*','gid','asc',0,1);
while($_R = db_fetch_array($RCD))
{
$new_modulename = $g['path_module'].$_R['id'].'/language/'.$syslang.'/name.module.txt';
getDbUpdate($table['s_module'],"name='".($syslang&&is_file($new_modulename)?implode('',file($new_modulename)):getFolderName($g['path_module'].$_R['id']))."'","id='".$_R['id']."'");
}
$panel_reload = true;
}
}
foreach ($fdset[$act] as $val)
{
$d['admin'][$val] = str_replace("\n",'',trim(${$val}));
}
$_tmpdfile = $g['path_var'].'/system.var.php';
$fp = fopen($_tmpdfile,'w');
fwrite($fp, "<?php\n");
foreach ($d['admin'] as $key => $val)
{
fwrite($fp, "\$d['admin']['".$key."'] = \"".addslashes(stripslashes($val))."\";\n");
}
fwrite($fp, "?>");
fclose($fp);
@chmod($_tmpdfile,0707);
//FCM 연결정보
$_tmpjfile = $g['path_var'].'fcm.info.js';
if ($fcm_SenderId) {
$fp = fopen($_tmpjfile,'w');
fwrite($fp, "var firebase_app_js_src = '".$fcm_app_js_src."'\n");
fwrite($fp, "var firebase_messaging_js_src = '".$fcm_messaging_js_src."'\n");
fwrite($fp, "var fcmSenderId = '".$fcm_SenderId."'\n");
fwrite($fp, "var fcmVAPID = '".$fcm_VAPID."'\n");
fwrite($fp, "var icon = '".$fcm_icon."'\n");
fclose($fp);
@chmod($_tmpjfile,0707);
} else {
unlink($_tmpjfile);
}
if($autosave):
?>
<script>
parent.document.procForm.target = '';
parent.document.procForm.a.value = 'config';
parent.document.procForm.autosave.value = '';
</script>
<?php
exit;
endif;
if ($panel_reload) getLink($g['s'].'/?r='.$r.'&pickmodule='.$m.'&panel=Y','parent.parent.','','');
else {
setrawcookie('admin_config_result', rawurlencode('시스템 설정이 변경 되었습니다.|success')); // 처리여부 cookie 저장
getLink('reload','parent.','','');
}
?>

View File

@@ -0,0 +1,120 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$g['systemVarForSite'] = $g['path_var'].'/system.var.php';
include_once file_exists($g['systemVarForSite']) ? $g['systemVarForSite'] : $g['dir_module'].'var/var.system.php';
if ($type == 'ftpbtn')
{
$FTP_CONNECT = ftp_connect($ftp_host,$ftp_port);
$FTP_CRESULT = ftp_login($FTP_CONNECT,$ftp_user,$ftp_pass);
if ($FTP_CONNECT && $FTP_CRESULT):
$FTP_PASV = true;
if($ftp_pasv)
{
$FTP_PASV = ftp_pasv($FTP_CONNECT, true);
}
$FTP_CHDIR = ftp_chdir($FTP_CONNECT,$ftp_rb);
if (!$FTP_PASV) $_msg = 'Passive Mode 를 확인하세요.';
if (!$FTP_CHDIR || substr($ftp_rb,-1)!='/') $_msg = '킴스큐 경로를 확인하세요.';
if ($FTP_PASV && $FTP_CHDIR):
?>
<script>
alert('정상적으로 FTP 연결이 확인되었습니다.');
parent.getId('<?php echo $type?>').innerHTML = '<i class="fa fa-info-circle fa-lg fa-fw"></i>정상';
parent.submitFlag = false;
parent.document.procForm.a.value = 'config';
parent.document.procForm.autosave.value = '1';
parent.document.procForm.ftp.value = '1';
parent.document.procForm.target = '_autosave_';
parent.document.procForm.submit();
</script>
<?php else:?>
<script>
alert('FTP 연결이 되지 않았습니다. <?php echo $_msg?>');
parent.getId('<?php echo $type?>').innerHTML = '<i class="fa fa-question fa-lg fa-fw"></i>확인요망';
parent.submitFlag = false;
parent.document.procForm.a.value = 'config';
parent.document.procForm.autosave.value = '1';
parent.document.procForm.ftp.value = '';
parent.document.procForm.target = '_autosave_';
parent.document.procForm.submit();
</script>
<?php endif?>
<?php else:?>
<script>
alert('FTP 연결이 되지 않았습니다. FTP정보를 확인해 주세요.');
parent.getId('<?php echo $type?>').innerHTML = '<i class="fa fa-question fa-lg fa-fw"></i>확인요망';
parent.submitFlag = false;
parent.document.procForm.a.value = 'config';
parent.document.procForm.autosave.value = '1';
parent.document.procForm.ftp.value = '';
parent.document.procForm.target = '_autosave_';
parent.document.procForm.submit();
</script>
<?php
endif;
}
else if ($type == 'ftpbtn_uninstall')
{
$FTP_CONNECT = ftp_connect($d['admin']['ftp_host'],$d['admin']['ftp_port']);
$FTP_CRESULT = ftp_login($FTP_CONNECT,$d['admin']['ftp_user'],$pass);
if ($FTP_CONNECT && $FTP_CRESULT):
?>
<script>
alert('정상적으로 FTP 연결이 확인되었습니다.');
parent.getId('<?php echo $type?>').innerHTML = '<i class="fa fa-info-circle fa-lg fa-fw"></i>정상';
</script>
<?php else:?>
<script>
alert('FTP 연결이 되지 않았습니다. FTP정보를 확인해 주세요.');
parent.getId('<?php echo $type?>').innerHTML = '<i class="fa fa-question fa-lg fa-fw"></i>확인요망';
</script>
<?php
endif;
}
else
{
include $g['path_core'].'function/email.func.php';
$content = '<h4>이메일전송 테스트입니다.</h4><br>';
$content.= '이 화면을 정상적으로 확인하셨다면 이메일 전송이 정상적으로 동작중입니다.<br><br>';
if ($type == 'sendmailbtn')
{
$result = getSendMail($chk_email,$my['email'].'|'.$my['name'],'['.$_HS['name'].'] 이메일 전송 테스트입니다.( Using '.($d['admin']['mailer'] == "ses"?'AWS SES':'Sendmail').' )',$content,'HTML');
}
if ($result):
?>
<script>
alert('이메일이 전송되었습니다. 확인해 보세요.');
parent.getId('<?php echo $type?>').innerHTML = '<i class="fa fa-info-circle fa-lg fa-fw"></i>정상';
parent.submitFlag = false;
parent.document.procForm.a.value = 'config';
parent.document.procForm.autosave.value = '1';
parent.document.procForm.<?php echo $type=='sendmailbtn'?'email':'smtp'?>.value = '1';
parent.document.procForm.target = '_autosave_';
parent.document.procForm.submit();
</script>
<?php else:?>
<script>
alert('메일서버가 응답하지 않습니다.');
parent.getId('<?php echo $type?>').innerHTML = '<i class="fa fa-question fa-lg fa-fw"></i>확인요망';
parent.submitFlag = false;
parent.document.procForm.a.value = 'config';
parent.document.procForm.autosave.value = '1';
parent.document.procForm.<?php echo $type=='sendmailbtn'?'email':'smtp'?>.value = '';
parent.document.procForm.target = '_autosave_';
parent.document.procForm.submit();
</script>
<?php
endif;
}
exit;
?>

View File

@@ -0,0 +1,20 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$_email_header = $g['path_module'].$m.'/var/email.header.txt';
$fp = fopen($_email_header,'w');
fwrite($fp, trim(stripslashes($email_header)));
fclose($fp);
@chmod($_email_header,0707);
$_email_footer = $g['path_module'].$m.'/var/email.footer.txt';
$fp = fopen($_email_footer,'w');
fwrite($fp, trim(stripslashes($email_footer)));
fclose($fp);
@chmod($_email_footer,0707);
setrawcookie('admin_config_result', rawurlencode('이메일 양식이 저장 되었습니다.|success')); // 처리여부 cookie 저장
getLink('reload','parent.','','');
?>

View File

@@ -0,0 +1,20 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$result=array();
$result['error'] = false;
$R = getUidData($table['s_gitlog'],$uid);
$M = getDbData($table['s_mbrdata'],'memberuid='.$R['mbruid'],'*');
$M1 = getUidData($table['s_mbrid'],$M['memberuid']);
$result['version'] = $R['version'];
$result['output'] = $R['output'];
$result['name'] = $M['name'].' ('.$M1['id'].')';
$result['d_regis'] = getDateFormat($R['d_regis'],'Y년 m월 d일 H시 i분');
echo json_encode($result);
exit;
?>

View File

@@ -0,0 +1,40 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 201 ? $recnum : 20;
$listque = 'uid';
$RCD = getDbArray($table['s_gitlog'],$listque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_gitlog'],$listque);
$TPG = getTotalPage($NUM,$recnum);
$result=array();
$result['error'] = false;
$html = '';
while ($R=db_fetch_array($RCD)) {
$version_array = explode('->', $R['version']);
$version = $version_array[1];
$html .= '<li class="table-view-cell">
<a class="navigate-right" data-toggle="page"
data-target="#page-software-logview"
data-title="'.$version.'"
data-uid="'.$R['uid'].'"
data-start="#page-software-loglist">
<span class="badge badge-default badge-inverted">'.getDateFormat($R['d_regis'],'Y.m.d H:i').'</span>
<code>'.$version.'</code>
</a>
</li>';
}
$result['list'] = $html;
echo json_encode($result);
exit;
?>

View File

@@ -0,0 +1,27 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$result=array();
$git_version = shell_exec('git --version');
if ($git_version) {
$command1 = 'git init';
$command2 = 'git remote add origin https://github.com/kimsQ/rb.git';
shell_exec($command1);
shell_exec($command2);
setrawcookie('system_update_result', rawurlencode('업데이트 준비가 되었습니다.'));
$result['error'] = false;
} else {
$result['error'] = true;
$result['msg'] = 'git 설치가 필요합니다. 호스팅 업체 또는 서버관리자에게 문의해주세요.';
}
echo json_encode($result);
exit;
?>

View File

@@ -0,0 +1,14 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$mfile = $g['path_var'].'rbl.key.txt';
$fp = fopen($mfile,'w');
fwrite($fp,stripslashes($key));
fclose($fp);
@chmod($mfile,0707);
setrawcookie('admin_config_result', rawurlencode('라이센스 키가 변경 되었습니다.|success')); // 처리여부 cookie 저장
getLink('reload','parent.','','');
?>

View File

@@ -0,0 +1,41 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
if ($isdelete)
{
include $g['path_core'].'function/dir.func.php';
foreach($pluginmembers as $plg)
{
if($isdelete == '1')
{
DirDelete($g['path_plugin'].$plg);
}
if($isdelete == '2')
{
if(is_file($g['path_plugin'].$plg.'/size.txt'))
{
unlink($g['path_plugin'].$plg.'/size.txt');
}
DirDelete($g['path_plugin'].$plg.'/'.$ov[$plg]);
}
}
getLink($g['s'].'/?r='.$r.'&m='.$m.'&module='.$m.'&front=plugin&resave=Y','parent.','','');
}
else {
$_tmpdfile = $g['path_var'].'plugin.var.php';
$fp = fopen($_tmpdfile,'w');
fwrite($fp, "<?php\n");
foreach ($ov as $_key_ => $_val_)
{
fwrite($fp, "\$d['ov']['".$_key_."'] = '".trim($_val_)."';\n");
}
fwrite($fp, "?>");
fclose($fp);
@chmod($_tmpdfile,0707);
getLink($g['s'].'/?r='.$r.'&m='.$m.'&module='.$m.'&front=plugin','parent.','','');
}
?>

View File

@@ -0,0 +1,95 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
if ($act == 'robots')
{
$rfolder = $_SERVER['DOCUMENT_ROOT'];
if(!is_writable($rfolder))
{
getLink('','',sprintf(_LANG('','admin'),$rfolder),'');
}
$rfile = $rfolder.'/robots.txt';
$fp = fopen($rfile,'w');
fwrite($fp, trim(stripslashes($robotstxt)));
fclose($fp);
@chmod($rfile,0707);
getLink('','','저장 되었습니다.','');
}
if ($act == 'robots_delete')
{
@unlink($_SERVER['DOCUMENT_ROOT'].'/robots.txt');
getLink('reload','parent.','삭제 되었습니다','');
}
if ($act == 'sitemap_delete')
{
@unlink('./sitemap.xml');
getLink('reload','parent.','삭제 되었습니다','');
}
if ($act == 'sitemap_save')
{
$gfile= './sitemap.xml';
$fp = fopen($gfile,'w');
fwrite($fp,trim(stripslashes($configdata)));
fclose($fp);
@chmod($gfile,0707);
getLink('','','저장 되었습니다','');
}
if ($act == 'sitemap_make')
{
function getMenuUrlCode($site,$table,$parent,$depth,$uid,$code)
{
static $string;
$xdepth = $depth+1;
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'depth='.$xdepth.' and parent='.$parent.' and hidden=0 and reject=0 order by gid asc','*');
while($C=db_fetch_array($CD))
{
$code1 = $code.$C['id'].'/';
$_code = substr($code1,0,strlen($code1)-1);
$string .= "<url><loc>".getRWurl('c='.$_code)."</loc></url>\n";
if ($C['is_child'])
{
getMenuUrlCode($site,$table,$C['uid'],$C['depth'],$uid,$code1);
}
}
return $string;
}
function getRWurl($url)
{
global $_HS,$g;
if ($_HS['rewrite'])
{
return 'http://'.$_SERVER['HTTP_HOST'].str_replace('./','/',RW($url));
}
else {
return $g['url_root'].htmlspecialchars(str_replace('&amp;','&',str_replace('./','/',RW($url))));
}
}
$gfile= './sitemap.xml';
$fp = fopen($gfile,'w');
fwrite($fp,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
fwrite($fp,"<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:image=\"http://www.google.com/schemas/sitemap-image/1.1\" xmlns:video=\"http://www.google.com/schemas/sitemap-video/1.1\">\n\n");
fwrite($fp,getMenuUrlCode($s,$table['s_menu'],0,0,0,''));
$RCD = getDbArray($table['s_upload'],'type=2 or type=5 and hidden=0','*','gid','asc',0,1);
fwrite($fp,"\n\n");
while($R=db_fetch_array($RCD))
{
fwrite($fp,"<url><loc>".$R['url'].$R['folder'].'/'.$R['tmpname']."</loc></url>\n");
}
fwrite($fp,"\n");
fwrite($fp,"</urlset>\n");
fclose($fp);
@chmod($gfile,0707);
getLink('reload','parent.','사이트맵이 새로 만들어졌습니다.','');
}
exit;
?>

View File

@@ -0,0 +1,16 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
include $g['path_core'].'function/sms.func.php';
$content = '['.$_HS['name'].'] SMS 전송 테스트입니다.';
$result = getSendSMS($testsms,$chk_sms,'',$content,'sms');
if ($result == 'OK') {
getLink('reload','parent.','SMS가 전송 되었습니다. 확인해 보세요.','');
} else {
getLink('reload','parent.',$result,'');
}
?>

View File

@@ -0,0 +1,31 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
if (is_file($g['path_switch'].$switch.'/main.php'))
{
include $g['path_core'].'function/dir.func.php';
DirDelete($g['path_switch'].$switch);
$_switchset = array('start','top','head','foot','end');
$_ufile = $g['path_var'].'switch.var.php';
$fp = fopen($_ufile,'w');
fwrite($fp, "<?php\n");
foreach ($_switchset as $_key)
{
foreach ($d['switch'][$_key] as $name => $sites)
{
if($switch == $_key.'/'.$name) continue;
fwrite($fp, "\$d['switch']['".$_key."']['".$name."'] = \"".$sites."\";\n");
}
}
fwrite($fp, "?>");
fclose($fp);
@chmod($_ufile,0707);
}
getLink($g['s'].'/?r='.$r.'&m=admin&module=admin&front=switch','parent.','삭제 되었습니다.','');
?>

View File

@@ -0,0 +1,41 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$sfile = $g['path_switch'].$switch.'/main.php';
$nfile = $g['path_switch'].$switch.'/name.txt';
$sinfo = explode('/',$switch);
if (is_file($sfile))
{
$fp = fopen($nfile,'w');
fwrite($fp,$name);
fclose($fp);
$fp = fopen($sfile,'w');
fwrite($fp,trim(stripslashes($switch_code)));
fclose($fp);
@chmod($nfile,0707);
@chmod($sfile,0707);
$_newsites = '';
foreach($aply_sites as $sites) $_newsites.= '['.$sites.']';
$_ufile = $g['path_var'].'switch.var.php';
$fp = fopen($_ufile,'w');
fwrite($fp, "<?php\n");
foreach ($d['switch'] as $_key => $_val)
{
foreach ($d['switch'][$_key] as $_val1 => $_val2)
{
if ($switch == $_key.'/'.$_val1)
{
fwrite($fp, "\$d['switch']['".$_key."']['".$_val1."'] = \"".$_newsites."\";\n");
}
else {
fwrite($fp, "\$d['switch']['".$_key."']['".$_val1."'] = \"".$d['switch'][$_key][$_val1]."\";\n");
}
}
}
fwrite($fp, "?>");
fclose($fp);
@chmod($_ufile,0707);
}
setrawcookie('admin_switch_result', rawurlencode('스위치 설정이 변경 되었습니다.|success')); // 처리여부 cookie 저장
getLink('reload','parent.','','');
?>

View File

@@ -0,0 +1,24 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$_switchset = array('start','top','head','foot','end');
$_ufile = $g['path_var'].'switch.var.php';
$fp = fopen($_ufile,'w');
fwrite($fp, "<?php\n");
foreach ($_switchset as $_key)
{
foreach (${'switchmembers_'.$_key} as $_val)
{
fwrite($fp, "\$d['switch']['".$_key."']['".$_val."'] = \"".$d['switch'][$_key][$_val]."\";\n");
}
}
fwrite($fp, "?>");
fclose($fp);
@chmod($_ufile,0707);
getLink('reload','parent.',$auto?'':'스위치 정보가 갱신되었습니다.','');
?>

View File

@@ -0,0 +1,27 @@
<?php
if(!defined('__KIMS__')) exit;
if ($_SESSION['_pwemail_'] > 2) exit;
$_SESSION['_pwemail_'] = $_SESSION['_pwemail_'] + 1;
include $g['path_core'].'function/email.func.php';
$tmpPw = rand(0,999999);
$content = '<h4>'.$tmpPw.'</h4><br><b>임시 패스워드로 로그인 하신 후 반드시 패스워드를 변경해 주세요.</b>';
$firstadmin = getDbData($table['s_mbrdata'],'memberuid=1','name,email,d_regis');
$tmpUpdate = getDbUpdate($table['s_mbrdata'],"tmpcode='".password_hash($tmpPw, PASSWORD_DEFAULT)."'",'memberuid=1');
$to = $firstadmin['email'].'|'.$firstadmin['name'];
$from = $d['admin']['sysmail'];
$result = getSendMail($to,$from,'['.$_HS['name'].'] 요청하신 임시 패스워드입니다.',$content,'HTML');
if ($result)
{
getLink('reload','parent.',$firstadmin['email'].'로 임시 패스워드가 전송 되었습니다.','');
}
else {
getLink('','','이메일이 전송되지 못했습니다.','');
}
?>

View File

@@ -0,0 +1,33 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
// 제거탭 출력 설정 하지 않은 경우 차단
if (!$d['admin']['uninstall'])
{
getLink('','','정상적인 접속이 아닙니다.','');
}
// FTP 삭제
if ($d['admin']['ftp_use']&&$d['admin']['ftp'])
{
getLink('','','죄송합니다. FTP를 이용한 삭제는 아직 지원하지 않습니다.','');
}
// NOBODY 삭제
else {
foreach ($table as $key => $val) db_query('drop table '.$val,$DB_CONNECT);
include $g['path_core'].'function/dir.func.php';
DirDelete('./');
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script>
top.location.href = 'http://<?php echo $_SERVER['HTTP_HOST']?>/';
</script>
</head>
<body></body>
</html>

View File

@@ -0,0 +1,61 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$ext = '';
$mbruid = $my['uid'];
$command_reset = 'git reset --hard';
$command_pull = 'git pull origin master';
$d_regis = $date['totime'];
$version = $current_version.'->'.$lastest_version;
$output_reset = shell_exec($command_reset);
$output_pull = shell_exec($command_pull.' 2>&1');
$command = $command_reset.' '.$command_pull;
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
$msg_type = 'default';
} else {
$msg_type = 'success';
}
if(strpos($output_pull, 'Already up-to-date.') !== false) {
$msg = '이미 최신버전 입니다.|'.$msg_type;
} else {
if (strpos($output_pull, 'error') !== false) {
$msg = '에러발생! 로그를 확인해주세요.|danger';
$error = 1;
} else {
$msg = '실행완료! 브라우저 재시작해주세요.|success';
$error = 0;
getDbUpdate($table['s_gitlog'],'error=0','uid>0');
}
// 임시-필드 없는 경우, 생성
$_tmp1 = db_query("SHOW COLUMNS FROM ".$table['s_gitlog']." WHERE `Field` = 'ext'",$DB_CONNECT);
if(!db_num_rows($_tmp1)) {
$_tmp1 = ("alter table ".$table['s_gitlog']." ADD ext VARCHAR(30) DEFAULT '' NOT NULL");
db_query($_tmp1, $DB_CONNECT);
}
$_tmp2 = db_query("SHOW COLUMNS FROM ".$table['s_gitlog']." WHERE `Field` = 'target'",$DB_CONNECT);
if(!db_num_rows($_tmp2)) {
$_tmp2 = ("alter table ".$table['s_gitlog']." ADD target VARCHAR(100) DEFAULT '' NOT NULL");
db_query($_tmp2, $DB_CONNECT);
}
$_tmp3 = db_query("SHOW COLUMNS FROM ".$table['s_gitlog']." WHERE `Field` = 'error'",$DB_CONNECT);
if(!db_num_rows($_tmp3)) {
$_tmp3 = ("alter table ".$table['s_gitlog']." ADD error TINYINT DEFAULT '0' NOT NULL");
db_query($_tmp3, $DB_CONNECT);
}
getDbInsert($table['s_gitlog'],'error,ext,target,mbruid,remote,command,version,output,d_regis',"'$error','$ext','$target','$mbruid','$remote','$command','$version','$output_pull','$d_regis'");
}
$_SESSION['current_version'] = $lastest_version;
setrawcookie('system_update_result', rawurlencode($msg));
getLink('reload','parent.','','');
?>

4
modules/admin/admin.php Normal file
View File

@@ -0,0 +1,4 @@
<?php
if(!defined('__KIMS__')) exit;
include $g['path_module'].$module.'/admin/'.$front.'.php';
?>

View File

@@ -0,0 +1,29 @@
<?php
$license_local = $g['path_module'].$module.'/LICENSE';
$license_global = $g['path_root'].'LICENSE';
if (file_exists($license_local)) $license = $license_local;
else $license = $license_global;
?>
<link href="<?php echo $g['s']?>/_core/css/github-markdown.css" rel="stylesheet">
<?php getImport('jquery-markdown','jquery.markdown','0.0.10','js')?>
<?php @include $g['path_module'].$module.'/var/var.moduleinfo.php' ?>
<article class="rb-docs markdown-body px-5 pt-3">
<h1><?php echo sprintf('%s 모듈정보',ucfirst($MD['name']))?></h1>
<div class="pb-5 readme">
<?php readfile($g['path_module'].$module.'/README.md')?>
</div>
<div class="pb-5">
<h2>라이센스</h2>
<textarea class="form-control" rows="10"><?php readfile($license)?></textarea>
</div>
</article>
<script type="text/javascript">
$(".markdown-body .readme").markdown();
</script>

View File

@@ -0,0 +1,51 @@
#admin-users .panel {
border: none;
}
#admin-users .panel-heading label {
line-height: 35px
}
#admin-users .panel-heading,
#admin-users .panel-footer {
background-color: transparent;
padding: 10px 0
}
#admin-users .panel-footer .row [class*="col-"] {
margin-top: 10px
}
@media (min-width: 768px) {
#admin-users .panel-footer .row {
margin-left: -.5%;
margin-right: -.5%;
}
#admin-users .panel-footer .row [class*="col-"] {
min-height: 1px;
padding-left: .5%;
padding-right: .5%;
padding-top: 10px;
margin-top: 0;
}
}
#admin-users .table th label,
#admin-users .table th input {
margin: 0;
padding: 0
}
.form-control-feedback {
position: absolute;
top: 10px;
right: 20px
}
.table th,
.table td {
text-align: center;
}

View File

@@ -0,0 +1,442 @@
<?php
$R=array();
$mtype = $mtype ? $mtype : 'admin';
$recnum= $recnum ? $recnum : 10;
$sendsql= 'admin='.($mtype=='admin'?1:0);
$RCD = getDbArray($table['s_mbrdata'],$sendsql,'*','memberuid','asc',$recnum,$p);
$NUM = getDbRows($table['s_mbrdata'],$sendsql);
$TPG = getTotalPage($NUM,$recnum);
$_authset = array('','승인','보류','대기','탈퇴');
?>
<div id="admin-users" class="p-4">
<h3>관리자 정보관리</h3>
<form name="listForm" action="<?php echo $g['s']?>/" method="post" onsubmit="return false;">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="">
<input type="hidden" name="auth" value="">
<div class="panel panel-default">
<div class="panel-heading clearfix">
<label class="pull-left">
<span class="dropdown">
<a href="#" class="btn btn-light rb-username" data-toggle="dropdown">
<span><?php echo $mtype=='admin'?'관리자':'일반회원'?> <?php echo sprintf('%d명',$NUM)?></span>
<span class="caret"></span>
</a>
<div class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<a class="dropdown-item" href="<?php echo $g['adm_href']?>&amp;mtype=admin"><i class="fa fa-user"></i> 관리자</a>
<a class="dropdown-item" href="<?php echo $g['adm_href']?>&amp;mtype=member"><i class="fa fa-user"></i> 일반회원</a>
</div>
</span>
</label>
<div class="btn-group pull-right">
<button type="button" class="btn btn-light"<?php if($p-1<1):?> disabled<?php endif?> data-toggle="tooltip" data-placement="bottom" title="" data-original-title="이전" onclick="location.href=getPageGo(<?php echo $p-1?>,0);"><i class="fa fa-chevron-left fa-lg"></i></button>
<button type="button" class="btn btn-light"<?php if($p+1>$TPG):?> disabled<?php endif?> data-toggle="tooltip" data-placement="bottom" title="" data-original-title="다음" onclick="location.href=getPageGo(<?php echo $p+1?>,0);"><i class="fa fa-chevron-right fa-lg"></i></button>
</div>
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>
<div class="custom-control custom-checkbox custom-control-inline mr-0">
<input type="checkbox" class="custom-control-input" id="checkAll-admin-user">
<label class="custom-control-label" for="checkAll-admin-user"></label>
</div>
</th>
<th>상태</th>
<th>구분</th>
<th>이름</th>
<th>닉네임</th>
<th>아이디</th>
<th>연락처</th>
<th>최근접속</th>
<th></th>
</tr>
</thead>
<tbody>
<?php $_P=array()?>
<?php while($R=db_fetch_array($RCD)):?>
<?php $_R=getUidData($table['s_mbrid'],$R['memberuid'])?>
<?php if($R['memberuid']==$uid)$_P=$R?>
<tr>
<?php if($R['memberuid']==1):?>
<td></td>
<?php else:?>
<td class="side1">
<div class="custom-control custom-checkbox custom-control-inline mr-0">
<input type="checkbox" class="custom-control-input rb-admin-user" id="mbrmembers_<?php echo $R['memberuid']?>" name="mbrmembers[]" value="<?php echo $R['memberuid']?>" class="rb-admin-user" onclick="checkboxCheck();">
<label class="custom-control-label" for="mbrmembers_<?php echo $R['memberuid']?>"></label>
</div>
</td>
<?php endif?>
<td><?php echo $_authset[$R['auth']]?></td>
<?php if($R['now_log']):?>
<td><small class="badge badge-pill badge-primary" data-tooltip="tooltip" title="온라인"><?php echo $R['admin']?($R['adm_view']?($R['super']?'부관리자':'사이트관리자'):'최고관리자'):'일반회원'?></small></td>
<?php else:?>
<td><small class="badge badge-pill badge-secondary" data-tooltip="tooltip" title="오프라인"><?php echo $R['admin']?($R['adm_view']?($R['super']?'부관리자':'사이트관리자'):'최고관리자'):'일반회원'?></small></td>
<?php endif?>
<td><a href="#." data-toggle="modal" data-target="#modal_window" class="rb-modal-admininfo" onmousedown="admIdDrop('<?php echo $R['memberuid']?>','');"><?php echo $R['name']?></a></td>
<td><?php echo $R['nic']?></td>
<td><?php echo $_R['id']?></td>
<td><?php echo $R['tel2']?$R['tel2']:$R['tel1']?></td>
<td data-tooltip="tooltip" title="<?php echo getDateFormat($R['last_log'],'Y.m.d H:i')?>"><?php echo sprintf('%d일전',-getRemainDate($R['last_log']))?></td>
<td>
<?php if($my['super'] && $R['admin'] && $R['memberuid']!=1):?>
<a href="#." data-toggle="modal" data-target="#modal_window" class="btn btn-light btn-xs rb-modal-admininfo" onmousedown="admIdDrop('<?php echo $R['memberuid']?>','perm');"<?php if($R['memberuid']==1):?> disabled<?php endif?>>관리제한</a>
<?php endif?>
<a href="#." data-toggle="modal" data-target="#modal_window" class="btn btn-light btn-xs rb-modal-admininfo" onmousedown="admIdDrop('<?php echo $R['memberuid']?>','info');">정보변경</a>
</td>
</tr>
<?php endwhile?>
</tbody>
</table>
</div>
<div class="panel-footer clearfix">
<div class="row">
<div class="col-sm-3">
<div class="btn-group">
<fieldset id="rb-action-btn" disabled>
<div class="btn-group">
<div class="btn-group dropup">
<button type="button" class="btn btn-light dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> 관리 <span class="caret"></span>
</button>
<div class="dropdown-menu" role="menu">
<h6 class="dropdown-header">회원승인 상태변경</h6>
<a class="dropdown-item" href="#" onclick="actQue('admin_delete','4');">탈퇴</a>
<a class="dropdown-item" href="#" onclick="actQue('admin_delete','1');">승인</a>
<a class="dropdown-item" href="#" onclick="actQue('admin_delete','3');">대기</a>
<a class="dropdown-item" href="#" onclick="actQue('admin_delete','2');">보류</a>
<div class="dropdown-divider"></div>
<?php if($mtype=='admin'):?>
<a class="dropdown-item" href="#" onclick="actQue('admin_delete','');">관리자에서 제외</a>
<?php else:?>
<a class="dropdown-item" href="#" onclick="actQue('admin_delete','A');">관리자로 추가</a>
<?php endif?>
<a class="dropdown-item" href="#" onclick="actQue('admin_delete','D');"><span class="text-danger">데이터 삭제</span></a>
</div>
</div>
</div>
</fieldset>
</div>
<div class="btn-group">
<button type="button" class="btn btn-light" data-toggle="modal" data-target="#modal-admin-add"><i class="fa fa-plus-circle"></i> <?php echo $mtype=='admin'?'관리자 추가':'회원 추가'?></button>
</div>
</div>
</div>
</div>
</div>
</form>
<p class="mt-4"><small class="text-muted">관리자는 할당된 관리권한에 따라 아래와 같이 분류됩니다.</small></p>
<table class="table table-bordered small">
<thead class="thead-dark">
<tr>
<th colspan="2">관리자 구분</th>
<th>모듈 접근권한</th>
<th>사이트 접근권한</th>
</tr>
</thead>
<tbody>
<tr>
<th rowspan="2" class="align-middle">일반 관리자</th>
<th>최고 관리자</th>
<td>전체 모듈 접근 가능</td>
<td rowspan="2">전체 사이트 관리</td>
</tr>
<tr>
<th>부 관리자</th>
<td>특정 모듈 접근 불가</td>
</tr>
<tr>
<th rowspan="2" colspan="2">사이트 관리자</th>
<td>특정 모듈 접근 불가</td>
<td rowspan="2">특정 사이트만 관리</td>
</tr>
</tbody>
</table>
</div>
<!-- 회원추가 모달 -->
<div class="modal fade" id="modal-admin-add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form name="procForm" class="form-horizontal" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data" onsubmit="return saveCheck(this);" autocomplete="off">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="admin_member_add">
<input type="hidden" name="check_id" value="0">
<input type="hidden" name="check_nic" value="0">
<input type="hidden" name="check_email" value="0">
<?php if($mtype=='admin'):?>
<input type="hidden" name="super" value="1">
<input type="hidden" name="admin" value="1">
<?php endif?>
<div class="modal-header">
<h5 class="modal-title">
<i class="fa fa-user-plus fa-fw" aria-hidden="true"></i>
<?php echo $mtype=='admin'?'관리자 추가':'회원 추가'?>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group form-row rb-outside">
<label for="inputEmail3" class="col-sm-2 col-form-label">아이디</label>
<div class="col-sm-9">
<div class="input-group">
<input type="text" class="form-control" name="id" placeholder="4~12자의 영문(소문자)과 숫자만 사용" value="" maxlength="12" autofocus onchange="sendCheck('rb-idcheck','id');">
<span class="input-group-append">
<button type="button" class="btn btn-light" id="rb-idcheck" onclick="sendCheck('rb-idcheck','id');">중복확인</button>
</span>
</div>
</div>
</div>
<div class="form-group form-row">
<label class="col-sm-2 col-form-label">비밀번호</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="pw1" placeholder="">
</div>
</div>
<div class="form-group form-row">
<div class="offset-sm-2 col-sm-9">
<input type="password" class="form-control" name="pw2" placeholder="">
</div>
</div>
<hr>
<div class="form-group form-row">
<label class="col-sm-2 col-form-label">이름</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="name" placeholder="이름을 입력해주세요" value="<?php echo $regis_name?>" maxlength="10">
</div>
</div>
<div class="form-group form-row rb-outside">
<label class="col-sm-2 col-form-label">닉네임</label>
<div class="col-sm-9">
<div class="input-group">
<input type="text" class="form-control" name="nic" placeholder="닉네임을 입력해주세요" value="" maxlength="20" onchange="sendCheck('rb-nickcheck','nic');">
<span class="input-group-append">
<button type="button" class="btn btn-light" id="rb-nickcheck" onclick="sendCheck('rb-nickcheck','nic');">중복확인</button>
</span>
</div>
</div>
</div>
<div class="form-group form-row rb-outside">
<label class="col-sm-2 col-form-label">이메일</label>
<div class="col-sm-9">
<div class="input-group">
<input type="email" class="form-control" name="email" placeholder="이메일을 입력해주세요" value="" onchange="sendCheck('rb-emailcheck','email');">
<span class="input-group-append">
<button type="button" class="btn btn-light" id="rb-emailcheck" onclick="sendCheck('rb-emailcheck','email');">중복확인</button>
</span>
</div>
<small class="form-text text-muted">비밀번호 분실시에 사용됩니다. 정확하게 입력하세요.</small>
</div>
</div>
</div>
<div class="modal-footer justify-content-between">
<button type="button" class="btn btn-light" data-dismiss="modal">취소</button>
<button type="submit" class="btn btn-primary">추가하기</button>
</div>
</form>
<form name="actionform" 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="admin_member_add_check">
<input type="hidden" name="type" value="">
<input type="hidden" name="fvalue" value="">
</form>
</div>
</div>
</div>
<!-- bootstrap Validator -->
<?php getImport('bootstrap-validator','dist/css/bootstrapValidator.min',false,'css')?>
<?php getImport('bootstrap-validator','dist/js/bootstrapValidator.min',false,'js')?>
<script>
$(document).ready(function() {
putCookieAlert('admin_admin_result') // 실행결과 알림 메시지 출력
$('#modal-admin-add').on('shown.bs.modal', function () {
var modal = $(this)
modal.find('[name="id"]').trigger('focus')
})
$('[name="procForm"]').bootstrapValidator({
message: '입력사항이 유효하기 않습니다.',
feedbackIcons: {
valid: '',
invalid: 'fa fa-times',
validating: 'fa fa-refresh'
},
fields: {
id: {
validators: {
notEmpty: {
message: '아이디를 입력해주세요.'
},
regexp: {
regexp: /^[a-z0-9]+$/,
message: '4~12자의 영문(소문자)과 숫자만 사용할 수 있습니다.'
}
}
},
pw1: {
message: '비밀번호가 유효하지 않습니다.',
validators: {
notEmpty: {
message: '비밀번호를 입력해주세요'
}
}
},
pw2: {
message: '비밀번호가 유효하지 않습니다.',
validators: {
notEmpty: {
message: '비밀번호를 다시 입력해주세요'
}
}
},
name: {
message: '이름이 유효하지 않습니다.',
validators: {
notEmpty: {
message: '이름(실명)을 입력해주세요'
}
}
},
nic: {
message: '닉네임이 유효하지 않습니다.',
validators: {
notEmpty: {
message: '닉네임을 입력해주세요'
}
}
},
email: {
message: '이메일주소가 유효하지 않습니다.',
validators: {
notEmpty: {
message: '이메일을 입력해주세요'
}
}
},
}
});
});
</script>
<!-- basic -->
<script>
var _admModalUid;
var _admModalMod;
function admIdDrop(uid,mod)
{
_admModalUid = uid;
_admModalMod = mod;
}
var submitFlag = false;
function sendCheck(id,t)
{
var f = document.actionform;
var f1 = document.procForm;
if (submitFlag == true)
{
alert('응답을 기다리는 중입니다. 잠시 기다려 주세요.');
return false;
}
if (eval("f1."+t).value == '')
{
eval("f1."+t).focus();
return false;
}
f.type.value = t;
f.fvalue.value = eval("f1."+t).value;
getId(id).innerHTML = '<i class="fa fa-spinner fa-spin"></i>';
getIframeForAction(f);
f.submit();
submitFlag = true;
}
function saveCheck(f)
{
if (f.pw1.value != f.pw2.value)
{
alert('비밀번호가 서로 일치하지 않습니다.');
return false;
}
getIframeForAction(f);
return true;
}
function actQue(flag,ah)
{
var f = document.listForm;
var l = document.getElementsByName('mbrmembers[]');
var n = l.length;
var i;
var j=0;
if (flag == 'admin_delete')
{
for (i = 0; i < n; i++)
{
if (l[i].checked == true)
{
j++;
}
}
if (!j)
{
alert('회원(관리자)을 선택해 주세요. ');
return false;
}
if (confirm('정말로 실행하시겠습니까? '))
{
getIframeForAction(f);
f.a.value = flag;
f.auth.value = ah;
f.submit();
}
}
return false;
}
function checkboxCheck()
{
var f = document.listForm;
var l = document.getElementsByName('mbrmembers[]');
var n = l.length;
var i;
var j=0;
for (i = 0; i < n; i++)
{
if (l[i].checked == true) j++;
}
if (j) getId('rb-action-btn').disabled = false;
else getId('rb-action-btn').disabled = true;
}
$("#checkAll-admin-user").click(function(){
$(".rb-admin-user").prop("checked",$("#checkAll-admin-user").prop("checked"));
checkboxCheck();
});
$('.rb-modal-admininfo').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=admin&amp;module=admin&amp;front=modal.admininfo&amp;uid=')?>'+_admModalUid+'&amp;tab='+_admModalMod);
});
</script>

View File

@@ -0,0 +1,219 @@
/**
* Nestable
*/
.dd {
position: relative;
display: block;
margin: 0;
padding: 0;
max-width: 600px;
list-style: none;
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;
height: 35px;
margin: 5px 0;
padding: 5px 10px;
color: #333;
text-decoration: none;
font-weight: bold;
border: 1px solid #ddd;
background: #fafafa;
background: -webkit-linear-gradient(top, #fafafa 0%, #eee 100%);
background: -moz-linear-gradient(top, #fafafa 0%, #eee 100%);
background: linear-gradient(top, #fafafa 0%, #eee 100%);
-webkit-border-radius: 3px;
border-radius: 3px;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.dd-handle:hover {
color: #2ea8e5;
background: #fff;
}
.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),
-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),
-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),
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)
}
/**
* Nestable Extras
*/
#nestable-menu {
padding: 0;
margin: 20px 0;
}
#nestable-output,
@media only screen and (min-width: 700px) {
.dd {
float: left;
width: 100%;
}
.dd+.dd {
margin-left: 2%;
}
}
.dd-hover>.dd-handle {
background: #2ea8e5 !important;
}
/**
* Nestable Draggable Handles
*/
.dd3-content {
display: block;
height: 35px;
margin: 5px 0;
line-height: 20px;
padding: 6px 10px 4px 40px;
color: #333;
border: 1px solid #ddd;
background: #eee;
-webkit-border-radius: 3px;
border-radius: 3px;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.dd3-content a {
color: #666
}
.dd3-content:hover {
color: #2ea8e5;
background: #f5f5f5
}
.dd-dragel>.dd3-item>.dd3-content {
margin: 0;
}
.dd3-item>button {
margin-left: 30px;
}
.dd3-handle {
position: absolute;
margin: 0;
left: 0;
top: 0;
cursor: pointer;
width: 30px;
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
border: 1px solid #ddd;
background: #ddd;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
cursor: move
}
.dd-checkbox {
line-height: 28px;
position: absolute;
margin: 0;
right: 0;
top: 0;
width: 30px;
padding: 5px 20px 10px 5px
}
.dd3-handle:before {
font-family: 'FontAwesome';
content: '\f047';
display: block;
position: absolute;
left: 5px;
top: 6px;
text-align: center;
text-indent: 0;
color: #888;
font-size: 18px;
font-weight: normal
}
.dd3-handle:hover {
background: #ddd
}
.panel-footer ul.list-inline {
margin-bottom: 0
}
#bookmark .rb-none {
line-height: 400px;
text-align: center;
color: #999
}

View File

@@ -0,0 +1,117 @@
<div class="container-fluid">
<div id="bookmark" class="row">
<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 rb-icon">
<i class="fa fa-star-o fa-lg fa-fw"></i> 북마크 관리
</div>
<div class="card-body p-2">
<form action="<?php echo $g['s']?>/" method="post" class="rb-form">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="">
<div class="dd" id="nestable-menu">
<ol class="dd-list">
<?php $ADMPAGE = getDbArray($table['s_admpage'],'memberuid='.$my['uid'],'*','gid','asc',0,1)?>
<?php $_i=1;while($R=db_fetch_array($ADMPAGE)):?>
<li class="dd-item dd3-item" data-id="<?php echo $_i?>">
<div class="dd-handle dd3-handle"></div>
<div class="dd3-content"><a href="<?php echo $R['url']?>"><?php echo $R['name']?></a></div>
<div class="dd-checkbox">
<input type="checkbox" class="d-none" name="bookmark_pages_order[]" value="<?php echo $R['uid']?>" checked>
<input type="checkbox" name="bookmark_pages[]" value="<?php echo $R['uid']?>"><i></i>
</div>
</li>
<?php $_i++;endwhile?>
<?php if(!db_num_rows($ADMPAGE)):?>
<li class="rb-none">
등록된 북마크가 없습니다.
</li>
<?php endif?>
</ol>
</div>
</form>
</div>
<div class="card-footer">
<button type="button" class="btn btn-light"<?php if($_i==1):?> disabled<?php endif?> onclick="checkboxChoice('bookmark_pages[]',true);">
전체선택
</button>
<button type="button" class="btn btn-light"<?php if($_i==1):?> disabled<?php endif?> onclick="checkboxChoice('bookmark_pages[]',false);">
전체취소
</button>
<button type="button" class="btn btn-danger"<?php if($_i==1):?> disabled<?php endif?> onclick="actQue('bookmark_delete');">
삭제
</button>
</div>
</div>
</div>
<div class="col-sm-8 col-md-8 ml-sm-auto col-xl-9 pt-3">
<h4>도움말</h4>
<p class="text-">
즐겨찾는 페이지를 상하로 드래그하면 실시간으로 순서가 변경됩니다.<br>
삭제하려면 체크 후 삭제버튼을 클릭해 주세요.<br>
</p>
</div>
</div>
</div>
<!-- nestable : https://github.com/dbushell/Nestable -->
<?php getImport('nestable','jquery.nestable',false,'js') ?>
<script>
$('#nestable-menu').nestable();
$('.dd').on('change', function() {
var f = document.forms[0];
getIframeForAction(f);
f.a.value = 'bookmark_order';
f.submit();
});
</script>
<!-- basic -->
<script>
function actQue(act)
{
var f = document.forms[0];
var l = document.getElementsByName('bookmark_pages[]');
var n = l.length;
var i;
var j=0;
for (i=0; i < n; i++)
{
if (l[i].checked == true)
{
j++;
}
}
if (act == 'bookmark_delete')
{
if (j == 0)
{
alert('삭제할 북마크를 선택해 주세요. ');
}
else
{
if (confirm('정말로 북마크에서 제외하시겠습니까? '))
{
getIframeForAction(f);
f.a.value = act;
f.submit();
}
}
}
}
</script>

View File

@@ -0,0 +1,5 @@
@media (max-width: 1199px) {
.form-horizontal .control-label {
margin-bottom: 5px;
}
}

View File

@@ -0,0 +1,580 @@
<?php include $g['path_module'].$module.'/var/var.version.php'; ?>
<div id="configbox" class="row no-gutters">
<div class="col-sm-3 col-md-3 col-xl-3 d-none d-sm-block sidebar">
<div class="card border-0">
<div class="card-header">
<small class="text-muted">항목</small>
</div>
<div class="list-group list-group-flush" id="list-tab" role="tablist">
<a class="list-group-item d-flex justify-content-between align-items-center list-group-item-action<?php if(!$_SESSION['admin_config_nav'] || $_SESSION['post_config_nav']=='basic'):?> active<?php endif?>" data-toggle="list" href="#basic" role="tab" onclick="sessionSetting('post_config_nav','basic','','');" aria-selected="false">
시스템 환경
</a>
<a class="list-group-item d-flex justify-content-between align-items-center list-group-item-action<?php if($_SESSION['admin_config_nav']=='email'):?> active<?php endif?>" data-toggle="list" href="#email" role="tab" onclick="sessionSetting('post_config_nav','email','','');" aria-selected="true">
이메일 양식
</a>
</div>
</div>
</div><!-- /.sidebar -->
<div class="col-sm-9 col-md-9 ml-sm-auto col-xl-9">
<div class="tab-content pb-5">
<div class="tab-pane <?php if(!$_SESSION['admin_config_nav'] || $_SESSION['admin_config_nav']=='basic'):?> show active<?php endif?>" id="basic">
<div class="card mb-0 border-0 rounded-0 border-bottom-0">
<div class="card-header">
시스템 환경
</div>
<div class="card-body">
<div class="row">
<div class="col-sm-6 mt-4">
<span class=" kf-bi-01" style="font-size: 38px"> </span> <span class="h3 ml-2">Rb <code><?php echo $d['admin']['version']?></code></span>
</div>
<div class="col-sm-6">
<dl class="form-row mt-4 mb-0">
<dt class="col-sm-2">PHP</dt>
<dd class="col-sm-9"><?php echo phpversion()?></dd>
<dt class="col-sm-2">MySQL</dt>
<dd class="col-sm-9"><?php echo db_info()?> (<?php echo $DB['type']?>)</dd>
</dl>
</div>
</div>
</div><!-- /.card-body -->
</div><!-- /.card -->
<form role="form" name="procForm" 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="config">
<input type="hidden" name="act" value="config">
<input type="hidden" name="autosave" value="">
<input type="hidden" name="email" value="<?php echo $d['admin']['email']?>">
<input type="hidden" name="smtp" value="<?php echo $d['admin']['email']?>">
<input type="hidden" name="ftp" value="<?php echo $d['admin']['ftp']?>">
<input type="hidden" name="type" value="">
<input type="hidden" name="chk_email" value="">
<input type="hidden" name="chk_sms" value="">
<div class="card border-left-0 rounded-0 border-bottom-0">
<div class="card-header">
<strong>시스템 메일</strong>
</div>
<div class="card-body">
<div class="form-group">
<label>메일 발송방식</label>
<select name="mailer" class="form-control custom-select">
<option value=""<?php if(!$d['admin']['mailer']):?> selected<?php endif?>>Sendmail</option>
<option value="ses" <?php if($d['admin']['mailer']=='ses'):?> selected<?php endif?>>Amazon Simple Email Service (SES)</option>
</select>
<small class="form-text text-muted"></small>
</div>
<div class="mt-3<?php echo $d['admin']['mailer']=='ses'?'':' d-none' ?>" data-role="mailer-ses">
<div class="form-group row">
<label class="col-sm-2 col-form-label text-sm-right">액세스 키 ID</label>
<div class="col-sm-8">
<input type="text" name="ses_key" value="<?php echo $d['admin']['ses_key'] ?>" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-sm-right">비밀 액세스 키</label>
<div class="col-sm-8">
<input type="text" name="ses_sec" value="<?php echo $d['admin']['ses_sec'] ?>" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-sm-right">리전</label>
<div class="col-sm-8">
<input type="text" name="ses_region" value="<?php echo $d['admin']['ses_region'] ?>" class="form-control">
<small class="form-text text-muted mt-3">
<a href="https://aws.amazon.com/ko/ses/" target="_blank">Amazon Simple Email Service(SES)</a>는 디지털 마케터 및 애플리케이션 개발자가 마케팅, 알림 및 트랜잭션 이메일을 발송하는 데 도움이 되도록 설계된 클라우드 기반 이메일 발송 서비스입니다. 고객과의 소통에 이메일 사용하는 모든 규모의 비즈니스를 위한 안정적이고 비용 효율적인 서비스입니다.
</small>
</div>
</div>
</div>
<div class="form-group">
<label>기본 메일</label>
<div class="input-group">
<input type="email" name="sysmail" value="<?php echo $d['admin']['sysmail']?$d['admin']['sysmail']:$my['email']?>" class="form-control">
<span class="input-group-append">
<button class="btn btn-light" type="button" id="sendmailbtn" onclick="sendCheck(this.id);">
<?php if($d['admin']['email']):?>발송 테스트<?php else:?>이메일 전송확인<?php endif?>
</button>
</span>
</div>
<small class="form-text text-muted">입력한 이메일 주소로 전송이 되면 메일서버가 정상작동되는 상태입니다.</small>
</div>
</div><!-- /.card-body -->
</div><!-- /.card -->
<div class="card border-left-0 rounded-0 border-bottom-0 mt-3">
<div class="card-header">
<strong>시스템 테마 및 고급기능</strong>
</div>
<div class="card-body">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>관리자 테마</label>
<select name="themepc" class="form-control custom-select">
<?php $dirs = opendir($g['dir_module'].'theme')?>
<?php while(false !== ($tpl = readdir($dirs))):?>
<?php if($tpl=='.' || $tpl == '..')continue?>
<option value="<?php echo $tpl?>"<?php if($d['admin']['themepc']==$tpl):?> selected<?php endif?>><?php echo $tpl?></option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="form-group">
<label>관리패널 테마</label>
<select name="pannellink" class="form-control custom-select">
<?php $dirs = opendir($g['path_core'].'engine/adminpanel/theme')?>
<?php while(false !== ($tpl = readdir($dirs))):?>
<?php if($tpl=='.' || $tpl == '..')continue?>
<option value="<?php echo $tpl?>"<?php if($d['admin']['pannellink']==$tpl):?> selected<?php endif?>><?php echo str_replace('.css','',$tpl)?></option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="form-group">
<label>CSS/JS 캐시</label>
<select name="cache_flag" class="form-control custom-select">
<option value=""<?php if($d['admin']['cache_flag']==''):?> selected<?php endif?>>브라우저 설정을 따름</option>
<option value="totime"<?php if($d['admin']['cache_flag']=='totime'):?> selected<?php endif?>>접속시마다 갱신</option>
<option value="nhour"<?php if($d['admin']['cache_flag']=='nhour'):?> selected<?php endif?>>한시간 단위로 갱신</option>
<option value="today"<?php if($d['admin']['cache_flag']=='today'):?> selected<?php endif?>>하루 단위로 갱신</option>
<option value="month"<?php if($d['admin']['cache_flag']=='month'):?> selected<?php endif?>>한달 단위로 갱신</option>
<option value="year"<?php if($d['admin']['cache_flag']=='year'):?> selected<?php endif?>>일년 단위로 갱신</option>
</select>
<small class="form-text text-muted">CSS 나 자바스크립트 파일을 수정했을 경우에는 일정기간 접속시마다 갱신되도록 설정해 주세요.</small>
</div>
<div class="form-group">
<label>제거(Uninstall)</label>
<select name="uninstall" class="form-control custom-select">
<option value=""<?php if(!$d['admin']['uninstall']):?> selected<?php endif?>>출력하지 않음</option>
<option value="1"<?php if($d['admin']['uninstall']):?> selected<?php endif?>>출력함</option>
</select>
<small class="form-text text-muted">
킴스큐는 전체 파일 및 DB 데이터를 일괄 삭제(Uninstall)할 수 있는 도구를 제공합니다. 그러나 매우 유의해야 하는 작업이므로 반드시 필요한 경우에만 출력하여 사용하세요.
</small>
</div>
<div class="form-group">
<label>더블클릭 전환</label>
<select name="dblclick" class="form-control custom-select">
<option value="1"<?php if($d['admin']['dblclick']):?> selected<?php endif?>>사용함</option>
<option value=""<?php if(!$d['admin']['dblclick']):?> selected<?php endif?>>사용안함</option>
</select>
<small class="form-text text-muted">
메뉴,페이지,모듈등의 페이지에서 화면 더블클릭시 관련 콘텍스트 메뉴를 이용해 화면을 전환할 수 있습니다.
</small>
</div>
</div><!-- /.col -->
<div class="col-sm-6">
<div class="form-group">
<label>소스코드 에디터</label>
<select name="codeeidt" class="form-control custom-select">
<option value="">TEXTAREA</option>
<?php $dirs = opendir($g['path_plugin'].'codemirror/'.$d['ov']['codemirror'].'/theme')?>
<?php while(false !== ($tpl = readdir($dirs))):?>
<?php if(substr($tpl,-4)!='.css')continue?>
<?php $_codeedit=str_replace('.css','',$tpl)?>
<option value="<?php echo $_codeedit?>"<?php if($d['admin']['codeeidt']==$_codeedit):?> selected<?php endif?>><?php echo ucfirst($_codeedit)?></option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
<small class="form-text text-muted">
소스코드 편집시 사용할 에디터 테마를 선택해 주세요. <a href="http://codemirror.net/demo/theme.html" target="_blank">테마보기</a>
</small>
</div>
<div class="form-group">
<label>시스템 에디터</label>
<select name="editor" class="form-control custom-select">
<?php $dirs = opendir($g['path_plugin'])?>
<?php while(false !== ($tpl = readdir($dirs))):?>
<?php if(!is_file($g['path_plugin'].$tpl.'/import.system.php'))continue?>
<option value="<?php echo $tpl?>"<?php if($d['admin']['editor']==$tpl):?> selected<?php endif?>><?php echo $tpl?></option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
<small class="form-text text-muted">
시스템 에디터는 플러그인 폴더(%s)에 추가될 수 있습니다. 에디터를 변경하시려면 플러그인에 추가 후 버젼선택 후에 변경해 주세요.
</small>
</div>
<div class="form-group">
<label>시작모듈</label>
<select name="sysmodule" class="form-control custom-select">
<?php $MODULESRCD=getDbArray($table['s_module'],"sys=0 or id='site'",'*','gid','asc',0,1)?>
<?php while($_MDR=db_fetch_array($MODULESRCD)):?>
<option value="<?php echo $_MDR['id']?>"<?php if($d['admin']['sysmodule']==$_MDR['id']):?> selected<?php endif?>><?php echo $_MDR['name']?>(<?php echo $_MDR['id']?>)</option>
<?php endwhile?>
</select>
<small class="form-text text-muted">
킴스큐를 구동시키는 기본 모듈이며 모듈을 지정하지 않고 호출시 이 모듈이 기본모듈로서 구동됩니다. 이 설정은 특별한 경우가 아니면 변경하지 마십시오.
</small>
</div>
<div class="form-group">
<label>시스템 언어</label>
<select name="syslang" class="form-control custom-select">
<option value="DEFAULT" selected="">한국어</option>
</select>
<small class="form-text text-muted">
이 설정을 이용해서 킴스큐 전체의 언어를 제어합니다. 개별 사이트나 모듈에서도 사용할 언어를 지정할 수 있습니다.
</small>
</div>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.card-body -->
</div><!-- /.card -->
<div class="card border-left-0 rounded-0 border-bottom-0">
<div class="card-header">
<strong>FCM</strong> <span class="badge badge-dark ml-1">무료</span>
</div>
<div class="card-body">
<input class="form-control" type="hidden" name="fcm_app_js_src" value="https://www.gstatic.com/firebasejs/5.2.0/firebase-app.js">
<input class="form-control" type="hidden" name="fcm_messaging_js_src" value="https://www.gstatic.com/firebasejs/5.2.0/firebase-messaging.js">
<input class="form-control" type="hidden" name="fcm_icon" value="/_core/images/touch/homescreen-192x192.png">
<div class="form-group row">
<label class="col-lg-2 col-form-label">콘솔</label>
<div class="col-lg-10 col-xl-9 pt-2">
<a href="https://console.firebase.google.com" target="_blank">https://console.firebase.google.com</a>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label pt-3">서버 키</label>
<div class="col-lg-10 col-xl-9">
<textarea class="form-control f13 " name="fcm_key" rows="2"><?php echo $d['admin']['fcm_key'] ?></textarea>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label pt-3">발신자 ID</label>
<div class="col-lg-10 col-xl-9">
<input class="form-control" type="text" name="fcm_SenderId" value="<?php echo $d['admin']['fcm_SenderId'] ?>">
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label pt-3">웹 푸시 인증서</label>
<div class="col-lg-10 col-xl-9">
<input class="form-control" type="text" name="fcm_VAPID" value="<?php echo $d['admin']['fcm_VAPID'] ?>">
<small class="form-text text-muted">키 쌍을 입력하세요.</small>
</div>
</div>
</div><!-- /.card-body -->
<div class="card-footer">
<small class="form-text text-muted">
FCM (Firebase Cloud Messaging)은 클라우드에서 기기로 푸시하는 메시징 서비스로 Google 클라우드 메시징 서비스 입니다.<br>
사용제한 없이 무료로 이용할 수 있습니다.
자세한 내용은 <a href="https://firebase.google.com/docs/cloud-messaging/?hl=ko" target="_blank">여기</a>를 참조해주세요.
</small>
</div>
</div><!-- /.card -->
<div class="card border-left-0 rounded-0 border-bottom-0 mt-5">
<div class="card-header">
<strong>SMS</strong> <span class="badge badge-light ml-1">유료</span>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-lg-2 col-form-label pt-3">SMS 발신번호</label>
<div class="col-lg-10 col-xl-9">
<input class="form-control" type="text" name="sms_tel" value="<?php echo $d['admin']['sms_tel'] ?>" placeholder="SMS 발신번호 등록 후 입력해주세요.">
<small class="form-text text-muted">발신번호등록이 완료된 번호에서만 SMS 발신이 가능합니다. 자세한 내용은 <a href="https://kimsq.com/blog/post/25" target="_blank">여기</a>를 참고해 주세요.</small>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label pt-3">SMS 계정번호</label>
<div class="col-lg-10 col-xl-9">
<input class="form-control" type="text" name="sms_id" value="<?php echo $d['admin']['sms_id'] ?>">
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label pt-3">SMS 계정 인증키</label>
<div class="col-lg-10 col-xl-9">
<input class="form-control" type="text" name="sms_key" value="<?php echo $d['admin']['sms_key'] ?>">
</div>
</div>
<hr>
<div class="form-group row">
<label class="col-lg-2 col-form-label pt-3">발송 테스트</label>
<div class="col-lg-10 col-xl-9">
<div class="input-group">
<input type="tel" name="testsms" value="<?php echo $my['phone']?>" class="form-control" placeholder="휴대폰 번호">
<span class="input-group-append">
<button class="btn btn-light" type="button" id="sendsmsbtn" onclick="sendCheck(this.id);">
<?php if($d['admin']['sms']):?>발송하기<?php else:?>SMS 전송확인<?php endif?>
</button>
</span>
</div>
<small class="form-text text-muted">입력한 휴대폰 번호로 테스트 메시지가 수신되는지 확인해 보세요.</small>
</div>
</div>
</div><!-- /.card-body -->
<div class="card-footer">
<small class="form-text text-muted">
SMS(핸드폰 문자메시지) 유료서비스 이며, 킴스큐 프로젝트 콘솔에서 충전할 수 있습니다. 자세한 내용은 <a href="#" target="_blank">여기</a>를 참조해주세요.
</small>
</div>
</div><!-- /.card -->
<div class="card border-left-0 rounded-0 border-bottom-0 mt-5">
<div class="card-header">
<strong>사이트 코드 제한</strong>
</div>
<div class="card-body">
<div class="form-group">
<label>사용제한 사이트 코드</label>
<textarea class="form-control" name="site_cutid" rows="4"><?php echo $d['admin']['site_cutid']?></textarea>
<small class="form-text text-muted">사용을 제한하려는 아이디를 콤마(,)로 구분해서 입력해 주세요.</small>
</div>
</div>
</div><!-- /.card -->
<div class="px-3">
<button class="mt-3 btn btn-primary btn-block btn-lg" type="submit">설정 저장하기</button>
</div>
</form>
</div><!-- /.tab-pane -->
<div class="tab-pane <?php if($_SESSION['admin_config_nav']=='email'):?> show active<?php endif?>" id="email">
<div class="card border-left-0 rounded-0 border-bottom-0 border-top-0" id="emailTemplate">
<div class="card-header">
<div class="d-flex justify-content-between pt-2 pb-3 border-bottom">
<span>
<i class="fa fa-envelope-o fa-fw"></i> 이메일 양식
</span>
<span class="badge badge-pill badge-dark">시스템 공통</span>
</div>
<ul class="nav nav-tabs card-header-tabs" role="tablist" style="margin-left:-18px">
<li class="nav-item">
<a class="nav-link active py-3" id="email-code-tab" data-toggle="tab" href="#email-code" role="tab" aria-controls="home" aria-selected="true">
<i class="fa fa-code fa-fw" aria-hidden="true"></i>
소스코드
</a>
</li>
<li class="nav-item">
<a class="nav-link py-3" id="email-preview-tab" data-toggle="tab" href="#email-preview" role="tab" aria-controls="profile" aria-selected="false">
<i class="fa fa-eye fa-fw" aria-hidden="true"></i>
미리보기
</a>
</li>
</ul>
</div><!-- /.card-header -->
<div class="card-body tab-content">
<?php
$_email_header = $g['path_module'].$module.'/var/email.header.txt';
$_email_footer = $g['path_module'].$module.'/var/email.footer.txt';
$email_header = implode('',file($g['path_module'].$module.'/var/email.header.txt')); //이메일 헤더 양식
$email_footer = implode('',file($g['path_module'].$module.'/var/email.footer.txt')); // //이메일 풋터 양식
?>
<div class="tab-pane fade show active" id="email-code" role="tabpanel">
<ul class="pl-3 small text-muted">
<li>시스템에서 발송되는 메일에 공통 적용되는 이메일 양식 입니다.</li>
<li>양식에는 다음과 같은 치환문자를 사용할 수 있습니다.</li>
<li>사이트명 : <code>{SITE}</code> / 대표이메일 : <code>{EMAIL_MAIN}</code> / 대표전화 : <code>{TEL_MAIN}</code></li>
</ul>
<form role="form" name="procForm2" 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="email_layout">
<div class="form-group">
<label class="d-flex justify-content-between">헤더 <span class="badge badge-pill badge-dark"><?php echo $_email_header ?></span></label>
<textarea class="form-control f13" id="code_header" name="email_header" rows="18"><?php readfile($_email_header)?></textarea>
</div>
<hr>
<div class="form-group">
<label class="d-flex justify-content-between">풋터 <span class="badge badge-pill badge-dark"><?php echo $_email_footer ?></span></label>
<textarea class="form-control f13" id="code_footer" name="email_footer" rows="18"><?php readfile($_email_footer)?></textarea>
</div>
<button class="mt-3 btn btn-outline-primary btn-block btn-lg" type="submit">메일양식 저장하기</button>
</form>
</div><!-- /.tab-pane -->
<div class="tab-pane fade" id="email-preview" role="tabpanel">
<?php echo $email_header ?>
<div class="text-muted samll">
메일본문이 추가됩니다.
</div>
<?php echo $email_footer ?>
</div><!-- /.tab-pane -->
</div><!-- /.card-body tab-content -->
</div><!-- /.card -->
</div><!-- /.tab-pane -->
</div><!-- /.tab-content -->
</div><!-- /.col -->
</div><!-- /.row -->
<div hidden><iframe name="_autosave_"></iframe></div>
<?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')?>
<!-- basic -->
<script>
putCookieAlert('admin_config_result') // 실행결과 알림 메시지 출력
var submitFlag = false;
function sendCheck(id)
{
if (submitFlag == true)
{
alert('응답을 기다리는 중입니다. 잠시 기다려 주세요.');
return false;
}
var f = document.procForm;
if (id == 'sendmailbtn' || id == 'smtpbtn')
{
if (f.sysmail.value == '')
{
alert('시스템 이메일 주소를 입력해 주세요. ');
f.email.focus();
return false;
}
f.chk_email.value = f.sysmail.value;
}
if (id == 'ftpbtn')
{
if (f.ftp_host.value == '')
{
alert('FTP 서버주소를 입력해 주세요. ');
f.ftp_host.focus();
return false;
}
if (f.ftp_port.value == '')
{
alert('FTP 포트번호를 입력해 주세요. ');
f.ftp_port.focus();
return false;
}
if (f.ftp_user.value == '')
{
alert('FTP 아이디를 입력해 주세요. ');
f.ftp_user.focus();
return false;
}
if (f.ftp_pass.value == '')
{
alert('FTP 암호를 입력해 주세요. ');
f.ftp_pass.focus();
return false;
}
if (f.ftp_rb.value == '')
{
alert('킴스큐 경로를 입력해 주세요. ');
f.ftp_rb.focus();
return false;
}
}
submitFlag = true;
if (id == 'sendsmsbtn') {
f.chk_sms.value = f.sms_tel.value;
f.a.value = 'sms_check';
if (f.testsms.value == '') {
alert('휴대폰 번호를 입력해주세요.');
f.testsms.focus();
var submitFlag = false;
return false;
}
} else {
f.a.value = 'email_check';
}
f.type.value = id;
getId(id).innerHTML = '<i class="fa fa-spinner fa-spin"></i>';
getIframeForAction(f);
f.submit();
}
function ftp_select(obj)
{
if (obj.value == '') obj.form.ftp_port.value = '21';
else obj.form.ftp_port.value = '22';
}
function saveCheck(f)
{
getIframeForAction(f);
}
var editor_html = CodeMirror.fromTextArea(getId('code_header'), {
mode: "text/html",
indentUnit: 2,
lineNumbers: true,
matchBrackets: false,
indentWithTabs: true,
});
var editor_html = CodeMirror.fromTextArea(getId('code_footer'), {
mode: "text/html",
indentUnit: 2,
lineNumbers: true,
matchBrackets: false,
indentWithTabs: true,
});
$('[name="mailer"]').change(function(){
if ($(this).val()=='ses') $('[data-role="mailer-ses"]').removeClass('d-none')
else $('[data-role="mailer-ses"]').addClass('d-none')
});
</script>

View File

@@ -0,0 +1,669 @@
<?php
$tab = $tab ? $tab : 'profile';
$_R1=getUidData($table['s_mbrid'],$uid);
$_R2=getDbData($table['s_mbrdata'],'memberuid='.$_R1['uid'],'*');
$_M=array_merge($_R1,$_R2);
if (!$_M['uid']) exit;
?>
<style>
#rb-body {
background: #fff;
font-family: "Noto Sans KR", sans-serif, 돋움, dotum, sans-serif !important;
}
#rb-body .rb-table-user > tbody > tr:first-child td {
border-top: none;
}
#admin-log .panel {
border: none;
}
#admin-log .panel-heading label {
line-height: 35px
}
#admin-log .panel-heading,
#admin-log .panel-footer {
background-color: transparent;
padding: 10px 0
}
#admin-log .panel-footer .row [class*="col-"] {
margin-top: 10px
}
.nav-tabs .nav-link {
padding: .8rem 2rem;
}
.nav-tabs .nav-link.active {
border-top: 2px solid red;
}
@media (min-width: 768px) {
#admin-log .panel-footer .row {
margin-left: -.5%;
margin-right: -.5%;
}
#admin-log .panel-footer .row [class*="col-"] {
min-height: 1px;
padding-left: .5%;
padding-right: .5%;
padding-top: 10px;
margin-top: 0;
}
}
#admin-log .table th {
font-weight: normal;
border-bottom: 1px solid #222;
color: #777;
text-align: center
}
#admin-log .table td {
font-size: 12px;
text-align: center;
}
#admin-log .table td small {
display: inline-block;
width: 60px;
font-size: 10px;
padding-top: 3px;
padding-bottom: 4px;
}
#admin-log .panel-body .pagination {
margin-bottom: 0
}
#admin-log .table .rb-url {
width: 50px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
-o-text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
}
#admin-log .rb-message {
width: 60%;
}
#admin-log .rb-message span {
display: block;
text-align: left;
}
#admin-log .rb-not-confirm {
font-size: 11px;
}
#admin-log .rb-table-tbody td {
color: #666;
}
#admin-log .rb-none {
text-align: center;
color: #999;
border-bottom: #dfdfdf solid 1px;
padding-bottom: 15px;
margin-bottom: 15px;
}
@media (min-width: 768px) {
#admin-log .panel-heading .row {
margin-left: -.5%;
margin-right: -.5%;
}
#admin-log .panel-heading .row [class*="col-"] {
min-height: 1px;
padding-left: .5%;
padding-right: .5%;
margin-top: 0;
}
#admin-log .panel-heading .row .rb-year {
width: 100px
}
#admin-log .panel-heading .row .rb-month {
width: 90px
}
#admin-log .panel-heading .row .rb-day {
width: 100px
}
}
@media (max-width: 767px) {
#admin-log .panel-heading .row [class*="col-"] {
padding-top: 10px;
}
}
</style>
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link<?php if($tab=='profile'):?> active<?php endif?>" href="<?php echo $g['adm_href']?>&amp;iframe=Y&amp;tab=profile&amp;uid=<?php echo $_M['uid']?>">
프로필
</a>
</li>
<li class="nav-item">
<a class="nav-link<?php if($tab=='info'):?> active<?php endif?>" href="<?php echo $g['adm_href']?>&amp;iframe=Y&amp;tab=info&amp;uid=<?php echo $_M['uid']?>">
정보변경
</a>
</li>
<li class="nav-item">
<a class="nav-link<?php if($tab=='log'):?> active<?php endif?>" href="<?php echo $g['adm_href']?>&amp;iframe=Y&amp;tab=log&amp;uid=<?php echo $_M['uid']?>">
접속기록
</a>
</li>
<?php if($my['uid']==1 && $_M['uid']!=1 && $_M['admin']):?>
<li class="nav-item">
<a class="nav-link<?php if($tab=='perm'):?> active<?php endif?>" href="<?php echo $g['adm_href']?>&amp;iframe=Y&amp;tab=perm&amp;uid=<?php echo $_M['uid']?>">
<i class="kf-module fa-fw"></i> 모듈 제한
</a>
</li>
<?php endif?>
<?php if($my['uid']==1 && $_M['uid']!=1 && !$_M['super'] && $_M['admin']):?>
<li class="nav-item">
<a class="nav-link<?php if($tab=='site'):?> active<?php endif?>" href="<?php echo $g['adm_href']?>&amp;iframe=Y&amp;tab=site&amp;uid=<?php echo $_M['uid']?>">
<i class="fa fa-home fa-lg fa-fw"></i> 사이트 지정
</a>
</li>
<?php endif?>
</ul>
<div class="tab-content p-4">
<div class="tab-pane fade show active">
<?php if($tab=='profile'):?>
<div class="row">
<div class="col-sm-3 col-lg-3 text-center">
<br><br>
<img alt="User Pic" src="<?php echo getAvatarSrc($_M['uid'],'120') ?>" width="120" height="120" class="rounded-circle">
</div>
<div class="col-sm-9 col-lg-9">
<table class="table rb-table-user mb-0">
<tbody>
<tr>
<td>아이디</td>
<td><?php echo $_M['id']?></td>
</tr>
<tr>
<td>이름</td>
<td><?php echo $_M['name']?></td>
</tr>
<tr>
<td>닉네임</td>
<td><?php echo $_M['nic']?></td>
</tr>
<tr>
<td>이메일</td>
<td><a href="mailto:<?php echo $_M['email']?>"><?php echo $_M['email']?></a></td>
</tr>
<tr>
<td>휴대폰</td>
<td><?php echo $_M['phone']?$_M['phone']:($_M['tel']?$_M['tel']:'<small>미등록</small>')?></td>
</tr>
<tr>
<td>최근접속</td>
<td><?php if($_M['last_log']):?><?php echo getDateFormat($_M['last_log'],'Y.m.d H:i')?> (<?php echo sprintf('%d일전',-getRemainDate($_M['last_log']))?>)<?php else:?><small>기록없음</small><?php endif?></td>
</tr>
<tr>
<td>등록일</td>
<td><?php echo getDateFormat($_M['d_regis'],'Y.m.d H:i')?> (<?php echo sprintf('%d일전',-getRemainDate($_M['d_regis']))?>)</td>
</tr>
</tbody>
</table>
</div>
</div>
<?php endif?>
<?php if($tab=='info'):?>
<form name="procForm" class="form-horizontal" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data" onsubmit="return saveCheck(this);">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="admin_member_add">
<input type="hidden" name="id" value="<?php echo $_M['id']?>">
<input type="hidden" name="uid" value="<?php echo $_M['uid']?>">
<input type="hidden" name="avatar" value="<?php echo $_M['photo']?>">
<input type="hidden" name="super" value="<?php echo $_M['super']?>">
<input type="hidden" name="check_id" value="1">
<input type="hidden" name="check_nic" value="1">
<input type="hidden" name="check_email" value="1">
<input type="submit" style="position:absolute;left:-1000px;">
<?php if($my['uid']==1 && $_M['uid']!=1 && $_M['admin']):?>
<div class="form-group form-row">
<label class="col-sm-2 col-form-label">구분</label>
<div class="col-sm-9">
<select name="super" class="form-control custom-select">
<option value="1" <?php echo $_M['super']?'selected':'' ?>>일반 관리자</option>
<option value="0" <?php echo !$_M['super']?'selected':'' ?>>사이트 관리자</option>
</select>
<small class="form-text text-muted mt-2">
일반 관리자 : 전체 사이트 관리 <br>
사이트 관리자 : 특정 사이트 관리 지정가능
</small>
</div>
</div>
<?php endif?>
<div class="form-group form-row">
<label for="inputEmail3" class="col-sm-2 col-form-label">아이디</label>
<div class="col-sm-9">
<input type="text" readonly class="form-control-plaintext" value="<?php echo $_M['id']?>">
</div>
</div>
<div class="form-group form-row">
<label class="col-sm-2 col-form-label">비밀번호</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="pw1" placeholder="">
</div>
</div>
<div class="form-group form-row">
<div class="offset-sm-2 col-sm-9">
<input type="password" class="form-control" name="pw2" placeholder="">
</div>
</div>
<hr>
<div class="form-group form-row">
<label for="inputEmail3" class="col-sm-2 col-form-label">아바타</label>
<div class="col-sm-9">
<div class="media">
<img class="mr-3 rounded-circle" src="<?php echo getAvatarSrc($_M['uid'],'45') ?>" alt="" style="width:45px">
<div class="media-body">
<input type="file" name="upfile" class="hidden" id="rb-upfile-avatar" accept="image/jpg" onchange="getId('rb-photo-btn').innerHTML='이미지 파일 선택됨';">
<button type="button" class="btn btn-light" onclick="$('#rb-upfile-avatar').click();" id="rb-photo-btn">찾아보기</button>
<small class="help-block">
<code>jpg</code> 파일을 등록해주세요.
<?php if($_M['photo']):?> <label>( <input type="checkbox" name="avatar_delete" value="1"> 현재 아바타 삭제 )</label><?php endif?>
</small>
</div>
</div>
</div>
</div>
<div class="form-group form-row">
<label class="col-sm-2 col-form-label">이름</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="name" placeholder="" value="<?php echo $_M['name']?>" maxlength="10">
</div>
</div>
<div class="form-group form-row rb-outside">
<label class="col-sm-2 col-form-label">닉네임</label>
<div class="col-sm-9">
<div class="input-group">
<input type="text" class="form-control" name="nic" placeholder="" value="<?php echo $_M['nic']?>" maxlength="20" onchange="sendCheck('rb-nickcheck','nic');">
<div class="input-group-append">
<button type="button" class="btn btn-light" id="rb-nickcheck" onclick="sendCheck('rb-nickcheck','nic');">중복확인</button>
</div>
</div>
</div>
</div>
<div class="form-group form-row rb-outside">
<label class="col-sm-2 col-form-label">이메일</label>
<div class="col-sm-9">
<div class="input-group">
<input type="email" class="form-control" name="email" placeholder="" value="<?php echo $_M['email']?>" onchange="sendCheck('rb-emailcheck','email');">
<div class="input-group-append">
<button type="button" class="btn btn-light" id="rb-emailcheck" onclick="sendCheck('rb-emailcheck','email');">중복확인</button>
</div>
</div>
<small class="form-text text-muted">비밀번호 분실시에 사용됩니다. 정확하게 입력하세요.</small>
</div>
</div>
<div class="form-group form-row">
<label class="col-sm-2 col-form-label">휴대폰</label>
<div class="col-sm-9">
<input type="tel" class="form-control" name="phone" placeholder="예) 010-000-0000" value="<?php echo $_M['phone']?>">
</div>
</div>
</form>
<form name="actionform" 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="admin_member_add_check">
<input type="hidden" name="type" value="">
<input type="hidden" name="fvalue" value="">
</form>
<?php endif?>
<?php if($tab=='log'):?>
<?php
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 200 ? $recnum : 10;
$sqlque = 'mbruid='.$_M['uid'];
if ($siteuid) $sqlque .= ' and site='.$siteuid;
if ($d_start) $sqlque .= ' and d_regis > '.str_replace('/','',$d_start).'000000';
if ($d_finish) $sqlque .= ' and d_regis < '.str_replace('/','',$d_finish).'240000';
if ($where && $keyw)
{
$sqlque .= getSearchSql($where,$keyw,$ikeyword,'or');
}
$RCD = getDbArray($table['s_referer'],$sqlque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_referer'],$sqlque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div id="admin-log">
<p>
<small><?php echo sprintf('총 %d건',$NUM)?> (<?php echo $p?>/<?php echo $TPG?> page<?php if($TPG>1):?>s<?php endif?>)</small>
</p>
<form name="searchForm" 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="<?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="tab" value="<?php echo $tab?>">
<input type="hidden" name="uid" value="<?php echo $_M['uid']?>">
<input type="hidden" name="p" value="<?php echo $p?>">
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
<div class="panel-heading">
<div class="row well well-sm">
<div class="col-sm-6">
<select name="siteuid" class="form-control custom-select" onchange="this.form.submit();">
<option value="">전체사이트</option>
<?php $SITES = getDbArray($table['s_site'],'','*','gid','asc',0,$p)?>
<?php while($S = db_fetch_array($SITES)):?>
<option value="<?php echo $S['uid']?>"<?php if($S['uid']==$siteuid):?> selected<?php endif?>><?php echo $S['name']?> (<?php echo $S['id']?>)</option>
<?php endwhile?>
</select>
</div>
<div class="col-sm-6">
<div class="input-daterange input-group input-group-sm" id="datepicker">
<input type="text" class="form-control" name="d_start" placeholder="시작일 선택" value="<?php echo $d_start?>">
<span class="input-group-addon">~</span>
<input type="text" class="form-control" name="d_finish" placeholder="종료일 선택" value="<?php echo $d_finish?>">
<span class="input-group-btn">
<button class="btn btn-light" type="submit">기간적용</button>
</span>
</div>
</div>
</div>
</div>
<table class="table table-hover">
<thead>
<tr class="f12 text-muted">
<th>번호</th>
<th>아이피</th>
<th class="rb-url">접속경로</th>
<th>브라우저</th>
<th>기기</th>
<th>날짜</th>
</tr>
</thead>
<tbody>
<?php while($R=db_fetch_array($RCD)):?>
<?php $_browzer=getBrowzer($R['agent'])?>
<?php $_deviceKind=isMobileConnect($R['agent'])?>
<?php $_deviceType=getDeviceKind($R['agent'],$_deviceKind)?>
<tr>
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
<td><?php echo $R['ip']?></td>
<td class="rb-url"><a href="<?php echo $R['referer']?>" target="_blank"><?php echo getDomain($R['referer'])?></a></td>
<td><?php echo strtoupper($_browzer)?></td>
<td>
<?php if($_browzer=='Mobile'):?>
<small class="badge badge-<?php echo $_deviceType=='tablet'?'danger':'warning'?>" data-tooltip="tooltip" title="<?php echo $_deviceKind?>"><?php echo $_deviceType?></small>
<?php else:?>
<small class="badge badge-dark">DESKTOP</small>
<?php endif?>
</td>
<td class="rb-update">
<time class="timeago" data-toggle="tooltip" datetime="<?php echo getDateFormat($R['d_regis'],'c')?>" data-tooltip="tooltip" title="<?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?>"></time>
</td>
</tr>
<?php endwhile?>
</tbody>
</table>
<?php if(!$NUM):?>
<div class="py-4 text-center">접속기록이 없습니다.</div>
<?php endif?>
<nav>
<ul class="pagination justify-content-center">
<script type="text/javascript">getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
<?php //echo getPageLink(5,$p,$TPG,'')?>
</ul>
</nav>
<div class="input-group mt-4">
<div class="input-group-prepend">
<select name="where" class="form-control custom-select">
<option<?php if($where=='ip'):?> selected<?php endif?> value="ip">아이피</option>
<option<?php if($where=='referer'):?> selected<?php endif?> value="referer">접속경로</option>
</select>
</div>
<input type="text" name="keyw" class="form-control" placeholder="검색어를 입력해주세요" value="<?php echo $keyw?>" >
<div class="input-group-append">
<button class="btn btn-light" type="submit"><i class="fa fa-search"></i>검색</button>
</div>
<div class="input-group-append">
<button class="btn btn-light" type="button" onclick="this.form.keyw.value='';this.form.submit();">리셋</button>
</div>
</div>
</form>
</div>
<!-- bootstrap-datepicker, http://eternicode.github.io/bootstrap-datepicker/ -->
<?php getImport('bootstrap-datepicker','css/datepicker3',false,'css')?>
<?php getImport('bootstrap-datepicker','js/bootstrap-datepicker',false,'js')?>
<?php getImport('bootstrap-datepicker','js/locales/bootstrap-datepicker.kr',false,'js')?>
<style type="text/css">
.datepicker {z-index: 1151 !important;}
</style>
<script>
$('.input-daterange').datepicker({
format: "yyyy/mm/dd",
todayBtn: "linked",
language: "kr",
calendarWeeks: true,
todayHighlight: true,
autoclose: true
});
</script>
<!-- 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-update time").timeago();
});
</script>
<?php endif?>
<?php if($tab=='perm'):?>
<form name="permForm" action="<?php echo $g['s']?>/" method="post" onsubmit="return saveCheck1();">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="admin_perm">
<input type="hidden" name="memberuid" value="<?php echo $_M['uid']?>">
<input type="submit" style="position:absolute;left:-1000px;">
<div class="">
<div class="clearfix">
<div class="pull-left">
<i class="fa fa-warning fa-fw text-danger"></i>
<span class="text-danger">접근을 제한할 모듈</span>을 선택해 주세요.
</div>
<div class="pull-right">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="checkAll-perm">
<label class="custom-control-label" for="checkAll-perm">전체선택</label>
</div>
</div>
</div>
<hr>
<div class="py-4" style="min-height: 200px">
<?php $MODULES = getDbArray($table['s_module'],'','*','gid','asc',0,1)?>
<?php while($_MD=db_fetch_array($MODULES)):?>
<div class="custom-control custom-checkbox custom-control-inline" style="min-width: 100px">
<input type="checkbox" class="custom-control-input rb-module-perm" id="module_members_<?php echo $_MD['id']?>" name="module_members[]" value="<?php echo $_MD['id']?>"<?php if(strpos('_'.$_M['adm_view'],'['.$_MD['id'].']')):?> checked<?php endif?>>
<label class="custom-control-label" for="module_members_<?php echo $_MD['id']?>"><?php echo $_MD['name']?></label>
</div>
<?php endwhile?>
</div>
</div>
</form>
<?php endif?>
<?php if($tab=='site'):?>
<form name="permForm" action="<?php echo $g['s']?>/" method="post" onsubmit="return saveCheck1();">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="admin_site">
<input type="hidden" name="memberuid" value="<?php echo $_M['uid']?>">
<input type="submit" style="position:absolute;left:-1000px;">
<div class="">
<div class="clearfix">
<div class="pull-left">
<span class="text-success">관리를 허용할 사이트</span>를 지정해 주세요.
</div>
<div class="pull-right">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="checkAll-site">
<label class="custom-control-label" for="checkAll-site">전체선택</label>
</div>
</div>
</div>
<hr>
<div class="py-4" style="min-height: 200px">
<?php $SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1)?>
<?php while($_SD=db_fetch_array($SITES)):?>
<div class="custom-control custom-checkbox custom-control-inline" style="min-width: 100px">
<input type="checkbox" class="custom-control-input rb-site-perm" id="module_members_<?php echo $_SD['id']?>" name="module_members[]" value="<?php echo $_SD['uid']?>"<?php if(strpos('_'.$_M['adm_site'],'['.$_SD['uid'].']')):?> checked<?php endif?>>
<label class="custom-control-label" for="module_members_<?php echo $_SD['id']?>"><?php echo $_SD['label']?></label>
</div>
<?php endwhile?>
</div>
</div>
</form>
<?php endif?>
</div>
</div>
<!-- @부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴 -->
<div id="_modal_header" hidden>
<h5 class="modal-title">
<small class="badge badge-<?php echo $_M['now_log']?'primary':'secondary'?> d-inline-block align-top mr-2" data-tooltip="tooltip" title="<?php echo $_M['now_log']?'온라인':'오프라인'?>">
<?php echo $_M['admin']?($_M['adm_view']?($_M['super']?'부관리자':'사이트관리자'):'최고관리자'):'일반회원'?>
</small>
<?php echo sprintf('<strong>%s</strong> 님의 정보',$_M['name'])?>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div id="_modal_footer" hidden>
<?php if($tab=='info'):?>
<button type="submit" class="btn btn-outline-primary" onclick="frames._modal_iframe_modal_window.saveCheck();">정보 수정</button>
<?php endif?>
<?php if($tab=='perm'):?>
<button type="submit" class="btn btn-outline-primary" onclick="frames._modal_iframe_modal_window.saveCheck1();">권한 제한</button>
<?php endif?>
<?php if($tab=='site'):?>
<button type="submit" class="btn btn-outline-primary" onclick="frames._modal_iframe_modal_window.saveCheck1();">사이트 관리자로 지정</button>
<?php endif?>
<button id="_close_btn_" type="button" class="btn btn-light" data-dismiss="modal">닫기</button>
</div>
<script>
putCookieAlert('admin_admin_result') // 실행결과 알림 메시지 출력
$("#checkAll-perm").click(function(){
$(".rb-module-perm").prop("checked",$("#checkAll-perm").prop("checked"))
})
$("#checkAll-site").click(function(){
$(".rb-site-perm").prop("checked",$("#checkAll-site").prop("checked"))
})
var submitFlag = false;
function sendCheck(id,t)
{
var f = document.actionform;
var f1 = document.procForm;
if (submitFlag == true)
{
alert('응답을 기다리는 중입니다. 잠시 기다려 주세요.');
return false;
}
if (eval("f1."+t).value == '')
{
eval("f1."+t).focus();
return false;
}
f.type.value = t;
f.fvalue.value = eval("f1."+t).value;
getId(id).innerHTML = '<i class="fa fa-spinner fa-spin"></i>';
getIframeForAction(f);
f.submit();
submitFlag = true;
}
function saveCheck()
{
var f = document.procForm;
if (f.pw1.value != f.pw2.value)
{
alert('비밀번호가 서로 일치하지 않습니다. ');
return false;
}
if (f.name.value == '')
{
alert('이름을 입력해 주세요. ');
f.name.focus();
return false;
}
if (f.nic.value == '')
{
alert('닉네임을 입력해 주세요. ');
f.nic.focus();
return false;
}
if (f.email.value == '')
{
alert('이메일을 입력해 주세요. ');
f.email.focus();
return false;
}
getIframeForAction(f);
f.submit();
}
function saveCheck1()
{
var f = document.permForm;
getIframeForAction(f);
f.submit();
}
function modalSetting()
{
var ht = document.body.scrollHeight - 1;
var _modal_header = $('#_modal_header').html()
var _modal_footer = $('#_modal_footer').html()
parent.$('#modal_window_dialog_modal_window').css('width','100%').css('max-width','900px')
parent.$('#_modal_iframe_modal_window').css('height',ht+'px')
parent.$('#_modal_body_modal_window').css('height',ht+'px').css('padding','0')
parent.$('#_modal_header_modal_window').html(_modal_header).addClass('modal-header')
parent.$('#_modal_footer_modal_window').html(_modal_footer).addClass('modal-footer justify-content-between')
}
document.body.onresize = document.body.onload = function()
{
setTimeout("modalSetting();",100);
setTimeout("modalSetting();",200);
}
</script>

View File

@@ -0,0 +1,338 @@
<div id="bookmark" class="xrow">
<form action="<?php echo $g['s']?>/" method="post" class="rb-form">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="">
<div class="dd" id="nestable-menu">
<ol class="dd-list">
<?php $ADMPAGE = getDbArray($table['s_admpage'],'memberuid='.$my['uid'],'*','gid','asc',0,1)?>
<?php $_i=1;while($R=db_fetch_array($ADMPAGE)):?>
<li class="dd-item dd3-item" data-id="<?php echo $_i?>">
<div class="dd-handle dd3-handle"></div>
<div class="dd3-content"><a href="<?php echo $R['url']?>"><?php echo $R['name']?></a></div>
<div class="dd-checkbox">
<input type="checkbox" class="hidden" name="bookmark_pages_order[]" value="<?php echo $R['uid']?>" checked>
<input type="checkbox" name="bookmark_pages[]" value="<?php echo $R['uid']?>"><i></i>
</div>
</li>
<?php $_i++;endwhile?>
<?php if(!db_num_rows($ADMPAGE)):?>
<li class="rb-none">
등록된 북마크가 없습니다.
</li>
<?php endif?>
</ol>
</div>
</form>
</div>
<!-- nestable : https://github.com/dbushell/Nestable -->
<?php getImport('nestable','jquery.nestable',false,'js') ?>
<script>
$('#nestable-menu').nestable();
$('.dd').on('change', function() {
var f = document.forms[0];
getIframeForAction(f);
f.a.value = 'bookmark_order';
f.submit();
});
</script>
<!-- basic -->
<script>
function actQue(act)
{
var f = document.forms[0];
var l = document.getElementsByName('bookmark_pages[]');
var n = l.length;
var i;
var j=0;
for (i=0; i < n; i++)
{
if (l[i].checked == true)
{
j++;
}
}
if (act == 'bookmark_delete')
{
if (j == 0)
{
alert('삭제할 북마크를 선택해 주세요. ');
}
else
{
if (confirm('정말로 북마크에서 제외하시겠습니까? '))
{
getIframeForAction(f);
f.a.value = act;
f.submit();
}
}
}
}
</script>
<!-- @부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴 -->
<div id="_modal_header" hidden>
<h5 class="modal-title"><i class="fa fa-star-o fa-lg"></i> 북마크 관리</h5>
<button aria-hidden="true" data-dismiss="modal" class="close" type="button">&times;</button>
</div>
<div id="_modal_footer" hidden>
<button type="button" class="btn btn-light"<?php if($_i==1):?> disabled<?php endif?> onclick="frames._modal_iframe_modal_window.checkboxChoice('bookmark_pages[]',true);">
전체선택
</button>
<button type="button" class="btn btn-light"<?php if($_i==1):?> disabled<?php endif?> onclick="frames._modal_iframe_modal_window.checkboxChoice('bookmark_pages[]',false);">
전체취소
</button>
<button type="button" class="btn btn-light"<?php if($_i==1):?> disabled<?php endif?> onclick="frames._modal_iframe_modal_window.actQue('bookmark_delete');">
삭제
</button>
</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 = '400px';
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';
}
document.body.onresize = document.body.onload = function()
{
setTimeout("modalSetting();",100);
setTimeout("modalSetting();",200);
}
</script>
<style>
#rb-body {
background: #ffffff;
}
.xrow {
padding:0 10px 0 10px;
margin: 0;
}
/**
* Nestable
*/
.dd {
position: relative;
display: block;
margin: 0;
padding: 0;
max-width: 600px;
list-style: none;
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;
height: 35px;
margin: 5px 0;
padding: 5px 10px;
color: #333;
text-decoration: none;
font-weight: bold;
border: 1px solid #ddd;
background: #fafafa;
background: -webkit-linear-gradient(top, #fafafa 0%, #eee 100%);
background: -moz-linear-gradient(top, #fafafa 0%, #eee 100%);
background: linear-gradient(top, #fafafa 0%, #eee 100%);
-webkit-border-radius: 3px;
border-radius: 3px;
box-sizing: border-box; -moz-box-sizing: border-box;
}
.dd-handle:hover { color: #2ea8e5; background: #fff; }
.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),
-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),
-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),
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)
}
/**
* Nestable Extras
*/
#nestable-menu { padding: 0; margin: 20px 0; }
#nestable-output,
@media only screen and (min-width: 700px) {
.dd { float: left; width: 100%; }
.dd + .dd { margin-left: 2%; }
}
.dd-hover > .dd-handle { background: #2ea8e5 !important; }
/**
* Nestable Draggable Handles
*/
.dd3-content {
display: block;
height: 35px;
margin: 5px 0;
line-height: 20px;
padding: 6px 10px 4px 40px;
color: #333;
border: 1px solid #ddd;
background: #eee;
-webkit-border-radius: 3px;
border-radius: 3px;
box-sizing: border-box; -moz-box-sizing: border-box;
}
.dd3-content a {
color: #666
}
.dd3-content:hover {
color: #2ea8e5;
background: #f5f5f5
}
.dd-dragel > .dd3-item > .dd3-content { margin: 0; }
.dd3-item > button { margin-left: 30px; }
.dd3-handle {
position: absolute;
margin: 0;
left: 0;
top: 0;
cursor: pointer;
width: 30px;
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
border: 1px solid #ddd;
background: #ddd;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
cursor: move
}
.dd-checkbox {
line-height: 28px;
position: absolute;
margin: 0;
right: 0;
top: 0;
width: 30px;
padding: 5px 20px 10px 5px
}
.dd3-handle:before {
font-family: 'FontAwesome';
content: '\f047';
display: block;
position: absolute;
left: 5px;
top: 6px;
text-align: center;
text-indent: 0;
color: #888;
font-size: 18px;
font-weight: normal
}
.dd3-handle:hover {
background: #ddd
}
.panel-footer ul.list-inline {
margin-bottom: 0
}
#bookmark .rb-none {
line-height: 300px;
text-align: center;
color: #999
}
</style>

View File

@@ -0,0 +1,65 @@
#plugins .checkbox {
margin: 0
}
#plugins td {
vertical-align: middle;
}
.rb-files .rb-check {
width: 20px;
padding: 8px 5px 8px 15px;
}
.rb-files table {
color: #888;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
border-radius: 3px;
font-size: 13px;
margin-bottom: 0;
}
.rb-files .table>thead>tr>th {
border-bottom: 0;
height: 35px;
}
.rb-files table th,
.rb-files table td {
text-align: left;
padding: 8px 15px;
}
.bottom-action .btn-toolbar {
margin: 15px 0;
}
.bottom-action .pagination {
margin: 15px 0;
}
.rb-files .rb-version select {
font-weight: bold;
}
@media (max-width: 767px) {
#plugins .rb-check,
#plugins .rb-size,
#plugins .rb-update {
display: none;
}
#plugins .rb-files {
border: 0;
padding: 0;
}
#plugins .btn-primary {
width: 100%;
height: 40px;
}
}

View File

@@ -0,0 +1,180 @@
<?php
function getOpenSrcList()
{
global $g;
$incs = array();
$dirh = opendir($g['path_plugin']);
while(false !== ($folder = readdir($dirh)))
{
if($folder == '.' || $folder == '..') continue;
$incs[] = $folder;
}
closedir($dirh);
return $incs;
}
function _DirSizeNum($file)
{
$sfile = $file.'/size.txt';
if (is_file($sfile))
{
$info = explode(',',implode('',file($sfile)));
$plugin = array();
$plugin['size'] = $info[0];
$plugin['num'] = $info[1];
return $plugin;
}
else {
$plugin = DirSizeNum($file);
$fp = fopen($sfile,'w');
fwrite($fp,$plugin['size'].','.$plugin['num']);
fclose($fp);
@chmod($sfile,0707);
return $plugin;
}
}
$_openSrcs = getOpenSrcList();
$_openSrcn = count($_openSrcs);
include $g['path_core'].'function/dir.func.php';
?>
<div id="plugins" class="p-4">
<h4><?php echo sprintf('플러그인 <span>(총 %d개 / <span id="_sum_size_"></span>)</span>',$_openSrcn)?></h4>
<form name="pluginForm" action="<?php echo $g['s']?>/" method="post" class="rb-form" 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="plugin_config">
<input type="hidden" name="isdelete" value="">
<div class="rb-files table-responsive">
<table class="table table-condensed">
<thead>
<tr>
<th class="rb-check"></th>
<th class="rb-name">플러그인명</th>
<th class="rb-size">용량(파일수)</th>
<th class="rb-update">등록일</th>
<th class="rb-version">적용버전</th>
</tr>
</thead>
<tbody>
<?php $_sumPluginsSize=0?>
<?php foreach($_openSrcs as $_key_):?>
<?php $plCtime = filectime($g['path_plugin'].$_key_)?>
<?php $plugins = _DirSizeNum($g['path_plugin'].$_key_)?>
<?php $_sumPluginsSize+=$plugins['size']?>
<tr>
<td class="rb-check">
<label class="form-check mt-2">
<input type="checkbox" class="form-check-input position-static" name="pluginmembers[]" value="<?php echo $_key_?>">
</label>
</td>
<td class="rb-name"><i class="fa fa-folder fa-lg"></i> &nbsp;<a><?php echo $_key_?></a></td>
<td class="rb-size"><?php echo getSizeFormat($plugins['size'],1)?> (<?php echo $plugins['num']?>)</td>
<td class="rb-update">
<time class="timeago" data-toggle="tooltip" datetime="<?php echo date('c',$plCtime)?>" data-tooltip="tooltip" title="<?php echo date('Y.m.d H:i',$plCtime)?>"></time>
</td>
<td class="rb-version">
<select name="ov[<?php echo $_key_?>]" class="form-control custom-select">
<?php $incs = array()?>
<?php $dirh = opendir($g['path_plugin'].$_key_)?>
<?php while(false !== ($version = readdir($dirh))):?>
<?php if($version=='.'||$version=='..')continue?>
<?php if(!strstr($version,'.') || !is_dir($g['path_plugin'].$_key_.'/'.$version)) continue?>
<option value="<?php echo $version?>"<?php if($version==$d['ov'][$_key_]):?> selected="selected"<?php endif?>><?php echo $version?></option>
<?php endwhile?>
<?php closedir($dirh)?>
</select>
</td>
</tr>
<?php endforeach?>
</tbody>
</table>
</div>
<div class="bottom-action my-4">
<div class="btn-group" role="toolbar">
<button type="button" class="btn btn-danger" onclick="deletePlugin('<?php echo $_key_?>','1');"><i class="fa fa-trash-o fa-lg"></i> 전체삭제</button>
<button type="button" class="btn btn-danger" onclick="deletePlugin('<?php echo $_key_?>','2');"><i class="fa fa-trash-o fa-lg"></i> 버전삭제</button>
<button type="button" class="btn btn-default rb-modal-add-plugin" data-toggle="modal" data-target="#modal_window"><i class="fa fa-upload fa-lg"></i> 플러그인 추가</button>
<button type="submit" class="btn btn-primary pull-right rb-resave"><i class="fa fa-check fa-fw"></i> 버전변경</button>
</div>
</div>
</form>
<div class="bg-light border rounded p-3 text-muted">
킴스큐에서는 오픈소스로 제공되는 다양한 외부 플러그인들이 사용되고 있습니다.<br>
현재 사용되고 있는 플러그인들의 최신버젼이나 최적화된 버젼을 동적으로 설정할 수 있습니다.<br>
<span class="hidden-xs">삽입코드 예시 <code> &lt;?php getImport('bootstrap-validator','dist/css/bootstrapValidator.min',false,'css') ?&gt;</code></span>
</div>
</div>
<!-- timeago -->
<?php getImport('jquery-timeago','jquery.timeago',false,'js')?>
<?php getImport('jquery-timeago','locales/jquery.timeago.'.$lang['admin']['time1'],false,'js')?>
<script>
jQuery(document).ready(function() {
$(".rb-update time").timeago();
});
$(document).ready(function()
{
$('.rb-modal-add-plugin').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=admin&amp;module=market&amp;front=modal.add&amp;addType=plugin&amp;reload=Y')?>');
});
});
</script>
<script>
function deletePlugin(plugin,type)
{
var f = document.pluginForm;
var l = document.getElementsByName('pluginmembers[]');
var n = l.length;
var i;
var j=0;
for (i=0; i < n; i++)
{
if (l[i].checked == true)
{
j++;
}
}
if (j == 0)
{
alert('삭제할 플러그인을 선택해 주세요. ');
return false;
}
if (confirm('사용중인 플러그인을 삭제하면 사이트에 오류가 발생할 수 있습니다.\n그래도 삭제하시겠습니까? '))
{
getIframeForAction(f);
f.isdelete.value = type;
f.submit();
}
return false;
}
function saveCheck(f)
{
if(confirm('정말로 실행하시겠습니까? '))
{
getIframeForAction(f);
return true;
}
return false;
}
function saveCheck1()
{
var f = document.pluginForm;
getIframeForAction(f);
f.submit();
}
getId('_sum_size_').innerHTML = '<?php echo getSizeFormat($_sumPluginsSize,2)?>';
<?php if($resave=='Y'):?>
setTimeout("saveCheck1();",100);
<?php endif?>
</script>

View File

@@ -0,0 +1,5 @@
@media (max-width: 1199px) {
.form-horizontal .control-label {
margin-bottom: 5px;
}
}

View File

@@ -0,0 +1,48 @@
<div id="configbox" class="p-4">
<form class="form-horizontal" role="form" name="sendForm" action="<?php echo $g['s']?>/" method="post" onsubmit="return sslCheck(this);">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="config">
<input type="hidden" name="act" value="security">
<h3>보안설정</h3>
<div class="form-group row">
<label class="col-md-2 col-form-label">에디터 허용태그</label>
<div class="col-md-9">
<textarea class="form-control" name="secu_tags" rows="15"><?php echo $d['admin']['secu_tags']?></textarea>
<small class="form-text text-muted">
허용할 태그를 콤마(,)로 구분해서 등록해 주세요.<br>
특정태그를 허용하게 되면 XSS(Cross-site scripting, 크로스 사이트 스크립팅) 나 CSRF(Cross Site Request Forgery, 크로스 사이트 요청 변조)공격을 받을 수 있으므로 주의해야 합니다.
</small>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">파라미터 공격차단</label>
<div class="col-md-9">
<input type="text" class="form-control" name="secu_param" value="<?php echo $d['admin']['secu_param']?>" placeholder="">
<small class="form-text text-muted">
특정 파라미터를 이용하여 액션을 요청하거나 공격할 경우 제한할 패턴을 등록해 주세요.<br>
보기) ;a=,&amp;a=,?a=,m=admin,system=
</small>
</div>
</div>
<hr>
<button class="btn btn-outline-primary btn-block btn-lg" type="submit">정보변경</button>
</form>
</div>
<script>
putCookieAlert('admin_config_result') // 실행결과 알림 메시지 출력
function sslCheck(f) {
getIframeForAction(f);
return confirm('정말로 실행하시겠습니까? ');
}
</script>

169
modules/admin/admin/seo.css Normal file
View File

@@ -0,0 +1,169 @@
#seo-setting .rb-codeview {
margin-top: 20px;
border: 1px solid #ddd;
border-bottom: 1px solid #ccc;
border-radius: 3px;
font-family: Consolas, "Liberation Mono", Courier, monospace;
margin-bottom: 1em;
border-radius: 4px
}
#seo-setting textarea {
overflow: auto;
border: #ffffff solid 1px;
padding: 15px;
line-height: 150%;
width: 100%;
height: 600px;
background: #000000;
color: #ffffff;
font-size: 13px;
border-radius: 4px
}
#seo-setting .rb-submit {
margin: 15px 0
}
.rb-codeview pre {
margin: 0em;
}
.rb-codeview .prettyprint {
border: 0em;
}
.rb-codeview ol.linenums {
margin: 0em;
}
.rb-codeview .rb-meta {
font: 12px "Helvetica Neue", Helvetica, arial, freesans, clean, sans-serif;
border-top: 1px solid #ddd;
text-shadow: 1px 1px rgba(255, 255, 255, 0.8);
overflow: hidden;
color: #999;
padding: 10px;
background-color: #e8e8e8;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#e8e8e8));
background-image: -webkit-linear-gradient(#fafafa, #e8e8e8);
background-image: linear-gradient(#fafafa, #e8e8e8);
background-repeat: repeat-x;
}
/* Pretty printing styles. Used with prettify.js.
*
* This version is slight modified based on the original version.
*
* Name: Stanley Ng
* Email: stanleyhlng@googlegroups.com
*
* Reference:
* http://code.google.com/p/google-code-prettify/source/browse/trunk/src/prettify.css
*/
.pln {
color: #48484C;
}
.str {
color: #DD1144;
}
.kwd {
color: #1E347B;
}
.com {
color: #93A1A1;
}
.typ {
color: teal;
}
.lit {
color: #195F91;
}
.pun {
color: #93A1A1;
}
.opn {
color: #93A1A1;
}
.clo {
color: #93A1A1;
}
.tag {
color: #008;
}
.atn {
color: teal;
}
.atv {
color: #DD1144;
}
.dec {
color: teal;
}
.var {
color: teal;
}
.fun {
color: #DC322F;
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
background-color: #F7F7F9;
padding: 10px;
border: 1px solid #E1E1E8;
}
pre.prettyprint.linenums {
box-shadow: 40px 0 0 #FBFBFC inset, 41px 0 0 #ECECF0 inset;
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
color: #1E347B;
margin: 0 0 0 40px;
}
ol.linenums li {
color: #BEBEC5;
line-height: 18px;
padding-left: 12px;
text-shadow: 0 1px 0 #FFFFFF;
}
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: normal;
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: transparent;
}

258
modules/admin/admin/seo.php Normal file
View File

@@ -0,0 +1,258 @@
<div id="seo-setting" class="container-fluid">
<div class="row">
<nav class="col-sm-4 col-md-3 col-xl-2 d-none d-sm-block sidebar">
<div class="card">
<div class="card-header">
메뉴
</div>
<div class="list-group" id="list-tab" role="tablist">
<a class="list-group-item list-group-item-action<?php if(!$_SESSION['sh_admin_seo']||$_SESSION['sh_admin_seo']=='robots'):?> active<?php endif?>" data-toggle="list" href="#robots" role="tab" aria-selected="true" onclick="sessionSetting('sh_admin_seo','robots','','');">
<i class="fa fa-code fa-lg pull-right"></i> Robots.txt
</a>
<a class="list-group-item list-group-item-action<?php if($_SESSION['sh_admin_seo']=='rewrite'):?> active<?php endif?>" data-toggle="list" href="#rewrite" role="tab" onclick="sessionSetting('sh_admin_seo','rewrite','','');">
<i class="fa fa-code fa-lg pull-right"></i> URL rewrite
</a>
<a class="list-group-item list-group-item-action<?php if($_SESSION['sh_admin_seo']=='sitemap'):?> active<?php endif?>" data-toggle="list" href="#sitemap" role="tab" onclick="sessionSetting('sh_admin_seo','sitemap','','');">
<i class="fa fa-code fa-lg pull-right"></i> Sitemap.xml
</a>
<a class="list-group-item list-group-item-action<?php if($_SESSION['sh_admin_seo']=='errorpage'):?> active<?php endif?>" data-toggle="list" href="#error" role="tab" onclick="sessionSetting('sh_admin_seo','errorpage','','');">
<i class="fa fa-file-text-o fa-lg pull-right"></i> Error Page
</a>
<a class="list-group-item list-group-item-action<?php if($_SESSION['sh_admin_seo']=='redirect'):?> active<?php endif?>" data-toggle="list" href="#301" role="tab" onclick="sessionSetting('sh_admin_seo','redirect','','');">
<i class="fa fa-file-text-o fa-lg pull-right"></i> Redirect
</a>
</div>
</div>
</nav>
<div class="col-sm-8 col-md-9 ml-sm-auto col-xl-10 pt-3">
<div class="tab-content">
<div class="tab-pane<?php if(!$_SESSION['sh_admin_seo'] || $_SESSION['sh_admin_seo']=='robots'):?> active in<?php endif?>" id="robots">
<h3>robots.txt 설정</h3>
<form class="rb-form" role="form" name="sendForm" 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="seo">
<input type="hidden" name="act" value="robots">
<div class="bg-light rounded p-3 text-muted">
<small>robots.txt 파일은 크롤러 소프트웨어(: Googlebot) 사이트의 특정 페이지를 크롤링하지 못하도록 하는 텍스트 파일입니다.<br>
파일은 기본적으로 Allow와 Disallow와 같은 명령어 목록으로 구성되어 크롤러가 검색할 있는 URL과 검색할 없는 URL을 지정합니다.
<a href="https://support.google.com/webmasters/answer/6062608?hl=ko" target="_blank">더보기</a></small>
</div>
<div class="rb-codeview">
<?php if(is_file($_SERVER['DOCUMENT_ROOT'].'/robots.txt')):?>
<textarea name="robotstxt" class="form-control" rows="15"><?php readfile($_SERVER['DOCUMENT_ROOT'].'/robots.txt')?></textarea>
<?php else:?>
<textarea name="robotstxt" class="form-control" rows="15" onclick="this.value=getId('robotstxt').innerHTML;">
robots.txt 파일은 서버의 홈디렉토리 안에 위치해야 합니다.
여기를 클릭하면 기본값을 불러옵니다.
킴스큐 설치시 기본폴더명인 rb 를 다른이름으로 변경했을 경우 변경된 이름으로 수정해 주세요.
rb 폴더를 사용하지 않고 설치하셨을 경우 경로중 /rb 를 제거해 주세요.
</textarea>
<div id="robotstxt" class="hidden"><?php readfile('./robots.txt')?></div>
<?php endif?>
<div class="rb-meta">
<?php if(is_file($_SERVER['DOCUMENT_ROOT'].'/robots.txt')):?>
파일위치 : /robots.txt
<code><?php echo getSizeFormat(filesize($_SERVER['DOCUMENT_ROOT'].'/robots.txt'),2)?></code>
<?php endif?>
<span class="pull-right">파일을 편집한 후 저장 버튼을 클릭하면 실시간으로 사용자 페이지에 적용됩니다.</span>
</div>
</div>
<div class="form-row mt-4">
<div class="col">
<?php if(is_file($_SERVER['DOCUMENT_ROOT'].'/robots.txt')):?>
<a class="btn btn-outline-light btn-block" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $module?>&amp;a=seo&amp;act=robots_delete" onclick="return hrefCheck(this,true,'정말로 삭제하시겠습니까?');">삭제하기</a>
<?php endif?>
</div>
<div class="col">
<button type="submit" class="btn btn-outline-primary btn-block btn-lg<?php if($g['device']):?> btn-block<?php endif?>">저장하기</button>
</div>
</div>
</form>
</div>
<div class="tab-pane<?php if($_SESSION['sh_admin_seo']=='rewrite'):?> active in<?php endif?>" id="rewrite">
<h3>URL Rewrite 설정</h3>
<div class="bg-light rounded p-3 text-muted">
<p>
<small>
간편 URL(영어: clean URL, fancy URL)은 질의어 없이, 경로만 가진 간단한 구조의 URL을 말한다.<br>
사용자 친화적 URL(영어: user-friendly URLs), 검색엔진 친화적 URL(영어: search engine friendly url) 또는 간단히 친화적 URL이라고도 한다. 깔끔하지 않은 URL에 비해 기억하기 쉽고, 입력하기 쉽다는 장점이 있다.
<a href="http://ko.wikipedia.org/wiki/%EA%B0%84%ED%8E%B8_URL" target="_blank">더보기</a></small>
</p>
<p class="mb-0">
<small>파일을 직접 추가하거나 수정하시려면 FTP 클라이언트로 다운로드 받아 백업받은 후 로컬에서 편집 후 업로드 적용할 것을 권장합니다.</small>
</p>
</div>
<div class="rb-codeview">
<pre class="prettyprint linenums"><?php readfile('./.htaccess')?></pre>
<div class="rb-meta">
파일위치 : <?php echo $g['s']?>/.htaccess
<code><?php echo getSizeFormat(filesize('./.htaccess'),2)?></code>
<span class="pull-right">웹을 통한 편집은 제공하지 않습니다.</span>
</div>
</div>
</div>
<div class="tab-pane<?php if($_SESSION['sh_admin_seo']=='sitemap'):?> active in<?php endif?>" id="sitemap">
<h3>Sitemap.xml 설정</h3>
<form class="rb-form" role="form" name="sendForm" 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="seo">
<input type="hidden" name="act" value="sitemap_save">
<div class="bg-light rounded p-3 text-muted">
<p>
<small>
Sitemap을 사용하면 검색엔진(Google)이 발견하지 못했을 수도 있는 사이트의 페이지 정보를 검색엔진에 알릴 수 있습니다.<br>
간단히 말해서 XML Sitemap은 웹사이트에 있는 페이지의 목록입니다.<br>
Sitemap을 만들어 제출하면 검색엔진의 일반적인 크롤링 과정에서 발견되지 않는 URL을 비롯하여 사이트의 모든 페이지 정보를 검색엔진에 알릴 수 있습니다.</small>
</p>
<p>
<small>
본 파일은 <a href="http://www.sitemaps.org/ko/" target="_blank">sitemaps.org</a> 사이트에 명시된 바와 같이 Sitemap Protocol 0.9를 따릅니다.<br>
따라서 Sitemap Protocol 0.9를 사용하여 만든 Google용 Sitemap은 sitemaps.org의 기준을 채택한 다른 검색엔진과 호환됩니다.</small>
</p>
<p class="mb-0">
<small>
사이트맵을 직접 추가하거나 수정하시려면 <a href="https://support.google.com/webmasters/bin/answer.py?hl=ko&amp;answer=183668" target="_blank">사이트맵을 만드는 방법</a>에 맞게 편집해 주세요.<br>
파일용량이 클 경우 다운로드 받아 PC에서 편집할 것을 권장합니다.</small>
</p>
</div>
<div class="rb-codeview">
<?php if(is_file('./sitemap.xml')):?>
<textarea name="configdata"><?php readfile('./sitemap.xml')?></textarea>
<?php else:?>
<textarea name="configdata">사이트맵이 존재하지 않습니다.
새로 만들기 버튼을 클릭하여 사이트맵을 만들어 주세요.
메뉴를 새로 생성한 경우에 새로 만들기 버튼을 클릭하면 가장 최신의 사이트맵 상태를 유지할 수 있습니다.</textarea>
<?php endif?>
<div class="rb-meta">
<?php if(is_file('./sitemap.xml')):?>
파일위치 : <?php echo $g['s']?>/sitemap.xml
<code><?php echo getSizeFormat(filesize('./sitemap.xml'),2)?></code>
<?php endif?>
<div class="text-right">파일을 편집한 후 저장 버튼을 클릭하면 실시간으로 사용자 페이지에 적용됩니다.</div>
<?php if(is_file('./sitemap.xml')):?>
<div class="input-group" style="margin-top: 10px">
<span class="input-group-addon">파일위치</span>
<input id="_url_m_1_" type="text" class="form-control" value="<?php echo $g['url_root']?>/sitemap.xml" readonly="">
<span class="input-group-btn">
<a href="#." class="btn btn-light rb-clipboard hidden-xs" data-tooltip="tooltip" title="Copy" data-clipboard-target="_url_m_1_"><i class="fa fa-clipboard"></i></a>
<a href="<?php echo $g['url_root']?>/sitemap.xml" target="_blank" class="btn btn-light">Go!</a>
</span>
</div>
<?php endif?>
</div>
</div>
<div class="rb-submit">
<button type="button" class="btn btn-light btn-lg<?php if($g['device']):?> btn-block<?php endif?>" onclick="sitemap_make(this);">새로 만들기</button>
<?php if(is_file('./sitemap.xml')):?>
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $module?>&amp;a=seo&amp;act=sitemap_delete" onclick="return hrefCheck(this,true,'정말로 삭제하시겠습니까?');" class="btn btn-light">삭제하기</a>
<?php endif?>
<button type="submit" class="btn btn-primary btn-lg<?php if($g['device']):?> btn-block<?php endif?>">저장하기</button>
</div>
<div class="bg-light border rounded p-3">
<ul class="mb-0">
<li><a href="http://www.sitemaps.org/" target="_blank">Sitemap 프로토콜</a>을 기반으로 하여 Sitemap을 만들거나 텍스트 파일 또는 RSS/Atom 피드를 Sitemap으로 제출할 수 있습니다.</li>
<li><a href="https://support.google.com/webmasters/bin/answer.py?answer=183668" target="_blank">Sitemap을 만드는 방법</a></li>
<li><a href="https://www.google.co.kr/webmasters/" target="_blank">Google 웹마스터 도구</a></li>
</ul>
</div>
</form>
</div>
<div class="tab-pane<?php if($_SESSION['sh_admin_seo']=='errorpage'):?> active in<?php endif?>" id="error">
<h3>Error 페이지 설정</h3>
<div class="bg-light rounded p-3">
<small>
<ul class="mb-0">
<li><a class="muted-link" href="http://www.htaccessbasics.com/404-custom-error-page/" target="_blank">How to Redirect your 404 error to a Custom Page</a></li>
<li><a class="muted-link" href="http://stackoverflow.com/questions/19962787/rewrite-url-after-redirecting-404-error-htaccess" target="_blank">Rewrite URL after redirecting 404 error htaccess</a></li>
<li><a class="muted-link" href="http://www.etnews.com/201312200346" target="_blank">네이버 검색에 잘 걸리는 웹페이지 만들기 비법은?</a></li>
<li><a class="muted-link" href="http://search-marketing.co.kr/50043928552" target="_blank">검색엔진최적화 - 404 에러페이지 처리</a></li>
<li><a class="muted-link" href="http://moz.com/blog/are-404-pages-always-bad-for-seo" target="_blank">Are 404 Pages Always Bad for SEO?</a></li>
</ul>
</small>
</div>
<ol class="mt-4">
<li>기본 페이지 목록에 404 Error 페이지 추가 필요</li>
<li>.htaccess에 <code>ErrorDocument 404 /errormessages/404.php</code> 형식으로 404페이지 지정 필요.</li>
</ol>
</div>
<div class="tab-pane<?php if($_SESSION['sh_admin_seo']=='redirect'):?> active in<?php endif?>" id="301">
<h3>Redirect 설정</h3>
<div class="bg-light rounded p-3">
<ul class="mb-0 small">
<li><a class="muted-link" href="http://blog.iolate.kr/162" target="_blank">Permanently Redirect (301)</a></li>
<li><a class="muted-link" href="http://www.etnews.com/201312200346" target="_blank">사이트나 페이지 변경 시 301 redirect를 사용할 것</a></li>
<li><a class="muted-link" href="http://www.htaccessbasics.com/how-to-setup-a-301-redirect/" target="_blank">How to setup a 301 Redirect</a></li>
</ul>
</div>
</div>
</div>
</div>
</div><!-- /.row -->
</div>
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"></script>
<script>
(function(jQuery){
jQuery( document ).ready( function() {
prettyPrint();
} );
}(jQuery))
function sitemap_make(obj)
{
if (confirm('정말로 사이트맵을 새로 만드시겠습니까? '))
{
getIframeForAction(obj.form);
obj.form.act.value = 'sitemap_make';
obj.form.submit();
}
}
function saveCheck(f)
{
getIframeForAction(f);
return confirm('정말로 실행하시겠습니까? ');
}
</script>

View File

View File

@@ -0,0 +1,91 @@
<form class="p-4" role="form" name="sendForm" action="<?php echo $g['s']?>/" method="post" onsubmit="return sslCheck(this);">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="config">
<input type="hidden" name="act" value="ssl">
<h3>SSL 환경설정</h3>
<div class="form-group row">
<label class="col-md-2 col-form-label">SSL 적용</label>
<div class="col-md-10">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="ssl_type_0" name="ssl_type" value=""<?php if(!$d['admin']['ssl_type']):?> checked<?php endif?>>
<label class="custom-control-label" for="ssl_type_0">적용안함</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="ssl_type_2" name="ssl_type" value="2"<?php if($d['admin']['ssl_type']==2):?> checked<?php endif?>>
<label class="custom-control-label" for="ssl_type_2">코드값 적용</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="ssl_type_1" name="ssl_type" value="1"<?php if($d['admin']['ssl_type']==1):?> checked<?php endif?> onclick="alert('[주의] 아래의 안내사항을 확인하셨나요?');">
<label class="custom-control-label" for="ssl_type_1">전체사이트 적용</label>
</div>
<small id="ssl_guide" class="form-text text-muted">
보안서버가 설치되지 않은 상태에서 전체사이트 적용을 체크하시면 사이트에 접속할 수 없게 됩니다.<br>
반드시 보안서버 설치 후 체크해 주세요.<br>
혹시, 보안서버 미설치 상태에서 전체사이트 체크 후 이상이 생겼을 경우에는 킴스큐 공식포털에서 해결방법을 얻을 수 있습니다.
</small>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">http 포트번호</label>
<div class="col-md-9">
<input type="text" class="form-control" name="http_port" value="<?php echo $d['admin']['http_port']?>" placeholder="" style="width:100px;">
<small class="form-text text-muted">
80포트일 경우 공백으로 두세요.
</small>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">SSL 포트번호</label>
<div class="col-md-9">
<input type="text" class="form-control" name="ssl_port" value="<?php echo $d['admin']['ssl_port']?>" placeholder="" style="width:100px;">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">SSL 적용모듈</label>
<div class="col-md-9">
<input type="text" class="form-control" name="ssl_module" value="<?php echo $d['admin']['ssl_module']?>" placeholder="">
<small class="form-text text-muted">
적용할 모듈의 아이디(폴더명)를 콤마(,)로 구분해서 등록해 주세요.<br>
보기) <code>/rb/?m=member</code> 일 경우 코드값은 <code>member</code>
</small>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">SSL 적용메뉴</label>
<div class="col-md-9">
<input type="text" class="form-control" name="ssl_menu" value="<?php echo $d['admin']['ssl_menu']?>" placeholder="">
<small class="form-text text-muted">
적용할 메뉴의 코드값을 콤마(,)로 구분해서 등록해 주세요.<br>
보기) <code>/rb/?c=ssl</code> 일 경우 코드값은 <code>ssl</code>
</small>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label">SSL 적용페이지</label>
<div class="col-md-9">
<input type="text" class="form-control" name="ssl_page" value="<?php echo $d['admin']['ssl_page']?>" placeholder="">
<small class="form-text text-muted">
적용할 페이지의 코드값을 콤마(,)로 구분해서 등록해 주세요.<br>
보기) <code>/rb/?mod=ssl</code> 일 경우 코드값은 <code>ssl</code>
</small>
</div>
</div>
<button class="btn btn-outline-primary btn-block btn-lg my-5" type="submit">정보변경</button>
</form>
<script>
function sslCheck(f)
{
getIframeForAction(f);
return confirm('정말로 실행하시겠습니까? ');
}
</script>

View File

@@ -0,0 +1,390 @@
#switch .fa-square:before {
color: rgb(68, 68, 68);
}
#switch .card-body {
padding: 15px 10px 15px;
border-top: 1px dotted #222
}
#switch .card-body.rb-panel-form {
border-top: none;
}
#switch .card-body.rb-panel-form .form-control {
background-color: #f5f5f5;
border-radius: 0
}
#switch .rb-eye-close {
color: #c0c0c0;
}
#switch .card-body h5 {
font-size: 14px
}
#switch .card-body.rb-panel-form small {
font-size: 75%;
}
/**
* Nestable
*/
.dd {
position: relative;
display: block;
margin: 0;
padding: 0;
list-style: none;
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;
height: 35px;
margin: 5px 0;
padding: 5px 10px;
color: #333;
text-decoration: none;
font-weight: bold;
border: 1px solid rgba(255, 255, 255, .01) !important;
background: rgba(255, 255, 255, .01);
-webkit-border-radius: 3px;
border-radius: 3px;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.dd-handle:hover {
color: #2ea8e5;
background: #fff;
}
.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),
-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),
-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),
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)
}
/**
* Nestable Extras
*/
#nestable-menu {
padding: 0;
margin: 20px 0;
}
#nestable-output,
@media only screen and (min-width: 700px) {
.dd {
float: left;
width: 100%;
}
.dd+.dd {
margin-left: 2%;
}
}
.dd-hover>.dd-handle {
background: #2ea8e5 !important;
}
/**
* Nestable Draggable Handles
*/
.dd3-content {
display: block;
height: 35px;
margin: 5px 0;
line-height: 20px;
padding: 6px 10px 4px 40px;
color: #333;
border: 1px solid rgba(255, 255, 255, .03);
background-color: rgba(255, 255, 255, .03);
-webkit-border-radius: 3px;
border-radius: 3px;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.dd3-content:hover {
background: rgba(255, 255, 255, .01);
}
.dd3-content small {
color: #999
}
.dd-item.rb-active .dd3-content {
background-color: #428bca;
border-color: #357ebd;
color: #fff
}
.dd-item.rb-active .dd3-handle:before {
color: #fff
}
.dd-item.rb-active .dd3-handle:hover:before {
color: #333
}
.dd-item.rb-active .dd3-content a,
.dd-item.rb-active .dd3-content small {
color: #fff
}
.dd-dragel>.dd3-item>.dd3-content {
margin: 0;
}
.dd3-item>button {
margin-left: 30px;
}
.dd3-handle {
position: absolute;
margin: 0;
left: 0;
top: 0;
cursor: pointer;
width: 30px;
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
border: 1px solid #ddd;
background-color: rgba(255, 255, 255, .03);
border-top-right-radius: 0;
border-bottom-right-radius: 0;
cursor: move
}
.dd-checkbox {
line-height: 28px;
position: absolute;
margin: 0;
right: 0;
top: 0;
width: 30px;
padding: 5px 20px 10px 5px
}
.dd3-handle:before {
font-family: 'FontAwesome';
content: '\f047';
display: block;
position: absolute;
left: 5px;
top: 6px;
text-align: center;
text-indent: 0;
color: #888;
font-size: 18px;
font-weight: normal
}
.dd3-handle:hover {
background: #ddd
}
.panel-footer ul.list-inline {
margin-bottom: 0
}
#switch .rb-none {
line-height: 400px;
text-align: center;
color: #999
}
#switch .rb-main .page-header {
margin-top: 35px
}
#switch .rb-main .page-header:first-child {
margin-top: 0
}
#switch .rb-main .checkbox-inline.rb-no-indent,
#switch .rb-main .checkbox-inline.rb-no-indent+.checkbox-inline.rb-no-indent {
margin-left: 0;
margin-right: 15px;
}
#switch .rb-main .checkbox.inline.no_indent:last-child {
margin-right: 0px;
}
#switch .rb-files {
padding: 2px;
background: #eee;
border-radius: 3px;
margin-top: 35px;
}
#switch .rb-codeview {
border-radius: 3px;
border: 1px solid #c9c9c9;
-webkit-box-shadow: inset 1px 1px 0px 0px rgba(222, 2222, 222, 0.1), 1px 1px 0px 0px rgba(255, 255, 255, 1);
box-shadow: inset 1px 1px 0px 0px rgba(222, 222, 222, 0.1), 1px 1px 0px 0px rgba(255, 255, 255, 1);
}
#switch .rb-codeview-header,
#switch .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;
}
#switch .rb-codeview-header .breadcrumb {
background-color: transparent;
margin-bottom: 0;
padding: 0;
line-height: 30px
}
#switch .rb-codeview-header .btn {
line-height: 20px;
margin-top: 4px;
border-radius: 3px
}
#switch .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;
}
#switch .rb-codeview-body {
font-family: Consolas, "Liberation Mono", Courier, monospace;
}
#switch .rb-codeview-body textarea {
overflow: auto;
border: none;
padding: 15px;
line-height: 150%;
background: #000000;
color: #ffffff;
font-size: 12px;
border-radius: 0
}
#switch .rb-codeview-footer {
border-top: 1px solid #ddd;
padding: 10px;
background-color: #e8e8e8;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#e8e8e8));
background-image: -webkit-linear-gradient(#fafafa, #e8e8e8);
background-image: linear-gradient(#fafafa, #e8e8e8);
background-repeat: repeat-x;
}
#switch .rb-codeview-footer ul {
margin-bottom: 0
}
#switch .rb-codeview-footer li:first-child,
#switch .rb-codeview-footer li:last-child {
border-left: 0;
box-shadow: inset 0 0 0 transparent;
padding-left: 0;
margin-left: 0;
}
#switch .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;
}
#switch .rb-submit {
margin: 15px 0
}
@media (max-width: 767px) {
.rb-guide {
padding-left: 20px;
}
}

View File

@@ -0,0 +1,335 @@
<?php
function getSwitchList($pos)
{
$incs = array();
foreach($GLOBALS['d']['switch'][$pos] as $_switch => $_sites)
{
if(is_file($GLOBALS['g']['path_switch'].$pos.'/'.$_switch.'/main.php')) $incs[] = array($_switch,$_sites);
}
$dirh = opendir($GLOBALS['g']['path_switch'].$pos);
while(false !== ($folder = readdir($dirh)))
{
$_fins = substr($folder,0,1);
if(strpos('_.',$_fins) || isset($GLOBALS['d']['switch'][$pos][$folder])) continue;
$incs[] = array($folder,'');
}
closedir($dirh);
return $incs;
}
$_switchset = array(
'start'=>'스타트 스위치',
'top'=>'탑 스위치',
'head'=>'헤더 스위치',
'foot'=>'풋터 스위치',
'end'=>'엔드 스위치'
);
$TMPST = array();
$SITES = getDbArray($table['s_site'],'','*','gid','asc',0,$p);
$SITEN = db_num_rows($SITES);
?>
<div class="container-fluid">
<div class="row" id="switch">
<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">
<i class="fa fa-power-off fa-lg fa-fw"></i> 스위치 관리
</div>
<div class="rb-panel-form">
<select class="form-control custom-select border-0" onchange="goHref('<?php echo $g['s']?>/?m=<?php echo $m?>&module=<?php echo $module?>&front=<?php echo $front?>&switchdir=<?php echo $switchdir?>&r='+this.value);">
<?php while($S = db_fetch_array($SITES)):$TMPST[]=array($S['label'],$S['id'])?>
<option value="<?php echo $S['id']?>"<?php if($r==$S['id']):?> selected<?php endif?>><?php echo $S['label']?> (<?php echo $S['id']?>)</option>
<?php endwhile?>
</select>
</div>
<form action="<?php echo $g['s']?>/" method="post" class="rb-form" onsubmit="return orderCheck(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="switch_order">
<input type="hidden" name="auto" value="">
<?php foreach($_switchset as $_key => $_val):?>
<div class="card-body">
<h5><small><?php echo $_val?></small></h5>
<div class="dd" id="nestable-<?php echo $_key?>">
<ol class="dd-list">
<?php if(isset($d['switch'][$_key])):?>
<?php $_i=1;foreach(getSwitchList($_key) as $_switch):$_switch[2]=getFolderName($g['path_switch'].$_key.'/'.$_switch[0]);$_switch[3]=$_key?>
<li class="dd-item dd3-item<?php if($_key.'/'.$_switch[0]==$switchdir):$sinfo=$_switch?> rb-active<?php endif?>" data-id="<?php echo $_i?>">
<div class="dd-handle dd3-handle"></div>
<div class="dd3-content"><a href="<?php echo $g['adm_href']?>&amp;switchdir=<?php echo $_key.'/'.$_switch[0]?>"><?php echo $_switch[2]?></a>
<span class="badge badge-pill badge-dark"><?php echo $_switch[0]?></span>
</div>
<div class="dd-checkbox">
<input type="checkbox" name="switchmembers_<?php echo $_key?>[]" value="<?php echo $_switch[0]?>" checked class="d-none"><i class="fa fa-eye<?php echo strstr($_switch[1],'['.$r.']')?'':'-slash rb-eye-close'?>"></i>
</div>
</li>
<?php $_i++;endforeach?>
<?php else:?>
<li><small></small></li>
<?php endif?>
</ol>
</div>
</div>
<?php endforeach?>
<div class="card-footer p-2">
<div class="btn-group w-100">
<button type="button" class="btn btn-light rb-modal-add-switch w-50" data-toggle="modal" href="#modal_window">
스위치 추가
</button>
<button type="submit" class="btn btn-light w-50">
스위치 업데이트
</button>
</div>
</div>
</form>
</div>
</div>
<div class="col-sm-8 col-md-8 ml-sm-auto col-xl-9 pt-3">
<?php if($switchdir):?>
<h4>스위치 등록정보</h4>
<div class="row">
<div class="col-md-2 col-sm-2 text-center">
<span class="fa-stack fa-3x">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-power-off fa-stack-1x fa-inverse"></i>
</span>
</div>
<div class="col-md-10 col-sm-10">
<h4 class="mt-3 mb-3">
<strong><?php echo $sinfo[2]?></strong>
<span class="badge badge-dark"><?php echo $sinfo[0]?></span>
<span class="badge badge-dark"><?php echo $sinfo[3]?></span>
</h4>
<div class="btn-group">
<a class="btn btn-light" data-toggle="collapse" data-target="#_edit_area_" onclick="sessionSetting('sh_admin_switch1','1','','1');"><i class="fa fa-code fa-lg"></i> 코드 조회 및 편집</a>
<button type="button" class="btn btn-light dropdown-toggle dropdown-toggle-split" data-toggle="dropdown">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div class="dropdown-menu dropdown-menu-right" role="menu">
<?php if(is_file($g['path_switch'].$switchdir.'/readme.txt')):?>
<a class="dropdown-item" href="#." data-toggle="collapse" data-target="#_guide_area_" onclick="sessionSetting('sh_admin_switch2','1','','1');">안내문서 보기</a>
<?php endif?>
<a class="dropdown-item" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $module?>&amp;a=switch_delete&amp;switch=<?php echo $switchdir?>" onclick="return hrefCheck(this,true,'정말로 삭제시겠습니까?');">삭제하기</a>
</div>
</div>
</div>
</div>
<form name="procForm" class="mt-4 px-4" role="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="switch_edit">
<input type="hidden" name="switch" value="<?php echo $switchdir?>">
<input type="hidden" name="name" value="<?php echo $sinfo[2]?>">
<h5 class="h6 mt-4">적용 사이트 </h5>
<?php foreach($TMPST as $_val):?>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="aply_sites_<?php echo $_val[1]?>" name="aply_sites[]" value="<?php echo $_val[1]?>"<?php if(strstr($sinfo[1],'['.$_val[1].']')):?> checked<?php endif?>>
<label class="custom-control-label" for="aply_sites_<?php echo $_val[1]?>">
<?php echo $_val[0]?>
<span class="badge badge-dark"><?php echo $_val[1]?></span>
</label>
</div>
<?php endforeach?>
<div class="pt-2">
<button type="button" class="btn btn-light" onclick="checkboxChoice('aply_sites[]',true);">전체선택</button>
<button type="button" class="btn btn-light" onclick="checkboxChoice('aply_sites[]',false);">전체취소</button>
</div>
<hr>
<button class="btn btn-outline-primary btn-block my-4" type="submit"><i class="fa fa-check fa-lg"></i> 저장하기</button>
<div id="_edit_area_" class="collapse<?php if($_SESSION['sh_admin_switch1']):?> show<?php endif?>">
<div class="rb-files">
<div class="rb-codeview">
<div class="rb-codeview-header">
<ol class="breadcrumb pull-left">
<li class="breadcrumb-item">파일경로 :</li>
<li class="breadcrumb-item">root</li>
<li class="breadcrumb-item">switchs</li>
<li class="breadcrumb-item"><?php echo str_replace('/','</li><li class="breadcrumb-item">',$switchdir)?></li>
<li class="breadcrumb-item">main.php</li>
</ol>
<button type="button" class="btn btn-light btn-xs float-right rb-full-screen" data-tooltip="tooltip" title="전체화면" onclick="editFullSize('_edit_area_',this);"><i class="fa fa-arrows-alt fa-lg"></i></button>
</div>
<div class="rb-codeview-body">
<textarea name="switch_code" id="__code__" class="form-control" rows="35"><?php echo implode('',file($g['path_switch'].$switchdir.'/main.php'))?></textarea>
</div>
<div class="rb-codeview-footer">
<ul class="list-inline">
<li><code><?php echo count(file($g['path_switch'].$switchdir.'/main.php'))?> lines</code></li>
<li><code><?php echo getSizeFormat(filesize($g['path_switch'].$switchdir.'/main.php'),2)?></code></li>
<li class="pull-right">파일을 편집한 후 저장 버튼을 클릭하면 실시간으로 사용자 페이지에 적용됩니다.'</li>
</ul>
</div>
</div>
</div>
<div class="my-4">
<button class="btn btn-outline-primary btn-block" type="submit"><i class="fa fa-check fa-lg"></i> 저장하기</button>
</div>
</div>
</form>
<?php if(is_file($g['path_switch'].$switchdir.'/readme.txt')):?>
<br>
<br>
<div id="_guide_area_" class="collapse well<?php if($_SESSION['sh_admin_switch2']):?> show<?php endif?>">
<small><?php echo getContents(nl2br(implode('',file($g['path_switch'].$switchdir.'/readme.txt'))),'HTML')?></small>
</div>
<?php endif?>
<?php else:?>
<h4>사용 가이드</h4>
<ul class="list-unstyled text-muted">
<li>스위치는 프로그램의 실행단계를 5개의 구역으로 분리하여 각각의 구역에 실행여부를 온/오프 할 수 있는 응용 프로그램입니다.</li>
<li>너무 많은 스위치를 동작시킬 경우 실행속도에 영향을 줄 수 있으니 꼭 필요한 스위치만 사용하세요.</li>
</ul>
<h4 class="mt-5">요소별 실행위치</h4>
<small>
<dl class="row border p-3 bg-light mx-0">
<dt class="col-sm-2">스타트 스위치</dt>
<dd class="col-sm-9"><small class="text-muted">(start)</small> 프로그램 시작과 함께 DB연결,주요파일 로드 후 실행됩니다.</dd>
<dt class="col-sm-2">탑 스위치</dt>
<dd class="col-sm-9"><small class="text-muted">(top)</small> 모듈 및 레이아웃에 대한 정의후 화면출력 직전에 실행됩니다.</dd>
<dt class="col-sm-2">헤더 스위치</dt>
<dd class="col-sm-9"><small class="text-muted">(head)</small> head 태그를 닫기 직전에 실행됩니다.</dd>
<dt class="col-sm-2">풋터 스위치</dt>
<dd class="col-sm-9"><small class="text-muted">(foot)</small> body 태그를 닫기 직전에 실행됩니다.</dd>
<dt class="col-sm-2">엔드 스위치</dt>
<dd class="col-sm-9"><small class="text-muted">(end)</small> 화면출력을 끝내고 실행됩니다.</dd>
</dl>
</small>
<p class="text-right">
<a class="btn btn-light" data-toggle="modal" href="#admin-switch-structure">스위치 실행 스트럭처 보기</a>
</p>
<?php endif?>
</div>
</div>
</div>
<?php if($d['admin']['codeeidt']):?>
<!-- codemirror -->
<?php endif?>
<!-- nestable : https://github.com/dbushell/Nestable -->
<?php getImport('nestable','jquery.nestable',false,'js')?>
<script>
putCookieAlert('admin_switch_result') // 실행결과 알림 메시지 출력
$('#nestable-start').nestable({group:1});
$('#nestable-top').nestable({group:2});
$('#nestable-head').nestable({group:3});
$('#nestable-foot').nestable({group:4});
$('#nestable-end').nestable({group:5});
$('.dd').on('change', function() {
var f = document.forms[0];
getIframeForAction(f);
f.auto.value = '1';
f.submit();
});
$(document).ready(function()
{
$('.rb-full-screen').on('click',function() {
});
$('.rb-modal-add-switch').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=admin&amp;module=market&amp;front=modal.add&amp;addType=switch&amp;reload=Y')?>');
});
});
</script>
<script>
function orderCheck(f)
{
getIframeForAction(f);
return true;
}
function saveCheck(f)
{
if (f.name.value == '')
{
alert('스위치명을 입력해 주세요. ');
f.name.focus();
return false;
}
getIframeForAction(f);
}
</script>
<div class="modal fade" id="admin-switch-structure" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">스위치 실행 스트럭처</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<fieldset id="guide_structure">
<pre class="text-muted">
<i>- 프로그램 시작 -</i>
<i>- DB연결 -</i>
<i>- 주요파일 로드 -</i>
<span class="badge badge-pill badge-primary">스타트 스위치</span>
<i>- 모듈 정의 -</i>
<i>- 레이아웃 정의 -</i>
<span class="badge badge-pill badge-primary">탑 스위치</span>
<fieldset>
<legend><span class="badge badge-pill badge-dark">화면 출력부</span></legend>
&lt;html&gt;
&lt;head&gt;
<i>- 기초 헤드 -</i>
<span class="badge badge-pill badge-primary">헤더 스위치</span>
&lt;/head&gt;
&lt;body&gt;
<i>- 콘텐츠 영역 -</i>
<span class="badge badge-pill badge-primary">풋터 스위치</span>
&lt;/body&gt;
&lt;/html&gt;
</fieldset>
<span class="badge badge-pill badge-primary">엔드 스위치</span>
</pre>
</fieldset>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-dismiss="modal">닫기</button>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,17 @@
#uninstall .btn.rb-danger {
font-weight: bold;
}
#uninstall .btn.rb-danger:hover {
color: #fff;
background-color: #d9534f;
border-color: #D43F3A;
}

View File

@@ -0,0 +1,45 @@
<div id="uninstall" class="p-4">
<div class="card border-danger">
<div class="card-header text-danger">Danger Zone</div>
<div class="card-body">
<div class="page-header"><h4>kimsQ Rb 제거</h4></div>
<div class="media">
<span class="align-self-center mr-3 fa fa-trash fa-3x"></span>
<div class="media-body">
<ul class="mb-0">
<li>킴스큐Rb의 모든데이터(폴더/파일/DB) 제거합니다.</li>
<li>제거과정에서 쓰기퍼미션이 없는 일부 파일이나 폴더가 남을 있습니다.</li>
<li>남은 폴더/파일은 FTP를 이용해서 삭제해 주세요.</li>
<li>삭제된 데이터는 복구할 없습니다.</li>
</ul>
</div>
</div>
<div class="page-header"><h4>삭제 정보</h4></div>
<dl class="row">
<dt class="col-sm-2">경로</dt>
<dd class="col-sm-9"><code><?php echo $g['s']?>/*</code></dd>
<dt class="col-sm-2">DB table 정보</dt>
<dd class="col-sm-9"><code><?php echo $DB['head']?>*</code></dd>
</dl>
<hr>
<?php if($d['admin']['ftp_use']):?>
<div class="form-group">
<label for="" class="sr-only">FTP 접속암호</label>
<div class="input-group input-group-lg">
<input type="password" class="form-control" id="_ftp_pass_" placeholder="FTP 접속암호 암호를 입력해 주세요">
<span class="input-group-btn">
<button type="button" class="btn btn-default" id="ftpbtn_uninstall" onclick="sendCheck(this.id);">
<?php if($d['admin']['ftp']):?><i class="fa fa-info-circle fa-lg fa-fw"></i>정상<?php else:?>FTP 연결확인<?php endif?>
</button>
</span>
</div>
</div>
<?php else:?>
<div class="well">
제거과정에서 쓰기퍼미션이 없는 일부 파일이나 폴더가 남을 수 있습니다.

View File

@@ -0,0 +1,283 @@
<?php
include $g['path_core'].'function/rss.func.php';
include $g['path_module'].'market/var/var.php';
include $g['path_module'].$module.'/var/var.version.php';
$lastest_version = trim(getUrlData($d['github']['lastest'].$g['wcache'],10));
$current_version = $_SESSION['current_version']?$_SESSION['current_version']:$d['admin']['version'];
$_current_version = str_replace('.','',$current_version);
$_lastest_version = str_replace('.','',$lastest_version);
$git_version = shell_exec('git --version');
if ($_lastest_version-$_current_version > 0) $try_update = true;
else $try_update = false;
$sort = $sort ? $sort : 'uid';
$orderby= $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 201 ? $recnum : 20;
$listque = 'uid and ext=""';
$RCD = getDbArray($table['s_gitlog'],$listque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_gitlog'],$listque);
$TPG = getTotalPage($NUM,$recnum);
$_SESSION['current_version'] = '';
if ($git_version ) {
$_skip_worktree = shell_exec('git ls-files -v | grep ^S');
$skip_worktree = str_replace('S ', '', $_skip_worktree);
}
?>
<div id="update-body" class="p-4">
<div class="media my-3">
<div class="mr-3 align-self-center version">
<span class=" kf-bi-01" style="font-size: 38px"> </span> <span class="h3 ml-2">Rb <code><?php echo $current_version?></code></span>
</div>
<div class="media-body f12 text-muted">
원격 업데이트를 이용하시면 킴스큐Rb를 항상 최신의 상태로 유지할 수 있습니다. <br>패치 및 업데이트 내용에 따라서 업데이트를 진행해 주세요.
</div>
</div>
</div>
<form name="updateForm" method="post" action="<?php echo $g['s']?>/" target="_action_frame_admin" class="p-4">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="admin">
<input type="hidden" name="a" value="update">
<input type="hidden" name="remote" value="<?php echo $d['github']['remote'] ?>">
<input type="hidden" name="current_version" value="<?php echo $current_version?>">
<input type="hidden" name="lastest_version" value="<?php echo $lastest_version?>">
<?php if ($try_update): ?>
<?php if ($git_version): ?>
<?php if (is_dir('./.git')): ?>
<button type="button" data-toggle="modal" data-target="#modal-update-confirm" class="btn btn-primary">
최신 <?php echo $lastest_version ?> 업데이트
</button>
<?php else: ?>
<button type="button" data-act="gitinit" class="btn btn-outline-success mt-3">
업데이트 환경 초기화
</button>
<?php endif; ?>
<?php else: ?>
<div class="alert alert-danger content-padded f14" role="alert">
<strong>[git 설치필요]</strong> 버전관리를 위해 git 설치가 필요합니다. 호스팅 제공업체 또는 서버 관리자에게 요청해주세요.
</div>
<?php endif; ?>
<?php else: ?>
<div class="d-block text-muted my-2">최신 버전 입니다.</div>
<?php endif; ?>
</form>
<?php if ($NUM): ?>
<div class="update-info table-responsive">
<table class="table f13 text-center">
<thead class="small text-muted">
<tr>
<th>버전</th>
<th>적용일시</th>
<th>로그</th>
</tr>
</thead>
<tbody class="text-muted">
<?php while($R=db_fetch_array($RCD)):?>
<tr>
<td>
<?php if(getNew($R['d_regis'],12)):?><span class="rb-new mr-1"></span><?php endif?>
<?php echo $R['version']?>
<span class="badge badge-danger ml-1"><?php echo $R['error']?'에러':'' ?></span>
</td>
<td><?php echo getDateFormat($R['d_regis'],'Y년 m월 d일 H시 i분')?></td>
<td>
<button type="button" class="btn btn-light btn-sm"
data-toggle="modal"
data-target="#modal-update-info"
data-uid="<?php echo $R['uid']?>">
보기
</button>
</td>
</tr>
<?php endwhile?>
</tbody>
</table>
<?php if($TPG>1):?>
<nav class="my-4">
<ul class="pagination justify-content-center">
<script>getPageLink(10,<?php echo $p?>,<?php echo $TPG?>,'');</script>
</ul>
</nav>
<?php endif?>
</div>
<?php endif; ?>
<div class="p-4">
<strong>유의사항</strong>
<ul class="mt-2 mb-0 list-unstyled text-muted small">
<li>원격 업데이트는 킴스큐의 기본 패키지 파일들을 항상 최신의 상태로 유지할 수 있는 시스템입니다.</li>
<li><a href="<?php echo $d['github']['remote'] ?>" target="_blank">킴스큐 Rb 저장소</a> 의 master 브랜치의 최신 코드가 적용됩니다.</li>
<li>수정하거나 추가한 코드가 있을 경우, 수정내역이 삭제되므로 업데이트 실행전 레이아웃 또는 테마를 별도저장 해주세요.</li>
</ul>
<hr>
<strong class="d-block mt-4">업데이트에서 특정 파일을 제외하는 방법</strong>
<ul class="mt-2 mb-0 list-unstyled text-muted small">
<li>쉘(ssh)접속 후, 아래 명령어로 제외목록에 추가할 수 있습니다.</li>
</ul>
<dl class="row small mt-2 text-muted">
<dt class="col-2">제외목록에 추가</dt>
<dd class="col-9"><code>git update-index --skip-worktree [file]</code></dd>
<dt class="col-2">제외목록에서 제외</dt>
<dd class="col-9"><code>git update-index --no-skip-worktree [file]</code></dd>
</dl>
<?php if ($skip_worktree): ?>
<div class="form-group mt-2">
<label for="">업데이트에서 제외된 파일 <span class="badge badge-light">skip-worktree</span></label>
<textarea class="form-control f13" rows="5" readonly><?php echo $skip_worktree ?></textarea>
</div>
<?php endif; ?>
</div>
<div class="modal" id="modal-update-info" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
업데이트 상세내역
<small class="ml-2 text-muted" data-role="version"></small>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body text-muted">
<div style="min-height:300px">
<pre><code class="f13" data-role="output"></code></pre>
</div>
<div class="d-flex justify-content-between mt-3">
<small class="text-muted" data-role="d_regis"></small>
<div class="">
<small class="text-muted">작업자 : <span data-role="name"></span></small>
<a href="https://github.com/kimsQ/rb2/commits/master" class="ml-2 btn btn-dark btn-sm" target="_blank">
저장소 커밋목록
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal" id="modal-update-confirm" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
업데이트 전 유의사항
<small class="ml-2 text-muted" data-role="version"></small>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body f14">
<div>
<p>업데이트시 최신 코드가 적용됩니다.</p>
<p><span class="badge badge-danger">주의</span> 기본 파일에서 수정 또는 추가한 코드가 있을 경우 해당내역이 삭제됩니다.</p>
<p><span class="text-danger">업데이트 실행전 수정내역을 별도저장 해야 합니다.</span></p>
</div>
<?php if ($skip_worktree): ?>
<div class="form-group mt-2">
<label for="">업데이트에서 제외된 파일</label>
<textarea class="form-control f13" rows="3" readonly><?php echo $skip_worktree ?></textarea>
</div>
<?php endif; ?>
</div>
<div class="modal-footer justify-content-between">
<button type="button" class="btn btn-link" data-dismiss="modal">취소</button>
<button type="button" class="btn btn-primary" data-act="submit">
<span class="not-loading">
확인 했습니다
</span>
<span class="is-loading">
<span class="spinner-border spinner-border-sm mr-1" role="status"></span>
처리중...
</span>
</button>
</div>
</div>
</div>
</div>
<script>
putCookieAlert('system_update_result');
$('#modal-update-confirm [data-act="submit"]').click(function(){
$(this).attr('disabled', true );
setTimeout(function(){
$('[name="updateForm"]').submit();
}, 1000);
});
$('[data-act="gitinit"]').click(function(){
$(this).attr( 'disabled', true );
setTimeout(function(){
$.post(rooturl+'/?r='+raccount+'&m=admin&a=gitinit',{
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var error=result.error;
var msg=result.msg;
if (error) {
$.notify({message: msg},{type: 'default'});
$(this).attr( 'disabled', false );
return false
} else {
location.reload();
}
} else {
$.notify({message: '다시 시도해 주세요.'},{type: 'default'});
$(this).attr( 'disabled', false );
return false
}
});
}, 1000);
});
$('#modal-update-info').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget)
var uid = button.attr('data-uid')
var modal = $(this)
$.post(rooturl+'/?r='+raccount+'&m=admin&a=get_updateData',{
uid : uid
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var version=result.version;
var output=result.output;
var name=result.name;
var d_regis=result.d_regis;
modal.find('[data-role="version"]').text(version);
modal.find('[data-role="d_regis"]').text(d_regis);
modal.find('[data-role="name"]').text(name);
modal.find('[data-role="output"]').text(output);
} else {
$.notify({message: '다시 시도해 주세요.'},{type: 'danger'});
return false
}
});
})
</script>

View File

@@ -0,0 +1,11 @@
<?php
$d['amenu']['main'] = '환경설정';
$d['amenu']['admin'] = '관리자';
$d['amenu']['security'] = '보안';
$d['amenu']['switch'] = '스위치';
$d['amenu']['plugin'] = '플러그인';
$d['amenu']['update'] = '업데이트';
$d['amenu']['seo'] = 'SEO';
$d['amenu']['bookmark'] = '북마크';
if($d['admin']['uninstall']) $d['amenu']['uninstall'] ='제거';
?>

View File

@@ -0,0 +1,64 @@
<?php
// common
$lang['admin']['a0001'] = '정상적인 접속이 아닙니다.';
// a.admin_member_add_check.php
$lang['admin']['a1001'] = '정상';
$lang['admin']['a1002'] = '확인요망';
// a.admin_perm.php
$lang['admin']['a2001'] = '권한이 없습니다.';
$lang['admin']['a2002'] = '반영되었습니다.';
// a.bookmark.php
$lang['admin']['a3001'] = '이미 등록된 북마크입니다.';
// a.bookmark_delete.php
$lang['admin']['a4001'] = '등록되지 않았거나 이미 삭제된 북마크입니다.';
$lang['admin']['a4002'] = '등록된 북마크가 없습니다';
// a.config.php
$lang['admin']['a5001'] = '시스템 도구에서 <strong>제거</strong>(<code>Uninstall</code>) 탭이 출력되도록 설정되었습니다. 이 설정은 매우 위험할 수 있으니 확인하세요.';
$lang['admin']['a5002'] = '반영되었습니다.';
// a.email_check.php
$lang['admin']['a6001'] = 'Passive Mode 를 확인하세요.';
$lang['admin']['a6002'] = '킴스큐 경로를 확인하세요.';
$lang['admin']['a6003'] = '정상적으로 FTP 연결이 확인되었습니다.';
$lang['admin']['a6004'] = 'FTP 연결이 되지 않았습니다.';
$lang['admin']['a6005'] = 'FTP 연결이 되지 않았습니다. FTP정보를 확인해 주세요.';
$lang['admin']['a6008'] = '이메일전송 테스트입니다.';
$lang['admin']['a6009'] = '이 화면을 정상적으로 확인하셨다면 이메일 전송이 정상적으로 동작중입니다.';
$lang['admin']['a6010'] = '이메일이 전송되었습니다. 확인해 보세요.';
$lang['admin']['a6011'] = '메일서버가 응답하지 않습니다.';
// a.seo.php
$lang['admin']['a7001'] = '%s 디렉토리의 쓰기권한이 없어 robots.txt 를 생성할 수 없습니다.';
$lang['admin']['a7002'] = '저장되었습니다.';
$lang['admin']['a7003'] = '삭제되었습니다.';
$lang['admin']['a7004'] = '사이트맵이 새로 만들어졌습니다.';
// a.switch_delete.php
$lang['admin']['a8001'] = '삭제 되었습니다.';
// a.switch_edit.php
$lang['admin']['a9001'] = '수정 되었습니다.';
// a.swtich_order.php
$lang['admin']['aa001'] = '스위치 정보가 갱신되었습니다.';
// a.uninstall.php
$lang['admin']['ab001'] = '죄송합니다. FTP를 이용한 삭제는 아직 지원하지 않습니다.';
// a.update.php
$lang['admin']['ac001'] = '업데이트 기록이 제거되었습니다.';
$lang['admin']['ac002'] = '수동 업데이트 처리되었습니다.';
$lang['admin']['ac003'] = '업데이트 파일이 존재하지 않습니다.';
$lang['admin']['ac004'] = '업데이트가 완료되었습니다.';
// a.tmppw.php
$lang['admin']['ad000'] = '요청하신 임시 패스워드입니다.';
$lang['admin']['ad001'] = '임시 패스워드로 로그인 하신 후 반드시 패스워드를 변경해 주세요.';
$lang['admin']['ad002'] = '이메일이 전송되었습니다.';
$lang['admin']['ad003'] = '이메일이 전송되지 못했습니다.';
?>

View File

@@ -0,0 +1,13 @@
<?php
// menu
$lang['admin']['menu1'] = '환경설정';
$lang['admin']['menu2'] = 'SEO';
$lang['admin']['menu3'] = 'SSL';
$lang['admin']['menu4'] = '보안';
$lang['admin']['menu5'] = '스위치';
$lang['admin']['menu6'] = '플러그인';
$lang['admin']['menu7'] = '업데이트';
$lang['admin']['menu8'] = '제거';
$lang['admin']['menu9'] = '사용자';
$lang['admin']['menu0'] = '북마크';
?>

View File

@@ -0,0 +1,31 @@
<?php
// login.php
$lang['admin']['tl001'] = '패스워드가 일치하지 않습니다.';
$lang['admin']['tl002'] = '로그인 정보를 저장하시겠습니까?';
$lang['admin']['tl003'] = '로그인 정보를 저장할 경우 다음접속시 정보를 입력하지 않으셔도 됩니다.<br>그러나, 개인PC가 아닐 경우 타인이 로그인할 수 있습니다.<br>PC를 여러사람이 사용하는 공공장소에서는 체크하지 마세요.';
$lang['admin']['tl004'] = '임시 패스워드를 가입하신 이메일로 받으시겠습니까?';
// front.php
$lang['admin']['tf001'] = '대시보드 꾸미기';
$lang['admin']['tf002'] = '북마크';
$lang['admin']['tf003'] = '북마크에 추가';
$lang['admin']['tf004'] = '북마크 관리';
$lang['admin']['tf005'] = '추가됨';
$lang['admin']['tf006'] = '북마크에서 삭제';
$lang['admin']['tf007'] = '등록된 북마크가 없습니다';
$lang['admin']['tf008'] = '모듈정보';
$lang['admin']['tf009'] = '%s 모듈정보';
$lang['admin']['tf010'] = '마켓보기';
$lang['admin']['tf011'] = '저장소 보기';
$lang['admin']['tf012'] = '이슈 접수';
$lang['admin']['tf013'] = '웹사이트';
$lang['admin']['tf014'] = '도움말';
$lang['admin']['tf015'] = '대시보드 설정';
$lang['admin']['tf016'] = '홈으로';
$lang['admin']['tf017'] = '로그아웃';
$lang['admin']['tf018'] = '바로가기';
$lang['admin']['tf019'] = '대시보드';
$lang['admin']['tf020'] = '사이트';
$lang['admin']['tf021'] = '더보기';
$lang['admin']['tf022'] = '<a href="http://www.kimsq.com/" target="_blank" rel="nofollow">킴스큐</a>를 사용해 주셔서 감사 드립니다.';
?>

View File

@@ -0,0 +1,401 @@
<?php
// common
$lang['admin']['time1'] = 'ko'; // timego language
$lang['admin']['a0001'] = '정말로 실행하시겠습니까?';
// main.php
$lang['admin']['a1001'] = '시스템 환경';
$lang['admin']['a1002'] = '웹서버';
$lang['admin']['a1003'] = '시스템 메일';
$lang['admin']['a1004'] = '정상';
$lang['admin']['a1005'] = '이메일 전송확인';
$lang['admin']['a1006'] = '입력한 이메일주소로 전송이 되면 메일서버가 정상작동되는 상태입니다.';
$lang['admin']['a1007'] = '시스템 테마 및 특수기능';
$lang['admin']['a1008'] = '관리자 테마';
$lang['admin']['a1009'] = '관리패널 테마';
$lang['admin']['a1010'] = 'CSS/JS 캐시';
$lang['admin']['a1011'] = '브라우져 설정을 따름';
$lang['admin']['a1012'] = '접속시마다 갱신';
$lang['admin']['a1013'] = '한시간 단위로 갱신';
$lang['admin']['a1014'] = '하루 단위로 갱신';
$lang['admin']['a1015'] = '한달 단위로 갱신';
$lang['admin']['a1016'] = '일년 단위로 갱신';
$lang['admin']['a1017'] = 'CSS 나 자바스크립트 파일을 수정했을 경우에는 일정기간 접속시마다 갱신되도록 설정해 주세요.';
$lang['admin']['a1018'] = '제거(Uninstall)';
$lang['admin']['a1019'] = '출력하지 않음';
$lang['admin']['a1020'] = '출력함';
$lang['admin']['a1021'] = '킴스큐는 전체 파일 및 DB 데이터를 일괄 삭제(Uninstall)할 수 있는 도구를 제공합니다.<br class="hidden-xs">그러나 매우 유의해야 하는 작업이므로 반드시 필요한 경우에만 출력하여 사용하세요.';
$lang['admin']['a1022'] = '더블클릭 전환';
$lang['admin']['a1023'] = '사용함';
$lang['admin']['a1024'] = '사용안함';
$lang['admin']['a1025'] = '메뉴,페이지,모듈등의 페이지에서 화면 더블클릭시 관련 콘텍스트 메뉴를 이용해 화면을 전환할 수 있습니다.';
$lang['admin']['a1026'] = '위지위그 에디터';
$lang['admin']['a1027'] = '위지위그 에디터는 플러그인 폴더(%s)에 추가될 수 있습니다.<br class="hidden-xs">에디터를 변경하시려면 플러그인에 추가 후 버젼선택 후에 변경해 주세요.';
$lang['admin']['a1028'] = '시스템 언어';
$lang['admin']['a1029'] = '이 설정을 이용해서 킴스큐 전체의 언어를 제어합니다.<br class="hidden-xs">개별 사이트나 모듈에서도 사용할 언어를 지정할 수 있습니다.';
$lang['admin']['a1030'] = '이메일';
$lang['admin']['a1031'] = 'SMTP 계정이 필요합니다.';
$lang['admin']['a1032'] = '호스팅 서버환경에서는 발송메일이 스펨으로 분류되어 차단될 수 있습니다.';
$lang['admin']['a1033'] = '예) smtp.mail.com';
$lang['admin']['a1034'] = 'SMTP 인증 필요';
$lang['admin']['a1035'] = '일반';
$lang['admin']['a1036'] = '인증 아이디';
$lang['admin']['a1037'] = '인증 암호';
$lang['admin']['a1038'] = 'SMTP 연결확인';
$lang['admin']['a1039'] = '시스템 대표메일로 전송이 되면 메일서버가 정상 작동되는 상태입니다.';
$lang['admin']['a1040'] = 'FTP 계정';
$lang['admin']['a1041'] = '일부기능에 제한이 있거나 보안에 취약할 수 있습니다.';
$lang['admin']['a1042'] = '예) example.kimsq.com 또는 IP adress 입력';
$lang['admin']['a1043'] = '킴스큐 경로';
$lang['admin']['a1044'] = 'FTP로 접속했을때 처음 접속된 경로부터 킴스큐Rb가 설치된 경로를 입력해 주세요.';
$lang['admin']['a1045'] = '경로의 처음과 마지막은 반드시 슬래쉬(/)로 끝나야 합니다.';
$lang['admin']['a1046'] = '보기)<code>/rb/</code> 또는 <code>/www/rb/</code> 또는 <code>/public_html/rb/</code>';
$lang['admin']['a1047'] = 'FTP 연결확인';
$lang['admin']['a1048'] = '저장하기';
$lang['admin']['a1049'] = '응답을 기다리는 중입니다. 잠시 기다려 주세요.';
$lang['admin']['a1050'] = '시스템 이메일 주소를 입력해 주세요.';
$lang['admin']['a1051'] = 'SMTP 서버주소를 입력해 주세요.';
$lang['admin']['a1052'] = 'SMTP 포트번호를 입력해 주세요.';
$lang['admin']['a1053'] = '인증 아이디를 입력해 주세요.';
$lang['admin']['a1054'] = '인증 암호를 입력해 주세요.';
$lang['admin']['a1055'] = 'FTP 서버주소를 입력해 주세요.';
$lang['admin']['a1056'] = 'FTP 포트번호를 입력해 주세요.';
$lang['admin']['a1057'] = 'FTP 아이디를 입력해 주세요.';
$lang['admin']['a1058'] = 'FTP 암호를 입력해 주세요.';
$lang['admin']['a1059'] = '킴스큐 경로를 입력해 주세요.';
$lang['admin']['a1060'] = '시작모듈';
$lang['admin']['a1061'] = '킴스큐를 구동시키는 기본 모듈이며 모듈을 지정하지 않고 호출시 이 모듈이 기본모듈로서 구동됩니다.<br class="hidden-xs">이 설정은 특별한 경우가 아니면 변경하지 마십시오.';
$lang['admin']['a1062'] = '소스코드 에디터';
$lang['admin']['a1063'] = '소스코드 편집시 사용할 에디터 테마를 선택해 주세요. <a href="http://codemirror.net/demo/theme.html" target="_blank">테마보기</a>';
// seo.php
$lang['admin']['a3001'] = '파일위치';
$lang['admin']['a3002'] = '새로 만들기';
$lang['admin']['a3003'] = '정말로 삭제하시겠습니까?';
$lang['admin']['a3004'] = '삭제하기';
$lang['admin']['a3005'] = '저장하기';
$lang['admin']['a3006'] = 'robots.txt 파일은 웹 크롤러 소프트웨어(예: Googlebot)가 사이트의 특정 페이지를 크롤링하지 못하도록 하는 텍스트 파일입니다.';
$lang['admin']['a3007'] = '이 파일은 기본적으로 Allow와 Disallow와 같은 명령어 목록으로 구성되어 웹 크롤러가 검색할 수 있는 URL과 검색할 수 없는 URL을 지정합니다.';
$lang['admin']['a3008'] = '<a href="https://support.google.com/webmasters/answer/6062608?hl=ko" target="_blank">더보기</a>';
$lang['admin']['a3009'] = 'robots.txt 파일은 서버의 홈디렉토리 안에 위치해야 합니다.';
$lang['admin']['a3010'] = '여기를 클릭하면 기본값을 불러옵니다.';
$lang['admin']['a3011'] = '킴스큐 설치시 기본폴더명인 rb 를 다른이름으로 변경했을 경우 변경된 이름으로 수정해 주세요.';
$lang['admin']['a3012'] = 'rb 폴더를 사용하지 않고 설치하셨을 경우 경로중 /rb 를 제거해 주세요.';
$lang['admin']['a3013'] = '파일을 편집한 후 저장 버튼을 클릭하면 실시간으로 사용자 페이지에 적용됩니다.';
$lang['admin']['a3014'] = 'URL Rewrite 설정';
$lang['admin']['a3015'] = '간편 URL(영어: clean URL, fancy URL)은 질의어 없이, 경로만 가진 간단한 구조의 URL을 말한다.';
$lang['admin']['a3016'] = '사용자 친화적 URL(영어: user-friendly URLs), 검색엔진 친화적 URL(영어: search engine friendly url) 또는 간단히 친화적 URL이라고도 한다. 깔끔하지 않은 URL에 비해 기억하기 쉽고, 입력하기 쉽다는 장점이 있다.';
$lang['admin']['a3017'] = '<a href="http://ko.wikipedia.org/wiki/%EA%B0%84%ED%8E%B8_URL" target="_blank">더보기</a>';
$lang['admin']['a3018'] = '파일을 직접 추가하거나 수정하시려면 FTP 클라이언트로 다운로드 받아 백업받은 후 로컬에서 편집 후 업로드 적용할 것을 권장합니다.';
$lang['admin']['a3019'] = '웹을 통한 편집은 제공하지 않습니다.';
$lang['admin']['a3020'] = 'Sitemap을 사용하면 검색엔진(Google)이 발견하지 못했을 수도 있는 사이트의 페이지 정보를 검색엔진에 알릴 수 있습니다.';
$lang['admin']['a3021'] = '간단히 말해서 XML Sitemap은 웹사이트에 있는 페이지의 목록입니다.';
$lang['admin']['a3022'] = 'Sitemap을 만들어 제출하면 검색엔진의 일반적인 크롤링 과정에서 발견되지 않는 URL을 비롯하여 사이트의 모든 페이지 정보를 검색엔진에 알릴 수 있습니다.';
$lang['admin']['a3023'] = '본 파일은 <a href="http://www.sitemaps.org/ko/" target="_blank">sitemaps.org</a> 사이트에 명시된 바와 같이 Sitemap Protocol 0.9를 따릅니다.';
$lang['admin']['a3024'] = '따라서 Sitemap Protocol 0.9를 사용하여 만든 Google용 Sitemap은 sitemaps.org의 기준을 채택한 다른 검색엔진과 호환됩니다.';
$lang['admin']['a3025'] = '사이트맵을 직접 추가하거나 수정하시려면 <a href="https://support.google.com/webmasters/bin/answer.py?hl=ko&amp;answer=183668" target="_blank">사이트맵을 만드는 방법</a>에 맞게 편집해 주세요.';
$lang['admin']['a3026'] = '파일용량이 클 경우 다운로드 받아 PC에서 편집할 것을 권장합니다.';
$lang['admin']['a3027'] = '사이트맵이 존재하지 않습니다.';
$lang['admin']['a3028'] = '새로 만들기 버튼을 클릭하여 사이트맵을 만들어 주세요.';
$lang['admin']['a3029'] = '메뉴를 새로 생성한 경우에 새로 만들기 버튼을 클릭하면 가장 최신의 사이트맵 상태를 유지할 수 있습니다.';
$lang['admin']['a3030'] = '파일을 편집한 후 저장 버튼을 클릭하면 실시간으로 사용자 페이지에 적용됩니다.';
$lang['admin']['a3031'] = '<a href="http://www.sitemaps.org/" target="_blank">Sitemap 프로토콜</a>을 기반으로 하여 Sitemap을 만들거나 텍스트 파일 또는 RSS/Atom 피드를 Sitemap으로 제출할 수 있습니다.';
$lang['admin']['a3032'] = '<a href="https://support.google.com/webmasters/bin/answer.py?answer=183668" target="_blank">Sitemap을 만드는 방법</a>';
$lang['admin']['a3033'] = '<a href="https://www.google.co.kr/webmasters/" target="_blank">Google 웹마스터 도구</a>';
$lang['admin']['a3034'] = '<a href="http://www.htaccessbasics.com/404-custom-error-page/" target="_blank">How to Redirect your 404 error to a Custom Page</a>';
$lang['admin']['a3035'] = '<a href="http://stackoverflow.com/questions/19962787/rewrite-url-after-redirecting-404-error-htaccess" target="_blank">Rewrite URL after redirecting 404 error htaccess</a>';
$lang['admin']['a3036'] = '<a href="http://www.etnews.com/201312200346" target="_blank">네이버 검색에 잘 걸리는 웹페이지 만들기 비법은?</a>';
$lang['admin']['a3037'] = '<a href="http://search-marketing.co.kr/50043928552" target="_blank">검색엔진최적화 - 404 에러페이지 처리</a>';
$lang['admin']['a3038'] = '<a href="http://moz.com/blog/are-404-pages-always-bad-for-seo" target="_blank">Are 404 Pages Always Bad for SEO?</a>';
$lang['admin']['a3039'] = '기본 페이지 목록에 404 Error 페이지 추가 필요';
$lang['admin']['a3040'] = '.htaccess에 <code>ErrorDocument 404 /errormessages/404.php</code> 형식으로 404페이지 지정 필요.';
$lang['admin']['a3041'] = '<a href="http://blog.iolate.kr/162" target="_blank">Permanently Redirect (301)</a>';
$lang['admin']['a3042'] = '<a href="http://www.etnews.com/201312200346" target="_blank">사이트나 페이지 변경 시 301 redirect를 사용할 것</a>';
$lang['admin']['a3043'] = '<a href="http://www.htaccessbasics.com/how-to-setup-a-301-redirect/" target="_blank">How to setup a 301 Redirect</a>';
$lang['admin']['a3044'] = '정말로 사이트맵을 새로 만드시겠습니까?';
// ssl.php
$lang['admin']['a4001'] = 'SSL 환경설정';
$lang['admin']['a4002'] = 'SSL 적용';
$lang['admin']['a4003'] = '적용안함';
$lang['admin']['a4004'] = '코드값 적용';
$lang['admin']['a4005'] = '[주의] 아래의 안내사항을 확인하셨나요?';
$lang['admin']['a4006'] = '전체사이트 적용';
$lang['admin']['a4007'] = '보안서버가 설치되지 않은 상태에서 전체사이트 적용을 체크하시면 사이트에 접속할 수 없게 됩니다.';
$lang['admin']['a4008'] = '반드시 보안서버 설치 후 체크해 주세요.';
$lang['admin']['a4009'] = '혹, 보안서버 미설치 상태에서 전체사이트 체크 후 이상이 생겼을 경우에는 킴스큐 공식포털에서 해결방법을 얻을 수 있습니다.';
$lang['admin']['a4010'] = 'http 포트번호';
$lang['admin']['a4011'] = '80포트일 경우 공백으로 두세요.';
$lang['admin']['a4012'] = 'SSL 포트번호';
$lang['admin']['a4013'] = 'SSL 적용모듈';
$lang['admin']['a4014'] = '적용할 모듈의 아이디(폴더명)를 콤마(,)로 구분해서 등록해 주세요.';
$lang['admin']['a4015'] = '보기) <code>/rb/?m=member</code> 일 경우 코드값은 <code>member</code>';
$lang['admin']['a4016'] = 'SSL 적용메뉴';
$lang['admin']['a4017'] = '적용할 메뉴의 코드값을 콤마(,)로 구분해서 등록해 주세요.';
$lang['admin']['a4018'] = '보기) <code>/rb/?c=ssl</code> 일 경우 코드값은 <code>ssl</code>';
$lang['admin']['a4019'] = 'SSL 적용페이지';
$lang['admin']['a4020'] = '적용할 페이지의 코드값을 콤마(,)로 구분해서 등록해 주세요.';
$lang['admin']['a4021'] = '보기) <code>/rb/?mod=ssl</code> 일 경우 코드값은 <code>ssl</code>';
$lang['admin']['a4022'] = '정보변경';
// security.php
$lang['admin']['a5001'] = '보안설정';
$lang['admin']['a5002'] = '에디터 제한태그';
$lang['admin']['a5003'] = '제한할 태그를 콤마(,)로 구분해서 등록해 주세요.';
$lang['admin']['a5004'] = '보기) iframe,script,style,meta,';
$lang['admin']['a5005'] = '킴스큐에 포함된 위지위그 에디터를 사용할 경우 편리하게 문서를 편집할 수 있으나 특정태그를 허용하게 되면 XSS(Cross-site scripting, 크로스 사이트 스크립팅) 나 CSRF(Cross Site Request Forgery, 크로스 사이트 요청 변조)공격을 받을 수 있으므로 주의해야 합니다.';
$lang['admin']['a5006'] = '특히 <code>iframe</code> 이나 <code>script</code> 는 특수한 경우가 아니면 허용하지 말아야 합니다.';
$lang['admin']['a5007'] = 'iframe 허용도메인';
$lang['admin']['a5008'] = '허용할 도메인을 콤마(,)로 구분해서 등록해 주세요.';
$lang['admin']['a5009'] = 'iframe 태그를 허용하지 않아도 등록된 도메인들은 <code>iframe</code> 이 허용됩니다.';
$lang['admin']['a5010'] = '보기) youtube.com,naver.com,daum.net,vimeo.com,';
$lang['admin']['a5011'] = '파라미터 공격차단';
$lang['admin']['a5012'] = '특정 파라미터를 이용하여 액션을 요청하거나 공격할 경우 제한할 패턴을 등록해 주세요.';
$lang['admin']['a5013'] = '보기) ;a=,&a=,?a=,m=admin,system=,';
$lang['admin']['a5014'] = '정보변경';
// switch.php
$lang['admin']['a6001'] = '스타트 스위치';
$lang['admin']['a6002'] = '탑 스위치';
$lang['admin']['a6003'] = '헤더 스위치';
$lang['admin']['a6004'] = '풋터 스위치';
$lang['admin']['a6005'] = '엔드 스우치';
$lang['admin']['a6006'] = '스위치 관리';
$lang['admin']['a6007'] = '스위치 추가';
$lang['admin']['a6008'] = '스위치 업데이트';
$lang['admin']['a6009'] = '스위치 등록정보';
$lang['admin']['a6010'] = '선택된 스위치 대한 등록정보입니다.';
$lang['admin']['a6011'] = '편집하기';
$lang['admin']['a6012'] = '안내문서 보기';
$lang['admin']['a6013'] = '정말로 삭제시겠습니까?';
$lang['admin']['a6014'] = '삭제하기';
$lang['admin']['a6015'] = '적용 사이트';
$lang['admin']['a6016'] = '전체선택';
$lang['admin']['a6017'] = '전체취소';
$lang['admin']['a6018'] = '저장하기';
$lang['admin']['a6019'] = '파일경로';
$lang['admin']['a6020'] = '전체화면';
$lang['admin']['a6021'] = '파일을 편집한 후 저장 버튼을 클릭하면 실시간으로 사용자 페이지에 적용됩니다.';
$lang['admin']['a6022'] = '사용 가이드';
$lang['admin']['a6023'] = '스위치는 프로그램의 실행단계를 5개의 구역으로 분리하여 각각의 구역에 실행여부를 온/오프 할 수 있는 응용 프로그램입니다.';
$lang['admin']['a6024'] = '너무 많은 스위치를 동작시킬 경우 실행속도에 영향을 줄 수 있으니 꼭 필요한 스위치만 사용하세요.';
$lang['admin']['a6025'] = '프로그램 시작과 함께 DB연결,주요파일 로드 후 실행됩니다.';
$lang['admin']['a6026'] = '모듈 및 레이아웃에 대한 정의후 화면출력 직전에 실행됩니다.';
$lang['admin']['a6027'] = 'head 태그를 닫기 직전에 실행됩니다.';
$lang['admin']['a6028'] = 'body 태그를 닫기 직전에 실행됩니다.';
$lang['admin']['a6029'] = '화면출력을 끝내고 실행됩니다.';
$lang['admin']['a6030'] = '스위치 실행 스트럭처 보기';
$lang['admin']['a6031'] = '스위치명을 입력해 주세요.';
$lang['admin']['a6032'] = '정말로 실행하시겠습니까?';
$lang['admin']['a6033'] = '스위치 실행 스트럭처';
$lang['admin']['a6034'] = '프로그램 시작';
$lang['admin']['a6035'] = 'DB연결';
$lang['admin']['a6036'] = '주요파일 로드';
$lang['admin']['a6037'] = '모듈 정의';
$lang['admin']['a6038'] = '레이아웃 정의';
$lang['admin']['a6039'] = '화면에 출력되는 부분';
$lang['admin']['a6040'] = '기초 헤드';
$lang['admin']['a6041'] = '콘텐츠 영역';
$lang['admin']['a6042'] = '닫기';
// plugin.php
$lang['admin']['a7001'] = '플러그인 <span>(총 %d개 / <span id="_sum_size_"></span>)</span>';
$lang['admin']['a7002'] = '플러그인명';
$lang['admin']['a7003'] = '용량(파일수)';
$lang['admin']['a7004'] = '등록일';
$lang['admin']['a7005'] = '적용버전';
$lang['admin']['a7006'] = 'Y.m.d H:i'; //date format
$lang['admin']['a7007'] = '전체삭제';
$lang['admin']['a7008'] = '버젼삭제';
$lang['admin']['a7009'] = '플러그인 추가';
$lang['admin']['a7010'] = '버젼변경';
$lang['admin']['a7011'] = '킴스큐에서는 오픈소스로 제공되는 다양한 외부 플러그인들이 사용되고 있습니다.';
$lang['admin']['a7012'] = '현재 사용되고 있는 플러그인들의 최신버젼이나 최적화된 버젼을 동적으로 설정할 수 있습니다.';
$lang['admin']['a7013'] = '삽입코드 예시';
$lang['admin']['a7014'] = '삭제할 플러그인을 선택해 주세요.';
$lang['admin']['a7015'] = '사용중인 플러그인을 삭제하면 사이트에 오류가 발생할 수 있습니다.\n그래도 삭제하시겠습니까?';
// update.php
$lang['admin']['a8001'] = '킴스큐 원격 업데이트';
$lang['admin']['a8002'] = '원격 업데이트를 이용하시면 킴스큐Rb를 항상 최신의 상태로 유지할 수 있습니다. <br>패치 및 업데이트 내용에 따라서 업데이트를 진행해 주세요.';
$lang['admin']['a8003'] = '버전';
$lang['admin']['a8004'] = '패치/업데이트';
$lang['admin']['a8005'] = '적용일자';
$lang['admin']['a8006'] = '처리여부';
$lang['admin']['a8007'] = '관리';
$lang['admin']['a8008'] = '업데이트 내역 보기';
$lang['admin']['a8009'] = '정보가 없는 없데이트입니다';
$lang['admin']['a8010'] = '파일 다운로드';
$lang['admin']['a8011'] = '완료됨';
$lang['admin']['a8012'] = '수동';
$lang['admin']['a8013'] = '원격';
$lang['admin']['a8014'] = '업데이트기록 제거';
$lang['admin']['a8015'] = '정말로 업데이트 기록을 제거하시겠습니까?';
$lang['admin']['a8016'] = '기록제거';
$lang['admin']['a8017'] = '미적용';
$lang['admin']['a8018'] = '정말로 업데이트 하시겠습니까?';
$lang['admin']['a8019'] = '원격 업데이트';
$lang['admin']['a8020'] = '정말로 수동으로 업데이트 처리하시겠습니까?\n수동 업데이트 처리시 원격업데이트는 건너뜁니다.';
$lang['admin']['a8021'] = '수동 업데이트';
$lang['admin']['a8022'] = '업데이트 대기리스트가 없습니다.';
$lang['admin']['a8023'] = '원격 업데이트 도움말';
$lang['admin']['a8024'] = '원격 업데이트는 킴스큐의 코어 및 관련 파일들을 항상 최신의 상태로 유지할 수 있는 시스템입니다.';
$lang['admin']['a8025'] = '그러나 사용자가 직접 수정하거나 커스터마이징 한 사항이 업데이트 내역에 포함되어 있을 경우 해당사항이 덧씌워 지므로 이 경우 반드시 수작업으로 패치한 후 수동 업데이트를 클릭해 주어야 합니다.';
$lang['admin']['a8026'] = '정상적으로 업데이트 되지 않았거나 재 업데이트를 원하시면 기록을 제거한 후 재시도해 주세요.';
$lang['admin']['a8027'] = '이 작업은 데이터의 용량이나 처리내용에 따라서 다소 시간이 걸릴 수 있습니다.';
// uninstall.php
$lang['admin']['a9001'] = '킴스큐Rb의 모든데이터(폴더/파일/DB)를 제거합니다.';
$lang['admin']['a9002'] = '제거과정에서 쓰기퍼미션이 없는 일부 파일이나 폴더가 남을 수 있습니다.';
$lang['admin']['a9003'] = '남은 폴더/파일은 FTP를 이용해서 삭제해 주세요.';
$lang['admin']['a9004'] = '삭제된 데이터는 복구할 수 없습니다.';
$lang['admin']['a9005'] = '삭제 정보';
$lang['admin']['a9006'] = '경로';
$lang['admin']['a9007'] = 'DB table 정보';
$lang['admin']['a9008'] = 'FTP 접속암호';
$lang['admin']['a9009'] = 'FTP 접속암호 암호를 입력해 주세요';
$lang['admin']['a9010'] = '정상';
$lang['admin']['a9011'] = 'FTP 연결확인';
$lang['admin']['a9012'] = '제거과정에서 쓰기퍼미션이 없는 일부 파일이나 폴더가 남을 수 있습니다.';
$lang['admin']['a9013'] = 'FTP 계정등록후 제거를 추천 드립니다.';
$lang['admin']['a9014'] = '제거';
$lang['admin']['a9015'] = '정말 삭제하시겠습니까?';
$lang['admin']['a9016'] = '킴스큐Rb의 모든데이터(폴더/파일/DB)를 제거합니다.';
$lang['admin']['a9017'] = '제거과정에서 쓰기퍼미션이 없는 일부 파일이나 폴더가 남을 수 있습니다.';
$lang['admin']['a9018'] = '남은 폴더/파일은 FTP를 이용해서 삭제해 주세요.';
$lang['admin']['a9019'] = '삭제된 데이터는 복구할 수 없습니다.';
$lang['admin']['a9020'] = '네, 삭제하겠습니다.';
$lang['admin']['a9021'] = 'FTP 패스워드를 입력해 주세요.';
// admin.php
$lang['admin']['aa001'] = '승인';
$lang['admin']['aa002'] = '보류';
$lang['admin']['aa003'] = '대기';
$lang['admin']['aa004'] = '탈퇴';
$lang['admin']['aa005'] = '사용자 정보관리';
$lang['admin']['aa006'] = '관리자';
$lang['admin']['aa007'] = '일반회원';
$lang['admin']['aa008'] = '%d명';
$lang['admin']['aa009'] = '이전';
$lang['admin']['aa010'] = '다음';
$lang['admin']['aa011'] = '상태';
$lang['admin']['aa012'] = '구분';
$lang['admin']['aa013'] = '이름';
$lang['admin']['aa014'] = '닉네임';
$lang['admin']['aa015'] = '아이디';
$lang['admin']['aa016'] = '연락처';
$lang['admin']['aa017'] = '최근접속';
$lang['admin']['aa018'] = '온라인';
$lang['admin']['aa019'] = '오프라인';
$lang['admin']['aa020'] = '최고관리자';
$lang['admin']['aa021'] = '부관리자';
$lang['admin']['aa022'] = 'Y.m.d H:i'; // date format
$lang['admin']['aa023'] = '%d일전';
$lang['admin']['aa024'] = '관리제한';
$lang['admin']['aa025'] = '정보변경';
$lang['admin']['aa026'] = '관리';
$lang['admin']['aa027'] = '회원승인 상태변경';
$lang['admin']['aa028'] = '관리자에서 제외';
$lang['admin']['aa029'] = '관리자로 추가';
$lang['admin']['aa030'] = '데이터 삭제';
$lang['admin']['aa031'] = '관리자 추가';
$lang['admin']['aa032'] = '회원 추가';
$lang['admin']['aa033'] = '4~12자의 영문(소문자)과 숫자만 사용';
$lang['admin']['aa034'] = '중복확인';
$lang['admin']['aa035'] = '비밀번호';
$lang['admin']['aa036'] = '프로필';
$lang['admin']['aa037'] = '이미지 파일 선택됨';
$lang['admin']['aa038'] = '찾아보기';
$lang['admin']['aa039'] = '<code>jpg</code> 파일을 등록해주세요.';
$lang['admin']['aa040'] = '이름을 입력해주세요';
$lang['admin']['aa041'] = '닉네임을 입력해주세요';
$lang['admin']['aa042'] = '이메일';
$lang['admin']['aa043'] = '이메일을 입력해주세요';
$lang['admin']['aa044'] = '비밀번호 분실시에 사용됩니다. 정확하게 입력하세요.';
$lang['admin']['aa045'] = '예) 010-000-0000';
$lang['admin']['aa046'] = '취소';
$lang['admin']['aa047'] = '등록하기';
$lang['admin']['aa048'] = '아이디를 입력해주세요.';
$lang['admin']['aa049'] = '4~12자의 영문(소문자)과 숫자만 사용할 수 있습니다.';
$lang['admin']['aa050'] = '비밀번호를 입력해주세요';
$lang['admin']['aa051'] = '비밀번호를 다시 입력해주세요';
$lang['admin']['aa052'] = '이름(실명)을 입력해주세요';
$lang['admin']['aa053'] = '닉네임을 입력해주세요';
$lang['admin']['aa054'] = '이메일을 입력해주세요';
$lang['admin']['aa055'] = '응답을 기다리는 중입니다. 잠시 기다려 주세요.';
$lang['admin']['aa056'] = '비밀번호가 서로 일치하지 않습니다.';
$lang['admin']['aa057'] = '회원(관리자)을 선택해 주세요.';
// bookmark.php & modal.bookmark.php
$lang['admin']['ab001'] = '북마크 관리';
$lang['admin']['ab002'] = '등록된 북마크가 없습니다.';
$lang['admin']['ab003'] = '전체선택';
$lang['admin']['ab004'] = '전체취소';
$lang['admin']['ab005'] = '삭제';
$lang['admin']['ab006'] = '도움말';
$lang['admin']['ab007'] = '즐겨찾는 페이지를 상하로 드래그하면 실시간으로 순서가 변경됩니다.';
$lang['admin']['ab008'] = '삭제하려면 체크 후 삭제버튼을 클릭해 주세요.';
$lang['admin']['ab009'] = '삭제할 북마크를 선택해 주세요.';
$lang['admin']['ab010'] = '정말로 북마크에서 제외하시겠습니까?';
// modal.bookmark.php
$lang['admin']['ac001'] = '북마크 관리';
// modal.admininfo.php
$lang['admin']['ad001'] = '프로필';
$lang['admin']['ad002'] = '정보변경';
$lang['admin']['ad003'] = '접속기록';
$lang['admin']['ad004'] = '관리제한';
$lang['admin']['ad005'] = '아이디';
$lang['admin']['ad006'] = '이름';
$lang['admin']['ad007'] = '닉네임';
$lang['admin']['ad008'] = '이메일';
$lang['admin']['ad009'] = '연락처';
$lang['admin']['ad010'] = '미등록';
$lang['admin']['ad011'] = 'Y.m.d H:i'; // date format
$lang['admin']['ad012'] = '최근접속';
$lang['admin']['ad013'] = '등록일';
$lang['admin']['ad014'] = '%d일전';
$lang['admin']['ad015'] = '기록없음';
$lang['admin']['ad016'] = '비밀번호';
$lang['admin']['ad017'] = '프로필';
$lang['admin']['ad018'] = '이미지 파일 선택됨';
$lang['admin']['ad019'] = '찾아보기';
$lang['admin']['ad020'] = '<code>jpg</code> 파일을 등록해주세요.';
$lang['admin']['ad021'] = '현재 아바타 삭제';
$lang['admin']['ad022'] = '중복확인';
$lang['admin']['ad023'] = '예) 010-000-0000';
$lang['admin']['ad024'] = '비밀번호 분실시에 사용됩니다. 정확하게 입력하세요.';
$lang['admin']['ad025'] = '총 %d건';
$lang['admin']['ad026'] = '전체사이트';
$lang['admin']['ad027'] = '시작일 선택';
$lang['admin']['ad028'] = '종료일 선택';
$lang['admin']['ad029'] = '기간적용';
$lang['admin']['ad030'] = '번호';
$lang['admin']['ad031'] = '아이피';
$lang['admin']['ad032'] = '접속경로';
$lang['admin']['ad033'] = '브라우져';
$lang['admin']['ad034'] = '기기';
$lang['admin']['ad035'] = '날짜';
$lang['admin']['ad036'] = '접속기록이 없습니다.';
$lang['admin']['ad037'] = '검색어를 입력해주세요';
$lang['admin']['ad038'] = '검색';
$lang['admin']['ad039'] = '리셋';
$lang['admin']['ad040'] = '<strong>접근을 제한할 모듈</strong>을 선택해 주세요.';
$lang['admin']['ad041'] = '전체선택';
$lang['admin']['ad042'] = '온라인';
$lang['admin']['ad043'] = '오프라인';
$lang['admin']['ad044'] = '부관리자';
$lang['admin']['ad045'] = '최고관리자';
$lang['admin']['ad046'] = '일반회원';
$lang['admin']['ad047'] = '<strong>%s</strong> 님의 정보';
$lang['admin']['ad048'] = '정보 수정하기';
$lang['admin']['ad049'] = '권한 제한하기';
$lang['admin']['ad050'] = '닫기';
$lang['admin']['ad051'] = '응답을 기다리는 중입니다. 잠시 기다려 주세요.';
$lang['admin']['ad052'] = '비밀번호가 서로 일치하지 않습니다.';
$lang['admin']['ad053'] = '이름을 입력해 주세요.';
$lang['admin']['ad054'] = '닉네임을 입력해 주세요.';
$lang['admin']['ad055'] = '이메일을 입력해 주세요.';
$lang['admin']['ad056'] = '정말로 수정하시겠습니까?';
?>

View File

@@ -0,0 +1,26 @@
<?php
$lang['admin']['flag'] = 'ko';
// main.engine.php
$lang['admin']['em001'] = '존재하지 않는 페이지입니다.';
$lang['admin']['em002'] = '존재하지 않는 메뉴이거나 이 메뉴를 접근할 수 없는 도메인입니다. 확인해 주세요.';
// foot.engine.php
$lang['admin']['ef001'] = '메뉴 등록정보';
$lang['admin']['ef002'] = '페이지 등록정보';
$lang['admin']['ef003'] = '소스코드 편집모드';
$lang['admin']['ef004'] = '위젯 편집모드';
$lang['admin']['ef005'] = '위지위그 편집모드';
$lang['admin']['ef006'] = '새 메뉴 만들기';
$lang['admin']['ef007'] = '새 페이지 만들기';
$lang['admin']['ef008'] = '관리자모드 보기';
$lang['admin']['ef009'] = '모듈 등록정보';
// notification.engine.php
$lang['admin']['en001'] = $my[$_HS['nametype']].'님, {num} 개의 새 알림이 있습니다.';
$lang['admin']['en002'] = '네, 확인하였습니다';
// modules/admin/main.php
$lang['admin']['ex001'] = '등록되지 않는 모듈입니다.';
$lang['admin']['ex002'] = '접근권한이 없습니다.';
?>

View File

@@ -0,0 +1,15 @@
<?php
//sys.func.php
$lang['admin']['sex'] = array('남','여');
$lang['admin']['week'] = array('일','월','화','수','목','금','토');
$lang['admin']['time'] = array('초','분','시간','일','달','년');
$lang['admin']['fs001'] = '관리권한이 없습니다.';
$lang['admin']['fs002'] = '숨김';
$lang['admin']['fs003'] = '차단';
$lang['admin']['fs004'] = '새창';
$lang['admin']['fs005'] = '모바일';
// lib/getContent.lib.php
$lang['admin']['fl001'] = '여기에 삽입된 요소는 보안이슈로 인해 출력이 제한되었습니다.';
?>

View File

@@ -0,0 +1,79 @@
<?php
// adminpanel.engine.php
$lang['admin']['p001'] = '킴스큐 관리모드';
$lang['admin']['p002'] = '고정하기';
$lang['admin']['p003'] = '숨기기';
$lang['admin']['p004'] = '펼치기';
$lang['admin']['p005'] = '접기';
$lang['admin']['p006'] = '프로필관리';
$lang['admin']['p007'] = '접속기록';
$lang['admin']['p008'] = '알림';
$lang['admin']['p009'] = '로그아웃';
$lang['admin']['p010'] = '만들기';
$lang['admin']['p011'] = '새 사이트';
$lang['admin']['p012'] = '새 메뉴';
$lang['admin']['p013'] = '새 페이지';
$lang['admin']['p014'] = '캐시 재생성';
$lang['admin']['p015'] = '미디어셋';
$lang['admin']['p016'] = '포토셋';
$lang['admin']['p017'] = '비디오셋';
$lang['admin']['p018'] = '위젯코드';
$lang['admin']['p019'] = '대시보드';
$lang['admin']['p020'] = '홈페이지';
$lang['admin']['p021'] = '패키지 설치';
$lang['admin']['p022'] = '확장요소 추가하기';
$lang['admin']['p023'] = '모듈';
$lang['admin']['p024'] = '레이아웃';
$lang['admin']['p025'] = '위젯';
$lang['admin']['p026'] = '스위치';
$lang['admin']['p027'] = '플러그인';
$lang['admin']['p028'] = '대시보드';
$lang['admin']['p029'] = '기타자료';
$lang['admin']['p030'] = '새창';
$lang['admin']['p031'] = '퀵패널';
$lang['admin']['p032'] = '모듈패널';
$lang['admin']['p033'] = '사이트패널';
$lang['admin']['p034'] = '기본정보';
$lang['admin']['p035'] = '사이트 라벨';
$lang['admin']['p036'] = '타이틀 구성';
$lang['admin']['p037'] = '사이트 코드';
$lang['admin']['p038'] = '저장하기';
$lang['admin']['p039'] = '입력된 내용은 브라우저의 타이틀로 사용됩니다.<br>치환코드는 매뉴얼을 참고하세요.';
$lang['admin']['p040'] = '레이아웃';
$lang['admin']['p041'] = '기본';
$lang['admin']['p042'] = '모바일 전용';
$lang['admin']['p043'] = '사용안함';
$lang['admin']['p044'] = '서브 레이아웃';
$lang['admin']['p045'] = '메인페이지';
$lang['admin']['p046'] = '페이지 리스트';
$lang['admin']['p047'] = '레이아웃에 포함된 메인페이지';
$lang['admin']['p048'] = '고급설정';
$lang['admin']['p049'] = '도메인';
$lang['admin']['p050'] = '연결된 도메인이 없습니다.';
$lang['admin']['p051'] = '서비스 상태';
$lang['admin']['p052'] = '정상서비스';
$lang['admin']['p053'] = '관리자오픈';
$lang['admin']['p054'] = '정지';
$lang['admin']['p055'] = '자세히';
$lang['admin']['p056'] = '선택된 사진';
$lang['admin']['p057'] = '선택된 비디오';
$lang['admin']['p058'] = '파일 선택됨';
$lang['admin']['p059'] = '현재파일 삭제';
$lang['admin']['p060'] = '레이아웃 설정 안내';
$lang['admin']['p061'] = '현재 사이트에 지정된 레이아웃은 별도의 설정을 지원하지 않습니다.';
$lang['admin']['p062'] = '레이아웃 분기설정';
$lang['admin']['p063'] = '현재 사이트에 기본 레이아웃과 모바일 전용레이아웃을 지정했을 경우 두 레이아웃을 구분하여 설정할 수 있습니다.';
$lang['admin']['p064'] = '레이아웃 선택';
$lang['admin']['p065'] = '기본 레이아웃 설정';
$lang['admin']['p066'] = '모바일 전용 레이아웃 설정';
$lang['admin']['p067'] = '가로방향';
$lang['admin']['p068'] = '세로방향';
$lang['admin']['p069'] = '기기명';
$lang['admin']['p070'] = '제조사';
$lang['admin']['p071'] = '화면크기';
$lang['admin']['p072'] = '모바일 디바이스 접속';
$lang['admin']['p073'] = '[도움말] 모바일 디바이스 접속이란?';
$lang['admin']['p074'] = '모바일 기기로 접속한 것으로 가정하여 사이트를 보여줍니다. 사이트 설정에서 모바일 분기설정을 적용하면 모바일 전용 레이아웃, 시작페이지, 메뉴가 적용 됩니다.';
$lang['admin']['p075'] = '기기별 기본 브라우저의 실제크기 화면을 제공합니다. 기기 또는 운영체제별 특성은 실제 기기를 통해 확인하세요.';
$lang['admin']['p076'] = '스니핏';
?>

View File

@@ -0,0 +1 @@
시스템 도구

View File

@@ -0,0 +1 @@
한국어

52
modules/admin/main.php Normal file
View File

@@ -0,0 +1,52 @@
<?php
if(!defined('__KIMS__')) exit;
if (!$my['admin']) $mod = 'login';
if (!$mod) $mod = 'front';
$module = $module ? $module : 'admin';
$front = $front ? $front : 'main';
$SD = getDbData($table['s_site'],"id='".$r."'",'*');
$MD = getDbData($table['s_module'],"id='".$module."'",'*');
if ($my['admin'] && !$my['super']) {
if (!$my['adm_site']) getLink($g['s'].'/?r='.$r,'parent.','관리 사이트가 지정되지 않았습니다.','');
$_siteArray = getArrayString($my['adm_site']);
$_SD = getUidData($table['s_site'],$_siteArray[data][0]);
$r = $r?$r:$_SD['id'];
}
if (!$MD['id']) getLink($g['s'].'/?r='.$r.'&m=admin&module=admin','','등록되지 않는 모듈입니다.','');
if (!$my['admin']&&strpos('_'.$my['adm_view'],'['.$MD['id'].']')) getLink($g['s'].'/?r='.$r.'&m=site','','접근권한이 없습니다.','');
if ($my['uid']&&!$my['super']&&!strpos('_'.$my['adm_site'],'['.$SD['uid'].']')) getLink('','','접근권한이 없습니다.','-1');
$d['module']['skin'] = $d['admin']['themepc'];
$g['dir_module_skin'] = $g['dir_module'].'theme/'.$d['module']['skin'].'/';
$g['url_module_skin'] = $g['url_module'].'/theme/'.$d['module']['skin'];
$g['dir_module_admin'] = $g['path_module'].$module.'/admin/'.$front;
$g['url_module_admin'] = $g['s'].'/modules/'.$module.'/admin/'.$front;
$g['img_module_admin'] = $g['s'].'/modules/'.$module.'/admin/images';
$g['adm_module_varmenu']= $g['path_module'].$module.'/admin/var/var.menu.php';
$g['adm_module'] = $g['path_module'].$module.'/admin.php';
$g['img_module_skin'] = $g['url_module_skin'].'/images';
$g['dir_module_mode'] = $g['dir_module_skin'].$mod;
$g['url_module_mode'] = $g['url_module_skin'].'/'.$mod;
$g['adm_href'] = $g['s'].'/?r='.$r.'&amp;m='.$m.'&amp;module='.$module.'&amp;front='.$front;
$g['adminlanguage'] = $MD['lang']?$MD['lang']:$d['admin']['syslang'];
$g['dir_module_comm'] = $g['path_module'].$module.'/admin/_main';
$g['url_module_comm'] = $g['s'].'/modules/'.$module.'/admin/_main';
include getLangFile($g['path_module'].$module.'/language/',$g['adminlanguage'],'/lang.admin.php');
include getLangFile($g['path_module'].$module.'/language/',$g['adminlanguage'],'/lang.admin-menu.php');
if (is_file($g['adm_module_varmenu']))
{
$d['amenu'] = array();
include $g['adm_module_varmenu'];
}
$g['main'] = $my['admin'] && $iframe == 'Y' ? $g['adm_module'] : $g['dir_module_mode'].'.php';
?>

1
modules/admin/name.txt Normal file
View File

@@ -0,0 +1 @@
시스템

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,34 @@
var _isFullSize = false;
var _isCodeEdit = false;
function editFullSize(id,obj)
{
if (_isCodeEdit)
{
_codefullscreen();
}
else {
if (_isFullSize == false)
{
obj.title = '원래대로';
$('#'+id).addClass('rb-fullsize');
_isFullSize = true;
}
else {
obj.title = '전체화면';
$('#'+id).removeClass('rb-fullsize');
_isFullSize = false;
}
}
}
function goHref_parent(url) {
parent.location.href = url;
}
$(function () {
$('[data-toggle="tooltip"]').tooltip()
$('[data-tooltip="tooltip"]').tooltip({
html: true
})
$('.js-tooltip').tooltip()
})

View File

@@ -0,0 +1,283 @@
<header class="navbar navbar-expand fixed-top navbar-dark bg-dark" role="navigation" data-scroll-header>
<?php if($g['device'] && $module == 'dashboard'):?>
<a class="navbar-brand" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=admin&amp;module=dashboard&amp;front=mobile.shortcut" style="margin-left:0;">
<i class="kf kf-bi-01 fa-lg" style="color:#000;"></i>
</a>
<?php else:?>
<a class="navbar-brand" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=admin&amp;module=dashboard<?php if($g['mobile']&&$_SESSION['pcmode']!='Y'):?>&amp;front=mobile.shortcut<?php endif?>">
<span class="badge badge-light"><?php echo $MD['name']?></span>
</a>
<?php if($module == 'dashboard' && ($front == 'main' || $front == 'mobile.dashboard')):?>
<i class="fa fa-cog rb-modal-dashboard js-tooltip d-none" title="대시보드 꾸미기" data-toggle="modal" data-target="#modal_window"></i>
<?php endif?>
<?php endif?>
<div class="navbar-collapse collapse">
<?php if($g['device']&&$module=='dashboard'):?>
<ul class="navbar-nav mr-auto">
<li<?php if($front=='mobile.shortcut'):?> class="active"<?php endif?>><a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=admin&amp;module=dashboard&amp;front=mobile.shortcut">바로가기</a></li>
<li<?php if($front=='mobile.dashboard'):?> class="active"<?php endif?>><a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=admin&amp;module=dashboard&amp;front=mobile.dashboard">대시보드</a></li>
<li<?php if($front=='mobile.site'):?> class="active"<?php endif?>><a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=admin&amp;module=dashboard&amp;front=mobile.site">사이트</a></li>
</ul>
<?php else:?>
<ul class="navbar-nav mr-auto" id="rb-admin-ul-tabs">
<?php $_front =explode('_' , $front); ?>
<?php $_menuCount=$d['amenu']?count($d['amenu']):0;if(!$nosite&&$_menuCount):?>
<?php if($_i<=10):?>
<?php $_i=1;foreach($d['amenu'] as $_k => $_v):?>
<li id="rb-more-tab-<?php echo $_i?>" class="nav-item">
<a class="nav-link<?php if($_front[0] == $_k):?> active<?php endif?>" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=<?php echo $_k ?>">
<?php echo $_v ?>
</a>
</li>
<?php $_i++;endforeach?>
<?php endif?>
<?php if($_i>10):?>
<li class="nav-item dropdown rb-more-tabs d-block d-sm-none">
<a class="nav-link dropdown-toggle" href="#." data-toggle="dropdown">더보기</a>
<div class="dropdown-menu dropdown-menu-right">
<?php $_i=1;foreach($d['amenu'] as $_k => $_v):?>
<a id="rb-more-tabs-<?php echo $_i?>" class="dropdown-item<?php if($front == $_k):?> active<?php endif?>" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=<?php echo $_k?>">
<?php echo $_v?>
</a>
<?php $_i++;endforeach?>
</div>
</li>
<?php endif?>
<?php endif?>
</ul>
<?php endif?>
<ul class="navbar-nav my-0">
<?php if($module!='dashboard'):?>
<li class="nav-item">
<a class="nav-link<?php if($front == '_info'):?> active<?php endif?>" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=_info">
<i class="fa fa-question-circle fa-lg"></i> 안내
</a>
</li>
<?php endif?>
<?php $exists_bookmark=getDbRows($table['s_admpage'],'memberuid='.$my['uid']." and url='".$g['s'].'/?r='.$r.'&m='.$m.'&module='.$module.'&front='.$front."'")?>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">
<i id="_bookmark_star_" class="fa fa-lg fa-star<?php if($exists_bookmark):?> rb-star-fill text-primary<?php else:?>-o<?php endif?>"></i>
</a>
<div class="dropdown-menu dropdown-menu-right p-0">
<div class="card border-dark rounded-0 mb-0" style="width: 300px">
<div class="card-header d-flex justify-content-between align-items-center py-1 px-2 bg-white border-secondary">
북마크
<div>
<div id="_bookmark_notyet_" class="btn-group btn-group-sm dropdown<?php if($exists_bookmark):?> d-none<?php endif?>">
<button type="button" class="btn btn-outline-secondary rb-bookmark-add">북마크에 추가</button>
<button type="button" class="btn btn-outline-secondary dropdown-toggle dropdown-body" data-toggle="dropdown">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<div id="rb-bookmark-dropdown1" class="dropdown-menu">
<a href="#." class="dropdown-item rb-bookmark-add">북마크에 추가</a>
<div class="dropdown-divider"></div>
<a href="#." data-toggle="modal" data-target="#modal_window" class="dropdown-item rb-modal-bookmark">북마크 관리</a>
</div>
</div>
<div id="_bookmark_already_" class="btn-group btn-group-sm <?php if(!$exists_bookmark):?> d-none<?php endif?>">
<button type="button" class="btn btn-light disabled">추가됨</button>
<button type="button" class="btn btn-light dropdown-toggle dropdown-toggle-split" data-toggle="dropdown">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div id="rb-bookmark-dropdown2" class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item b-bookmark-del" href="#">북마크에서 삭제</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item rb-modal-bookmark" href="#" data-toggle="modal" data-target="#modal_window">북마크 관리</a>
</div>
</div>
</div>
</div>
<div id="_add_bookmark_" class="list-group list-group-flush rb-scrollbar">
<?php $ADMPAGE = getDbArray($table['s_admpage'],'memberuid='.$my['uid'],'*','gid','asc',0,1)?>
<?php while($R=db_fetch_array($ADMPAGE)):?>
<a href="<?php echo $R['url']?>" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" id="_now_bookmark_<?php echo $R['uid']?>">
<?php echo $R['name']?>
<i class="fa fa-fw fa-file-text-o"></i>
</a>
<?php endwhile?>
<?php if(!db_num_rows($ADMPAGE)):?><a class="list-group-item"><i class="fa fa-fw fa-file-text-o"></i>등록된 북마크가 없습니다</a><?php endif?>
</div>
<div class="card-footer p-0 border-top-0">
<a href="#." data-toggle="modal" data-target="#modal_window" class="rb-modal-bookmark btn btn-link btn-block">북마크 관리</a>
</div>
</div>
</div>
</li>
<?php if ($my['super'] && !$my['adm_site']): ?>
<?php
$SITES = getDbArray($table['s_site'],'','*','gid','asc',0,$p);
$SITEN = db_num_rows($SITES);
?>
<?php if($SITEN>1 && ($module!='admin' && $module!='project')):?>
<li class="nav-item d-none" data-role="siteSelector">
<div class="input-group input-group-sm mt-1 ml-2 border border-primary">
<div class="input-group-append" style="margin-left: 0;">
<a class="input-group-text muted-link" href="<?php echo $g['s']?>/?r=<?php echo $SD['id']?>&amp;m=<?php echo $m?>&amp;pickmodule=site&amp;panel=Y" target="_parent" data-toggle="tooltip" title="사이트관리">
<i class="<?php echo $SD['icon']?> fa-lg" aria-hidden="true"></i>
</a>
</div>
<select class="form-control custom-select" onchange="goHref_parent('<?php echo $g['s']?>/?m=<?php echo $m?>&pickmodule=<?php echo $module?>&panel=Y&pickfront=<?php echo $front?>&r='+this.value);" style="margin-left: -1px;min-width:100px">
<?php while($S = db_fetch_array($SITES)):?>
<option value="<?php echo $S['id']?>"<?php if($r==$S['id']):?> selected<?php endif?>><?php echo $S['label']?></option>
<?php endwhile?>
</select>
</div>
</li>
<?php endif?>
<?php else: ?>
<?php
$SITES = getArrayString($my['adm_site']);
$SITEN = $SITES[count];
?>
<?php if($SITEN>1 && ($module!='admin' && $module!='project')):?>
<li class="nav-item d-none" data-role="siteSelector">
<div class="input-group input-group-sm mt-1 ml-2 border border-primary">
<div class="input-group-append" style="margin-left: 0;">
<a class="input-group-text muted-link" href="<?php echo $g['s']?>/?r=<?php echo $_SD['id']?>&amp;m=<?php echo $m?>&amp;pickmodule=site&amp;panel=Y" target="_parent">
<i class="<?php echo $SD['icon']?> fa-lg" aria-hidden="true"></i>
</a>
</div>
<select class="form-control custom-select" onchange="goHref_parent('<?php echo $g['s']?>/?m=<?php echo $m?>&pickmodule=<?php echo $module?>&panel=Y&pickfront=<?php echo $front?>&r='+this.value);" style="margin-left: -1px;min-width:100px">
<?php $_i=0;foreach($SITES['data'] as $val):?>
<?php $_SD = getUidData($table['s_site'],$val); ?>
<option value="<?php echo $_SD['id']?>"<?php if($r==$_SD['id']):?> selected<?php endif?>><?php echo $_SD['label']?></option>
<?php $_i++;endforeach?>
</select>
</div>
</li>
<?php endif?>
<?php endif; ?>
</ul>
</div><!-- /.navbar-collapse -->
</header>
<main id="rb-admin-page-content">
<?php include $g['adm_module'] ?>
</main>
<script>
$(document).ready(function()
{
document.body.onload = tabSetting;
document.body.onresize = tabSetting;
<?php if($g['device']):?>
$('#bs-example-navbar-collapse-1').on('show.bs.collapse', function () {
$("#_navbar_header_").addClass('rb-header-bottom-line');
});
$('#bs-example-navbar-collapse-1').on('hide.bs.collapse', function () {
$("#_navbar_header_").removeClass('rb-header-bottom-line');
});
getId('_add_bookmark_').style.maxHeight = '205px';
<?php endif?>
$('#bs-example-navbar-collapse-1 [data-toggle=dropdown]').on('click', function(event) {
event.preventDefault();
event.stopPropagation();
$(this).parent().siblings().removeClass('open');
$(this).parent().toggleClass('open');
});
$(".rb-help-btn").click(function(){
$(this).button('toggle');
});
$('.rb-modal-bookmark').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=admin&amp;module=admin&amp;front=modal.bookmark')?>');
});
$('.rb-bookmark-add').on('click',function() {
frames._action_frame_admin.location.href = '<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&a=bookmark&_addmodule=<?php echo $module?>&_addfront=<?php echo $front?>';
});
$('.rb-bookmark-del').on('click',function() {
frames._action_frame_admin.location.href = '<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&a=bookmark_delete&deltype=hidden&_addmodule=<?php echo $module?>&_addfront=<?php echo $front?>';
});
});
function tabSetting()
{
<?php if($g['device']):?>
$('#bs-example-navbar-collapse-1').removeClass('navbar-collapse');
if(document.body.scrollWidth > 750) $('#bs-example-navbar-collapse-1').addClass('navbar-collapse');
else $('#bs-example-navbar-collapse-1').removeClass('navbar-collapse');
<?php endif?>
var i;
var bodyWidth = document.body.scrollWidth;
var allTabnum = <?php echo (int)$_menuCount?>;
var showTabnum = allTabnum;
var showTabMore = false;
if (allTabnum > 3)
{
if (bodyWidth >= 0 && bodyWidth < 360)
{
showTabnum = 2;
showTabMore = true;
}
else if (bodyWidth >= 360 && bodyWidth < 523)
{
showTabnum = 3;
showTabMore = true;
}
else if (bodyWidth >= 523 && bodyWidth < 640)
{
showTabnum = 4;
showTabMore = true;
}
else if (bodyWidth >= 640 && bodyWidth < 750)
{
showTabnum = 5;
showTabMore = true;
}
else if (bodyWidth >= 750 && bodyWidth < 1100)
{
showTabnum = 8;
showTabMore = true;
}
else if (bodyWidth >= 1100 && bodyWidth < 1400)
{
showTabnum = 10;
showTabMore = false;
}
else if (bodyWidth >= 1400)
{
showTabnum = allTabnum;
showTabMore = false;
}
}
for (i = 1; i <= allTabnum; i++)
{
$('#rb-more-tab-'+i).removeClass('d-none');
$('#rb-more-tabs-'+i).removeClass('d-none');
}
for (i = showTabnum+1; i <= allTabnum; i++) $('#rb-more-tab-'+i).addClass('d-none');
for (i = 0; i <= showTabnum; i++) $('#rb-more-tabs-'+i).addClass('d-none');
if (showTabMore == true) $('.rb-more-tabs').removeClass('d-none');
else $('.rb-more-tabs').addClass('d-none');
}
// 북마크 dropdown 내부클릭시 dropdown 유지
$('.dropdown-body').on('click', function(e) {
e.stopPropagation();
});
</script>

View File

@@ -0,0 +1,196 @@
@charset "utf-8";
@import url(https://fonts.googleapis.com/earlyaccess/notosanskr.css);
html,
body {
height: 100%;
}
body {
background-color: #343a40 !important;
font-family: 'Noto Sans KR', "돋움", dotum, '나눔고딕', 'Nanum Gothic', sans-serif, FontAwesome, kimsq !important;
color: #ccc
}
a {
color: #ccc
}
.rb-root {
display: table;
height: 100%;
width: 100%;
padding: 0;
}
#rb-login {
display: table-cell;
text-align: left;
margin: 0 auto;
padding: 10% 0 100px;
}
#rb-login .card {
margin: 0 auto 15px;
color: #ccc;
background-color: rgb(39, 44, 50);
border: 1px solid #222;
border-radius: 3px;
color: #999;
box-shadow: 0px 2px 2px #222;
}
#rb-login .card-header h1 {
margin-bottom: 0;
font-size: 18px
}
#rb-login .card-header a {
color: #ccc
}
#rb-login .card-header a:hover {
text-decoration: none
}
#rb-login .card .form-group label {
font-weight: normal;
display: block;
margin-bottom: 7px
}
#rb-login .form-login .label-link {
float: right;
font-size: 12px;
line-height: 24px;
}
#rb-login .panel .form-control.input-lg {
border-radius: 2px;
}
#rb-login .card-footer ul {
margin-bottom: 0
}
#rb-login .card-foote a {
font-size: 90%;
}
.form-control,
.form-control[readonly] {
background-color: rgb(31, 34, 39);
color: rgb(171, 175, 181);
border-color: rgb(27, 30, 36);
border-radius: 0
}
.btn {
border-radius: 0
}
/*반응형 설정*/
@media (min-width: 481px) {
#rb-login .card {
width: 350px;
}
}
@media (max-width: 480px) {
body {
/*background-color: #fff !important*/
}
#rb-login {
padding: 0;
}
#rb-login .card {
box-shadow: none;
border: none;
border-radius: none;
background-color: inherit;
}
#rb-login .card-footer {
/*background-color: transparent;*/
}
#rb-login h1 {
font-size: 20px
}
#rb-login .btn.btn-primary {
width: 100%;
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 6px;
}
}
#modal-pwReset {
font-size: 14px
}
#modal-pwReset .modal-header,
#modal-pwReset .card-header {
background-color: #0069d9;
color: #fff
}
#modal-pwReset .modal-content {
border-radius: .45rem;
}
#modal-pwReset .nav-tabs .nav-link:focus,
#modal-pwReset .nav-tabs .nav-link:hover {
border-color: #0069d9 #0069d9 #fff;
}
#modal-pwReset .form-control,
#modal-pwReset .form-control[readonly] {
background-color: #fff;
border: 1px solid #ced4da;
border-radius: 0;
color: #495057;
}
.btn-light {
color: #24292e;
user-select: none;
background-color: #eff3f6;
background-image: linear-gradient(-180deg, #fafbfc 0%, #eff3f6 90%);
background-repeat: repeat-x;
background-position: -1px -1px;
background-size: 110% 110%;
border: 1px solid rgba(27, 31, 35, 0.2);
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
}
.btn-light:hover,
.btn-light.hover {
background-color: #e6ebf1;
background-image: linear-gradient(-180deg, #f0f3f6 0%, #e6ebf1 90%);
background-position: -.5em;
border-color: rgba(27, 31, 35, 0.35);
}
.btn-light:not(:disabled):not(.disabled).active,
.btn-light:not(:disabled):not(.disabled):active,
.show>.btn-light.dropdown-toggle {
background-color: #e9ecef;
background-image: none;
border-color: rgba(27, 31, 35, 0.35);
box-shadow: inset 0 0.15em 0.3em rgba(27, 31, 35, 0.15);
}
.btn-light:not(:disabled):not(.disabled).active:focus,
.btn-light:not(:disabled):not(.disabled):active:focus,
.show>.btn-light.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2em rgba(3, 102, 214, 0.3);
}

View File

@@ -0,0 +1,535 @@
<div class="rb-root">
<div id="rb-login">
<div class="card">
<div class="card-header">
<h1>
<a href="<?php echo $g['r']?>/">
<i class="kf-bi-01"></i>
</a>
<small>관리자 모드</small>
</h1>
</div>
<div class="card-body">
<form class="loginForm" role="form" name="loginform" id="admin-loginform" action="<?php echo $g['s']?>/" method="post">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="a" value="login">
<input type="hidden" name="referer" value="<?php echo $referer ? $referer : $_SERVER['HTTP_REFERER']?>">
<input type="hidden" name="usertype" value="admin">
<input type="hidden" name="pickgoods" value="<?php echo $pickgoods ?>">
<input type="hidden" name="form" value="">
<div class="form-group">
<label for="id" class="control-label">아이디 또는 이메일</label>
<input type="text" name="id" class="form-control input-lg" id="id" placeholder="" value="" autofocus required autocapitalize="off" autocorrect="off" tabindex="1">
<div class="invalid-feedback mt-2" data-role="idErrorBlock"></div>
</div>
<div class="form-group">
<label for="pw" class="control-label">비밀번호</label>
<input type="password" name="pw" class="form-control input-lg" id="pw" placeholder="" value="" required tabindex="2">
<div class="invalid-feedback mt-2" data-role="passwordErrorBlock"></div>
</div>
<div class="custom-control custom-checkbox mb-2">
<input type="checkbox" class="custom-control-input" id="login_cookie" name="login_cookie" value="checked" data-toggle="collapse" data-target="#collapsealert">
<label class="custom-control-label" for="login_cookie">로그인 상태 유지</label>
</div>
<div class="collapse" id="collapsealert" style="">
<div class="alert alert-danger f12 mb-3">
개인정보 보호를 위해, 개인 PC에서만 사용해 주세요.
</div>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit" id="rb-submit" data-role="submit" tabindex="3">
<span class="not-loading">로그인</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 로그인중 ...</span>
</button>
<p class="mt-3">
<a href="#modal-pwReset" data-toggle="modal">
<small>비밀번호를 잊으셨나요?</small>
</a>
</p>
</form>
</div>
</div>
</div>
</div>
<!-- 모달 : modal-pwReset : 비밀번호 초기화 -->
<div class="modal fade" id="modal-pwReset" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document" style="max-width: 400px;">
<div class="modal-content">
<div class="modal-header border-bottom-0 d-flex flex-column" style="">
<h5 class="modal-title mx-auto h6">관리자 비밀번호 재설정</h5>
</div>
<?php if ($d['member']['join_byEmail'] || $d['member']['join_byPhone']): ?>
<div class="card border-0" style="margin-top: -15px" data-role="confirm_code">
<div class="card-header">
<ul class="nav nav-tabs nav-justified card-header-tabs f14">
<?php if ($d['member']['join_byEmail']): ?>
<li class="nav-item">
<a class="nav-link<?php echo $d['member']['join_byEmail']?' active':'' ?>" id="tab-email" data-toggle="tab" href="#pane-pw-email">
이메일로 받기
</a>
</li>
<?php endif; ?>
<?php if ($d['member']['join_byPhone']): ?>
<li class="nav-item">
<a class="nav-link<?php echo ($d['member']['join_byPhone'] && !$d['member']['join_byEmail'])?' active':'' ?>" id="tab-phone" data-toggle="tab" href="#pane-pw-phone">
휴대폰으로 받기
</a>
</li>
<?php endif; ?>
</ul>
</div>
<div class="card-body ">
<div class="tab-content text-center">
<div class="tab-pane <?php echo $d['member']['join_byEmail']?' show active':'' ?>" id="pane-pw-email" role="tabpanel" aria-labelledby="tab-email">
<div class="input-group input-group-lg mt-3">
<input type="email" class="form-control" name="email" placeholder="이메일 주소" tabindex="1" autocorrect="off" autocapitalize="off" required value="">
<div class="invalid-tooltip" data-role="emailErrorBlock"></div>
<div class="input-group-append">
<button class="btn btn-light" type="button" data-act="send_code" data-type="email" data-device="desktop">
<span class="not-loading">다음</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
<div class="d-none mt-3" data-role="verify_email_area">
<small class="form-text text-success my-3">
인증번호를 발송했습니다.(유효시간 <?php echo $d['member']['join_keyexpire'] ?>분)
<span data-role="countdown" data-email-countdown="">[00:00]</span><br>
위 메일로 발송된 6자리 인증번호를 입력해 주세요.<br>
인증번호가 오지 않으면 입력하신 정보가 정확한지 확인하여 주세요.
</small>
<div class="input-group input-group-lg">
<input type="number" class="form-control" name="confirm_email_code" data-role="confirm_email_code" placeholder="인증번호 입력">
<div class="invalid-tooltip" data-role="emailCodeBlock"></div>
<div class="input-group-append">
<button class="btn btn-outline-primary" type="button" data-act="confirm_code" data-type="email" data-device="desktop">
<span class="not-loading">확인</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
</div><!-- /.d-none -->
</div><!-- /.tab-pane -->
<div class="tab-pane <?php echo ($d['member']['join_byPhone'] && !$d['member']['join_byEmail'])?' show active':'' ?>" id="pane-pw-phone" role="tabpanel" aria-labelledby="tab-phone">
<div class="input-group input-group-lg mt-3">
<input type="tel" class="form-control" name="phone" placeholder="휴대폰 번호" tabindex="1" autocorrect="off" autocapitalize="off" required>
<div class="invalid-tooltip" data-role="phoneErrorBlock"></div>
<div class="input-group-append">
<button class="btn btn-light" type="button" data-act="send_code" data-type="phone" data-device="desktop">
<span class="not-loading">다음</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
<div class="d-none mt-3" data-role="verify_phone_area">
<small class="form-text text-success my-3">
인증번호를 발송했습니다.(유효시간 <?php echo $d['member']['join_keyexpire'] ?>분)
<span data-role="countdown" data-phone-countdown="">[00:00]</span><br>
위 휴대폰으로 발송된 6자리 인증번호를 입력해 주세요.<br>
인증번호가 오지 않으면 입력하신 정보가 정확한지 확인하여 주세요.
</small>
<div class="input-group input-group-lg">
<input type="number" class="form-control" name="confirm_phone_code" data-role="confirm_phone_code" placeholder="인증번호 입력">
<div class="invalid-tooltip" data-role="phoneCodeBlock">인증번호를 입력해주세요.</div>
<div class="input-group-append">
<button class="btn btn-outline-primary" type="button" data-act="confirm_code" data-type="phone" data-device="desktop">
<span class="not-loading">확인</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
</div><!-- /.d-none -->
</div><!-- /.tab-pane -->
</div><!-- /.tab-content -->
<ul class="list-unstyled f13 text-muted mt-4 mb-1">
<li>본인인증을 통해 비밀번호를 재설정 하실 수 있습니다.</li>
<li>인증번호를 받을 곳을 선택해 주세요.</li>
<li>비밀번호는 암호화 저장되어 분실 시 찾아드릴 수 없습니다.</li>
</ul>
</div><!-- /.card-body tab-content-->
</div><!-- /.card -->
<?php endif; ?>
<div class="card d-none" data-role="change_pw">
<div class="card-body">
<form id="pwResetForm" role="form" action="<?php echo $g['s']?>/" method="post" autocomplete="off">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="member">
<input type="hidden" name="a" value="pw_reset">
<input type="hidden" name="act" value="change_pw">
<input type="hidden" name="device" value="desktop">
<input type="hidden" name="code" value="">
<input type="hidden" name="target" value="">
<input type="hidden" name="type" value="">
<input type="hidden" name="check_pw1" value="0">
<input type="hidden" name="check_pw2" value="0">
<input type="hidden" name="usertype" value="admin">
<div class="form-group position-relative">
<label>비밀번호(6~16자리)</label>
<input type="password" class="form-control form-control-lg" name="pw1" placeholder="" autocorrect="off" autocapitalize="off" data-role="pw1">
<div class="invalid-tooltip" data-role="pw1CodeBlock" id="pw1-feedback"></div>
</div>
<div class="form-group position-relative">
<label>비밀번호 재입력</label>
<input type="password" class="form-control form-control-lg" name="pw2" placeholder="" autocorrect="off" autocapitalize="off" data-role="pw2">
<div class="invalid-tooltip" data-role="pw2CodeBlock" id="pw2-feedback"></div>
</div>
<div class="mt-4 mb-3">
<button type="submit" class="btn btn-outline-primary btn-lg btn-block" data-role="submit">
<span class="not-loading">변경하기</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 변경중 ...</span>
</button>
</div>
</form>
</div><!-- /.card-body -->
</div><!-- /.card -->
<div class="modal-footer justify-content-center py-2">
<button type="button" class="btn btn-link muted-link" data-dismiss="modal">닫기</button>
</div>
</div>
</div>
</div>
<!-- https://github.com/hilios/jQuery.countdown -->
<?php getImport('jquery.countdown','jquery.countdown.min','2.2.0','js')?>
<script>
var modal_pwReset = $('#modal-pwReset')
$(function () {
$('#admin-loginform').submit(function(e){
e.preventDefault();
e.stopPropagation();
var form = $(this)
var formID = form.attr('id')
var f = document.getElementById(formID);
form.find('[name="form"]').val('#'+formID);
form.find('[type="submit"]').attr("disabled",true);
form.find('.form-control').removeClass('is-invalid') //에러이력 초기화
setTimeout(function(){
getIframeForAction(f);
f.submit();
}, 500);
});
// 로그인 에러 흔적 초기화
$("#admin-loginform").find('.form-control').keyup(function() {
$(this).removeClass('is-invalid')
});
})
function doPwCountdown(type) {
modal_pwReset.find('[data-'+type+'-countdown]').each(function() {
var $this = $(this), finalDate = $(this).data(type+'-countdown');
$this.html('');
$this.countdown(finalDate, function(event) {
$this.html('['+event.strftime('%M:%S')+']');
});
});
};
function pwResetCheck(obj,layer) {
var f = document.getElementById('pwResetForm');
if (!obj.value)
{
obj.classList.remove('is-invalid');
getId(layer).innerHTML = '';
}
else
{
if (obj.name == 'pw1') {
f.classList.remove('was-validated');
if (f.pw1.value.length < 6 || f.pw1.value.length > 16) {
f.check_pw1.value = '0';
f.classList.remove('was-validated');
obj.classList.add('is-invalid');
obj.classList.remove('is-valid');
getId(layer).innerHTML = '영문/숫자 2개 이상의 조합으로 최소 6~16자로 입력하셔야 합니다.';
obj.focus();
return false;
}
if (getTypeCheck(f.pw1.value,"abcdefghijklmnopqrstuvwxyz")) {
getId(layer).innerHTML = '비밀번호가 영문만으로 입력되었습니다.\n영문/숫자 2개 이상의 조합으로 최소 6자이상 입력하셔야 합니다.';
obj.focus();
return false;
}
if (getTypeCheck(f.pw1.value,"1234567890")) {
getId(layer).innerHTML = '비밀번호가 숫자만으로 입력되었습니다.\n영문/숫자 2개 이상의 조합으로 최소 6자이상 입력하셔야 합니다.';
obj.focus();
return false;
}
f.pw1.classList.add('is-valid');
f.pw1.classList.remove('is-invalid');
getId(layer).innerHTML = '';
f.check_pw1.value = '1';
}
if (obj.name == 'pw2') {
f.classList.remove('was-validated');
obj.classList.add('is-invalid');
obj.classList.remove('is-valid');
if (f.pw1.value != f.pw2.value)
{
getId(layer).innerHTML = '비밀번호가 일치하지 않습니다.';
f.classList.remove('was-validated');
obj.focus();
f.check_pw2.value = '0';
return false;
}
f.pw2.classList.add('is-valid');
f.pw2.classList.remove('is-invalid');
getId(layer).innerHTML = '';
f.check_pw2.value = '1';
}
}
}
$(function () {
modal_pwReset.on('show.bs.modal', function (e) {
var modal = modal_pwReset
//화면 초기화
modal.find('[data-role="confirm_code"]').removeClass('d-none')
modal.find('[data-role="change_pw"]').addClass('d-none')
modal.find('#tab-email').tab('show')
modal.find('[data-act="send_code"]').prop("disabled",false)
modal.find('[data-act="send_code"] .not-loading').text('다음')
modal.find('[data-act="confirm_code"]').prop("disabled",false)
modal.find('[type="number"]').val('').removeClass('is-invalid')
modal.find('[name="email"]').val('').removeClass('is-invalid')
modal.find('[name="phone"]').val('').removeClass('is-invalid')
modal.find('[data-role="verify_email_area"]').addClass('d-none')
modal.find('[data-role="verify_phone_area"]').addClass('d-none')
modal.find('[data-role="pw1"]').val('').removeClass('is-invalid')
modal.find('[data-role="pw2"]').val('').removeClass('is-invalid')
modal.find('[name="check_pw1"]').val(0)
modal.find('[name="check_pw2"]').val(0)
modal.find('[data-role="submit"]').prop("disabled",false)
})
modal_pwReset.on('shown.bs.modal', function (e) {
var modal = modal_pwReset
modal.find('[name="email"]').trigger('focus')
})
modal_pwReset.find('input').keyup(function() {
$(this).removeClass('is-invalid') //에러 발생후 다시 입력 시도시에 에러 흔적 초기화
});
//비밀번호 유용성 체크
modal_pwReset.find('[data-role="change_pw"] input').keyup(function(){
var modal = modal_pwReset
var item = $(this).data('role')
var item_pw_check = modal.find('[name=check_pw]').val()
if (item =='pw1') {
element = document.querySelector('[name="pw1"]');
pwResetCheck(element,'pw1-feedback')
}
if (item =='pw2') {
element = document.querySelector('[name="pw2"]');
pwResetCheck(element,'pw2-feedback')
}
});
})
modal_pwReset.find('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var pane = $(this).attr('id')
if (pane=='tab-email') modal_pwReset.find('[name="email"]').focus()
if (pane=='tab-phone') modal_pwReset.find('[name="phone"]').focus()
})
// 본인인증 코드발송
modal_pwReset.on('click','[data-act="send_code"]',function(){
var modal = modal_pwReset
var button = $(this)
var act = 'send_code'
var type = button.attr('data-type')
var device = button.attr('data-device')
if (type=='email') {
var input = modal.find('[name="email"]')
var _input = document.querySelector('#modal-pwReset [name="email"]');
var target = input.val()
var msg = modal.find('[data-role="emailErrorBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 이메일 입력폼 유효성 체크
if (!target) {
input.focus()
input.addClass('is-invalid')
msg.text('이메일을 입력해주세요.')
return false;
}
if (!chkEmailAddr(_input.value)) {
input.focus()
input.addClass('is-invalid')
msg.text('이메일 형식이 아닙니다.')
return false;
}
}
if (type=='phone') {
var input = modal.find('[name="phone"]')
var _input = document.querySelector('#modal-pwReset [name="phone"]');
var target = input.val()
var msg = modal.find('[data-role="phoneErrorBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 휴대폰번호 입력폼 유효성 체크
if (!target) {
input.focus()
input.addClass('is-invalid')
msg.text('휴대폰 번호를 입력해주세요.')
return false;
}
if (!chkPhoneNumber(_input.value)) {
input.focus()
input.addClass('is-invalid')
msg.text('휴대폰 번호 형식이 아닙니다.')
return false;
}
}
button.attr('disabled',true) //버튼 로딩처리
var url = rooturl+'/?r='+raccount+'&m=member&a=pw_reset&act='+act+'&type='+type+'&target='+target+'&device='+device+'&usertype=admin'
getIframeForAction();
//modal.find('[data-act=confirm_code]').attr('data-type',type);
//modal.find('[type=number]').attr('data-role','confirm_'+type+'_code').attr('name','confirm_'+type+'_code');
//modal.find('.invalid-tooltip').attr('data-role',type+'CodeBlock');
modal.find('[data-role=countdown]').text('');
modal.find('[data-role="target"]').text(target)
setTimeout(function() {
frames.__iframe_for_action__.location.href = url;
}, 700);
});
// 본인인증 코드확인
modal_pwReset.on('click','[data-act="confirm_code"]',function(){
var modal = modal_pwReset
var button = $(this)
var act = 'confirm_code'
var type = button.data('type')
var device = button.data('device')
if (type=='email') {
var input = modal.find('[name="confirm_email_code"]')
var code = input.val()
var msg = modal.find('[data-role="emailCodeBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 인증번호 입력폼 유효성 체크
if (!code) {
input.focus()
input.addClass('is-invalid')
msg.text('인증번호를 입력해주세요.')
return false;
}
}
if (type=='phone') {
var input = modal.find('[name="confirm_phone_code"]')
var code = input.val()
var msg = modal.find('[data-role="phoneCodeBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 인증번호 입력폼 유효성 체크
if (!code) {
input.focus()
input.addClass('is-invalid')
msg.text('인증번호를 입력해주세요.')
return false;
}
}
button.attr('disabled',true) //버튼 로딩처리
var url = rooturl+'/?r='+raccount+'&m=member&a=pw_reset&act='+act+'&type='+type+'&code='+code+'&device='+device
getIframeForAction();
setTimeout(function() {
frames.__iframe_for_action__.location.href = url;
}, 700);
});
// 비밀번호 변경
$('#pwResetForm').submit( function(e){
e.preventDefault();
e.stopPropagation();
var form = $(this)
var formID = form.attr('id')
var f = document.getElementById(formID);
if (f.check_pw1.value == '0' || f.check_pw2.value == '0') {
return false;
}
form.find('[name="form"]').val('#'+formID);
form.find('[type="submit"]').attr("disabled",true); //버튼 로딩처리
form.find('.form-control').removeClass('is-invalid') //에러이력 초기화
setTimeout(function(){
getIframeForAction(f);
f.submit();
}, 500);
}
);
</script>

View File

@@ -0,0 +1,899 @@
@charset "utf-8";
/* ------------------ 공통사항 --------------------*/
body {
padding-top: 3.5rem;
background-color: #fff !important;
padding: 0;
font-family: 'NotoSans', '돋움', dotum, sans-serif;
font-size: 16px;
line-height: 1.3rem;
color: #222;
letter-spacing: -.5px;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
a {
color: #6698e8;
}
code {
background: transparent
}
#rb-body.lang-en {
font-family: 'NotoSans', Helvetica, Arial, 'Liberation Sans', sans-serif;
}
.btn {
border-radius: 0px;
}
#rb-admin-page-content {
padding-top: 3.34rem
}
.navbar {
border-bottom: 1px solid rgba(0, 0, 0, .1);
background-color: #fff
}
#rb-bookmark-dropdown1 {
position: absolute;
top: 34px;
left: -24px;
background: #fff;
border: #cccccc solid 1px;
border-radius: 3px;
}
#rb-bookmark-dropdown2 {
position: absolute;
top: 34px;
left: -71px;
background: #fff;
border: #cccccc solid 1px;
border-radius: 3px;
}
/* ------------------ navbar --------------------*/
/* ------------------ tabs --------------------*/
.navbar {
font-family: 'NotoSans', sans-serif, '돋움', dotum, sans-serif;
}
.navbar .navbar-nav {
border-bottom: 0
}
.navbar .navbar-nav .nav-item {
/*margin-right: 20px;*/
margin-bottom: 0;
}
.navbar .navbar-nav li a.nav-link {
position: relative;
color: rgba(0, 0, 0, .5) !important;
font-size: 15px
}
.navbar-nav>li a.nav-link.active::before,
.navbar-nav>li a.nav-link.active:focus::before,
.navbar-nav>li a.nav-link.active:hover::before {
position: absolute;
width: 100%;
height: 4px;
left: 0;
bottom: -9px;
content: '';
background-color: #007bff;
color: rgba(0, 0, 0, .9);
;
font-weight: 400;
}
/*
* Sidebar
*/
.sidebar {
position: fixed;
top: 3.4rem;
bottom: 0;
left: 0;
z-index: 1000;
padding: 0;
overflow-x: hidden;
overflow-y: auto;
/* Scrollable contents if viewport is shorter than content. */
border-right: 1px solid rgba(0, 0, 0, .1);
background-color: #fff;
}
.sidebar.sidebar-right {
left: auto;
right: 0;
border-right: none;
border-left: 1px solid rgba(0, 0, 0, .1);
}
.sidebar .nav {
margin-bottom: 20px;
}
.sidebar .nav-item {
width: 100%;
}
.sidebar .nav-item+.nav-item {
margin-left: 0;
}
.sidebar .nav-link {
border-radius: 0;
}
.sidebar .card {
margin-bottom: 0;
border-radius: 0;
border-left: 0;
border-right: 0;
border-bottom: 0;
box-shadow: none
}
.sidebar .card~.card {
margin-top: -1px
}
.sidebar .card-body {
background-color: #fff
}
.sidebar .list-group-item.active {
border-width: 1px !important;
border-style: solid !important;
border-color: rgb(0, 123, 255) !important;
border-image: initial !important;
}
.sidebar .list-group-item.active .badge-dark {
color: #eee;
}
.breadcrumb {
background-color: transparent;
}
/* ------------------ button --------------------*/
/*본문*/
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
font-family: 'NotoSans', sans-serif, '돋움', dotum, sans-serif;
margin: 0 0 20px;
font-weight: 300;
}
.h2,
h2 {
font-size: 30px;
}
.h3,
h3 {
font-size: 26px;
}
.h4,
h4 {
font-size: 22px;
}
.page-body-header {
background-color: #fff
}
.page-header {
padding-top: 20px;
padding-bottom: 9px;
margin: 0 0px 20px;
border-bottom: 1px solid rgba(0, 0, 0, .1)
}
.page-header h1,
.page-header h2,
.page-header h3,
.page-headerh4,
.page-header h5,
.page-header h6 {
margin: 0;
}
.subnav-item {
position: relative;
float: left;
padding: 6px 14px;
font-weight: 600;
line-height: 20px;
color: #586069;
border: 1px solid #e1e4e8;
}
.subnav-item+.subnav-item {
margin-left: -1px;
}
.subnav-item:first-child {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.subnav-item:last-child {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
/* ------------------ icon panel --------------------*/
/*color*/
.text-gray {
color: #586069 !important;
}
.text-gray-light {
color: #959da5 !important;
}
.text-gray-dark {
color: #24292e !important;
}
.link-gray {
color: #586069 !important;
}
.link-gray-dark {
color: #24292e !important;
}
.link-gray-dark:hover {
color: #0366d6 !important;
}
.border-top {
border-top: 1px #e1e4e8 solid !important;
}
.border-gray-light {
border-color: #eaecef !important;
}
/*form*/
.col-form-label-lg {
font-size: 1rem;
}
.form-control[readonly] {
color: #999;
}
.form-control-plaintext {
color: #999;
}
.input-group-addon {
background-color: #343b43;
color: #999;
border: 1px solid #222;
}
.input-group-text {
background-color: #fff
}
/* tab */
.nav-tabs {
border-bottom: 1px solid rgba(0, 0, 0, .1);
}
.nav-tabs .nav-link {
border-radius: 0;
}
.nav-tabs .nav-link:hover {}
.nav-tabs .nav-link.active {}
.nav-tabs .nav-link.active:first-child {}
/* ------------------ table --------------------*/
.table {}
.table thead th {
border-bottom: none;
padding: .75rem;
line-height: 1;
font-weight: normal;
}
.table thead th,
.table tbody td {
white-space: nowrap !important;
vertical-align: middle;
}
.table-bordered td,
.table-bordered th {
border: 1px solid rgba(0,0,0,.125);
}
.table-active,
.table-active>td,
.table-active>th {
background-color: #007bff;
color: #fff
}
.table tbody .table-active td .badge-dark,
.table tbody .table-active td a {
color: #fff;
}
#rb-body .card .card-header.rb-icon .icon {
float: left;
border-right: 1px solid #c9c9c9;
width: 41px;
height: 100%;
box-shadow: none;
position: absolute;
top: 0;
left: 1px;
text-align: center;
}
/*comment*/
.form-control,
.input-group-lg>.form-control {
border-radius: 0
}
.border-default {
border-color: #222
}
.btn.btn-block {
border-radius: 4rem
}
/* ------------------ 즐겨찾기 --------------------*/
/* ------------------ 토글 레이어 --------------------*/
#bs-example-navbar-collapse-1 .rb-toggle-layer {
padding: 0;
text-shadow: none;
}
#bs-example-navbar-collapse-1 .rb-toggle-layer .panel {
margin: 0;
border: none;
padding: 0;
}
#bs-example-navbar-collapse-1 .rb-toggle-layer .panel-title {
line-height: 30px;
font-weight: bold;
font-size: 14px
}
#bs-example-navbar-collapse-1 .rb-toggle-layer .list-group {
max-height: 450px;
max-height: calc(100vh - 300px);
max-height: -moz-calc(100vh - 300px);
max-height: -webkit-calc(100vh - 300px);
overflow: auto;
}
#bs-example-navbar-collapse-1 .rb-toggle-layer .panel-footer a {
display: block;
text-align: center;
font-weight: normal;
color: #777
}
.rb-box {
position: relative;
background-color: #444;
border-radius: 6px;
text-align: center;
padding: 8px;
margin: 4px;
width: 70px;
height: 65px;
overflow: hidden;
box-shadow: 0 1px 2px #222 !important;
}
/* ------------------ 풀사이즈 편집 --------------------*/
.rb-fullsize {
position: fixed;
z-index: 1000000;
top: -35px;
left: 0;
right: 0;
bottom: 0 width: 100%;
height: 100%;
}
.rb-fullsize textarea {
position: fixed;
top: 47px;
left: 3px;
width: 99.5%;
height: 100%;
}
.rb-fullsize .rb-submit button {
position: fixed;
bottom: 5px;
width: 99%;
height: 40px;
font-weight: bold;
font-size: 18px;
margin: 0 5px 0 5px;
}
/* CodeMirror */
.CodeMirror .CodeMirror-scroll {
line-height: 1.5 !important;
font-size: 12px
}
/* ------------------ footer --------------------*/
.rb-admin-footer {
padding-top: 40px;
padding-bottom: 0;
margin-top: 0;
color: #777;
text-align: center;
}
/* ------------------ modal close --------------------*/
.rb-close-white {
color: #fff;
text-shadow: 0 1px 0 #ffffff;
opacity: 1;
filter: alpha(opacity=100);
line-height: 30px;
}
/* ------------------ 모바일 디바이스 접속 --------------------*/
#rb-body.rb-device-connect {
overflow-x: hidden;
}
#rb-body.rb-device-connect .rb-navbar-nav {
margin-top: 36px;
}
#rb-body.rb-device-connect .mobile-tabs li {
width: 33.3333%;
}
/* ------------------ 기타 --------------------*/
#rb-body .rb-modal-dashboard {
font-size: 18px;
cursor: pointer;
position: relative;
top: 8px;
}
#rb-body.rb-device-connect .rb-modal-dashboard {
font-size: 14px;
top: 0;
}
#rb-body.rb-device-connect .rb-modal-dashboard i {
font-size: 17px;
}
/* ------------------ 미디어쿼리 --------------------*/
@media (min-width: 768px) {
#bs-example-navbar-collapse-1 .rb-notifications-layer {
width: 260px;
}
}
@media (max-width: 767px) {
#rb-body select.form-control {
margin-bottom: 5px;
}
#rb-body .input-group select.form-control {
margin-bottom: 0;
}
}
@media (min-width:992px) {
#rb-body .rb-navbar-nav>li:first-child>a {
-webkit-border-radius: 4px 0 0 0;
-moz-border-radius: 4px 0 0 0;
border-radius: 4px 0 0 0;
}
#rb-body .rb-navbar-nav>li:last-child>a {
-webkit-border-radius: 1px 4px 0 0;
-moz-border-radius: 1px 4px 0 0;
border-radius: 1px 4px 0 0;
}
#rb-body .tab-content {
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
}
}
@media (max-width: 991px) {
#rb-body .rb-navbar-nav.rb-item-03 li {
width: 33.3%;
}
#rb-body .rb-navbar-nav.rb-item-04 li {
width: 25%;
}
}
/*테마*/
/*content*/
/*table*/
/*component*/
/* modal */
.modal .modal-header {
border-bottom: 1px solid rgba(0, 0, 0, .1);
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.modal .modal-header .close {
opacity: 1;
}
.modal .modal-body iframe body {
background-color: #fff
}
.modal-content {
border: 1px solid rgba(0, 0, 0, .1);
border-radius: 0
}
.modal-footer {
border-top: 1px solid rgba(0, 0, 0, .1);
}
/*list-group*/
/*badge*/
.badge-dark {
color: #586069;
background-color: rgba(27, 31, 35, .08);
font-weight: 300
}
/*button*/
.btn {
position: relative;
display: inline-block;
/* padding: 6px 12px; */
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
}
.btn:focus {
outline: 0;
}
.btn-light:focus,
.btn-light.focus {
box-shadow: 0 0 0 0.2em rgba(3, 102, 214, 0.3);
}
[data-toggle="buttons"].btn-group .btn-light {
color: #999;
font-weight: normal;
}
[data-toggle="buttons"].btn-group .btn-light.active {
color: #fff !important;
background-color: #0366d6 !important;
border-color: #0366d6;
}
.btn-sm {
padding: 3px 10px;
font-size: 12px;
line-height: 20px;
}
.btn,
[role="button"] {
cursor: pointer !important;
}
.btn-light {
color: #24292e;
user-select: none;
background-color: #fff;
border: 1px solid rgba(27, 31, 35, 0.2);
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
border-radius: 0
}
.btn-light:hover,
.btn-light.hover {
background-color: #e6ebf1;
background-image: linear-gradient(-180deg, #f0f3f6 0%, #e6ebf1 90%);
background-position: -.5em;
border-color: rgba(27, 31, 35, 0.35);
}
.btn-light:not(:disabled):not(.disabled).active,
.btn-light:not(:disabled):not(.disabled):active,
.show>.btn-light.dropdown-toggle {
background-color: #e9ecef;
background-image: none;
border-color: rgba(27, 31, 35, 0.35);
box-shadow: inset 0 0.15em 0.3em rgba(27, 31, 35, 0.15);
}
.btn-light:not(:disabled):not(.disabled).active:focus,
.btn-light:not(:disabled):not(.disabled):active:focus,
.show>.btn-light.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2em rgba(3, 102, 214, 0.3);
}
.btn-danger {
color: #cb2431;
border: 1px solid rgba(27, 31, 35, 0.2);
background-color: #fafbfc;
background-image: linear-gradient(-180deg, #fafbfc 0%, #eff3f6 90%);
}
.btn-danger:hover {
color: #fff;
background-color: #cb2431;
background-image: linear-gradient(-180deg, #de4450 0%, #cb2431 90%);
border-color: rgba(27, 31, 35, 0.5);
}
.btn-danger:active,
.btn-danger.active {
color: #fff;
background-color: #b5202c;
background-image: none;
border-color: rgba(27, 31, 35, 0.5);
box-shadow: inset 0 0.15em 0.3em rgba(27, 31, 35, 0.15);
}
.btn-danger:disabled,
.btn-danger.disabled {
color: rgba(203, 36, 49, 0.4);
background-color: #eff3f6;
background-image: none;
border-color: rgba(27, 31, 35, 0.2);
box-shadow: none;
}
.btn-outline-primary.disabled,
.btn-outline-primary:disabled {
color: #555;
background-color: transparent;
border-color: #555;
}
/* Pagination */
/*tooltip*/
.tooltip-inner {
background-color: #0366d6;
}
.tooltip.bs-tooltip-top .arrow::before,
.tooltip.bs-tooltip-auto[x-placement^="top"] .arrow::before {
border-top-color: #0366d6
}
/* input-group */
/*form*/
.form-group label {
font-size: 13px;
font-weight: 300;
color: #6c757d
}
.col-form-label {
color: #444
}
.custom-checkbox,
.custom-radio {
/* line-height: 1.85rem; */
}
/*badge*/
/*card*/
.card-header.p-0 a.d-block {
padding: .75rem 1.25rem
}
.card-header.p-0 a.d-block::before {
display: inline-block;
margin-left: 1rem;
margin-right: -.45rem;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
float: right;
content: "\f0d7";
}
.card-header.p-0 a.d-block.collapsed::before {
content: "\f0da";
}
.card-header.bg-primary {
border-bottom: 0;
border-radius: 0;
}
.card-header,
.card-footer {
background-color: #fff
}
.card>.list-group:last-child .list-group-item:last-child {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
/*유틸리티*/
.bg-dark {
background-color: #fff !important;
}
.border {
border: 1px solid #222;
}
.border-bottom {
border-bottom: 1px solid rgba(0, 0, 0, .1) !important;
}
.border-left {
border-left: 1px solid rgba(0, 0, 0, .1) !important;
}
/*tree*/
.sidebar .rb-tree {
font-family: 'NotoSans','돋움', dotum, sans-serif, FontAwesome;
}
.sidebar .rb-tree li:before {
border-left: 1px solid rgba(0, 0, 0, .2) !important;
}
.sidebar .rb-tree li:after {
border-top: 1px solid rgba(0, 0, 0, .2) !important;
}
.sidebar .rb-tree .rb-active {
color: rgb(0, 123, 255);
}
.sidebar .rb-tree a {}
.sidebar .rb-tree a u {
text-decoration: none;
}
/*기본 모듈개별*/
#catebody .dd-item .dd-handle {
background-color: rgba(0, 0, 0, .03);
}
.sidebar .dd-handle {
color: inherit;
}
/*datepicker 스타일 초기화*/
.input-daterange .input-group-addon {
width: auto !important;
min-width: auto !important;
font-weight: normal !important;
background-color: #fff;
text-align: center !important;
text-shadow: none !important;
vertical-align: middle !important;
border: solid transparent !important;
border-width: 1px 0 !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
/* readme */
.rb-docs {
background-color: #fff
}
/* markdown-body */
.markdown-body .form-control,
.markdown-body {
font-size: 14px !important;
}
/* 라이선스 */
.badge-standard {
color: #fff;
background-color: #007bff;
}
.badge-premium {
color: #fff;
background-color: #563d7c;
}

View File

@@ -0,0 +1,34 @@
var _isFullSize = false;
var _isCodeEdit = false;
function editFullSize(id,obj)
{
if (_isCodeEdit)
{
_codefullscreen();
}
else {
if (_isFullSize == false)
{
obj.title = '원래대로';
$('#'+id).addClass('rb-fullsize');
_isFullSize = true;
}
else {
obj.title = '전체화면';
$('#'+id).removeClass('rb-fullsize');
_isFullSize = false;
}
}
}
function goHref_parent(url) {
parent.location.href = url;
}
$(function () {
$('[data-toggle="tooltip"]').tooltip()
$('[data-tooltip="tooltip"]').tooltip({
html: true
})
$('.js-tooltip').tooltip()
})

View File

@@ -0,0 +1,283 @@
<header class="navbar navbar-expand fixed-top navbar-dark bg-dark" role="navigation" data-scroll-header>
<?php if($g['device'] && $module == 'dashboard'):?>
<a class="navbar-brand" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=admin&amp;module=dashboard&amp;front=mobile.shortcut" style="margin-left:0;">
<i class="kf kf-bi-01 fa-lg" style="color:#000;"></i>
</a>
<?php else:?>
<a class="navbar-brand" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=admin&amp;module=dashboard<?php if($g['mobile']&&$_SESSION['pcmode']!='Y'):?>&amp;front=mobile.shortcut<?php endif?>">
<span class="badge badge-light"><?php echo $MD['name']?></span>
</a>
<?php if($module == 'dashboard' && ($front == 'main' || $front == 'mobile.dashboard')):?>
<i class="fa fa-cog rb-modal-dashboard js-tooltip d-none" title="대시보드 꾸미기" data-toggle="modal" data-target="#modal_window"></i>
<?php endif?>
<?php endif?>
<div class="navbar-collapse collapse">
<?php if($g['device']&&$module=='dashboard'):?>
<ul class="navbar-nav mr-auto">
<li<?php if($front=='mobile.shortcut'):?> class="active"<?php endif?>><a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=admin&amp;module=dashboard&amp;front=mobile.shortcut">바로가기</a></li>
<li<?php if($front=='mobile.dashboard'):?> class="active"<?php endif?>><a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=admin&amp;module=dashboard&amp;front=mobile.dashboard">대시보드</a></li>
<li<?php if($front=='mobile.site'):?> class="active"<?php endif?>><a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=admin&amp;module=dashboard&amp;front=mobile.site">사이트</a></li>
</ul>
<?php else:?>
<ul class="navbar-nav mr-auto" id="rb-admin-ul-tabs">
<?php $_front =explode('_' , $front); ?>
<?php $_menuCount=$d['amenu']?count($d['amenu']):0;if(!$nosite&&$_menuCount):?>
<?php if($_i<=10):?>
<?php $_i=1;foreach($d['amenu'] as $_k => $_v):?>
<li id="rb-more-tab-<?php echo $_i?>" class="nav-item">
<a class="nav-link<?php if($_front[0] == $_k):?> active<?php endif?>" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=<?php echo $_k ?>">
<?php echo $_v ?>
</a>
</li>
<?php $_i++;endforeach?>
<?php endif?>
<?php if($_i>10):?>
<li class="nav-item dropdown rb-more-tabs d-block d-sm-none">
<a class="nav-link dropdown-toggle" href="#." data-toggle="dropdown">더보기</a>
<div class="dropdown-menu dropdown-menu-right">
<?php $_i=1;foreach($d['amenu'] as $_k => $_v):?>
<a id="rb-more-tabs-<?php echo $_i?>" class="dropdown-item<?php if($front == $_k):?> active<?php endif?>" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=<?php echo $_k?>">
<?php echo $_v?>
</a>
<?php $_i++;endforeach?>
</div>
</li>
<?php endif?>
<?php endif?>
</ul>
<?php endif?>
<ul class="navbar-nav my-0">
<?php if($module!='dashboard'):?>
<li class="nav-item">
<a class="nav-link<?php if($front == '_info'):?> active<?php endif?>" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;module=<?php echo $module?>&amp;front=_info">
<i class="fa fa-question-circle fa-lg"></i> 안내
</a>
</li>
<?php endif?>
<?php $exists_bookmark=getDbRows($table['s_admpage'],'memberuid='.$my['uid']." and url='".$g['s'].'/?r='.$r.'&m='.$m.'&module='.$module.'&front='.$front."'")?>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">
<i id="_bookmark_star_" class="fa fa-lg fa-star<?php if($exists_bookmark):?> rb-star-fill text-primary<?php else:?>-o<?php endif?>"></i>
</a>
<div class="dropdown-menu dropdown-menu-right p-0">
<div class="card border-dark rounded-0 mb-0" style="width: 300px">
<div class="card-header d-flex justify-content-between align-items-center py-1 px-2 bg-white border-secondary">
북마크
<div>
<div id="_bookmark_notyet_" class="btn-group btn-group-sm dropdown<?php if($exists_bookmark):?> d-none<?php endif?>">
<button type="button" class="btn btn-outline-secondary rb-bookmark-add">북마크에 추가</button>
<button type="button" class="btn btn-outline-secondary dropdown-toggle dropdown-body" data-toggle="dropdown">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<div id="rb-bookmark-dropdown1" class="dropdown-menu">
<a href="#." class="dropdown-item rb-bookmark-add">북마크에 추가</a>
<div class="dropdown-divider"></div>
<a href="#." data-toggle="modal" data-target="#modal_window" class="dropdown-item rb-modal-bookmark">북마크 관리</a>
</div>
</div>
<div id="_bookmark_already_" class="btn-group btn-group-sm <?php if(!$exists_bookmark):?> d-none<?php endif?>">
<button type="button" class="btn btn-light disabled">추가됨</button>
<button type="button" class="btn btn-light dropdown-toggle dropdown-toggle-split" data-toggle="dropdown">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div id="rb-bookmark-dropdown2" class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item b-bookmark-del" href="#">북마크에서 삭제</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item rb-modal-bookmark" href="#" data-toggle="modal" data-target="#modal_window">북마크 관리</a>
</div>
</div>
</div>
</div>
<div id="_add_bookmark_" class="list-group list-group-flush rb-scrollbar">
<?php $ADMPAGE = getDbArray($table['s_admpage'],'memberuid='.$my['uid'],'*','gid','asc',0,1)?>
<?php while($R=db_fetch_array($ADMPAGE)):?>
<a href="<?php echo $R['url']?>" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" id="_now_bookmark_<?php echo $R['uid']?>">
<?php echo $R['name']?>
<i class="fa fa-fw fa-file-text-o"></i>
</a>
<?php endwhile?>
<?php if(!db_num_rows($ADMPAGE)):?><a class="list-group-item"><i class="fa fa-fw fa-file-text-o"></i>등록된 북마크가 없습니다</a><?php endif?>
</div>
<div class="card-footer p-0 border-top-0">
<a href="#." data-toggle="modal" data-target="#modal_window" class="rb-modal-bookmark btn btn-link btn-block">북마크 관리</a>
</div>
</div>
</div>
</li>
<?php if ($my['super'] && !$my['adm_site']): ?>
<?php
$SITES = getDbArray($table['s_site'],'','*','gid','asc',0,$p);
$SITEN = db_num_rows($SITES);
?>
<?php if($SITEN>1 && ($module!='admin' && $module!='project')):?>
<li class="nav-item d-none" data-role="siteSelector">
<div class="input-group input-group-sm mt-1 ml-2 border border-primary">
<div class="input-group-append" style="margin-left: 0;">
<a class="input-group-text muted-link" href="<?php echo $g['s']?>/?r=<?php echo $SD['id']?>&amp;m=<?php echo $m?>&amp;pickmodule=site&amp;panel=Y" target="_parent" data-toggle="tooltip" title="사이트관리">
<i class="<?php echo $SD['icon']?$SD['icon']:'fa fa-home'?> fa-lg" aria-hidden="true"></i>
</a>
</div>
<select class="form-control custom-select" onchange="goHref_parent('<?php echo $g['s']?>/?m=<?php echo $m?>&pickmodule=<?php echo $module?>&panel=Y&pickfront=<?php echo $front?>&r='+this.value);" style="margin-left: -1px;min-width:100px">
<?php while($S = db_fetch_array($SITES)):?>
<option value="<?php echo $S['id']?>"<?php if($r==$S['id']):?> selected<?php endif?>><?php echo $S['label']?></option>
<?php endwhile?>
</select>
</div>
</li>
<?php endif?>
<?php else: ?>
<?php
$SITES = getArrayString($my['adm_site']);
$SITEN = $SITES[count];
?>
<?php if($SITEN>1 && ($module!='admin' && $module!='project')):?>
<li class="nav-item d-none" data-role="siteSelector">
<div class="input-group input-group-sm mt-1 ml-2 border border-primary">
<div class="input-group-append" style="margin-left: 0;">
<a class="input-group-text muted-link" href="<?php echo $g['s']?>/?r=<?php echo $_SD['id']?>&amp;m=<?php echo $m?>&amp;pickmodule=site&amp;panel=Y" target="_parent">
<i class="<?php echo $SD['icon']?> fa-lg" aria-hidden="true"></i>
</a>
</div>
<select class="form-control custom-select" onchange="goHref_parent('<?php echo $g['s']?>/?m=<?php echo $m?>&pickmodule=<?php echo $module?>&panel=Y&pickfront=<?php echo $front?>&r='+this.value);" style="margin-left: -1px;min-width:100px">
<?php $_i=0;foreach($SITES['data'] as $val):?>
<?php $_SD = getUidData($table['s_site'],$val); ?>
<option value="<?php echo $_SD['id']?>"<?php if($r==$_SD['id']):?> selected<?php endif?>><?php echo $_SD['label']?></option>
<?php $_i++;endforeach?>
</select>
</div>
</li>
<?php endif?>
<?php endif; ?>
</ul>
</div><!-- /.navbar-collapse -->
</header>
<main id="rb-admin-page-content">
<?php include $g['adm_module'] ?>
</main>
<script>
$(document).ready(function()
{
document.body.onload = tabSetting;
document.body.onresize = tabSetting;
<?php if($g['device']):?>
$('#bs-example-navbar-collapse-1').on('show.bs.collapse', function () {
$("#_navbar_header_").addClass('rb-header-bottom-line');
});
$('#bs-example-navbar-collapse-1').on('hide.bs.collapse', function () {
$("#_navbar_header_").removeClass('rb-header-bottom-line');
});
getId('_add_bookmark_').style.maxHeight = '205px';
<?php endif?>
$('#bs-example-navbar-collapse-1 [data-toggle=dropdown]').on('click', function(event) {
event.preventDefault();
event.stopPropagation();
$(this).parent().siblings().removeClass('open');
$(this).parent().toggleClass('open');
});
$(".rb-help-btn").click(function(){
$(this).button('toggle');
});
$('.rb-modal-bookmark').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=admin&amp;module=admin&amp;front=modal.bookmark')?>');
});
$('.rb-bookmark-add').on('click',function() {
frames._action_frame_admin.location.href = '<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&a=bookmark&_addmodule=<?php echo $module?>&_addfront=<?php echo $front?>';
});
$('.rb-bookmark-del').on('click',function() {
frames._action_frame_admin.location.href = '<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&a=bookmark_delete&deltype=hidden&_addmodule=<?php echo $module?>&_addfront=<?php echo $front?>';
});
});
function tabSetting()
{
<?php if($g['device']):?>
$('#bs-example-navbar-collapse-1').removeClass('navbar-collapse');
if(document.body.scrollWidth > 750) $('#bs-example-navbar-collapse-1').addClass('navbar-collapse');
else $('#bs-example-navbar-collapse-1').removeClass('navbar-collapse');
<?php endif?>
var i;
var bodyWidth = document.body.scrollWidth;
var allTabnum = <?php echo (int)$_menuCount?>;
var showTabnum = allTabnum;
var showTabMore = false;
if (allTabnum > 3)
{
if (bodyWidth >= 0 && bodyWidth < 360)
{
showTabnum = 2;
showTabMore = true;
}
else if (bodyWidth >= 360 && bodyWidth < 523)
{
showTabnum = 3;
showTabMore = true;
}
else if (bodyWidth >= 523 && bodyWidth < 640)
{
showTabnum = 4;
showTabMore = true;
}
else if (bodyWidth >= 640 && bodyWidth < 750)
{
showTabnum = 5;
showTabMore = true;
}
else if (bodyWidth >= 750 && bodyWidth < 1100)
{
showTabnum = 8;
showTabMore = true;
}
else if (bodyWidth >= 1100 && bodyWidth < 1400)
{
showTabnum = 10;
showTabMore = false;
}
else if (bodyWidth >= 1400)
{
showTabnum = allTabnum;
showTabMore = false;
}
}
for (i = 1; i <= allTabnum; i++)
{
$('#rb-more-tab-'+i).removeClass('d-none');
$('#rb-more-tabs-'+i).removeClass('d-none');
}
for (i = showTabnum+1; i <= allTabnum; i++) $('#rb-more-tab-'+i).addClass('d-none');
for (i = 0; i <= showTabnum; i++) $('#rb-more-tabs-'+i).addClass('d-none');
if (showTabMore == true) $('.rb-more-tabs').removeClass('d-none');
else $('.rb-more-tabs').addClass('d-none');
}
// 북마크 dropdown 내부클릭시 dropdown 유지
$('.dropdown-body').on('click', function(e) {
e.stopPropagation();
});
</script>

View File

@@ -0,0 +1,183 @@
@charset "utf-8";
@import url(https://fonts.googleapis.com/earlyaccess/notosanskr.css);
html,
body {
height: 100%;
}
body {
background-color: #f9f9f9;
font-family: 'Noto Sans KR', "돋움", dotum, '나눔고딕', 'Nanum Gothic', sans-serif, FontAwesome, kimsq !important;
}
a {
color: #444
}
.rb-root {
display: table;
height: 100%;
width: 100%;
padding: 0;
}
#rb-login {
display: table-cell;
text-align: left;
margin: 0 auto;
padding: 10% 0 100px;
}
#rb-login .card {
margin: 0 auto 15px;
border-radius: 3px;
}
#rb-login .card-header h1 {
margin-bottom: 0;
font-size: 18px
}
#rb-login .card-header a:hover {
text-decoration: none
}
#rb-login .card .form-group label {
font-weight: normal;
display: block;
margin-bottom: 7px
}
#rb-login .form-login .label-link {
float: right;
font-size: 12px;
line-height: 24px;
}
#rb-login .panel .form-control.input-lg {
border-radius: 2px;
}
#rb-login .card-footer ul {
margin-bottom: 0
}
#rb-login .card-foote a {
font-size: 90%;
}
.form-control,
.form-control[readonly] {
border-radius: 0
}
.btn {
border-radius: 0
}
/*반응형 설정*/
@media (min-width: 481px) {
#rb-login .card {
width: 350px;
}
}
@media (max-width: 480px) {
body {
/*background-color: #fff !important*/
}
#rb-login {
padding: 0;
}
#rb-login .card {
box-shadow: none;
border: none;
border-radius: none;
background-color: inherit;
}
#rb-login .card-footer {
/*background-color: transparent;*/
}
#rb-login h1 {
font-size: 20px
}
#rb-login .btn.btn-primary {
width: 100%;
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 6px;
}
}
#modal-pwReset {
font-size: 14px
}
#modal-pwReset .modal-header,
#modal-pwReset .card-header {
background-color: #0069d9;
color: #fff
}
#modal-pwReset .modal-content {
border-radius: .45rem;
}
#modal-pwReset .nav-tabs .nav-link:focus,
#modal-pwReset .nav-tabs .nav-link:hover {
border-color: #0069d9 #0069d9 #fff;
}
#modal-pwReset .form-control,
#modal-pwReset .form-control[readonly] {
background-color: #fff;
border: 1px solid #ced4da;
border-radius: 0;
color: #495057;
}
.btn-light {
color: #24292e;
user-select: none;
background-color: #eff3f6;
background-image: linear-gradient(-180deg, #fafbfc 0%, #eff3f6 90%);
background-repeat: repeat-x;
background-position: -1px -1px;
background-size: 110% 110%;
border: 1px solid rgba(27, 31, 35, 0.2);
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
}
.btn-light:hover,
.btn-light.hover {
background-color: #e6ebf1;
background-image: linear-gradient(-180deg, #f0f3f6 0%, #e6ebf1 90%);
background-position: -.5em;
border-color: rgba(27, 31, 35, 0.35);
}
.btn-light:not(:disabled):not(.disabled).active,
.btn-light:not(:disabled):not(.disabled):active,
.show>.btn-light.dropdown-toggle {
background-color: #e9ecef;
background-image: none;
border-color: rgba(27, 31, 35, 0.35);
box-shadow: inset 0 0.15em 0.3em rgba(27, 31, 35, 0.15);
}
.btn-light:not(:disabled):not(.disabled).active:focus,
.btn-light:not(:disabled):not(.disabled):active:focus,
.show>.btn-light.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2em rgba(3, 102, 214, 0.3);
}

View File

@@ -0,0 +1,540 @@
<div class="rb-root">
<div id="rb-login">
<div class="card shadow-sm">
<div class="card-header">
<h1>
<a href="<?php echo $g['r']?>/">
<i class="kf-bi-01"></i>
</a>
<small>관리자 모드</small>
</h1>
</div>
<div class="card-body">
<form class="loginForm" role="form" name="loginform" id="admin-loginform" action="<?php echo $g['s']?>/" method="post">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="a" value="login">
<input type="hidden" name="referer" value="<?php echo $referer ? $referer : $_SERVER['HTTP_REFERER']?>">
<input type="hidden" name="usertype" value="admin">
<input type="hidden" name="pickgoods" value="<?php echo $pickgoods ?>">
<input type="hidden" name="form" value="">
<div class="form-group">
<label for="id" class="control-label">아이디 또는 이메일</label>
<input type="text" name="id" class="form-control input-lg" id="id" placeholder="" value="" autofocus required autocapitalize="off" autocorrect="off" tabindex="1">
<div class="invalid-feedback mt-2" data-role="idErrorBlock"></div>
</div>
<div class="form-group">
<label for="pw" class="control-label">비밀번호</label>
<input type="password" name="pw" class="form-control input-lg" id="pw" placeholder="" value="" required tabindex="2">
<div class="invalid-feedback mt-2" data-role="passwordErrorBlock"></div>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="login_cookie" name="login_cookie" value="checked" data-toggle="collapse" data-target="#collapsealert">
<label class="custom-control-label" for="login_cookie">로그인 상태 유지</label>
</div>
<div class="collapse" id="collapsealert" style="">
<div class="alert alert-danger f12 mb-3">
개인정보 보호를 위해, 개인 PC에서만 사용해 주세요.
</div>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit" id="rb-submit" data-role="submit" tabindex="3">
<span class="not-loading">로그인</span>
<span class="is-loading">
<div class="d-flex align-items-center justify-content-center">
<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>
<span>로그인중...</span>
</div>
</span>
</button>
<p class="mt-3">
<a href="#modal-pwReset" data-toggle="modal">
<small>비밀번호를 잊으셨나요?</small>
</a>
</p>
</form>
</div>
</div>
</div>
</div>
<!-- 모달 : modal-pwReset : 비밀번호 초기화 -->
<div class="modal fade" id="modal-pwReset" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered" role="document" style="max-width: 400px;">
<div class="modal-content">
<div class="modal-header border-bottom-0 d-flex flex-column" style="">
<h5 class="modal-title mx-auto h6">관리자 비밀번호 재설정</h5>
</div>
<?php if ($d['member']['join_byEmail'] || $d['member']['join_byPhone']): ?>
<div class="card border-0" style="margin-top: -15px" data-role="confirm_code">
<div class="card-header">
<ul class="nav nav-tabs nav-justified card-header-tabs f14">
<?php if ($d['member']['join_byEmail']): ?>
<li class="nav-item">
<a class="nav-link<?php echo $d['member']['join_byEmail']?' active':'' ?>" id="tab-email" data-toggle="tab" href="#pane-pw-email">
이메일로 받기
</a>
</li>
<?php endif; ?>
<?php if ($d['member']['join_byPhone']): ?>
<li class="nav-item">
<a class="nav-link<?php echo ($d['member']['join_byPhone'] && !$d['member']['join_byEmail'])?' active':'' ?>" id="tab-phone" data-toggle="tab" href="#pane-pw-phone">
휴대폰으로 받기
</a>
</li>
<?php endif; ?>
</ul>
</div>
<div class="card-body ">
<div class="tab-content text-center">
<div class="tab-pane <?php echo $d['member']['join_byEmail']?' show active':'' ?>" id="pane-pw-email" role="tabpanel" aria-labelledby="tab-email">
<div class="input-group input-group-lg mt-3">
<input type="email" class="form-control" name="email" placeholder="이메일 주소" tabindex="1" autocorrect="off" autocapitalize="off" required value="">
<div class="invalid-tooltip" data-role="emailErrorBlock"></div>
<div class="input-group-append">
<button class="btn btn-light" type="button" data-act="send_code" data-type="email" data-device="desktop">
<span class="not-loading">다음</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
<div class="d-none mt-3" data-role="verify_email_area">
<small class="form-text text-success my-3">
인증번호를 발송했습니다.(유효시간 <?php echo $d['member']['join_keyexpire'] ?>분)
<span data-role="countdown" data-email-countdown="">[00:00]</span><br>
위 메일로 발송된 6자리 인증번호를 입력해 주세요.<br>
인증번호가 오지 않으면 입력하신 정보가 정확한지 확인하여 주세요.
</small>
<div class="input-group input-group-lg">
<input type="number" class="form-control" name="confirm_email_code" data-role="confirm_email_code" placeholder="인증번호 입력">
<div class="invalid-tooltip" data-role="emailCodeBlock"></div>
<div class="input-group-append">
<button class="btn btn-outline-primary" type="button" data-act="confirm_code" data-type="email" data-device="desktop">
<span class="not-loading">확인</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
</div><!-- /.d-none -->
</div><!-- /.tab-pane -->
<div class="tab-pane <?php echo ($d['member']['join_byPhone'] && !$d['member']['join_byEmail'])?' show active':'' ?>" id="pane-pw-phone" role="tabpanel" aria-labelledby="tab-phone">
<div class="input-group input-group-lg mt-3">
<input type="tel" class="form-control" name="phone" placeholder="휴대폰 번호" tabindex="1" autocorrect="off" autocapitalize="off" required>
<div class="invalid-tooltip" data-role="phoneErrorBlock"></div>
<div class="input-group-append">
<button class="btn btn-light" type="button" data-act="send_code" data-type="phone" data-device="desktop">
<span class="not-loading">다음</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
<div class="d-none mt-3" data-role="verify_phone_area">
<small class="form-text text-success my-3">
인증번호를 발송했습니다.(유효시간 <?php echo $d['member']['join_keyexpire'] ?>분)
<span data-role="countdown" data-phone-countdown="">[00:00]</span><br>
위 휴대폰으로 발송된 6자리 인증번호를 입력해 주세요.<br>
인증번호가 오지 않으면 입력하신 정보가 정확한지 확인하여 주세요.
</small>
<div class="input-group input-group-lg">
<input type="number" class="form-control" name="confirm_phone_code" data-role="confirm_phone_code" placeholder="인증번호 입력">
<div class="invalid-tooltip" data-role="phoneCodeBlock">인증번호를 입력해주세요.</div>
<div class="input-group-append">
<button class="btn btn-outline-primary" type="button" data-act="confirm_code" data-type="phone" data-device="desktop">
<span class="not-loading">확인</span>
<span class="is-loading"><i class="fa fa-spinner fa-spin"></i></span>
</button>
</div>
</div>
</div><!-- /.d-none -->
</div><!-- /.tab-pane -->
</div><!-- /.tab-content -->
<ul class="list-unstyled f13 text-muted mt-4 mb-1">
<li>본인인증을 통해 비밀번호를 재설정 하실 수 있습니다.</li>
<li>인증번호를 받을 곳을 선택해 주세요.</li>
<li>비밀번호는 암호화 저장되어 분실 시 찾아드릴 수 없습니다.</li>
</ul>
</div><!-- /.card-body tab-content-->
</div><!-- /.card -->
<?php endif; ?>
<div class="card d-none" data-role="change_pw">
<div class="card-body">
<form id="pwResetForm" role="form" action="<?php echo $g['s']?>/" method="post" autocomplete="off">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="member">
<input type="hidden" name="a" value="pw_reset">
<input type="hidden" name="act" value="change_pw">
<input type="hidden" name="device" value="desktop">
<input type="hidden" name="code" value="">
<input type="hidden" name="target" value="">
<input type="hidden" name="type" value="">
<input type="hidden" name="check_pw1" value="0">
<input type="hidden" name="check_pw2" value="0">
<input type="hidden" name="usertype" value="admin">
<div class="form-group position-relative">
<label>비밀번호(6~16자리)</label>
<input type="password" class="form-control form-control-lg" name="pw1" placeholder="" autocorrect="off" autocapitalize="off" data-role="pw1">
<div class="invalid-tooltip" data-role="pw1CodeBlock" id="pw1-feedback"></div>
</div>
<div class="form-group position-relative">
<label>비밀번호 재입력</label>
<input type="password" class="form-control form-control-lg" name="pw2" placeholder="" autocorrect="off" autocapitalize="off" data-role="pw2">
<div class="invalid-tooltip" data-role="pw2CodeBlock" id="pw2-feedback"></div>
</div>
<div class="mt-4 mb-3">
<button type="submit" class="btn btn-outline-primary btn-lg btn-block" data-role="submit">
<span class="not-loading">변경하기</span>
<span class="is-loading"><i class="fa fa-spinner fa-lg fa-spin fa-fw"></i> 변경중 ...</span>
</button>
</div>
</form>
</div><!-- /.card-body -->
</div><!-- /.card -->
<div class="modal-footer justify-content-center py-2">
<button type="button" class="btn btn-link muted-link" data-dismiss="modal">닫기</button>
</div>
</div>
</div>
</div>
<!-- https://github.com/hilios/jQuery.countdown -->
<?php getImport('jquery.countdown','jquery.countdown.min','2.2.0','js')?>
<script>
var modal_pwReset = $('#modal-pwReset')
$(function () {
$('#admin-loginform').submit(function(e){
e.preventDefault();
e.stopPropagation();
var form = $(this)
var formID = form.attr('id')
var f = document.getElementById(formID);
form.find('[name="form"]').val('#'+formID);
form.find('[type="submit"]').attr("disabled",true);
form.find('.form-control').removeClass('is-invalid') //에러이력 초기화
setTimeout(function(){
getIframeForAction(f);
f.submit();
}, 500);
});
// 로그인 에러 흔적 초기화
$("#admin-loginform").find('.form-control').keyup(function() {
$(this).removeClass('is-invalid')
});
})
function doPwCountdown(type) {
modal_pwReset.find('[data-'+type+'-countdown]').each(function() {
var $this = $(this), finalDate = $(this).data(type+'-countdown');
$this.html('');
$this.countdown(finalDate, function(event) {
$this.html('['+event.strftime('%M:%S')+']');
});
});
};
function pwResetCheck(obj,layer) {
var f = document.getElementById('pwResetForm');
if (!obj.value)
{
obj.classList.remove('is-invalid');
getId(layer).innerHTML = '';
}
else
{
if (obj.name == 'pw1') {
f.classList.remove('was-validated');
if (f.pw1.value.length < 6 || f.pw1.value.length > 16) {
f.check_pw1.value = '0';
f.classList.remove('was-validated');
obj.classList.add('is-invalid');
obj.classList.remove('is-valid');
getId(layer).innerHTML = '영문/숫자 2개 이상의 조합으로 최소 6~16자로 입력하셔야 합니다.';
obj.focus();
return false;
}
if (getTypeCheck(f.pw1.value,"abcdefghijklmnopqrstuvwxyz")) {
getId(layer).innerHTML = '비밀번호가 영문만으로 입력되었습니다.\n영문/숫자 2개 이상의 조합으로 최소 6자이상 입력하셔야 합니다.';
obj.focus();
return false;
}
if (getTypeCheck(f.pw1.value,"1234567890")) {
getId(layer).innerHTML = '비밀번호가 숫자만으로 입력되었습니다.\n영문/숫자 2개 이상의 조합으로 최소 6자이상 입력하셔야 합니다.';
obj.focus();
return false;
}
f.pw1.classList.add('is-valid');
f.pw1.classList.remove('is-invalid');
getId(layer).innerHTML = '';
f.check_pw1.value = '1';
}
if (obj.name == 'pw2') {
f.classList.remove('was-validated');
obj.classList.add('is-invalid');
obj.classList.remove('is-valid');
if (f.pw1.value != f.pw2.value)
{
getId(layer).innerHTML = '비밀번호가 일치하지 않습니다.';
f.classList.remove('was-validated');
obj.focus();
f.check_pw2.value = '0';
return false;
}
f.pw2.classList.add('is-valid');
f.pw2.classList.remove('is-invalid');
getId(layer).innerHTML = '';
f.check_pw2.value = '1';
}
}
}
$(function () {
modal_pwReset.on('show.bs.modal', function (e) {
var modal = modal_pwReset
//화면 초기화
modal.find('[data-role="confirm_code"]').removeClass('d-none')
modal.find('[data-role="change_pw"]').addClass('d-none')
modal.find('#tab-email').tab('show')
modal.find('[data-act="send_code"]').prop("disabled",false)
modal.find('[data-act="send_code"] .not-loading').text('다음')
modal.find('[data-act="confirm_code"]').prop("disabled",false)
modal.find('[type="number"]').val('').removeClass('is-invalid')
modal.find('[name="email"]').val('').removeClass('is-invalid')
modal.find('[name="phone"]').val('').removeClass('is-invalid')
modal.find('[data-role="verify_email_area"]').addClass('d-none')
modal.find('[data-role="verify_phone_area"]').addClass('d-none')
modal.find('[data-role="pw1"]').val('').removeClass('is-invalid')
modal.find('[data-role="pw2"]').val('').removeClass('is-invalid')
modal.find('[name="check_pw1"]').val(0)
modal.find('[name="check_pw2"]').val(0)
modal.find('[data-role="submit"]').prop("disabled",false)
})
modal_pwReset.on('shown.bs.modal', function (e) {
var modal = modal_pwReset
modal.find('[name="email"]').trigger('focus')
})
modal_pwReset.find('input').keyup(function() {
$(this).removeClass('is-invalid') //에러 발생후 다시 입력 시도시에 에러 흔적 초기화
});
//비밀번호 유용성 체크
modal_pwReset.find('[data-role="change_pw"] input').keyup(function(){
var modal = modal_pwReset
var item = $(this).data('role')
var item_pw_check = modal.find('[name=check_pw]').val()
if (item =='pw1') {
element = document.querySelector('[name="pw1"]');
pwResetCheck(element,'pw1-feedback')
}
if (item =='pw2') {
element = document.querySelector('[name="pw2"]');
pwResetCheck(element,'pw2-feedback')
}
});
})
modal_pwReset.find('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var pane = $(this).attr('id')
if (pane=='tab-email') modal_pwReset.find('[name="email"]').focus()
if (pane=='tab-phone') modal_pwReset.find('[name="phone"]').focus()
})
// 본인인증 코드발송
modal_pwReset.on('click','[data-act="send_code"]',function(){
var modal = modal_pwReset
var button = $(this)
var act = 'send_code'
var type = button.attr('data-type')
var device = button.attr('data-device')
if (type=='email') {
var input = modal.find('[name="email"]')
var _input = document.querySelector('#modal-pwReset [name="email"]');
var target = input.val()
var msg = modal.find('[data-role="emailErrorBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 이메일 입력폼 유효성 체크
if (!target) {
input.focus()
input.addClass('is-invalid')
msg.text('이메일을 입력해주세요.')
return false;
}
if (!chkEmailAddr(_input.value)) {
input.focus()
input.addClass('is-invalid')
msg.text('이메일 형식이 아닙니다.')
return false;
}
}
if (type=='phone') {
var input = modal.find('[name="phone"]')
var _input = document.querySelector('#modal-pwReset [name="phone"]');
var target = input.val()
var msg = modal.find('[data-role="phoneErrorBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 휴대폰번호 입력폼 유효성 체크
if (!target) {
input.focus()
input.addClass('is-invalid')
msg.text('휴대폰 번호를 입력해주세요.')
return false;
}
if (!chkPhoneNumber(_input.value)) {
input.focus()
input.addClass('is-invalid')
msg.text('휴대폰 번호 형식이 아닙니다.')
return false;
}
}
button.attr('disabled',true) //버튼 로딩처리
var url = rooturl+'/?r='+raccount+'&m=member&a=pw_reset&act='+act+'&type='+type+'&target='+target+'&device='+device+'&usertype=admin'
getIframeForAction();
//modal.find('[data-act=confirm_code]').attr('data-type',type);
//modal.find('[type=number]').attr('data-role','confirm_'+type+'_code').attr('name','confirm_'+type+'_code');
//modal.find('.invalid-tooltip').attr('data-role',type+'CodeBlock');
modal.find('[data-role=countdown]').text('');
modal.find('[data-role="target"]').text(target)
setTimeout(function() {
frames.__iframe_for_action__.location.href = url;
}, 700);
});
// 본인인증 코드확인
modal_pwReset.on('click','[data-act="confirm_code"]',function(){
var modal = modal_pwReset
var button = $(this)
var act = 'confirm_code'
var type = button.data('type')
var device = button.data('device')
if (type=='email') {
var input = modal.find('[name="confirm_email_code"]')
var code = input.val()
var msg = modal.find('[data-role="emailCodeBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 인증번호 입력폼 유효성 체크
if (!code) {
input.focus()
input.addClass('is-invalid')
msg.text('인증번호를 입력해주세요.')
return false;
}
}
if (type=='phone') {
var input = modal.find('[name="confirm_phone_code"]')
var code = input.val()
var msg = modal.find('[data-role="phoneCodeBlock"]')
// 상태초기화
input.removeClass('is-invalid is-valid')
// 인증번호 입력폼 유효성 체크
if (!code) {
input.focus()
input.addClass('is-invalid')
msg.text('인증번호를 입력해주세요.')
return false;
}
}
button.attr('disabled',true) //버튼 로딩처리
var url = rooturl+'/?r='+raccount+'&m=member&a=pw_reset&act='+act+'&type='+type+'&code='+code+'&device='+device
getIframeForAction();
setTimeout(function() {
frames.__iframe_for_action__.location.href = url;
}, 700);
});
// 비밀번호 변경
$('#pwResetForm').submit( function(e){
e.preventDefault();
e.stopPropagation();
var form = $(this)
var formID = form.attr('id')
var f = document.getElementById(formID);
if (f.check_pw1.value == '0' || f.check_pw2.value == '0') {
return false;
}
form.find('[name="form"]').val('#'+formID);
form.find('[type="submit"]').attr("disabled",true); //버튼 로딩처리
form.find('.form-control').removeClass('is-invalid') //에러이력 초기화
setTimeout(function(){
getIframeForAction(f);
f.submit();
}, 500);
}
);
</script>

View File

@@ -0,0 +1,22 @@
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="font-size:12px;line-height:18px;font-family:Apple SD Gothic Neo,sans-serif,'맑은고딕',Malgun Gothic,'돋움',Dotum;letter-spacing:-1px;color:#767676;padding-left: 20px;;padding-top: 15px;text-align: center;">
<p>본 메일은 발신전용 입니다.<br>
<small>Copyright <a href="" target="_blank" >{SITE}</a> All Rights Reserved.</small> </p>
</td>
</tr>
<tr>
<td height="50"></td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,18 @@
<table border="0" cellpadding="0" cellspacing="0" align="center" style="width:100%;background:#efeff0">
<tbody>
<tr>
<td align="center">
<div style="max-width:600px;margin:0 auto">
<table cellpadding="0" cellspacing="0" style="width:100%;margin:0 auto;background-color:#efeff0;text-align:left">
<tbody>
<tr>
<td style="padding:30px;background:#4A5960;font-size: 23px;line-height: 22px;font-family: Apple SD Gothic Neo,sans-serif,'맑은고딕',Malgun Gothic,'굴림',gulim;letter-spacing: -1px;color: #fff;">
{SITE}
</td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" style="width:100%;margin:0 auto;background-color:#fff;text-align:left;color:#2c2e37;padding:30px;">
<tbody>
<tr>
<td style="padding:30px;">

View 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/system'; // 도움말
?>

View File

@@ -0,0 +1,26 @@
<?php
$d['admin']['themepc'] = "kimsq-white";
$d['admin']['pannellink'] = "kimsq-light.css";
$d['admin']['cache_flag'] = "totime";
$d['admin']['mailer'] = "";
$d['admin']['http_port'] = "";
$d['admin']['secu_tags'] = "img[src|alt|title|width|height|style],
figure[class], figcaption,
oembed[url],
video[src|type|width|height|poster|preload|controls], source[src|type],
a[href|target],
iframe[width|height|src|frameborder|allowfullscreen],
strong, b, i, u, s, mark, code, em, br, font,
h1[style], h2[style], h3[style], h4[style], h5[style], h6[style],
p[style], div[style], center, address[style],
span[style], pre[style],
ul, ol, li,
table[width|height|border|style], th[width|height|border|style],
tr[width|height|border|style], td[width|height|border|style],
hr,
blockquote";
$d['admin']['secu_flash'] = "";
$d['admin']['secu_domain'] = "youtube.com,vimeo.com,";
$d['admin']['secu_param'] = ";a=,&a=,?a=,m=admin,system=,";
$d['admin']['smtp_ssl'] = "";
$d['admin']['uninstall'] = "";

View File

@@ -0,0 +1,3 @@
<?php
$d['admin']['version'] = "2.4.5.39";
?>

5
modules/bbs/README.md Normal file
View File

@@ -0,0 +1,5 @@
# 게시판 모듈
## Copyright and license
Copyright 2020 Redblock, Inc.
Licensed under the [RBL](https://kimsq.com/p/rbl) License

0
modules/bbs/_main.css Normal file
View File

51
modules/bbs/_main.js Normal file
View File

@@ -0,0 +1,51 @@
function fontFace(layer,fontbox)
{
var x = getId(fontbox);
if (x.style.display == 'block')
{
x.style.display = 'none';
}
else {
var s = '';
s+= '<ul>';
s+= '<li style="font-family:dotum;border-bottom:#dfdfdf solid 1px;background:#ECF0F6;" onclick="aplyFont(\''+layer+'\',\''+fontbox+'\',0);">기본글꼴</li>';
s+= '<li style="font-family:malgun gothic;" onclick="aplyFont(\''+layer+'\',\''+fontbox+'\',this);">맑은고딕</li>';
s+= '<li style="font-family:gulim;" onclick="aplyFont(\''+layer+'\',\''+fontbox+'\',this);">굴림</li>';
s+= '<li style="font-family:dotum;" onclick="aplyFont(\''+layer+'\',\''+fontbox+'\',this);">돋움</li>';
s+= '<li style="font-family:batang;" onclick="aplyFont(\''+layer+'\',\''+fontbox+'\',this);">바탕</li>';
s+= '</ul>';
x.innerHTML = s;
x.style.display = 'block';
}
}
function aplyFont(layer,fontbox,obj)
{
if (!obj)
{
getId(layer).style.fontFamily = 'gulim';
getId(layer).style.fontSize = '12px';
setCookie('myFontFamily',getId(layer).style.fontFamily,1);
setCookie('myFontSize',getId(layer).style.fontSize,1);
}
else {
getId(layer).style.fontFamily = obj.style.fontFamily;
setCookie('myFontFamily',obj.style.fontFamily,1);
}
getId(fontbox).style.display = 'none';
}
function fontResize(layer,type)
{
var l = getId(layer);
var nSize = l.style.fontSize ? l.style.fontSize : '12px';
var iSize = parseInt(nSize.replace('px',''));
if (type == '+')
{
if (iSize < 20) l.style.fontSize = (iSize + 1) + 'px';
}
else {
if (iSize > 6) l.style.fontSize = (iSize - 1) + 'px';
}
setCookie('myFontSize',l.style.fontSize,1);
}

View File

@@ -0,0 +1,165 @@
<?php
if(!defined('__KIMS__')) exit;
//게시판리스트
$_tmp = db_query( "select count(*) from ".$table[$module.'list'], $DB_CONNECT );
if ( !$_tmp ) {
$_tmp = ("
CREATE TABLE ".$table[$module.'list']." (
uid INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
gid INT DEFAULT '0' NOT NULL,
site INT DEFAULT '0' NOT NULL,
id VARCHAR(30) DEFAULT '' NOT NULL,
name VARCHAR(200) DEFAULT '' NOT NULL,
category TEXT NOT NULL,
num_r INT DEFAULT '0' NOT NULL,
d_last VARCHAR(14) DEFAULT '' NOT NULL,
d_regis VARCHAR(14) DEFAULT '' NOT NULL,
imghead VARCHAR(100) DEFAULT '' NOT NULL,
imgfoot VARCHAR(100) DEFAULT '' NOT NULL,
puthead VARCHAR(20) DEFAULT '' NOT NULL,
putfoot VARCHAR(20) DEFAULT '' NOT NULL,
addinfo TEXT NOT NULL,
writecode TEXT NOT NULL,
KEY gid(gid),
KEY id(id)) ENGINE=".$DB['type']." CHARSET=UTF8MB4");
db_query($_tmp, $DB_CONNECT);
db_query("OPTIMIZE TABLE ".$table[$module.'list'],$DB_CONNECT);
}
//게시판인덱스
$_tmp = db_query( "select count(*) from ".$table[$module.'idx'], $DB_CONNECT );
if ( !$_tmp ) {
$_tmp = ("
CREATE TABLE ".$table[$module.'idx']." (
site INT DEFAULT '0' NOT NULL,
notice TINYINT DEFAULT '0' NOT NULL,
bbs INT DEFAULT '0' NOT NULL,
gid double(11,2) DEFAULT '0.00' NOT NULL,
KEY site(site),
KEY notice(notice),
KEY bbs(bbs,gid),
KEY gid(gid)) ENGINE=".$DB['type']." CHARSET=UTF8MB4");
db_query($_tmp, $DB_CONNECT);
db_query("OPTIMIZE TABLE ".$table[$module.'idx'],$DB_CONNECT);
}
//게시판데이터
$_tmp = db_query( "select count(*) from ".$table[$module.'data'], $DB_CONNECT );
if ( !$_tmp ) {
$_tmp = ("
CREATE TABLE ".$table[$module.'data']." (
uid INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
site INT DEFAULT '0' NOT NULL,
gid double(11,2) DEFAULT '0.00' NOT NULL,
bbs INT DEFAULT '0' NOT NULL,
bbsid VARCHAR(30) DEFAULT '' NOT NULL,
depth TINYINT DEFAULT '0' NOT NULL,
parentmbr INT DEFAULT '0' NOT NULL,
display TINYINT DEFAULT '0' NOT NULL,
hidden TINYINT DEFAULT '0' NOT NULL,
notice TINYINT DEFAULT '0' NOT NULL,
name VARCHAR(30) DEFAULT '' NOT NULL,
nic VARCHAR(50) DEFAULT '' NOT NULL,
mbruid INT DEFAULT '0' NOT NULL,
id VARCHAR(16) DEFAULT '' NOT NULL,
pw VARCHAR(50) DEFAULT '' NOT NULL,
category VARCHAR(100) DEFAULT '' NOT NULL,
subject VARCHAR(200) DEFAULT '' NOT NULL,
content MEDIUMTEXT NOT NULL,
html VARCHAR(4) DEFAULT '' NOT NULL,
tag VARCHAR(200) DEFAULT '' NOT NULL,
hit INT DEFAULT '0' NOT NULL,
down INT DEFAULT '0' NOT NULL,
comment INT DEFAULT '0' NOT NULL,
oneline INT DEFAULT '0' NOT NULL,
likes INT DEFAULT '0' NOT NULL,
dislikes INT DEFAULT '0' NOT NULL,
report INT DEFAULT '0' NOT NULL,
point1 INT DEFAULT '0' NOT NULL,
point2 INT DEFAULT '0' NOT NULL,
point3 INT DEFAULT '0' NOT NULL,
point4 INT DEFAULT '0' NOT NULL,
d_regis VARCHAR(14) DEFAULT '' NOT NULL,
d_modify VARCHAR(14) DEFAULT '' NOT NULL,
d_comment VARCHAR(14) DEFAULT '' NOT NULL,
d_select VARCHAR(14) DEFAULT '' NOT NULL,
upload TEXT NOT NULL,
ip VARCHAR(25) DEFAULT '' NOT NULL,
agent VARCHAR(150) DEFAULT '' NOT NULL,
sns VARCHAR(100) DEFAULT '' NOT NULL,
featured_img INT DEFAULT '0' NOT NULL,
location VARCHAR(200) DEFAULT '' NOT NULL,
pin VARCHAR(50) DEFAULT '' NOT NULL,
adddata TEXT NOT NULL,
KEY site(site),
KEY gid(gid),
KEY bbs(bbs),
KEY bbsid(bbsid),
KEY parentmbr(parentmbr),
KEY display(display),
KEY notice(notice),
KEY mbruid(mbruid),
KEY category(category),
KEY subject(subject),
KEY tag(tag),
KEY d_regis(d_regis)) ENGINE=".$DB['type']." CHARSET=UTF8MB4");
db_query($_tmp, $DB_CONNECT);
db_query("OPTIMIZE TABLE ".$table[$module.'data'],$DB_CONNECT);
}
//게시판월별수량
$_tmp = db_query( "select count(*) from ".$table[$module.'month'], $DB_CONNECT );
if ( !$_tmp ) {
$_tmp = ("
CREATE TABLE ".$table[$module.'month']." (
date CHAR(6) DEFAULT '' NOT NULL,
site INT DEFAULT '0' NOT NULL,
bbs INT DEFAULT '0' NOT NULL,
num INT DEFAULT '0' NOT NULL,
KEY date(date),
KEY site(site),
KEY bbs(bbs)) ENGINE=".$DB['type']." CHARSET=UTF8MB4");
db_query($_tmp, $DB_CONNECT);
db_query("OPTIMIZE TABLE ".$table[$module.'month'],$DB_CONNECT);
}
//게시판일별수량
$_tmp = db_query( "select count(*) from ".$table[$module.'day'], $DB_CONNECT );
if ( !$_tmp ) {
$_tmp = ("
CREATE TABLE ".$table[$module.'day']." (
date CHAR(8) DEFAULT '' NOT NULL,
site INT DEFAULT '0' NOT NULL,
bbs INT DEFAULT '0' NOT NULL,
num INT DEFAULT '0' NOT NULL,
KEY date(date),
KEY site(site),
KEY bbs(bbs)) ENGINE=".$DB['type']." CHARSET=UTF8MB4");
db_query($_tmp, $DB_CONNECT);
db_query("OPTIMIZE TABLE ".$table[$module.'day'],$DB_CONNECT);
}
//확장데이터
$_tmp = db_query( "select count(*) from ".$table[$module.'xtra'], $DB_CONNECT );
if ( !$_tmp ) {
$_tmp = ("
CREATE TABLE ".$table[$module.'xtra']." (
parent INT DEFAULT '0' NOT NULL,
site INT DEFAULT '0' NOT NULL,
bbs INT DEFAULT '0' NOT NULL,
down TEXT NOT NULL,
likes TEXT NOT NULL,
dislikes TEXT NOT NULL,
report TEXT NOT NULL,
KEY parent(parent),
KEY site(site),
KEY bbs(bbs)) ENGINE=".$DB['type']." CHARSET=UTF8MB4");
db_query($_tmp, $DB_CONNECT);
db_query("OPTIMIZE TABLE ".$table[$module.'xtra'],$DB_CONNECT);
}
?>

View File

@@ -0,0 +1,8 @@
<?php
$table[$module.'list'] = $DB['head'].'_'.$module.'_list'; //게시판리스트
$table[$module.'idx'] = $DB['head'].'_'.$module.'_index'; //게시판인덱스
$table[$module.'data'] = $DB['head'].'_'.$module.'_data'; //게시판데이터
$table[$module.'month']= $DB['head'].'_'.$module.'_month'; //월별수량
$table[$module.'day'] = $DB['head'].'_'.$module.'_day'; //일별수량
$table[$module.'xtra'] = $DB['head'].'_'.$module.'_xtra'; //확장데이터
?>

View File

@@ -0,0 +1,45 @@
<?php
$g['url_host'] = 'http'.($_SERVER['HTTPS']=='on'?'s':'').'://'.$_SERVER['HTTP_HOST'];
$g['path_root']='../../../../';
$g['path_var']=$g['path_root'].'_var/';
$date['today'] = substr(date('YmdHisw'),0,8);
if ($_FILES['file']['name']) {
if (!$_FILES['file']['error']) {
$name = md5(rand(100, 200));
$ext = explode('.', $_FILES['file']['name']);
$filename = $name . '.' . $ext[1];
$upfolder = substr($date['today'],0,8); // 년월일을 업로드 폴더 구분기준으로 설정
$saveDir = '../upload/'; // bbs 게시판 안에 별도의 files 폴더를 둔다. 나중에 포럼모듈이 나오면 충돌을 피하기 위해
$savePath1 = $saveDir.substr($upfolder,0,4);// 년도 폴더 지정 (없으면 아래 for 문으로 만든다)
$savePath2 = $savePath1.'/'.substr($upfolder,4,2); // 월 폴더 지정 (없으면 아래 for 문으로 만든다)
$savePath3 = $savePath2.'/'.substr($upfolder,6,2); // 일 폴더 지정(없으면 아래 for 문으로 만든다)
// 위 폴더가 없으면 새로 만들기
for ($i = 1; $i < 4; $i++)
{
if (!is_dir(${'savePath'.$i}))
{
mkdir(${'savePath'.$i},0707);
@chmod(${'savePath'.$i},0707);
}
}
$sourcePath='./modules/bbs'.str_replace('..','',$savePath3); // 소스에 보여주는 패스트 -- 상대경로를 제거한다.
$destination = $savePath3.'/'.$filename; // 생성된 폴더/파일 --> 파일의 실제 위치
$location = $_FILES["file"]["tmp_name"]; // 서버에 올려진 임시파일
move_uploaded_file($location, $destination);
@chmod($destination,0707); // 권한 신규 부여
echo $sourcePath.'/'.$filename;// 최종적으로 에디터에 넘어가는 값
}
else
{
echo $message = 'Ooops! Your upload triggered the following error: '.$_FILES['file']['error'];
}
}// 파일이 넘어왔는지 체크
?>

View File

@@ -0,0 +1,15 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$R = getDbData($table[$m.'list'],"id='".$bid."'",'*');
if ($R['img'.$dtype])
{
getDbUpdate($table[$m.'list'],"img".$dtype."=''",'uid='.$R['uid']);
unlink($g['dir_module'].'var/files/'.$R['img'.$dtype]);
}
setrawcookie('result_bbs_main', rawurlencode('파일이 삭제 되었습니다.|success')); // 처리여부 cookie 저장
getLink('reload','parent.','','');
?>

View File

@@ -0,0 +1,10 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$i=0;
foreach($bbsmembers as $val) getDbUpdate($table[$m.'list'],'gid='.($i++),'uid='.$val);
getLink('','','','');
?>

View File

@@ -0,0 +1,48 @@
<?php
if(!defined('__KIMS__')) exit;
require_once $g['path_core'].'function/sys.class.php';
include_once $g['dir_module'].'lib/action.func.php';
include_once $g['path_module'].'bbs/var/var.php';
include_once $g['path_var'].'bbs/var.'.$bid.'.php';
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
$theme = $d['bbs']['m_skin']?$d['bbs']['m_skin']:$d['bbs']['skin_mobile'];
} else {
$theme = $d['bbs']['skin']?$d['bbs']['skin']:$d['bbs']['skin_main'];
}
include_once $g['dir_module'].'themes/'.$theme.'/_var.php';
$result=array();
$result['error']=false;
$result['isperm'] = true;
//게시물 쓰기 권한체크
if (!$my['admin'] && !strstr(','.($d['bbs']['admin']?$d['bbs']['admin']:'.').',',','.$my['id'].',')) {
if ($d['bbs']['perm_l_write'] > $my['level'] || strpos('_'.$d['bbs']['perm_g_write'],'['.$my['mygroup'].']')) {
$markup_file = 'permcheck'; //잠김페이지 전달 (테마 내부 _html/permcheck.html)
$result['isperm'] = false;
$skin=new skin($markup_file);
$result['main']=$skin->make();
}
if ($R['uid'] && $reply != 'Y') {
if ($my['uid'] != $R['mbruid']) {
if (!strpos('_'.$_SESSION['module_'.$m.'_pwcheck'],'['.$R['uid'].']')) {
$markup_file = 'pwcheck'; //인증페이지 전달 (테마 내부 _html/pwcheck.html)
$result['isperm'] = false;
$skin=new skin($markup_file);
$result['main']=$skin->make();
}
}
}
}
if ($result['isperm']==true) {
$_SESSION['wcode'] = $date['totime'];
$result['pcode']=$date['totime'];
}
echo json_encode($result);
exit;
?>

View File

@@ -0,0 +1,25 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$badword = trim($badword);
$badword = str_replace("\r\n","",$badword);
$badword = str_replace("\n","",$badword);
$fdset = array('skin_main','skin_mobile','skin_total','editor_main','editor_mobile','attach_main','attach_mobile','comment_main','comment_mobile','rss','restr','denylikemy','replydel','commentdel','badword','badword_action','badword_escape','singo_del','singo_del_num','singo_del_act','recnum','sbjcut','newtime');
$gfile= $g['path_var'].'site/'.$r.'/'.$m.'.var.php';
$fp = fopen($gfile,'w');
fwrite($fp, "<?php\n");
foreach ($fdset as $val)
{
fwrite($fp, "\$d['bbs']['".$val."'] = \"".trim(${$val})."\";\n");
}
fwrite($fp, "?>");
fclose($fp);
@chmod($gfile,0707);
setrawcookie('bbs_config_result', rawurlencode('<i class="fa fa-check" aria-hidden="true"></i> 설정이 변경 되었습니다.|success')); // 처리여부 cookie 저장
getLink('reload','parent.','','');
?>

View File

@@ -0,0 +1,210 @@
<?php
if(!defined('__KIMS__')) exit;
$R = getUidData($table[$m.'data'],$uid);
if (!$R['uid']) getLink('','','삭제되었거나 존재하지 않는 게시물입니다.','');
$B = getUidData($table[$m.'list'],$R['bbs']);
if (!$B['uid']) getLink('','','존재하지 않는 게시판입니다.','');
include_once $g['dir_module'].'var/var.php';
include_once $g['path_var'].'bbs/var.'.$B['id'].'.php';
$g['mediasetVarForSite'] = $g['path_var'].'site/'.$r.'/mediaset.var.php';
include_once file_exists($g['mediasetVarForSite']) ? $g['mediasetVarForSite'] : $g['path_module'].'mediaset/var/var.php';
include_once $g['path_core'].'opensrc/aws-sdk-php/v3/aws-autoloader.php';
use Aws\S3\S3Client;
define('S3_KEY', $d['mediaset']['S3_KEY']); //발급받은 키.
define('S3_SEC', $d['mediaset']['S3_SEC'] ); //발급받은 비밀번호.
define('S3_REGION', $d['mediaset']['S3_REGION']); //S3 버킷의 리전.
define('S3_BUCKET', $d['mediaset']['S3_BUCKET']); //버킷의 이름.
$s3 = new S3Client([
'version' => 'latest',
'region' => S3_REGION,
'credentials' => [
'key' => S3_KEY,
'secret' => S3_SEC,
],
]);
$backUrl = getLinkFilter($g['s'].'/?'.($_HS['usescode']?'r='.$r.'&amp;':'').($c?'c='.$c:'m='.$m),array('bid','skin','iframe','cat','p','sort','orderby','recnum','type','where','keyword'));
if ($my['uid'] != $R['mbruid'] && !$my['admin'] && !strstr(','.($d['bbs']['admin']?$d['bbs']['admin']:'.').',',','.$my['id'].','))
{
if (!strstr($_SESSION['module_'.$m.'_pwcheck'],$R['uid']))
{
if ($pw)
{
if (md5($pw) != $R['pw']) getLink('reload','parent.','비밀번호가 일치하지 않습니다.','');
}
else {
getLink($backUrl.'&mod=delete&uid='.$R['uid'],'parent.','','');
}
}
}
if ($d['bbs']['commentdel'])
{
if($R['comment'])
{
getLink('','','댓글이 있는 게시물은 삭제할 수 없습니다.','');
}
}
if ($d['bbs']['replydel'])
{
$_ngid = (int)$R['gid'];
if(getDbRows($table[$m.'data'],'gid > '.$_ngid.' and gid < '.($_ngid+1)) && !$R['depth'])
{
getLink('','','답변글이 있는 게시물은 삭제할 수 없습니다.','');
}
}
//댓글삭제
if ($R['comment'])
{
$CCD = getDbArray($table['s_comment'],"parent='".$m.$R['uid']."'",'*','uid','asc',0,0);
while($_C=db_fetch_array($CCD))
{
if ($_C['upload'])
{
$UPFILES = getArrayString($_C['upload']);
foreach($UPFILES['data'] as $_val)
{
$U = getUidData($table['s_upload'],$_val);
if ($U['uid'])
{
getDbUpdate($table['s_numinfo'],'upload=upload-1',"date='".substr($U['d_regis'],0,8)."' and site=".$U['site']);
getDbDelete($table['s_upload'],'uid='.$U['uid']);
if ($U['fserver']==2) {
$host_array = explode('//', $U['host']);
$_host_array = explode('.', $host_array[1]);
$S3_BUCKET = $_host_array[0];
$s3->deleteObject([
'Bucket' => $S3_BUCKET,
'Key' => $U['folder'].'/'.$U['tmpname']
]);
} else {
unlink($U['folder'].'/'.$U['tmpname']);
}
}
}
}
if ($_C['oneline'])
{
$_ONELINE = getDbSelect($table['s_oneline'],'parent='.$_C['uid'],'*');
while($_O=db_fetch_array($_ONELINE))
{
getDbUpdate($table['s_numinfo'],'oneline=oneline-1',"date='".substr($_O['d_regis'],0,8)."' and site=".$_O['site']);
if ($_O['point']&&$_O['mbruid'])
{
getDbInsert($table['s_point'],'my_mbruid,by_mbruid,price,content,d_regis',"'".$_O['mbruid']."','0','-".$_O['point']."','한줄의견삭제(".getStrCut(str_replace('&amp;',' ',strip_tags($_O['content'])),15,'').")환원','".$date['totime']."'");
getDbUpdate($table['s_mbrdata'],'point=point-'.$_O['point'],'memberuid='.$_O['mbruid']);
}
}
getDbDelete($table['s_oneline'],'parent='.$_C['uid']);
}
getDbDelete($table['s_comment'],'uid='.$_C['uid']);
getDbUpdate($table['s_numinfo'],'comment=comment-1',"date='".substr($_C['d_regis'],0,8)."' and site=".$_C['site']);
if ($_C['point']&&$_C['mbruid'])
{
getDbInsert($table['s_point'],'my_mbruid,by_mbruid,price,content,d_regis',"'".$_C['mbruid']."','0','-".$_C['point']."','댓글삭제(".getStrCut($_C['subject'],15,'').")환원','".$date['totime']."'");
getDbUpdate($table['s_mbrdata'],'point=point-'.$_C['point'],'memberuid='.$_C['mbruid']);
}
}
}
//첨부파일삭제
if ($R['upload'])
{
$UPFILES = getArrayString($R['upload']);
foreach($UPFILES['data'] as $_val)
{
$U = getUidData($table['s_upload'],$_val);
if ($U['uid'])
{
getDbUpdate($table['s_numinfo'],'upload=upload-1',"date='".substr($U['d_regis'],0,8)."' and site=".$U['site']);
getDbDelete($table['s_upload'],'uid='.$U['uid']);
if ($U['fserver']==2) {
$host_array = explode('//', $U['host']);
$_host_array = explode('.', $host_array[1]);
$S3_BUCKET = $_host_array[0];
$s3->deleteObject([
'Bucket' => $S3_BUCKET,
'Key' => $U['folder'].'/'.$U['tmpname']
]);
} else {
unlink($U['folder'].'/'.$U['tmpname']);
}
}
}
}
//태그삭제
if ($R['tag'])
{
$_tagarr1 = explode(',',$R['tag']);
foreach($_tagarr1 as $_t)
{
if(!$_t) continue;
$_TAG = getDbData($table['s_tag'],"site=".$R['site']." and keyword='".$_t."'",'*');
if($_TAG['uid'])
{
if($_TAG['hit']>1) getDbUpdate($table['s_tag'],'hit=hit-1','uid='.$_TAG['uid']);
else getDbDelete($table['s_tag'],'uid='.$_TAG['uid']);
}
}
}
getDbUpdate($table[$m.'month'],'num=num-1',"date='".substr($R['d_regis'],0,6)."' and site=".$R['site'].' and bbs='.$R['bbs']);
getDbUpdate($table[$m.'day'],'num=num-1',"date='".substr($R['d_regis'],0,8)."' and site=".$R['site'].' and bbs='.$R['bbs']);
getDbDelete($table[$m.'idx'],'gid='.$R['gid']);
getDbDelete($table[$m.'data'],'uid='.$R['uid']);
getDbDelete($table[$m.'xtra'],'parent='.$R['uid']);
getDbUpdate($table[$m.'list'],'num_r=num_r-1','uid='.$R['bbs']);
if ($cuid) getDbUpdate($table['s_menu'],"num='".getDbCnt($table[$m.'month'],'sum(num)','site='.$s.' and bbs='.$R['bbs'])."'",'uid='.$cuid);
getDbDelete($table['s_trackback'],"parent='".$R['bbsid'].$R['uid']."'");
if ($R['point1']&&$R['mbruid'])
{
getDbInsert($table['s_point'],'my_mbruid,by_mbruid,price,content,d_regis',"'".$R['mbruid']."','0','-".$R['point1']."','게시물삭제(".getStrCut($R['subject'],15,'').")환원','".$date['totime']."'");
getDbUpdate($table['s_mbrdata'],'point=point-'.$R['point1'],'memberuid='.$R['mbruid']);
}
if ($send=="ajax") {
$bbsque = 'site='.$s.' and notice=0';
$bbsque .= ' and bbs='.$B['uid'];
$NUM = getDbRows($table[$m.'data'],$bbsque);
$result=array();
$result['error']=false;
$result['num']=$NUM;
echo json_encode($result);
exit;
} else {
if ($g['mobile'] && $_SESSION['pcmode']!='Y') {
$msg_type = 'default';
} else {
$msg_type = 'success';
}
setrawcookie('bbs_action_result', rawurlencode('게시물이 삭제 되었습니다.|'.$msg_type)); // 처리여부 cookie 저장
getLink($backUrl ,'parent.' , $alert , $history);
}
?>

View File

@@ -0,0 +1,176 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$R = getUidData($table[$m.'list'],$uid);
if (!$R['uid']) getLink('','','존재하지 않는 게시판입니다.','');
include_once $g['path_module'].'mediaset/var/var.php';
include_once $g['path_var'].'bbs/var.'.$R['id'].'.php';
$g['mediasetVarForSite'] = $g['path_var'].'site/'.$r.'/mediaset.var.php';
include_once file_exists($g['mediasetVarForSite']) ? $g['mediasetVarForSite'] : $g['path_module'].'mediaset/var/var.php';
include_once $g['path_core'].'opensrc/aws-sdk-php/v3/aws-autoloader.php';
use Aws\S3\S3Client;
define('S3_KEY', $d['mediaset']['S3_KEY']); //발급받은 키.
define('S3_SEC', $d['mediaset']['S3_SEC'] ); //발급받은 비밀번호.
define('S3_REGION', $d['mediaset']['S3_REGION']); //S3 버킷의 리전.
define('S3_BUCKET', $d['mediaset']['S3_BUCKET']); //버킷의 이름.
$s3 = new S3Client([
'version' => 'latest',
'region' => S3_REGION,
'credentials' => [
'key' => S3_KEY,
'secret' => S3_SEC,
],
]);
$RCD = getDbArray($table[$m.'data'],'bbs='.$R['uid'],'*','gid','asc',0,0);
while($_R=db_fetch_array($RCD))
{
//댓글삭제
if ($_R['comment'])
{
$CCD = getDbArray($table['s_comment'],"parent='".$m.$_R['uid']."'",'*','uid','asc',0,0);
while($_C=db_fetch_array($CCD))
{
if ($_C['upload'])
{
$UPFILES = getArrayString($_C['upload']);
foreach($UPFILES as $_val)
{
$U = getUidData($table['s_upload'],$_val);
if ($U['uid'])
{
getDbUpdate($table['s_numinfo'],'upload=upload-1',"date='".substr($U['d_regis'],0,8)."' and site=".$U['site']);
getDbDelete($table['s_upload'],'uid='.$U['uid']);
if ($U['fserver']==2) {
$s3->deleteObject([
'Bucket' => S3_BUCKET,
'Key' => $U['folder'].'/'.$U['tmpname']
]);
} else {
unlink($g['path_file'].$U['folder'].'/'.$U['tmpname']);
if($U['type']==2) unlink($g['path_file'].$U['folder'].'/'.$U['thumbname']);
}
}
}
}
if ($_C['oneline'])
{
$_ONELINE = getDbSelect($table['s_oneline'],'parent='.$_C['uid'],'*');
while($_O=db_fetch_array($_ONELINE))
{
getDbUpdate($table['s_numinfo'],'oneline=oneline-1',"date='".substr($_O['d_regis'],0,8)."' and site=".$_O['site']);
if ($_O['point']&&$_O['mbruid'])
{
getDbInsert($table['s_point'],'my_mbruid,by_mbruid,price,content,d_regis',"'".$_O['mbruid']."','0','-".$_O['point']."','한줄의견삭제(".getStrCut(str_replace('&amp;',' ',strip_tags($_O['content'])),15,'').")환원','".$date['totime']."'");
getDbUpdate($table['s_mbrdata'],'point=point-'.$_O['point'],'memberuid='.$_O['mbruid']);
}
}
getDbDelete($table['s_oneline'],'parent='.$_C['uid']);
}
getDbDelete($table['s_comment'],'uid='.$_C['uid']);
getDbUpdate($table['s_numinfo'],'comment=comment-1',"date='".substr($_C['d_regis'],0,8)."' and site=".$_C['site']);
if ($_C['point']&&$_C['mbruid'])
{
getDbInsert($table['s_point'],'my_mbruid,by_mbruid,price,content,d_regis',"'".$_C['mbruid']."','0','-".$_C['point']."','댓글삭제(".getStrCut($_C['subject'],15,'').")환원','".$date['totime']."'");
getDbUpdate($table['s_mbrdata'],'point=point-'.$_C['point'],'memberuid='.$_C['mbruid']);
}
}
}
//첨부파일삭제
if ($_R['upload'])
{
$UPFILES = getArrayString($_R['upload']);
foreach($UPFILES['data'] as $_val)
{
$U = getUidData($table['s_upload'],$_val);
if ($U['uid'])
{
getDbUpdate($table['s_numinfo'],'upload=upload-1',"date='".substr($U['d_regis'],0,8)."' and site=".$U['site']);
getDbDelete($table['s_upload'],'uid='.$U['uid']);
if ($U['fserver']==2) {
$s3->deleteObject([
'Bucket' => S3_BUCKET,
'Key' => $U['folder'].'/'.$U['tmpname']
]);
} else {
unlink($U['folder'].'/'.$U['tmpname']);
}
}
}
}
//태그삭제
if ($_R['tag'])
{
$_tagdate = substr($_R['d_regis'],0,8);
$_tagarr1 = explode(',',$_R['tag']);
foreach($_tagarr1 as $_t)
{
if(!$_t) continue;
$_TAG = getDbData($table['s_tag'],"site=".$_R['site']." and date='".$_tagdate."' and keyword='".$_t."'",'*');
if($_TAG['uid'])
{
if($_TAG['hit']>1) getDbUpdate($table['s_tag'],'hit=hit-1','uid='.$_TAG['uid']);
else getDbDelete($table['s_tag'],'uid='.$_TAG['uid']);
}
}
}
getDbUpdate($table[$m.'month'],'num=num-1',"date='".substr($_R['d_regis'],0,6)."' and site=".$_R['site'].' and bbs='.$_R['bbs']);
getDbUpdate($table[$m.'day'],'num=num-1',"date='".substr($_R['d_regis'],0,8)."' and site=".$_R['site'].' and bbs='.$_R['bbs']);
getDbDelete($table['s_trackback'],"parent='".$_R['bbsid'].$_R['uid']."'");
if ($_R['point1']&&$_R['mbruid'])
{
getDbInsert($table['s_point'],'my_mbruid,by_mbruid,price,content,d_regis',"'".$_R['mbruid']."','0','-".$_R['point1']."','게시물삭제(".getStrCut($_R['subject'],15,'').")환원','".$date['totime']."'");
getDbUpdate($table['s_mbrdata'],'point=point-'.$_R['point1'],'memberuid='.$_R['mbruid']);
}
}
getDbDelete($table[$m.'idx'],'bbs='.$R['uid']);
getDbDelete($table[$m.'data'],'bbs='.$R['uid']);
getDbDelete($table[$m.'list'],'uid='.$R['uid']);
getDbDelete($table[$m.'xtra'],'bbs='.$R['uid']);
getDbDelete($table['s_seo'],'rel=3 and parent='.$R['uid']);
unlink($g['path_var'].'bbs/var.'.$R['id'].'.php');
if ($R['imghead'] && is_file($g['dir_module'].'var/files/'.$R['imghead']))
{
unlink($g['dir_module'].'var/files/'.$R['imghead']);
}
if ($R['imgfoot'] && is_file($g['dir_module'].'var/files/'.$R['imgfoot']))
{
unlink($g['dir_module'].'var/files/'.$R['imgfoot']);
}
$mfile = $g['dir_module'].'var/code/'.$R['id'];
if (is_file($mfile.'.header.php'))
{
unlink($mfile.'.header.php');
}
if (is_file($mfile.'.footer.php'))
{
unlink($mfile.'.footer.php');
}
setrawcookie('result_bbs_main', rawurlencode($R['name'].' 게시판이 삭제되었습니다.|success')); // 처리여부 cookie 저장
getLink($g['s'].'/?r='.$r.'&m=admin&module='.$m.'&front=main','parent.','','');
?>

View File

@@ -0,0 +1,98 @@
<?php
if(!defined('__KIMS__')) exit;
include_once $g['dir_module'].'var/var.php';
$R=getUidData($table['s_upload'],$uid);
if (!$R['uid']) getLink('','','정상적인 요청이 아닙니다.','');
$filename = getUTFtoKR($R['name']);
$filetmpname = getUTFtoKR($R['tmpname']);
if ($R['url']==$d['upload']['ftp_urlpath'])
{
$filepath = $d['upload']['ftp_urlpath'].$R['folder'].'/'.$filetmpname;
$filesize = $R['size'];
}
else {
$filepath = '.'.$R['url'].$R['folder'].'/'.$filetmpname;
$filesize = filesize($filepath);
}
if (!strstr($_SERVER['HTTP_REFERER'],'module=upload'))
{
//동기화
$cyncArr = getArrayString($R['cync']);
$fdexp = explode(',',$cyncArr['data'][2]);
if($fdexp[0]&&$fdexp[1]&&$cyncArr['data'][3])
{
if ($cyncArr['data'][0] == 'bbs' && $cyncArr['data'][1])
{
$AT = getUidData($table[$cyncArr['data'][0].'data'],$cyncArr['data'][1]);
include_once $g['path_var'].$cyncArr['data'][0].'/var.'.$AT['bbsid'].'.php';
$B['var'] = $d['bbs'];
if (!$my['admin'] && $my['uid'] != $AT['mbruid'])
{
if ($B['var']['perm_l_down'] > $my['level'] || strstr($B['var']['perm_g_down'],'['.$my['mygroup'].']'))
{
getLink('','','다운로드 권한이 없습니다.','-1');
}
}
if ($B['var']['point3'])
{
if (!$my['uid']) getLink('','','다운로드 권한이 없습니다.','-1');
$UT = getDbData($table[$cyncArr['data'][0].'xtra'],'parent='.$AT['uid'],'*');
if (!strpos('_'.$UT['down'],'['.$my['uid'].']') && !strpos('_'.$_SESSION['module_'.$cyncArr['data'][0].'_dncheck'],'['.$AT['uid'].']'))
{
if ($confirm == 'Y' && $my['point'] >= $B['var']['point3'])
{
if (!$my['admin'] && $my['uid'] != $AT['mbruid'])
{
getDbInsert($table['s_point'],'my_mbruid,by_mbruid,price,content,d_regis',"'".$my['uid']."','0','-".$B['var']['point3']."','다운로드(".getStrCut($AT['subject'],15,'').")','".$date['totime']."'");
getDbUpdate($table['s_mbrdata'],'point=point-'.$B['var']['point3'].',usepoint=usepoint+'.$B['var']['point3'],'memberuid='.$my['uid']);
if (!$UT['parent'])
{
getDbInsert($table[$cyncArr['data'][0].'xtra'],'parent,site,bbs,down',"'".$AT['uid']."','".$s."','".$AT['bbs']."','[".$my['uid']."]'");
}
else {
getDbUpdate($table[$cyncArr['data'][0].'xtra'],"down='".$UT['down']."[".$my['uid']."]'",'parent='.$AT['uid']);
}
}
$_SESSION['module_'.$cyncArr['data'][0].'_dncheck'] = $_SESSION['module_'.$cyncArr['data'][0].'_dncheck'].'['.$AT['uid'].']';
getLink('','','결제되었습니다. 다운로드 받으세요.','close');
}
else {
getWindow($g['s'].'/?iframe=Y&r='.$r.'&m='.$cyncArr['data'][0].'&bid='.$AT['bbsid'].'&mod=down&dfile='.$uid.'&uid='.$AT['uid'],'','width=550px,height=350px,status=yes,toolbar=no,scrollbars=no',$_SERVER['HTTP_REFERER'].'#attach','');
exit;
}
}
}
}
$cyncQue = $fdexp[1].'='.$fdexp[1].'+1';
getDbUpdate($cyncArr['data'][3],$cyncQue,$fdexp[0].'='.$cyncArr['data'][1]);
}
getDbUpdate($table['s_upload'],'down=down+1','uid='.$R['uid']);
getDbUpdate($table['s_numinfo'],'download=download+1',"date='".$date['today']."' and site=".$s);
}
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");
if ($R['url']==$d['upload']['ftp_urlpath'])
{
$FTP_CONNECT = ftp_connect($d['upload']['ftp_host'],$d['upload']['ftp_port']);
$FTP_CRESULT = ftp_login($FTP_CONNECT,$d['upload']['ftp_user'],$d['upload']['ftp_pass']);
if (!$FTP_CONNECT) getLink('','','FTP서버 연결에 문제가 발생했습니다.','');
if (!$FTP_CRESULT) getLink('','','FTP서버 아이디나 패스워드가 일치하지 않습니다.','');
if($d['upload']['ftp_pasv']) ftp_pasv($FTP_CONNECT, true);
$filepath = $g['path_tmp'].'session/'.$filetmpname;
ftp_get($FTP_CONNECT,$filepath,$d['upload']['ftp_folder'].$R['folder'].'/'.$filetmpname,FTP_BINARY);
ftp_close($FTP_CONNECT);
$fp = fopen($filepath, 'rb');
if (!fpassthru($fp)) fclose($fp);
unlink($filepath);
}
else {
$fp = fopen($filepath, 'rb');
if (!fpassthru($fp)) fclose($fp);
}
exit;
?>

View File

@@ -0,0 +1,9 @@
<?php
if(!defined('__KIMS__')) exit;
if(!strpos('_score1,score2',$f)) exit;
$R = getUidData($table[$m.'data'],$uid);
if (!$R['uid']) exit;
getDbUpdate($table[$m.'data'],$f.'='.$f.'+1','uid='.$R['uid']);
exit;
?>

View File

@@ -0,0 +1,94 @@
<?php
if(!defined('__KIMS__')) exit;
require_once $g['path_core'].'function/sys.class.php';
include_once $g['dir_module'].'lib/action.func.php';
include_once $g['dir_module'].'var/var.php';
$result=array();
$result['error']=false;
$B = getDbData($table[$m.'list'],"id='".$bid."' and site=".$s,'*');
if (!$B['uid']) {
$result['error']='존재하지 않는 게시판 입니다.';
echo json_encode($result);
exit;
}
$sort='uid';
$orderby='desc';
$recnum=0;
$p=0;
include_once $g['path_var'].'bbs/var.'.$bid.'.php';
include_once $g['dir_module'].'mod/_list.php';
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
$theme = $d['bbs']['m_skin']?$d['bbs']['m_skin']:$d['bbs']['skin_mobile'];
} else {
$theme = $d['bbs']['skin']?$d['bbs']['skin']:$d['bbs']['skin_main'];
}
include_once $g['dir_module'].'themes/'.$theme.'/_var.php';
$mbruid = $my['uid'];
$html='';
foreach ($NCD as $R) {
$TMPL['title']=$B['name'];
$TMPL['subject']=htmlspecialchars($R['subject']);
$TMPL['uid']=$R['uid'];
$TMPL['name']=$R['name'];
$TMPL['d_regis']=getDateFormat($R['d_regis'],'Y-m-d');
if ($collapse) $TMPL['article'] = getContents($R['content'],$R['html']);
$skin_item=new skin('list-item-notice');
$html.=$skin_item->make();
}
foreach ($RCD as $R) {
$TMPL['title']=$B['name'];
$TMPL['subject']=htmlspecialchars($R['subject']);
$TMPL['uid']=$R['uid'];
$TMPL['name']=$R['name'];
$TMPL['d_regis']=getDateFormat($R['d_regis'],'Y-m-d');
if ($collapse) $TMPL['article'] = getContents($R['content'],$R['html']);
$skin_item=new skin('list-item');
$html.=$skin_item->make();
}
$TMPL['items']=$html;
if($my['admin'] || $my['uid']==$R['mbruid']) { // 수정,삭제 버튼 출력여부를 위한 참조
$result['bbsadmin'] = 1;
}
if ($NUM) $markup_file = 'list'; // 기본 마크업 페이지 전달 (테마 내부 _html/view.html)
else $markup_file = 'none';
if ($B['category']) {
$_catexp = explode(',',$B['category']);
$_catnum=count($_catexp);
$category='<option value="" data-bid="'.$bid.'" data-collapse="'.$collapse.'">'.$_catexp[0].'</option>';
for ($i = 1; $i < $_catnum; $i++) {
if(!$_catexp[$i])continue;
$category.= '<option value="'.$_catexp[$i].'"';
$category.= 'data-bid="'.$bid.'"';
$category.= ' data-collapse="'.$collapse.'"';
$category.= 'data-markup="'.$markup_file.'"';
if ($_catexp[$i]==$cat) $category.= ' selected';
$category.= '>';
$category.= $_catexp[$i];
$category.= '</option>';
}
$result['category']=$category;
}
// 최종 결과값 추출 (sys.class.php)
$skin=new skin($markup_file);
$result['list']=$skin->make();
echo json_encode($result);
exit;
?>

View File

@@ -0,0 +1,52 @@
<?php
if(!defined('__KIMS__')) exit;
$result=array();
$result['error']=false;
$bid = $_POST['bid'];
if (!$bid ) exit;
//게시판 공통설정 변수
$g['bbsVarForSite'] = $g['path_var'].'site/'.$r.'/bbs.var.php';
include_once file_exists($g['bbsVarForSite']) ? $g['bbsVarForSite'] : $g['path_module'].'bbs/var/var.php';
include_once $g['path_core'].'function/sys.class.php';
include_once $g['path_var'].'bbs/var.'.$bid.'.php';
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
$theme = $d['bbs']['m_skin']?$d['bbs']['m_skin']:$d['bbs']['skin_mobile'];
} else {
$theme = $d['bbs']['skin']?$d['bbs']['skin']:$d['bbs']['skin_main'];
}
$B = getDbData($table['bbslist'],'id="'.$bid.'"','*');
$_catexp = explode(',',$B['category']);
$_catnum=count($_catexp);
$markup_file = ($mod=='write')?'category-list-radio':'category-list-item';
$TMPL['label']=$_catexp[0];
$TMPL['bname']=$B['name'];
$html = '';
for ($i = 1; $i < $_catnum; $i++) {
if(!$_catexp[$i])continue;
$TMPL['category']=$_catexp[$i];
$TMPL['num']=getDbRows($table[$m.'data'],'site='.$s.' and notice=0 and bbs='.$B['uid']." and category='".$_catexp[$i]."'");
$skin_item=new skin($markup_file);
$html.=$skin_item->make();
}
$TMPL['items'] = $html;
$skin=new skin('category-list');
$result['list']=$skin->make();
echo json_encode($result);
exit;
?>

View File

@@ -0,0 +1,28 @@
<?php
if(!defined('__KIMS__')) exit;
// 넘어온 값 : type & data
//data 배열화 : data=theme+'^^'+parent+'^^'+sort+'^^'+recnum+'^^'+page+'^^'+'+orderby+'^^'+last_cuid;
$data_arr=explode('^^',$data);
$theme=$data_arr[0];
$parent=$data_arr[1];
$c_sort=$data_arr[2];
$c_recnum=$data_arr[3];
$c_page=$data_arr[4];
$c_orderby=$data_arr[5];
$last_sort=$data_arr[6];
$_where=$c_sort."<>0";
if($type=='more')
{
if($c_orderby=='asc') $_where .=" and ".$c_sort.">".$last_sort;
else $_where .=" and ".$c_sort."<".$last_sort;
}
include $theme.'comment/function.php';
?>
[RESULT:
<?php getCommentList($theme,$m.$parent,$_where,$c_recnum,$c_sort,$orderby1,$c_orderby,$c_page);?>
:RESULT]
<?php
exit;
?>

View File

@@ -0,0 +1,66 @@
<?php
if(!defined('__KIMS__')) exit;
$result=array();
$result['error']=false;
$bid = $_POST['bid'];
$mod = $_POST['mod'];
$B = getDbData($table['bbslist'],'id="'.$bid.'"','*');
if (!$B['uid']) {
$result['error']='존재하지 않는 게시판 입니다.';
echo json_encode($result);
exit;
}
//게시판 공통설정 변수
$g['bbsVarForSite'] = $g['path_var'].'site/'.$r.'/bbs.var.php';
include_once file_exists($g['bbsVarForSite']) ? $g['bbsVarForSite'] : $g['path_module'].'bbs/var/var.php';
include_once $g['path_var'].'bbs/var.'.$bid.'.php';
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
$theme = $d['bbs']['m_skin']?$d['bbs']['m_skin']:$d['bbs']['skin_mobile'];
} else {
$theme = $d['bbs']['skin']?$d['bbs']['skin']:$d['bbs']['skin_main'];
}
include_once $g['dir_module'].'themes/'.$theme.'/_var.php';
include_once $g['path_core'].'function/sys.class.php';
$bbsque = 'site='.$s.' and notice=0';
$bbsque .= ' and bbs='.$B['uid'];
$recnum = $d['bbs']['recnum'];
$NUM = getDbRows($table[$m.'data'],$bbsque);
$TPG = getTotalPage($NUM,$recnum);
//게시물 쓰기 권한체크
$check_permWrite = true;
if (!$my['admin'] && !strstr(','.($d['bbs']['admin']?$d['bbs']['admin']:'.').',',','.$my['id'].',')) {
if ($d['bbs']['perm_l_write'] > $my['level'] || strpos('_'.$d['bbs']['perm_g_write'],'['.$my['mygroup'].']')) {
$check_permWrite = false;
}
}
$TMPL['show_bbs_category'] = $B['category']?'':'d-none';
$TMPL['show_bbs_search'] = $d['theme']['search']==1?'':'d-none';
$TMPL['show_bbs_write'] = $check_permWrite?'':'d-none';
$TMPL['bbs_name'] = $B['name'];
$TMPL['bbs_id'] = $bid;
$TMPL['bbs_write'] = '/b/'.$bid.'/write';
$skin=new skin('bar-tab'); //게시판 테마폴더 > _html > bar-tab.html
$result['bar_tab']=$skin->make();
$result['theme'] = $theme;
$result['sort'] = 'gid';
$result['orderby'] = 'asc';
$result['recnum'] = $recnum;
$result['NUM'] = $NUM;
$result['TPG'] = $TPG;
echo json_encode($result);
exit;
?>

View File

@@ -0,0 +1,91 @@
<?php
if(!defined('__KIMS__')) exit;
require_once $g['path_core'].'function/sys.class.php';
$bbs = $_GET['bbs']; // 게시퍈 UID
$sort = $_GET['sort']; // 정렬 기준
$orderby = $_GET['orderby']; // 정렬순서
$recnum = $_GET['recnum']; // 출력갯수
$page = $_GET['page']; // 처음엔 무조건 1
$bbs_view = $_GET['bbs_view'];
$where = 'site='.$s.' and bbs='.$bbs.' and notice=0'; // 출력 조건
$B = getUidData($table[$m.'list'],$bbs);
include_once $g['path_module'].'bbs/var/var.php';
include_once $g['path_var'].'bbs/var.'.$B['id'].'.php';
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
$theme = $d['bbs']['m_skin']?$d['bbs']['m_skin']:$d['bbs']['skin_mobile'];
} else {
$theme = $d['bbs']['skin']?$d['bbs']['skin']:$d['bbs']['skin_main'];
}
include_once $g['dir_module'].'themes/'.$theme.'/_var.php';
$result=array();
$result['error'] = false;
$RCD = getDbArray($table['bbsdata'],$where,'*',$sort,$orderby,$recnum,$page);
$html='';
$markup_file = 'moreList'; // 기본 마크업 페이지 전달 (테마 내부 _html/moreList.html)
$skin=new skin($markup_file);
while($R = db_fetch_array($RCD)){
$TMPL['category'] = $R['category'];
$TMPL['subject'] = $R['subject'];
$TMPL['bname'] = $B['name'];
$TMPL['bid'] = $B['id'];
$TMPL['uid'] = $R['uid'];
$TMPL['name'] = $R[$_HS['nametype']];
$TMPL['comment'] = $R['comment'];
$TMPL['oneline'] = $R['oneline']?'+'.$R['oneline']:'';
$TMPL['category'] = $R['category'];
$TMPL['hit'] = $R['hit'];
$TMPL['likes'] = $R['likes'];
$TMPL['d_regis'] = getDateFormat($R['d_regis'],'Y.m.d');
$TMPL['bbs_view_url'] = $bbs_view.$R['uid'];
$TMPL['datetime'] = getDateFormat($R['d_regis'],'c');
$TMPL['avatar'] = getAvatarSrc($R['mbruid'],'84');
$TMPL['featured_img'] = getPreviewResize(getUpImageSrc($R),'120x120');
$TMPL['check_secret'] = $R['hidden']?' secret':'';
$TMPL['check_hidden'] = $R['hidden']?'':' d-none';
$TMPL['check_new'] = getNew($R['d_regis'],24)?'':' d-none';
$TMPL['check_notice'] = $R['notice']?'':' d-none';
$TMPL['check_upload'] = $R['upload']?'':' d-none';
$TMPL['check_category'] = $R['category']?'':' d-none';
$TMPL['check_timeago'] = $d['theme']['timeago']?'data-plugin="timeago"':'';
$TMPL['check_depth'] = $R['depth']?' rb-reply rb-reply-0'.$R['depth']:'';
// 미디어 오브젝트 (아바타=1/대표이미지=2/감춤=0)
if ($d['theme']['media_object']=='1' && !$R['depth']) {
$TMPL['check_avatar'] = '';
$TMPL['check_preview'] = 'd-none';
$TMPL['check_replay'] = 'd-none';
} elseif ($d['theme']['media_object']=='2' && !$R['depth']) {
$TMPL['check_avatar'] = 'd-none';
$TMPL['check_replay'] = 'd-none';
if (getUpImageSrc($R)) $TMPL['check_preview'] = '';
else $TMPL['check_preview'] = 'd-none';
} else {
$TMPL['check_avatar'] = 'd-none';
$TMPL['check_preview'] = 'd-none';
$TMPL['check_replay'] = '';
}
$html.=$skin->make();
}
$result['content'] = $html;
echo json_encode($result);
exit;
?>

View File

@@ -0,0 +1,11 @@
<?php
if(!defined('__KIMS__')) exit;
include $theme.'comment/function.php';
?>
[RESULT:
<?php echo getOnelineList($theme,$parent)?>
:RESULT]
<?php
exit;
?>

View File

@@ -0,0 +1,50 @@
<?php
if(!defined('__KIMS__')) exit;
require_once $g['path_core'].'function/sys.class.php';
include_once $g['dir_module'].'lib/action.func.php';
include_once $g['dir_module'].'var/var.php';
$result=array();
$result['error']=false;
$R = getUidData($table['bbsdata'],$uid);
include_once $g['path_module'].'bbs/var/var.php';
include_once $g['path_var'].'bbs/var.'.$R['bbsid'].'.php';
$result['uid'] = $R['uid'];
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
$theme = $d['bbs']['m_skin']?$d['bbs']['m_skin']:$d['bbs']['skin_mobile'];
$device = 'mobile';
} else {
$theme = $d['bbs']['skin']?$d['bbs']['skin']:$d['bbs']['skin_main'];
$device = 'desktop';
}
$sort = 'uid';
$orderby = 'desc';
$recnum = 20;
$where = 'module="'.$m.'" and opinion="'.$opinion.'" and entry='.$uid; // 출력 조건
$RCD = getDbArray($table['s_opinion'],$where,'*',$sort,$orderby,$recnum,1);
$NUM = getDbRows($table['s_opinion'],$where);
$html='';
foreach ($RCD as $R) {
$M = getUidData($table['s_mbrid'],$R['mbruid']);
$M1 = getDbData($table['s_mbrdata'],'memberuid='.$R['mbruid'],'nic');
$TMPL['nic']=$M1['nic'];
$TMPL['id']=$M['id'];
$TMPL['mbruid']=$R['mbruid'];
$TMPL['avatar']=getAvatarSrc($R['mbruid'],'150');
$TMPL['d_regis']=getDateFormat($R['d_regis'],'Y-m-d H:i');
$skin_item=new skin('opinion-item');
$html.=$skin_item->make();
}
$result['num']=$NUM;
$result['list']=$html;
echo json_encode($result);
exit;
?>

View File

@@ -0,0 +1,187 @@
<?php
if(!defined('__KIMS__')) exit;
$result=array();
$result['error']=false;
$uid = $_POST['uid'];
$mod = $_POST['mod'];
$R = getUidData($table['bbsdata'],$uid);
$B = getUidData($table['bbslist'],$R['bbs']);
//게시판 공통설정 변수
$g['bbsVarForSite'] = $g['path_var'].'site/'.$r.'/bbs.var.php';
include_once file_exists($g['bbsVarForSite']) ? $g['bbsVarForSite'] : $g['path_module'].'bbs/var/var.php';
if ($bid) include_once $g['path_var'].'bbs/var.'.$bid.'.php';
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
$theme_attachFile= $d['bbs']['a_mskin']?$d['bbs']['a_mskin']:$d['bbs']['attach_mobile'];
} else {
$theme_attachFile= $d['bbs']['a_skin']?$d['bbs']['a_skin']:$d['bbs']['attach_main'];
}
include_once $g['dir_module'].'lib/action.func.php';
$mbruid = $my['uid'];
$result['uid'] = $R['uid'];
if ($mod=='view') {
require_once $g['path_core'].'function/sys.class.php';
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
$theme = $d['bbs']['m_skin']?$d['bbs']['m_skin']:$d['bbs']['skin_mobile'];
$device = 'mobile';
} else {
$theme = $d['bbs']['skin']?$d['bbs']['skin']:$d['bbs']['skin_main'];
$device = 'desktop';
}
include_once $g['dir_module'].'themes/'.$theme.'/_var.php';
$check_like_qry = "mbruid='".$mbruid."' and module='".$m."' and entry='".$uid."' and opinion='like'";
$check_dislike_qry = "mbruid='".$mbruid."' and module='".$m."' and entry='".$uid."' and opinion='dislike'";
$check_saved_qry = "mbruid='".$mbruid."' and module='".$m."' and entry='".$uid."'";
$is_post_liked = getDbRows($table['s_opinion'],$check_like_qry);
$is_post_disliked = getDbRows($table['s_opinion'],$check_dislike_qry);
$is_post_saved = getDbRows($table['s_saved'],$check_saved_qry);
$TMPL['s']=$rooturl;
$TMPL['r']=$raccount;
$TMPL['m']=$m;
$TMPL['bid']=$B['id'];
$TMPL['uid']=$uid;
$TMPL['subject'] = $R['subject'];
$TMPL['category'] = $R['category'];
$TMPL['article'] = getContents($R['content'],$R['html']);
$TMPL['date'] = getDateFormat($R['d_regis'],$d['theme']['date_viewf']);
$TMPL['avatar'] = getAvatarSrc($R['mbruid'],'150');
$TMPL['name'] = $R[$_HS['nametype']];
$result['content'] = getContents($R['content'],$R['html']);
$TMPL['featured_img'] = getPreviewResize(getUpImageSrc($R),'480x270');
$result['featured_img_sm'] = getPreviewResize(getUpImageSrc($R),'240x180');
$result['featured_img'] = getPreviewResize(getUpImageSrc($R),'480x270');
$result['featured_img_lg'] = getPreviewResize(getUpImageSrc($R),'686x386');
$result['featured_img_sq_200'] = getPreviewResize(getUpImageSrc($R),'200x200');
$result['featured_img_sq_300'] = getPreviewResize(getUpImageSrc($R),'300x300');
$result['featured_img_sq_600'] = getPreviewResize(getUpImageSrc($R),'600x600');
$TMPL['hit'] = $R['hit'];
$TMPL['likes'] = $R['likes'];
$TMPL['dislikes'] = $R['dislikes'];
$TMPL['tag'] = getPostTag($R['tag'],$bid);
if ($is_post_liked) $result['is_post_liked'] = 1;
if ($is_post_disliked) $result['is_post_disliked'] = 1;
if ($is_post_saved) $result['is_post_saved'] = 1;
if ($R['tag']) $result['is_post_tag'] = 1;
if($R['upload']) {
if ($AttachListType == 'object') {
$result['photo'] = getAttachObjectArray($R,'photo');
} else {
$result['attachNum'] = _getAttachNum($R['upload'],'view');
//$result['linkNum'] = getLinkNum($R['upload'],'view');
}
$result['theme_attachFile'] = $theme_attachFile;
}
if($my['admin'] || $my['uid']==$R['mbruid']) { // 수정,삭제 버튼 출력여부를 위한 참조
$result['mypost'] = 1;
}
//개별 게시판 설정
$result['bbs_c_hidden'] = $d['bbs']['c_hidden'];
// 테마설정
$result['theme'] = $theme;
$result['theme_use_reply'] = $d['theme']['use_reply'];
$result['theme_show_tag'] = $d['theme']['show_tag'];
$result['theme_show_upfile'] = $d['theme']['show_upfile'] ;
$result['theme_show_saved'] = $d['theme']['show_saved'];
$result['theme_show_like'] = $d['theme']['show_like'];
$result['theme_show_dislike'] = $d['theme']['show_dislike'];
$result['theme_show_share'] = $d['theme']['show_share'];
$markup_file = $markup_file?$markup_file:'view'; // 기본 마크업 페이지 전달 (테마 내부 _html/view.html)
if ($R['hidden']) { // 비밀글의 경우
if ($my['uid'] != $R['mbruid'] && $my['uid'] != $R['pw'] && !$my['admin']) {
$markup_file = 'lock'; //잠김페이지 전달 (테마 내부 _html/lock.html)
$result['hidden'] = 1;
}
}
//게시물 보기 권한체크
if (!$my['admin'] && !strstr(','.($d['bbs']['admin']?$d['bbs']['admin']:'.').',',','.$my['id'].',')) {
if ($d['bbs']['perm_l_view'] > $my['level'] || strpos('_'.$d['bbs']['perm_g_view'],'['.$my['mygroup'].']')) {
$markup_file = 'permcheck'; //잠김페이지 전달 (테마 내부 _html/permcheck.html)
$result['hidden'] = 1;
}
}
//첨부파일 권한체크
if (!$my['admin'] && !strstr(','.($d['bbs']['admin']?$d['bbs']['admin']:'.').',',','.$my['id'].',')) {
if ($d['bbs']['perm_l_down'] > $my['level'] || (strpos($d['bbs']['perm_g_down'],'['.$my['mygroup'].']')!== false)) {
$result['hidden_attach'] = 1;
}
}
$d['bbs']['isperm'] = true;
if ($d['bbs']['isperm'] && ($d['bbs']['hitcount'] || !strpos('_'.$_SESSION['module_'.$m.'_view'],'['.$uid.']')))
{
if ($R['point2'])
{
// $g['main'] = $g['dir_module'].'mod/_pointcheck.php';
$markup_file = 'pointcheck';
$d['bbs']['isperm'] = false;
}
else {
getDbUpdate($table[$m.'data'],'hit=hit+1','uid='.$uid);
$_SESSION['module_'.$m.'_view'] .= '['.$uid.']';
}
}
// 최종 결과값 추출 (sys.class.php)
$skin=new skin($markup_file);
$result['article']=$skin->make();
} else {
//글쓰기 수정모드 일때
$result['subject'] = $R['subject'];
$result['content'] = getContents($R['content'],$R['html']);
$result['hidden'] = $R['hidden'];
$result['notice'] = $R['notice'];
$result['category'] = $R['category'];
$result['tag'] = $R['tag'];
$result['adddata'] = $R['adddata'];
$result['theme'] = $theme;
if($R['upload']) {
$result['attachNum'] = _getAttachNum($R['upload'],'modify');
$result['theme_attachFile'] = $theme_attachFile;
}
}
if ($R['oneline']) {
$TMPL['comment'] = $R['comment'].'+'.$R['oneline'];
$result['total_comment'] = $R['comment'].'+'.$R['oneline']; // 댓글,한줄의견 등록시 현재댓글수를 내려주기 위함
} else {
$TMPL['comment'] = $R['comment'];
$result['total_comment'] = $R['comment']; // 댓글,한줄의견 등록시 현재댓글수를 내려주기 위함
}
$result['bname']=$B['name'];
echo json_encode($result);
exit;
?>

View File

@@ -0,0 +1,156 @@
<?php
if(!defined('__KIMS__')) exit;
require_once $g['path_core'].'function/sys.class.php';
include_once $g['dir_module'].'lib/action.func.php';
include_once $g['dir_module'].'var/var.php';
$result=array();
$result['error']=false;
$B = getDbData($table[$m.'list'],"id='".$bid."' and site=".$s,'*');
if (!$B['uid']) {
$result['error']='존재하지 않는 게시판 입니다.';
echo json_encode($result);
exit;
}
include_once $g['path_var'].'bbs/var.'.$bid.'.php';
include_once $g['dir_module'].'mod/_list.php';
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
$theme = $d['bbs']['m_skin']?$d['bbs']['m_skin']:$d['bbs']['skin_mobile'];
} else {
$theme = $d['bbs']['skin']?$d['bbs']['skin']:$d['bbs']['skin_main'];
}
include_once $g['dir_module'].'themes/'.$theme.'/_var.php';
$mbruid = $my['uid'];
$html='';
$TMPL['r']=$r;
$TMPL['bname']=$B['name'];
$TMPL['bid']=$B['id'];
$TMPL['cat']=$cat;
$TMPL['keyword']=$keyword;
$TMPL['num']=$NUM;
$result['num_notice']=$NUM_NOTICE;
$result['num']=$NUM;
$result['page']=$p;
if ($NUM_NOTICE) {
foreach ($NCD as $R) {
$TMPL['subject']=$R['subject'];
$TMPL['uid']=$R['uid'];
$TMPL['mbruid']=$R['mbruid'];
$TMPL['name']=$R[$_HS['nametype']];
$TMPL['hit']=$R['hit'];
$TMPL['comment']=$R['comment'].($R['oneline']?'+'.$R['oneline']:'');
$TMPL['likes']=$R['likes'];
$TMPL['d_regis']=getDateFormat($R['d_regis'],'Y-m-d');
$TMPL['d_regis_c']=getDateFormat($R['d_regis'],'c');
$TMPL['new']=getNew($R['d_regis'],24)?'':'d-none';
$TMPL['hidden']=$R['hidden']?'':'d-none';
$TMPL['notice']=$R['notice']?'':'d-none';
$TMPL['upload']=$R['upload']?'':'d-none';
$TMPL['category']=$R['category'];
$TMPL['timeago']=$d['theme']['timeago']?'data-plugin="timeago"':'';
$TMPL['avatar'] = getAvatarSrc($R['mbruid'],'84');
$TMPL['featured_img'] = getPreviewResize(getUpImageSrc($R),'480x270');
$TMPL['has_featured_img'] = getUpImageSrc($R)=='/files/noimage.png'?'d-none':'';
$TMPL['url'] = '/'.$r.'/b/'.$bid.'/'.$R['uid'];
if ($collapse) $TMPL['article'] = getContents($R['content'],$R['html']);
$skin_item=new skin('list-item-notice');
$html.=$skin_item->make();
$TMPL['items']=$html;
}
$skin=new skin('list');
$result['list_notice']=$skin->make();
} else {
$result['list_notice']='';
}
$html='';
if ($NUM) {
foreach ($RCD as $R) {
$TMPL['subject']=$R['subject'];
$TMPL['uid']=$R['uid'];
$TMPL['mbruid']=$R['mbruid'];
$TMPL['name']= getStrCut($R[$_HS['nametype']],10,'..');
$TMPL['hit']=$R['hit'];
$TMPL['comment']=$R['comment'].($R['oneline']?'+'.$R['oneline']:'');
$TMPL['likes']=$R['likes'];
$TMPL['d_regis']=getDateFormat($R['d_regis'],'Y.m.d H:i');
$TMPL['d_regis_c']=getDateFormat($R['d_regis'],'c');
$TMPL['new']=getNew($R['d_regis'],24)?'':'d-none';
$TMPL['hidden']=$R['hidden']?'':'d-none';
$TMPL['notice']=$R['notice']?'':'d-none';
$TMPL['upload']=$R['upload']?'':'d-none';
$TMPL['category']=$R['category'];
$TMPL['timeago']=$d['theme']['timeago']?'data-plugin="timeago"':'';
$TMPL['avatar']=getAvatarSrc($R['mbruid'],'150');
$TMPL['featured_img_sm'] = getPreviewResize(getUpImageSrc($R),'240x180');
$TMPL['featured_img'] = getPreviewResize(getUpImageSrc($R),'480x270'); //16:9
$TMPL['featured_img_lg'] = getPreviewResize(getUpImageSrc($R),'686x386');
$TMPL['featured_img_1by1_200'] = getPreviewResize(getUpImageSrc($R),'200x200');
$TMPL['featured_img_1by1_300'] = getPreviewResize(getUpImageSrc($R),'300x300');
$TMPL['featured_img_1by1_600'] = getPreviewResize(getUpImageSrc($R),'600x600');
$TMPL['has_featured_img'] = getUpImageSrc($R)=='/files/noimage.png'?'d-none':'';
$TMPL['url'] = '/'.$r.'/b/'.$bid.'/'.$R['uid'];
//업로드 파일갯수
$d['upload'] = getArrayString($R['upload']);
$TMPL['upload_count'] = $d['upload']['count'];
if ($collapse) $TMPL['article'] = getContents($R['content'],$R['html']);
$skin_item=new skin($markup_item);
$html.=$skin_item->make();
}
$TMPL['items']=$html;
if ($p==1) {
$TMPL['page']=$p;
$skin=new skin($markup_list);
$result['list_post']=$skin->make();
} else {
$result['list_post']=$html;
}
} else {
$skin_item=new skin('none');
$result['list_post']=$skin_item->make();
}
if($my['admin'] || $my['uid']==$R['mbruid']) { // 수정,삭제 버튼 출력여부를 위한 참조
$result['bbsadmin'] = 1;
}
if ($B['category']) {
$_catexp = explode(',',$B['category']);
$_catnum=count($_catexp);
$category='<option value="" data-bid="'.$bid.'" data-collapse="'.$collapse.'">'.$_catexp[0].'</option>';
for ($i = 1; $i < $_catnum; $i++) {
if(!$_catexp[$i])continue;
$category.= '<option value="'.$_catexp[$i].'"';
$category.= 'data-bid="'.$bid.'"';
$category.= ' data-collapse="'.$collapse.'"';
$category.= 'data-markup="'.$markup_file.'"';
if ($_catexp[$i]==$cat) $category.= ' selected';
$category.= '>';
$category.= $_catexp[$i];
$category.= '</option>';
}
$result['category']=$category;
}
echo json_encode($result);
exit;
?>

Some files were not shown because too many files have changed in this diff Show More