최초 배포
최초 배포
11
AvocadoEdition_Light/README.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# AvocadoEdition
|
||||
아보카도 에디션 코어 파일
|
||||
|
||||
-----------------------------
|
||||
|
||||
해당 경로에 있는 파일들을 설치할 Root 디렉토리에 업로드해주세요.
|
||||
자세한 설치 방법은 https://github.com/tateck-develop/AvocadoEdition/wiki 이곳을 참고해 주시길 바랍니다.
|
||||
|
||||
-----------------------------
|
||||
|
||||
2022.04.24 : enter.php 파일 44번 라인 css 연결 경로 수정
|
||||
3
AvocadoEdition_Light/_common.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
include_once('./common.php');
|
||||
?>
|
||||
5
AvocadoEdition_Light/_head.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
include_once(G5_PATH.'/head.php');
|
||||
?>
|
||||
5
AvocadoEdition_Light/_tail.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
include_once(G5_PATH.'/tail.php');
|
||||
?>
|
||||
5
AvocadoEdition_Light/adm/_common.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
define('G5_IS_ADMIN', true);
|
||||
include_once ('../common.php');
|
||||
include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
?>
|
||||
3
AvocadoEdition_Light/adm/admin.ajax.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
$(function() {
|
||||
|
||||
});
|
||||
125
AvocadoEdition_Light/adm/admin.head.php
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
$begin_time = get_microtime();
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
function print_menu1($key, $no)
|
||||
{
|
||||
global $menu;
|
||||
|
||||
$str = print_menu2($key, $no);
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
function print_menu2($key, $no)
|
||||
{
|
||||
global $menu, $auth_menu, $is_admin, $auth, $g5, $sub_menu;
|
||||
|
||||
$str .= "<ul class=\"gnb_2dul\">";
|
||||
for($i=1; $i<count($menu[$key]); $i++)
|
||||
{
|
||||
if ($is_admin != 'super' && (!array_key_exists($menu[$key][$i][0],$auth) || !strstr($auth[$menu[$key][$i][0]], 'r')))
|
||||
continue;
|
||||
|
||||
if (($menu[$key][$i][4] == 1 && $gnb_grp_style == false) || ($menu[$key][$i][4] != 1 && $gnb_grp_style == true)) $gnb_grp_div = 'gnb_grp_div';
|
||||
else $gnb_grp_div = '';
|
||||
|
||||
if ($menu[$key][$i][4] == 1) $gnb_grp_style = 'gnb_grp_style';
|
||||
else $gnb_grp_style = '';
|
||||
|
||||
$check_gnb_grp_style = "";
|
||||
if($menu[$key][$i][0] && isset($sub_menu) && $menu[$key][$i][0] == $sub_menu) {
|
||||
$check_gnb_grp_style = "check";
|
||||
}
|
||||
|
||||
$str .= '<li class="gnb_2dli '.$check_gnb_grp_style.'"><a href="'.$menu[$key][$i][2].'" class="gnb_2da '.$gnb_grp_style.' '.$gnb_grp_div.'" data-text="'.$menu[$key][$i][1].'">'.$menu[$key][$i][1].'</a></li>';
|
||||
|
||||
$auth_menu[$menu[$key][$i][0]] = $menu[$key][$i][1];
|
||||
}
|
||||
$str .= "</ul>";
|
||||
|
||||
return $str;
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
var tempX = 0;
|
||||
var tempY = 0;
|
||||
|
||||
function imageview(id, w, h)
|
||||
{
|
||||
|
||||
menu(id);
|
||||
|
||||
var el_id = document.getElementById(id);
|
||||
|
||||
//submenu = eval(name+".style");
|
||||
submenu = el_id.style;
|
||||
submenu.left = tempX - ( w + 11 );
|
||||
submenu.top = tempY - ( h / 2 );
|
||||
|
||||
selectBoxVisible();
|
||||
|
||||
if (el_id.style.display != 'none')
|
||||
selectBoxHidden(id);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="wrap">
|
||||
|
||||
<header id="header">
|
||||
<div id="admin_prof">
|
||||
<h1>
|
||||
<a href="<?php echo G5_ADMIN_URL ?>"><img src="<?=G5_ADMIN_URL?>/img/logo.png" alt="Avocado Edition" /></a>
|
||||
<i><?=G5_GNUBOARD_VER?></i>
|
||||
</h1>
|
||||
<p>
|
||||
<a href="<?php echo G5_ADMIN_URL ?>/member_form.php?w=u&mb_id=<?php echo $member['mb_id'] ?>" class="name">
|
||||
<?=$member['mb_name']?>
|
||||
</a>
|
||||
<a href="<?php echo G5_BBS_URL ?>/logout.php" class="logout">로그아웃</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<nav id="gnb">
|
||||
<ul>
|
||||
<li style="border-bottom:1px solid #444;">
|
||||
<a href="<?=G5_URL?>" target="_blank">
|
||||
커뮤니티
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php
|
||||
$gnb_str = "<ul>";
|
||||
foreach($amenu as $key=>$value) {
|
||||
$href1 = $href2 = '';
|
||||
if ($menu['menu'.$key][0][2]) {
|
||||
$href1 = '<a href="'.$menu['menu'.$key][0][2].'" class="gnb_1da" data-text="'. $menu['menu'.$key][0][1].'">';
|
||||
$href2 = '</a>';
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
$current_class = "";
|
||||
if (isset($sub_menu) && (substr($sub_menu, 0, 3) == substr($menu['menu'.$key][0][0], 0, 3)))
|
||||
$current_class = " gnb_1dli_air";
|
||||
$gnb_str .= '<li class="gnb_1dli'.$current_class.'">'.PHP_EOL;
|
||||
$gnb_str .= $href1 . $menu['menu'.$key][0][1] . $href2;
|
||||
$gnb_str .= print_menu1('menu'.$key, 1);
|
||||
$gnb_str .= "</li>";
|
||||
}
|
||||
$gnb_str .= "</ul>";
|
||||
echo $gnb_str;
|
||||
?>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<section id="wrapper">
|
||||
|
||||
<aside id="page_top">
|
||||
<h2><?php echo $g5['title'] ?></h2>
|
||||
</aside>
|
||||
|
||||
<div id="container">
|
||||
131
AvocadoEdition_Light/adm/admin.js
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
function check_all(f)
|
||||
{
|
||||
var chk = document.getElementsByName("chk[]");
|
||||
|
||||
for (i=0; i<chk.length; i++)
|
||||
chk[i].checked = f.chkall.checked;
|
||||
}
|
||||
|
||||
function btn_check(f, act)
|
||||
{
|
||||
if (act == "update") // 선택수정
|
||||
{
|
||||
f.action = list_update_php;
|
||||
str = "수정";
|
||||
}
|
||||
else if (act == "delete") // 선택삭제
|
||||
{
|
||||
f.action = list_delete_php;
|
||||
str = "삭제";
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
var chk = document.getElementsByName("chk[]");
|
||||
var bchk = false;
|
||||
|
||||
for (i=0; i<chk.length; i++)
|
||||
{
|
||||
if (chk[i].checked)
|
||||
bchk = true;
|
||||
}
|
||||
|
||||
if (!bchk)
|
||||
{
|
||||
alert(str + "할 자료를 하나 이상 선택하세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (act == "delete")
|
||||
{
|
||||
if (!confirm("선택한 자료를 정말 삭제 하시겠습니까?"))
|
||||
return;
|
||||
}
|
||||
|
||||
f.submit();
|
||||
}
|
||||
|
||||
function is_checked(elements_name)
|
||||
{
|
||||
var checked = false;
|
||||
var chk = document.getElementsByName(elements_name);
|
||||
for (var i=0; i<chk.length; i++) {
|
||||
if (chk[i].checked) {
|
||||
checked = true;
|
||||
}
|
||||
}
|
||||
return checked;
|
||||
}
|
||||
|
||||
function delete_confirm(el)
|
||||
{
|
||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||
var token = get_ajax_token();
|
||||
var href = el.href.replace(/&token=.+$/g, "");
|
||||
if(!token) {
|
||||
alert("토큰 정보가 올바르지 않습니다.");
|
||||
return false;
|
||||
}
|
||||
el.href = href+"&token="+token;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function delete_confirm2(msg)
|
||||
{
|
||||
if(confirm(msg))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function get_ajax_token()
|
||||
{
|
||||
var token = "";
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: g5_admin_url+"/ajax.token.php",
|
||||
cache: false,
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.error) {
|
||||
alert(data.error);
|
||||
if(data.url)
|
||||
document.location.href = data.url;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
token = data.token;
|
||||
}
|
||||
});
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$(document).on("click", "form input:submit", function() {
|
||||
var f = this.form;
|
||||
var token = get_ajax_token();
|
||||
|
||||
if(!token) {
|
||||
alert("토큰 정보가 올바르지 않습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var $f = $(f);
|
||||
|
||||
if(typeof f.token === "undefined")
|
||||
$f.prepend('<input type="hidden" name="token" value="">');
|
||||
|
||||
$f.find("input[name=token]").val(token);
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
$('.new_win').parents('body').addClass('popup-body');
|
||||
});
|
||||
476
AvocadoEdition_Light/adm/admin.lib.php
Normal file
|
|
@ -0,0 +1,476 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
/*
|
||||
// 081022 : CSRF 방지를 위해 코드를 작성했으나 효과가 없어 주석처리 함
|
||||
if (!get_session('ss_admin')) {
|
||||
set_session('ss_admin', true);
|
||||
goto_url('.');
|
||||
}
|
||||
*/
|
||||
|
||||
// 스킨디렉토리를 SELECT 형식으로 얻음
|
||||
function get_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||
{
|
||||
global $config;
|
||||
|
||||
$skins = array();
|
||||
|
||||
if(defined('G5_THEME_PATH') && $config['cf_theme']) {
|
||||
$dirs = get_skin_dir($skin_gubun, G5_THEME_PATH.'/'.G5_SKIN_DIR);
|
||||
if(!empty($dirs)) {
|
||||
foreach($dirs as $dir) {
|
||||
$skins[] = 'theme/'.$dir;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$skins = array_merge($skins, get_skin_dir($skin_gubun));
|
||||
|
||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||
for ($i=0; $i<count($skins); $i++) {
|
||||
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
||||
if(preg_match('#^theme/(.+)$#', $skins[$i], $match))
|
||||
$text = '(테마) '.$match[1];
|
||||
else
|
||||
$text = $skins[$i];
|
||||
|
||||
$str .= option_selected($skins[$i], $selected, $text);
|
||||
}
|
||||
$str .= "</select>";
|
||||
return $str;
|
||||
}
|
||||
|
||||
// 모바일 스킨디렉토리를 SELECT 형식으로 얻음
|
||||
function get_mobile_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||
{
|
||||
global $config;
|
||||
|
||||
$skins = array();
|
||||
|
||||
if(defined('G5_THEME_PATH') && $config['cf_theme']) {
|
||||
$dirs = get_skin_dir($skin_gubun, G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||
if(!empty($dirs)) {
|
||||
foreach($dirs as $dir) {
|
||||
$skins[] = 'theme/'.$dir;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$skins = array_merge($skins, get_skin_dir($skin_gubun, G5_MOBILE_PATH.'/'.G5_SKIN_DIR));
|
||||
|
||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||
for ($i=0; $i<count($skins); $i++) {
|
||||
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
||||
if(preg_match('#^theme/(.+)$#', $skins[$i], $match))
|
||||
$text = '(테마) '.$match[1];
|
||||
else
|
||||
$text = $skins[$i];
|
||||
|
||||
$str .= option_selected($skins[$i], $selected, $text);
|
||||
}
|
||||
$str .= "</select>";
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
// 스킨경로를 얻는다
|
||||
function get_skin_dir($skin, $skin_path=G5_SKIN_PATH)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$result_array = array();
|
||||
|
||||
$dirname = $skin_path.'/'.$skin.'/';
|
||||
if(!is_dir($dirname))
|
||||
return;
|
||||
|
||||
$handle = opendir($dirname);
|
||||
while ($file = readdir($handle)) {
|
||||
if($file == '.'||$file == '..') continue;
|
||||
|
||||
if (is_dir($dirname.$file)) $result_array[] = $file;
|
||||
}
|
||||
closedir($handle);
|
||||
sort($result_array);
|
||||
|
||||
return $result_array;
|
||||
}
|
||||
|
||||
|
||||
// 테마
|
||||
function get_theme_dir()
|
||||
{
|
||||
$result_array = array();
|
||||
|
||||
$dirname = G5_PATH.'/'.G5_THEME_DIR.'/';
|
||||
$handle = opendir($dirname);
|
||||
while ($file = readdir($handle)) {
|
||||
if($file == '.'||$file == '..') continue;
|
||||
|
||||
if (is_dir($dirname.$file)) {
|
||||
$theme_path = $dirname.$file;
|
||||
if(is_file($theme_path.'/index.php') && is_file($theme_path.'/head.php') && is_file($theme_path.'/tail.php'))
|
||||
$result_array[] = $file;
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
natsort($result_array);
|
||||
|
||||
return $result_array;
|
||||
}
|
||||
|
||||
// 테마디렉토리를 SELECT 형식으로 얻음
|
||||
function get_theme_select($id, $name, $selected='', $event='')
|
||||
{
|
||||
global $config;
|
||||
|
||||
$theme = array();
|
||||
$theme = array_merge($theme, get_theme_dir());
|
||||
|
||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||
for ($i=0; $i<count($theme); $i++) {
|
||||
if ($i == 0) $str .= "<option value=\"\">-</option>";
|
||||
$text = $theme[$i];
|
||||
|
||||
$str .= option_selected($theme[$i], $selected, $text);
|
||||
}
|
||||
$str .= "</select>";
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
// 테마정보
|
||||
function get_theme_info($dir)
|
||||
{
|
||||
$info = array();
|
||||
$path = G5_PATH.'/'.G5_THEME_DIR.'/'.$dir;
|
||||
|
||||
if(is_dir($path)) {
|
||||
$screenshot = $path.'/screenshot.png';
|
||||
if(is_file($screenshot)) {
|
||||
$size = @getimagesize($screenshot);
|
||||
|
||||
if($size[2] == 3)
|
||||
$screenshot_url = str_replace(G5_PATH, G5_URL, $screenshot);
|
||||
}
|
||||
|
||||
$info['screenshot'] = $screenshot_url;
|
||||
|
||||
$text = $path.'/readme.txt';
|
||||
if(is_file($text)) {
|
||||
$content = file($text, false);
|
||||
$content = array_map('trim', $content);
|
||||
|
||||
preg_match('#^Theme Name:(.+)$#i', $content[0], $m0);
|
||||
preg_match('#^Theme URI:(.+)$#i', $content[1], $m1);
|
||||
preg_match('#^Maker:(.+)$#i', $content[2], $m2);
|
||||
preg_match('#^Maker URI:(.+)$#i', $content[3], $m3);
|
||||
preg_match('#^Version:(.+)$#i', $content[4], $m4);
|
||||
preg_match('#^Detail:(.+)$#i', $content[5], $m5);
|
||||
preg_match('#^License:(.+)$#i', $content[6], $m6);
|
||||
preg_match('#^License URI:(.+)$#i', $content[7], $m7);
|
||||
|
||||
$info['theme_name'] = trim($m0[1]);
|
||||
$info['theme_uri'] = trim($m1[1]);
|
||||
$info['maker'] = trim($m2[1]);
|
||||
$info['maker_uri'] = trim($m3[1]);
|
||||
$info['version'] = trim($m4[1]);
|
||||
$info['detail'] = trim($m5[1]);
|
||||
$info['license'] = trim($m6[1]);
|
||||
$info['license_uri'] = trim($m7[1]);
|
||||
}
|
||||
|
||||
if(!$info['theme_name'])
|
||||
$info['theme_name'] = $dir;
|
||||
}
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
||||
|
||||
// 테마설정 정보
|
||||
function get_theme_config_value($dir, $key='*')
|
||||
{
|
||||
$tconfig = array();
|
||||
|
||||
$theme_config_file = G5_PATH.'/'.G5_THEME_DIR.'/'.$dir.'/theme.config.php';
|
||||
if(is_file($theme_config_file)) {
|
||||
include($theme_config_file);
|
||||
|
||||
if($key == '*') {
|
||||
$tconfig = $theme_config;
|
||||
} else {
|
||||
$keys = array_map('trim', explode(',', $key));
|
||||
foreach($keys as $v) {
|
||||
$tconfig[$v] = isset($theme_config[$v]) ? trim($theme_config[$v]) : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $tconfig;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 회원권한을 SELECT 형식으로 얻음
|
||||
function get_member_level_select($name, $start_id=0, $end_id=10, $selected="", $event="")
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$level_name[1] = "방문자";
|
||||
$level_name[2] = "멤버";
|
||||
$level_name[3] = "상위멤버";
|
||||
$level_name[10] = "운영자";
|
||||
|
||||
$str = "\n<select id=\"{$name}\" name=\"{$name}\"";
|
||||
if ($event) $str .= " $event";
|
||||
$str .= ">\n";
|
||||
for ($i=$start_id; $i<=$end_id; $i++) {
|
||||
if(!$level_name[$i]) continue;
|
||||
|
||||
$str .= '<option value="'.$i.'"';
|
||||
if ($i == $selected)
|
||||
$str .= ' selected="selected"';
|
||||
$str .= ">{$level_name[$i]} </option>\n";
|
||||
}
|
||||
$str .= "</select>\n";
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
// 회원아이디를 SELECT 형식으로 얻음
|
||||
function get_member_id_select($name, $level, $selected="", $event="")
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$sql = " select mb_id from {$g5['member_table']} where mb_level >= '{$level}' ";
|
||||
$result = sql_query($sql);
|
||||
$str = '<select id="'.$name.'" name="'.$name.'" '.$event.'><option value="">선택안함</option>';
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$str .= '<option value="'.$row['mb_id'].'"';
|
||||
if ($row['mb_id'] == $selected) $str .= ' selected';
|
||||
$str .= '>'.$row['mb_id'].'</option>';
|
||||
}
|
||||
$str .= '</select>';
|
||||
return $str;
|
||||
}
|
||||
|
||||
// 권한 검사
|
||||
function auth_check($auth, $attr, $return=false)
|
||||
{
|
||||
global $is_admin;
|
||||
|
||||
if ($is_admin == 'super') return;
|
||||
|
||||
if (!trim($auth)) {
|
||||
$msg = '이 메뉴에는 접근 권한이 없습니다.\\n\\n접근 권한은 최고관리자만 부여할 수 있습니다.';
|
||||
if($return)
|
||||
return $msg;
|
||||
else
|
||||
alert($msg);
|
||||
}
|
||||
|
||||
$attr = strtolower($attr);
|
||||
|
||||
if (!strstr($auth, $attr)) {
|
||||
if ($attr == 'r') {
|
||||
$msg = '읽을 권한이 없습니다.';
|
||||
if($return)
|
||||
return $msg;
|
||||
else
|
||||
alert($msg);
|
||||
} else if ($attr == 'w') {
|
||||
$msg = '입력, 추가, 생성, 수정 권한이 없습니다.';
|
||||
if($return)
|
||||
return $msg;
|
||||
else
|
||||
alert($msg);
|
||||
} else if ($attr == 'd') {
|
||||
$msg = '삭제 권한이 없습니다.';
|
||||
if($return)
|
||||
return $msg;
|
||||
else
|
||||
alert($msg);
|
||||
} else {
|
||||
$msg = '속성이 잘못 되었습니다.';
|
||||
if($return)
|
||||
return $msg;
|
||||
else
|
||||
alert($msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 작업아이콘 출력
|
||||
function icon($act, $link='', $target='_parent')
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$img = array('입력'=>'insert', '추가'=>'insert', '생성'=>'insert', '수정'=>'modify', '삭제'=>'delete', '이동'=>'move', '그룹'=>'move', '보기'=>'view', '미리보기'=>'view', '복사'=>'copy');
|
||||
$icon = '<img src="'.G5_ADMIN_PATH.'/img/icon_'.$img[$act].'.gif" title="'.$act.'">';
|
||||
if ($link)
|
||||
$s = '<a href="'.$link.'">'.$icon.'</a>';
|
||||
else
|
||||
$s = $icon;
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
// rm -rf 옵션 : exec(), system() 함수를 사용할 수 없는 서버 또는 win32용 대체
|
||||
// www.php.net 참고 : pal at degerstrom dot com
|
||||
function rm_rf($file)
|
||||
{
|
||||
if (file_exists($file)) {
|
||||
if (is_dir($file)) {
|
||||
$handle = opendir($file);
|
||||
while($filename = readdir($handle)) {
|
||||
if ($filename != '.' && $filename != '..')
|
||||
rm_rf($file.'/'.$filename);
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
@chmod($file, G5_DIR_PERMISSION);
|
||||
@rmdir($file);
|
||||
} else {
|
||||
@chmod($file, G5_FILE_PERMISSION);
|
||||
@unlink($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 출력순서
|
||||
function order_select($fld, $sel='')
|
||||
{
|
||||
$s = '<select name="'.$fld.'" id="'.$fld.'">';
|
||||
for ($i=1; $i<=100; $i++) {
|
||||
$s .= '<option value="'.$i.'" ';
|
||||
if ($sel) {
|
||||
if ($i == $sel) {
|
||||
$s .= 'selected';
|
||||
}
|
||||
} else {
|
||||
if ($i == 50) {
|
||||
$s .= 'selected';
|
||||
}
|
||||
}
|
||||
$s .= '>'.$i.'</option>';
|
||||
}
|
||||
$s .= '</select>';
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
// 불법접근을 막도록 토큰을 생성하면서 토큰값을 리턴
|
||||
function get_admin_token()
|
||||
{
|
||||
$token = md5(uniqid(rand(), true));
|
||||
set_session('ss_admin_token', $token);
|
||||
|
||||
return $token;
|
||||
}
|
||||
|
||||
|
||||
// POST로 넘어온 토큰과 세션에 저장된 토큰 비교
|
||||
function check_admin_token()
|
||||
{
|
||||
$token = get_session('ss_admin_token');
|
||||
set_session('ss_admin_token', '');
|
||||
|
||||
if(!$token || !$_REQUEST['token'] || $token != $_REQUEST['token'])
|
||||
alert('올바른 방법으로 이용해 주십시오.', G5_URL);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 관리자 페이지 referer 체크
|
||||
function admin_referer_check($return=false)
|
||||
{
|
||||
$referer = trim($_SERVER['HTTP_REFERER']);
|
||||
if(!$referer) {
|
||||
$msg = '정보가 올바르지 않습니다.';
|
||||
|
||||
if($return)
|
||||
return $msg;
|
||||
else
|
||||
alert($msg, G5_URL);
|
||||
}
|
||||
|
||||
$p = @parse_url($referer);
|
||||
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
|
||||
|
||||
if($host != $p['host']) {
|
||||
$msg = '올바른 방법으로 이용해 주십시오.';
|
||||
|
||||
if($return)
|
||||
return $msg;
|
||||
else
|
||||
alert($msg, G5_URL);
|
||||
}
|
||||
}
|
||||
|
||||
// 접근 권한 검사
|
||||
if (!$member['mb_id'])
|
||||
{
|
||||
goto_url(G5_BBS_URL.'/login.php?url=' . urlencode(G5_ADMIN_URL));
|
||||
}
|
||||
else if ($is_admin != 'super')
|
||||
{
|
||||
$auth = array();
|
||||
$sql = " select au_menu, au_auth from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' ";
|
||||
$result = sql_query($sql);
|
||||
for($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$auth[$row['au_menu']] = $row['au_auth'];
|
||||
}
|
||||
|
||||
if (!$i)
|
||||
{
|
||||
goto_url(G5_URL);
|
||||
}
|
||||
}
|
||||
|
||||
// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
|
||||
$admin_key = md5($member['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
|
||||
if (get_session('ss_mb_key') !== $admin_key) {
|
||||
|
||||
session_destroy();
|
||||
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
// 메일 알림
|
||||
mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], 'XSS 공격 알림', $_SERVER['REMOTE_ADDR'].' 아이피로 XSS 공격이 있었습니다.\n\n관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.\n\n해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.\n\n'.G5_URL, 0);
|
||||
|
||||
alert_close('정상적으로 로그인하여 접근하시기 바랍니다.');
|
||||
}
|
||||
|
||||
@ksort($auth);
|
||||
|
||||
// 가변 메뉴
|
||||
unset($auth_menu);
|
||||
unset($menu);
|
||||
unset($amenu);
|
||||
$tmp = dir(G5_ADMIN_PATH);
|
||||
while ($entry = $tmp->read()) {
|
||||
if (!preg_match('/^admin.menu([0-9]{3}).*\.php$/', $entry, $m))
|
||||
continue; // 파일명이 menu 으로 시작하지 않으면 무시한다.
|
||||
|
||||
$amenu[$m[1]] = $entry;
|
||||
include_once(G5_ADMIN_PATH.'/'.$entry);
|
||||
}
|
||||
@ksort($amenu);
|
||||
|
||||
$arr_query = array();
|
||||
if (isset($sst)) $arr_query[] = 'sst='.$sst;
|
||||
if (isset($sod)) $arr_query[] = 'sod='.$sod;
|
||||
if (isset($sfl)) $arr_query[] = 'sfl='.$sfl;
|
||||
if (isset($stx)) $arr_query[] = 'stx='.$stx;
|
||||
if (isset($page)) $arr_query[] = 'page='.$page;
|
||||
$qstr = implode("&", $arr_query);
|
||||
|
||||
// 관리자에서는 추가 스크립트는 사용하지 않는다.
|
||||
//$config['cf_add_script'] = '';
|
||||
?>
|
||||
11
AvocadoEdition_Light/adm/admin.menu100.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
$menu['menu100'] = array (
|
||||
array('100000', '사이트 설정', G5_ADMIN_URL.'/site_config_form.php', 'config'),
|
||||
array('100100', '환경설정', G5_ADMIN_URL.'/site_config_form.php', ''),
|
||||
array('100250', '메인 편집', G5_ADMIN_URL.'/viewer_form.php', ''),
|
||||
array('100300', '디자인 설정', G5_ADMIN_URL.'/design_form.php', ''),
|
||||
array('100400', '메뉴 설정', G5_ADMIN_URL.'/menu_list.php', ''),
|
||||
array('100990', 'DB관리', G5_DB_URL, '')
|
||||
);
|
||||
|
||||
?>
|
||||
8
AvocadoEdition_Light/adm/admin.menu200.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
$menu['menu200'] = array (
|
||||
array('200000', '회원관리', G5_ADMIN_URL.'/member_list.php', ''),
|
||||
array('200100', '회원관리', G5_ADMIN_URL.'/member_list.php', ''),
|
||||
array('200800', '접속자집계', G5_ADMIN_URL.'/visit_list.php', ''),
|
||||
array('200820', '접속자로그삭제', G5_ADMIN_URL.'/visit_delete.php', '')
|
||||
);
|
||||
?>
|
||||
8
AvocadoEdition_Light/adm/admin.menu300.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
$menu['menu300'] = array (
|
||||
array('300000', '게시판관리', ''.G5_ADMIN_URL.'/board_list.php', 'board'),
|
||||
array('300100', '게시판관리', ''.G5_ADMIN_URL.'/board_list.php', 'bbs_board'),
|
||||
array('300200', '게시판그룹관리', ''.G5_ADMIN_URL.'/boardgroup_list.php', 'bbs_group'),
|
||||
array('300600', '내용관리', G5_ADMIN_URL.'/contentlist.php', 'scf_contents', 1),
|
||||
);
|
||||
?>
|
||||
8
AvocadoEdition_Light/adm/admin.menu900.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
$menu['menu900'] = array (
|
||||
array('900000', '기타관리', G5_ADMIN_URL.'/session_file_delete.php', ''),
|
||||
array('900100', '세션파일 일괄삭제',G5_ADMIN_URL.'/session_file_delete.php', 'cf_session', 1),
|
||||
array('900200', '캐시파일 일괄삭제',G5_ADMIN_URL.'/cache_file_delete.php', 'cf_cache', 1),
|
||||
array('900300', '홈페이지 상세관리',G5_ADMIN_URL.'/config_form.php', 'cf_thumbnail', 1)
|
||||
);
|
||||
?>
|
||||
59
AvocadoEdition_Light/adm/admin.tail.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
?>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <p>실행시간 : <?php echo get_microtime() - $begin_time; ?> -->
|
||||
|
||||
<script src="<?php echo G5_ADMIN_URL ?>/admin.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<script src="<?php echo G5_ADMIN_URL ?>/admin.ajax.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
var hide_menu = false;
|
||||
var mouse_event = false;
|
||||
var oldX = oldY = 0;
|
||||
|
||||
$(document).mousemove(function(e) {
|
||||
if(oldX == 0) {
|
||||
oldX = e.pageX;
|
||||
oldY = e.pageY;
|
||||
}
|
||||
|
||||
if(oldX != e.pageX || oldY != e.pageY) {
|
||||
mouse_event = true;
|
||||
}
|
||||
});
|
||||
|
||||
// 폰트 리사이즈 쿠키있으면 실행
|
||||
var font_resize_act = get_cookie("ck_font_resize_act");
|
||||
if(font_resize_act != "") {
|
||||
font_resize("container", font_resize_act);
|
||||
}
|
||||
|
||||
$('.gnb_1da').bind('click', function(){
|
||||
var gnb_parent = $(this).closest('li');
|
||||
|
||||
if(gnb_parent.hasClass('on')) {
|
||||
|
||||
$('#gnb .on').not('.check').removeClass('on').find('.gnb_2dul').stop().slideUp();
|
||||
$('#gnb .check').parents('li').addClass('on').find('.gnb_2dul').stop().slideDown();
|
||||
} else {
|
||||
gnb_parent.addClass('on').find('.gnb_2dul').stop().slideDown();
|
||||
gnb_parent.siblings().removeClass('on').find('.gnb_2dul').stop().slideUp();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#gnb .check').addClass('on').parents('li').addClass('on').find('.gnb_2dul').show();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
14
AvocadoEdition_Light/adm/ajax.token.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/json.lib.php');
|
||||
|
||||
set_session('ss_admin_token', '');
|
||||
|
||||
$error = admin_referer_check(true);
|
||||
if($error)
|
||||
die(json_encode(array('error'=>$error, 'url'=>G5_URL)));
|
||||
|
||||
$token = get_admin_token();
|
||||
|
||||
die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>'')));
|
||||
?>
|
||||
5
AvocadoEdition_Light/adm/ajax/_common.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
define('G5_IS_ADMIN', true);
|
||||
include_once ('../../common.php');
|
||||
include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
?>
|
||||
80
AvocadoEdition_Light/adm/board_copy.php
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
$sub_menu = "300100";
|
||||
include_once("./_common.php");
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$g5['title'] = '게시판 복사';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
<script src="<?php echo G5_ADMIN_URL ?>/admin.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
|
||||
<div class="new_win">
|
||||
<h1><?php echo $g5['title']; ?></h1>
|
||||
|
||||
<div class="new_win_desc">
|
||||
|
||||
</div>
|
||||
|
||||
<form name="fboardcopy" id="fboardcopy" action="./board_copy_update.php" onsubmit="return fboardcopy_check(this);" method="post">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>" id="bo_table">
|
||||
<input type="hidden" name="token" value="">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="col" style="width:100px;">원본 테이블명</th>
|
||||
<td><?php echo $bo_table ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col"><label for="target_table">복사 테이블명<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('영문자, 숫자, _ 만 가능 (공백없이)'); ?>
|
||||
<input type="text" name="target_table" id="target_table" required class="required alnum_ frm_input" maxlength="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col"><label for="target_subject">게시판 제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="target_subject" value="[복사본] <?php echo $board['bo_subject'] ?>" id="target_subject" required class="required frm_input full" maxlength="120"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">복사 유형</th>
|
||||
<td>
|
||||
<input type="radio" name="copy_case" value="schema_only" id="copy_case" checked>
|
||||
<label for="copy_case">구조만</label>
|
||||
<input type="radio" name="copy_case" value="schema_data_both" id="copy_case2">
|
||||
<label for="copy_case2">구조와 데이터</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_win02 btn_win">
|
||||
<input type="submit" class="btn_submit" value="복사">
|
||||
<input type="button" class="btn_cancel" value="창닫기" onclick="window.close();">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function fboardcopy_check(f)
|
||||
{
|
||||
if (f.bo_table.value == f.target_table.value) {
|
||||
alert("원본 테이블명과 복사할 테이블명이 달라야 합니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
205
AvocadoEdition_Light/adm/board_copy_update.php
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
<?php
|
||||
$sub_menu = '300100';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$target_table = trim($_POST['target_table']);
|
||||
$target_subject = trim($_POST['target_subject']);
|
||||
|
||||
if (!preg_match('/[A-Za-z0-9_]{1,20}/', $target_table)) {
|
||||
alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)');
|
||||
}
|
||||
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '$target_table' ");
|
||||
if ($row['cnt'])
|
||||
alert($target_table.'은(는) 이미 존재하는 게시판 테이블명 입니다.\\n복사할 테이블명으로 사용할 수 없습니다.');
|
||||
|
||||
// 게시판 테이블 생성
|
||||
$sql = get_table_define($g5['write_prefix'] . $bo_table);
|
||||
$sql = str_replace($g5['write_prefix'] . $bo_table, $g5['write_prefix'] . $target_table, $sql);
|
||||
sql_query($sql, false);
|
||||
|
||||
$file_copy = array();
|
||||
|
||||
// 구조만 복사시에는 공지사항 번호는 복사하지 않는다.
|
||||
if ($copy_case == 'schema_only') {
|
||||
$board['bo_notice'] = '';
|
||||
}
|
||||
|
||||
// 게시판 정보
|
||||
$sql = " insert into {$g5['board_table']}
|
||||
set bo_table = '$target_table',
|
||||
bo_type = '{$board['bo_type']}',
|
||||
gr_id = '{$board['gr_id']}',
|
||||
bo_subject = '$target_subject',
|
||||
bo_device = '{$board['bo_device']}',
|
||||
bo_admin = '{$board['bo_admin']}',
|
||||
bo_list_level = '{$board['bo_list_level']}',
|
||||
bo_read_level = '{$board['bo_read_level']}',
|
||||
bo_write_level = '{$board['bo_write_level']}',
|
||||
bo_reply_level = '{$board['bo_reply_level']}',
|
||||
bo_comment_level = '{$board['bo_comment_level']}',
|
||||
bo_upload_level = '{$board['bo_upload_level']}',
|
||||
bo_download_level = '{$board['bo_download_level']}',
|
||||
bo_html_level = '{$board['bo_html_level']}',
|
||||
bo_link_level = '{$board['bo_link_level']}',
|
||||
bo_count_modify = '{$board['bo_count_modify']}',
|
||||
bo_count_delete = '{$board['bo_count_delete']}',
|
||||
bo_read_point = '{$board['bo_read_point']}',
|
||||
bo_write_point = '{$board['bo_write_point']}',
|
||||
bo_comment_point = '{$board['bo_comment_point']}',
|
||||
bo_download_point = '{$board['bo_download_point']}',
|
||||
bo_use_category = '{$board['bo_use_category']}',
|
||||
bo_category_list = '{$board['bo_category_list']}',
|
||||
bo_use_sideview = '{$board['bo_use_sideview']}',
|
||||
bo_use_file_content = '{$board['bo_use_file_content']}',
|
||||
bo_use_secret = '{$board['bo_use_secret']}',
|
||||
bo_use_dhtml_editor = '{$board['bo_use_dhtml_editor']}',
|
||||
bo_use_rss_view = '{$board['bo_use_rss_view']}',
|
||||
bo_use_good = '{$board['bo_use_good']}',
|
||||
bo_use_nogood = '{$board['bo_use_nogood']}',
|
||||
bo_use_name = '{$board['bo_use_name']}',
|
||||
bo_use_signature = '{$board['bo_use_signature']}',
|
||||
bo_use_ip_view = '{$board['bo_use_ip_view']}',
|
||||
bo_use_list_view = '{$board['bo_use_list_view']}',
|
||||
bo_use_list_content = '{$board['bo_use_list_content']}',
|
||||
bo_table_width = '{$board['bo_table_width']}',
|
||||
bo_subject_len = '{$board['bo_subject_len']}',
|
||||
bo_mobile_subject_len = '{$board['bo_mobile_subject_len']}',
|
||||
bo_page_rows = '{$board['bo_page_rows']}',
|
||||
bo_mobile_page_rows = '{$board['bo_mobile_page_rows']}',
|
||||
bo_new = '{$board['bo_new']}',
|
||||
bo_hot = '{$board['bo_hot']}',
|
||||
bo_image_width = '{$board['bo_image_width']}',
|
||||
bo_skin = '{$board['bo_skin']}',
|
||||
bo_mobile_skin = '{$board['bo_mobile_skin']}',
|
||||
bo_include_head = '{$board['bo_include_head']}',
|
||||
bo_include_tail = '{$board['bo_include_tail']}',
|
||||
bo_content_head = '".addslashes($board['bo_content_head'])."',
|
||||
bo_content_tail = '".addslashes($board['bo_content_tail'])."',
|
||||
bo_mobile_content_head = '".addslashes($board['bo_mobile_content_head'])."',
|
||||
bo_mobile_content_tail = '".addslashes($board['bo_mobile_content_tail'])."',
|
||||
bo_insert_content = '".addslashes($board['bo_insert_content'])."',
|
||||
bo_gallery_cols = '{$board['bo_gallery_cols']}',
|
||||
bo_gallery_width = '{$board['bo_gallery_width']}',
|
||||
bo_gallery_height = '{$board['bo_gallery_height']}',
|
||||
bo_mobile_gallery_width = '{$board['bo_mobile_gallery_width']}',
|
||||
bo_mobile_gallery_height = '{$board['bo_mobile_gallery_height']}',
|
||||
bo_upload_size = '{$board['bo_upload_size']}',
|
||||
bo_reply_order = '{$board['bo_reply_order']}',
|
||||
bo_use_search = '{$board['bo_use_search']}',
|
||||
bo_order = '{$board['bo_order']}',
|
||||
bo_notice = '{$board['bo_notice']}',
|
||||
bo_upload_count = '{$board['bo_upload_count']}',
|
||||
bo_use_email = '{$board['bo_use_email']}',
|
||||
bo_use_cert = '{$board['bo_use_cert']}',
|
||||
bo_use_sns = '{$board['bo_use_sns']}',
|
||||
bo_sort_field = '{$board['bo_sort_field']}',
|
||||
bo_1_subj = '".addslashes($board['bo_1_subj'])."',
|
||||
bo_2_subj = '".addslashes($board['bo_2_subj'])."',
|
||||
bo_3_subj = '".addslashes($board['bo_3_subj'])."',
|
||||
bo_4_subj = '".addslashes($board['bo_4_subj'])."',
|
||||
bo_5_subj = '".addslashes($board['bo_5_subj'])."',
|
||||
bo_6_subj = '".addslashes($board['bo_6_subj'])."',
|
||||
bo_7_subj = '".addslashes($board['bo_7_subj'])."',
|
||||
bo_8_subj = '".addslashes($board['bo_8_subj'])."',
|
||||
bo_9_subj = '".addslashes($board['bo_9_subj'])."',
|
||||
bo_10_subj = '".addslashes($board['bo_10_subj'])."',
|
||||
bo_1 = '".addslashes($board['bo_1'])."',
|
||||
bo_2 = '".addslashes($board['bo_2'])."',
|
||||
bo_3 = '".addslashes($board['bo_3'])."',
|
||||
bo_4 = '".addslashes($board['bo_4'])."',
|
||||
bo_5 = '".addslashes($board['bo_5'])."',
|
||||
bo_6 = '".addslashes($board['bo_6'])."',
|
||||
bo_7 = '".addslashes($board['bo_7'])."',
|
||||
bo_8 = '".addslashes($board['bo_8'])."',
|
||||
bo_9 = '".addslashes($board['bo_9'])."',
|
||||
bo_10 = '".addslashes($board['bo_10'])."' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
// 게시판 폴더 생성
|
||||
@mkdir(G5_DATA_PATH.'/file/'.$target_table, G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH.'/file/'.$target_table, G5_DIR_PERMISSION);
|
||||
|
||||
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||
$board_path = G5_DATA_PATH.'/file/'.$target_table;
|
||||
$file = $board_path . '/index.php';
|
||||
$f = @fopen($file, 'w');
|
||||
@fwrite($f, '');
|
||||
@fclose($f);
|
||||
@chmod($file, G5_FILE_PERMISSION);
|
||||
|
||||
$copy_file = 0;
|
||||
if ($copy_case == 'schema_data_both') {
|
||||
$d = dir(G5_DATA_PATH.'/file/'.$bo_table);
|
||||
while ($entry = $d->read()) {
|
||||
if ($entry == '.' || $entry == '..') continue;
|
||||
|
||||
// 김선용 201007 :
|
||||
if(is_dir(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry)){
|
||||
$dd = dir(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry);
|
||||
@mkdir(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||
while ($entry2 = $dd->read()) {
|
||||
if ($entry2 == '.' || $entry2 == '..') continue;
|
||||
@copy(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry.'/'.$entry2, G5_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2);
|
||||
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2, G5_DIR_PERMISSION);
|
||||
$copy_file++;
|
||||
}
|
||||
$dd->close();
|
||||
}
|
||||
else {
|
||||
@copy(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry, G5_DATA_PATH.'/file/'.$target_table.'/'.$entry);
|
||||
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||
$copy_file++;
|
||||
}
|
||||
}
|
||||
$d->close();
|
||||
|
||||
// 글복사
|
||||
$sql = " insert into {$g5['write_prefix']}$target_table select * from {$g5['write_prefix']}$bo_table ";
|
||||
sql_query($sql, false);
|
||||
|
||||
// 게시글수 저장
|
||||
$sql = " select bo_count_write, bo_count_comment from {$g5['board_table']} where bo_table = '$bo_table' ";
|
||||
$row = sql_fetch($sql);
|
||||
$sql = " update {$g5['board_table']} set bo_count_write = '{$row['bo_count_write']}', bo_count_comment = '{$row['bo_count_comment']}' where bo_table = '$target_table' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
// 4.00.01
|
||||
// 위의 코드는 같은 테이블명을 사용하였다는 오류가 발생함. (희한하네 ㅡㅡ;)
|
||||
$sql = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' ";
|
||||
$result = sql_query($sql, false);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$file_copy[$i] = $row;
|
||||
}
|
||||
|
||||
if (count($file_copy)) {
|
||||
for ($i=0; $i<count($file_copy); $i++) {
|
||||
$sql = " insert into {$g5['board_file_table']}
|
||||
set bo_table = '$target_table',
|
||||
wr_id = '{$file_copy[$i]['wr_id']}',
|
||||
bf_no = '{$file_copy[$i]['bf_no']}',
|
||||
bf_source = '".addslashes($file_copy[$i]['bf_source'])."',
|
||||
bf_file = '{$file_copy[$i]['bf_file']}',
|
||||
bf_download = '{$file_copy[$i]['bf_download']}',
|
||||
bf_content = '".addslashes($file_copy[$i]['bf_content'])."',
|
||||
bf_filesize = '{$file_copy[$i]['bf_filesize']}',
|
||||
bf_width = '{$file_copy[$i]['bf_width']}',
|
||||
bf_height = '{$file_copy[$i]['bf_height']}',
|
||||
bf_type = '{$file_copy[$i]['bf_type']}',
|
||||
bf_datetime = '{$file_copy[$i]['bf_datetime']}' ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
}
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
delete_cache_latest($target_table);
|
||||
|
||||
echo "<script>opener.document.location.reload();</script>";
|
||||
|
||||
alert("복사에 성공 했습니다.", './board_copy.php?bo_table='.$bo_table.'&'.$qstr);
|
||||
?>
|
||||
33
AvocadoEdition_Light/adm/board_delete.inc.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
// board_delete.php , boardgroup_delete.php 에서 include 하는 파일
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
if (!defined('_BOARD_DELETE_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// $tmp_bo_table 에는 $bo_table 값을 넘겨주어야 함
|
||||
if (!$tmp_bo_table) { return; }
|
||||
|
||||
// 게시판 1개는 삭제 불가 (게시판 복사를 위해서)
|
||||
//$row = sql_fetch(" select count(*) as cnt from $g5['board_table'] ");
|
||||
//if ($row['cnt'] <= 1) { return; }
|
||||
|
||||
// 게시판 설정 삭제
|
||||
sql_query(" delete from {$g5['board_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||
|
||||
// 최신글 삭제
|
||||
sql_query(" delete from {$g5['board_new_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||
|
||||
// 스크랩 삭제
|
||||
sql_query(" delete from {$g5['scrap_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||
|
||||
// 파일 삭제
|
||||
sql_query(" delete from {$g5['board_file_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||
|
||||
// 게시판 테이블 DROP
|
||||
sql_query(" drop table {$g5['write_prefix']}{$tmp_bo_table} ", FALSE);
|
||||
|
||||
delete_cache_latest($tmp_bo_table);
|
||||
|
||||
// 게시판 폴더 전체 삭제
|
||||
rm_rf(G5_DATA_PATH.'/file/'.$tmp_bo_table);
|
||||
?>
|
||||
702
AvocadoEdition_Light/adm/board_form.php
Normal file
|
|
@ -0,0 +1,702 @@
|
|||
<?php
|
||||
$sub_menu = "300100";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['group_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row['cnt'])
|
||||
alert('게시판그룹이 한개 이상 생성되어야 합니다.', './boardgroup_form.php');
|
||||
|
||||
$html_title = '게시판';
|
||||
|
||||
if (!isset($board['bo_device'])) {
|
||||
// 게시판 사용 필드 추가
|
||||
// both : pc, mobile 둘다 사용
|
||||
// pc : pc 전용 사용
|
||||
// mobile : mobile 전용 사용
|
||||
// none : 사용 안함
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_mobile_skin'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_skin` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_gallery_width'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_gallery_width` INT NOT NULL AFTER `bo_gallery_cols`, ADD `bo_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_width`, ADD `bo_mobile_gallery_width` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_height`, ADD `bo_mobile_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_mobile_gallery_width` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_mobile_subject_len'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_subject_len` INT(11) NOT NULL DEFAULT '0' AFTER `bo_subject_len` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_mobile_page_rows'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_page_rows` INT(11) NOT NULL DEFAULT '0' AFTER `bo_page_rows` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_mobile_content_head'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_content_head` TEXT NOT NULL AFTER `bo_content_head`, ADD `bo_mobile_content_tail` TEXT NOT NULL AFTER `bo_content_tail`", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_use_cert'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_cert` ENUM('','cert','adult') NOT NULL DEFAULT '' AFTER `bo_use_email` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_use_sns'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_sns` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_cert` ", false);
|
||||
|
||||
$result = sql_query(" select bo_table from `{$g5['board_table']}` ");
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
sql_query(" ALTER TABLE `{$g5['write_prefix']}{$row['bo_table']}`
|
||||
ADD `wr_facebook_user` VARCHAR(255) NOT NULL DEFAULT '' AFTER `wr_ip`,
|
||||
ADD `wr_twitter_user` VARCHAR(255) NOT NULL DEFAULT '' AFTER `wr_facebook_user` ", false);
|
||||
}
|
||||
}
|
||||
|
||||
$sql = " SHOW COLUMNS FROM `{$g5['board_table']}` LIKE 'bo_use_cert' ";
|
||||
$row = sql_fetch($sql);
|
||||
if(strpos($row['Type'], 'hp-') === false) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` CHANGE `bo_use_cert` `bo_use_cert` ENUM('','cert','adult','hp-cert','hp-adult') NOT NULL DEFAULT '' ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_use_list_file'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_list_file` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_list_view` ", false);
|
||||
|
||||
$result = sql_query(" select bo_table from `{$g5['board_table']}` ");
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
sql_query(" ALTER TABLE `{$g5['write_prefix']}{$row['bo_table']}`
|
||||
ADD `wr_file` TINYINT NOT NULL DEFAULT '0' AFTER `wr_datetime` ", false);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($board['bo_mobile_subject'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_subject` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_subject` ", false);
|
||||
}
|
||||
|
||||
$required = "";
|
||||
$readonly = "";
|
||||
if ($w == '') {
|
||||
|
||||
$html_title .= ' 생성';
|
||||
|
||||
$required = 'required';
|
||||
$required_valid = 'alnum_';
|
||||
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||
|
||||
$board['bo_count_delete'] = 0;
|
||||
$board['bo_count_modify'] = 0;
|
||||
$board['bo_read_point'] = $config['cf_read_point'];
|
||||
$board['bo_write_point'] = $config['cf_write_point'];
|
||||
$board['bo_comment_point'] = $config['cf_comment_point'];
|
||||
$board['bo_download_point'] = $config['cf_download_point'];
|
||||
|
||||
$board['bo_gallery_height'] = 600;
|
||||
|
||||
$board['bo_page_rows'] = $config['cf_page_rows'];
|
||||
$board['bo_mobile_page_rows'] = $config['cf_page_rows'];
|
||||
$board['bo_subject_len'] = 60;
|
||||
$board['bo_mobile_subject_len'] = 30;
|
||||
$board['bo_new'] = 24;
|
||||
$board['bo_hot'] = 100;
|
||||
$board['bo_image_width'] = 600;
|
||||
$board['bo_upload_count'] = 0;
|
||||
$board['bo_upload_size'] = (int)ini_get("upload_max_filesize") * 1048576;
|
||||
$board['bo_reply_order'] = 1;
|
||||
$board['bo_use_search'] = 1;
|
||||
$board['bo_skin'] = 'basic';
|
||||
$board['bo_mobile_skin'] = 'basic';
|
||||
$board['gr_id'] = $gr_id;
|
||||
$board['bo_use_secret'] = 0;
|
||||
$board['bo_include_head'] = '_head.php';
|
||||
$board['bo_include_tail'] = '_tail.php';
|
||||
|
||||
} else if ($w == 'u') {
|
||||
|
||||
$html_title .= ' 수정';
|
||||
|
||||
if (!$board['bo_table'])
|
||||
alert('존재하지 않은 게시판 입니다.');
|
||||
|
||||
if ($is_admin == 'group') {
|
||||
if ($member['mb_id'] != $group['gr_admin'])
|
||||
alert('그룹이 틀립니다.');
|
||||
}
|
||||
|
||||
$readonly = 'readonly';
|
||||
|
||||
}
|
||||
|
||||
if ($is_admin != 'super') {
|
||||
$group = get_group($board['gr_id']);
|
||||
$is_admin = is_admin($member['mb_id']);
|
||||
}
|
||||
|
||||
$g5['title'] = $html_title;
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_001">기본 설정</a></li>
|
||||
<li><a href="#anc_002">권한 설정</a></li>
|
||||
<li><a href="#anc_003">기능 설정</a></li>
|
||||
<li><a href="#anc_004">디자인/양식</a></li>
|
||||
<li><a href="#anc_006">여분필드</a></li>
|
||||
</ul>';
|
||||
|
||||
?>
|
||||
|
||||
<form name="fboardform" id="fboardform" action="./board_form_update.php" onsubmit="return fboardform_submit(this)" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="">
|
||||
|
||||
<input type="hidden" name="bo_device" value="both">
|
||||
<input type="hidden" name="bo_link_level" value="1">
|
||||
<input type="hidden" name="bo_upload_level" value="1">
|
||||
<input type="hidden" name="bo_download_level" value="1">
|
||||
<input type="hidden" name="bo_html_level" value="1">
|
||||
<input type="hidden" name="bo_include_head" value="_head.php">
|
||||
<input type="hidden" name="bo_include_tail" value="_tail.php">
|
||||
<input type="hidden" name="bo_subject_len" value="120">
|
||||
<input type="hidden" name="bo_mobile_subject_len" value="120">
|
||||
<input type="hidden" name="bo_hot" value="0">
|
||||
|
||||
<input type="hidden" name="bo_count_modify" value="<?php echo $board['bo_count_modify'] ?>" />
|
||||
<input type="hidden" name="bo_count_delete" value="<?php echo $board['bo_count_delete'] ?>" />
|
||||
<input type="hidden" name="bo_new" value="<?php echo $board['bo_new'] ?>" />
|
||||
<input type="hidden" name="bo_reply_order" value="<?php echo $board['bo_reply_order'] ?>" />
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<a href="./board_list.php" title="목록" class="btn ty2"><span class="material-icons">list</span></a>
|
||||
<div class="btn">
|
||||
<span class="material-icons">save</span>
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section id="anc_001">
|
||||
<h2 class="h2_frm">게시판 기본 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>게시판 기본 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 150px;">
|
||||
<col>
|
||||
<col style="width: 180px;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_table">TABLE<?php echo $sound_only ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" name="bo_table" value="<?php echo $board['bo_table'] ?>" id="bo_table" <?php echo $required ?> <?php echo $readonly ?> class="frm_input <?php echo $reaonly ?> <?php echo $required ?> <?php echo $required_valid ?>" maxlength="20">
|
||||
<?php if ($w == '') { ?>
|
||||
영문자, 숫자, _ 만 가능 (공백없이 20자 이내)
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $board['bo_table'] ?>" class="btn_frmline">게시판 바로가기</a>
|
||||
<a href="./board_list.php" class="btn_frmline">목록으로</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="gr_id">그룹<strong class="sound_only">필수</strong></label></th>
|
||||
<td colspan="2">
|
||||
<?php echo get_group_select('gr_id', $board['gr_id'], 'required'); ?>
|
||||
<?php if ($w=='u') { ?><a href="javascript:document.location.href='./board_list.php?sfl=a.gr_id&stx='+document.fboardform.gr_id.value;" class="btn_frmline">동일그룹 게시판목록</a><?php } ?></td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_type">게시판 타입<strong class="sound_only">필수</strong></label></th>
|
||||
<td colspan="2">
|
||||
<select id="bo_type" name="bo_type">
|
||||
<option value="board" <?=$board['bo_type'] == 'board' ? "selected" : ""?>>일반게시판</option>
|
||||
<option value="mmb" <?=$board['bo_type'] == 'mmb' ? "selected" : ""?>>로드비 게시판</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_subject">게시판 제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" name="bo_subject" value="<?php echo get_text($board['bo_subject']) ?>" id="bo_subject" required class="required frm_input" size="80" maxlength="120">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_category_list">분류</label></th>
|
||||
<td>
|
||||
<?php echo help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])') ?>
|
||||
<input type="text" name="bo_category_list" value="<?php echo get_text($board['bo_category_list']) ?>" id="bo_category_list" class="frm_input" size="70">
|
||||
<input type="checkbox" name="bo_use_category" value="1" id="bo_use_category" <?php echo $board['bo_use_category']?'checked':''; ?>>
|
||||
<label for="bo_use_category">사용</label>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_category_list" value="1" id="chk_grp_category_list">
|
||||
<label for="chk_grp_category_list">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_category_list" value="1" id="chk_all_category_list">
|
||||
<label for="chk_all_category_list">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($w == 'u') { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="proc_count">카운트 조정</label></th>
|
||||
<td colspan="2">
|
||||
<?php echo help('현재 원글수 : '.number_format($board['bo_count_write']).', 현재 댓글수 : '.number_format($board['bo_count_comment'])."\n".'게시판 목록에서 글의 번호가 맞지 않을 경우에 체크하십시오.') ?>
|
||||
<input type="checkbox" name="proc_count" value="1" id="proc_count">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="anc_002">
|
||||
<h2 class="h2_frm">게시판 권한 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>게시판 권한 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 150px;">
|
||||
<col>
|
||||
<col style="width: 180px;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_list_level">목록보기 권한</label></th>
|
||||
<td>
|
||||
<?php echo get_member_level_select('bo_list_level', 1, 10, $board['bo_list_level']) ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_list_level" value="1" id="chk_grp_list_level">
|
||||
<label for="chk_grp_list_level">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_list_level" value="1" id="chk_all_list_level">
|
||||
<label for="chk_all_list_level">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_read_level">글읽기 권한</label></th>
|
||||
<td>
|
||||
<?php echo get_member_level_select('bo_read_level', 1, 10, $board['bo_read_level']) ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_read_level" value="1" id="chk_grp_read_level">
|
||||
<label for="chk_grp_read_level">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_read_level" value="1" id="chk_all_read_level">
|
||||
<label for="chk_all_read_level">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_write_level">글쓰기 권한</label></th>
|
||||
<td>
|
||||
<?php echo get_member_level_select('bo_write_level', 1, 10, $board['bo_write_level']) ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_write_level" value="1" id="chk_grp_write_level">
|
||||
<label for="chk_grp_write_level">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_write_level" value="1" id="chk_all_write_level">
|
||||
<label for="chk_all_write_level">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_reply_level">글답변 권한</label></th>
|
||||
<td>
|
||||
<?php echo get_member_level_select('bo_reply_level', 1, 10, $board['bo_reply_level']) ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_reply_level" value="1" id="chk_grp_reply_level">
|
||||
<label for="chk_grp_reply_level">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_reply_level" value="1" id="chk_all_reply_level">
|
||||
<label for="chk_all_reply_level">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_comment_level">댓글쓰기 권한</label></th>
|
||||
<td>
|
||||
<?php echo get_member_level_select('bo_comment_level', 1, 10, $board['bo_comment_level']) ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_comment_level" value="1" id="chk_grp_comment_level">
|
||||
<label for="chk_grp_comment_level">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_comment_level" value="1" id="chk_all_comment_level">
|
||||
<label for="chk_all_comment_level">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="anc_003">
|
||||
<h2 class="h2_frm">게시판 기능 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>게시판 기능 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 150px;">
|
||||
<col>
|
||||
<col style="width: 180px;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_use_secret">비밀글 사용</label></th>
|
||||
<td>
|
||||
<?php echo help('"체크박스"는 글작성시 비밀글 체크가 가능합니다. "무조건"은 작성되는 모든글을 비밀글로 작성합니다. (관리자는 체크박스로 출력합니다.) 스킨에 따라 적용되지 않을 수 있습니다.') ?>
|
||||
<select id="bo_use_secret" name="bo_use_secret">
|
||||
<?php echo option_selected(0, $board['bo_use_secret'], "사용하지 않음"); ?>
|
||||
<?php echo option_selected(1, $board['bo_use_secret'], "체크박스"); ?>
|
||||
<?php echo option_selected(2, $board['bo_use_secret'], "무조건"); ?>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_use_secret" value="1" id="chk_grp_use_secret">
|
||||
<label for="chk_grp_use_secret">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_use_secret" value="1" id="chk_all_use_secret">
|
||||
<label for="chk_all_use_secret">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_use_dhtml_editor">DHTML 에디터 사용</label></th>
|
||||
<td>
|
||||
<?php echo help('글작성시 내용을 DHTML 에디터 기능으로 사용할 것인지 설정합니다. 스킨에 따라 적용되지 않을 수 있습니다.') ?>
|
||||
<input type="checkbox" name="bo_use_dhtml_editor" value="1" <?php echo $board['bo_use_dhtml_editor']?'checked':''; ?> id="bo_use_dhtml_editor">
|
||||
사용
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_use_dhtml_editor" value="1" id="chk_grp_use_dhtml_editor">
|
||||
<label for="chk_grp_use_dhtml_editor">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_use_dhtml_editor" value="1" id="chk_all_use_dhtml_editor">
|
||||
<label for="chk_all_use_dhtml_editor">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_use_list_view">전체목록보이기 사용</label></th>
|
||||
<td>
|
||||
<input type="checkbox" name="bo_use_list_view" value="1" id="bo_use_list_view" <?php echo $board['bo_use_list_view']?'checked':''; ?>>
|
||||
사용
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_use_list_view" value="1" id="chk_grp_use_list_view">
|
||||
<label for="chk_grp_use_list_view">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_use_list_view" value="1" id="chk_all_use_list_view">
|
||||
<label for="chk_all_use_list_view">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_upload_count">파일 업로드 개수<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('게시물 한건당 업로드 할 수 있는 파일의 최대 개수 (0 은 파일첨부 사용하지 않음)') ?>
|
||||
<input type="text" name="bo_upload_count" value="<?php echo $board['bo_upload_count'] ?>" id="bo_upload_count" required class="required numeric frm_input" size="4">
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_upload_count" value="1" id="chk_grp_upload_count">
|
||||
<label for="chk_grp_upload_count">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_upload_count" value="1" id="chk_all_upload_count">
|
||||
<label for="chk_all_upload_count">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_upload_size">파일 업로드 용량<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('최대 '.ini_get("upload_max_filesize").' 이하 업로드 가능, 1 MB = 1,048,576 bytes') ?>
|
||||
업로드 파일 한개당 <input type="text" name="bo_upload_size" value="<?php echo $board['bo_upload_size'] ?>" id="bo_upload_size" required class="required numeric frm_input" size="10"> bytes 이하
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_upload_size" value="1" id="chk_grp_upload_size">
|
||||
<label for="chk_grp_upload_size">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_upload_size" value="1" id="chk_all_upload_size">
|
||||
<label for="chk_all_upload_size">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="anc_004">
|
||||
<h2 class="h2_frm">게시판 디자인/양식</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>게시판 디자인/양식</caption>
|
||||
<colgroup>
|
||||
<col style="width: 150px;">
|
||||
<col>
|
||||
<col style="width: 180px;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo get_skin_select('board', 'bo_skin', 'bo_skin', $board['bo_skin'], 'required'); ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_skin" value="1" id="chk_grp_skin">
|
||||
<label for="chk_grp_skin">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_skin" value="1" id="chk_all_skin">
|
||||
<label for="chk_all_skin">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
<input type="text" name="bo_include_head" value="<?php echo $board['bo_include_head'] ?>" id="bo_include_head" class="frm_input" size="50">
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_include_head" value="1" id="chk_grp_include_head">
|
||||
<label for="chk_grp_include_head">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_include_head" value="1" id="chk_all_include_head">
|
||||
<label for="chk_all_include_head">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_include_tail">하단 파일 경로</label></th>
|
||||
<td>
|
||||
<input type="text" name="bo_include_tail" value="<?php echo $board['bo_include_tail'] ?>" id="bo_include_tail" class="frm_input" size="50">
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_include_tail" value="1" id="chk_grp_include_tail">
|
||||
<label for="chk_grp_include_tail">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_include_tail" value="1" id="chk_all_include_tail">
|
||||
<label for="chk_all_include_tail">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_content_head">공지사항</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("bo_content_head", get_text($board['bo_content_head'], 0)); ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_content_head" value="1" id="chk_grp_content_head">
|
||||
<label for="chk_grp_content_head">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_content_head" value="1" id="chk_all_content_head">
|
||||
<label for="chk_all_content_head">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_insert_content">글쓰기 기본 내용</label></th>
|
||||
<td>
|
||||
<textarea id="bo_insert_content" name="bo_insert_content" rows="5"><?php echo $board['bo_insert_content'] ?></textarea>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_insert_content" value="1" id="chk_grp_insert_content">
|
||||
<label for="chk_grp_insert_content">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_insert_content" value="1" id="chk_all_insert_content">
|
||||
<label for="chk_all_insert_content">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_page_rows">페이지당 목록 수<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="bo_page_rows" value="<?php echo $board['bo_page_rows'] ?>" id="bo_page_rows" required class="required numeric frm_input" size="4">
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_page_rows" value="1" id="chk_grp_page_rows">
|
||||
<label for="chk_grp_page_rows">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_page_rows" value="1" id="chk_all_page_rows">
|
||||
<label for="chk_all_page_rows">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_image_width">이미지 폭 크기<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('일반 게시판에서 출력되는 이미지의 폭 크기') ?>
|
||||
<input type="text" name="bo_image_width" value="<?php echo $board['bo_image_width'] ?>" id="bo_image_width" required class="required numeric frm_input" size="4"> 픽셀
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_image_width" value="1" id="chk_grp_image_width">
|
||||
<label for="chk_grp_image_width">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_image_width" value="1" id="chk_all_image_width">
|
||||
<label for="chk_all_image_width">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_gallery_height">로그접기 세로기준<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('자비란 형태의 게시판에서만 적용됩니다.') ?>
|
||||
<input type="text" name="bo_gallery_height" value="<?php echo $board['bo_gallery_height'] ?>" id="bo_gallery_height" required class="required numeric frm_input" size="4"> 픽셀
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_gallery_height" value="1" id="chk_grp_gallery_height">
|
||||
<label for="chk_grp_gallery_height">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_gallery_height" value="1" id="chk_all_gallery_height">
|
||||
<label for="chk_all_gallery_height">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_sort_field">리스트 정렬 필드</label></th>
|
||||
<td>
|
||||
<?php echo help('리스트에서 기본으로 정렬에 사용할 필드를 선택합니다. "기본"으로 사용하지 않으시는 경우 속도가 느려질 수 있습니다.') ?>
|
||||
<select id="bo_sort_field" name="bo_sort_field">
|
||||
<option value="" <?php echo get_selected($board['bo_sort_field'], ""); ?>>wr_num, wr_reply : 기본</option>
|
||||
<option value="wr_datetime asc" <?php echo get_selected($board['bo_sort_field'], "wr_datetime asc"); ?>>wr_datetime asc : 날짜 이전것 부터</option>
|
||||
<option value="wr_datetime desc" <?php echo get_selected($board['bo_sort_field'], "wr_datetime desc"); ?>>wr_datetime desc : 날짜 최근것 부터</option>
|
||||
<option value="wr_hit asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_hit asc, wr_num, wr_reply"); ?>>wr_hit asc : 조회수 낮은것 부터</option>
|
||||
<option value="wr_hit desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_hit desc, wr_num, wr_reply"); ?>>wr_hit desc : 조회수 높은것 부터</option>
|
||||
<option value="wr_last asc" <?php echo get_selected($board['bo_sort_field'], "wr_last asc"); ?>>wr_last asc : 최근글 이전것 부터</option>
|
||||
<option value="wr_last desc" <?php echo get_selected($board['bo_sort_field'], "wr_last desc"); ?>>wr_last desc : 최근글 최근것 부터</option>
|
||||
<option value="wr_comment asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_comment asc, wr_num, wr_reply"); ?>>wr_comment asc : 댓글수 낮은것 부터</option>
|
||||
<option value="wr_comment desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_comment desc, wr_num, wr_reply"); ?>>wr_comment desc : 댓글수 높은것 부터</option>
|
||||
<option value="wr_good asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_good asc, wr_num, wr_reply"); ?>>wr_good asc : 추천수 낮은것 부터</option>
|
||||
<option value="wr_good desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_good desc, wr_num, wr_reply"); ?>>wr_good desc : 추천수 높은것 부터</option>
|
||||
<option value="wr_nogood asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_nogood asc, wr_num, wr_reply"); ?>>wr_nogood asc : 비추천수 낮은것 부터</option>
|
||||
<option value="wr_nogood desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_nogood desc, wr_num, wr_reply"); ?>>wr_nogood desc : 비추천수 높은것 부터</option>
|
||||
<option value="wr_subject asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_subject asc, wr_num, wr_reply"); ?>>wr_subject asc : 제목 오름차순</option>
|
||||
<option value="wr_subject desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_subject desc, wr_num, wr_reply"); ?>>wr_subject desc : 제목 내림차순</option>
|
||||
<option value="wr_name asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_name asc, wr_num, wr_reply"); ?>>wr_name asc : 글쓴이 오름차순</option>
|
||||
<option value="wr_name desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_name desc, wr_num, wr_reply"); ?>>wr_name desc : 글쓴이 내림차순</option>
|
||||
<option value="ca_name asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "ca_name asc, wr_num, wr_reply"); ?>>ca_name asc : 분류명 오름차순</option>
|
||||
<option value="ca_name desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "ca_name desc, wr_num, wr_reply"); ?>>ca_name desc : 분류명 내림차순</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_sort_field" value="1" id="chk_grp_sort_field">
|
||||
<label for="chk_grp_sort_field">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_sort_field" value="1" id="chk_all_sort_field">
|
||||
<label for="chk_all_sort_field">전체적용</label>
|
||||
</td>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="anc_006">
|
||||
<h2 class="h2_frm">게시판 여분필드 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>게시판 여분필드 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 150px;">
|
||||
<col>
|
||||
<col style="width: 180px;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||
<tr>
|
||||
<th scope="row">여분필드<?php echo $i ?></th>
|
||||
<td class="td_extra">
|
||||
<label for="bo_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
||||
<input type="text" name="bo_<?php echo $i ?>_subj" id="bo_<?php echo $i ?>_subj" value="<?php echo get_text($board['bo_'.$i.'_subj']) ?>" class="frm_input">
|
||||
<label for="bo_<?php echo $i ?>">여분필드 <?php echo $i ?> 값</label>
|
||||
<input type="text" name="bo_<?php echo $i ?>" value="<?php echo get_text($board['bo_'.$i]) ?>" id="bo_<?php echo $i ?>" class="frm_input">
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_<?php echo $i ?>" value="1" id="chk_grp_<?php echo $i ?>">
|
||||
<label for="chk_grp_<?php echo $i ?>">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_<?php echo $i ?>" value="1" id="chk_all_<?php echo $i ?>">
|
||||
<label for="chk_all_<?php echo $i ?>">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$("#board_copy").click(function(){
|
||||
window.open(this.href, "win_board_copy", "left=10,top=10,width=500,height=400");
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".get_theme_galc").on("click", function() {
|
||||
if(!confirm("현재 테마의 게시판 이미지 설정을 적용하시겠습니까?"))
|
||||
return false;
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "./theme_config_load.php",
|
||||
cache: false,
|
||||
async: false,
|
||||
data: { type: "board" },
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
}
|
||||
|
||||
var field = Array('bo_gallery_cols', 'bo_gallery_width', 'bo_gallery_height', 'bo_mobile_gallery_width', 'bo_mobile_gallery_height', 'bo_image_width');
|
||||
var count = field.length;
|
||||
var key;
|
||||
|
||||
for(i=0; i<count; i++) {
|
||||
key = field[i];
|
||||
|
||||
if(data[key] != undefined && data[key] != "")
|
||||
$("input[name="+key+"]").val(data[key]);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function board_copy(bo_table) {
|
||||
window.open("./board_copy.php?bo_table="+bo_table, "BoardCopy", "left=10,top=10,width=500,height=200");
|
||||
}
|
||||
|
||||
function set_point(f) {
|
||||
if (f.chk_grp_point.checked) {
|
||||
f.bo_read_point.value = "<?php echo $config['cf_read_point'] ?>";
|
||||
f.bo_write_point.value = "<?php echo $config['cf_write_point'] ?>";
|
||||
f.bo_comment_point.value = "<?php echo $config['cf_comment_point'] ?>";
|
||||
f.bo_download_point.value = "<?php echo $config['cf_download_point'] ?>";
|
||||
} else {
|
||||
f.bo_read_point.value = f.bo_read_point.defaultValue;
|
||||
f.bo_write_point.value = f.bo_write_point.defaultValue;
|
||||
f.bo_comment_point.value = f.bo_comment_point.defaultValue;
|
||||
f.bo_download_point.value = f.bo_download_point.defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
function fboardform_submit(f)
|
||||
{
|
||||
<?php echo get_editor_js("bo_content_head"); ?>
|
||||
<?php echo get_editor_js("bo_content_tail"); ?>
|
||||
<?php echo get_editor_js("bo_mobile_content_head"); ?>
|
||||
<?php echo get_editor_js("bo_mobile_content_tail"); ?>
|
||||
|
||||
if (parseInt(f.bo_count_modify.value) < 0) {
|
||||
alert("원글 수정 불가 댓글수는 0 이상 입력하셔야 합니다.");
|
||||
f.bo_count_modify.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (parseInt(f.bo_count_delete.value) < 1) {
|
||||
alert("원글 삭제 불가 댓글수는 1 이상 입력하셔야 합니다.");
|
||||
f.bo_count_delete.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
411
AvocadoEdition_Light/adm/board_form_update.php
Normal file
|
|
@ -0,0 +1,411 @@
|
|||
<?php
|
||||
$sub_menu = "300100";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == 'u')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
if (!$_POST['gr_id']) { alert('그룹 ID는 반드시 선택하세요.'); }
|
||||
if (!$bo_table) { alert('게시판 TABLE명은 반드시 입력하세요.'); }
|
||||
if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) { alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)'); }
|
||||
if (!$_POST['bo_subject']) { alert('게시판 제목을 입력하세요.'); }
|
||||
|
||||
$_POST['bo_include_head'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_head'], 0, 255));
|
||||
$_POST['bo_include_tail'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_tail'], 0, 255));
|
||||
|
||||
if ($file = $_POST['bo_include_head']) {
|
||||
$purl = parse_url($file);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('상단 파일 경로가 php, html 파일이 아닙니다.');
|
||||
}
|
||||
$_POST['bo_include_head'] = $file;
|
||||
}
|
||||
|
||||
if ($file = $_POST['bo_include_tail']) {
|
||||
$purl = parse_url($file);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('하단 파일 경로가 php, html 파일이 아닙니다.');
|
||||
}
|
||||
$_POST['bo_include_tail'] = $file;
|
||||
}
|
||||
|
||||
if(!is_include_path_check($_POST['bo_include_head'])) {
|
||||
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.');
|
||||
}
|
||||
|
||||
if(!is_include_path_check($_POST['bo_include_tail'])) {
|
||||
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.');
|
||||
}
|
||||
|
||||
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
|
||||
|
||||
// 게시판 디렉토리 생성
|
||||
@mkdir($board_path, G5_DIR_PERMISSION);
|
||||
@chmod($board_path, G5_DIR_PERMISSION);
|
||||
|
||||
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||
$file = $board_path . '/index.php';
|
||||
$f = @fopen($file, 'w');
|
||||
@fwrite($f, '');
|
||||
@fclose($f);
|
||||
@chmod($file, G5_FILE_PERMISSION);
|
||||
|
||||
// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다.
|
||||
$src_char = array('&', '=');
|
||||
$dst_char = array('&', '〓');
|
||||
$bo_category_list = str_replace($src_char, $dst_char, $bo_category_list);
|
||||
|
||||
$sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||
bo_subject = '{$_POST['bo_subject']}',
|
||||
bo_type = '{$_POST['bo_type']}',
|
||||
bo_mobile_subject = '{$_POST['bo_mobile_subject']}',
|
||||
bo_device = '{$_POST['bo_device']}',
|
||||
bo_admin = '{$_POST['bo_admin']}',
|
||||
bo_list_level = '{$_POST['bo_list_level']}',
|
||||
bo_read_level = '{$_POST['bo_read_level']}',
|
||||
bo_write_level = '{$_POST['bo_write_level']}',
|
||||
bo_reply_level = '{$_POST['bo_reply_level']}',
|
||||
bo_comment_level = '{$_POST['bo_comment_level']}',
|
||||
bo_html_level = '{$_POST['bo_html_level']}',
|
||||
bo_link_level = '{$_POST['bo_link_level']}',
|
||||
bo_count_modify = '{$_POST['bo_count_modify']}',
|
||||
bo_count_delete = '{$_POST['bo_count_delete']}',
|
||||
bo_upload_level = '{$_POST['bo_upload_level']}',
|
||||
bo_download_level = '{$_POST['bo_download_level']}',
|
||||
bo_read_point = '{$_POST['bo_read_point']}',
|
||||
bo_write_point = '{$_POST['bo_write_point']}',
|
||||
bo_comment_point = '{$_POST['bo_comment_point']}',
|
||||
bo_download_point = '{$_POST['bo_download_point']}',
|
||||
bo_use_category = '{$_POST['bo_use_category']}',
|
||||
bo_category_list = '{$_POST['bo_category_list']}',
|
||||
bo_use_sideview = '{$_POST['bo_use_sideview']}',
|
||||
bo_use_file_content = '{$_POST['bo_use_file_content']}',
|
||||
bo_use_secret = '{$_POST['bo_use_secret']}',
|
||||
bo_use_dhtml_editor = '{$_POST['bo_use_dhtml_editor']}',
|
||||
bo_use_rss_view = '{$_POST['bo_use_rss_view']}',
|
||||
bo_use_good = '{$_POST['bo_use_good']}',
|
||||
bo_use_nogood = '{$_POST['bo_use_nogood']}',
|
||||
bo_use_name = '{$_POST['bo_use_name']}',
|
||||
bo_use_signature = '{$_POST['bo_use_signature']}',
|
||||
bo_use_ip_view = '{$_POST['bo_use_ip_view']}',
|
||||
bo_use_list_view = '{$_POST['bo_use_list_view']}',
|
||||
bo_use_list_file = '{$_POST['bo_use_list_file']}',
|
||||
bo_use_list_content = '{$_POST['bo_use_list_content']}',
|
||||
bo_use_email = '{$_POST['bo_use_email']}',
|
||||
bo_use_cert = '{$_POST['bo_use_cert']}',
|
||||
bo_use_sns = '{$_POST['bo_use_sns']}',
|
||||
bo_table_width = '{$_POST['bo_table_width']}',
|
||||
bo_subject_len = '{$_POST['bo_subject_len']}',
|
||||
bo_mobile_subject_len = '{$_POST['bo_mobile_subject_len']}',
|
||||
bo_page_rows = '{$_POST['bo_page_rows']}',
|
||||
bo_mobile_page_rows = '{$_POST['bo_mobile_page_rows']}',
|
||||
bo_new = '{$_POST['bo_new']}',
|
||||
bo_hot = '{$_POST['bo_hot']}',
|
||||
bo_image_width = '{$_POST['bo_image_width']}',
|
||||
bo_skin = '{$_POST['bo_skin']}',
|
||||
bo_mobile_skin = '{$_POST['bo_mobile_skin']}',
|
||||
bo_include_head = '{$_POST['bo_include_head']}',
|
||||
bo_include_tail = '{$_POST['bo_include_tail']}',
|
||||
bo_content_head = '{$_POST['bo_content_head']}',
|
||||
bo_content_tail = '{$_POST['bo_content_tail']}',
|
||||
bo_mobile_content_head = '{$_POST['bo_mobile_content_head']}',
|
||||
bo_mobile_content_tail = '{$_POST['bo_mobile_content_tail']}',
|
||||
bo_insert_content = '{$_POST['bo_insert_content']}',
|
||||
bo_gallery_cols = '{$_POST['bo_gallery_cols']}',
|
||||
bo_gallery_width = '{$_POST['bo_gallery_width']}',
|
||||
bo_gallery_height = '{$_POST['bo_gallery_height']}',
|
||||
bo_mobile_gallery_width = '{$_POST['bo_mobile_gallery_width']}',
|
||||
bo_mobile_gallery_height= '{$_POST['bo_mobile_gallery_height']}',
|
||||
bo_upload_count = '{$_POST['bo_upload_count']}',
|
||||
bo_upload_size = '{$_POST['bo_upload_size']}',
|
||||
bo_reply_order = '{$_POST['bo_reply_order']}',
|
||||
bo_use_search = '{$_POST['bo_use_search']}',
|
||||
bo_order = '{$_POST['bo_order']}',
|
||||
bo_write_min = '{$_POST['bo_write_min']}',
|
||||
bo_write_max = '{$_POST['bo_write_max']}',
|
||||
bo_comment_min = '{$_POST['bo_comment_min']}',
|
||||
bo_comment_max = '{$_POST['bo_comment_max']}',
|
||||
bo_use_chick = '{$_POST['bo_use_chick']}',
|
||||
bo_use_noname = '{$_POST['bo_use_noname']}',
|
||||
bo_sort_field = '{$_POST['bo_sort_field']}',
|
||||
bo_1_subj = '{$_POST['bo_1_subj']}',
|
||||
bo_2_subj = '{$_POST['bo_2_subj']}',
|
||||
bo_3_subj = '{$_POST['bo_3_subj']}',
|
||||
bo_4_subj = '{$_POST['bo_4_subj']}',
|
||||
bo_5_subj = '{$_POST['bo_5_subj']}',
|
||||
bo_6_subj = '{$_POST['bo_6_subj']}',
|
||||
bo_7_subj = '{$_POST['bo_7_subj']}',
|
||||
bo_8_subj = '{$_POST['bo_8_subj']}',
|
||||
bo_9_subj = '{$_POST['bo_9_subj']}',
|
||||
bo_10_subj = '{$_POST['bo_10_subj']}',
|
||||
bo_1 = '{$_POST['bo_1']}',
|
||||
bo_2 = '{$_POST['bo_2']}',
|
||||
bo_3 = '{$_POST['bo_3']}',
|
||||
bo_4 = '{$_POST['bo_4']}',
|
||||
bo_5 = '{$_POST['bo_5']}',
|
||||
bo_6 = '{$_POST['bo_6']}',
|
||||
bo_7 = '{$_POST['bo_7']}',
|
||||
bo_8 = '{$_POST['bo_8']}',
|
||||
bo_9 = '{$_POST['bo_9']}',
|
||||
bo_10 = '{$_POST['bo_10']}' ";
|
||||
|
||||
if ($w == '') {
|
||||
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '{$bo_table}' ");
|
||||
if ($row['cnt'])
|
||||
alert($bo_table.' 은(는) 이미 존재하는 TABLE 입니다.');
|
||||
|
||||
$sql = " insert into {$g5['board_table']}
|
||||
set bo_table = '{$bo_table}',
|
||||
bo_count_write = '0',
|
||||
bo_count_comment = '0',
|
||||
$sql_common ";
|
||||
sql_query($sql);
|
||||
|
||||
// 게시판 테이블 생성
|
||||
$file = file('./sql_write.sql');
|
||||
$sql = implode($file, "\n");
|
||||
|
||||
$create_table = $g5['write_prefix'] . $bo_table;
|
||||
|
||||
// sql_board.sql 파일의 테이블명을 변환
|
||||
$source = array('/__TABLE_NAME__/', '/;/');
|
||||
$target = array($create_table, '');
|
||||
$sql = preg_replace($source, $target, $sql);
|
||||
sql_query($sql, FALSE);
|
||||
|
||||
} else if ($w == 'u') {
|
||||
|
||||
// 게시판의 글 수
|
||||
$sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
|
||||
$row = sql_fetch($sql);
|
||||
$bo_count_write = $row['cnt'];
|
||||
|
||||
// 게시판의 코멘트 수
|
||||
$sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 1 ";
|
||||
$row = sql_fetch($sql);
|
||||
$bo_count_comment = $row['cnt'];
|
||||
|
||||
// 글수 조정
|
||||
/*
|
||||
엔피씨님의 팁으로 교체합니다. 130308
|
||||
http://sir.kr/g5_tiptech/27207
|
||||
*/
|
||||
if (isset($_POST['proc_count'])) {
|
||||
// 원글을 얻습니다.
|
||||
//$sql = " select wr_id from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
|
||||
$sql = " select a.wr_id, (count(b.wr_parent) - 1) as cnt from {$g5['write_prefix']}{$bo_table} a, {$g5['write_prefix']}{$bo_table} b where a.wr_id=b.wr_parent and a.wr_is_comment=0 group by a.wr_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
/*
|
||||
// 코멘트수를 얻습니다.
|
||||
$sql2 = " select count(*) as cnt from {$g5['write_prefix']}$bo_table where wr_parent = '{$row['wr_id']}' and wr_is_comment = 1 ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
*/
|
||||
|
||||
sql_query(" update {$g5['write_prefix']}{$bo_table} set wr_comment = '{$row['cnt']}' where wr_id = '{$row['wr_id']}' ");
|
||||
}
|
||||
}
|
||||
|
||||
// 공지사항에는 등록되어 있지만 실제 존재하지 않는 글 아이디는 삭제합니다.
|
||||
$bo_notice = "";
|
||||
$lf = "";
|
||||
if ($board['bo_notice']) {
|
||||
$tmp_array = explode(",", $board['bo_notice']);
|
||||
for ($i=0; $i<count($tmp_array); $i++) {
|
||||
$tmp_wr_id = trim($tmp_array[$i]);
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_id = '{$tmp_wr_id}' ");
|
||||
if ($row['cnt'])
|
||||
{
|
||||
$bo_notice .= $lf . $tmp_wr_id;
|
||||
$lf = ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sql = " update {$g5['board_table']}
|
||||
set bo_notice = '{$bo_notice}',
|
||||
bo_count_write = '{$bo_count_write}',
|
||||
bo_count_comment = '{$bo_count_comment}',
|
||||
{$sql_common}
|
||||
where bo_table = '{$bo_table}' ";
|
||||
sql_query($sql);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 같은 그룹내 게시판 동일 옵션 적용
|
||||
$grp_fields = '';
|
||||
if (is_checked('chk_grp_device')) $grp_fields .= " , bo_device = '{$bo_device}' ";
|
||||
if (is_checked('chk_grp_admin')) $grp_fields .= " , bo_admin = '{$bo_admin}' ";
|
||||
if (is_checked('chk_grp_list_level')) $grp_fields .= " , bo_list_level = '{$bo_list_level}' ";
|
||||
if (is_checked('chk_grp_read_level')) $grp_fields .= " , bo_read_level = '{$bo_read_level}' ";
|
||||
if (is_checked('chk_grp_write_level')) $grp_fields .= " , bo_write_level = '{$bo_write_level}' ";
|
||||
if (is_checked('chk_grp_reply_level')) $grp_fields .= " , bo_reply_level = '{$bo_reply_level}' ";
|
||||
if (is_checked('chk_grp_comment_level')) $grp_fields .= " , bo_comment_level = '{$bo_comment_level}' ";
|
||||
if (is_checked('chk_grp_link_level')) $grp_fields .= " , bo_link_level = '{$bo_link_level}' ";
|
||||
if (is_checked('chk_grp_upload_level')) $grp_fields .= " , bo_upload_level = '{$bo_upload_level}' ";
|
||||
if (is_checked('chk_grp_download_level')) $grp_fields .= " , bo_download_level = '{$bo_download_level}' ";
|
||||
if (is_checked('chk_grp_html_level')) $grp_fields .= " , bo_html_level = '{$bo_html_level}' ";
|
||||
if (is_checked('chk_grp_count_modify')) $grp_fields .= " , bo_count_modify = '{$bo_count_modify}' ";
|
||||
if (is_checked('chk_grp_count_delete')) $grp_fields .= " , bo_count_delete = '{$bo_count_delete}' ";
|
||||
if (is_checked('chk_grp_read_point')) $grp_fields .= " , bo_read_point = '{$bo_read_point}' ";
|
||||
if (is_checked('chk_grp_write_point')) $grp_fields .= " , bo_write_point = '{$bo_write_point}' ";
|
||||
if (is_checked('chk_grp_comment_point')) $grp_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
||||
if (is_checked('chk_grp_download_point')) $grp_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
||||
if (is_checked('chk_grp_category_list')) {
|
||||
$grp_fields .= " , bo_category_list = '{$bo_category_list}' ";
|
||||
$grp_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
||||
}
|
||||
if (is_checked('chk_grp_use_sideview')) $grp_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
||||
if (is_checked('chk_grp_use_file_content')) $grp_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
||||
if (is_checked('chk_grp_use_secret')) $grp_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
||||
if (is_checked('chk_grp_use_dhtml_editor')) $grp_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
||||
if (is_checked('chk_grp_use_rss_view')) $grp_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
||||
if (is_checked('chk_grp_use_good')) $grp_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
||||
if (is_checked('chk_grp_use_nogood')) $grp_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
||||
if (is_checked('chk_grp_use_name')) $grp_fields .= " , bo_use_name = '{$bo_use_name}' ";
|
||||
if (is_checked('chk_grp_use_signature')) $grp_fields .= " , bo_use_signature = '{$bo_use_signature}' ";
|
||||
if (is_checked('chk_grp_use_ip_view')) $grp_fields .= " , bo_use_ip_view = '{$bo_use_ip_view}' ";
|
||||
if (is_checked('chk_grp_use_list_view')) $grp_fields .= " , bo_use_list_view = '{$bo_use_list_view}' ";
|
||||
if (is_checked('chk_grp_use_list_file')) $grp_fields .= " , bo_use_list_file = '{$bo_use_list_file}' ";
|
||||
if (is_checked('chk_grp_use_list_content')) $grp_fields .= " , bo_use_list_content = '{$bo_use_list_content}' ";
|
||||
if (is_checked('chk_grp_use_email')) $grp_fields .= " , bo_use_email = '{$bo_use_email}' ";
|
||||
if (is_checked('chk_grp_use_cert')) $grp_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
|
||||
if (is_checked('chk_grp_use_sns')) $grp_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
|
||||
if (is_checked('chk_grp_skin')) $grp_fields .= " , bo_skin = '{$bo_skin}' ";
|
||||
if (is_checked('chk_grp_mobile_skin')) $grp_fields .= " , bo_mobile_skin = '{$bo_mobile_skin}' ";
|
||||
if (is_checked('chk_grp_gallery_cols')) $grp_fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
|
||||
if (is_checked('chk_grp_gallery_width')) $grp_fields .= " , bo_gallery_width = '{$bo_gallery_width}' ";
|
||||
if (is_checked('chk_grp_gallery_height')) $grp_fields .= " , bo_gallery_height = '{$bo_gallery_height}' ";
|
||||
if (is_checked('chk_grp_mobile_gallery_width')) $grp_fields .= " , bo_mobile_gallery_width = '{$bo_mobile_gallery_width}' ";
|
||||
if (is_checked('chk_grp_mobile_gallery_height'))$grp_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
|
||||
if (is_checked('chk_grp_table_width')) $grp_fields .= " , bo_table_width = '{$bo_table_width}' ";
|
||||
if (is_checked('chk_grp_page_rows')) $grp_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
|
||||
if (is_checked('chk_grp_mobile_page_rows')) $grp_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
|
||||
if (is_checked('chk_grp_subject_len')) $grp_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
|
||||
if (is_checked('chk_grp_mobile_subject_len')) $grp_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
|
||||
if (is_checked('chk_grp_new')) $grp_fields .= " , bo_new = '{$bo_new}' ";
|
||||
if (is_checked('chk_grp_hot')) $grp_fields .= " , bo_hot = '{$bo_hot}' ";
|
||||
if (is_checked('chk_grp_image_width')) $grp_fields .= " , bo_image_width = '{$bo_image_width}' ";
|
||||
if (is_checked('chk_grp_reply_order')) $grp_fields .= " , bo_reply_order = '{$bo_reply_order}' ";
|
||||
if (is_checked('chk_grp_sort_field')) $grp_fields .= " , bo_sort_field = '{$bo_sort_field}' ";
|
||||
if (is_checked('chk_grp_write_min')) $grp_fields .= " , bo_write_min = '{$bo_write_min}' ";
|
||||
if (is_checked('chk_grp_write_max')) $grp_fields .= " , bo_write_max = '{$bo_write_max}' ";
|
||||
if (is_checked('chk_grp_comment_min')) $grp_fields .= " , bo_comment_min = '{$bo_comment_min}' ";
|
||||
if (is_checked('chk_grp_comment_max')) $grp_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
||||
if (is_checked('chk_grp_upload_count')) $grp_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
||||
if (is_checked('chk_grp_upload_size')) $grp_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
||||
if (is_checked('chk_grp_include_head')) $grp_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||
if (is_checked('chk_grp_include_tail')) $grp_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||
if (is_checked('chk_grp_content_head')) $grp_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||
if (is_checked('chk_grp_content_tail')) $grp_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||
if (is_checked('chk_grp_mobile_content_head')) $grp_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||
if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||
if (is_checked('chk_grp_insert_content')) $grp_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
||||
if (is_checked('chk_grp_use_search')) $grp_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
||||
if (is_checked('chk_grp_order')) $grp_fields .= " , bo_order = '{$bo_order}' ";
|
||||
for ($i=1; $i<=10; $i++) {
|
||||
if (is_checked('chk_grp_'.$i)) {
|
||||
$grp_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
|
||||
$grp_fields .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
|
||||
}
|
||||
}
|
||||
|
||||
if ($grp_fields) {
|
||||
sql_query(" update {$g5['board_table']} set bo_table = bo_table {$grp_fields} where gr_id = '$gr_id' ");
|
||||
}
|
||||
|
||||
|
||||
// 모든 게시판 동일 옵션 적용
|
||||
$all_fields = '';
|
||||
if (is_checked('chk_all_device')) $all_fields .= " , bo_device = '{$bo_device}' ";
|
||||
if (is_checked('chk_all_admin')) $all_fields .= " , bo_admin = '{$bo_admin}' ";
|
||||
if (is_checked('chk_all_list_level')) $all_fields .= " , bo_list_level = '{$bo_list_level}' ";
|
||||
if (is_checked('chk_all_read_level')) $all_fields .= " , bo_read_level = '{$bo_read_level}' ";
|
||||
if (is_checked('chk_all_write_level')) $all_fields .= " , bo_write_level = '{$bo_write_level}' ";
|
||||
if (is_checked('chk_all_reply_level')) $all_fields .= " , bo_reply_level = '{$bo_reply_level}' ";
|
||||
if (is_checked('chk_all_comment_level')) $all_fields .= " , bo_comment_level = '{$bo_comment_level}' ";
|
||||
if (is_checked('chk_all_link_level')) $all_fields .= " , bo_link_level = '{$bo_link_level}' ";
|
||||
if (is_checked('chk_all_upload_level')) $all_fields .= " , bo_upload_level = '{$bo_upload_level}' ";
|
||||
if (is_checked('chk_all_download_level')) $all_fields .= " , bo_download_level = '{$bo_download_level}' ";
|
||||
if (is_checked('chk_all_html_level')) $all_fields .= " , bo_html_level = '{$bo_html_level}' ";
|
||||
if (is_checked('chk_all_count_modify')) $all_fields .= " , bo_count_modify = '{$bo_count_modify}' ";
|
||||
if (is_checked('chk_all_count_delete')) $all_fields .= " , bo_count_delete = '{$bo_count_delete}' ";
|
||||
if (is_checked('chk_all_read_point')) $all_fields .= " , bo_read_point = '{$bo_read_point}' ";
|
||||
if (is_checked('chk_all_write_point')) $all_fields .= " , bo_write_point = '{$bo_write_point}' ";
|
||||
if (is_checked('chk_all_comment_point')) $all_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
||||
if (is_checked('chk_all_download_point')) $all_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
||||
if (is_checked('chk_all_category_list')) {
|
||||
$all_fields .= " , bo_category_list = '{$bo_category_list}' ";
|
||||
$all_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
||||
}
|
||||
if (is_checked('chk_all_use_sideview')) $all_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
||||
if (is_checked('chk_all_use_file_content')) $all_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
||||
if (is_checked('chk_all_use_secret')) $all_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
||||
if (is_checked('chk_all_use_dhtml_editor')) $all_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
||||
if (is_checked('chk_all_use_rss_view')) $all_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
||||
if (is_checked('chk_all_use_good')) $all_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
||||
if (is_checked('chk_all_use_nogood')) $all_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
||||
if (is_checked('chk_all_use_name')) $all_fields .= " , bo_use_name = '{$bo_use_name}' ";
|
||||
if (is_checked('chk_all_use_signature')) $all_fields .= " , bo_use_signature = '{$bo_use_signature}' ";
|
||||
if (is_checked('chk_all_use_ip_view')) $all_fields .= " , bo_use_ip_view = '{$bo_use_ip_view}' ";
|
||||
if (is_checked('chk_all_use_list_view')) $all_fields .= " , bo_use_list_view = '{$bo_use_list_view}' ";
|
||||
if (is_checked('chk_all_use_list_file')) $all_fields .= " , bo_use_list_file = '{$bo_use_list_file}' ";
|
||||
if (is_checked('chk_all_use_list_content')) $all_fields .= " , bo_use_list_content = '{$bo_use_list_content}' ";
|
||||
if (is_checked('chk_all_use_email')) $all_fields .= " , bo_use_email = '{$bo_use_email}' ";
|
||||
if (is_checked('chk_all_use_cert')) $all_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
|
||||
if (is_checked('chk_all_use_sns')) $all_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
|
||||
if (is_checked('chk_all_skin')) $all_fields .= " , bo_skin = '{$bo_skin}' ";
|
||||
if (is_checked('chk_all_mobile_skin')) $all_fields .= " , bo_mobile_skin = '{$bo_mobile_skin}' ";
|
||||
if (is_checked('chk_all_gallery_cols')) $all_fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
|
||||
if (is_checked('chk_all_gallery_width')) $all_fields .= " , bo_gallery_width = '{$bo_gallery_width}' ";
|
||||
if (is_checked('chk_all_gallery_height')) $all_fields .= " , bo_gallery_height = '{$bo_gallery_height}' ";
|
||||
if (is_checked('chk_all_mobile_gallery_width')) $all_fields .= " , bo_mobile_gallery_width = '{$bo_mobile_gallery_width}' ";
|
||||
if (is_checked('chk_all_mobile_gallery_height'))$all_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
|
||||
if (is_checked('chk_all_table_width')) $all_fields .= " , bo_table_width = '{$bo_table_width}' ";
|
||||
if (is_checked('chk_all_page_rows')) $all_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
|
||||
if (is_checked('chk_all_mobile_page_rows')) $all_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
|
||||
if (is_checked('chk_all_subject_len')) $all_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
|
||||
if (is_checked('chk_all_mobile_subject_len')) $all_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
|
||||
if (is_checked('chk_all_new')) $all_fields .= " , bo_new = '{$bo_new}' ";
|
||||
if (is_checked('chk_all_hot')) $all_fields .= " , bo_hot = '{$bo_hot}' ";
|
||||
if (is_checked('chk_all_image_width')) $all_fields .= " , bo_image_width = '{$bo_image_width}' ";
|
||||
if (is_checked('chk_all_reply_order')) $all_fields .= " , bo_reply_order = '{$bo_reply_order}' ";
|
||||
if (is_checked('chk_all_sort_field')) $all_fields .= " , bo_sort_field = '{$bo_sort_field}' ";
|
||||
if (is_checked('chk_all_write_min')) $all_fields .= " , bo_write_min = '{$bo_write_min}' ";
|
||||
if (is_checked('chk_all_write_max')) $all_fields .= " , bo_write_max = '{$bo_write_max}' ";
|
||||
if (is_checked('chk_all_comment_min')) $all_fields .= " , bo_comment_min = '{$bo_comment_min}' ";
|
||||
if (is_checked('chk_all_comment_max')) $all_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
||||
if (is_checked('chk_all_upload_count')) $all_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
||||
if (is_checked('chk_all_upload_size')) $all_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
||||
if (is_checked('chk_all_include_head')) $all_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||
if (is_checked('chk_all_include_tail')) $all_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||
if (is_checked('chk_all_content_head')) $all_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||
if (is_checked('chk_all_content_tail')) $all_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||
if (is_checked('chk_all_mobile_content_head')) $all_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||
if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||
if (is_checked('chk_all_insert_content')) $all_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
||||
if (is_checked('chk_all_use_search')) $all_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
||||
if (is_checked('chk_all_order')) $all_fields .= " , bo_order = '{$bo_order}' ";
|
||||
for ($i=1; $i<=10; $i++) {
|
||||
if (is_checked('chk_all_'.$i)) {
|
||||
$all_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
|
||||
$all_fields .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
|
||||
}
|
||||
}
|
||||
|
||||
if ($all_fields) {
|
||||
sql_query(" update {$g5['board_table']} set bo_table = bo_table {$all_fields} ");
|
||||
}
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
goto_url("./board_form.php?w=u&bo_table={$bo_table}&{$qstr}");
|
||||
?>
|
||||
217
AvocadoEdition_Light/adm/board_list.php
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
<?php
|
||||
$sub_menu = "300100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$sql_common = " from {$g5['board_table']} a ";
|
||||
$sql_search = " where (1) ";
|
||||
|
||||
if ($is_admin != "super") {
|
||||
$sql_common .= " , {$g5['group_table']} b ";
|
||||
$sql_search .= " and (a.gr_id = b.gr_id and b.gr_admin = '{$member['mb_id']}') ";
|
||||
}
|
||||
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
case "bo_table" :
|
||||
$sql_search .= " ($sfl like '$stx%') ";
|
||||
break;
|
||||
case "a.gr_id" :
|
||||
$sql_search .= " ($sfl = '$stx') ";
|
||||
break;
|
||||
default :
|
||||
$sql_search .= " ($sfl like '%$stx%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "a.gr_id, a.bo_table";
|
||||
$sod = "asc";
|
||||
}
|
||||
$sql_order = " order by $sst $sod ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
$g5['title'] = '게시판관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 11;
|
||||
?>
|
||||
|
||||
<style>
|
||||
td input[type="text"],
|
||||
td select {display:block; width:100%;}
|
||||
</style>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
생성된 게시판수 <?php echo number_format($total_count) ?>개
|
||||
</div>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="bo_table"<?php echo get_selected($_GET['sfl'], "bo_table", true); ?>>TABLE</option>
|
||||
<option value="bo_subject"<?php echo get_selected($_GET['sfl'], "bo_subject"); ?>>제목</option>
|
||||
<option value="a.gr_id"<?php echo get_selected($_GET['sfl'], "a.gr_id"); ?>>그룹ID</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
|
||||
</form>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" style="width:45px;">
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col" style="width:100px;"><?php echo subject_sort_link('a.gr_id') ?>그룹</a></th>
|
||||
<th scope="col" style="width:100px;"><?php echo subject_sort_link('bo_table') ?>TABLE</a></th>
|
||||
<th scope="col" style="width:150px;"><?php echo subject_sort_link('bo_skin', '', 'desc') ?>스킨</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('bo_subject') ?>제목</a></th>
|
||||
<th scope="col" style="width:80px;">목록보기</th>
|
||||
<th scope="col" style="width:80px;">글읽기</th>
|
||||
<th scope="col" style="width:80px;">글쓰기</th>
|
||||
<th scope="col" style="width:80px;">글답변</th>
|
||||
<th scope="col" style="width:80px;">댓글쓰기</th>
|
||||
<th scope="col" style="width:60px;">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$one_update = '<a href="./board_form.php?w=u&bo_table='.$row['bo_table'].'&'.$qstr.'">수정</a>';
|
||||
$one_copy = '<a href="./board_copy.php?bo_table='.$row['bo_table'].'" class="board_copy" target="win_board_copy">복사</a>';
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($is_admin == 'super'){ ?>
|
||||
<?php echo get_group_select("gr_id[$i]", $row['gr_id']) ?>
|
||||
<?php }else{ ?>
|
||||
<input type="hidden" name="gr_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>"><?php echo $row['gr_subject'] ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="board_table[<?php echo $i ?>]" value="<?php echo $row['bo_table'] ?>">
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo $row['bo_table'] ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo get_skin_select('board', 'bo_skin_'.$i, "bo_skin[$i]", $row['bo_skin']); ?>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="bo_subject[<?php echo $i ?>]" value="<?php echo get_text($row['bo_subject']) ?>" id="bo_subject_<?php echo $i ?>" required class="required frm_input bo_subject full_input" size="25">
|
||||
</td>
|
||||
<td>
|
||||
<?php echo get_member_level_select('bo_list_level['.$i.']', 1, 10, $row['bo_list_level']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo get_member_level_select('bo_read_level['.$i.']', 1, 10, $row['bo_read_level']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo get_member_level_select('bo_write_level['.$i.']', 1, 10, $row['bo_write_level']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo get_member_level_select('bo_reply_level['.$i.']', 1, 10, $row['bo_reply_level']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo get_member_level_select('bo_comment_level['.$i.']', 1, 10, $row['bo_comment_level']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $one_update ?>
|
||||
<?php echo $one_copy ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="btn_confirm">
|
||||
<div class="btn ty3">
|
||||
<span class="material-icons">build</span>
|
||||
<input type="submit" name="act_button" value="선택수정" title="선택수정" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
<div class="btn ty2">
|
||||
<span class="material-icons">delete</span>
|
||||
<input type="submit" name="act_button" value="선택삭제" title="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
<?php if ($is_admin == 'super') { ?>
|
||||
<a href="./board_form.php" title="게시판 추가" class="btn"><span class="material-icons">add</span></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'].'?'.$qstr.'&page='); ?>
|
||||
|
||||
<script>
|
||||
function fboardlist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$(".board_copy").click(function(){
|
||||
window.open(this.href, "win_board_copy", "left=100,top=100,width=550,height=450");
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
68
AvocadoEdition_Light/adm/board_list_update.php
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
$sub_menu = "300100";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
if ($is_admin != 'super') {
|
||||
$sql = " select count(*) as cnt from {$g5['board_table']} a, {$g5['group_table']} b
|
||||
where a.gr_id = '{$_POST['gr_id'][$k]}'
|
||||
and a.gr_id = b.gr_id
|
||||
and b.gr_admin = '{$member['mb_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row['cnt'])
|
||||
alert('최고관리자가 아닌 경우 다른 관리자의 게시판('.$board_table[$k].')은 수정이 불가합니다.');
|
||||
}
|
||||
|
||||
$sql = " update {$g5['board_table']}
|
||||
set gr_id = '{$_POST['gr_id'][$k]}',
|
||||
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||
bo_list_level = '{$_POST['bo_list_level'][$k]}',
|
||||
bo_read_level = '{$_POST['bo_read_level'][$k]}',
|
||||
bo_write_level = '{$_POST['bo_write_level'][$k]}',
|
||||
bo_comment_level = '{$_POST['bo_comment_level'][$k]}',
|
||||
bo_reply_level = '{$_POST['bo_reply_level'][$k]}'
|
||||
where bo_table = '{$_POST['board_table'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('게시판 삭제는 최고관리자만 가능합니다.');
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
|
||||
define('_BOARD_DELETE_', true);
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
// include 전에 $bo_table 값을 반드시 넘겨야 함
|
||||
$tmp_bo_table = trim($_POST['board_table'][$k]);
|
||||
include ('./board_delete.inc.php');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
goto_url('./board_list.php');
|
||||
?>
|
||||
52
AvocadoEdition_Light/adm/board_thumbnail_delete.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
$sub_menu = '300100';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if(!$board['bo_table'])
|
||||
alert('존재하지 않는 게시판입니다.');
|
||||
|
||||
$g5['title'] = $board['bo_subject'].' 게시판 썸네일 삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$dir = G5_DATA_PATH.'/file/'.$bo_table;
|
||||
|
||||
$cnt = 0;
|
||||
if(is_dir($dir)) {
|
||||
echo '<ul>';
|
||||
$files = glob($dir.'/thumb-*');
|
||||
if (is_array($files)) {
|
||||
foreach($files as $thumbnail) {
|
||||
$cnt++;
|
||||
@unlink($thumbnail);
|
||||
|
||||
echo '<li>'.$thumbnail.'</li>'.PHP_EOL;
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||
echo '<div class="local_desc01 local_desc"><p><strong>썸네일 '.$cnt.'건의 삭제 완료됐습니다.</strong></p></div>'.PHP_EOL;
|
||||
} else {
|
||||
echo '<p>첨부파일 디렉토리가 존재하지 않습니다.</p>';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm"><a href="./board_form.php?w=u&bo_table=<?php echo $bo_table; ?>&<?php echo $qstr; ?>">게시판 수정으로 돌아가기</a></div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
113
AvocadoEdition_Light/adm/boardgroup_form.php
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$html_title = '게시판그룹';
|
||||
$gr_id_attr = '';
|
||||
$sound_only = '';
|
||||
if ($w == '') {
|
||||
$gr_id_attr = 'required';
|
||||
$sound_only = '<strong class="sound_only"> 필수</strong>';
|
||||
$gr['gr_use_access'] = 0;
|
||||
$html_title .= ' 생성';
|
||||
} else if ($w == 'u') {
|
||||
$gr_id_attr = 'readonly';
|
||||
$gr = sql_fetch(" select * from {$g5['group_table']} where gr_id = '$gr_id' ");
|
||||
$html_title .= ' 수정';
|
||||
}
|
||||
else
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
|
||||
if (!isset($group['gr_device'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['group_table']}` ADD `gr_device` ENUM('both','pc','mobile') NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
|
||||
}
|
||||
|
||||
|
||||
$g5['title'] = $html_title;
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
게시판을 생성하시려면 1개 이상의 게시판그룹이 필요합니다.<br>
|
||||
게시판그룹을 이용하시면 더 효과적으로 게시판을 관리할 수 있습니다.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form name="fboardgroup" id="fboardgroup" action="./boardgroup_form_update.php" onsubmit="return fboardgroup_check(this);" method="post" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="">
|
||||
<input type="hidden" name="gr_device" value="both">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<colgroup>
|
||||
<col style="width:120px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="gr_id">그룹 ID<?php echo $sound_only ?></label></th>
|
||||
<td><input type="text" name="gr_id" value="<?php echo $group['gr_id'] ?>" id="gr_id" <?php echo $gr_id_attr; ?> class="<?php echo $gr_id_attr; ?> alnum_ frm_input" maxlength="10">
|
||||
<?php
|
||||
if ($w=='')
|
||||
echo '영문자, 숫자, _ 만 가능 (공백없이)';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="gr_subject">그룹 제목<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="gr_subject" value="<?php echo get_text($group['gr_subject']) ?>" id="gr_subject" required class="required frm_input" size="80">
|
||||
<?php
|
||||
if ($w == 'u')
|
||||
echo '<a href="./board_form.php?gr_id='.$gr_id.'" class="btn_frmline">게시판생성</a>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php for ($i=1;$i<=10;$i++) { ?>
|
||||
<tr>
|
||||
<th scope="row">여분필드<?php echo $i ?></th>
|
||||
<td class="td_extra">
|
||||
<label for="gr_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
||||
<input type="text" name="gr_<?php echo $i ?>_subj" value="<?php echo get_text($group['gr_'.$i.'_subj']) ?>" id="gr_<?php echo $i ?>_subj" class="frm_input">
|
||||
<label for="gr_<?php echo $i ?>">여분필드 <?php echo $i ?> 내용</label>
|
||||
<input type="text" name="gr_<?php echo $i ?>" value="<?php echo $gr['gr_'.$i] ?>" id="gr_<?php echo $i ?>" class="frm_input">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<a href="./boardgroup_list.php" title="목록" class="btn ty2"><span class="material-icons">list</span></a>
|
||||
<div class="btn">
|
||||
<span class="material-icons">save</span>
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fboardgroup_check(f)
|
||||
{
|
||||
f.action = './boardgroup_form_update.php';
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
71
AvocadoEdition_Light/adm/boardgroup_form_update.php
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == 'u')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $_POST['gr_id']))
|
||||
alert('그룹 ID는 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (10자 이내)');
|
||||
|
||||
if (!$gr_subject) alert('그룹 제목을 입력하세요.');
|
||||
|
||||
$sql_common = " gr_subject = '{$_POST['gr_subject']}',
|
||||
gr_device = '{$_POST['gr_device']}',
|
||||
gr_admin = '{$_POST['gr_admin']}',
|
||||
gr_1_subj = '{$_POST['gr_1_subj']}',
|
||||
gr_2_subj = '{$_POST['gr_2_subj']}',
|
||||
gr_3_subj = '{$_POST['gr_3_subj']}',
|
||||
gr_4_subj = '{$_POST['gr_4_subj']}',
|
||||
gr_5_subj = '{$_POST['gr_5_subj']}',
|
||||
gr_6_subj = '{$_POST['gr_6_subj']}',
|
||||
gr_7_subj = '{$_POST['gr_7_subj']}',
|
||||
gr_8_subj = '{$_POST['gr_8_subj']}',
|
||||
gr_9_subj = '{$_POST['gr_9_subj']}',
|
||||
gr_10_subj = '{$_POST['gr_10_subj']}',
|
||||
gr_1 = '{$_POST['gr_1']}',
|
||||
gr_2 = '{$_POST['gr_2']}',
|
||||
gr_3 = '{$_POST['gr_3']}',
|
||||
gr_4 = '{$_POST['gr_4']}',
|
||||
gr_5 = '{$_POST['gr_5']}',
|
||||
gr_6 = '{$_POST['gr_6']}',
|
||||
gr_7 = '{$_POST['gr_7']}',
|
||||
gr_8 = '{$_POST['gr_8']}',
|
||||
gr_9 = '{$_POST['gr_9']}',
|
||||
gr_10 = '{$_POST['gr_10']}' ";
|
||||
if (isset($_POST['gr_use_access']))
|
||||
$sql_common .= ", gr_use_access = '{$_POST['gr_use_access']}' ";
|
||||
else
|
||||
$sql_common .= ", gr_use_access = '' ";
|
||||
|
||||
if ($w == '') {
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['group_table']} where gr_id = '{$_POST['gr_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt'])
|
||||
alert('이미 존재하는 그룹 ID 입니다.');
|
||||
|
||||
$sql = " insert into {$g5['group_table']}
|
||||
set gr_id = '{$_POST['gr_id']}',
|
||||
{$sql_common} ";
|
||||
sql_query($sql);
|
||||
|
||||
} else if ($w == "u") {
|
||||
|
||||
$sql = " update {$g5['group_table']}
|
||||
set {$sql_common}
|
||||
where gr_id = '{$_POST['gr_id']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
} else {
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
}
|
||||
|
||||
goto_url('./boardgroup_form.php?w=u&gr_id='.$gr_id.'&'.$qstr);
|
||||
?>
|
||||
220
AvocadoEdition_Light/adm/boardgroup_list.php
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
if (!isset($group['gr_device'])) {
|
||||
// 게시판 그룹 사용 필드 추가
|
||||
// both : pc, mobile 둘다 사용
|
||||
// pc : pc 전용 사용
|
||||
// mobile : mobile 전용 사용
|
||||
// none : 사용 안함
|
||||
sql_query(" ALTER TABLE `{$g5['board_group_table']}` ADD `gr_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
|
||||
}
|
||||
|
||||
$sql_common = " from {$g5['group_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
if ($is_admin != 'super')
|
||||
$sql_search .= " and (gr_admin = '{$member['mb_id']}') ";
|
||||
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
case "gr_id" :
|
||||
case "gr_admin" :
|
||||
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||
break;
|
||||
default :
|
||||
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if ($sst)
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
else
|
||||
$sql_order = " order by gr_id asc ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">처음</a>';
|
||||
|
||||
$g5['title'] = '게시판그룹설정';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 10;
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
전체그룹 <?php echo number_format($total_count) ?>개
|
||||
</div>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="gr_subject"<?php echo get_selected($_GET['sfl'], "gr_subject"); ?>>제목</option>
|
||||
<option value="gr_id"<?php echo get_selected($_GET['sfl'], "gr_id"); ?>>ID</option>
|
||||
<option value="gr_admin"<?php echo get_selected($_GET['sfl'], "gr_admin"); ?>>그룹관리자</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
|
||||
<form name="fboardgrouplist" id="fboardgrouplist" action="./boardgroup_list_update.php" onsubmit="return fboardgrouplist_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width:45px;" />
|
||||
<col style="width:120px;" />
|
||||
<col />
|
||||
<col style="width:120px;" />
|
||||
<col style="width:120px;" />
|
||||
<col style="width:80px;" />
|
||||
<col style="width:80px;" />
|
||||
<col style="width:80px;" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">그룹 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col"><?php echo subject_sort_link('gr_id') ?>그룹아이디</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('gr_subject') ?>제목</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('gr_admin') ?>그룹관리자</a></th>
|
||||
<th scope="col">게시판</th>
|
||||
<th scope="col"><?php echo subject_sort_link('gr_order') ?>출력 순서</a></th>
|
||||
<th scope="col">접속기기</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
// 접근회원수
|
||||
$sql1 = " select count(*) as cnt from {$g5['group_member_table']} where gr_id = '{$row['gr_id']}' ";
|
||||
$row1 = sql_fetch($sql1);
|
||||
|
||||
// 게시판수
|
||||
$sql2 = " select count(*) as cnt from {$g5['board_table']} where gr_id = '{$row['gr_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
|
||||
$s_upd = '<a href="./boardgroup_form.php?'.$qstr.'&w=u&gr_id='.$row['gr_id'].'">수정</a>';
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="group_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>">
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_grid"><?php echo $row['gr_id'] ?></td>
|
||||
<td class="td_input">
|
||||
<input type="text" name="gr_subject[<?php echo $i ?>]" value="<?php echo get_text($row['gr_subject']) ?>" id="gr_subject_<?php echo $i ?>" class="frm_input full">
|
||||
</td>
|
||||
<td class="td_mng td_input">
|
||||
<?php if ($is_admin == 'super'){ ?>
|
||||
<input type="text" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>" id="gr_admin_<?php echo $i ?>" class="frm_input full" size="10" maxlength="20">
|
||||
<?php }else{ ?>
|
||||
<input type="hidden" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>"><?php echo $row['gr_admin'] ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="td_numsmall"><a href="./board_list.php?sfl=a.gr_id&stx=<?php echo $row['gr_id'] ?>"><?php echo $row2['cnt'] ?></a></td>
|
||||
<td class="td_chk">
|
||||
<input type="text" name="gr_order[<?php echo $i ?>]" value="<?php echo $row['gr_order'] ?>" id="gr_order_<?php echo $i ?>" class="frm_input full" size="2">
|
||||
</td>
|
||||
<td class="td_mng">
|
||||
<select name="gr_device[<?php echo $i ?>]" id="gr_device_<?php echo $i ?>" class="full">
|
||||
<option value="both"<?php echo get_selected($row['gr_device'], 'both'); ?>>모두</option>
|
||||
<option value="pc"<?php echo get_selected($row['gr_device'], 'pc'); ?>>PC</option>
|
||||
<option value="mobile"<?php echo get_selected($row['gr_device'], 'mobile'); ?>>모바일</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_mngsmall"><?php echo $s_upd ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<div class="btn ty3">
|
||||
<span class="material-icons">build</span>
|
||||
<input type="submit" name="act_button" value="선택수정" title="선택수정" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
<div class="btn ty2">
|
||||
<span class="material-icons">delete</span>
|
||||
<input type="submit" name="act_button" value="선택삭제" title="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
<?php if ($is_admin == 'super') { ?>
|
||||
<a href="./boardgroup_form.php" title="게시판그룹 추가" class="btn"><span class="material-icons">add</span></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<br />
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
접근사용 옵션을 설정하시면 관리자가 지정한 회원만 해당 그룹에 접근할 수 있습니다.<br>
|
||||
접근사용 옵션은 해당 그룹에 속한 모든 게시판에 적용됩니다.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'].'?'.$qstr.'&page=');
|
||||
echo $pagelist;
|
||||
?>
|
||||
|
||||
<script>
|
||||
function fboardgrouplist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
47
AvocadoEdition_Light/adm/boardgroup_list_update.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
//print_r2($_POST); exit;
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
|
||||
if(!$count)
|
||||
alert($_POST['act_button'].'할 게시판그룹을 1개이상 선택해 주세요.');
|
||||
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
$k = $_POST['chk'][$i];
|
||||
$gr_id = $_POST['group_id'][$k];
|
||||
|
||||
if($_POST['act_button'] == '선택수정') {
|
||||
$sql = " update {$g5['group_table']}
|
||||
set gr_subject = '{$_POST['gr_subject'][$k]}',
|
||||
gr_device = '{$_POST['gr_device'][$k]}',
|
||||
gr_admin = '{$_POST['gr_admin'][$k]}',
|
||||
gr_order = '{$_POST['gr_order'][$k]}'
|
||||
where gr_id = '{$gr_id}' ";
|
||||
if ($is_admin != 'super')
|
||||
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";
|
||||
sql_query($sql);
|
||||
} else if($_POST['act_button'] == '선택삭제') {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where gr_id = '$gr_id' ");
|
||||
if ($row['cnt'])
|
||||
alert("이 그룹에 속한 게시판이 존재하여 게시판 그룹을 삭제할 수 없습니다.\\n\\n이 그룹에 속한 게시판을 먼저 삭제하여 주십시오.", './board_list.php?sfl=gr_id&stx='.$gr_id);
|
||||
|
||||
// 그룹 삭제
|
||||
sql_query(" delete from {$g5['group_table']} where gr_id = '$gr_id' ");
|
||||
|
||||
// 그룹접근 회원 삭제
|
||||
sql_query(" delete from {$g5['group_member_table']} where gr_id = '$gr_id' ");
|
||||
}
|
||||
}
|
||||
|
||||
goto_url('./boardgroup_list.php?'.$qstr);
|
||||
?>
|
||||
127
AvocadoEdition_Light/adm/boardgroupmember_form.php
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id'])
|
||||
alert('존재하지 않는 회원입니다.');
|
||||
|
||||
$g5['title'] = '접근가능그룹';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 4;
|
||||
?>
|
||||
|
||||
<form name="fboardgroupmember_form" id="fboardgroupmember_form" action="./boardgroupmember_update.php" onsubmit="return boardgroupmember_form_check(this)" method="post">
|
||||
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
|
||||
<input type="hidden" name="token" value="" id="token">
|
||||
<div class="local_cmd01 local_cmd">
|
||||
<p>아이디 <b><?php echo $mb['mb_id'] ?></b>, 이름 <b><?php echo get_text($mb['mb_name']); ?></b>, 닉네임 <b><?php echo $mb['mb_nick'] ?></b></p>
|
||||
<label for="gr_id">그룹지정</label>
|
||||
<select name="gr_id" id="gr_id">
|
||||
<option value="">접근가능 그룹을 선택하세요.</option>
|
||||
<?php
|
||||
$sql = " select *
|
||||
from {$g5['group_table']}
|
||||
where gr_use_access = 1 ";
|
||||
//if ($is_admin == 'group') {
|
||||
if ($is_admin != 'super')
|
||||
$sql .= " and gr_admin = '{$member['mb_id']}' ";
|
||||
$sql .= " order by gr_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
echo "<option value=\"".$row['gr_id']."\">".$row['gr_subject']."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="submit" value="선택" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form name="fboardgroupmember" id="fboardgroupmember" action="./boardgroupmember_update.php" onsubmit="return fboardgroupmember_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>" id="sst">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>" id="sod">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>" id="sfl">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>" id="stx">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>" id="page">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
|
||||
<input type="hidden" name="w" value="d" id="w">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">접근가능그룹 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col">그룹아이디</th>
|
||||
<th scope="col">그룹</th>
|
||||
<th scope="col">처리일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select * from {$g5['group_member_table']} a, {$g5['group_table']} b
|
||||
where a.mb_id = '{$mb['mb_id']}'
|
||||
and a.gr_id = b.gr_id ";
|
||||
if ($is_admin != 'super')
|
||||
$sql .= " and b.gr_admin = '{$member['mb_id']}' ";
|
||||
$sql .= " order by a.gr_id desc ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_grid"><a href="<?php echo G5_BBS_URL; ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||
<td class="td_category"><?php echo $row['gr_subject'] ?></td>
|
||||
<td class="td_datetime"><?php echo $row['gm_datetime'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">접근가능한 그룹이 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="" value="선택삭제">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fboardgroupmember_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function boardgroupmember_form_check(f)
|
||||
{
|
||||
if (f.gr_id.value == '') {
|
||||
alert('접근가능 그룹을 선택하세요.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
156
AvocadoEdition_Light/adm/boardgroupmember_list.php
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$gr = get_group($gr_id);
|
||||
if (!$gr['gr_id']) {
|
||||
alert('존재하지 않는 그룹입니다.');
|
||||
}
|
||||
|
||||
$sql_common = " from {$g5['group_member_table']} a
|
||||
left outer join {$g5['member_table']} b on (a.mb_id = b.mb_id) ";
|
||||
|
||||
$sql_search = " where gr_id = '{$gr_id}' ";
|
||||
// 회원아이디로 검색되지 않던 오류를 수정
|
||||
if (isset($stx) && $stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
default :
|
||||
$sql_search .= " ($sfl like '%$stx%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "gm_datetime";
|
||||
$sod = "desc";
|
||||
}
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order}
|
||||
limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$g5['title'] = $gr['gr_subject'].' 그룹 접근가능회원 (그룹아이디:'.$gr['gr_id'].')';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 7;
|
||||
?>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="a.mb_id"<?php echo get_selected($_GET['sfl'], "a.mb_id") ?>>회원아이디</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</form>
|
||||
|
||||
<form name="fboardgroupmember" id="fboardgroupmember" action="./boardgroupmember_update.php" onsubmit="return fboardgroupmember_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
||||
<input type="hidden" name="w" value="ld">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">접근가능회원 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col">그룹</th>
|
||||
<th scope="col"><?php echo subject_sort_link('b.mb_id', 'gr_id='.$gr_id) ?>회원아이디</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('b.mb_name', 'gr_id='.$gr_id) ?>이름</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('b.mb_nick', 'gr_id='.$gr_id) ?>별명</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('b.mb_today_login', 'gr_id='.$gr_id) ?>최종접속</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('a.gm_datetime', 'gr_id='.$gr_id) ?>처리일시</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
// 접근가능한 그룹수
|
||||
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$group = "";
|
||||
if ($row2['cnt'])
|
||||
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?> 회원</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_grid"><?php echo $group ?></td>
|
||||
<td class="td_mbid"><?php echo $row['mb_id'] ?></td>
|
||||
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
||||
<td class="td_name sv_use"><?php echo $mb_nick ?></td>
|
||||
<td class="td_datetime"><?php echo substr($row['mb_today_login'],2,8) ?></td>
|
||||
<td class="td_datetime"><?php echo $row['gm_datetime'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
{
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="" value="선택삭제">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&gr_id=$gr_id&page="); ?>
|
||||
|
||||
<script>
|
||||
function fboardgroupmember_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
70
AvocadoEdition_Light/adm/boardgroupmember_update.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
sql_query(" ALTER TABLE {$g5['group_member_table']} CHANGE `gm_id` `gm_id` INT( 11 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ", false);
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id']) {
|
||||
alert('존재하지 않는 회원입니다.');
|
||||
}
|
||||
|
||||
$gr = get_group($gr_id);
|
||||
if (!$gr['gr_id']) {
|
||||
alert('존재하지 않는 그룹입니다.');
|
||||
}
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
from {$g5['group_member_table']}
|
||||
where gr_id = '{$gr_id}'
|
||||
and mb_id = '{$mb_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt']) {
|
||||
alert('이미 등록되어 있는 자료입니다.');
|
||||
}
|
||||
else
|
||||
{
|
||||
check_admin_token();
|
||||
|
||||
$sql = " insert into {$g5['group_member_table']}
|
||||
set gr_id = '{$_POST['gr_id']}',
|
||||
mb_id = '{$_POST['mb_id']}',
|
||||
gm_datetime = '".G5_TIME_YMDHIS."' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
else if ($w == 'd' || $w == 'ld')
|
||||
{
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
if(!$count)
|
||||
alert('삭제할 목록을 하나이상 선택해 주세요.');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
for($i=0; $i<$count; $i++) {
|
||||
$gm_id = $_POST['chk'][$i];
|
||||
$sql = " select * from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
||||
$gm = sql_fetch($sql);
|
||||
if (!$gm['gm_id']) {
|
||||
if($count == 1)
|
||||
alert('존재하지 않는 자료입니다.');
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
$sql = " delete from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
if ($w == 'ld')
|
||||
goto_url('./boardgroupmember_list.php?gr_id='.$gr_id);
|
||||
else
|
||||
goto_url('./boardgroupmember_form.php?mb_id='.$mb_id);
|
||||
?>
|
||||
45
AvocadoEdition_Light/adm/browscap.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
$sub_menu = "100510";
|
||||
include_once('./_common.php');
|
||||
|
||||
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$g5['title'] = 'Browscap 업데이트';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div id="processing">
|
||||
<p>Browscap 정보를 업데이트하시려면 아래 업데이트 버튼을 클릭해 주세요.</p>
|
||||
<button type="button" id="run_update">업데이트</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#run_update").on("click", function() {
|
||||
$("#processing").html('<div class="update_processing"></div><p>Browscap 정보를 업데이트 중입니다.</p>');
|
||||
|
||||
$.ajax({
|
||||
url: "./browscap_update.php",
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
if(data != "") {
|
||||
alert(data);
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#processing").html("<div class='check_processing'></div><p>Browscap 정보를 업데이트 했습니다.</p>");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
46
AvocadoEdition_Light/adm/browscap_convert.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
$sub_menu = "100520";
|
||||
include_once('./_common.php');
|
||||
|
||||
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$rows = preg_replace('#[^0-9]#', '', $_GET['rows']);
|
||||
if(!$rows)
|
||||
$rows = 100;
|
||||
|
||||
$g5['title'] = '접속로그 변환';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div id="processing">
|
||||
<p>접속로그 정보를 Browscap 정보로 변환하시려면 아래 업데이트 버튼을 클릭해 주세요.</p>
|
||||
<button type="button" id="run_update">업데이트</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$(document).on("click", "#run_update", function() {
|
||||
$("#processing").html('<div class="update_processing"></div><p>Browscap 정보로 변환 중입니다.</p>');
|
||||
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "./browscap_converter.php",
|
||||
data: { rows: "<?php echo $rows; ?>" },
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
$("#processing").html(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
75
AvocadoEdition_Light/adm/browscap_converter.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
ini_set('memory_limit', '-1');
|
||||
include_once('./_common.php');
|
||||
|
||||
// clean the output buffer
|
||||
ob_end_clean();
|
||||
|
||||
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||
die('사용할 수 없는 기능입니다.');
|
||||
|
||||
if($is_admin != 'super')
|
||||
die('최고관리자로 로그인 후 실행해 주세요.');
|
||||
|
||||
// browscap cache 파일 체크
|
||||
if(!is_file(G5_DATA_PATH.'/cache/browscap_cache.php')) {
|
||||
echo '<p>Browscap 정보가 없습니다. 아래 링크로 이동해 Browscap 정보를 업데이트 하세요.</p>'.PHP_EOL;
|
||||
echo '<p><a href="'.G5_ADMIN_URL.'/browscap.php">Browscap 업데이트</a></p>'.PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once(G5_PLUGIN_PATH.'/browscap/Browscap.php');
|
||||
$browscap = new phpbrowscap\Browscap(G5_DATA_PATH.'/cache');
|
||||
$browscap->doAutoUpdate = false;
|
||||
$browscap->cacheFilename = 'browscap_cache.php';
|
||||
|
||||
// 데이터 변환
|
||||
$rows = preg_replace('#[^0-9]#', '', $_GET['rows']);
|
||||
if(!$rows)
|
||||
$rows = 100;
|
||||
|
||||
$sql_common = " from {$g5['visit_table']} where vi_agent <> '' and ( vi_browser = '' or vi_os = '' or vi_device = '' ) ";
|
||||
$sql_order = " order by vi_id desc ";
|
||||
$sql_limit = " limit 0, $rows ";
|
||||
|
||||
$sql = " select count(vi_id) as cnt $sql_common ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$sql = " select vi_id, vi_agent, vi_browser, vi_os, vi_device
|
||||
$sql_common
|
||||
$sql_order
|
||||
$sql_limit ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$cnt = 0;
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$info = $browscap->getBrowser($row['vi_agent']);
|
||||
|
||||
$brow = $row['vi_browser'];
|
||||
if(!$brow)
|
||||
$brow = $info->Comment;
|
||||
|
||||
$os = $row['vi_os'];
|
||||
if(!$os)
|
||||
$os = $info->Platform;
|
||||
|
||||
$device = $row['vi_device'];
|
||||
if(!$device)
|
||||
$device = $info->Device_Type;
|
||||
|
||||
$sql2 = " update {$g5['visit_table']}
|
||||
set vi_browser = '$brow',
|
||||
vi_os = '$os',
|
||||
vi_device = '$device'
|
||||
where vi_id = '{$row['vi_id']}' ";
|
||||
sql_query($sql2);
|
||||
|
||||
$cnt++;
|
||||
}
|
||||
|
||||
if(($total_count - $cnt) == 0 || $total_count == 0)
|
||||
echo '<div class="check_processing"></div><p>변환완료</p>';
|
||||
else
|
||||
echo '<p>총 '.number_format($total_count).'건 중 '.number_format($cnt).'건 변환완료<br><br>접속로그를 추가로 변환하시려면 아래 업데이트 버튼을 클릭해 주세요.</p><button type="button" id="run_update">업데이트</button>';
|
||||
?>
|
||||
24
AvocadoEdition_Light/adm/browscap_update.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
ini_set('memory_limit', '-1');
|
||||
|
||||
$sub_menu = "100510";
|
||||
include_once('./_common.php');
|
||||
|
||||
// clean the output buffer
|
||||
ob_end_clean();
|
||||
|
||||
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||
die('사용할 수 없는 기능입니다.');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
die('최고관리자만 접근 가능합니다.');
|
||||
|
||||
include_once(G5_PLUGIN_PATH.'/browscap/Browscap.php');
|
||||
|
||||
$browscap = new phpbrowscap\Browscap(G5_DATA_PATH.'/cache');
|
||||
$browscap->updateMethod = 'cURL';
|
||||
$browscap->cacheFilename = 'browscap_cache.php';
|
||||
$browscap->updateCache();
|
||||
|
||||
die('');
|
||||
?>
|
||||
48
AvocadoEdition_Light/adm/cache_file_delete.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
$sub_menu = '900200';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||
|
||||
$g5['title'] = '캐시파일 일괄삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
flush();
|
||||
|
||||
if (!$dir=@opendir(G5_DATA_PATH.'/cache')) {
|
||||
echo '<p>캐시디렉토리를 열지못했습니다.</p>';
|
||||
}
|
||||
|
||||
$cnt=0;
|
||||
echo '<ul>'.PHP_EOL;
|
||||
|
||||
$files = glob(G5_DATA_PATH.'/cache/latest-*');
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $cache_file) {
|
||||
$cnt++;
|
||||
unlink($cache_file);
|
||||
echo '<li>'.$cache_file.'</li>'.PHP_EOL;
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||
echo '<div class="local_desc01 local_desc"><p><strong>최신글 캐시파일 '.$cnt.'건 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
53
AvocadoEdition_Light/adm/captcha_file_delete.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$sub_menu = '100910';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||
|
||||
$g5['title'] = '캡챠파일 일괄삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
flush();
|
||||
|
||||
if (!$dir=@opendir(G5_DATA_PATH.'/cache')) {
|
||||
echo '<p>캐시디렉토리를 열지못했습니다.</p>';
|
||||
}
|
||||
|
||||
$cnt=0;
|
||||
echo '<ul>'.PHP_EOL;
|
||||
|
||||
$files = glob(G5_DATA_PATH.'/cache/?captcha-*');
|
||||
if (is_array($files)) {
|
||||
$before_time = G5_SERVER_TIME - 3600; // 한시간전
|
||||
foreach ($files as $gcaptcha_file) {
|
||||
$modification_time = filemtime($gcaptcha_file); // 파일접근시간
|
||||
|
||||
if ($modification_time > $before_time) continue;
|
||||
|
||||
$cnt++;
|
||||
unlink($gcaptcha_file);
|
||||
echo '<li>'.$gcaptcha_file.'</li>'.PHP_EOL;
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||
echo '<div class="local_desc01 local_desc"><p><strong>캡챠파일 '.$cnt.'건의 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
1195
AvocadoEdition_Light/adm/config_form.php
Normal file
159
AvocadoEdition_Light/adm/config_form_update.php
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
<?php
|
||||
$sub_menu = "900300";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$mb = get_member($cf_admin);
|
||||
if (!$mb['mb_id'])
|
||||
alert('최고관리자 회원아이디가 존재하지 않습니다.');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
// 본인확인을 사용할 경우 아이핀, 휴대폰인증 중 하나는 선택되어야 함
|
||||
if($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'])
|
||||
alert('본인확인을 위해 아이핀 또는 휴대폰 본인학인 서비스를 하나이상 선택해 주십시오');
|
||||
|
||||
if(!$_POST['cf_cert_use']) {
|
||||
$_POST['cf_cert_ipin'] = '';
|
||||
$_POST['cf_cert_hp'] = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$site_style_path = G5_DATA_PATH."/site";
|
||||
$site_style_url = G5_DATA_URL."/site";
|
||||
|
||||
@mkdir($site_style_path, G5_DIR_PERMISSION);
|
||||
@chmod($site_style_path, G5_DIR_PERMISSION);
|
||||
|
||||
$cf_site_img = $_POST['cf_site_img'];
|
||||
|
||||
// 이미지 등록 시, 이미지를 업로드한 뒤 - 해당 이미지 경로를 삽입
|
||||
if ($_FILES['admin_icon_file']['name']) {
|
||||
$image_name = "ico_admin";
|
||||
upload_file($_FILES['admin_icon_file']['tmp_name'], $image_name, $site_style_path);
|
||||
}
|
||||
|
||||
|
||||
$sql = " update {$g5['config_table']}
|
||||
set cf_admin = '{$_POST['cf_admin']}',
|
||||
cf_admin_email = '{$_POST['cf_admin_email']}',
|
||||
cf_admin_email_name = '{$_POST['cf_admin_email_name']}',
|
||||
cf_add_script = '{$_POST['cf_add_script']}',
|
||||
cf_use_point = '{$_POST['cf_use_point']}',
|
||||
cf_point_term = '{$_POST['cf_point_term']}',
|
||||
cf_use_copy_log = '{$_POST['cf_use_copy_log']}',
|
||||
cf_use_email_certify = '{$_POST['cf_use_email_certify']}',
|
||||
cf_login_point = '{$_POST['cf_login_point']}',
|
||||
cf_cut_name = '{$_POST['cf_cut_name']}',
|
||||
cf_nick_modify = '{$_POST['cf_nick_modify']}',
|
||||
cf_new_skin = '{$_POST['cf_new_skin']}',
|
||||
cf_new_rows = '{$_POST['cf_new_rows']}',
|
||||
cf_search_skin = '{$_POST['cf_search_skin']}',
|
||||
cf_connect_skin = '{$_POST['cf_connect_skin']}',
|
||||
cf_faq_skin = '{$_POST['cf_faq_skin']}',
|
||||
cf_read_point = '{$_POST['cf_read_point']}',
|
||||
cf_write_point = '{$_POST['cf_write_point']}',
|
||||
cf_comment_point = '{$_POST['cf_comment_point']}',
|
||||
cf_download_point = '{$_POST['cf_download_point']}',
|
||||
cf_write_pages = '{$_POST['cf_write_pages']}',
|
||||
cf_mobile_pages = '{$_POST['cf_mobile_pages']}',
|
||||
cf_link_target = '{$_POST['cf_link_target']}',
|
||||
cf_delay_sec = '{$_POST['cf_delay_sec']}',
|
||||
cf_filter = '{$_POST['cf_filter']}',
|
||||
cf_possible_ip = '".trim($_POST['cf_possible_ip'])."',
|
||||
cf_intercept_ip = '".trim($_POST['cf_intercept_ip'])."',
|
||||
cf_analytics = '{$_POST['cf_analytics']}',
|
||||
cf_add_meta = '{$_POST['cf_add_meta']}',
|
||||
cf_syndi_token = '{$_POST['cf_syndi_token']}',
|
||||
cf_syndi_except = '{$_POST['cf_syndi_except']}',
|
||||
cf_member_skin = '{$_POST['cf_member_skin']}',
|
||||
cf_use_homepage = '{$_POST['cf_use_homepage']}',
|
||||
cf_req_homepage = '{$_POST['cf_req_homepage']}',
|
||||
cf_use_tel = '{$_POST['cf_use_tel']}',
|
||||
cf_req_tel = '{$_POST['cf_req_tel']}',
|
||||
cf_use_hp = '{$_POST['cf_use_hp']}',
|
||||
cf_req_hp = '{$_POST['cf_req_hp']}',
|
||||
cf_use_addr = '{$_POST['cf_use_addr']}',
|
||||
cf_req_addr = '{$_POST['cf_req_addr']}',
|
||||
cf_use_signature = '{$_POST['cf_use_signature']}',
|
||||
cf_req_signature = '{$_POST['cf_req_signature']}',
|
||||
cf_use_profile = '{$_POST['cf_use_profile']}',
|
||||
cf_req_profile = '{$_POST['cf_req_profile']}',
|
||||
cf_register_level = '{$_POST['cf_register_level']}',
|
||||
cf_register_point = '{$_POST['cf_register_point']}',
|
||||
cf_icon_level = '{$_POST['cf_icon_level']}',
|
||||
cf_use_recommend = '{$_POST['cf_use_recommend']}',
|
||||
cf_recommend_point = '{$_POST['cf_recommend_point']}',
|
||||
cf_leave_day = '{$_POST['cf_leave_day']}',
|
||||
cf_search_part = '{$_POST['cf_search_part']}',
|
||||
cf_email_use = '{$_POST['cf_email_use']}',
|
||||
cf_email_wr_super_admin = '{$_POST['cf_email_wr_super_admin']}',
|
||||
cf_email_wr_group_admin = '{$_POST['cf_email_wr_group_admin']}',
|
||||
cf_email_wr_board_admin = '{$_POST['cf_email_wr_board_admin']}',
|
||||
cf_email_wr_write = '{$_POST['cf_email_wr_write']}',
|
||||
cf_email_wr_comment_all = '{$_POST['cf_email_wr_comment_all']}',
|
||||
cf_email_mb_super_admin = '{$_POST['cf_email_mb_super_admin']}',
|
||||
cf_email_mb_member = '{$_POST['cf_email_mb_member']}',
|
||||
cf_email_po_super_admin = '{$_POST['cf_email_po_super_admin']}',
|
||||
cf_prohibit_id = '{$_POST['cf_prohibit_id']}',
|
||||
cf_prohibit_email = '{$_POST['cf_prohibit_email']}',
|
||||
cf_new_del = '{$_POST['cf_new_del']}',
|
||||
cf_memo_del = '{$_POST['cf_memo_del']}',
|
||||
cf_visit_del = '{$_POST['cf_visit_del']}',
|
||||
cf_popular_del = '{$_POST['cf_popular_del']}',
|
||||
cf_use_member_icon = '{$_POST['cf_use_member_icon']}',
|
||||
cf_member_icon_size = '{$_POST['cf_member_icon_size']}',
|
||||
cf_member_icon_width = '{$_POST['cf_member_icon_width']}',
|
||||
cf_member_icon_height = '{$_POST['cf_member_icon_height']}',
|
||||
cf_login_minutes = '{$_POST['cf_login_minutes']}',
|
||||
cf_image_extension = '{$_POST['cf_image_extension']}',
|
||||
cf_flash_extension = '{$_POST['cf_flash_extension']}',
|
||||
cf_movie_extension = '{$_POST['cf_movie_extension']}',
|
||||
cf_formmail_is_member = '{$_POST['cf_formmail_is_member']}',
|
||||
cf_page_rows = '{$_POST['cf_page_rows']}',
|
||||
cf_mobile_page_rows = '{$_POST['cf_mobile_page_rows']}',
|
||||
cf_stipulation = '{$_POST['cf_stipulation']}',
|
||||
cf_privacy = '{$_POST['cf_privacy']}',
|
||||
cf_open_modify = '{$_POST['cf_open_modify']}',
|
||||
cf_memo_send_point = '{$_POST['cf_memo_send_point']}',
|
||||
cf_mobile_new_skin = '{$_POST['cf_mobile_new_skin']}',
|
||||
cf_mobile_search_skin = '{$_POST['cf_mobile_search_skin']}',
|
||||
cf_mobile_connect_skin = '{$_POST['cf_mobile_connect_skin']}',
|
||||
cf_mobile_faq_skin = '{$_POST['cf_mobile_faq_skin']}',
|
||||
cf_mobile_member_skin = '{$_POST['cf_mobile_member_skin']}',
|
||||
cf_captcha_mp3 = '{$_POST['cf_captcha_mp3']}',
|
||||
cf_editor = '{$_POST['cf_editor']}',
|
||||
cf_cert_use = '{$_POST['cf_cert_use']}',
|
||||
cf_cert_ipin = '{$_POST['cf_cert_ipin']}',
|
||||
cf_cert_hp = '{$_POST['cf_cert_hp']}',
|
||||
cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}',
|
||||
cf_cert_kcp_cd = '{$_POST['cf_cert_kcp_cd']}',
|
||||
cf_lg_mid = '{$_POST['cf_lg_mid']}',
|
||||
cf_lg_mert_key = '{$_POST['cf_lg_mert_key']}',
|
||||
cf_cert_limit = '{$_POST['cf_cert_limit']}',
|
||||
cf_cert_req = '{$_POST['cf_cert_req']}',
|
||||
cf_sms_use = '{$_POST['cf_sms_use']}',
|
||||
cf_sms_type = '{$_POST['cf_sms_type']}',
|
||||
cf_icode_id = '{$_POST['cf_icode_id']}',
|
||||
cf_icode_pw = '{$_POST['cf_icode_pw']}',
|
||||
cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}',
|
||||
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
|
||||
cf_googl_shorturl_apikey = '{$_POST['cf_googl_shorturl_apikey']}',
|
||||
cf_kakao_js_apikey = '{$_POST['cf_kakao_js_apikey']}',
|
||||
cf_facebook_appid = '{$_POST['cf_facebook_appid']}',
|
||||
cf_facebook_secret = '{$_POST['cf_facebook_secret']}',
|
||||
cf_twitter_key = '{$_POST['cf_twitter_key']}',
|
||||
cf_twitter_secret = '{$_POST['cf_twitter_secret']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
//sql_query(" OPTIMIZE TABLE `$g5['config_table']` ");
|
||||
|
||||
goto_url('./config_form.php', false);
|
||||
?>
|
||||
206
AvocadoEdition_Light/adm/contentform.php
Normal file
|
|
@ -0,0 +1,206 @@
|
|||
<?php
|
||||
$sub_menu = '300600';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
// 상단, 하단 파일경로 필드 추가
|
||||
if(!sql_query(" select co_include_head from {$g5['content_table']} limit 1 ", false)) {
|
||||
$sql = " ALTER TABLE `{$g5['content_table']}` ADD `co_include_head` VARCHAR( 255 ) NOT NULL ,
|
||||
ADD `co_include_tail` VARCHAR( 255 ) NOT NULL ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
|
||||
// html purifier 사용여부 필드
|
||||
if(!sql_query(" select co_tag_filter_use from {$g5['content_table']} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['content_table']}`
|
||||
ADD `co_tag_filter_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `co_content` ", true);
|
||||
sql_query(" update {$g5['content_table']} set co_tag_filter_use = '1' ");
|
||||
}
|
||||
|
||||
// 모바일 내용 추가
|
||||
if(!sql_query(" select co_mobile_content from {$g5['content_table']} limit 1", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['content_table']}`
|
||||
ADD `co_mobile_content` longtext NOT NULL AFTER `co_content` ", true);
|
||||
}
|
||||
|
||||
// 스킨 설정 추가
|
||||
if(!sql_query(" select co_skin from {$g5['content_table']} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['content_table']}`
|
||||
ADD `co_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_mobile_content`,
|
||||
ADD `co_mobile_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_skin` ", true);
|
||||
sql_query(" update {$g5['content_table']} set co_skin = 'basic', co_mobile_skin = 'basic' ");
|
||||
}
|
||||
|
||||
$html_title = "내용";
|
||||
$g5['title'] = $html_title.' 관리';
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
$html_title .= " 수정";
|
||||
$readonly = " readonly";
|
||||
|
||||
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$co = sql_fetch($sql);
|
||||
if (!$co['co_id'])
|
||||
alert('등록된 자료가 없습니다.');
|
||||
}
|
||||
else
|
||||
{
|
||||
$html_title .= ' 입력';
|
||||
$co['co_html'] = 2;
|
||||
$co['co_skin'] = 'basic';
|
||||
$co['co_mobile_skin'] = 'basic';
|
||||
}
|
||||
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
?>
|
||||
|
||||
<form name="frmcontentform" action="./contentformupdate.php" onsubmit="return frmcontentform_check(this);" method="post" enctype="MULTIPART/FORM-DATA" >
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="co_html" value="1">
|
||||
<input type="hidden" name="token" value="">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width:140px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_id">ID</label></th>
|
||||
<td>
|
||||
<?php echo help('20자 이내의 영문자, 숫자, _ 만 가능합니다.'); ?>
|
||||
<input type="text" value="<?php echo $co['co_id']; ?>" name="co_id" id ="co_id" required <?php echo $readonly; ?> class="required <?php echo $readonly; ?> frm_input" size="20" maxlength="20">
|
||||
<?php if ($w == 'u') { ?><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $co_id; ?>" target="_blank" class="btn_frmline">내용확인</a><?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_subject">제목</label></th>
|
||||
<td><input type="text" name="co_subject" value="<?php echo htmlspecialchars2($co['co_subject']); ?>" id="co_subject" required class="frm_input required" size="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">내용</th>
|
||||
<td><?php echo editor_html('co_content', get_text($co['co_content'], 0)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo get_skin_select('content', 'co_skin', 'co_skin', $co['co_skin'], 'required'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_tag_filter_use">태그 필터링 사용</label></th>
|
||||
<td>
|
||||
<?php echo help("내용에서 iframe 등의 태그를 사용하려면 사용안함으로 선택해 주십시오."); ?>
|
||||
<select name="co_tag_filter_use" id="co_tag_filter_use">
|
||||
<option value="1"<?php echo get_selected(1, $co['co_tag_filter_use']); ?>>사용함</option>
|
||||
<option value="0"<?php echo get_selected(0, $co['co_tag_filter_use']); ?>>사용안함</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
<?php echo help("설정값이 없으면 기본 상단 파일을 사용합니다."); ?>
|
||||
<input type="text" name="co_include_head" value="<?php echo $co['co_include_head']; ?>" id="co_include_head" class="frm_input" size="60">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_include_tail">하단 파일 경로</label></th>
|
||||
<td>
|
||||
<?php echo help("설정값이 없으면 기본 하단 파일을 사용합니다."); ?>
|
||||
<input type="text" name="co_include_tail" value="<?php echo $co['co_include_tail']; ?>" id="co_include_tail" class="frm_input" size="60">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_himg">상단이미지</label></th>
|
||||
<td>
|
||||
<input type="file" name="co_himg" id="co_himg">
|
||||
<?php
|
||||
$himg = G5_DATA_PATH.'/content/'.$co['co_id'].'_h';
|
||||
if (file_exists($himg)) {
|
||||
$size = @getimagesize($himg);
|
||||
if($size[0] && $size[0] > 750)
|
||||
$width = 750;
|
||||
else
|
||||
$width = $size[0];
|
||||
|
||||
echo '<input type="checkbox" name="co_himg_del" value="1" id="co_himg_del"> <label for="co_himg_del">삭제</label>';
|
||||
$himg_str = '<img src="'.G5_DATA_URL.'/content/'.$co['co_id'].'_h" width="'.$width.'" alt="">';
|
||||
}
|
||||
if ($himg_str) {
|
||||
echo '<div class="banner_or_img">';
|
||||
echo $himg_str;
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_timg">하단이미지</label></th>
|
||||
<td>
|
||||
<input type="file" name="co_timg" id="co_timg">
|
||||
<?php
|
||||
$timg = G5_DATA_PATH.'/content/'.$co['co_id'].'_t';
|
||||
if (file_exists($timg)) {
|
||||
$size = @getimagesize($timg);
|
||||
if($size[0] && $size[0] > 750)
|
||||
$width = 750;
|
||||
else
|
||||
$width = $size[0];
|
||||
|
||||
echo '<input type="checkbox" name="co_timg_del" value="1" id="co_timg_del"> <label for="co_timg_del">삭제</label>';
|
||||
$timg_str = '<img src="'.G5_DATA_URL.'/content/'.$co['co_id'].'_t" width="'.$width.'" alt="">';
|
||||
}
|
||||
if ($timg_str) {
|
||||
echo '<div class="banner_or_img">';
|
||||
echo $timg_str;
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<a href="./contentlist.php" title="목록" class="btn ty2"><span class="material-icons">list</span></a>
|
||||
<div class="btn">
|
||||
<span class="material-icons">save</span>
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function frmcontentform_check(f)
|
||||
{
|
||||
errmsg = "";
|
||||
errfld = "";
|
||||
|
||||
<?php echo get_editor_js('co_content'); ?>
|
||||
<?php echo chk_editor_js('co_content'); ?>
|
||||
|
||||
check_field(f.co_id, "ID를 입력하세요.");
|
||||
check_field(f.co_subject, "제목을 입력하세요.");
|
||||
check_field(f.co_content, "내용을 입력하세요.");
|
||||
|
||||
if (errmsg != "") {
|
||||
alert(errmsg);
|
||||
errfld.focus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
99
AvocadoEdition_Light/adm/contentformupdate.php
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
<?php
|
||||
$sub_menu = '300600';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == "u" || $w == "d")
|
||||
check_demo();
|
||||
|
||||
if ($w == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
@mkdir(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
|
||||
|
||||
if ($co_himg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_h");
|
||||
if ($co_timg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_t");
|
||||
|
||||
$error_msg = '';
|
||||
|
||||
if( $co_include_head && ! is_include_path_check($co_include_head) ){
|
||||
$co_include_head = '';
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
if( $co_include_tail && ! is_include_path_check($co_include_tail) ){
|
||||
$co_include_tail = '';
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
$sql_common = " co_include_head = '$co_include_head',
|
||||
co_include_tail = '$co_include_tail',
|
||||
co_html = '$co_html',
|
||||
co_tag_filter_use = '$co_tag_filter_use',
|
||||
co_subject = '$co_subject',
|
||||
co_content = '$co_content',
|
||||
co_mobile_content = '$co_mobile_content',
|
||||
co_skin = '$co_skin',
|
||||
co_mobile_skin = '$co_mobile_skin' ";
|
||||
|
||||
if ($w == "")
|
||||
{
|
||||
//if(eregi("[^a-z0-9_]", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
||||
if(preg_match("/[^a-z0-9_]/i", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
||||
|
||||
$sql = " select co_id from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['co_id'])
|
||||
alert("이미 같은 ID로 등록된 내용이 있습니다.");
|
||||
|
||||
$sql = " insert {$g5['content_table']}
|
||||
set co_id = '$co_id',
|
||||
$sql_common ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
$sql = " update {$g5['content_table']}
|
||||
set $sql_common
|
||||
where co_id = '$co_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
@unlink(G5_DATA_PATH."/content/{$co_id}_h");
|
||||
@unlink(G5_DATA_PATH."/content/{$co_id}_t");
|
||||
|
||||
$sql = " delete from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if ($w == "" || $w == "u")
|
||||
{
|
||||
if ($_FILES['co_himg']['name'])
|
||||
{
|
||||
$dest_path = G5_DATA_PATH."/content/".$co_id."_h";
|
||||
@move_uploaded_file($_FILES['co_himg']['tmp_name'], $dest_path);
|
||||
@chmod($dest_path, G5_FILE_PERMISSION);
|
||||
}
|
||||
if ($_FILES['co_timg']['name'])
|
||||
{
|
||||
$dest_path = G5_DATA_PATH."/content/".$co_id."_t";
|
||||
@move_uploaded_file($_FILES['co_timg']['tmp_name'], $dest_path);
|
||||
@chmod($dest_path, G5_FILE_PERMISSION);
|
||||
}
|
||||
|
||||
if( $error_msg ){
|
||||
alert($error_msg, "./contentform.php?w=u&co_id=$co_id");
|
||||
} else {
|
||||
goto_url("./contentform.php?w=u&co_id=$co_id");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
goto_url("./contentlist.php");
|
||||
}
|
||||
?>
|
||||
105
AvocadoEdition_Light/adm/contentlist.php
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
<?php
|
||||
$sub_menu = '300600';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
if( !isset($g5['content_table']) ){
|
||||
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'content_table\'] = G5_TABLE_PREFIX.\'content\';</strong> 를 추가해 주세요.');
|
||||
}
|
||||
//내용(컨텐츠)정보 테이블이 있는지 검사한다.
|
||||
if(!sql_query(" DESCRIBE {$g5['content_table']} ", false)) {
|
||||
if(sql_query(" DESCRIBE {$g5['g5_shop_content_table']} ", false)) {
|
||||
sql_query(" ALTER TABLE {$g5['g5_shop_content_table']} RENAME TO `{$g5['content_table']}` ;", false);
|
||||
} else {
|
||||
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['content_table']}` (
|
||||
`co_id` varchar(20) NOT NULL DEFAULT '',
|
||||
`co_html` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`co_subject` varchar(255) NOT NULL DEFAULT '',
|
||||
`co_content` longtext NOT NULL,
|
||||
`co_hit` int(11) NOT NULL DEFAULT '0',
|
||||
`co_include_head` varchar(255) NOT NULL,
|
||||
`co_include_tail` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`co_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||
|
||||
// 내용관리 생성
|
||||
sql_query(" insert into `{$g5['content_table']}` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '<p align=center><b>회사소개에 대한 내용을 입력하십시오.</b></p>' ", false );
|
||||
sql_query(" insert into `{$g5['content_table']}` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 처리방침', co_content= '<p align=center><b>개인정보 처리방침에 대한 내용을 입력하십시오.</b></p>' ", false );
|
||||
sql_query(" insert into `{$g5['content_table']}` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '<p align=center><b>서비스 이용약관에 대한 내용을 입력하십시오.</b></p>' ", false );
|
||||
}
|
||||
}
|
||||
|
||||
$g5['title'] = '내용관리';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$sql_common = " from {$g5['content_table']} where co_subject != '' ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select count(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = "select * $sql_common order by co_id limit $from_record, {$config['cf_page_rows']} ";
|
||||
$result = sql_query($sql);
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php if ($page > 1) {?><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>">처음으로</a><?php } ?>
|
||||
<span>전체 내용 <?php echo $total_count; ?>건</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="btn_confirm">
|
||||
<a href="./contentform.php" class="btn"><span class="material-icons">add</span></a>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" style="width:100px;">ID</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col" style="width:100px;">미리보기</th>
|
||||
<th scope="col" style="width:100px;">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_id"><?php echo $row['co_id']; ?></td>
|
||||
<td><?php echo htmlspecialchars2($row['co_subject']); ?></td>
|
||||
<td>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $row['co_id']; ?>" target="_blank"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span> 보기</a>
|
||||
</td>
|
||||
<td class="td_mng">
|
||||
<a href="./contentform.php?w=u&co_id=<?php echo $row['co_id']; ?>"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>수정</a>
|
||||
|
||||
<a href="./contentformupdate.php?w=d&co_id=<?php echo $row['co_id']; ?>" onclick="return delete_confirm(this);"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="4" class="empty_table">자료가 한건도 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
208
AvocadoEdition_Light/adm/css/admin.css
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
@charset "utf-8";
|
||||
@import url(./jquery.minicolors.css);
|
||||
@import url(//fonts.googleapis.com/earlyaccess/notosanskr.css);
|
||||
@font-face {
|
||||
font-family:'icon';
|
||||
src: url('../../css/fonts/icomoon.eot?y5isk6');
|
||||
src: url('../../css/fonts/icomoon.eot?y5isk6#iefix') format('embedded-opentype'),
|
||||
url('../../css/fonts/icomoon.ttf?y5isk6') format('truetype'),
|
||||
url('../../css/fonts/icomoon.woff?y5isk6') format('woff'),
|
||||
url('../../css/fonts/icomoon.svg?y5isk6#icomoon') format('svg');
|
||||
font-weight:normal;
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
/* 초기화 */
|
||||
html {overflow-y:scroll}
|
||||
body {margin:0;padding:0;background:#fff;color:#000;font-size:12px; min-width:1400px;}
|
||||
body.popup-body {min-width:0px;}
|
||||
html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0}
|
||||
h1, h2, h3, h4, h5, h6 {}
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
|
||||
header ul, nav ul, aside ul, footer ul {margin:0;padding:0;list-style:none}
|
||||
label, input, button, select, img {vertical-align:middle}
|
||||
textarea, select {}
|
||||
input {margin:0;padding:0;border-radius:0;}
|
||||
input[type=text], input[type=password], input[type=submit], input[type=image] {-webkit-appearance:none}
|
||||
button {border-radius:0;-webkit-appearance:none;cursor:pointer}
|
||||
p {margin:0;padding:0;word-break:break-all}
|
||||
hr {display:none}
|
||||
pre {overflow-x:scroll;}
|
||||
a {color:#000;text-decoration:none}
|
||||
a:focus, a:hover, a:active {text-decoration:underline}
|
||||
caption {display:none;}
|
||||
.cke_sc,
|
||||
.sound_only {display:none;}
|
||||
|
||||
input[type="file"] {font-size:12px; border:1px solid #dde3e0; height:28px;}
|
||||
input[type="number"],
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
select,
|
||||
textarea {
|
||||
border:1px solid #dde3e0;
|
||||
box-sizing:border-box;
|
||||
font-family:'Dotum';
|
||||
font-size:12px;
|
||||
}
|
||||
input[type="number"],
|
||||
input[type="text"],
|
||||
input[type="password"] {padding:0 8px;}
|
||||
input[type="number"],
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
select {height:28px; padding-left:8px;}
|
||||
textarea {width:100%; height:150px;}
|
||||
input[type="number"] {text-align:center; padding:0;}
|
||||
|
||||
label {cursor:pointer;}
|
||||
|
||||
label + input {margin-left:10px;}
|
||||
|
||||
|
||||
.txt-center {text-align:center !important;}
|
||||
.txt-left {text-align:left !important;}
|
||||
.txt-right {text-align:right !important;}
|
||||
|
||||
.frm_info {display:block; margin-bottom:5px; font-size:11px; font-family:'Dotum'; color:#ebb4ab;}
|
||||
.single-info .frm_info {margin-bottom:0;}
|
||||
|
||||
.full {width:100% !important;}
|
||||
.empty_table {line-height:200px;}
|
||||
|
||||
#container {font-family:'Noto Sans KR', sans-serif;}
|
||||
#container section {position:relative; padding-bottom:50px;}
|
||||
#container h2 {font-size:18px; font-weight:300; margin-bottom:10px; line-height:30px;}
|
||||
#container h2:before {content:"\e90b"; font-family:'icon'; padding-right:5px; color:#4b4b47;}
|
||||
#container h3 {font-size:15px; font-weight:300; margin-bottom:10px; line-height:30px;}
|
||||
|
||||
.local_ov {border-bottom:1px solid #efeff1; margin-bottom:10px; padding-bottom:10px; font-size:13px; font-weight:300;}
|
||||
|
||||
.ov_listall {display:block; position:relative; float:left; padding:0 10px 0 0; margin-right:10px; text-decoration:none; color:#d18686;}
|
||||
.ov_listall:before {content:""; display:block; position:absolute; right:0; top:3px; bottom:3px; width:1px; background:#e1e1e1;}
|
||||
|
||||
.local_desc {background:#fff0f0; padding:5px 10px; border:1px solid #ecc6c6; color:#5b5b5a; margin-bottom:10px; line-height:1.8em;}
|
||||
.local_desc .point {color:#d18686;}
|
||||
.local_desc.pos-top {margin-top:10px; margin-bottom:0;}
|
||||
|
||||
.pg_wrap {display:block; position:relative; text-align:center; padding:0 0 30px 0;}
|
||||
|
||||
.pg_wrap strong,
|
||||
.pg_wrap a {display:inline-block; padding:0 10px; min-width:10px; height:30px; line-height:30px; text-align:center; border:1px solid #dadada; text-decoration:none;}
|
||||
.pg_wrap strong {background:#d18686; color:#fff; border-color:#22a3a5;}
|
||||
|
||||
.btn_list01 {position:relative; padding:20px 0;}
|
||||
.local_desc.pos-top + .btn_list01 {padding-top:10px;}
|
||||
.btn_list01 * {padding:10px 15px; vertical-align:middle;}
|
||||
|
||||
.btn_list03 {position:absolute; top:5px; right:0;}
|
||||
.btn_list03 * {padding:5px 10px;}
|
||||
|
||||
.btn_add01 * {padding:10px 15px; vertical-align:middle;}
|
||||
|
||||
.btn_list a,
|
||||
.btn_list button,
|
||||
.btn_list input {display:inline-block; background:#d18686; color:#fff; font-weight:400; text-decoration:none; border:none; line-height:1.0em; cursor:pointer;}
|
||||
|
||||
.btn_add {float:right; clear:both; margin-bottom:10px;}
|
||||
.btn_add a,
|
||||
.btn_add button,
|
||||
.btn_add input {display:inline-block; background:#d18686; color:#fff; font-size:13px; font-weight:400; text-decoration:none; border:none; line-height:1.0em; cursor:pointer;}
|
||||
|
||||
.btn_frmline {display:inline-block; background:#d18686; color:#fff; font-weight:400; padding:0 15px; text-decoration:none; border:none; line-height:28px; cursor:pointer; vertical-align:middle;}
|
||||
|
||||
.btn_del_menu {display:inline-block; color:#d18686; font-size:13px; font-weight:400; border:none; line-height:1.0em; background:transparent; cursor:pointer;}
|
||||
|
||||
.sv {display:none !important;}
|
||||
.anchor {display:block; position:relative; clear:both; padding:0; margin:0 0 10px 0; overflow:hidden;}
|
||||
.anchor li {display:block; float:left; list-style:none; margin:0;}
|
||||
.anchor li a {display:block; position:relative; padding:5px 10px; text-decoration:none; margin:0 1px; color:#62656c; border-radius:9.0em; box-sizing:border-box; z-index:1;}
|
||||
.anchor li:first-child a {border-left-width:0;}
|
||||
|
||||
.anchor li.on a,
|
||||
#anc_001 a[href="#anc_001"],
|
||||
#anc_002 a[href="#anc_002"],
|
||||
#anc_003 a[href="#anc_003"],
|
||||
#anc_004 a[href="#anc_004"],
|
||||
#anc_005 a[href="#anc_005"],
|
||||
#anc_006 a[href="#anc_006"],
|
||||
#anc_007 a[href="#anc_007"],
|
||||
#anc_008 a[href="#anc_008"],
|
||||
#anc_009 a[href="#anc_009"],
|
||||
#anc_010 a[href="#anc_010"],
|
||||
#anc_011 a[href="#anc_011"],
|
||||
#anc_012 a[href="#anc_012"],
|
||||
#anc_013 a[href="#anc_013"],
|
||||
#anc_014 a[href="#anc_014"],
|
||||
#anc_015 a[href="#anc_015"],
|
||||
#anc_016 a[href="#anc_016"] {background:#b0c4de; color:#fff;}
|
||||
|
||||
.color-preview {display:inline-block; width:25px; height:25px; border:1px solid #cacaca; vertical-align:middle;}
|
||||
.admin-icon-box {display:inline-block; min-width:25px; height:25px; border:1px solid #cacaca; vertical-align:middle;}
|
||||
|
||||
table {border-spacing:0px;}
|
||||
|
||||
.tbl_wrap table {width:100%; border-collapse:collapse; table-layout:fixed;}
|
||||
|
||||
.tbl_head01 thead {}
|
||||
.tbl_head01 thead th {background:#f9f9f9; font-weight:300; padding:8px 10px; border:1px solid #efeff1; font-size:13px; color:#5b5b5a;}
|
||||
|
||||
.tbl_head01 .bo-right {border-right-width:1px !important;}
|
||||
.tbl_head01 .bo-left {border-left-width:1px !important;}
|
||||
.tbl_head01 .bo-top {border-top-width:1px !important;}
|
||||
|
||||
.tbl_head01 .bo-no-right {border-right-width:0px !important;}
|
||||
.tbl_head01 .bo-no-left {border-left-width:0px !important;}
|
||||
.tbl_head01 .bo-no-top {border-top-width:0px !important;}
|
||||
.tbl_head01 .bo-no-bottom {border-bottom-width:0px !important;}
|
||||
|
||||
|
||||
.tbl_head01 tbody td {text-align:center; padding:7px 10px; color:#5b5b5a; border:1px solid #efeff1; border-top-width:0; border-left-width:0; height:30px;}
|
||||
.tbl_head01 tbody td:first-child {border-left-width:1px;}
|
||||
.tbl_head01 tbody td a {color:#d18686;}
|
||||
|
||||
|
||||
.tbl_head01 tfoot th,
|
||||
.tbl_head01 tfoot td {background:#f9f9f9; font-weight:300; padding:8px 10px; border:1px solid #efeff1; border-top-width:0; border-left-width:0; font-size:13px; color:#5b5b5a;}
|
||||
.tbl_head01 tfoot td:first-child,
|
||||
.tbl_head01 tfoot th:first-child {border-left-width:1px;}
|
||||
|
||||
.tbl_frm01 table {border-top:1px solid #efeff5;}
|
||||
.tbl_frm01 tbody th,
|
||||
.tbl_frm01 tbody td {color:#5b5b5a; font-weight:400; padding:10px; border:0px solid #efeff5; border-bottom-width:1px;}
|
||||
.tbl_frm01 tbody th {background:#f9f9f9; border-right-width:1px;}
|
||||
.tbl_frm01 tbody th.bo-right,
|
||||
.tbl_frm01 tbody td.bo-right {border-right-width:1px;}
|
||||
.tbl_frm01 tbody th.bo-left,
|
||||
.tbl_frm01 tbody td.bo-left {border-left-width:1px;}
|
||||
.tbl_frm01 tbody th.bo-top,
|
||||
.tbl_frm01 tbody td.bo-top {border-top-width:1px;}
|
||||
.tbl_frm01 tbody th + td.bo-left {border-left-width:0px !important;}
|
||||
|
||||
.index-gnb {display:block; font-size:13px;}
|
||||
.index-gnb > ul > li {display:table; width:100%; table-layout:fixed; overflow:hidden; border-bottom:1px solid rgba(255,255,255,.2);}
|
||||
.index-gnb > ul > li > * {display:table-cell;}
|
||||
.index-gnb > ul > li > a {width:130px; background:#353942; color:#fff; text-align:center; vertical-align:middle; font-size:14px;}
|
||||
.index-gnb > ul > li > ul {display:block; padding:10px; background:#eaeaea;}
|
||||
.index-gnb > ul > li > ul > li {display:inline-block; min-width:130px; vertical-align:middle; padding:5px 0;}
|
||||
|
||||
.prev_thumb {max-width:100px; max-height:50px;}
|
||||
.banner-thumb {max-width:200px; max-height:100px;}
|
||||
.character-thumb {max-width:200px; max-height:500px;}
|
||||
|
||||
|
||||
.ajax-list-box {height:70px; overflow-y:auto; border:1px solid #eaeaea; margin-top:10px; padding:5px;}
|
||||
.ajax-list-box ul,
|
||||
.ajax-list-box li {display:block; margin:0; padding:0; position:relative;}
|
||||
.ajax-list-box li {margin-bottom:5px;}
|
||||
.ajax-list-box li a {display:block; position:relative; padding:10px; border-radius:3px; color:#2a2d2a; background:#fafafa; text-decoration:none; font-size:12px;}
|
||||
|
||||
.ajax-list-box li a p.point {color:#d18686;}
|
||||
.ajax-list-box li a:hover {color:#fff; background:#3a3a3a;}
|
||||
.ajax-list-box li a .ui-thumb {position:absolute; top:10px; left:10px; width:30px; line-height:30px; overflow:hidden; text-align:center;}
|
||||
.ajax-list-box li a .ui-thumb img {max-width:100%;}
|
||||
.ajax-list-box li a .ui-info {margin-left:40px;}
|
||||
.ajax-list-box .no-data {line-height:50px; text-align:center; margin-top:10px;}
|
||||
|
||||
.visit_bar {position:relative}
|
||||
.visit_bar span {position:absolute;top:-8px;left:0;height:15px;background:#d18686}
|
||||
87
AvocadoEdition_Light/adm/css/admin.layout.css
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
@charset "utf-8";
|
||||
html,
|
||||
body {height:100%;}
|
||||
#wrap {}
|
||||
|
||||
#header {display:block; position:fixed; left:0; bottom:0; top:0; width:200px; min-height:100%; background:#1d1d1f; vertical-align:top; z-index:999;}
|
||||
#header:after {content:""; display:block; position:absolute; top:0; bottom:0; right:0; width:1px; background:#171b26; z-index:0;}
|
||||
#admin_prof {display:block; position:relative; width:200px; height:100px; padding-bottom:30px; background:#ecc6c6; border-right:1px solid #d18686; box-sizing:border-box; z-index:1;}
|
||||
#admin_prof h1 {position:relative; text-align:center; line-height:70px;}
|
||||
#admin_prof h1 img {position:relative; z-index:0;}
|
||||
#admin_prof h1 i {display:block; position:absolute; bottom:5px;right:10px; font-size:11px; font-style:normal; font-weight:400; line-height:1.0em; color:#d18686; z-index:1;}
|
||||
#admin_prof p {position:absolute; bottom:0; left:0; right:0; height:30px; margin:0; background:rgba(0,0,0,.2);}
|
||||
#admin_prof a:hover {color:#fff !important;}
|
||||
#admin_prof .name {display:block; position:relative; padding-right:30px; padding-left:15px; font-size:13px; line-height:30px; color:#fff; text-decoration:none; font-family:'Noto Sans KR', sans-serif;}
|
||||
|
||||
#admin_prof .logout {display:block; position:absolute; top:0; bottom:0; right:0; width:30px; height:30px; overflow:hidden; text-indent:-999px;}
|
||||
#admin_prof .logout:before {content:"\e984"; font-family:'icon'; color:#fff; font-size:12px; position:absolute; top:0; right:0; bottom:0; left:0; line-height:30px; text-align:center; text-indent:0;}
|
||||
|
||||
#page_top {position:fixed; top:0; left:200px; right:0; height:71px; box-sizing:border-box; border-bottom:1px solid #131a24; background:#1d1d1f; z-index:999;}
|
||||
#page_top h2 {position:absolute; top:0; left:0; bottom:0; line-height:70px; padding-left:40px; font-size:20px; font-family:'Noto Sans KR', sans-serif; color:#c3c8cc; font-weight:300;}
|
||||
#page_top a {display:block; position:relative; width:70px; height:70px; float:right; border-left:1px solid #4d515c; overflow:hidden; color:#c3c8cc; text-indent:-999px;}
|
||||
#page_top a:before {display:block; position:absolute; top:0; left:0; right:0; bottom:0; font-family:'icon'; line-height:70px; font-size:25px; text-align:center; text-indent:0;}
|
||||
#page_top a:hover {color:#fff; background:#e7604a; border-color:#a6240d;}
|
||||
#page_top a.ico-home:before {content:"\e900";}
|
||||
#page_top a.ico-dev:before {content:"\e995";}
|
||||
|
||||
.btn_confirm {display:block; position:fixed; top:0; right:0; z-index:9999; padding:0;}
|
||||
.btn_confirm > * {display:block; position:relative; height:71px; width:71px; float:left; border:none; border-left:1px solid rgba(255,255,255,.1); background:#ecc6c6; color:#fff; cursor:pointer;}
|
||||
.btn_confirm > *.ty2 {background:#d18686;}
|
||||
.btn_confirm > *.ty3 {background:#b0c4de;}
|
||||
.btn_confirm .btn > span {display:block; position:absolute; top:50%; left:0; right:0; text-align:center; transform:translateY(-50%); -webkit-transform:translateY(-50%); z-index:0;}
|
||||
.btn_confirm .btn > input {display:block; position:absolute; width:100%; height:100%; opacity:0; z-index:1; cursor:pointer;}
|
||||
|
||||
|
||||
#wrapper {position:relative; display:block; padding:71px 0 0 200px;}
|
||||
|
||||
|
||||
|
||||
#gnb {display:block; position:relative; padding-top:20px; font-family:'Noto Sans KR', sans-serif;}
|
||||
#gnb > ul > li > a {display:block; padding:10px 20px; color:#9da4b3; font-size:15px; text-decoration:none;}
|
||||
#gnb .gnb_2dli {position:relative;}
|
||||
#gnb .gnb_2dli > a {display:block; padding:10px 20px 10px 25px; color:#acaeb2; font-size:13px;}
|
||||
#gnb .gnb_2dli > a:before {font-family:'icon'; padding-right:7px;}
|
||||
#gnb .gnb_2dli.check:after {content:"\ea10"; font-family:'icon'; display:block; position:absolute; top:0; right:10px; line-height:39px; color:#e76148;}
|
||||
|
||||
#gnb .gnb_2dli > a:hover {color:#fff; background:#484c58; text-decoration:none; font-weight:100;}
|
||||
|
||||
#gnb .gnb_2dul {display:none; background:#262931;}
|
||||
#gnb .gnb_2dli.check > a:after {content:""; display:block; position:absolute;}
|
||||
|
||||
#gnb .gnb_2dli > a:before {content:"\e994";}
|
||||
|
||||
|
||||
#gnb .gnb_2dli > a[data-text="메뉴 설정"]:before {content:"\EA72";}
|
||||
#gnb .gnb_2dli > a[data-text="환경설정"]:before {content:"\e994";}
|
||||
#gnb .gnb_2dli > a[data-text="메인 편집"]:before {content:"\e956";}
|
||||
#gnb .gnb_2dli > a[data-text="디자인 설정"]:before {content:"\e90c";}
|
||||
#gnb .gnb_2dli > a[data-text="DB관리"]:before {content:"\e964";}
|
||||
|
||||
#gnb .gnb_2dli > a[data-text="회원관리"]:before {content:"\e923";}
|
||||
#gnb .gnb_2dli > a[data-text="접속자집계"]:before {content:"\e99c";}
|
||||
#gnb .gnb_2dli > a[data-text="접속자검색"]:before {content:"\e986";}
|
||||
#gnb .gnb_2dli > a[data-text="접속자로그삭제"]:before {content:"\e988";}
|
||||
|
||||
#gnb .gnb_2dli > a[data-text="게시판관리"]:before {content:"\e9ba";}
|
||||
#gnb .gnb_2dli > a[data-text="게시판그룹관리"]:before {content:"\e9bc";}
|
||||
#gnb .gnb_2dli > a[data-text="내용관리"]:before {content:"\e908";}
|
||||
#gnb .gnb_2dli > a[data-text="이모티콘관리"]:before {content:"\e9e1";}
|
||||
|
||||
|
||||
#container {padding:25px;}
|
||||
#fsearch input {margin:0;}
|
||||
#fsearch .btn_submit {border:none; background:#ecc6c6; color:#fff; font-size:13px; width:50px; height:28px; cursor:pointer; line-height:1.0em;}
|
||||
|
||||
.new_win {padding:20px;}
|
||||
.new_win_desc {padding:10px; margin:20px 0; background:#ecc6c6; color:#fff;}
|
||||
.win-guide {display:block; position:relative; padding:10px; border:1px solid #efeff5; background:#f9f9f9;}
|
||||
.win-guide em {color:#d18686; font-weight:800; font-style:normal; padding:0 10px;}
|
||||
.btn_win02 {padding:20px; text-align:center;}
|
||||
.btn_win02 > * {display:inline-block; background:#d18686; color:#fff; font-size:13px; height:30px; padding:0 20px;font-weight:400; text-decoration:none; border:none; line-height:1.0em; cursor:pointer;}
|
||||
|
||||
.add_select {display:inline-block; background:#b0c4de; color:#fff; font-size:13px; height:30px; padding:0 20px;font-weight:400; text-decoration:none; border:none; line-height:1.0em; cursor:pointer;}
|
||||
.full_input {width:100% !important;}
|
||||
|
||||
.menu_list[data-name="구분선"] td {background:#efeff1;}
|
||||
.menu_list[data-name="구분선"] .td_category ~ td:not(.order) input,
|
||||
.menu_list[data-name="구분선"] .td_category ~ td:not(.order) select{display:none;}
|
||||
27
AvocadoEdition_Light/adm/css/guide.css
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
@charset "utf-8";
|
||||
|
||||
|
||||
/*********************************
|
||||
사전정의
|
||||
**********************************/
|
||||
html.single:before {display:none !important;}
|
||||
|
||||
h1 {display:block; position:relative; font-size:1.5em; background:#1d1d1f; color:#fff; padding:1em;}
|
||||
.previewWrap {position:relative; padding:20px;}
|
||||
.admin-preview-box {display:block; position:relative; padding:1em; border:1px solid rgba(0,0,0,.2);}
|
||||
|
||||
.previewWrap h2 {display:block; position:relative; font-size:15px; margin-bottom:.6em;}
|
||||
.previewWrap * ~ h2 {margin-top:1.2em;}
|
||||
|
||||
.gnbWrap .link {display:inline-block; position:relative;}
|
||||
.gnbWrap .icons {display:block; position:relative; width:3em; height:3em; z-index:1;}
|
||||
.gnbWrap .icons:before {content:""; display:block; position:absolute; z-index:0; top:.1em; left:.1em; right:.1em; bottom:.1em; box-sizing:border-box;}
|
||||
.gnbWrap .icons > span {display:table; width:100%; height:100%; position:relative; z-index:1;}
|
||||
.gnbWrap .icons > span > * {display:table-cell; vertical-align:middle; text-align:center;}
|
||||
.gnbWrap .tooltips {display:block; position:absolute; padding:2px 15px; margin-left:.5em; left:100%; top:50%; white-space:nowrap; transform:translateY(-50%); -webkit=transform:translateY(-50%); }
|
||||
|
||||
.admin-preview-box .ui-btn {margin:2px;}
|
||||
|
||||
.admin-preview-box input,
|
||||
.admin-preview-box select,
|
||||
.admin-preview-box textarea {margin:2px;}
|
||||
445
AvocadoEdition_Light/adm/css/jquery.minicolors.css
Normal file
|
|
@ -0,0 +1,445 @@
|
|||
.minicolors {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.minicolors-sprite {
|
||||
background-image: url(jquery.minicolors.png);
|
||||
}
|
||||
|
||||
.minicolors-swatch {
|
||||
position: absolute;
|
||||
vertical-align: middle;
|
||||
background-position: -80px 0;
|
||||
cursor: text;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.minicolors-swatch::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.minicolors-swatch-color {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.minicolors input[type=hidden] + .minicolors-swatch {
|
||||
width: 28px;
|
||||
position: static;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.minicolors input[type=hidden][disabled] + .minicolors-swatch {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* Panel */
|
||||
.minicolors-panel {
|
||||
position: absolute;
|
||||
width: 173px;
|
||||
background: white;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, .2);
|
||||
z-index: 99999;
|
||||
box-sizing: content-box;
|
||||
display: none;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.minicolors-panel.minicolors-visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Panel positioning */
|
||||
.minicolors-position-top .minicolors-panel {
|
||||
top: -154px;
|
||||
}
|
||||
|
||||
.minicolors-position-right .minicolors-panel {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.minicolors-position-bottom .minicolors-panel {
|
||||
top: auto;
|
||||
}
|
||||
|
||||
.minicolors-position-left .minicolors-panel {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.minicolors-with-opacity .minicolors-panel {
|
||||
width: 194px;
|
||||
}
|
||||
|
||||
.minicolors .minicolors-grid {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
left: 1px; /* LTR */
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
margin-bottom: 2px;
|
||||
background-position: -120px 0;
|
||||
cursor: crosshair;
|
||||
}
|
||||
[dir=rtl] .minicolors .minicolors-grid {
|
||||
right: 1px;
|
||||
}
|
||||
|
||||
.minicolors .minicolors-grid-inner {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.minicolors-slider-saturation .minicolors-grid {
|
||||
background-position: -420px 0;
|
||||
}
|
||||
|
||||
.minicolors-slider-saturation .minicolors-grid-inner {
|
||||
background-position: -270px 0;
|
||||
background-image: inherit;
|
||||
}
|
||||
|
||||
.minicolors-slider-brightness .minicolors-grid {
|
||||
background-position: -570px 0;
|
||||
}
|
||||
|
||||
.minicolors-slider-brightness .minicolors-grid-inner {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.minicolors-slider-wheel .minicolors-grid {
|
||||
background-position: -720px 0;
|
||||
}
|
||||
|
||||
.minicolors-slider,
|
||||
.minicolors-opacity-slider {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 152px; /* LTR */
|
||||
width: 20px;
|
||||
height: 150px;
|
||||
background-color: white;
|
||||
background-position: 0 0;
|
||||
cursor: row-resize;
|
||||
}
|
||||
[dir=rtl] .minicolors-slider,
|
||||
[dir=rtl] .minicolors-opacity-slider {
|
||||
right: 152px;
|
||||
}
|
||||
|
||||
.minicolors-slider-saturation .minicolors-slider {
|
||||
background-position: -60px 0;
|
||||
}
|
||||
|
||||
.minicolors-slider-brightness .minicolors-slider {
|
||||
background-position: -20px 0;
|
||||
}
|
||||
|
||||
.minicolors-slider-wheel .minicolors-slider {
|
||||
background-position: -20px 0;
|
||||
}
|
||||
|
||||
.minicolors-opacity-slider {
|
||||
left: 173px; /* LTR */
|
||||
background-position: -40px 0;
|
||||
display: none;
|
||||
}
|
||||
[dir=rtl] .minicolors-opacity-slider {
|
||||
right: 173px;
|
||||
}
|
||||
|
||||
.minicolors-with-opacity .minicolors-opacity-slider {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Pickers */
|
||||
.minicolors-grid .minicolors-picker {
|
||||
position: absolute;
|
||||
top: 70px;
|
||||
left: 70px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
|
||||
border-radius: 10px;
|
||||
margin-top: -6px;
|
||||
margin-left: -6px;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.minicolors-grid .minicolors-picker > div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 8px;
|
||||
border: solid 2px white;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.minicolors-picker {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 18px;
|
||||
height: 3px;
|
||||
background: white;
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
|
||||
border-radius: 2px;
|
||||
margin-top: -2px;
|
||||
margin-left: 1px;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/* Swatches */
|
||||
.minicolors-swatches,
|
||||
.minicolors-swatches li {
|
||||
margin: 5px 0 3px 5px; /* LTR */
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
[dir=rtl] .minicolors-swatches,
|
||||
[dir=rtl] .minicolors-swatches li {
|
||||
margin: 5px 5px 3px 0;
|
||||
}
|
||||
|
||||
.minicolors-swatches .minicolors-swatch {
|
||||
position: relative;
|
||||
float: left; /* LTR */
|
||||
cursor: pointer;
|
||||
margin: 0 4px 0 0; /* LTR */
|
||||
}
|
||||
[dir=rtl] .minicolors-swatches .minicolors-swatch {
|
||||
float: right;
|
||||
margin: 0 0 0 4px;
|
||||
}
|
||||
|
||||
.minicolors-with-opacity .minicolors-swatches .minicolors-swatch {
|
||||
margin-right: 7px; /* LTR */
|
||||
}
|
||||
[dir=rtl] .minicolors-with-opacity .minicolors-swatches .minicolors-swatch {
|
||||
margin-right: 0;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
.minicolors-swatch.selected {
|
||||
border-color: #000;
|
||||
}
|
||||
|
||||
/* Inline controls */
|
||||
.minicolors-inline {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.minicolors-inline .minicolors-input {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.minicolors-inline .minicolors-panel {
|
||||
position: relative;
|
||||
top: auto;
|
||||
left: auto; /* LTR */
|
||||
box-shadow: none;
|
||||
z-index: auto;
|
||||
display: inline-block;
|
||||
}
|
||||
[dir=rtl] .minicolors-inline .minicolors-panel {
|
||||
right: auto;
|
||||
}
|
||||
|
||||
/* Default theme */
|
||||
.minicolors-theme-default .minicolors-swatch {
|
||||
top: 5px;
|
||||
left: 5px; /* LTR */
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-default .minicolors-swatch {
|
||||
right: 5px;
|
||||
}
|
||||
.minicolors-theme-default .minicolors-swatches .minicolors-swatch {
|
||||
margin-bottom: 2px;
|
||||
top: 0;
|
||||
left: 0; /* LTR */
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-default .minicolors-swatches .minicolors-swatch {
|
||||
right: 0;
|
||||
}
|
||||
.minicolors-theme-default.minicolors-position-right .minicolors-swatch {
|
||||
left: auto; /* LTR */
|
||||
right: 5px; /* LTR */
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-default.minicolors-position-left .minicolors-swatch {
|
||||
right: auto;
|
||||
left: 5px;
|
||||
}
|
||||
.minicolors-theme-default.minicolors {
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
}
|
||||
.minicolors-theme-default .minicolors-input {width:100px !important;
|
||||
height: 28px;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
padding-left: 26px; /* LTR */
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-default .minicolors-input {
|
||||
text-align: right;
|
||||
unicode-bidi: plaintext;
|
||||
padding-left: 1px;
|
||||
padding-right: 26px;
|
||||
}
|
||||
.minicolors-theme-default.minicolors-position-right .minicolors-input {
|
||||
padding-right: 26px; /* LTR */
|
||||
padding-left: inherit; /* LTR */
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-default.minicolors-position-left .minicolors-input {
|
||||
padding-right: inherit;
|
||||
padding-left: 26px;
|
||||
}
|
||||
|
||||
/* Bootstrap theme */
|
||||
.minicolors-theme-bootstrap .minicolors-swatch {
|
||||
z-index: 2;
|
||||
top: 3px;
|
||||
left: 3px; /* LTR */
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-bootstrap .minicolors-swatch {
|
||||
right: 3px;
|
||||
}
|
||||
.minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch {
|
||||
margin-bottom: 2px;
|
||||
top: 0;
|
||||
left: 0; /* LTR */
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch {
|
||||
right: 0;
|
||||
}
|
||||
.minicolors-theme-bootstrap .minicolors-swatch-color {
|
||||
border-radius: inherit;
|
||||
}
|
||||
.minicolors-theme-bootstrap.minicolors-position-right > .minicolors-swatch {
|
||||
left: auto; /* LTR */
|
||||
right: 3px; /* LTR */
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-bootstrap.minicolors-position-left > .minicolors-swatch {
|
||||
right: auto;
|
||||
left: 3px;
|
||||
}
|
||||
.minicolors-theme-bootstrap .minicolors-input {
|
||||
float: none;
|
||||
padding-left: 44px; /* LTR */
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-bootstrap .minicolors-input {
|
||||
text-align: right;
|
||||
unicode-bidi: plaintext;
|
||||
padding-left: 12px;
|
||||
padding-right: 44px;
|
||||
}
|
||||
.minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
|
||||
padding-right: 44px; /* LTR */
|
||||
padding-left: 12px; /* LTR */
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-bootstrap.minicolors-position-left .minicolors-input {
|
||||
padding-right: 12px;
|
||||
padding-left: 44px;
|
||||
}
|
||||
.minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch {
|
||||
top: 4px;
|
||||
left: 4px; /* LTR */
|
||||
width: 37px;
|
||||
height: 37px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch {
|
||||
right: 4px;
|
||||
}
|
||||
.minicolors-theme-bootstrap .minicolors-input.input-sm + .minicolors-swatch {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.minicolors-theme-bootstrap .minicolors-input.input-xs + .minicolors-swatch {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
.input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input {
|
||||
border-top-left-radius: 0; /* LTR */
|
||||
border-bottom-left-radius: 0; /* LTR */
|
||||
}
|
||||
[dir=rtl] .input-group .minicolors-theme-bootstrap .minicolors-input {
|
||||
border-radius: 4px;
|
||||
}
|
||||
[dir=rtl] .input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
[dir=rtl] .input-group .minicolors-theme-bootstrap:not(:last-child) .minicolors-input {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
/* bootstrap input-group rtl override */
|
||||
[dir=rtl] .input-group .form-control,
|
||||
[dir=rtl] .input-group-addon,
|
||||
[dir=rtl] .input-group-btn > .btn,
|
||||
[dir=rtl] .input-group-btn > .btn-group > .btn,
|
||||
[dir=rtl] .input-group-btn > .dropdown-toggle {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
[dir=rtl] .input-group .form-control:first-child,
|
||||
[dir=rtl] .input-group-addon:first-child,
|
||||
[dir=rtl] .input-group-btn:first-child > .btn,
|
||||
[dir=rtl] .input-group-btn:first-child > .btn-group > .btn,
|
||||
[dir=rtl] .input-group-btn:first-child > .dropdown-toggle,
|
||||
[dir=rtl] .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
|
||||
[dir=rtl] .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border-left: 0;
|
||||
}
|
||||
[dir=rtl] .input-group .form-control:last-child,
|
||||
[dir=rtl] .input-group-addon:last-child,
|
||||
[dir=rtl] .input-group-btn:last-child > .btn,
|
||||
[dir=rtl] .input-group-btn:last-child > .btn-group > .btn,
|
||||
[dir=rtl] .input-group-btn:last-child > .dropdown-toggle,
|
||||
[dir=rtl] .input-group-btn:first-child > .btn:not(:first-child),
|
||||
[dir=rtl] .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
/* Semantic Ui theme */
|
||||
.minicolors-theme-semanticui .minicolors-swatch {
|
||||
top: 0;
|
||||
left: 0; /* LTR */
|
||||
padding: 18px;
|
||||
}
|
||||
[dir=rtl] .minicolors-theme-semanticui .minicolors-swatch {
|
||||
right: 0;
|
||||
}
|
||||
.minicolors-theme-semanticui input {
|
||||
text-indent: 30px;
|
||||
}
|
||||
BIN
AvocadoEdition_Light/adm/css/jquery.minicolors.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
9
AvocadoEdition_Light/adm/css/theme.css
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
@charset "utf-8";
|
||||
html, body {width:100%; height:100%;}
|
||||
#preview_item{height:50px}
|
||||
#preview_item ul{margin:0;padding:0;top:0;width:100%;border-bottom:1px solid #eee; margin:0 auto;text-align:center;background:#333;position:fixed;top:0;z-index:999999;width:100%;}
|
||||
#preview_item ul li{list-style:none;display:inline-block;height:50px;line-height:50px;padding:0 3px;*display:inline; zoom:1;}
|
||||
#preview_item ul li a{color:#555;padding:0 8px;height:24px;line-height:24px;background:#f2f2f2;display:inline-block;vertical-align:middle;border:1px solid #dcdcdc;}
|
||||
#preview_item ul li a:hover{background:#ccc;text-decoration:none;border:1px solid #ccc;}
|
||||
#preview_item ul li button{color:#fff;padding:0 8px;background:#29c7ca;border-radius:0;height:26px;line-height:24px;vertical-align:middle;border:none}
|
||||
#preview_item ul li button:hover{background:#046b6d;color:#fff;text-decoration:none;}
|
||||
1760
AvocadoEdition_Light/adm/design_form.php
Normal file
766
AvocadoEdition_Light/adm/design_form_css.php
Normal file
|
|
@ -0,0 +1,766 @@
|
|||
<?
|
||||
@include_once('./_common.php');
|
||||
|
||||
|
||||
// CSS 설정 가져오기
|
||||
$css_sql = sql_query("select * from {$g5['css_table']}");
|
||||
$css = array();
|
||||
for($i=0; $cs = sql_fetch_array($css_sql); $i++) {
|
||||
$css[$cs['cs_name']][0] = $cs['cs_value'];
|
||||
$css[$cs['cs_name']][1] = $cs['cs_etc_1'];
|
||||
$css[$cs['cs_name']][2] = $cs['cs_etc_2'];
|
||||
$css[$cs['cs_name']][3] = $cs['cs_etc_3'];
|
||||
$css[$cs['cs_name']][4] = $cs['cs_etc_4'];
|
||||
$css[$cs['cs_name']][5] = $cs['cs_etc_5'];
|
||||
$css[$cs['cs_name']][6] = $cs['cs_etc_6'];
|
||||
$css[$cs['cs_name']][7] = $cs['cs_etc_7'];
|
||||
$css[$cs['cs_name']][8] = $cs['cs_etc_8'];
|
||||
$css[$cs['cs_name']][9] = $cs['cs_etc_9'];
|
||||
$css[$cs['cs_name']][10] = $cs['cs_etc_10'];
|
||||
|
||||
$css[$cs['cs_name']][11] = $cs['cs_etc_11'];
|
||||
$css[$cs['cs_name']][12] = $cs['cs_etc_12'];
|
||||
$css[$cs['cs_name']][13] = $cs['cs_etc_13'];
|
||||
$css[$cs['cs_name']][14] = $cs['cs_etc_14'];
|
||||
$css[$cs['cs_name']][15] = $cs['cs_etc_15'];
|
||||
$css[$cs['cs_name']][16] = $cs['cs_etc_16'];
|
||||
$css[$cs['cs_name']][17] = $cs['cs_etc_17'];
|
||||
$css[$cs['cs_name']][18] = $cs['cs_etc_18'];
|
||||
$css[$cs['cs_name']][19] = $cs['cs_etc_19'];
|
||||
$css[$cs['cs_name']][20] = $cs['cs_etc_20'];
|
||||
}
|
||||
$tab_width = 1024;
|
||||
|
||||
$is_item_area = false;
|
||||
$is_comment_area = false;
|
||||
|
||||
?>
|
||||
@charset "utf-8";
|
||||
|
||||
/***************************************************************
|
||||
Design Manager Setting Style: 자동생성 CSS
|
||||
---------------------------------------------------------------
|
||||
- 최종 수정일 : <?=date('Y-m-d H:i:s')?>
|
||||
- 모바일 사이즈 기준 (공통) : <?=$tab_width?>px
|
||||
***************************************************************/
|
||||
|
||||
<?=stripslashes($cf_add_fonts)?>
|
||||
|
||||
|
||||
/**************************************************************
|
||||
기본 레이아웃
|
||||
***************************************************************/
|
||||
<?
|
||||
// -- 레이아웃 변수 계산하기
|
||||
$content_width = !$css['content_width'][0] ? 1000 : $css['content_width'][0];
|
||||
$max_content_width = $content_width + 160;
|
||||
$middle_content_width = $content_width + 40;
|
||||
?>
|
||||
|
||||
.fix-layout { <? echo "max-width:{$max_content_width}px; "; ?>}
|
||||
@media all and (max-width:<?=$max_content_width?>px) {
|
||||
.fix-layout { <? echo "max-width:{$middle_content_width}px; "; ?>}
|
||||
#body > .fix-layout > .mid-layout {padding-left:20px; padding-right:20px;}
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************
|
||||
기본 폰트 설정
|
||||
***************************************************************/
|
||||
|
||||
* {<? if($css['default_font'][3]) echo "font-family:{$css['default_font'][3]}, sans-serif; "; ?>}
|
||||
body { <?
|
||||
if($css['default_font'][0]) echo "color:".hex2rgba($css['default_font'][0], $css['default_font'][1])."; ";
|
||||
if($css['default_font'][2]) echo "font-size:{$css['default_font'][2]}px; ";
|
||||
if($css['default_font'][3]) echo "font-family:{$css['default_font'][3]}, sans-serif; ";
|
||||
?>}
|
||||
.txt-default { <?
|
||||
if($css['color_default'][0]) echo "color:".hex2rgba($css['color_default'][0], $css['color_default'][1])."; ";
|
||||
?>}
|
||||
a, .txt-point, .sch_word { <?
|
||||
if($css['color_point'][0]) echo "color:".hex2rgba($css['color_point'][0], $css['color_point'][1])."; ";
|
||||
?>}
|
||||
|
||||
.txt-menu-font {<? if($css['menu_tooltip'][9]) echo "font-family:{$css['menu_tooltip'][9]}, sans-serif; "; ?>}
|
||||
|
||||
|
||||
/**************************************************************
|
||||
사이트 배경 설정
|
||||
***************************************************************/
|
||||
|
||||
.enterWrapper { <?
|
||||
if($css['intro_background'][0]) echo "background-image:url('{$css['intro_background'][0]}'); ";
|
||||
if($css['intro_background'][1]) echo "background-color:".hex2rgba($css['intro_background'][1], $css['intro_background'][2])."; ";
|
||||
if($css['intro_background'][3]) echo "background-repeat:{$css['intro_background'][3]}; ";
|
||||
if($css['intro_background'][4]) echo "background-position:{$css['intro_background'][4]}; ";
|
||||
if($css['intro_background'][5]) echo "background-size:{$css['intro_background'][5]}; ";
|
||||
?>}
|
||||
.enterWrapper .guide { <?
|
||||
if($css['intro'][2]) echo "color:".hex2rgba($css['intro'][2], $css['intro'][3])."; ";
|
||||
if($css['intro'][4]) echo "font-size:{$css['intro'][4]}px; ";
|
||||
if($css['intro'][5]) echo "font-family:{$css['intro'][5]}, sans-serif; ";
|
||||
?>}
|
||||
|
||||
|
||||
@media all and (min-width: <?=($tab_width + 1)?>px) {
|
||||
.admin-preview-box,
|
||||
html.single:before { <?
|
||||
if($css['background'][0]) echo "background-image:url('{$css['background'][0]}'); ";
|
||||
if($css['background'][1]) echo "background-color:".hex2rgba($css['background'][1], $css['background'][2])."; ";
|
||||
if($css['background'][3]) echo "background-repeat:{$css['background'][3]}; ";
|
||||
if($css['background'][4]) echo "background-position:{$css['background'][4]}; ";
|
||||
if($css['background'][5]) echo "background-size:{$css['background'][5]}; ";
|
||||
?>}
|
||||
}
|
||||
|
||||
@media all and (max-width: <?=$tab_width?>px) {
|
||||
.admin-preview-box,
|
||||
html.single:before { <?
|
||||
if($css['m_background'][0]) echo "background-image:url('{$css['m_background'][0]}'); ";
|
||||
if($css['m_background'][1]) echo "background-color:".hex2rgba($css['m_background'][1], $css['m_background'][2])."; ";
|
||||
if($css['m_background'][3]) echo "background-repeat:{$css['m_background'][3]}; ";
|
||||
if($css['m_background'][4]) echo "background-position:{$css['m_background'][4]}; ";
|
||||
if($css['m_background'][5]) echo "background-size:{$css['m_background'][5]}; ";
|
||||
?>}
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************
|
||||
메뉴 스타일 설정
|
||||
***************************************************************/
|
||||
|
||||
/* 관리자 미리보기 스타일 정의 */
|
||||
.admin-preview-box .gnbWrap { <? if($css['menu_icon'][12]) echo "font-size:{$css['menu_icon'][12]}px; "; ?>}
|
||||
.admin-preview-box .gnbWrap .tooltips { <? if($css['menu_tooltip'][9]) echo "font-family:{$css['menu_tooltip'][9]}, sans-serif; "; ?>}
|
||||
|
||||
#topCont a .icons,
|
||||
.icons-link-box .icons,
|
||||
.admin-preview-box .gnbWrap .icons { <?
|
||||
if($css['menu_icon'][10]) echo "color:".hex2rgba($css['menu_icon'][10], $css['menu_icon'][11])."; ";
|
||||
if($css['menu_icon'][13] == 'diamond') echo "height:3.3em; ";
|
||||
?>}
|
||||
|
||||
#topCont a .icons:before,
|
||||
.icons-link-box a .icons:before,
|
||||
.admin-preview-box .gnbWrap .icons:before { <?
|
||||
switch($css['menu_icon'][13]) {
|
||||
case "diamond":
|
||||
echo "top:50%; left:50%; right:auto; bottom:auto; width:2.1em; height:2.1em; margin:-1.05em 0 0 -1.05em; transform:rotate(-45deg); -webkit-transform:rotate(-45deg); ";
|
||||
break;
|
||||
case "circle":
|
||||
echo "border-radius:100%; ";
|
||||
break;
|
||||
case "square":
|
||||
echo "";
|
||||
break;
|
||||
}
|
||||
if($css['menu_icon'][0]) echo "background-color:".hex2rgba($css['menu_icon'][0], $css['menu_icon'][1])."; ";
|
||||
if($css['menu_icon'][2]) echo "background:linear-gradient(0deg, ".hex2rgba($css['menu_icon'][2], $css['menu_icon'][3])." 0%, ".hex2rgba($css['menu_icon'][4], $css['menu_icon'][5])." 100%); ";
|
||||
if($css['menu_icon'][6]) echo "border-color:".hex2rgba($css['menu_icon'][6], $css['menu_icon'][7])."; ";
|
||||
if($css['menu_icon'][8]) echo "border-style:{$css['menu_icon'][8]}; ";
|
||||
if($css['menu_icon'][9]) echo "border-width:{$css['menu_icon'][9]}px; ";
|
||||
?>}
|
||||
.admin-preview-box .gnbWrap .tooltips { <?
|
||||
if($css['menu_tooltip'][0]) echo "background-color:".hex2rgba($css['menu_tooltip'][0], $css['menu_tooltip'][1])."; ";
|
||||
if($css['menu_tooltip'][2]) echo "color:".hex2rgba($css['menu_tooltip'][2], $css['menu_tooltip'][3])."; ";
|
||||
if($css['menu_tooltip'][4]) echo "font-size:{$css['menu_tooltip'][4]}px; ";
|
||||
if($css['menu_tooltip'][5]) echo "border-top-left-radius:{$css['menu_tooltip'][5]}px; ";
|
||||
if($css['menu_tooltip'][6]) echo "border-top-right-radius:{$css['menu_tooltip'][6]}px; ";
|
||||
if($css['menu_tooltip'][7]) echo "border-bottom-right-radius:{$css['menu_tooltip'][7]}px; ";
|
||||
if($css['menu_tooltip'][8]) echo "border-bottom-left-radius:{$css['menu_tooltip'][8]}px; ";
|
||||
?>}
|
||||
|
||||
/* 사용자단 스타일 정의 */
|
||||
#header .gnbWrap,
|
||||
#mo_header .gnbWrap { <? if($css['menu_icon'][12]) echo "font-size:{$css['menu_icon'][12]}px; "; ?>}
|
||||
#header .gnbWrap .tooltips,
|
||||
#mo_header .gnbWrap .tooltips { <? if($css['menu_tooltip'][9]) echo "font-family:{$css['menu_tooltip'][9]}, sans-serif; "; ?>}
|
||||
|
||||
@media all and (min-width: <?=($tab_width + 1)?>px) {
|
||||
#header { <?
|
||||
switch($css['use_header'][0]) {
|
||||
case "" : // 좌측 배치
|
||||
echo "top:0; bottom:0; left:20px; ";
|
||||
break;
|
||||
case "R" : // 우측 배치
|
||||
echo "top:0; bottom:0; right:20px; ";
|
||||
break;
|
||||
case "T" : // 상단 배치
|
||||
echo "top:10px; left:0; right:0; ";
|
||||
break;
|
||||
case "B" : // 하단 배치
|
||||
echo "bottom:10px; left:0; right:0; ";
|
||||
break;
|
||||
}
|
||||
?>}
|
||||
#header .gnbWrap { <?
|
||||
switch($css['use_header'][0]) {
|
||||
case "" : // 좌측 배치
|
||||
echo "top:50%; left:0; transform:translateY(-50%); -webkit-transform:translateY(-50%); ";
|
||||
break;
|
||||
case "R" : // 우측 배치
|
||||
echo "top:50%; right:0; transform:translateY(-50%); -webkit-transform:translateY(-50%); ";
|
||||
break;
|
||||
case "T" : // 상단 배치
|
||||
echo "top:0; left:0; right:0; text-align:center; ";
|
||||
break;
|
||||
case "B" : // 하단 배치
|
||||
echo "bottom:0; left:0; right:0; text-align:center; ";
|
||||
break;
|
||||
}
|
||||
?>}
|
||||
#header .gnbWrap li { <?
|
||||
switch($css['use_header'][0]) {
|
||||
case "" : // 좌측 배치
|
||||
echo " ";
|
||||
break;
|
||||
case "R" : // 우측 배치
|
||||
echo " ";
|
||||
break;
|
||||
case "T" : // 상단 배치
|
||||
echo "display:inline-block; vertical-align:top; ";
|
||||
break;
|
||||
case "B" : // 하단 배치
|
||||
echo "display:inline-block; vertical-align:top; ";
|
||||
break;
|
||||
}
|
||||
?>}
|
||||
#header .gnbWrap li.line { <?
|
||||
switch($css['use_header'][0]) {
|
||||
case "" : // 좌측 배치
|
||||
echo "display:block; position:relative; height:.5em; ";
|
||||
break;
|
||||
case "R" : // 우측 배치
|
||||
echo "display:block; position:relative; height:.5em; ";
|
||||
break;
|
||||
case "T" : // 상단 배치
|
||||
echo "display:inline-block; position:relative; width:.5em; ";
|
||||
break;
|
||||
case "B" : // 하단 배치
|
||||
echo "display:inline-block; position:relative; width:.5em; ";
|
||||
break;
|
||||
}
|
||||
?>}
|
||||
#header .gnbWrap .tooltips { <?
|
||||
switch($css['use_header'][0]) {
|
||||
case "" : // 좌측 배치
|
||||
echo "margin-left:.5em; left:80%; top:50%; transform:translateY(-50%); -webkit-transform:translateY(-50%); ";
|
||||
break;
|
||||
case "R" : // 우측 배치
|
||||
echo "margin-right:.5em; right:80%; top:50%; transform:translateY(-50%); -webkit-transform:translateY(-50%); ";
|
||||
break;
|
||||
case "T" : // 상단 배치
|
||||
echo "margin-top:.5em; top:80%; left:50%; transform:translateX(-50%); -webkit-transform:translateX(-50%); ";
|
||||
break;
|
||||
case "B" : // 하단 배치
|
||||
echo "margin-bottom:.5em; bottom:80%; left:50%; transform:translateX(-50%); -webkit-transform:translateX(-50%); ";
|
||||
break;
|
||||
}
|
||||
?>}
|
||||
#header .gnbWrap a:hover .tooltips { <?
|
||||
switch($css['use_header'][0]) {
|
||||
case "" : // 좌측 배치
|
||||
echo "left:100%; ";
|
||||
break;
|
||||
case "R" : // 우측 배치
|
||||
echo "right:100%; ";
|
||||
break;
|
||||
case "T" : // 상단 배치
|
||||
echo "top:100%; ";
|
||||
break;
|
||||
case "B" : // 하단 배치
|
||||
echo "bottom:100%; ";
|
||||
break;
|
||||
}
|
||||
?>}
|
||||
|
||||
#header .gnbWrap .icons { <?
|
||||
if($css['menu_icon'][10]) echo "color:".hex2rgba($css['menu_icon'][10], $css['menu_icon'][11])."; ";
|
||||
if($css['menu_icon'][13] == 'diamond') echo "height:3.3em; ";
|
||||
?>}
|
||||
#header .gnbWrap .icons:before { <?
|
||||
switch($css['menu_icon'][13]) {
|
||||
case "diamond":
|
||||
echo "top:50%; left:50%; right:auto; bottom:auto; width:2.1em; height:2.1em; margin:-1.05em 0 0 -1.05em; transform:rotate(-45deg); -webkit-transform:rotate(-45deg); ";
|
||||
break;
|
||||
case "circle":
|
||||
echo "border-radius:100%; ";
|
||||
break;
|
||||
case "square":
|
||||
echo "";
|
||||
break;
|
||||
}
|
||||
if($css['menu_icon'][0]) echo "background-color:".hex2rgba($css['menu_icon'][0], $css['menu_icon'][1])."; ";
|
||||
if($css['menu_icon'][2]) echo "background:linear-gradient(0deg, ".hex2rgba($css['menu_icon'][2], $css['menu_icon'][3])." 0%, ".hex2rgba($css['menu_icon'][4], $css['menu_icon'][5])." 100%); ";
|
||||
if($css['menu_icon'][6]) echo "border-color:".hex2rgba($css['menu_icon'][6], $css['menu_icon'][7])."; ";
|
||||
if($css['menu_icon'][8]) echo "border-style:{$css['menu_icon'][8]}; ";
|
||||
if($css['menu_icon'][9]) echo "border-width:{$css['menu_icon'][9]}px; ";
|
||||
?>}
|
||||
#header .gnbWrap .tooltips { <?
|
||||
if($css['menu_tooltip'][0]) echo "background-color:".hex2rgba($css['menu_tooltip'][0], $css['menu_tooltip'][1])."; ";
|
||||
if($css['menu_tooltip'][2]) echo "color:".hex2rgba($css['menu_tooltip'][2], $css['menu_tooltip'][3])."; ";
|
||||
if($css['menu_tooltip'][4]) echo "font-size:{$css['menu_tooltip'][4]}px; ";
|
||||
if($css['menu_tooltip'][5]) echo "border-top-left-radius:{$css['menu_tooltip'][5]}px; ";
|
||||
if($css['menu_tooltip'][6]) echo "border-top-right-radius:{$css['menu_tooltip'][6]}px; ";
|
||||
if($css['menu_tooltip'][7]) echo "border-bottom-right-radius:{$css['menu_tooltip'][7]}px; ";
|
||||
if($css['menu_tooltip'][8]) echo "border-bottom-left-radius:{$css['menu_tooltip'][8]}px; ";
|
||||
?>}
|
||||
}
|
||||
@media all and (max-width: <?=$tab_width?>px) {
|
||||
#mo_header { <?
|
||||
if($css['menu_tooltip'][0]) echo "background-color:".hex2rgba($css['menu_tooltip'][0], $css['menu_tooltip'][1])."; ";
|
||||
if($css['menu_tooltip'][2]) echo "color:".hex2rgba($css['menu_tooltip'][2], $css['menu_tooltip'][3])."; ";
|
||||
?>}
|
||||
#mo_header .gnbWrap a { <?
|
||||
if($css['menu_tooltip'][2]) echo "color:".hex2rgba($css['menu_tooltip'][2], $css['menu_tooltip'][3])."; ";
|
||||
?>}
|
||||
#mo_header .gnbWrap li.line { <?
|
||||
if($css['menu_tooltip'][2]) echo "background-color:".hex2rgba($css['menu_tooltip'][2], $css['menu_tooltip'][3])."; ";
|
||||
?>}
|
||||
body.open-gnb .control-mobile-menu { <?
|
||||
if($css['menu_tooltip'][2]) echo "color:".hex2rgba($css['menu_tooltip'][2], $css['menu_tooltip'][3])."; ";
|
||||
?>}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**************************************************************
|
||||
스크롤 / 마우스 드래그 블록 색상 지정
|
||||
***************************************************************/
|
||||
|
||||
*::-webkit-scrollbar { <?
|
||||
if($css['scrollbar'][2]) echo "width:{$css['scrollbar'][2]}px; height:{$css['scrollbar'][2]}px; ";
|
||||
?>}
|
||||
*::-webkit-scrollbar-track { <?
|
||||
if($css['scrollbar'][0]) echo "background-color:".hex2rgba($css['scrollbar'][0], $css['scrollbar'][1])."; ";
|
||||
?>}
|
||||
*::-webkit-scrollbar-thumb { <?
|
||||
if($css['scrollbar'][3]) echo "background-color:".hex2rgba($css['scrollbar'][3], $css['scrollbar'][4])."; ";
|
||||
if($css['scrollbar'][5]) echo "border-top-left-radius:{$css['scrollbar'][5]}px; ";
|
||||
if($css['scrollbar'][6]) echo "border-top-right-radius:{$css['scrollbar'][6]}px; ";
|
||||
if($css['scrollbar'][7]) echo "border-bottom-right-radius:{$css['scrollbar'][7]}px; ";
|
||||
if($css['scrollbar'][8]) echo "border-bottom-left-radius:{$css['scrollbar'][8]}px; ";
|
||||
?>}
|
||||
|
||||
* { <? if($css['color_point'][0]) echo "outline-color:".hex2rgba($css['color_point'][0], $css['color_point'][1])."; "; ?>}
|
||||
|
||||
::selection { <?
|
||||
if($css['color_point'][0]) echo "background:".hex2rgba($css['color_point'][0], $css['color_point'][1])."; ";
|
||||
if($css['color_bak'][0]) echo "color:".hex2rgba($css['color_bak'][0], $css['color_bak'][1])."; ";
|
||||
?>}
|
||||
::-moz-selection { <?
|
||||
if($css['color_point'][0]) echo "background:".hex2rgba($css['color_point'][0], $css['color_point'][1])."; ";
|
||||
if($css['color_bak'][0]) echo "color:".hex2rgba($css['color_bak'][0], $css['color_bak'][1])."; ";
|
||||
?>}
|
||||
::-webkit-selection { <?
|
||||
if($css['color_point'][0]) echo "background:".hex2rgba($css['color_point'][0], $css['color_point'][1])."; ";
|
||||
if($css['color_bak'][0]) echo "color:".hex2rgba($css['color_bak'][0], $css['color_bak'][1])."; ";
|
||||
?>}
|
||||
|
||||
|
||||
/**************************************************************
|
||||
버튼 색상 지정
|
||||
***************************************************************/
|
||||
|
||||
.ui-btn { <?
|
||||
if($css['input_bak'][2]) echo "height:{$css['input_bak'][2]}px; ";
|
||||
if($css['input_bak'][5]) echo "font-size:{$css['input_bak'][5]}px; ";
|
||||
|
||||
if($css['btn_default'][12]) echo "border-top-left-radius:{$css['btn_default'][12]}px; ";
|
||||
if($css['btn_default'][13]) echo "border-top-right-radius:{$css['btn_default'][13]}px; ";
|
||||
if($css['btn_default'][14]) echo "border-bottom-right-radius:{$css['btn_default'][14]}px; ";
|
||||
if($css['btn_default'][15]) echo "border-bottom-left-radius:{$css['btn_default'][15]}px; ";
|
||||
|
||||
if($css['btn_default'][0]) echo "background-color:".hex2rgba($css['btn_default'][0], $css['btn_default'][1])."; ";
|
||||
if($css['btn_default'][2]) echo "color:".hex2rgba($css['btn_default'][2], $css['btn_default'][3])."; ";
|
||||
if($css['btn_default'][4]) echo "border-color:".hex2rgba($css['btn_default'][4], $css['btn_default'][5])."; ";
|
||||
?>}
|
||||
.ui-btn:hover { <?
|
||||
if($css['btn_default'][6]) echo "background-color:".hex2rgba($css['btn_default'][6], $css['btn_default'][7])."; ";
|
||||
if($css['btn_default'][8]) echo "color:".hex2rgba($css['btn_default'][8], $css['btn_default'][9])."; ";
|
||||
if($css['btn_default'][10]) echo "border-color:".hex2rgba($css['btn_default'][10], $css['btn_default'][11])."; ";
|
||||
?>}
|
||||
.ui-btn.point { <?
|
||||
if($css['btn_point'][12]) echo "border-top-left-radius:{$css['btn_point'][12]}px; ";
|
||||
if($css['btn_point'][13]) echo "border-top-right-radius:{$css['btn_point'][13]}px; ";
|
||||
if($css['btn_point'][14]) echo "border-bottom-right-radius:{$css['btn_point'][14]}px; ";
|
||||
if($css['btn_point'][15]) echo "border-bottom-left-radius:{$css['btn_point'][15]}px; ";
|
||||
|
||||
if($css['btn_point'][0]) echo "background-color:".hex2rgba($css['btn_point'][0], $css['btn_point'][1])."; ";
|
||||
if($css['btn_point'][2]) echo "color:".hex2rgba($css['btn_point'][2], $css['btn_point'][3])."; ";
|
||||
if($css['btn_point'][4]) echo "border-color:".hex2rgba($css['btn_point'][4], $css['btn_point'][5])."; ";
|
||||
?>}
|
||||
.ui-btn.point:hover { <?
|
||||
if($css['btn_point'][6]) echo "background-color:".hex2rgba($css['btn_point'][6], $css['btn_point'][7])."; ";
|
||||
if($css['btn_point'][8]) echo "color:".hex2rgba($css['btn_point'][8], $css['btn_point'][9])."; ";
|
||||
if($css['btn_point'][10]) echo "border-color:".hex2rgba($css['btn_point'][10], $css['btn_point'][11])."; ";
|
||||
?>}
|
||||
.ui-btn.etc { <?
|
||||
if($css['btn_etc'][12]) echo "border-top-left-radius:{$css['btn_etc'][12]}px; ";
|
||||
if($css['btn_etc'][13]) echo "border-top-right-radius:{$css['btn_etc'][13]}px; ";
|
||||
if($css['btn_etc'][14]) echo "border-bottom-right-radius:{$css['btn_etc'][14]}px; ";
|
||||
if($css['btn_etc'][15]) echo "border-bottom-left-radius:{$css['btn_etc'][15]}px; ";
|
||||
|
||||
if($css['btn_etc'][0]) echo "background-color:".hex2rgba($css['btn_etc'][0], $css['btn_etc'][1])."; ";
|
||||
if($css['btn_etc'][2]) echo "color:".hex2rgba($css['btn_etc'][2], $css['btn_etc'][3])."; ";
|
||||
if($css['btn_etc'][4]) echo "border-color:".hex2rgba($css['btn_etc'][4], $css['btn_etc'][5])."; ";
|
||||
?>}
|
||||
.ui-btn.etc:hover { <?
|
||||
if($css['btn_etc'][6]) echo "background-color:".hex2rgba($css['btn_etc'][6], $css['btn_etc'][7])."; ";
|
||||
if($css['btn_etc'][8]) echo "color:".hex2rgba($css['btn_etc'][8], $css['btn_etc'][9])."; ";
|
||||
if($css['btn_etc'][10]) echo "border-color:".hex2rgba($css['btn_etc'][10], $css['btn_etc'][11])."; ";
|
||||
?>}
|
||||
|
||||
a.ui-btn { <?
|
||||
if($css['input_bak'][2]) echo "line-height:".($css['input_bak'][2]-2)."px; ";
|
||||
?>}
|
||||
.ui-btn.small { <?
|
||||
if($css['input_bak'][2]) echo "height:".($css['input_bak'][2]-10)."px; ";
|
||||
?>}
|
||||
a.ui-btn.small { <?
|
||||
if($css['input_bak'][2]) echo "line-height:".($css['input_bak'][2]-10)."px; ";
|
||||
?>}
|
||||
.ui-btn.big { <?
|
||||
if($css['input_bak'][5]) echo "font-size:".($css['input_bak'][5]+3)."px; ";
|
||||
if($css['input_bak'][2]) echo "height:".($css['input_bak'][2]+10)."px; ";
|
||||
?>}
|
||||
a.ui-btn.big { <?
|
||||
if($css['input_bak'][2]) echo "line-height:".($css['input_bak'][2]+8)."px; ";
|
||||
?>}
|
||||
|
||||
|
||||
/**************************************************************
|
||||
검색박스 영역
|
||||
***************************************************************/
|
||||
|
||||
#bo_sch { <? if($css['input_bak'][2]) echo "margin-top:".($css['input_bak'][2])."px; ";?>}
|
||||
#bo_sch button { <? if($css['input_bak'][2]) echo "width:".($css['input_bak'][2])."px; height:".($css['input_bak'][2])."px; font-size:".($css['input_bak'][2]/2)."px; ";?>}
|
||||
|
||||
|
||||
/**************************************************************
|
||||
글 상세보기 영역
|
||||
***************************************************************/
|
||||
|
||||
#bo_list,
|
||||
#bo_w,
|
||||
#bo_v { <?
|
||||
if($css['board_table'][0]) echo "padding:1.5em; background-color:".hex2rgba($css['board_table'][0], $css['board_table'][1])."; ";
|
||||
if($css['board_table'][2]) echo "color:".hex2rgba($css['board_table'][2], $css['board_table'][3])."; ";
|
||||
if($css['board_table'][4]) echo "border-color:".hex2rgba($css['board_table'][4], $css['board_table'][5])."; ";
|
||||
$css['board_table']['border'] = explode("||", $css['board_table'][8]);
|
||||
for($i=0; $i < count($css['board_table']['border']); $i++) {
|
||||
if($css['board_table']['border'][$i]) {
|
||||
if($css['board_table'][6]) echo "border-{$css['board_table']['border'][$i]}-style:{$css['board_table'][6]}; ";
|
||||
if($css['board_table'][7]) echo "border-{$css['board_table']['border'][$i]}-width:{$css['board_table'][7]}px; ";
|
||||
}
|
||||
}
|
||||
|
||||
if($css['board_table'][9]) echo "border-top-left-radius:{$css['board_table'][9]}px; ";
|
||||
if($css['board_table'][10]) echo "border-top-right-radius:{$css['board_table'][10]}px; ";
|
||||
if($css['board_table'][11]) echo "border-bottom-right-radius:{$css['board_table'][11]}px; ";
|
||||
if($css['board_table'][12]) echo "border-bottom-left-radius:{$css['board_table'][12]}px; ";
|
||||
?>}
|
||||
|
||||
#bo_v .board-title,
|
||||
#bo_v .board-info,
|
||||
#bo_v #bo_vc,
|
||||
#bo_v #bo_v_bot { <?
|
||||
if($css['form_body'][4]) echo "border-color:".hex2rgba($css['form_body'][4], $css['form_body'][5])."; ";
|
||||
?>}
|
||||
#bo_v .board-title,
|
||||
#bo_v .board-info { <?
|
||||
if($css['form_body'][6]) echo "border-bottom-style:{$css['form_body'][6]}; ";
|
||||
if($css['form_body'][7]) echo "border-bottom-width:{$css['form_body'][7]}px; ";
|
||||
?>}
|
||||
#bo_v #bo_vc,
|
||||
#bo_v #bo_v_bot { <?
|
||||
if($css['form_body'][6]) echo "border-top-style:{$css['form_body'][6]}; ";
|
||||
if($css['form_body'][7]) echo "border-top-width:{$css['form_body'][7]}px; ";
|
||||
?>}
|
||||
|
||||
#bo_v .board-title > * { <?
|
||||
if($css['color_point'][0]) echo "color:".hex2rgba($css['color_point'][0], $css['color_point'][1])."; ";
|
||||
?>}
|
||||
#bo_v #bo_vc .is-reply { <?
|
||||
if($css['form_body'][4]) echo "border-color:".hex2rgba($css['form_body'][4], $css['form_body'][5])."; ";
|
||||
?>}
|
||||
|
||||
|
||||
|
||||
/**************************************************************
|
||||
페이징 스타일 설정
|
||||
***************************************************************/
|
||||
|
||||
.pg_wrap { <?
|
||||
if($css['input_bak'][5]) echo "font-size:{$css['input_bak'][5]}px; ";
|
||||
?>}
|
||||
.pg_wrap .pg_page { <?
|
||||
if($css['default_font'][0]) echo "color:".hex2rgba($css['default_font'][0], $css['default_font'][1])."; ";
|
||||
?>}
|
||||
.pg_wrap .pg_page:hover { <?
|
||||
if($css['color_point'][0]) echo "color:".hex2rgba($css['color_point'][0], $css['color_point'][1])."; ";
|
||||
?>}
|
||||
.pg_wrap .pg_control { <?
|
||||
if($css['color_default'][0]) echo "color:".hex2rgba($css['color_default'][0], $css['color_default'][1])."; ";
|
||||
?>}
|
||||
.pg_wrap .pg_current { <?
|
||||
if($css['color_point'][0]) echo "color:".hex2rgba($css['color_point'][0], $css['color_point'][1])."; ";
|
||||
?>}
|
||||
|
||||
|
||||
/**************************************************************
|
||||
구분선 설정
|
||||
***************************************************************/
|
||||
|
||||
hr.line { <?
|
||||
if($css['default_font'][0]) echo "background:".hex2rgba($css['default_font'][0], $css['default_font'][1])."; ";
|
||||
?>}
|
||||
|
||||
|
||||
/**************************************************************
|
||||
인풋 타입
|
||||
***************************************************************/
|
||||
|
||||
.form-input,
|
||||
input[type="file"],
|
||||
input[type="text"],
|
||||
input[type="number"],
|
||||
input[type="password"],
|
||||
select { <?
|
||||
if($css['input_bak'][2]) echo "height:{$css['input_bak'][2]}px; ";
|
||||
?>}
|
||||
|
||||
.form-input,
|
||||
input[type="file"],
|
||||
input[type="text"],
|
||||
input[type="number"],
|
||||
input[type="password"],
|
||||
textarea,
|
||||
select { <?
|
||||
$css['input_bak'][4] = $css['input_bak'][4] == "" ? 0 : $css['input_bak'][4];
|
||||
if($css['input_bak'][0]) echo "background-color:".hex2rgba($css['input_bak'][0], $css['input_bak'][1])."; ";
|
||||
if($css['input_bak'][6]) echo "border-color:".hex2rgba($css['input_bak'][6], $css['input_bak'][7])."; ";
|
||||
if($css['input_bak'][3]) echo "color:".hex2rgba($css['input_bak'][3], $css['input_bak'][4])."; ";
|
||||
|
||||
if($css['input_bak'][5]) echo "font-size:{$css['input_bak'][5]}px; ";
|
||||
if($css['input_bak'][8]) echo "border-top-left-radius:{$css['input_bak'][8]}px; ";
|
||||
if($css['input_bak'][9]) echo "border-top-right-radius:{$css['input_bak'][9]}px; ";
|
||||
if($css['input_bak'][10]) echo "border-bottom-right-radius:{$css['input_bak'][10]}px; ";
|
||||
if($css['input_bak'][11]) echo "border-bottom-left-radius:{$css['input_bak'][11]}px; ";
|
||||
?>}
|
||||
|
||||
*::placeholder { <?if($css['input_bak'][3]) echo "color:".hex2rgba($css['input_bak'][3], ($css['input_bak'][4]+50))."; ";?>}
|
||||
|
||||
|
||||
/**************************************************************
|
||||
기본박스 설정
|
||||
***************************************************************/
|
||||
|
||||
.theme-box { <?
|
||||
if($css['box_style'][0]) echo "background-color:".hex2rgba($css['box_style'][0], $css['box_style'][1])."; ";
|
||||
if($css['box_style'][2]) echo "color:".hex2rgba($css['box_style'][2], $css['box_style'][3])."; ";
|
||||
if($css['box_style'][4]) echo "border-color:".hex2rgba($css['box_style'][4], $css['box_style'][5])."; ";
|
||||
|
||||
if($css['box_style'][9]) echo "border-top-left-radius:{$css['box_style'][9]}px; ";
|
||||
if($css['box_style'][10]) echo "border-top-right-radius:{$css['box_style'][10]}px; ";
|
||||
if($css['box_style'][11]) echo "border-bottom-right-radius:{$css['box_style'][11]}px; ";
|
||||
if($css['box_style'][12]) echo "border-bottom-left-radius:{$css['box_style'][12]}px; ";
|
||||
|
||||
$css['box_style']['border'] = explode("||", $css['box_style'][8]);
|
||||
for($i=0; $i < count($css['box_style']['border']); $i++) {
|
||||
if($css['box_style']['border'][$i]) {
|
||||
if($css['box_style'][6]) echo "border-{$css['box_style']['border'][$i]}-style:{$css['box_style'][6]}; ";
|
||||
if($css['box_style'][7]) echo "border-{$css['box_style']['border'][$i]}-width:{$css['box_style'][7]}px; ";
|
||||
}
|
||||
}
|
||||
?>}
|
||||
|
||||
.board-notice-box { <?
|
||||
if($css['board_notice'][0]) echo "background-color:".hex2rgba($css['board_notice'][0], $css['board_notice'][1])."; ";
|
||||
if($css['board_notice'][2]) echo "color:".hex2rgba($css['board_notice'][2], $css['board_notice'][3])."; ";
|
||||
if($css['board_notice'][4]) echo "border-color:".hex2rgba($css['board_notice'][4], $css['board_notice'][5])."; ";
|
||||
|
||||
if($css['board_notice'][9]) echo "border-top-left-radius:{$css['board_notice'][9]}px; ";
|
||||
if($css['board_notice'][10]) echo "border-top-right-radius:{$css['board_notice'][10]}px; ";
|
||||
if($css['board_notice'][11]) echo "border-bottom-right-radius:{$css['board_notice'][11]}px; ";
|
||||
if($css['board_notice'][12]) echo "border-bottom-left-radius:{$css['board_notice'][12]}px; ";
|
||||
|
||||
$css['board_notice']['border'] = explode("||", $css['board_notice'][8]);
|
||||
for($i=0; $i < count($css['board_notice']['border']); $i++) {
|
||||
if($css['board_notice']['border'][$i]) {
|
||||
if($css['board_notice'][6]) echo "border-{$css['board_notice']['border'][$i]}-style:{$css['board_notice'][6]}; ";
|
||||
if($css['board_notice'][7]) echo "border-{$css['board_notice']['border'][$i]}-width:{$css['board_notice'][7]}px; ";
|
||||
}
|
||||
}
|
||||
?>}
|
||||
|
||||
|
||||
/**************************************************************
|
||||
테이블 설정
|
||||
***************************************************************/
|
||||
|
||||
.theme-list thead th { <?
|
||||
if($css['list_header'][0]) echo "background-color:".hex2rgba($css['list_header'][0], $css['list_header'][1])."; ";
|
||||
if($css['list_header'][2]) echo "color:".hex2rgba($css['list_header'][2], $css['list_header'][3])."; ";
|
||||
if($css['list_header'][4]) echo "border-color:".hex2rgba($css['list_header'][4], $css['list_header'][5])."; ";
|
||||
$css['list_header']['border'] = explode("||", $css['list_header'][8]);
|
||||
for($i=0; $i < count($css['list_header']['border']); $i++) {
|
||||
if($css['list_header']['border'][$i]) {
|
||||
if($css['list_header'][6]) echo "border-{$css['list_header']['border'][$i]}-style:{$css['list_header'][6]}; ";
|
||||
if($css['list_header'][7]) echo "border-{$css['list_header']['border'][$i]}-width:{$css['list_header'][7]}px; ";
|
||||
}
|
||||
}
|
||||
?>}
|
||||
.theme-list tbody th,
|
||||
.theme-list tbody td { <?
|
||||
if($css['list_body'][0]) echo "background-color:".hex2rgba($css['list_body'][0], $css['list_body'][1])."; ";
|
||||
if($css['list_body'][2]) echo "color:".hex2rgba($css['list_body'][2], $css['list_body'][3])."; ";
|
||||
if($css['list_body'][4]) echo "border-color:".hex2rgba($css['list_body'][4], $css['list_body'][5])."; ";
|
||||
$css['list_body']['border'] = explode("||", $css['list_body'][8]);
|
||||
for($i=0; $i < count($css['list_body']['border']); $i++) {
|
||||
if($css['list_body']['border'][$i]) {
|
||||
if($css['list_body'][6]) echo "border-{$css['list_body']['border'][$i]}-style:{$css['list_body'][6]}; ";
|
||||
if($css['list_body'][7]) echo "border-{$css['list_body']['border'][$i]}-width:{$css['list_body'][7]}px; ";
|
||||
}
|
||||
}
|
||||
?>}
|
||||
|
||||
.theme-form tbody th { <?
|
||||
if($css['form_header'][0]) echo "background-color:".hex2rgba($css['form_header'][0], $css['form_header'][1])."; ";
|
||||
if($css['form_header'][2]) echo "color:".hex2rgba($css['form_header'][2], $css['form_header'][3])."; ";
|
||||
if($css['form_header'][4]) echo "border-color:".hex2rgba($css['form_header'][4], $css['form_header'][5])."; ";
|
||||
$css['form_header']['border'] = explode("||", $css['form_header'][8]);
|
||||
for($i=0; $i < count($css['form_header']['border']); $i++) {
|
||||
if($css['form_header']['border'][$i]) {
|
||||
if($css['form_header'][6]) echo "border-{$css['form_header']['border'][$i]}-style:{$css['form_header'][6]}; ";
|
||||
if($css['form_header'][7]) echo "border-{$css['form_header']['border'][$i]}-width:{$css['form_header'][7]}px; ";
|
||||
}
|
||||
}
|
||||
?>}
|
||||
.theme-form tbody td { <?
|
||||
if($css['form_body'][0]) echo "background-color:".hex2rgba($css['form_body'][0], $css['form_body'][1])."; ";
|
||||
if($css['form_body'][2]) echo "color:".hex2rgba($css['form_body'][2], $css['form_body'][3])."; ";
|
||||
if($css['form_body'][4]) echo "border-color:".hex2rgba($css['form_body'][4], $css['form_body'][5])."; ";
|
||||
$css['form_body']['border'] = explode("||", $css['form_body'][8]);
|
||||
for($i=0; $i < count($css['form_body']['border']); $i++) {
|
||||
if($css['form_body']['border'][$i]) {
|
||||
if($css['form_body'][6]) echo "border-{$css['form_body']['border'][$i]}-style:{$css['form_body'][6]}; ";
|
||||
if($css['form_body'][7]) echo "border-{$css['form_body']['border'][$i]}-width:{$css['form_body'][7]}px; ";
|
||||
}
|
||||
}
|
||||
?>}
|
||||
|
||||
|
||||
|
||||
|
||||
/**************************************************************
|
||||
로드비 게시판 설정
|
||||
***************************************************************/
|
||||
|
||||
#load_log_board { <?
|
||||
if($css['mmb_contain_bak'][0]) echo "background-image:url('{$css['mmb_contain_bak'][0]}'); ";
|
||||
if($css['mmb_contain_bak'][1]) echo "background-color:".hex2rgba($css['mmb_contain_bak'][1], $css['mmb_contain_bak'][2])."; ";
|
||||
if($css['mmb_contain_bak'][3]) echo "background-repeat:{$css['mmb_contain_bak'][3]}; ";
|
||||
if($css['mmb_contain_bak'][4]) echo "background-position:{$css['mmb_contain_bak'][4]}; ";
|
||||
if($css['mmb_contain_bak'][5]) echo "background-size:{$css['mmb_contain_bak'][5]}; ";
|
||||
?>}
|
||||
|
||||
#log_list { <?
|
||||
if($css['mmb_list'][0]) echo "background-color:".hex2rgba($css['mmb_list'][0], $css['mmb_list'][1])."; ";
|
||||
if($css['mmb_list'][2]) echo "color:".hex2rgba($css['mmb_list'][2], $css['mmb_list'][3])."; ";
|
||||
if($css['mmb_list'][4]) echo "border-color:".hex2rgba($css['mmb_list'][4], $css['mmb_list'][5])."; ";
|
||||
$css['mmb_list']['border'] = explode("||", $css['mmb_list'][8]);
|
||||
for($i=0; $i < count($css['mmb_list']['border']); $i++) {
|
||||
if($css['mmb_list']['border'][$i]) {
|
||||
if($css['mmb_list'][6]) echo "border-{$css['mmb_list']['border'][$i]}-style:{$css['mmb_list'][6]}; ";
|
||||
if($css['mmb_list'][7]) echo "border-{$css['mmb_list']['border'][$i]}-width:{$css['mmb_list'][7]}px; ";
|
||||
}
|
||||
}
|
||||
?>}
|
||||
|
||||
#log_list .item { <?
|
||||
if($css['mmb_list_item'][0]) $is_item_area = true;
|
||||
if($css['mmb_list_item'][0]) echo "background-color:".hex2rgba($css['mmb_list_item'][0], $css['mmb_list_item'][1])."; ";
|
||||
if($css['mmb_list_item'][2]) echo "color:".hex2rgba($css['mmb_list_item'][2], $css['mmb_list_item'][3])."; ";
|
||||
if($css['mmb_list_item'][4]) echo "border-color:".hex2rgba($css['mmb_list_item'][4], $css['mmb_list_item'][5])."; ";
|
||||
$css['mmb_list_item']['border'] = explode("||", $css['mmb_list_item'][8]);
|
||||
for($i=0; $i < count($css['mmb_list_item']['border']); $i++) {
|
||||
if($css['mmb_list_item']['border'][$i]) {
|
||||
if($css['mmb_list_item'][6]) echo "border-{$css['mmb_list_item']['border'][$i]}-style:{$css['mmb_list_item'][6]}; ";
|
||||
if($css['mmb_list_item'][7]) echo "border-{$css['mmb_list_item']['border'][$i]}-width:{$css['mmb_list_item'][7]}px; ";
|
||||
}
|
||||
}
|
||||
if($css['mmb_list_item'][9]) echo "margin-bottom:{$css['mmb_list_item'][9]}px; ";
|
||||
?>}
|
||||
|
||||
#log_list .item .item-inner .ui-pic { <?
|
||||
if($css['mmb_log'][0]) echo "background-color:".hex2rgba($css['mmb_log'][0], $css['mmb_log'][1])."; ";
|
||||
if($css['mmb_log'][2]) echo "color:".hex2rgba($css['mmb_log'][2], $css['mmb_log'][3])."; ";
|
||||
if($css['mmb_log'][4]) echo "border-color:".hex2rgba($css['mmb_log'][4], $css['mmb_log'][5])."; ";
|
||||
$css['mmb_log']['border'] = explode("||", $css['mmb_log'][8]);
|
||||
for($i=0; $i < count($css['mmb_log']['border']); $i++) {
|
||||
if($css['mmb_log']['border'][$i]) {
|
||||
if($css['mmb_log'][6]) echo "border-{$css['mmb_log']['border'][$i]}-style:{$css['mmb_log'][6]}; ";
|
||||
if($css['mmb_log'][7]) echo "border-{$css['mmb_log']['border'][$i]}-width:{$css['mmb_log'][7]}px; ";
|
||||
}
|
||||
}
|
||||
?>}
|
||||
|
||||
#log_list .item .item-inner .item-comment { <?
|
||||
if($css['mmb_reply_item'][0]) $is_comment_area = true;
|
||||
if($css['mmb_reply_item'][0]) echo "background-color:".hex2rgba($css['mmb_reply_item'][0], $css['mmb_reply_item'][1])."; ";
|
||||
if($css['mmb_reply_item'][2]) echo "color:".hex2rgba($css['mmb_reply_item'][2], $css['mmb_reply_item'][3])."; ";
|
||||
if($css['mmb_reply_item'][4]) echo "border-color:".hex2rgba($css['mmb_reply_item'][4], $css['mmb_reply_item'][5])."; ";
|
||||
$css['mmb_reply_item']['border'] = explode("||", $css['mmb_reply_item'][8]);
|
||||
for($i=0; $i < count($css['mmb_reply_item']['border']); $i++) {
|
||||
if($css['mmb_reply_item']['border'][$i]) {
|
||||
if($css['mmb_reply_item'][6]) echo "border-{$css['mmb_reply_item']['border'][$i]}-style:{$css['mmb_reply_item'][6]}; ";
|
||||
if($css['mmb_reply_item'][7]) echo "border-{$css['mmb_reply_item']['border'][$i]}-width:{$css['mmb_reply_item'][7]}px; ";
|
||||
}
|
||||
}
|
||||
if($css['mmb_reply_item'][9]) echo "margin-bottom:{$css['mmb_reply_item'][9]}px; ";
|
||||
?>}
|
||||
|
||||
#log_list .item .item-inner .ui-comment { <?
|
||||
if($css['mmb_reply'][0]) $is_comment_area = true;
|
||||
if($css['mmb_reply'][0]) echo "background-color:".hex2rgba($css['mmb_reply'][0], $css['mmb_reply'][1])."; ";
|
||||
if($css['mmb_reply'][2]) echo "color:".hex2rgba($css['mmb_reply'][2], $css['mmb_reply'][3])."; ";
|
||||
if($css['mmb_reply'][4]) echo "border-color:".hex2rgba($css['mmb_reply'][4], $css['mmb_reply'][5])."; ";
|
||||
$css['mmb_reply']['border'] = explode("||", $css['mmb_reply'][8]);
|
||||
for($i=0; $i < count($css['mmb_reply']['border']); $i++) {
|
||||
if($css['mmb_reply']['border'][$i]) {
|
||||
if($css['mmb_reply'][6]) echo "border-{$css['mmb_reply']['border'][$i]}-style:{$css['mmb_reply'][6]}; ";
|
||||
if($css['mmb_reply'][7]) echo "border-{$css['mmb_reply']['border'][$i]}-width:{$css['mmb_reply'][7]}px; ";
|
||||
}
|
||||
}
|
||||
if($is_item_area && $is_comment_area) echo "padding-left:15px; padding-right:15px;";
|
||||
?>}
|
||||
|
||||
#log_list .item .item-inner .co-header p,
|
||||
#log_list .item .item-inner .co-header p a { <?
|
||||
if($css['mmb_name'][0]) echo "color:".hex2rgba($css['mmb_name'][0], $css['mmb_name'][1])."; ";
|
||||
if($css['mmb_name'][2]) echo "font-size:{$css['mmb_name'][2]}px; ";
|
||||
?>}
|
||||
|
||||
#log_list .item .item-inner .co-header p.owner,
|
||||
#log_list .item .item-inner .co-header p.owner a { <?
|
||||
if($css['mmb_owner_name'][0]) echo "color:".hex2rgba($css['mmb_owner_name'][0], $css['mmb_owner_name'][1])."; ";
|
||||
if($css['mmb_owner_name'][2]) echo "font-size:{$css['mmb_owner_name'][2]}px; ";
|
||||
?>}
|
||||
|
||||
#log_list .item .item-inner .co-footer .date { <?
|
||||
if($css['mmb_datetime'][0]) echo "color:".hex2rgba($css['mmb_datetime'][0], $css['mmb_datetime'][1])."; ";
|
||||
if($css['mmb_datetime'][2]) echo "font-size:{$css['mmb_datetime'][2]}px; ";
|
||||
?>}
|
||||
|
||||
#log_list .item .item-inner .co-content .other-site-link { <?
|
||||
if($css['mmb_link'][0]) echo "color:".hex2rgba($css['mmb_link'][0], $css['mmb_link'][1])."; ";
|
||||
?>}
|
||||
|
||||
#log_list .item .item-inner .co-content .link_hash_tag { <?
|
||||
if($css['mmb_hash'][0]) echo "color:".hex2rgba($css['mmb_hash'][0], $css['mmb_hash'][1])."; ";
|
||||
?>}
|
||||
|
||||
#log_list .item .item-inner .co-content .log_link_tag { <?
|
||||
if($css['mmb_log_ank'][0]) echo "color:".hex2rgba($css['mmb_log_ank'][0], $css['mmb_log_ank'][1])."; ";
|
||||
?>}
|
||||
148
AvocadoEdition_Light/adm/design_form_update.php
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
<?php
|
||||
$sub_menu = "100300";
|
||||
include_once('./_common.php');
|
||||
|
||||
$site_style_path = G5_DATA_PATH."/site";
|
||||
$site_style_url = G5_DATA_URL."/site";
|
||||
|
||||
@mkdir($site_style_path, G5_DIR_PERMISSION);
|
||||
@chmod($site_style_path, G5_DIR_PERMISSION);
|
||||
|
||||
|
||||
for($i=0; $i < count($cs_name); $i++) {
|
||||
|
||||
$de = sql_fetch("select * from {$g5['css_table']} where cs_name = '{$cs_name[$i]}'");
|
||||
|
||||
if(is_array($cs_etc_1[$i])) $cs_etc_1[$i] = "||".implode("||", $cs_etc_1[$i])."||";
|
||||
if(is_array($cs_etc_2[$i])) $cs_etc_2[$i] = "||".implode("||", $cs_etc_2[$i])."||";
|
||||
if(is_array($cs_etc_3[$i])) $cs_etc_3[$i] = "||".implode("||", $cs_etc_3[$i])."||";
|
||||
if(is_array($cs_etc_4[$i])) $cs_etc_4[$i] = "||".implode("||", $cs_etc_4[$i])."||";
|
||||
if(is_array($cs_etc_5[$i])) $cs_etc_5[$i] = "||".implode("||", $cs_etc_5[$i])."||";
|
||||
if(is_array($cs_etc_6[$i])) $cs_etc_6[$i] = "||".implode("||", $cs_etc_6[$i])."||";
|
||||
if(is_array($cs_etc_7[$i])) $cs_etc_7[$i] = "||".implode("||", $cs_etc_7[$i])."||";
|
||||
if(is_array($cs_etc_8[$i])) $cs_etc_8[$i] = "||".implode("||", $cs_etc_8[$i])."||";
|
||||
if(is_array($cs_etc_9[$i])) $cs_etc_9[$i] = "||".implode("||", $cs_etc_9[$i])."||";
|
||||
if(is_array($cs_etc_10[$i])) $cs_etc_10[$i] = "||".implode("||", $cs_etc_10[$i])."||";
|
||||
|
||||
if(is_array($cs_etc_11[$i])) $cs_etc_11[$i] = "||".implode("||", $cs_etc_11[$i])."||";
|
||||
if(is_array($cs_etc_12[$i])) $cs_etc_12[$i] = "||".implode("||", $cs_etc_12[$i])."||";
|
||||
if(is_array($cs_etc_13[$i])) $cs_etc_13[$i] = "||".implode("||", $cs_etc_13[$i])."||";
|
||||
if(is_array($cs_etc_14[$i])) $cs_etc_14[$i] = "||".implode("||", $cs_etc_14[$i])."||";
|
||||
if(is_array($cs_etc_15[$i])) $cs_etc_15[$i] = "||".implode("||", $cs_etc_15[$i])."||";
|
||||
if(is_array($cs_etc_16[$i])) $cs_etc_16[$i] = "||".implode("||", $cs_etc_16[$i])."||";
|
||||
if(is_array($cs_etc_17[$i])) $cs_etc_17[$i] = "||".implode("||", $cs_etc_17[$i])."||";
|
||||
if(is_array($cs_etc_18[$i])) $cs_etc_18[$i] = "||".implode("||", $cs_etc_18[$i])."||";
|
||||
if(is_array($cs_etc_19[$i])) $cs_etc_19[$i] = "||".implode("||", $cs_etc_19[$i])."||";
|
||||
if(is_array($cs_etc_20[$i])) $cs_etc_20[$i] = "||".implode("||", $cs_etc_20[$i])."||";
|
||||
|
||||
// 이미지 등록 시, 이미지를 업로드한 뒤 - 해당 이미지 경로를 삽입
|
||||
if ($_FILES['cs_value_file']['name'][$i]) {
|
||||
// 확장자 따기
|
||||
$exp = explode(".", $_FILES['cs_value_file']['name'][$i]);
|
||||
$exp = $exp[count($exp)-1];
|
||||
|
||||
$image_name = "design_".$cs_name[$i].".".$exp;
|
||||
upload_file($_FILES['cs_value_file']['tmp_name'][$i], $image_name, $site_style_path);
|
||||
$cs_value[$i] = $site_style_url."/".$image_name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($de['cs_id']) {
|
||||
// 수정
|
||||
$sql = " update {$g5['css_table']}
|
||||
set cs_value = '{$cs_value[$i]}',
|
||||
cs_descript = '{$cs_descript[$i]}',
|
||||
cs_etc_1 = '{$cs_etc_1[$i]}',
|
||||
cs_etc_2 = '{$cs_etc_2[$i]}',
|
||||
cs_etc_3 = '{$cs_etc_3[$i]}',
|
||||
cs_etc_4 = '{$cs_etc_4[$i]}',
|
||||
cs_etc_5 = '{$cs_etc_5[$i]}',
|
||||
cs_etc_6 = '{$cs_etc_6[$i]}',
|
||||
cs_etc_7 = '{$cs_etc_7[$i]}',
|
||||
cs_etc_8 = '{$cs_etc_8[$i]}',
|
||||
cs_etc_9 = '{$cs_etc_9[$i]}',
|
||||
cs_etc_10 = '{$cs_etc_10[$i]}',
|
||||
cs_etc_11 = '{$cs_etc_11[$i]}',
|
||||
cs_etc_12 = '{$cs_etc_12[$i]}',
|
||||
cs_etc_13 = '{$cs_etc_13[$i]}',
|
||||
cs_etc_14 = '{$cs_etc_14[$i]}',
|
||||
cs_etc_15 = '{$cs_etc_15[$i]}',
|
||||
cs_etc_16 = '{$cs_etc_16[$i]}',
|
||||
cs_etc_17 = '{$cs_etc_17[$i]}',
|
||||
cs_etc_18 = '{$cs_etc_18[$i]}',
|
||||
cs_etc_19 = '{$cs_etc_19[$i]}',
|
||||
cs_etc_20 = '{$cs_etc_20[$i]}'
|
||||
where cs_id = '{$de['cs_id']}'
|
||||
";
|
||||
sql_query($sql);
|
||||
|
||||
} else {
|
||||
// 입력
|
||||
$sql = " insert into {$g5['css_table']}
|
||||
set cs_name = '{$cs_name[$i]}',
|
||||
cs_value = '{$cs_value[$i]}',
|
||||
cs_descript = '{$cs_descript[$i]}',
|
||||
cs_etc_1 = '{$cs_etc_1[$i]}',
|
||||
cs_etc_2 = '{$cs_etc_2[$i]}',
|
||||
cs_etc_3 = '{$cs_etc_3[$i]}',
|
||||
cs_etc_4 = '{$cs_etc_4[$i]}',
|
||||
cs_etc_5 = '{$cs_etc_5[$i]}',
|
||||
cs_etc_6 = '{$cs_etc_6[$i]}',
|
||||
cs_etc_7 = '{$cs_etc_7[$i]}',
|
||||
cs_etc_8 = '{$cs_etc_8[$i]}',
|
||||
cs_etc_9 = '{$cs_etc_9[$i]}',
|
||||
cs_etc_10 = '{$cs_etc_10[$i]}',
|
||||
cs_etc_11 = '{$cs_etc_11[$i]}',
|
||||
cs_etc_12 = '{$cs_etc_12[$i]}',
|
||||
cs_etc_13 = '{$cs_etc_13[$i]}',
|
||||
cs_etc_14 = '{$cs_etc_14[$i]}',
|
||||
cs_etc_15 = '{$cs_etc_15[$i]}',
|
||||
cs_etc_16 = '{$cs_etc_16[$i]}',
|
||||
cs_etc_17 = '{$cs_etc_17[$i]}',
|
||||
cs_etc_18 = '{$cs_etc_18[$i]}',
|
||||
cs_etc_19 = '{$cs_etc_19[$i]}',
|
||||
cs_etc_20 = '{$cs_etc_20[$i]}'";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
$cf_add_fonts = '';
|
||||
if (isset($_POST['cf_add_fonts'])) {
|
||||
$cf_add_fonts = substr(trim($_POST['cf_add_fonts']),0,65536);
|
||||
$cf_add_fonts = preg_replace("#[\\\]+$#", "", $cf_add_fonts);
|
||||
}
|
||||
|
||||
$cf_css_version = date('YmdHis');
|
||||
|
||||
|
||||
$sql = " update {$g5['config_table']}
|
||||
set cf_add_fonts = '{$cf_add_fonts}',
|
||||
cf_css_version = '{$cf_css_version}',
|
||||
cf_add_script = '{$_POST['cf_add_script']}'";
|
||||
sql_query($sql);
|
||||
|
||||
|
||||
// CSS 설정 파일 생성
|
||||
$css_data_path = G5_DATA_PATH."/css";
|
||||
$css_data_url = G5_DATA_URL."/css";
|
||||
|
||||
@mkdir($css_data_path, G5_DIR_PERMISSION);
|
||||
@chmod($css_data_path, G5_DIR_PERMISSION);
|
||||
|
||||
$file = '../'.G5_DATA_DIR.'/css/_design.config.css';
|
||||
$file_path = $css_data_path.'/_design.config.css';
|
||||
unlink($file_path);
|
||||
$f = @fopen($file, 'a');
|
||||
|
||||
ob_start();
|
||||
include("./design_form_css.php");
|
||||
$css = ob_get_contents();
|
||||
ob_end_flush();
|
||||
fwrite($f,$css);
|
||||
fclose($f);
|
||||
@chmod($file, G5_FILE_PERMISSION);
|
||||
|
||||
|
||||
goto_url('./design_form.php', false);
|
||||
?>
|
||||
164
AvocadoEdition_Light/adm/design_guide_preview.php
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
<?
|
||||
include_once('./_common.php');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta http-equiv="imagetoolbar" content="no">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<meta name="title" content="<?=$g5['title']?>">
|
||||
<meta name="keywords" content="<?=$config['cf_site_descript']?>">
|
||||
<meta name="description" content="<?=$config['cf_site_descript']?>">
|
||||
|
||||
<meta property="og:title" content="<?=$g5['title']?>">
|
||||
<meta property="og:description" content="<?=$config['cf_site_descript']?>">
|
||||
<meta property="og:url" content="<?=G5_URL?>">
|
||||
|
||||
<title><?=$g5['title']?></title>
|
||||
|
||||
<link rel="shortcut icon" href="<?=$config['cf_favicon']?>">
|
||||
<link rel="icon" href="<?=$config['cf_favicon']?>">
|
||||
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link media="all" type="text/css" rel="stylesheet" href="<?=G5_CSS_URL?>/default.css?v=<?=$config['cf_css_version']?>">
|
||||
<link media="all" type="text/css" rel="stylesheet" href="<?=G5_CSS_URL?>/style.css?v=<?=$config['cf_css_version']?>">
|
||||
<link media="all" type="text/css" rel="stylesheet" href="<?=G5_URL?>/adm/css/guide.css?v=<?=$config['cf_css_version']?>">
|
||||
<link media="all" type="text/css" rel="stylesheet" href="<?=G5_DATA_URL?>/css/_design.config.css?v=<?=$config['cf_css_version']?>" />
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||
<script>
|
||||
if(!parent || parent==this) $('html').addClass('single');
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>현재 디자인 설정 보기</h1>
|
||||
<div class="previewWrap">
|
||||
<h2>◆ 텍스트</h2>
|
||||
<div class="admin-preview-box">
|
||||
<p>전체 기본 텍스트 스타일을 확인합니다.</p>
|
||||
<p class="txt-default">기본색 텍스트 스타일을 확인합니다.</p>
|
||||
<p class="txt-point">강조색 텍스트 스타일을 확인합니다.</p>
|
||||
</div>
|
||||
|
||||
<h2>◆ 메뉴</h2>
|
||||
<div class="admin-preview-box">
|
||||
<div class="gnbWrap">
|
||||
<span class="link">
|
||||
<span class="icons"><span><i class="material-icons">home</i></span></span>
|
||||
<span class="tooltips">HOME</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>◆ 버튼</h2>
|
||||
<div class="admin-preview-box">
|
||||
<a href="#" class="ui-btn">a링크 버튼</a>
|
||||
<a href="#" class="ui-btn point">a링크 버튼 (강조)</a>
|
||||
<a href="#" class="ui-btn etc">a링크 버튼 (기타)</a>
|
||||
<br />
|
||||
<button type="button" class="ui-btn">BUTTON</button>
|
||||
<button type="button" class="ui-btn point">BUTTON (강조)</button>
|
||||
<button type="button" class="ui-btn etc">BUTTON (기타)</button>
|
||||
<br />
|
||||
<a href="#" class="ui-btn small">작은 버튼</a>
|
||||
<a href="#" class="ui-btn small point">작은 버튼</a>
|
||||
<a href="#" class="ui-btn small etc">작은 버튼</a>
|
||||
</div>
|
||||
|
||||
<h2>◆ 기본박스</h2>
|
||||
<div class="admin-preview-box">
|
||||
<div class="theme-box">
|
||||
테마 박스 예제
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>◆ 공지사항 박스</h2>
|
||||
<div class="admin-preview-box">
|
||||
<div class="board-notice-box">
|
||||
공지사항 박스 예제
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>◆ 입력폼 예시</h2>
|
||||
<div class="admin-preview-box">
|
||||
<input type="number" value="0" placeholder="0" /> <br />
|
||||
<input type="text" placeholder="NUMBER 입력폼" /> <br />
|
||||
<input type="file" placeholder="NUMBER 입력폼" /> <br />
|
||||
<select><option value="">옵션명</option>
|
||||
<textarea placeholder="긴글 텍스트 입력 테스트"></textarea>
|
||||
</div>
|
||||
|
||||
<h2>◆ 목록테이블</h2>
|
||||
<div class="admin-preview-box">
|
||||
<table class="theme-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>목록 : 제목</th>
|
||||
<th>목록 : 제목</th>
|
||||
<th>목록 : 제목</th>
|
||||
<th>목록 : 제목</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>목록 : 내용</td>
|
||||
<td>목록 : 내용</td>
|
||||
<td>목록 : 내용</td>
|
||||
<td>목록 : 내용</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>목록 : 내용</td>
|
||||
<td>목록 : 내용</td>
|
||||
<td>목록 : 내용</td>
|
||||
<td>목록 : 내용</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>목록 : 내용</td>
|
||||
<td>목록 : 내용</td>
|
||||
<td>목록 : 내용</td>
|
||||
<td>목록 : 내용</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>◆ 작성테이블</h2>
|
||||
<div class="admin-preview-box">
|
||||
<table class="theme-form">
|
||||
<colgroup>
|
||||
<col style="width: 100px;" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>양식 : 제목</th>
|
||||
<td>양식 : 네용</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>양식 : 제목</th>
|
||||
<td>양식 : 네용</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>양식 : 제목</th>
|
||||
<td>양식 : 네용</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>양식 : 제목</th>
|
||||
<td>양식 : 네용</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>◆ 페이지</h2>
|
||||
<div class="admin-preview-box">
|
||||
<?=get_paging(10, 3, 120, "")?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
62
AvocadoEdition_Light/adm/head.sub.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
check_site_auth($is_member);
|
||||
$begin_time = get_microtime();
|
||||
|
||||
if (!isset($g5['title'])) {
|
||||
$g5['title'] = $config['cf_title'];
|
||||
$g5_head_title = $g5['title'];
|
||||
}
|
||||
else {
|
||||
$g5_head_title = $g5['title']; // 상태바에 표시될 제목
|
||||
$g5_head_title .= " | ".$config['cf_title'];
|
||||
}
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta http-equiv="imagetoolbar" content="no">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<?php
|
||||
if($config['cf_add_meta'])
|
||||
echo $config['cf_add_meta'].PHP_EOL;
|
||||
?>
|
||||
|
||||
<title><?php echo $g5_head_title; ?></title>
|
||||
<link rel="stylesheet" href="'.G5_ADMIN_URL.'/css/admin.css" type="text/css">
|
||||
<link rel="stylesheet" href="'.G5_ADMIN_URL.'/css/admin.layout.css" type="text/css">
|
||||
|
||||
<!--[if lte IE 8]>
|
||||
<script src="<?php echo G5_JS_URL ?>/html5.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
// 자바스크립트에서 사용하는 전역변수 선언
|
||||
var g5_url = "<?php echo G5_URL ?>";
|
||||
var g5_bbs_url = "<?php echo G5_BBS_URL ?>";
|
||||
var g5_is_member = "<?php echo isset($is_member)?$is_member:''; ?>";
|
||||
var g5_is_admin = "<?php echo isset($is_admin)?$is_admin:''; ?>";
|
||||
var g5_is_mobile = "<?php echo G5_IS_MOBILE ?>";
|
||||
var g5_bo_table = "<?php echo isset($bo_table)?$bo_table:''; ?>";
|
||||
var g5_sca = "<?php echo isset($sca)?$sca:''; ?>";
|
||||
var g5_editor = "<?php echo ($config['cf_editor'] && $board['bo_use_dhtml_editor'])?$config['cf_editor']:''; ?>";
|
||||
var g5_cookie_domain = "<?php echo G5_COOKIE_DOMAIN ?>";
|
||||
<?php if(defined('G5_IS_ADMIN')) { ?>
|
||||
var g5_admin_url = "<?php echo G5_ADMIN_URL; ?>";
|
||||
<?php } ?>
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL ?>/jquery-1.8.3.min.js"></script>
|
||||
<script src="<?php echo G5_JS_URL ?>/jquery.cookie.js"></script>
|
||||
<script src="<?php echo G5_JS_URL ?>/common.js"></script>
|
||||
<script src="<?php echo G5_JS_URL ?>/wrest.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
|
||||
<?php
|
||||
if(!defined('G5_IS_ADMIN'))
|
||||
echo $config['cf_add_script'];
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
BIN
AvocadoEdition_Light/adm/img/ajax_loader.gif
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
AvocadoEdition_Light/adm/img/bak_textarea.jpg
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
AvocadoEdition_Light/adm/img/check.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
AvocadoEdition_Light/adm/img/close.gif
Normal file
|
After Width: | Height: | Size: 200 B |
BIN
AvocadoEdition_Light/adm/img/close.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
AvocadoEdition_Light/adm/img/hd_bg.jpg
Normal file
|
After Width: | Height: | Size: 8 KiB |
BIN
AvocadoEdition_Light/adm/img/link_icon.gif
Normal file
|
After Width: | Height: | Size: 53 B |
BIN
AvocadoEdition_Light/adm/img/logo.jpg
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
AvocadoEdition_Light/adm/img/logo.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
AvocadoEdition_Light/adm/img/service_img1.jpg
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
AvocadoEdition_Light/adm/img/service_img2.jpg
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
AvocadoEdition_Light/adm/img/sub_menu_ico.gif
Normal file
|
After Width: | Height: | Size: 87 B |
BIN
AvocadoEdition_Light/adm/img/svc_btn_01.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
AvocadoEdition_Light/adm/img/svc_btn_02.jpg
Normal file
|
After Width: | Height: | Size: 3 KiB |
BIN
AvocadoEdition_Light/adm/img/svc_btn_03.jpg
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
AvocadoEdition_Light/adm/img/svc_btn_04.jpg
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
AvocadoEdition_Light/adm/img/svc_btn_05.jpg
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
AvocadoEdition_Light/adm/img/theme_img.jpg
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
AvocadoEdition_Light/adm/img/ts01.gif
Normal file
|
After Width: | Height: | Size: 177 B |
BIN
AvocadoEdition_Light/adm/img/ts02.gif
Normal file
|
After Width: | Height: | Size: 188 B |
BIN
AvocadoEdition_Light/adm/img/ts03.gif
Normal file
|
After Width: | Height: | Size: 196 B |
9
AvocadoEdition_Light/adm/index.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
goto_url('./site_config_form.php');
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
8
AvocadoEdition_Light/adm/js/jquery.minicolors.min.js
vendored
Normal file
29
AvocadoEdition_Light/adm/member_delete.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once("./_common.php");
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
|
||||
$mb = get_member($_POST['mb_id']);
|
||||
|
||||
if (!$mb['mb_id'])
|
||||
alert("회원자료가 존재하지 않습니다.");
|
||||
else if ($member['mb_id'] == $mb['mb_id'])
|
||||
alert("로그인 중인 관리자는 삭제 할 수 없습니다.");
|
||||
else if (is_admin($mb['mb_id']) == "super")
|
||||
alert("최고 관리자는 삭제할 수 없습니다.");
|
||||
else if ($mb['mb_level'] >= $member['mb_level'])
|
||||
alert("자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
// 회원자료 삭제
|
||||
member_delete($mb['mb_id']);
|
||||
|
||||
if ($url)
|
||||
goto_url("{$url}?$qstr&w=u&mb_id=$mb_id");
|
||||
else
|
||||
goto_url("./member_list.php?$qstr");
|
||||
?>
|
||||
283
AvocadoEdition_Light/adm/member_form.php
Normal file
|
|
@ -0,0 +1,283 @@
|
|||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$required_mb_id = 'required';
|
||||
$required_mb_id_class = 'required alnum_';
|
||||
$required_mb_password = 'required';
|
||||
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||
|
||||
$mb['mb_mailling'] = 1;
|
||||
$mb['mb_open'] = 1;
|
||||
$mb['mb_level'] = $config['cf_register_level'];
|
||||
$html_title = '추가';
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id'])
|
||||
alert('존재하지 않는 회원자료입니다.');
|
||||
|
||||
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
|
||||
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
||||
|
||||
$required_mb_id = 'readonly';
|
||||
$required_mb_password = '';
|
||||
$html_title = '수정';
|
||||
|
||||
$mb['mb_name'] = get_text($mb['mb_name']);
|
||||
$mb['mb_nick'] = get_text($mb['mb_nick']);
|
||||
$mb['mb_email'] = get_text($mb['mb_email']);
|
||||
$mb['mb_homepage'] = get_text($mb['mb_homepage']);
|
||||
$mb['mb_birth'] = get_text($mb['mb_birth']);
|
||||
$mb['mb_tel'] = get_text($mb['mb_tel']);
|
||||
$mb['mb_hp'] = get_text($mb['mb_hp']);
|
||||
$mb['mb_addr1'] = get_text($mb['mb_addr1']);
|
||||
$mb['mb_addr2'] = get_text($mb['mb_addr2']);
|
||||
$mb['mb_addr3'] = get_text($mb['mb_addr3']);
|
||||
$mb['mb_signature'] = get_text($mb['mb_signature']);
|
||||
$mb['mb_recommend'] = get_text($mb['mb_recommend']);
|
||||
$mb['mb_profile'] = get_text($mb['mb_profile']);
|
||||
$mb['mb_1'] = get_text($mb['mb_1']);
|
||||
$mb['mb_2'] = get_text($mb['mb_2']);
|
||||
$mb['mb_3'] = get_text($mb['mb_3']);
|
||||
$mb['mb_4'] = get_text($mb['mb_4']);
|
||||
$mb['mb_5'] = get_text($mb['mb_5']);
|
||||
$mb['mb_6'] = get_text($mb['mb_6']);
|
||||
$mb['mb_7'] = get_text($mb['mb_7']);
|
||||
$mb['mb_8'] = get_text($mb['mb_8']);
|
||||
$mb['mb_9'] = get_text($mb['mb_9']);
|
||||
$mb['mb_10'] = get_text($mb['mb_10']);
|
||||
}
|
||||
else
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
|
||||
// 본인확인방법
|
||||
switch($mb['mb_certify']) {
|
||||
case 'hp':
|
||||
$mb_certify_case = '휴대폰';
|
||||
$mb_certify_val = 'hp';
|
||||
break;
|
||||
case 'ipin':
|
||||
$mb_certify_case = '아이핀';
|
||||
$mb_certify_val = 'ipin';
|
||||
break;
|
||||
case 'admin':
|
||||
$mb_certify_case = '관리자 수정';
|
||||
$mb_certify_val = 'admin';
|
||||
break;
|
||||
default:
|
||||
$mb_certify_case = '';
|
||||
$mb_certify_val = 'admin';
|
||||
break;
|
||||
}
|
||||
|
||||
// 본인확인
|
||||
$mb_certify_yes = $mb['mb_certify'] ? 'checked="checked"' : '';
|
||||
$mb_certify_no = !$mb['mb_certify'] ? 'checked="checked"' : '';
|
||||
|
||||
// 성인인증
|
||||
$mb_adult_yes = $mb['mb_adult'] ? 'checked="checked"' : '';
|
||||
$mb_adult_no = !$mb['mb_adult'] ? 'checked="checked"' : '';
|
||||
|
||||
//메일수신
|
||||
$mb_mailling_yes = $mb['mb_mailling'] ? 'checked="checked"' : '';
|
||||
$mb_mailling_no = !$mb['mb_mailling'] ? 'checked="checked"' : '';
|
||||
|
||||
// SMS 수신
|
||||
$mb_sms_yes = $mb['mb_sms'] ? 'checked="checked"' : '';
|
||||
$mb_sms_no = !$mb['mb_sms'] ? 'checked="checked"' : '';
|
||||
|
||||
// 정보 공개
|
||||
$mb_open_yes = $mb['mb_open'] ? 'checked="checked"' : '';
|
||||
$mb_open_no = !$mb['mb_open'] ? 'checked="checked"' : '';
|
||||
|
||||
if (isset($mb['mb_certify'])) {
|
||||
// 날짜시간형이라면 drop 시킴
|
||||
if (preg_match("/-/", $mb['mb_certify'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}` DROP `mb_certify` ", false);
|
||||
}
|
||||
} else {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}` ADD `mb_certify` TINYINT(4) NOT NULL DEFAULT '0' AFTER `mb_hp` ", false);
|
||||
}
|
||||
|
||||
if(isset($mb['mb_adult'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}` CHANGE `mb_adult` `mb_adult` TINYINT(4) NOT NULL DEFAULT '0' ", false);
|
||||
} else {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}` ADD `mb_adult` TINYINT NOT NULL DEFAULT '0' AFTER `mb_certify` ", false);
|
||||
}
|
||||
|
||||
// 지번주소 필드추가
|
||||
if(!isset($mb['mb_addr_jibeon'])) {
|
||||
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_addr_jibeon` varchar(255) NOT NULL DEFAULT '' AFTER `mb_addr2` ", false);
|
||||
}
|
||||
|
||||
// 건물명필드추가
|
||||
if(!isset($mb['mb_addr3'])) {
|
||||
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_addr3` varchar(255) NOT NULL DEFAULT '' AFTER `mb_addr2` ", false);
|
||||
}
|
||||
|
||||
// 중복가입 확인필드 추가
|
||||
if(!isset($mb['mb_dupinfo'])) {
|
||||
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_dupinfo` varchar(255) NOT NULL DEFAULT '' AFTER `mb_adult` ", false);
|
||||
}
|
||||
|
||||
// 이메일인증 체크 필드추가
|
||||
if(!isset($mb['mb_email_certify2'])) {
|
||||
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_email_certify2` varchar(255) NOT NULL DEFAULT '' AFTER `mb_email_certify` ", false);
|
||||
}
|
||||
|
||||
if ($mb['mb_intercept_date']) $g5['title'] = "차단된 ";
|
||||
else $g5['title'] .= "";
|
||||
$g5['title'] .= '회원 '.$html_title;
|
||||
include_once('./admin.head.php');
|
||||
|
||||
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
?>
|
||||
|
||||
<form name="fmember" id="fmember" action="./member_form_update.php" onsubmit="return fmember_submit(this);" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_id">아이디<?php echo $sound_only ?></label></th>
|
||||
<td>
|
||||
<input type="text" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id" <?php echo $required_mb_id ?> class="frm_input <?php echo $required_mb_id_class ?>" size="15" minlength="3" maxlength="20">
|
||||
<?php if ($w=='u'){ ?><a href="./boardgroupmember_form.php?mb_id=<?php echo $mb['mb_id'] ?>">접근가능그룹보기</a><?php } ?>
|
||||
</td>
|
||||
<th scope="row"><label for="mb_password">비밀번호<?php echo $sound_only ?></label></th>
|
||||
<td><input type="password" name="mb_password" id="mb_password" <?php echo $required_mb_password ?> class="frm_input <?php echo $required_mb_password ?>" size="15" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_name">닉네임<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="mb_name" value="<?php echo $mb['mb_name'] ?>" id="mb_name" required class="required frm_input" size="15" minlength="2" maxlength="20"></td>
|
||||
<th scope="row"><label for="mb_level">회원 권한</label></th>
|
||||
<td><?php echo get_member_level_select('mb_level', 1, $member['mb_level'], $mb['mb_level']) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_email">E-mail<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="mb_email" value="<?php echo $mb['mb_email'] ?>" id="mb_email" maxlength="100" required class="required frm_input email" size="30"></td>
|
||||
<th scope="row"><label for="mb_birth">생년<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="mb_birth" value="<?php echo $mb['mb_birth'] ?>" id="mb_birth" maxlength="100" class="frm_input" size="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_open">정보 공개</label></th>
|
||||
<td colspan="3">
|
||||
<input type="radio" name="mb_open" value="1" id="mb_open_yes" <?php echo $mb_open_yes; ?>>
|
||||
<label for="mb_open_yes">예</label>
|
||||
<input type="radio" name="mb_open" value="0" id="mb_open_no" <?php echo $mb_open_no; ?>>
|
||||
<label for="mb_open_no">아니오</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_memo">메모</label></th>
|
||||
<td colspan="3"><textarea name="mb_memo" id="mb_memo"><?php echo $mb['mb_memo'] ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<?php if ($w == 'u') { ?>
|
||||
<tr>
|
||||
<th scope="row">회원가입일</th>
|
||||
<td><?php echo $mb['mb_datetime'] ?></td>
|
||||
<th scope="row">최근접속일</th>
|
||||
<td><?php echo $mb['mb_today_login'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">IP</th>
|
||||
<td colspan="3"><?php echo $mb['mb_ip'] ?></td>
|
||||
</tr>
|
||||
<?php if ($config['cf_use_email_certify']) { ?>
|
||||
<tr>
|
||||
<th scope="row">인증일시</th>
|
||||
<td colspan="3">
|
||||
<?php if ($mb['mb_email_certify'] == '0000-00-00 00:00:00') { ?>
|
||||
<?php echo help('회원님이 메일을 수신할 수 없는 경우 등에 직접 인증처리를 하실 수 있습니다.') ?>
|
||||
<input type="checkbox" name="passive_certify" id="passive_certify">
|
||||
<label for="passive_certify">수동인증</label>
|
||||
<?php } else { ?>
|
||||
<?php echo $mb['mb_email_certify'] ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config['cf_use_recommend']) { // 추천인 사용 ?>
|
||||
<tr>
|
||||
<th scope="row">추천인</th>
|
||||
<td colspan="3"><?php echo ($mb['mb_recommend'] ? get_text($mb['mb_recommend']) : '없음'); // 081022 : CSRF 보안 결함으로 인한 코드 수정 ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_leave_date">탈퇴일자</label></th>
|
||||
<td>
|
||||
<input type="text" name="mb_leave_date" value="<?php echo $mb['mb_leave_date'] ?>" id="mb_leave_date" class="frm_input" maxlength="8">
|
||||
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_leave_date_set_today" onclick="if (this.form.mb_leave_date.value==this.form.mb_leave_date.defaultValue) {
|
||||
this.form.mb_leave_date.value=this.value; } else { this.form.mb_leave_date.value=this.form.mb_leave_date.defaultValue; }">
|
||||
<label for="mb_leave_date_set_today">탈퇴일을 오늘로 지정</label>
|
||||
</td>
|
||||
<th scope="row">접근차단일자</th>
|
||||
<td>
|
||||
<input type="text" name="mb_intercept_date" value="<?php echo $mb['mb_intercept_date'] ?>" id="mb_intercept_date" class="frm_input" maxlength="8">
|
||||
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_intercept_date_set_today" onclick="if
|
||||
(this.form.mb_intercept_date.value==this.form.mb_intercept_date.defaultValue) { this.form.mb_intercept_date.value=this.value; } else {
|
||||
this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
|
||||
<label for="mb_intercept_date_set_today">접근차단일을 오늘로 지정</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||
<tr style="display: none;">
|
||||
<th scope="row"><label for="mb_<?php echo $i ?>">여분 필드 <?php echo $i ?></label></th>
|
||||
<td colspan="3"><input type="text" name="mb_<?php echo $i ?>" value="<?php echo $mb['mb_'.$i] ?>" id="mb_<?php echo $i ?>" class="frm_input" size="30" maxlength="255"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<a href="./member_list.php?<?php echo $qstr ?>" class="btn ty2"><span class="material-icons">list</span></a>
|
||||
<div class="btn">
|
||||
<span class="material-icons">save</span>
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey='s'>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fmember_submit(f)
|
||||
{
|
||||
if (!f.mb_icon.value.match(/\.gif$/i) && f.mb_icon.value) {
|
||||
alert('아이콘은 gif 파일만 가능합니다.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
167
AvocadoEdition_Light/adm/member_form_update.php
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once("./_common.php");
|
||||
include_once(G5_LIB_PATH."/register.lib.php");
|
||||
|
||||
if ($w == 'u')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$mb_id = trim($_POST['mb_id']);
|
||||
|
||||
// 휴대폰번호 체크
|
||||
$mb_hp = hyphen_hp_number($_POST['mb_hp']);
|
||||
if($mb_hp) {
|
||||
$result = exist_mb_hp($mb_hp, $mb_id);
|
||||
if ($result)
|
||||
alert($result);
|
||||
}
|
||||
|
||||
// 인증정보처리
|
||||
if($_POST['mb_certify_case'] && $_POST['mb_certify']) {
|
||||
$mb_certify = $_POST['mb_certify_case'];
|
||||
$mb_adult = $_POST['mb_adult'];
|
||||
} else {
|
||||
$mb_certify = '';
|
||||
$mb_adult = 0;
|
||||
}
|
||||
|
||||
$_POST['mb_nick'] = $_POST['mb_name'];
|
||||
|
||||
$mb_zip1 = substr($_POST['mb_zip'], 0, 3);
|
||||
$mb_zip2 = substr($_POST['mb_zip'], 3);
|
||||
|
||||
$sql_common = " mb_name = '{$_POST['mb_name']}',
|
||||
mb_nick = '{$_POST['mb_nick']}',
|
||||
mb_email = '{$_POST['mb_email']}',
|
||||
mb_homepage = '{$_POST['mb_homepage']}',
|
||||
mb_tel = '{$_POST['mb_tel']}',
|
||||
mb_hp = '{$mb_hp}',
|
||||
mb_certify = '{$mb_certify}',
|
||||
mb_adult = '{$mb_adult}',
|
||||
mb_zip1 = '{$mb_zip1}',
|
||||
mb_zip2 = '{$mb_zip2}',
|
||||
mb_addr1 = '{$_POST['mb_addr1']}',
|
||||
mb_addr2 = '{$_POST['mb_addr2']}',
|
||||
mb_addr3 = '{$_POST['mb_addr3']}',
|
||||
mb_addr_jibeon = '{$_POST['mb_addr_jibeon']}',
|
||||
mb_signature = '{$_POST['mb_signature']}',
|
||||
mb_leave_date = '{$_POST['mb_leave_date']}',
|
||||
mb_intercept_date='{$_POST['mb_intercept_date']}',
|
||||
mb_memo = '{$_POST['mb_memo']}',
|
||||
mb_mailling = '{$_POST['mb_mailling']}',
|
||||
mb_sms = '{$_POST['mb_sms']}',
|
||||
mb_open = '{$_POST['mb_open']}',
|
||||
mb_profile = '{$_POST['mb_profile']}',
|
||||
mb_level = '{$_POST['mb_level']}',
|
||||
mb_1 = '{$_POST['mb_1']}',
|
||||
mb_2 = '{$_POST['mb_2']}',
|
||||
mb_3 = '{$_POST['mb_3']}',
|
||||
mb_4 = '{$_POST['mb_4']}',
|
||||
mb_5 = '{$_POST['mb_5']}',
|
||||
mb_6 = '{$_POST['mb_6']}',
|
||||
mb_7 = '{$_POST['mb_7']}',
|
||||
mb_8 = '{$_POST['mb_8']}',
|
||||
mb_9 = '{$_POST['mb_9']}',
|
||||
mb_10 = '{$_POST['mb_10']}' ";
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$mb = get_member($mb_id);
|
||||
if ($mb['mb_id'])
|
||||
alert('이미 존재하는 회원아이디입니다.\\nID : '.$mb['mb_id'].'\\n이름 : '.$mb['mb_name'].'\\n닉네임 : '.$mb['mb_nick'].'\\n메일 : '.$mb['mb_email']);
|
||||
|
||||
// 닉네임중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$_POST['mb_nick']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 닉네임입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
// 이메일중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$_POST['mb_email']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
sql_query(" insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '".get_encrypt_string($mb_password)."', mb_datetime = '".G5_TIME_YMDHIS."', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_email_certify = '".G5_TIME_YMDHIS."', {$sql_common} ");
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id'])
|
||||
alert('존재하지 않는 회원자료입니다.');
|
||||
|
||||
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
|
||||
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
||||
|
||||
if ($_POST['mb_id'] == $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level'])
|
||||
alert($mb['mb_id'].' : 로그인 중인 관리자 레벨은 수정 할 수 없습니다.');
|
||||
|
||||
// 닉네임중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$_POST['mb_nick']}' and mb_id <> '{$mb_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 닉네임입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
// 이메일중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$_POST['mb_email']}' and mb_id <> '$mb_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
$mb_dir = substr($mb_id,0,2);
|
||||
|
||||
// 회원 아이콘 삭제
|
||||
if ($del_mb_icon)
|
||||
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif');
|
||||
|
||||
// 아이콘 업로드
|
||||
if (is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
|
||||
if (!preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
||||
alert($_FILES['mb_icon']['name'] . '은(는) gif 파일이 아닙니다.');
|
||||
}
|
||||
|
||||
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
||||
@mkdir(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
|
||||
|
||||
$dest_path = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
|
||||
|
||||
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
|
||||
chmod($dest_path, G5_FILE_PERMISSION);
|
||||
|
||||
if (file_exists($dest_path)) {
|
||||
$size = getimagesize($dest_path);
|
||||
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
|
||||
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
|
||||
@unlink($dest_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($mb_password)
|
||||
$sql_password = " , mb_password = '".get_encrypt_string($mb_password)."' ";
|
||||
else
|
||||
$sql_password = "";
|
||||
|
||||
if ($passive_certify)
|
||||
$sql_certify = " , mb_email_certify = '".G5_TIME_YMDHIS."' ";
|
||||
else
|
||||
$sql_certify = "";
|
||||
|
||||
$sql = " update {$g5['member_table']}
|
||||
set {$sql_common}
|
||||
{$sql_password}
|
||||
{$sql_certify}
|
||||
where mb_id = '{$mb_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
|
||||
goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
|
||||
?>
|
||||
227
AvocadoEdition_Light/adm/member_list.php
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$sql_common = " from {$g5['member_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
case 'mb_point' :
|
||||
$sql_search .= " ({$sfl} >= '{$stx}') ";
|
||||
break;
|
||||
case 'mb_level' :
|
||||
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||
break;
|
||||
case 'mb_tel' :
|
||||
case 'mb_hp' :
|
||||
$sql_search .= " ({$sfl} like '%{$stx}') ";
|
||||
break;
|
||||
default :
|
||||
$sql_search .= " ({$sfl} like '{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if ($is_admin != 'super')
|
||||
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "mb_datetime";
|
||||
$sod = "desc";
|
||||
}
|
||||
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
// 탈퇴회원수
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_leave_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$leave_count = $row['cnt'];
|
||||
|
||||
// 차단회원수
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$intercept_count = $row['cnt'];
|
||||
|
||||
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
$g5['title'] = '회원관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 10;
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
총회원수 <?php echo number_format($total_count) ?>명 중,
|
||||
<a href="?sst=mb_intercept_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>">차단 <?php echo number_format($intercept_count) ?></a>명,
|
||||
<a href="?sst=mb_leave_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>">탈퇴 <?php echo number_format($leave_count) ?></a>명
|
||||
</div>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
회원자료 삭제 시 다른 회원이 기존 회원아이디를 사용하지 못하도록 회원아이디, 이름, 닉네임은 삭제하지 않고 영구 보관합니다.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form id="fsearch" name="fsearch" class="local_sch01 local_sch" method="get">
|
||||
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>회원아이디</option>
|
||||
<option value="mb_nick"<?php echo get_selected($_GET['sfl'], "mb_nick"); ?>>닉네임</option>
|
||||
<option value="mb_level"<?php echo get_selected($_GET['sfl'], "mb_level"); ?>>권한</option>
|
||||
<option value="mb_email"<?php echo get_selected($_GET['sfl'], "mb_email"); ?>>E-MAIL</option>
|
||||
<option value="mb_ip"<?php echo get_selected($_GET['sfl'], "mb_ip"); ?>>IP</option>
|
||||
<option value="mb_recommend"<?php echo get_selected($_GET['sfl'], "mb_recommend"); ?>>추천인</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" class="btn_submit" value="검색">
|
||||
</form>
|
||||
<br />
|
||||
|
||||
<form name="fmemberlist" id="fmemberlist" action="./member_list_update.php" onsubmit="return fmemberlist_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:45px;">
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th>아이디</a></th>
|
||||
<th>이름</a></th>
|
||||
<th style="width:100px;">상태</th>
|
||||
<th style="width:100px;">권한</th>
|
||||
<th style="width:100px;">가입일</a></th>
|
||||
<th style="width:100px;">최종접속</a></th>
|
||||
<th style="width:50px;">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
$s_mod = '<a href="./member_form.php?'.$qstr.'&w=u&mb_id='.$row['mb_id'].'">수정</a>';
|
||||
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date('Ymd', G5_SERVER_TIME);
|
||||
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date('Ymd', G5_SERVER_TIME);
|
||||
$mb_nick = get_sideview($row['mb_id'], get_text($row['mb_nick']), $row['mb_email'], $row['mb_homepage']);
|
||||
$mb_id = $row['mb_id'];
|
||||
$leave_msg = '';
|
||||
$intercept_msg = '';
|
||||
$intercept_title = '';
|
||||
if ($row['mb_leave_date']) {
|
||||
$mb_id = $mb_id;
|
||||
$leave_msg = '<span class="mb_leave_msg">탈퇴함</span>';
|
||||
}
|
||||
else if ($row['mb_intercept_date']) {
|
||||
$mb_id = $mb_id;
|
||||
$intercept_msg = '<span class="mb_intercept_msg">차단됨</span>';
|
||||
$intercept_title = '차단해제';
|
||||
}
|
||||
if ($intercept_title == '')
|
||||
$intercept_title = '차단하기';
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td>
|
||||
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
|
||||
<td><?php echo $mb_id ?></td>
|
||||
<td><?php echo get_text($row['mb_name']); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if ($leave_msg || $intercept_msg) echo $leave_msg.' '.$intercept_msg;
|
||||
else echo "정상";
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo get_member_level_select("mb_level[$i]", 1, $member['mb_level'], $row['mb_level']) ?>
|
||||
</td>
|
||||
<td><?php echo substr($row['mb_datetime'],2,8); ?></td>
|
||||
<td><?php echo substr($row['mb_today_login'],2,8); ?></td>
|
||||
<td><?php echo $s_mod ?> <?php echo $s_grp ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo "<tr><td colspan=\"".$colspan."\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<div class="btn ty3">
|
||||
<span class="material-icons">build</span>
|
||||
<input type="submit" name="act_button" value="선택수정" title="선택수정" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
<div class="btn ty2">
|
||||
<span class="material-icons">delete</span>
|
||||
<input type="submit" name="act_button" value="완전삭제" title="완전삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
<?php if ($is_admin == 'super') { ?>
|
||||
<a href="./member_form.php" title="회원추가" class="btn"><span class="material-icons">add</span></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?'.$qstr.'&page='); ?>
|
||||
|
||||
<script>
|
||||
function fmemberlist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(document.pressed == "완전삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까? 완전삭제시 복구는 불가능합니다.")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
37
AvocadoEdition_Light/adm/member_list_delete.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once("./_common.php");
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$msg = "";
|
||||
for ($i=0; $i<count($chk); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$mb = get_member($_POST['mb_id'][$k]);
|
||||
|
||||
if (!$mb['mb_id']) {
|
||||
$msg .= "{$mb['mb_id']} : 회원자료가 존재하지 않습니다.\\n";
|
||||
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||
$msg .= "{$mb['mb_id']} : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n";
|
||||
} else if (is_admin($mb['mb_id']) == "super") {
|
||||
$msg .= "{$mb['mb_id']} : 최고 관리자는 삭제할 수 없습니다.\\n";
|
||||
} else if ($is_admin != "super" && $mb['mb_level'] >= $member['mb_level']) {
|
||||
$msg .= "{$mb['mb_id']} : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n";
|
||||
} else {
|
||||
// 회원자료 삭제
|
||||
member_delete($mb['mb_id']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($msg)
|
||||
echo "<script type='text/javascript'> alert('$msg'); </script>";
|
||||
|
||||
goto_url("./member_list.php?$qstr");
|
||||
?>
|
||||
92
AvocadoEdition_Light/adm/member_list_update.php
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$mb = get_member($_POST['mb_id'][$k]);
|
||||
|
||||
if (!$mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||
} else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||
$msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.\\n';
|
||||
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
|
||||
} else {
|
||||
if($_POST['mb_certify'][$k])
|
||||
$mb_adult = $_POST['mb_adult'][$k];
|
||||
else
|
||||
$mb_adult = 0;
|
||||
|
||||
$sql = " update {$g5['member_table']}
|
||||
set mb_level = '{$_POST['mb_level'][$k]}'
|
||||
where mb_id = '{$_POST['mb_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$mb = get_member($_POST['mb_id'][$k]);
|
||||
|
||||
if (!$mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n';
|
||||
} else if (is_admin($mb['mb_id']) == 'super') {
|
||||
$msg .= $mb['mb_id'].' : 최고 관리자는 삭제할 수 없습니다.\\n';
|
||||
} else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||
$msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n';
|
||||
} else {
|
||||
// 회원자료 삭제
|
||||
member_delete($mb['mb_id']);
|
||||
}
|
||||
}
|
||||
}else if ($_POST['act_button'] == "완전삭제") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$mb = get_member($_POST['mb_id'][$k]);
|
||||
|
||||
if (!$mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n';
|
||||
} else if (is_admin($mb['mb_id']) == 'super') {
|
||||
$msg .= $mb['mb_id'].' : 최고 관리자는 삭제할 수 없습니다.\\n';
|
||||
} else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||
$msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n';
|
||||
} else {
|
||||
// 회원자료 삭제
|
||||
sql_query(" delete from {$g5['member_table']} where mb_id = '{$_POST['mb_id'][$k]}' ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($msg)
|
||||
//echo '<script> alert("'.$msg.'"); </script>';
|
||||
alert($msg);
|
||||
|
||||
goto_url('./member_list.php?'.$qstr);
|
||||
?>
|
||||
143
AvocadoEdition_Light/adm/menu_form.php
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
<?php
|
||||
$sub_menu = "100400";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert_close('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$g5['title'] = '메뉴 추가';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
// 코드
|
||||
if($new == 'new' || !$code) {
|
||||
$code = base_convert(substr($code,0, 2), 36, 10);
|
||||
$code += 36;
|
||||
$code = base_convert($code, 10, 36);
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
body{min-width:100%;}
|
||||
</style>
|
||||
|
||||
<div id="menu_frm" class="new_win">
|
||||
<h1><?php echo $g5['title']; ?></h1>
|
||||
|
||||
<form name="fmenuform" id="fmenuform" enctype="multipart/form-data">
|
||||
|
||||
<div class="new_win_desc">
|
||||
<label for="me_type">대상선택</label>
|
||||
<select name="me_type" id="me_type">
|
||||
<option value="">직접입력</option>
|
||||
<option value="board">게시판</option>
|
||||
<option value="content">페이지</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="win-guide">구분선을 추가하실 경우, 메뉴 명에 <em>구분선</em>이라고 입력 후 추가 해주세요.</div>
|
||||
|
||||
<div id="menu_result"></div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#menu_result").load(
|
||||
"./menu_form_search.php"
|
||||
);
|
||||
|
||||
$("#me_type").on("change", function() {
|
||||
var type = $(this).val();
|
||||
|
||||
$("#menu_result").empty().load(
|
||||
"./menu_form_search.php",
|
||||
{ type : type }
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on("click", "#add_manual", function() {
|
||||
var me_name = $.trim($("#me_name").val());
|
||||
var me_link = $.trim($("#me_link").val());
|
||||
|
||||
add_menu_list(me_name, me_link, "<?php echo $code; ?>");
|
||||
});
|
||||
|
||||
$(document).on("click", ".add_select", function() {
|
||||
var me_name = $.trim($(this).siblings("input[name='subject[]']").val());
|
||||
var me_link = $.trim($(this).siblings("input[name='link[]']").val());
|
||||
|
||||
add_menu_list(me_name, me_link, "<?php echo $code; ?>");
|
||||
});
|
||||
});
|
||||
|
||||
function add_menu_list(name, link, code)
|
||||
{
|
||||
var $menulist = $("#menulist", opener.document);
|
||||
var ms = new Date().getTime();
|
||||
var sub_menu_class;
|
||||
<?php if($new == 'new') { ?>
|
||||
sub_menu_class = " class=\"td_category\"";
|
||||
<?php } else { ?>
|
||||
sub_menu_class = " class=\"td_category sub_menu_class\"";
|
||||
<?php } ?>
|
||||
|
||||
var list = "";
|
||||
list += "<tr class=\"menu_list menu_group_<?php echo $code; ?>\" data-name='"+name+"'>";
|
||||
list += "<td"+sub_menu_class+">";
|
||||
list += " <input type=\"hidden\" name=\"code[]\" value=\"<?php echo $code; ?>\" />";
|
||||
list += " <input type=\"hidden\" name=\"me_level[]\" value=\"\" />";
|
||||
list += " <input type=\"text\" name=\"me_name[]\" value=\""+name+"\" id=\"me_name_"+ms+"\" required class=\"required frm_input full_input\" />";
|
||||
list += "</td>";
|
||||
list += "<td></td>";
|
||||
list += "<td>";
|
||||
list += " <input type=\"text\" name=\"me_icon[]\" class=\"frm_input full_input\" />";
|
||||
list += "</td>";
|
||||
list += "<td>";
|
||||
list += " <input type=\"text\" name=\"me_link[]\" value=\""+link+"\" class=\"frm_input full_input\" />";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_mng\">";
|
||||
list += " <select name=\"me_target[]\">";
|
||||
list += " <option value=\"self\">현재창</option>";
|
||||
list += " <option value=\"blank\">새창</option>";
|
||||
list += " </select>";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_numsmall order\">";
|
||||
list += " <input type=\"text\" name=\"me_order[]\" value=\"0\" required class=\"required frm_input\" size=\"5\">";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_numsmall\">";
|
||||
list += " <input type=\"checkbox\" name=\"me_use[]\" value=\"1\" class=\"frm_input\" checked>";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_mngsmall\">";
|
||||
list += " <button type=\"button\" class=\"btn_del_menu\"><span class=''><span class='material-icons'>delete</span></button>";
|
||||
list += "</td>";
|
||||
list += "</tr>";
|
||||
|
||||
var $menu_last = null;
|
||||
|
||||
if(code)
|
||||
$menu_last = $menulist.find("tr.menu_group_"+code+":last");
|
||||
else
|
||||
$menu_last = $menulist.find("tr.menu_list:last");
|
||||
|
||||
if($menu_last.size() > 0) {
|
||||
$menu_last.after(list);
|
||||
} else {
|
||||
if($menulist.find("#empty_menu_list").size() > 0)
|
||||
$menulist.find("#empty_menu_list").remove();
|
||||
|
||||
$menulist.find("table tbody").append(list);
|
||||
}
|
||||
|
||||
$menulist.find("tr.menu_list").each(function(index) {
|
||||
$(this).removeClass("bg0 bg1")
|
||||
.addClass("bg"+(index % 2));
|
||||
});
|
||||
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
111
AvocadoEdition_Light/adm/menu_form_search.php
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
die('최고관리자만 접근 가능합니다.');
|
||||
|
||||
switch($type) {
|
||||
case 'group':
|
||||
$sql = " select gr_id as id, gr_subject as subject
|
||||
from {$g5['group_table']}
|
||||
order by gr_order, gr_id ";
|
||||
break;
|
||||
case 'board':
|
||||
$sql = " select bo_table as id, bo_subject as subject
|
||||
from {$g5['board_table']}
|
||||
order by bo_order, bo_table ";
|
||||
break;
|
||||
case 'content':
|
||||
$sql = " select co_id as id, co_subject as subject
|
||||
from {$g5['content_table']}
|
||||
order by co_id ";
|
||||
break;
|
||||
default:
|
||||
$sql = '';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($sql) {
|
||||
$result = sql_query($sql);
|
||||
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
if($i == 0) {
|
||||
?>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col" style="width:80px;">선택</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php }
|
||||
switch($type) {
|
||||
case 'group':
|
||||
$link = G5_BBS_URL.'/group.php?gr_id='.$row['id'];
|
||||
break;
|
||||
case 'board':
|
||||
$link = G5_BBS_URL.'/board.php?bo_table='.$row['id'];
|
||||
break;
|
||||
case 'content':
|
||||
$link = G5_BBS_URL.'/content.php?co_id='.$row['id'];
|
||||
break;
|
||||
default:
|
||||
$link = '';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $row['subject']; ?></td>
|
||||
<td class="td_mngsmall">
|
||||
<input type="hidden" name="subject[]" value="<?php echo preg_replace('/[\'\"]/', '', $row['subject']); ?>">
|
||||
<input type="hidden" name="link[]" value="<?php echo $link; ?>">
|
||||
<button type="button" class="add_select"><span class="sound_only"><?php echo $row['subject']; ?> </span>선택</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_win02 btn_win">
|
||||
<button type="button" class="btn_cancel" onclick="window.close();">창닫기</button>
|
||||
</div>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width:100px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="me_name">메뉴<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td><input type="text" name="me_name" id="me_name" required class="frm_input required"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="me_link">링크<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('링크는 http://를 포함해서 입력해 주세요.'); ?>
|
||||
<input type="text" name="me_link" id="me_link" required class="frm_input full_input required">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_win02 btn_win">
|
||||
<button type="button" id="add_manual" class="btn_submit">추가</button>
|
||||
<button type="button" class="btn_cancel" onclick="window.close();">창닫기</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
190
AvocadoEdition_Light/adm/menu_list.php
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
<?php
|
||||
$sub_menu = "100400";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super') alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
|
||||
$sql = " select * from {$g5['menu_table']} order by me_order*1, me_id ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$g5['title'] = "메뉴설정";
|
||||
include_once('./admin.head.php');
|
||||
$colspan = 8;
|
||||
?>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p><strong>주의!</strong> 메뉴설정 작업 후 반드시 <strong>확인</strong>을 누르셔야 저장됩니다.</p>
|
||||
</div>
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>아이콘 항목에 사용할 구글 아이콘 이름을 입력해주세요. ( ex. <span style="color:red"><span class="material-icons"><strong>home</strong></span></span> ▶ <strong>home</strong> 만 입력하기 )</p>
|
||||
</div>
|
||||
|
||||
<form name="fmenulist" id="fmenulist" method="post" action="./menu_list_update.php" onsubmit="return fmenulist_submit(this);" enctype="multipart/form-data">
|
||||
<input type="hidden" name="token" value="">
|
||||
|
||||
<div class="btn_confirm">
|
||||
<a href="https://fonts.google.com/icons?icon.query=house&icon.set=Material+Icons" target="_blank" class="btn ty3" title="구글 아이콘 목록 보기"><span class="material-icons">app_registration</span></a>
|
||||
<button type="button" onclick="return add_menu();" class="ty2"><span class="material-icons">add</span></button>
|
||||
<div class="btn">
|
||||
<span class="material-icons">save</span>
|
||||
<input type="submit" value="저장" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="menulist" class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width:140px;">
|
||||
<col style="width:50px;">
|
||||
<col style="width:150px;">
|
||||
<col>
|
||||
<col style="width:100px;">
|
||||
<col style="width:80px;">
|
||||
<col style="width:80px;">
|
||||
<col style="width:80px;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">메뉴</th>
|
||||
<th scope="col" colspan="2">아이콘</th>
|
||||
<th scope="col">링크</th>
|
||||
<th scope="col">새창</th>
|
||||
<th scope="col">순서</th>
|
||||
<th scope="col">사용</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$bg = 'bg'.($i%2);
|
||||
$sub_menu_class = '';
|
||||
if(strlen($row['me_code']) == 4) {
|
||||
$sub_menu_class = ' sub_menu_class';
|
||||
$sub_menu_info = '<span class="sound_only">'.$row['me_name'].'의 서브</span>';
|
||||
$sub_menu_ico = '<span class="sub_menu_ico"></span>';
|
||||
}
|
||||
|
||||
$search = array('"', "'");
|
||||
$replace = array('"', ''');
|
||||
$me_name = str_replace($search, $replace, $row['me_name']);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?> menu_list menu_group_<?php echo substr($row['me_code'], 0, 2); ?>" data-name="<?php echo $me_name; ?>">
|
||||
|
||||
<td class="td_category<?php echo $sub_menu_class; ?>">
|
||||
<input type="hidden" name="code[]" value="<?php echo substr($row['me_code'], 0, 2) ?>" />
|
||||
<input type="hidden" name="me_level[]" value="<?php echo $row['me_level'] ?>" />
|
||||
<input type="text" name="me_name[]" value="<?php echo $me_name; ?>" required class="required frm_input full_input" />
|
||||
</td>
|
||||
<td>
|
||||
<i class="material-icons"><?=$row['me_icon']?></i>
|
||||
</td>
|
||||
<td class="txt-left">
|
||||
<input type="text" name="me_icon[]" value="<?php echo get_text($row['me_icon']) ?>" class=" frm_input full_input" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="me_link[]" value="<?php echo $row['me_link'] ?>" id="me_link_<?php echo $i; ?>" class="frm_input full_input" />
|
||||
</td>
|
||||
<td class="td_mng">
|
||||
<select name="me_target[]" class=" frm_input full_input">
|
||||
<option value="self"<?php echo get_selected($row['me_target'], 'self', true); ?>>현재창</option>
|
||||
<option value="blank"<?php echo get_selected($row['me_target'], 'blank', true); ?>>새창</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_num order">
|
||||
<input type="text" name="me_order[]" value="<?php echo $row['me_order'] ?>" id="me_order_<?php echo $i; ?>" class="frm_input full_input">
|
||||
</td>
|
||||
|
||||
<td class="td_mng">
|
||||
<input type="checkbox" name="me_use[]" id="me_use_<?php echo $i; ?>" value="1" <?=$row['me_use']==1 ? "checked":"";?>>
|
||||
</td>
|
||||
<td class="td_mng">
|
||||
<button type="button" class="btn_del_menu"><span class='material-icons'>delete</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i==0)
|
||||
echo '<tr id="empty_menu_list"><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$(document).on("click", ".btn_add_submenu", function() {
|
||||
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
||||
add_submenu(code);
|
||||
});
|
||||
|
||||
$(document).on("click", ".btn_del_menu", function() {
|
||||
if(!confirm("메뉴를 삭제하시겠습니까?"))
|
||||
return false;
|
||||
|
||||
var $tr = $(this).closest("tr");
|
||||
if($tr.find("td.sub_menu_class").size() > 0) {
|
||||
$tr.remove();
|
||||
} else {
|
||||
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
||||
$("tr.menu_group_"+code).remove();
|
||||
}
|
||||
|
||||
if($("#menulist tr.menu_list").size() < 1) {
|
||||
var list = "<tr id=\"empty_menu_list\"><td colspan=\"<?php echo $colspan; ?>\" class=\"empty_table\">자료가 없습니다.</td></tr>\n";
|
||||
$("#menulist table tbody").append(list);
|
||||
} else {
|
||||
$("#menulist tr.menu_list").each(function(index) {
|
||||
$(this).removeClass("bg0 bg1")
|
||||
.addClass("bg"+(index % 2));
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function add_menu()
|
||||
{
|
||||
var max_code = base_convert(0, 10, 36);
|
||||
$("#menulist tr.menu_list").each(function() {
|
||||
var me_code = $(this).find("input[name='code[]']").val().substr(0, 2);
|
||||
if(max_code < me_code)
|
||||
max_code = me_code;
|
||||
});
|
||||
|
||||
var url = "./menu_form.php?code="+max_code+"&new=new";
|
||||
window.open(url, "add_menu", "left=100,top=100,width=550,height=650,scrollbars=yes,resizable=yes");
|
||||
return false;
|
||||
}
|
||||
|
||||
function add_submenu(code)
|
||||
{
|
||||
var url = "./menu_form.php?code="+code;
|
||||
window.open(url, "add_menu", "left=100,top=100,width=550,height=650,scrollbars=yes,resizable=yes");
|
||||
return false;
|
||||
}
|
||||
|
||||
function base_convert(number, frombase, tobase) {
|
||||
// discuss at: http://phpjs.org/functions/base_convert/
|
||||
// original by: Philippe Baumann
|
||||
// improved by: Rafał Kukawski (http://blog.kukawski.pl)
|
||||
// example 1: base_convert('A37334', 16, 2);
|
||||
// returns 1: '101000110111001100110100'
|
||||
|
||||
return parseInt(number + '', frombase | 0)
|
||||
.toString(tobase | 0);
|
||||
}
|
||||
|
||||
function fmenulist_submit(f)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
70
AvocadoEdition_Light/adm/menu_list_update.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
$sub_menu = "100400";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
// 이전 메뉴정보 삭제
|
||||
$sql = " delete from {$g5['menu_table']} ";
|
||||
sql_query($sql);
|
||||
|
||||
$group_code = null;
|
||||
$primary_code = null;
|
||||
$count = count($_POST['code']);
|
||||
|
||||
for ($i=0; $i<$count; $i++) {
|
||||
|
||||
$_POST = array_map_deep('trim', $_POST);
|
||||
|
||||
$code = $_POST['code'][$i];
|
||||
$me_name = $_POST['me_name'][$i];
|
||||
$me_link = $_POST['me_link'][$i];
|
||||
|
||||
if(!$code || !$me_name)
|
||||
continue;
|
||||
|
||||
$sub_code = '';
|
||||
if($group_code == $code) {
|
||||
$sql = " select MAX(SUBSTRING(me_code,3,2)) as max_me_code
|
||||
from {$g5['menu_table']}
|
||||
where SUBSTRING(me_code,1,2) = '$primary_code' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$sub_code = base_convert($row['max_me_code'], 36, 10);
|
||||
$sub_code += 36;
|
||||
$sub_code = base_convert($sub_code, 10, 36);
|
||||
|
||||
$me_code = $primary_code.$sub_code;
|
||||
} else {
|
||||
$sql = " select MAX(SUBSTRING(me_code,1,2)) as max_me_code
|
||||
from {$g5['menu_table']}
|
||||
where LENGTH(me_code) = '2' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$me_code = base_convert($row['max_me_code'], 36, 10);
|
||||
$me_code += 36;
|
||||
$me_code = base_convert($me_code, 10, 36);
|
||||
|
||||
$group_code = $code;
|
||||
$primary_code = $me_code;
|
||||
}
|
||||
|
||||
// 메뉴 등록
|
||||
$sql = " insert into {$g5['menu_table']}
|
||||
set me_code = '{$me_code}',
|
||||
me_icon = '{$_POST['me_icon'][$i]}',
|
||||
me_name = '{$me_name}',
|
||||
me_link = '{$me_link}',
|
||||
me_target = '{$_POST['me_target'][$i]}',
|
||||
me_order = '{$_POST['me_order'][$i]}',
|
||||
me_use = '{$_POST['me_use'][$i]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./menu_list.php');
|
||||
?>
|
||||
10
AvocadoEdition_Light/adm/phpinfo.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
$sub_menu = "100500";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
phpinfo();
|
||||
?>
|
||||
61
AvocadoEdition_Light/adm/session_file_delete.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
$sub_menu = "900100";
|
||||
include_once("./_common.php");
|
||||
|
||||
if ($is_admin != "super")
|
||||
alert("최고관리자만 접근 가능합니다.", G5_URL);
|
||||
|
||||
$g5['title'] = "세션파일 일괄삭제";
|
||||
include_once("./admin.head.php");
|
||||
?>
|
||||
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
flush();
|
||||
|
||||
$list_tag_st = "";
|
||||
$list_tag_end = "";
|
||||
if (!$dir=@opendir(G5_DATA_PATH.'/session')) {
|
||||
echo "<p>세션 디렉토리를 열지못했습니다.</p>";
|
||||
} else {
|
||||
$list_tag_st = "<ul>\n<li>완료됨</li>\n";
|
||||
$list_tag_end = "</ul>\n";
|
||||
}
|
||||
|
||||
$cnt=0;
|
||||
echo $list_tag_st;
|
||||
while($file=readdir($dir)) {
|
||||
|
||||
if (!strstr($file,'sess_')) continue;
|
||||
if (strpos($file,'sess_')!=0) continue;
|
||||
|
||||
$session_file = G5_DATA_PATH.'/session/'.$file;
|
||||
|
||||
if (!$atime=@fileatime($session_file)) {
|
||||
continue;
|
||||
}
|
||||
if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전
|
||||
$cnt++;
|
||||
$return = unlink($session_file);
|
||||
//echo "<script>document.getElementById('ct').innerHTML += '{$session_file}<br/>';</script>\n";
|
||||
echo "<li>{$session_file}</li>\n";
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
//echo "<script>document.getElementById('ct').innerHTML = '';</script>\n";
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
echo $list_tag_end;
|
||||
echo '<div class="local_desc01 local_desc"><p><strong>세션데이터 '.$cnt.'건 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once("./admin.tail.php");
|
||||
?>
|
||||
412
AvocadoEdition_Light/adm/site_config_form.php
Normal file
|
|
@ -0,0 +1,412 @@
|
|||
<?php
|
||||
$sub_menu = "100100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
|
||||
if (!isset($config['cf_use_http'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_use_http` INT(11) NOT NULL DEFAULT '0' AFTER `cf_10` ", true);
|
||||
}
|
||||
|
||||
if (!isset($config['cf_add_script'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_add_script` TEXT NOT NULL AFTER `cf_admin_email_name` ", true);
|
||||
}
|
||||
|
||||
if (!isset($config['cf_mobile_new_skin'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_mobile_new_skin` VARCHAR(255) NOT NULL AFTER `cf_memo_send_point`,
|
||||
ADD `cf_mobile_search_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_new_skin`,
|
||||
ADD `cf_mobile_connect_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_search_skin`,
|
||||
ADD `cf_mobile_member_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_connect_skin` ", true);
|
||||
}
|
||||
|
||||
if (isset($config['cf_gcaptcha_mp3'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
CHANGE `cf_gcaptcha_mp3` `cf_captcha_mp3` VARCHAR(255) NOT NULL DEFAULT '' ", true);
|
||||
} else if (!isset($config['cf_captcha_mp3'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_captcha_mp3` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_mobile_member_skin` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_editor'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_editor` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_captcha_mp3` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_googl_shorturl_apikey'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_googl_shorturl_apikey` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_captcha_mp3` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_mobile_pages'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_mobile_pages` INT(11) NOT NULL DEFAULT '0' AFTER `cf_write_pages` ", true);
|
||||
sql_query(" UPDATE `{$g5['config_table']}` SET cf_mobile_pages = '5' ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_facebook_appid'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_facebook_appid` VARCHAR(255) NOT NULL AFTER `cf_googl_shorturl_apikey`,
|
||||
ADD `cf_facebook_secret` VARCHAR(255) NOT NULL AFTER `cf_facebook_appid`,
|
||||
ADD `cf_twitter_key` VARCHAR(255) NOT NULL AFTER `cf_facebook_secret`,
|
||||
ADD `cf_twitter_secret` VARCHAR(255) NOT NULL AFTER `cf_twitter_key` ", true);
|
||||
}
|
||||
|
||||
// uniqid 테이블이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['uniqid_table']} ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['uniqid_table']}` (
|
||||
`uq_id` bigint(20) unsigned NOT NULL,
|
||||
`uq_ip` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`uq_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
if(!sql_query(" SELECT uq_ip from {$g5['uniqid_table']} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE {$g5['uniqid_table']} ADD `uq_ip` VARCHAR(255) NOT NULL ");
|
||||
}
|
||||
|
||||
// 임시저장 테이블이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['autosave_table']} ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['autosave_table']}` (
|
||||
`as_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`mb_id` varchar(20) NOT NULL,
|
||||
`as_uid` bigint(20) unsigned NOT NULL,
|
||||
`as_subject` varchar(255) NOT NULL,
|
||||
`as_content` text NOT NULL,
|
||||
`as_datetime` datetime NOT NULL,
|
||||
PRIMARY KEY (`as_id`),
|
||||
UNIQUE KEY `as_uid` (`as_uid`),
|
||||
KEY `mb_id` (`mb_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_admin_email'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_admin_email` VARCHAR(255) NOT NULL AFTER `cf_admin` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_admin_email_name'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_admin_email_name` VARCHAR(255) NOT NULL AFTER `cf_admin_email` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_cert_use'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_cert_use` TINYINT(4) NOT NULL DEFAULT '0' AFTER `cf_editor`,
|
||||
ADD `cf_cert_ipin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_use`,
|
||||
ADD `cf_cert_hp` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_ipin`,
|
||||
ADD `cf_cert_kcb_cd` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_hp`,
|
||||
ADD `cf_cert_kcp_cd` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_kcb_cd`,
|
||||
ADD `cf_cert_limit` INT(11) NOT NULL DEFAULT '0' AFTER `cf_cert_kcp_cd` ", true);
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}`
|
||||
CHANGE `mb_hp_certify` `mb_certify` VARCHAR(20) NOT NULL DEFAULT '' ", true);
|
||||
sql_query(" update {$g5['member_table']} set mb_certify = 'hp' where mb_certify = '1' ");
|
||||
sql_query(" update {$g5['member_table']} set mb_certify = '' where mb_certify = '0' ");
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['cert_history_table']}` (
|
||||
`cr_id` int(11) NOT NULL auto_increment,
|
||||
`mb_id` varchar(255) NOT NULL DEFAULT '',
|
||||
`cr_company` varchar(255) NOT NULL DEFAULT '',
|
||||
`cr_method` varchar(255) NOT NULL DEFAULT '',
|
||||
`cr_ip` varchar(255) NOT NULL DEFAULT '',
|
||||
`cr_date` date NOT NULL DEFAULT '0000-00-00',
|
||||
`cr_time` time NOT NULL DEFAULT '00:00:00',
|
||||
PRIMARY KEY (`cr_id`),
|
||||
KEY `mb_id` (`mb_id`)
|
||||
)", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_analytics'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_analytics` TEXT NOT NULL AFTER `cf_intercept_ip` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_add_meta'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_add_meta` TEXT NOT NULL AFTER `cf_analytics` ", true);
|
||||
}
|
||||
|
||||
if (!isset($config['cf_syndi_token'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_syndi_token` VARCHAR(255) NOT NULL AFTER `cf_add_meta` ", true);
|
||||
}
|
||||
|
||||
if (!isset($config['cf_syndi_except'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_syndi_except` TEXT NOT NULL AFTER `cf_syndi_token` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_sms_use'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_sms_use` varchar(255) NOT NULL DEFAULT '' AFTER `cf_cert_limit`,
|
||||
ADD `cf_icode_id` varchar(255) NOT NULL DEFAULT '' AFTER `cf_sms_use`,
|
||||
ADD `cf_icode_pw` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_id`,
|
||||
ADD `cf_icode_server_ip` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_pw`,
|
||||
ADD `cf_icode_server_port` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_server_ip` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_mobile_page_rows'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_mobile_page_rows` int(11) NOT NULL DEFAULT '0' AFTER `cf_page_rows` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_cert_req'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_cert_req` tinyint(4) NOT NULL DEFAULT '0' AFTER `cf_cert_limit` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_faq_skin'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_faq_skin` varchar(255) NOT NULL DEFAULT '' AFTER `cf_connect_skin`,
|
||||
ADD `cf_mobile_faq_skin` varchar(255) NOT NULL DEFAULT '' AFTER `cf_mobile_connect_skin` ", true);
|
||||
}
|
||||
|
||||
// LG유플러스 본인확인 필드 추가
|
||||
if(!isset($config['cf_lg_mid'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_lg_mid` varchar(255) NOT NULL DEFAULT '' AFTER `cf_cert_kcp_cd`,
|
||||
ADD `cf_lg_mert_key` varchar(255) NOT NULL DEFAULT '' AFTER `cf_lg_mid` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_optimize_date'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_optimize_date` date NOT NULL default '0000-00-00' AFTER `cf_popular_del` ", true);
|
||||
}
|
||||
|
||||
// 카카오톡링크 api 키
|
||||
if(!isset($config['cf_kakao_js_apikey'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_kakao_js_apikey` varchar(255) NOT NULL DEFAULT '' AFTER `cf_googl_shorturl_apikey` ", true);
|
||||
}
|
||||
|
||||
// SMS 전송유형 필드 추가
|
||||
if(!isset($config['cf_sms_type'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_sms_type` varchar(10) NOT NULL DEFAULT '' AFTER `cf_sms_use` ", true);
|
||||
}
|
||||
|
||||
// 커서 등록 추가
|
||||
if(!isset($config['cf_cursor'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_cursor` varchar(255) NOT NULL DEFAULT '' AFTER `cf_sms_use` ", true);
|
||||
}
|
||||
|
||||
// 접속자 정보 필드 추가
|
||||
if(!sql_query(" select vi_browser from {$g5['visit_table']} limit 1 ")) {
|
||||
sql_query(" ALTER TABLE `{$g5['visit_table']}`
|
||||
ADD `vi_browser` varchar(255) NOT NULL DEFAULT '' AFTER `vi_agent`,
|
||||
ADD `vi_os` varchar(255) NOT NULL DEFAULT '' AFTER `vi_browser`,
|
||||
ADD `vi_device` varchar(255) NOT NULL DEFAULT '' AFTER `vi_os` ", true);
|
||||
}
|
||||
|
||||
if(!$config['cf_faq_skin']) $config['cf_faq_skin'] = "basic";
|
||||
if(!$config['cf_mobile_faq_skin']) $config['cf_mobile_faq_skin'] = "basic";
|
||||
|
||||
$g5['title'] = '환경설정';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_001">기본환경</a></li>
|
||||
<li><a href="#anc_002">게시판/회원</a></li>
|
||||
<li><a href="#anc_010">레이아웃 추가설정</a></li>
|
||||
</ul>';
|
||||
|
||||
if (!$config['cf_icode_server_ip']) $config['cf_icode_server_ip'] = '211.172.232.124';
|
||||
if (!$config['cf_icode_server_port']) $config['cf_icode_server_port'] = '7295';
|
||||
|
||||
if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
$userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']);
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);" enctype="multipart/form-data">
|
||||
<input type="hidden" name="token" value="" id="token">
|
||||
|
||||
<div class="btn_confirm">
|
||||
<div class="btn">
|
||||
<span class="material-icons">save</span>
|
||||
<input type="submit" value="저장" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section id="anc_001">
|
||||
<h2 class="h2_frm">홈페이지 기본환경 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>홈페이지 기본환경 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width:150px;">
|
||||
<col style="width:400px;">
|
||||
<col style="width:150px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_admin">최고관리자<strong class="sound_only">필수</strong></label></th>
|
||||
<td><?php echo get_member_id_select('cf_admin', 10, $config['cf_admin'], 'required') ?></td>
|
||||
<th scope="row">공개설정</th>
|
||||
<td>
|
||||
<input type="checkbox" name="cf_open" value="1" id="cf_open" <?php echo $config['cf_open']?'checked':''; ?>>
|
||||
<label for="cf_open">사이트공개</label>
|
||||
|
||||
<input type="checkbox" name="cf_1" value="1" id="cf_1" <?php echo $config['cf_1']?'checked':''; ?>>
|
||||
<label for="cf_1">계정생성 가능</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">홈페이지 제목</th>
|
||||
<td><input type="text" name="cf_title" value="<?php echo $config['cf_title'] ?>" id="cf_title" required class="required" size="40"></td>
|
||||
<th>사이트설명</th>
|
||||
<td>
|
||||
<input type="text" name="cf_site_descript" value="<?php echo $config['cf_site_descript'] ?>" size="50" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>접속설정</th>
|
||||
<td colspan="3">
|
||||
<?php echo help('로그인이 제대로 안된다거나 화면이 안나오다 나올때 설정하세요') ?>
|
||||
<input type="checkbox" name="cf_use_http" value="1" id="cf_use_http" <?php echo $config['cf_use_http']?'checked':''; ?>>
|
||||
<label for="cf_use_http">http://로 고정하기</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>파비콘</th>
|
||||
<td colspan="3">
|
||||
<?php echo help('파비콘 확장자는 ico 로 등록해 주셔야 적용됩니다.') ?>
|
||||
직접등록 <input type="file" name="cf_favicon_file" value="" size="50" style="border:1px solid #ddd;">
|
||||
|
||||
외부경로 <input type="text" name="cf_favicon" value="<?=$config['cf_favicon']?>" size="50"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>커서</th>
|
||||
<td colspan="3">
|
||||
<?php echo help('홈페이지의 커서로 사용할 이미지를 등록해주세요.') ?>
|
||||
직접등록 <input type="file" name="cf_cursor_file" value="" size="50">
|
||||
|
||||
외부경로 <input type="text" name="cf_cursor" value="<?=$config['cf_cursor']?>" size="50"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사이트이미지</th>
|
||||
<td colspan="3">
|
||||
<?php echo help('사이트 링크 추가시, SNS에서 미리보기로 뜨는 썸네일 이미지를 등록합니다. 290px * 160px 파일로 업로드해 주시길 바랍니다.') ?>
|
||||
직접등록 <input type="file" name="cf_site_img_file" value="" size="50">
|
||||
|
||||
외부경로 <input type="text" name="cf_site_img" value="<?=$config['cf_site_img']?>" size="50"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="site_back">배경음악</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('유튜브 재생목록 아이디 (https://www.youtube.com/watch?list=재생목록고유아이디) 를 입력해 주세요.') ?>
|
||||
<input type="text" name="cf_bgm" value="<?php echo $config['cf_bgm'] ?>" id="cf_bgm" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_possible_ip">접근가능 IP</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('입력된 IP의 컴퓨터만 접근할 수 있습니다.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
|
||||
<textarea name="cf_possible_ip" id="cf_possible_ip" rows="2" style="height:100px;"><?php echo $config['cf_possible_ip'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_intercept_ip">접근차단 IP</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('입력된 IP의 컴퓨터는 접근할 수 없음.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
|
||||
<textarea name="cf_intercept_ip" id="cf_intercept_ip" rows="2" style="height:100px;"><?php echo $config['cf_intercept_ip'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php echo $frm_submit; ?>
|
||||
|
||||
<section id="anc_002">
|
||||
<h2 class="h2_frm">게시판/회원 기본 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>각 게시판 관리에서 개별적으로 설정 가능합니다.</p>
|
||||
</div>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>게시판 기본 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width:150px;">
|
||||
<col style="width:400px;">
|
||||
<col style="width:150px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_delay_sec">글쓰기 간격<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="cf_delay_sec" value="<?php echo $config['cf_delay_sec'] ?>" id="cf_delay_sec" required class="required numeric frm_input" size="3"> 초 지난후 가능</td>
|
||||
<th scope="row"><label for="cf_link_target">새창 링크</label></th>
|
||||
<td>
|
||||
<?php echo help('글내용중 자동 링크되는 타켓을 지정합니다.') ?>
|
||||
<select name="cf_link_target" id="cf_link_target">
|
||||
<option value="_blank"<?php echo get_selected($config['cf_link_target'], '_blank') ?>>_blank</option>
|
||||
<option value="_self"<?php echo get_selected($config['cf_link_target'], '_self') ?>>_self</option>
|
||||
<option value="_top"<?php echo get_selected($config['cf_link_target'], '_top') ?>>_top</option>
|
||||
<option value="_new"<?php echo get_selected($config['cf_link_target'], '_new') ?>>_new</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_filter">단어 필터링</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('입력된 단어가 포함된 내용은 게시할 수 없습니다. 단어와 단어 사이는 ,로 구분합니다.') ?>
|
||||
<textarea name="cf_filter" id="cf_filter" rows="7"><?php echo $config['cf_filter'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_member_skin">회원 스킨<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo get_skin_select('member', 'cf_member_skin', 'cf_member_skin', $config['cf_member_skin'], 'required'); ?>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_register_level">회원가입시 권한</label></th>
|
||||
<td><?php echo get_member_level_select('cf_register_level', 1, 9, $config['cf_register_level']) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" id="th310"><label for="cf_leave_day">회원탈퇴후 삭제일</label></th>
|
||||
<td colspan="3"><input type="text" name="cf_leave_day" value="<?php echo $config['cf_leave_day'] ?>" id="cf_leave_day" class="frm_input" size="2"> 일 후 자동 삭제</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_prohibit_id">아이디,닉네임 금지단어</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('회원아이디, 닉네임으로 사용할 수 없는 단어를 정합니다. 쉼표 (,) 로 구분') ?>
|
||||
<textarea name="cf_prohibit_id" id="cf_prohibit_id" rows="3" style="height:100px;"><?php echo $config['cf_prohibit_id'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php echo $frm_submit; ?>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fconfigform_submit(f)
|
||||
{
|
||||
f.action = "./site_config_form_update.php";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<?
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
76
AvocadoEdition_Light/adm/site_config_form_update.php
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<?php
|
||||
$sub_menu = "100100";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$mb = get_member($cf_admin);
|
||||
if (!$mb['mb_id'])
|
||||
alert('최고관리자 회원아이디가 존재하지 않습니다.');
|
||||
check_admin_token();
|
||||
|
||||
$site_style_path = G5_DATA_PATH."/site";
|
||||
$site_style_url = G5_DATA_URL."/site";
|
||||
|
||||
@mkdir($site_style_path, G5_DIR_PERMISSION);
|
||||
@chmod($site_style_path, G5_DIR_PERMISSION);
|
||||
|
||||
// 이미지 등록 시, 이미지를 업로드한 뒤 - 해당 이미지 경로를 삽입
|
||||
if ($_FILES['cf_site_img_file']['name']) {
|
||||
// 확장자 따기
|
||||
$exp = explode(".", $_FILES['cf_site_img_file']['name']);
|
||||
$exp = $exp[count($exp)-1];
|
||||
|
||||
$image_name = "site_prevew_image.".$exp;
|
||||
upload_file($_FILES['cf_site_img_file']['tmp_name'], $image_name, $site_style_path);
|
||||
$_POST['cf_site_img'] = $site_style_url."/".$image_name;
|
||||
}
|
||||
if ($_FILES['cf_favicon_file']['name']) {
|
||||
// 확장자 따기
|
||||
$exp = explode(".", $_FILES['cf_favicon_file']['name']);
|
||||
$exp = $exp[count($exp)-1];
|
||||
|
||||
$image_name = "site_favicon.".$exp;
|
||||
upload_file($_FILES['cf_favicon_file']['tmp_name'], $image_name, $site_style_path);
|
||||
$_POST['cf_favicon'] = $site_style_url."/".$image_name;
|
||||
}
|
||||
if ($_FILES['cf_cursor_file']['name']) {
|
||||
// 확장자 따기
|
||||
$exp = explode(".", $_FILES['cf_cursor_file']['name']);
|
||||
$exp = $exp[count($exp)-1];
|
||||
|
||||
$image_name = "site_favicon.".$exp;
|
||||
upload_file($_FILES['cf_cursor_file']['tmp_name'], $image_name, $site_style_path);
|
||||
$_POST['cf_cursor'] = $site_style_url."/".$image_name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$sql = " update {$g5['config_table']}
|
||||
set cf_admin = '{$_POST['cf_admin']}',
|
||||
cf_use_http = '{$_POST['cf_use_http']}',
|
||||
cf_open = '{$_POST['cf_open']}',
|
||||
cf_title = '{$_POST['cf_title']}',
|
||||
cf_site_descript = '{$_POST['cf_site_descript']}',
|
||||
cf_favicon = '{$_POST['cf_favicon']}',
|
||||
cf_cursor = '{$_POST['cf_cursor']}',
|
||||
cf_bgm = '{$_POST['cf_bgm']}',
|
||||
cf_possible_ip = '".trim($_POST['cf_possible_ip'])."',
|
||||
cf_intercept_ip = '".trim($_POST['cf_intercept_ip'])."',
|
||||
|
||||
cf_delay_sec = '{$_POST['cf_delay_sec']}',
|
||||
cf_link_target = '{$_POST['cf_link_target']}',
|
||||
cf_filter = '{$_POST['cf_filter']}',
|
||||
cf_member_skin = '{$_POST['cf_member_skin']}',
|
||||
cf_register_level = '{$_POST['cf_register_level']}',
|
||||
cf_prohibit_id = '{$_POST['cf_prohibit_id']}',
|
||||
cf_1 = '{$_POST['cf_1']}'";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url('./site_config_form.php', false);
|
||||
?>
|
||||
71
AvocadoEdition_Light/adm/sql_write.sql
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
CREATE TABLE `__TABLE_NAME__` (
|
||||
`wr_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`wr_num` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_reply` varchar(10) NOT NULL,
|
||||
`wr_parent` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_is_comment` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`wr_comment` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_comment_reply` varchar(5) NOT NULL,
|
||||
`ca_name` varchar(255) NOT NULL,
|
||||
`wr_option` set('html1','html2','secret','mail') NOT NULL,
|
||||
`wr_subject` varchar(255) NOT NULL,
|
||||
`wr_content` text NOT NULL,
|
||||
`wr_link1` text NOT NULL,
|
||||
`wr_link2` text NOT NULL,
|
||||
`wr_link1_hit` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_link2_hit` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_hit` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_good` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_nogood` int(11) NOT NULL DEFAULT '0',
|
||||
`mb_id` varchar(20) NOT NULL,
|
||||
`wr_password` varchar(255) NOT NULL,
|
||||
`wr_name` varchar(255) NOT NULL,
|
||||
`wr_email` varchar(255) NOT NULL,
|
||||
`wr_homepage` varchar(255) NOT NULL,
|
||||
`wr_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`wr_file` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`wr_last` varchar(19) NOT NULL,
|
||||
`wr_ip` varchar(255) NOT NULL,
|
||||
`wr_facebook_user` varchar(255) NOT NULL,
|
||||
`wr_twitter_user` varchar(255) NOT NULL,
|
||||
|
||||
`wr_dice1` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_dice2` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_log` text NOT NULL,
|
||||
`wr_item` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_item_log` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_action` varchar(255) NOT NULL DEFAULT '',
|
||||
|
||||
`wr_secret` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_adult` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_wide` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_plip` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_noname` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_ing` int(11) NOT NULL DEFAULT '0',
|
||||
|
||||
`ch_id` int(11) NOT NULL DEFAULT '0',
|
||||
`ch_side` int(11) NOT NULL DEFAULT '0',
|
||||
`ch_class` int(11) NOT NULL DEFAULT '0',
|
||||
`ti_id` int(11) NOT NULL DEFAULT '0',
|
||||
`ma_id` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_width` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_height` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_url` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_type` varchar(255) NOT NULL DEFAULT '',
|
||||
|
||||
|
||||
|
||||
`wr_1` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_2` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_3` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_4` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_5` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_6` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_7` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_8` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_9` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_10` varchar(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`wr_id`),
|
||||
KEY `wr_num_reply_parent` (`wr_num`,`wr_reply`,`wr_parent`),
|
||||
KEY `wr_is_comment` (`wr_is_comment`,`wr_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
68
AvocadoEdition_Light/adm/thumbnail_file_delete.php
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
$sub_menu = '100920';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||
|
||||
$g5['title'] = '썸네일 일괄삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$directory = array();
|
||||
$dl = array('file', 'editor');
|
||||
|
||||
foreach($dl as $val) {
|
||||
if($handle = opendir(G5_DATA_PATH.'/'.$val)) {
|
||||
while(false !== ($entry = readdir($handle))) {
|
||||
if($entry == '.' || $entry == '..')
|
||||
continue;
|
||||
|
||||
$path = G5_DATA_PATH.'/'.$val.'/'.$entry;
|
||||
|
||||
if(is_dir($path))
|
||||
$directory[] = $path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flush();
|
||||
|
||||
if (empty($directory)) {
|
||||
echo '<p>썸네일디렉토리를 열지못했습니다.</p>';
|
||||
}
|
||||
|
||||
$cnt=0;
|
||||
echo '<ul>'.PHP_EOL;
|
||||
|
||||
foreach($directory as $dir) {
|
||||
$files = glob($dir.'/thumb-*');
|
||||
if (is_array($files)) {
|
||||
foreach($files as $thumbnail) {
|
||||
$cnt++;
|
||||
@unlink($thumbnail);
|
||||
|
||||
echo '<li>'.$thumbnail.'</li>'.PHP_EOL;
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||
echo '<div class="local_desc01 local_desc"><p><strong>썸네일 '.$cnt.'건의 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
64
AvocadoEdition_Light/adm/viewer_form.php
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
$sub_menu = "100250";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$g5['title'] = '메인 편집';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
// -- 내용관리의 기능을 통해 메뉴와 메인 내용을 가져온다.
|
||||
// -- 메인 정보 가져오기
|
||||
$sql = " select * from {$g5['content_table']} where co_id = 'site_main' ";
|
||||
$main_co = sql_fetch($sql);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="fviewerform" id="fviewerform" method="post" onsubmit="return fviewerform_submit(this);" enctype="multipart/form-data">
|
||||
<input type="hidden" name="token" value="" id="token">
|
||||
<div class="btn_confirm">
|
||||
<div class="btn">
|
||||
<span class="material-icons">save</span>
|
||||
<input type="submit" value="저장" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo help('메인영역에 들어갈 내용을 자유롭게 작성해 주시길 바랍니다.') ?>
|
||||
<?php echo editor_html('main_content', get_text($main_co['co_content'], 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fviewerform_submit(f)
|
||||
{
|
||||
f.action = "./viewer_form_update.php";
|
||||
|
||||
<?php echo get_editor_js('main_content'); ?>
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
|
||||
29
AvocadoEdition_Light/adm/viewer_form_update.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
$sub_menu = "100250";
|
||||
include_once('./_common.php');
|
||||
|
||||
$sql_common = " co_html = '1',
|
||||
co_tag_filter_use = '0' ";
|
||||
|
||||
// -- 메인 정보 가져오기
|
||||
$sql = " select co_id from {$g5['content_table']} where co_id = 'site_main' ";
|
||||
$main_co = sql_fetch($sql);
|
||||
if(!$main_co['co_id']) {
|
||||
// Insert
|
||||
$sql = " insert {$g5['content_table']}
|
||||
set co_id = 'site_main',
|
||||
co_content = '{$main_content}',
|
||||
{$sql_common} ";
|
||||
sql_query($sql);
|
||||
} else {
|
||||
// Update
|
||||
$sql = " update {$g5['content_table']}
|
||||
set co_content = '{$main_content}',
|
||||
{$sql_common}
|
||||
where co_id = 'site_main' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
goto_url('./viewer_form.php', false);
|
||||
?>
|
||||
57
AvocadoEdition_Light/adm/visit.sub.php
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
include_once(G5_LIB_PATH.'/visit.lib.php');
|
||||
include_once('./admin.head.php');
|
||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||
|
||||
if (empty($fr_date) || ! preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $fr_date) ) $fr_date = G5_TIME_YMD;
|
||||
if (empty($to_date) || ! preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $to_date) ) $to_date = G5_TIME_YMD;
|
||||
|
||||
$file_data = basename($_SERVER['PHP_SELF']);
|
||||
|
||||
$qstr = "fr_date=".$fr_date."&to_date=".$to_date;
|
||||
$query_string = $qstr ? '?'.$qstr : '';
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<div class="sch_last">
|
||||
<strong>기간별검색</strong>
|
||||
<input type="text" name="fr_date" value="<?php echo $fr_date ?>" id="fr_date" class="frm_input" size="11" maxlength="10">
|
||||
<label for="fr_date" class="sound_only">시작일</label>
|
||||
~
|
||||
<input type="text" name="to_date" value="<?php echo $to_date ?>" id="to_date" class="frm_input" size="11" maxlength="10">
|
||||
<label for="to_date" class="sound_only">종료일</label>
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<ul class="anchor">
|
||||
<li <?=$file_data == 'visit_list.php' ? "class='on'": ""?>><a href="./visit_list.php<?php echo $query_string ?>">접속자</a></li>
|
||||
<li <?=$file_data == 'visit_domain.php' ? "class='on'": ""?>><a href="./visit_domain.php<?php echo $query_string ?>">도메인</a></li>
|
||||
<li <?=$file_data == 'visit_browser.php' ? "class='on'": ""?>><a href="./visit_browser.php<?php echo $query_string ?>">브라우저</a></li>
|
||||
<li <?=$file_data == 'visit_os.php' ? "class='on'": ""?>><a href="./visit_os.php<?php echo $query_string ?>">운영체제</a></li>
|
||||
<?php if(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE) { ?>
|
||||
<li <?=$file_data == 'visit_device.php' ? "class='on'": ""?>><a href="./visit_device.php<?php echo $query_string ?>">접속기기</a></li>
|
||||
<?php } ?>
|
||||
<li <?=$file_data == 'visit_hour.php' ? "class='on'": ""?>><a href="./visit_hour.php<?php echo $query_string ?>">시간</a></li>
|
||||
<li <?=$file_data == 'visit_week.php' ? "class='on'": ""?>><a href="./visit_week.php<?php echo $query_string ?>">요일</a></li>
|
||||
<li <?=$file_data == 'visit_date.php' ? "class='on'": ""?>><a href="./visit_date.php<?php echo $query_string ?>">일</a></li>
|
||||
<li <?=$file_data == 'visit_month.php' ? "class='on'": ""?>><a href="./visit_month.php<?php echo $query_string ?>">월</a></li>
|
||||
<li <?=$file_data == 'visit_year.php' ? "class='on'": ""?>><a href="./visit_year.php<?php echo $query_string ?>">년</a></li>
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
|
||||
});
|
||||
|
||||
function fvisit_submit(act)
|
||||
{
|
||||
var f = document.fvisit;
|
||||
f.action = act;
|
||||
f.submit();
|
||||
}
|
||||
</script>
|
||||
97
AvocadoEdition_Light/adm/visit_browser.php
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '브라우저별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 5;
|
||||
|
||||
$max = 0;
|
||||
$sum_count = 0;
|
||||
$sql = " select * from {$g5['visit_table']}
|
||||
where vi_date between '{$fr_date}' and '{$to_date}' ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
$s = $row['vi_browser'];
|
||||
if(!$s)
|
||||
$s = get_brow($row['vi_agent']);
|
||||
|
||||
$arr[$s]++;
|
||||
|
||||
if ($arr[$s] > $max) $max = $arr[$s];
|
||||
|
||||
$sum_count++;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">순위</th>
|
||||
<th scope="col">브라우저</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3">합계</td>
|
||||
<td><strong><?php echo $sum_count ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
$k = 0;
|
||||
$save_count = -1;
|
||||
$tot_count = 0;
|
||||
if (count($arr)) {
|
||||
arsort($arr);
|
||||
foreach ($arr as $key=>$value) {
|
||||
$count = $arr[$key];
|
||||
if ($save_count != $count) {
|
||||
$i++;
|
||||
$no = $i;
|
||||
$save_count = $count;
|
||||
} else {
|
||||
$no = "";
|
||||
}
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_num"><?php echo $no ?></td>
|
||||
<td class="td_category td_category1"><?php echo $key ?></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_numbig"><?php echo $count ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
86
AvocadoEdition_Light/adm/visit_date.php
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '일별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 4;
|
||||
|
||||
$max = 0;
|
||||
$sum_count = 0;
|
||||
$sql = " select vs_date, vs_count as cnt
|
||||
from {$g5['visit_sum_table']}
|
||||
where vs_date between '{$fr_date}' and '{$to_date}'
|
||||
order by vs_date desc ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$arr[$row['vs_date']] = $row['cnt'];
|
||||
|
||||
if ($row['cnt'] > $max) $max = $row['cnt'];
|
||||
|
||||
$sum_count += $row['cnt'];
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">년-월-일</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">합계</td>
|
||||
<td><strong><?php echo number_format($sum_count) ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
$k = 0;
|
||||
$save_count = -1;
|
||||
$tot_count = 0;
|
||||
if (count($arr)) {
|
||||
foreach ($arr as $key=>$value) {
|
||||
$count = $value;
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_category"><a href="./visit_list.php?fr_date=<?php echo $key ?>&to_date=<?php echo $key ?>"><?php echo $key ?></a></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_numbig"><?php echo number_format($value) ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
124
AvocadoEdition_Light/adm/visit_delete.php
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
<?php
|
||||
$sub_menu = "200820";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '접속자로그삭제';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
// 최소년도 구함
|
||||
$sql = " select min(vi_date) as min_date from {$g5['visit_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$min_year = (int)substr($row['min_date'], 0, 4);
|
||||
$now_year = (int)substr(G5_TIME_YMD, 0, 4);
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
접속자 로그를 삭제할 년도와 방법을 선택해주십시오.
|
||||
</div>
|
||||
|
||||
<form name="fvisitdelete" class="local_sch02 local_sch" method="post" action="./visit_delete_update.php" onsubmit="return form_submit(this);">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption></caption>
|
||||
<colgroup>
|
||||
<col style="width: 130px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">일자선택</th>
|
||||
<td>
|
||||
<select name="year" id="year">
|
||||
<option value="">년도선택</option>
|
||||
<?php
|
||||
for($year=$min_year; $year<=$now_year; $year++) {
|
||||
?>
|
||||
<option value="<?php echo $year; ?>"><?php echo $year; ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select> 년
|
||||
|
||||
<select name="month" id="month">
|
||||
<option value="">월선택</option>
|
||||
<?php
|
||||
for($i=1; $i<=12; $i++) {
|
||||
?>
|
||||
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select> 월
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">삭제방법선택</th>
|
||||
<td>
|
||||
<select name="method" id="method">
|
||||
<option value="before">선택년월 이전 자료삭제</option>
|
||||
<option value="specific">선택년월의 자료삭제</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">관리자 비밀번호</th>
|
||||
<td>
|
||||
<input type="password" name="pass" id="pass" class="frm_input required">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<div class="btn">
|
||||
<span class="material-icons">save</span>
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function form_submit(f)
|
||||
{
|
||||
var year = $("#year").val();
|
||||
var month = $("#month").val();
|
||||
var method = $("#method").val();
|
||||
var pass = $("#pass").val();
|
||||
|
||||
if(!year) {
|
||||
alert("년도를 선택해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!month) {
|
||||
alert("월을 선택해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!pass) {
|
||||
alert("관리자 비밀번호를 입력해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var msg = year+"년 "+month+"월";
|
||||
if(method == "before")
|
||||
msg += " 이전";
|
||||
else
|
||||
msg += "의";
|
||||
msg += " 자료를 삭제하시겠습니까?";
|
||||
|
||||
return confirm(msg);
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
60
AvocadoEdition_Light/adm/visit_delete_update.php
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
$sub_menu = "200820";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$year = preg_replace('/[^0-9]/', '', $_POST['year']);
|
||||
$month = preg_replace('/[^0-9]/', '', $_POST['month']);
|
||||
$method = $_POST['method'];
|
||||
$pass = trim($_POST['pass']);
|
||||
|
||||
if(!$pass)
|
||||
alert('관리자 비밀번호를 입력해 주십시오.');
|
||||
|
||||
// 관리자 비밀번호 비교
|
||||
$admin = get_admin('super');
|
||||
if(!check_password($pass, $admin['mb_password']))
|
||||
alert('관리자 비밀번호가 일치하지 않습니다.');
|
||||
|
||||
if(!$year)
|
||||
alert('년도를 선택해 주십시오.');
|
||||
|
||||
if(!$month)
|
||||
alert('월을 선택해 주십시오.');
|
||||
|
||||
// 로그삭제 query
|
||||
$del_date = $year.'-'.str_pad($month, 2, '0', STR_PAD_LEFT);
|
||||
switch($method) {
|
||||
case 'before':
|
||||
$sql_common = " where substring(vi_date, 1, 7) < '{$del_date}' ";
|
||||
break;
|
||||
case 'specific':
|
||||
$sql_common = " where substring(vi_date, 1, 7) = '{$del_date}' ";
|
||||
break;
|
||||
default:
|
||||
alert('올바른 방법으로 이용해 주십시오.');
|
||||
break;
|
||||
}
|
||||
|
||||
// 총 로그수
|
||||
$sql = " select count(*) as cnt from {$g5['visit_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
// 로그삭제
|
||||
$sql = " delete from {$g5['visit_table']} {$sql_common} ";
|
||||
sql_query($sql);
|
||||
|
||||
// 삭제 후 총 로그수
|
||||
$sql = " select count(*) as cnt from {$g5['visit_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count2 = $row['cnt'];
|
||||
|
||||
alert('총 '.number_format($total_count).'건 중 '.number_format($total_count - $total_count2).'건 삭제 완료', './visit_delete.php');
|
||||
?>
|
||||
101
AvocadoEdition_Light/adm/visit_device.php
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '기기별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 5;
|
||||
|
||||
$max = 0;
|
||||
$sum_count = 0;
|
||||
$sql = " select * from {$g5['visit_table']}
|
||||
where vi_date between '{$fr_date}' and '{$to_date}' ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
$s = $row['vi_device'];
|
||||
if(!$s)
|
||||
$s = '기타';
|
||||
|
||||
$arr[$s]++;
|
||||
|
||||
if ($arr[$s] > $max) $max = $arr[$s];
|
||||
|
||||
$sum_count++;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">순위</th>
|
||||
<th scope="col">접속기기</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3">합계</td>
|
||||
<td><strong><?php echo $sum_count ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
$k = 0;
|
||||
$save_count = -1;
|
||||
$tot_count = 0;
|
||||
if (count($arr)) {
|
||||
arsort($arr);
|
||||
foreach ($arr as $key=>$value) {
|
||||
$count = $arr[$key];
|
||||
if ($save_count != $count) {
|
||||
$i++;
|
||||
$no = $i;
|
||||
$save_count = $count;
|
||||
} else {
|
||||
$no = '';
|
||||
}
|
||||
|
||||
if (!$key) {
|
||||
$key = '기타';
|
||||
}
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_num"><?php echo $no ?></td>
|
||||
<td class="td_category td_category1"><?php echo $key ?></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_numbig"><?php echo $count ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||