최초 배포

Ver.02.2.2
This commit is contained in:
TATECK 2022-02-09 03:05:24 +09:00
parent e1b294c9f8
commit 9c60c33cd6
1537 changed files with 228688 additions and 0 deletions

View file

@ -0,0 +1,3 @@
<?php
include_once('./common.php');
?>

5
AvocadoEdition/_head.php Normal file
View file

@ -0,0 +1,5 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_PATH.'/head.php');
?>

5
AvocadoEdition/_tail.php Normal file
View file

@ -0,0 +1,5 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_PATH.'/tail.php');
?>

View file

@ -0,0 +1,5 @@
<?php
define('G5_IS_ADMIN', true);
include_once ('../common.php');
include_once(G5_ADMIN_PATH.'/admin.lib.php');
?>

View file

@ -0,0 +1,29 @@
<?
$sub_menu = "200200";
include_once("./_common.php");
check_demo();
auth_check($auth[$sub_menu], "d");
$mb = get_member($_REQUEST['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_token();
// 회원자료 삭제
member_delete($mb['mb_id']);
if ($url)
goto_url("{$url}?{$qstr}&amp;w=u&amp;mb_id=$mb_id");
else
goto_url("./action_list.php?{$qstr}");
?>

View file

@ -0,0 +1,202 @@
<?php
$sub_menu = "200200";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$check_member = sql_fetch("select * from {$g5['member_table']} limit 0, 1");
if(!isset($check_member['mb_error_cnt'])) {
sql_query(" ALTER TABLE `{$g5['member_table']}`
ADD `mb_error_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_10` ", true);
}
if(!isset($check_member['mb_error_content'])) {
sql_query(" ALTER TABLE `{$g5['member_table']}`
ADD `mb_error_content` varchar(255) NOT NULL DEFAULT '' AFTER `mb_error_cnt` ", true);
}
$now_board = "";
$search_board_sql = " select bo.bo_table, bo.bo_subject, gr.gr_id, gr.gr_subject from {$g5['board_table']} bo, {$g5['group_table']} gr where bo.gr_id = gr.gr_id order by gr.gr_id asc, bo.bo_subject asc ";
$search_board = sql_query($search_board_sql);
$board_select_option = "";
for($i=0; $row=sql_fetch_array($search_board); $i++) {
if(!$s_board) {
$s_board = $row['bo_table'];
}
if($row['bo_table'] == $s_board) {
$s_board_select = "selected";
$now_board = $row['bo_subject'];
} else {
$s_board_select = "";
}
$board_select_option .= '<option value="'.$row['bo_table'].'" '.$s_board_select.'>['.$row['gr_subject'].'] '.$row['bo_subject'].'</option>';
}
$write_table = $g5['write_prefix'] . $s_board;
$qstr .= "&s_board=".$s_board."&s_date=".$s_date."&e_date=".$e_date;
if(!$s_date) $s_date = date('Y-m-d', strtotime("last Monday"));
if(!$e_date) $e_date = date('Y-m-d', strtotime("next Sunday"));
// 일단 짜는 것 부터 시작하자.
// 회원 정렬 부터 시작한다./
$sql_common = " from {$g5['member_table']} mb LEFT JOIN (select *, count(if(wr_id = wr_parent, wr_id, null)) as wr_log, count(if(wr_id != wr_parent, wr_id, null)) as wr_cm from {$g5['board_new_table']} where bo_table = '{$s_board}' and bn_datetime >= '$s_date' and bn_datetime <= '$e_date' group by mb_id ) bo ON mb.mb_id = bo.mb_id ";
$sql_search = " where mb.mb_level > 1 and mb.mb_leave_date = '' and mb.mb_id != '{$config['cf_admin']}' and mb.ch_id != '' and mb.mb_level > 1 ";
if (!$sst) {
$sst = "mb.mb_datetime";
$sod = "asc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt {$sql_common} {$sql_search}";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$page_rows = 20;
$total_page = ceil($total_count / $page_rows); // 전체 페이지 계산
$from_record = ($page - 1) * $page_rows; // 시작 열을 구함
$g5['title'] = '활동량 관리';
include_once('./admin.head.php');
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
$sql = " select mb.mb_id, mb.mb_name, mb.ch_id, mb.mb_today_login, mb.mb_error_content, bo.wr_log, bo.wr_cm, mb.mb_error_cnt {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, $page_rows";
$result = sql_query($sql);
$colspan = 10;
?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
회원 <?php echo number_format($total_count) ?>
</div>
<form id="fsearch" name="fsearch" class="local_sch01 local_sch" method="get">
<div class="sch_last" style="float: left; margin-right: 10px;">
<strong>게시판 지정&nbsp;</strong>
<select name="s_board">
<?=$board_select_option?>
</select>
&nbsp;&nbsp;&nbsp;
<strong>기간별검색&nbsp;</strong>
<input type="text" name="s_date" value="<?=$s_date?>" />
~
<input type="text" name="e_date" value="<?=$e_date?>" />
</div>
<input type="submit" class="btn_submit" value="검색">
</form>
<br />
<form name="fmemberlist" id="fmemberlist" action="./action_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 ?>">
<div class="tbl_head01 tbl_wrap">
<table class="tbl_hover">
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 120px;" />
<col style="width: 60px;" />
<col style="width: 60px;" />
<col style="width: 150px;" />
<col style="width: 80px;" />
<col />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr>
<th scope="col" rowspan="2" id="mb_list_id"><?php echo subject_sort_link('mb.mb_id', 's_board='.$s_board.'&s_date='.$s_date.'&e_date='.$e_date) ?>아이디</a></th>
<th scope="col" rowspan="2" id="mb_list_name"><?php echo subject_sort_link('mb.mb_nick', 's_board='.$s_board.'&s_date='.$s_date.'&e_date='.$e_date) ?>닉네임</a></th>
<th scope="col" rowspan="2">대표캐릭터</th>
<th><?php echo subject_sort_link('wr_log', 's_board='.$s_board.'&s_date='.$s_date.'&e_date='.$e_date) ?>로그</a></th>
<th><?php echo subject_sort_link('wr_cm', 's_board='.$s_board.'&s_date='.$s_date.'&e_date='.$e_date) ?>덧글</a></th>
<th scope="col" rowspan="2"><?php echo subject_sort_link('mb.mb_today_login', 's_board='.$s_board.'&s_date='.$s_date.'&e_date='.$e_date) ?>최종 접속</a></th>
<th scope="col" rowspan="2"><?php echo subject_sort_link('mb.mb_error_cnt', 's_board='.$s_board.'&s_date='.$s_date.'&e_date='.$e_date) ?>누적경고</a></th>
<th rowspan="2">경고내용</th>
<th scope="col" rowspan="2">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) { ?>
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
<input type="hidden" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
<tr class="<?php echo $bg; ?>">
<td><?=$row['mb_id']?></td>
<td><?=$row['mb_name']?></td>
<td><a href="./character_form.php?w=u&amp;ch_id=<?=$row['ch_id']?>" target="_blank"><?=get_character_name($row['ch_id'])?></a></td>
<td style="text-align: center;"><?=number_format($row['wr_log'])?></td>
<td style="text-align: center;"><?=number_format($row['wr_cm'])?></td>
<td style="text-align: center; color: #999;"><?=$row['mb_today_login']?></td>
<td style="text-align: center;">
<input type="text" name="mb_error_cnt[<?php echo $i ?>]" value="<?php echo $row['mb_error_cnt'] ?>" size="3">
</td>
<td>
<input type="text" name="mb_error_content[<?php echo $i ?>]" value="<?php echo $row['mb_error_content'] ?>" style="width: 98%;">
</td>
<td style="text-align: center;">
</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="act_button" value="일괄수정" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?'.$qstr.'&amp;page='); ?>
<script>
function fmemberlist_submit(f)
{
return true;
}
$(function(){
$('iframe').load(function(){
var iframeContentWindow = this.contentWindow;
var height = iframeContentWindow.document.body.scrollHeight;
this.style.height = height + 'px';
});
$("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
});
</script>
<?php
include_once ('./admin.tail.php');
?>

View file

@ -0,0 +1,30 @@
<?php
$sub_menu = "200200";
include_once('./_common.php');
check_demo();
auth_check($auth[$sub_menu], 'w');
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 {
$sql = " update {$g5['member_table']}
set mb_error_cnt = '{$_POST['mb_error_cnt'][$k]}',
mb_error_content = '{$_POST['mb_error_content'][$k]}'
where mb_id = '{$_POST['mb_id'][$k]}' ";
sql_query($sql);
}
}
if ($msg)
alert($msg);
goto_url('./action_list.php?'.$qstr);
?>

View file

@ -0,0 +1,58 @@
<?php
$sub_menu = "200200";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
if(!$s_year) $s_year = date('Y');
if(!$s_month) $s_month = date('m');
$fr_date = $s_year."-".$s_month."-"."01";
$to_date = $s_year."-".$s_month."-"."32";
?>
<style>
html, body { padding: 0; margin: 0; }
p { margin: 0; padding: 0 10px; }
p > a { display: block; position: relative; color: #fff; font-size: 12px; text-decoration: none; border-top: 1px dashed #666; padding: 4px 3px; }
p:first-child > a { border-top: none; }
p > a:hover { color: yellow; }
</style>
<?
$reply_count = array();
$reply_index = 0;
$log = sql_query("select mu_id from g5_mmb_upload where mu_datetime > '{$fr_date}' and mu_datetime < '{$to_date}' and (mu_id > '5599' or mu_id < '5370') and (mu_id > '6576' or mu_id < '6369') and mb_id = '{$mb_id}'");
for ($j=0; $row=sql_fetch_array($log); $j++) {
$log2 = sql_query ("select mu_id from g5_mmb_upload where mu_id < '{$row['mu_id']}' order by mu_id desc limit 0, 3");
for ($k=0; $row2=sql_fetch_array($log2); $k++) {
$comment_log = sql_fetch("select mu_id, count(*) as cnt from g5_mmb_comment where mu_id = '{$row2['mu_id']}' and mb_id = '{$mb_id}'");
if($comment_log['cnt'] == '0') {
if($reply_count[$reply_index]['mc_no_count'] == "") $reply_count[$reply_index]['mc_no_count'] = 0;
if($reply_count[$reply_index]['mu_id'] != $row['mu_id']) {
$reply_index++;
$reply_count[$reply_index]['mu_id'] = $row['mu_id'];
}
$reply_count[$reply_index]['mc_no_count']++;
}
}
}
?>
<? for($i=0; $i < count($reply_count); $i++) {
if($reply_count[$i]['mu_id']) {
?>
<p>
<a href="/mmb/index.php?mu_id=<?=$reply_count[$i]['mu_id']?>" target="_blank">
<?=$reply_count[$i]['mu_id']?>번 로그 (<?=3 - $reply_count[$i]['mc_no_count']?>/3)
</a>
</p>
<? }
} ?>
<?php
include_once ('../tail.sub.php');
?>

View file

@ -0,0 +1,3 @@
$(function() {
});

View 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&amp;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">
<?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>
<a href="<?=G5_URL?>" class="ico-home" target="_blank">
커뮤니티
</a>
<a href="http://bytheallspark.cafe24.com/" class="ico-dev" target="_blank">
아보카도 솔루션
</a>
</aside>
<div id="container">

129
AvocadoEdition/adm/admin.js Normal file
View file

@ -0,0 +1,129 @@
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;
});
});

View file

@ -0,0 +1,475 @@
<?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[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]}&nbsp;&nbsp;</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("&amp;", $arr_query);
// 관리자에서는 추가 스크립트는 사용하지 않는다.
//$config['cf_add_script'] = '';
?>

View file

@ -0,0 +1,22 @@
<?php
$menu['menu100'] = array (
array('100000', '환경설정', G5_ADMIN_URL.'/config_form.php', 'config'),
array('100100', '기본환경설정', G5_ADMIN_URL.'/config_form.php', 'cf_basic'),
array('100200', '커뮤니티 설정', G5_ADMIN_URL.'/community_form.php', 'cf_comm_basic'),
array('100250', '화면 설정', G5_ADMIN_URL.'/viewer_form.php', 'cf_view_basic'),
array('100280', '테마설정', G5_ADMIN_URL.'/theme.php', 'cf_theme', 1),
array('100300', '디자인 설정', G5_ADMIN_URL.'/design_form.php', 'cf_design_basic'),
array('100310', '팝업레이어관리', G5_ADMIN_URL.'/newwinlist.php', 'scf_poplayer'),
array('100320', '메인슬라이드 관리', G5_ADMIN_URL.'/banner_list.php', 'cf_banner'),
array('100330', '인트로 관리', G5_ADMIN_URL.'/intro_list.php', 'cf_banner'),
array('100990', 'DB관리', G5_DB_URL, '')
);
/*
if(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE) {
$menu['menu100'][] = array('100510', 'Browscap 업데이트', G5_ADMIN_URL.'/browscap.php', 'cf_browscap');
$menu['menu100'][] = array('100520', '접속로그 변환', G5_ADMIN_URL.'/browscap_convert.php', 'cf_visit_cnvrt');
}
$menu['menu100'][] = array('100400', '부가서비스', G5_ADMIN_URL.'/service.php', 'cf_service');
*/
?>

View file

@ -0,0 +1,12 @@
<?php
$menu['menu200'] = array (
array('200000', '회원관리', G5_ADMIN_URL.'/member_list.php', ''),
array('200100', '회원관리', G5_ADMIN_URL.'/member_list.php', ''),
array('200200', '활동량관리', G5_ADMIN_URL.'/action_list.php', ''),
array('200800', '접속자집계', G5_ADMIN_URL.'/visit_list.php', ''),
array('200810', '접속자검색', G5_ADMIN_URL.'/visit_search.php', ''),
array('200820', '접속자로그삭제', G5_ADMIN_URL.'/visit_delete.php', ''),
array('200900', '투표관리', G5_ADMIN_URL.'/poll_list.php', '')
);
?>

View file

@ -0,0 +1,9 @@
<?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),
array('300700', '이모티콘관리', G5_ADMIN_URL.'/emoticon_list.php', 'mmb_emoticon', 1)
);
?>

View file

@ -0,0 +1,21 @@
<?php
$menu['menu400'] = array (
array('400000', '캐릭터관리', ''.G5_ADMIN_URL.'/character_list.php', ''),
array('400100', '프로필 양식 관리', ''.G5_ADMIN_URL.'/character_article_list.php', ''),
array('400200', '캐릭터 관리', ''.G5_ADMIN_URL.'/character_list.php', ''),
array('400300', '타이틀 관리', ''.G5_ADMIN_URL.'/title_list.php', ''),
array('400310', '보유타이틀 관리', ''.G5_ADMIN_URL.'/title_has_list.php', ''),
array('400400', $config['cf_rank_name'].' 설정 관리', ''.G5_ADMIN_URL.'/level_list.php', ''),
array('400410', $config['cf_exp_name'].' 관리', ''.G5_ADMIN_URL.'/exp_list.php', ''),
array('400420', '스탯 관리', ''.G5_ADMIN_URL.'/status_list.php', ''),
array('400500', '커플 관리', ''.G5_ADMIN_URL.'/couple_list.php', '')
);
if($config['cf_side_title']) {
$menu['menu400'][] = array('400600', $config['cf_side_title'].' 관리', G5_ADMIN_URL.'/side_list.php', '');
}
if($config['cf_class_title']) {
$menu['menu400'][] = array('400700', $config['cf_class_title'].' 관리', G5_ADMIN_URL.'/class_list.php', '');
}
?>

View file

@ -0,0 +1,14 @@
<?php
$menu['menu500'] = array (
array('500000', '아이템 관리', ''.G5_ADMIN_URL.'/shop_list.php', ''),
array('500100', '상점관리', ''.G5_ADMIN_URL.'/shop_list.php', ''),
array('500200', '아이템관리', ''.G5_ADMIN_URL.'/item_list.php', ''),
array('500210', '뽑기 관리', ''.G5_ADMIN_URL.'/explorer_list.php', ''),
array('500220', '레시피 관리', G5_ADMIN_URL.'/recipi_list.php', ''),
array('500300', '아이템 보유현황', ''.G5_ADMIN_URL.'/inventory_list.php', ''),
array('500400', '아이템 구매기록', ''.G5_ADMIN_URL.'/order_list.php', ''),
array('500900', $config['cf_money'].' 관리', ''.G5_ADMIN_URL.'/point_list.php', ''),
);
?>

View file

@ -0,0 +1,10 @@
<?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.'/thumbnail_file_delete.php', 'cf_thumbnail', 1),
/*array('900400', '데이터 백업지점 설정',G5_ADMIN_URL.'/data_backup.php', '', 1),
array('900500', '데이터 복원하기',G5_ADMIN_URL.'/data_restore.php', '', 1)*/
);
?>

View 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');
?>

View 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'=>'')));
?>

View file

@ -0,0 +1,5 @@
<?php
define('G5_IS_ADMIN', true);
include_once ('../../common.php');
include_once(G5_ADMIN_PATH.'/admin.lib.php');
?>

View file

@ -0,0 +1,252 @@
<?php
$sub_menu = "100200";
include_once('./_common.php');
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.');
$sql_common = " from {$g5['auth_table']} a left join {$g5['member_table']} b on (a.mb_id=b.mb_id) ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default :
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "a.mb_id, au_menu";
$sod = "";
}
$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 = 5;
?>
<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">
<input type="hidden" name="sfl" value="a.mb_id" id="sfl">
<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="검색" id="fsearch_submit" class="btn_submit">
</form>
<form name="fauthlist" id="fauthlist" method="post" action="./auth_list_delete.php" onsubmit="return fauthlist_submit(this);">
<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 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('a.mb_id') ?>회원아이디</a></th>
<th scope="col"><?php echo subject_sort_link('mb_nick') ?>닉네임</a></th>
<th scope="col">메뉴</th>
<th scope="col">권한</th>
</tr>
</thead>
<tbody>
<?php
$count = 0;
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$is_continue = false;
// 회원아이디가 없는 메뉴는 삭제함
if($row['mb_id'] == '' && $row['mb_nick'] == '') {
sql_query(" delete from {$g5['auth_table']} where au_menu = '{$row['au_menu']}' ");
$is_continue = true;
}
// 메뉴번호가 바뀌는 경우에 현재 없는 저장된 메뉴는 삭제함
if (!isset($auth_menu[$row['au_menu']]))
{
sql_query(" delete from {$g5['auth_table']} where au_menu = '{$row['au_menu']}' ");
$is_continue = true;
}
if($is_continue)
continue;
$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">
<input type="hidden" name="au_menu[<?php echo $i ?>]" value="<?php echo $row['au_menu'] ?>">
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?>님 권한</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td class="td_mbid"><a href="?sfl=a.mb_id&amp;stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
<td class="td_auth_mbnick"><?php echo $mb_nick ?></td>
<td class="td_menu">
<?php echo $row['au_menu'] ?>
<?php echo $auth_menu[$row['au_menu']] ?>
</td>
<td class="td_auth"><?php echo $row['au_auth'] ?></td>
</tr>
<?php
$count++;
}
if ($count == 0)
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_list01 btn_list">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
<?php
//if (isset($stx))
// echo '<script>document.fsearch.sfl.value = "'.$sfl.'";</script>'."\n";
if (strstr($sfl, 'mb_id'))
$mb_id = $stx;
else
$mb_id = '';
?>
</form>
<?php
$pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'].'?'.$qstr.'&amp;page=');
echo $pagelist;
?>
<form name="fauthlist2" id="fauthlist2" action="./auth_update.php" method="post" autocomplete="off">
<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="">
<section id="add_admin">
<h2 class="h2_frm">관리권한 추가</h2>
<div class="local_desc01 local_desc">
<p>
다음 양식에서 회원에게 관리권한을 부여하실 있습니다.<br>
권한 <strong>r</strong> 읽기권한, <strong>w</strong> 쓰기권한, <strong>d</strong> 삭제권한입니다.
</p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="mb_id">회원아이디<strong class="sound_only">필수</strong></label></th>
<td>
<strong id="msg_mb_id" class="msg_sound_only"></strong>
<input type="text" name="mb_id" value="<?php echo $mb_id ?>" id="mb_id" required class="required frm_input">
</td>
</tr>
<tr>
<th scope="row"><label for="au_menu">접근가능메뉴<strong class="sound_only">필수</strong></label></th>
<td>
<select id="au_menu" name="au_menu" required class="required">
<option value=''>선택하세요</option>
<?php
foreach($auth_menu as $key=>$value)
{
if (!(substr($key, -3) == '000' || $key == '-' || !$key))
echo '<option value="'.$key.'">'.$key.' '.$value.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<th scope="row">권한지정</th>
<td>
<input type="checkbox" name="r" value="r" id="r" checked>
<label for="r">r (읽기)</label>
<input type="checkbox" name="w" value="w" id="w">
<label for="w">w (쓰기)</label>
<input type="checkbox" name="d" value="d" id="d">
<label for="d">d (삭제)</label>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="추가" class="btn_submit">
</div>
</section>
</form>
<script>
function fauthlist_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');
?>

View file

@ -0,0 +1,27 @@
<?php
$sub_menu = "100200";
include_once('./_common.php');
check_demo();
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.');
check_admin_token();
$count = count($_POST['chk']);
if (!$count)
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = $chk[$i];
$sql = " delete from {$g5['auth_table']} where mb_id = '{$_POST['mb_id'][$k]}' and au_menu = '{$_POST['au_menu'][$k]}' ";
sql_query($sql);
}
goto_url('./auth_list.php?'.$qstr);
?>

View file

@ -0,0 +1,30 @@
<?php
$sub_menu = "100200";
include_once('./_common.php');
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.');
$mb = get_member($mb_id);
if (!$mb['mb_id'])
alert('존재하는 회원아이디가 아닙니다.');
check_admin_token();
$sql = " insert into {$g5['auth_table']}
set mb_id = '{$_POST['mb_id']}',
au_menu = '{$_POST['au_menu']}',
au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}' ";
$result = sql_query($sql, FALSE);
if (!$result) {
$sql = " update {$g5['auth_table']}
set au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}'
where mb_id = '{$_POST['mb_id']}'
and au_menu = '{$_POST['au_menu']}' ";
sql_query($sql);
}
//sql_query(" OPTIMIZE TABLE `$g5['auth_table']` ");
goto_url('./auth_list.php?'.$qstr);
?>

View file

@ -0,0 +1,140 @@
<?php
$sub_menu = '100320';
include_once('./_common.php');
auth_check($auth[$sub_menu], "w");
$html_title = '메인슬라이드 ';
$g5['title'] = $html_title.'관리';
if ($w=="u")
{
$html_title .= ' 수정';
$sql = " select * from {$g5['banner_table']} where bn_id = '$bn_id' ";
$bn = sql_fetch($sql);
}
else
{
$html_title .= ' 입력';
$bn['bn_url'] = "http://";
$bn['bn_begin_time'] = date("Y-m-d 00:00:00", time());
$bn['bn_end_time'] = date("Y-m-d 00:00:00", time()+(60*60*24*31));
}
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
<form name="fbanner" action="./banner_form_update.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="bn_id" value="<?php echo $bn_id; ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col style="width: 130px">
<col style="width: 150px">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row" rowspan="2">배너 이미지</th>
<td rowspan="2" class="txt-center bo-right ">
<? if($bn['bn_img']) { ?>
<img src="<?=$bn['bn_img']?>" class="prev_thumb" />
<? } else { ?>
이미지 없음
<? } ?>
</td>
<td>
직접등록&nbsp;&nbsp; <input type="file" name="bn_img_file" size="50"/>
</td></tr><tr>
<td>
외부경로&nbsp;&nbsp; <input type="text" name="bn_img" value="<?=$bn['bn_img']?>" size="50"/>
</td>
</tr>
<tr>
<th scope="row" rowspan="2">배너 모바일 이미지</th>
<td rowspan="2" class="txt-center bo-right ">
<? if($bn['bn_img']) { ?>
<img src="<?=$bn['bn_m_img']?>" class="prev_thumb" />
<? } else { ?>
이미지 없음
<? } ?>
</td>
<td>
직접등록&nbsp;&nbsp; <input type="file" name="bn_m_img_file" size="50"/>
</td></tr><tr>
<td>
외부경로&nbsp;&nbsp; <input type="text" name="bn_m_img" value="<?=$bn['bn_m_img']?>" size="50"/>
</td>
</tr>
<tr>
<th>대체텍스트</th>
<td colspan="2">
<input type="text" name="bn_alt" value="<?php echo $bn['bn_alt']; ?>" size="84">
</td>
</tr>
<tr>
<th>링크</th>
<td colspan="2">
<input type="text" name="bn_url" value="<?php echo $bn['bn_url']; ?>" size="84" />
</td>
</tr>
<tr>
<th>새창</th>
<td colspan="2">
<?php echo help("배너 클릭시 새창을 띄울지를 설정합니다.", 50); ?>
<select name="bn_new_win">
<option value="0" <?php echo get_selected($bn['bn_new_win'], 0); ?>>사용안함</option>
<option value="1" <?php echo get_selected($bn['bn_new_win'], 1); ?>>사용</option>
<option value="2" <?php echo get_selected($bn['bn_new_win'], 2); ?>>팝업사용</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_begin_time">시작일시</label></th>
<td colspan="2">
<?php echo help("배너 게시 시작일시를 설정합니다."); ?>
<input type="text" name="bn_begin_time" value="<?php echo $bn['bn_begin_time']; ?>" id="bn_begin_time" class="frm_input" size="21" maxlength="19">
<input type="checkbox" name="bn_begin_chk" value="<?php echo date("Y-m-d 00:00:00", time()); ?>" id="bn_begin_chk" onclick="if (this.checked == true) this.form.bn_begin_time.value=this.form.bn_begin_chk.value; else this.form.bn_begin_time.value = this.form.bn_begin_time.defaultValue;">
<label for="bn_begin_chk">오늘</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_end_time">종료일시</label></th>
<td colspan="2">
<?php echo help("비쥬얼 게시 종료일시를 설정합니다."); ?>
<input type="text" name="bn_end_time" value="<?php echo $bn['bn_end_time']; ?>" id="bn_end_time" class="frm_input" size=21 maxlength=19>
<input type="checkbox" name="bn_end_chk" value="<?php echo date("Y-m-d 23:59:59", time()+60*60*24*31); ?>" id="bn_end_chk" onclick="if (this.checked == true) this.form.bn_end_time.value=this.form.bn_end_chk.value; else this.form.bn_end_time.value = this.form.bn_end_time.defaultValue;">
<label for="bn_end_chk">오늘+31</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_order">출력 순서</label></th>
<td colspan="2">
<?php echo help("배너를 출력할 때 순서를 정합니다. 숫자가 작을수록 먼저 출력됩니다."); ?>
<?php echo order_select("bn_order", $bn['bn_order']); ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./banner_list.php">목록</a>
</div>
</form>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>

View file

@ -0,0 +1,86 @@
<?php
$sub_menu = '100320';
include_once('./_common.php');
check_demo();
if ($w == 'd')
auth_check($auth[$sub_menu], "d");
else
auth_check($auth[$sub_menu], "w");
$banner_path = G5_DATA_PATH."/banner";
$banner_url = G5_DATA_URL."/banner";
@mkdir($banner_path, G5_DIR_PERMISSION);
@chmod($banner_path, G5_DIR_PERMISSION);
$add_banner = "";
// 이미지 등록 시, 이미지를 업로드한 뒤 - 해당 이미지 경로를 삽입
if ($_FILES['bn_img_file']['name']) {
// 확장자 따기
// 확장자 따기
$exp = explode(".", $_FILES['bn_img_file']['name']);
$exp = $exp[count($exp)-1];
$banner_name = "visual_".time().".".$exp;
upload_file($_FILES['bn_img_file']['tmp_name'], $banner_name, $banner_path);
$bn_img = $banner_url."/".$banner_name;
}
// 이미지 등록 시, 이미지를 업로드한 뒤 - 해당 이미지 경로를 삽입
if ($_FILES['bn_m_img_file']['name']) {
// 확장자 따기
$exp = explode(".", $_FILES['bn_m_img_file']['name']);
$exp = $exp[count($exp)-1];
$banner_name = "visual_".time()."_m.".$exp;
upload_file($_FILES['bn_m_img_file']['tmp_name'], $banner_name, $banner_path);
$bn_m_img = $banner_url."/".$banner_name;
}
if ($w=="" || $w=="u") {
if ($w=="") {
$sql = " insert into {$g5['banner_table']}
set bn_img = '$bn_img',
bn_m_img = '$bn_m_img',
bn_alt = '$bn_alt',
bn_url = '$bn_url',
bn_new_win = '$bn_new_win',
bn_begin_time = '$bn_begin_time',
bn_end_time = '$bn_end_time',
bn_order = '$bn_order'";
sql_query($sql);
} else if ($w=="u") {
$sql = " update {$g5['banner_table']}
set bn_img = '$bn_img',
bn_m_img = '$bn_m_img',
bn_alt = '$bn_alt',
bn_url = '$bn_url',
bn_new_win = '$bn_new_win',
bn_begin_time = '$bn_begin_time',
bn_end_time = '$bn_end_time',
bn_order = '$bn_order'
where bn_id = '$bn_id' ";
sql_query($sql);
}
} else if ($w=="d") {
$sql = " select * from {$g5['banner_table']} where bn_id = '$bn_id' ";
$bn = sql_fetch($sql);
@unlink($bn['bn_img']);
@unlink($bn['bn_m_img']);
$sql = " delete from {$g5['banner_table']} where bn_id = $bn_id ";
$result = sql_query($sql);
}
goto_url("./banner_list.php");
?>

View file

@ -0,0 +1,120 @@
<?php
$sub_menu = '100320';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g5['title'] = '메인슬라이드 관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql_common = " from {$g5['banner_table']} ";
// 테이블의 전체 레코드수만 얻음
$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 bn_order, bn_id desc
limit $from_record, $rows ";
$result = sql_query($sql);
?>
<div class="local_ov01 local_ov">
등록된 이미지 <?php echo $total_count; ?>
</div>
<div class="btn_add01 btn_add">
<a href="./banner_form.php">메인슬라이드 추가</a>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 170px;" />
<col />
<col style="width: 130px;" />
<col style="width: 130px;" />
<col style="width: 80px;" />
<col style="width: 80px;" />
</colgroup>
<thead>
<tr>
<th scope="col" class="bo-right">ID</th>
<th scope="col">이미지</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++) {
// 새창 띄우기인지
$bn_new_win = ($row['bn_new_win']) ? 'target="_blank"' : '';
$bn_img_obj = "";
$link_tag = false;
if($row['bn_img']) {
if ($row['bn_url'] && $row['bn_url'] != "http://") { $link_tag = true; }
if($link_tag) $bn_img_obj .= "<a hreef='".$row['bn_url']."' ".$bn_new_win.">";
$bn_img_obj .= "<img src='".$row['bn_img']."' alt='".$row['bn_alt']."' class='banner-thumb'/>";
if($link_tag) $bn_img_obj .= "</a>";
}
$bn_begin_time = substr($row['bn_begin_time'], 2, 14);
$bn_end_time = substr($row['bn_end_time'], 2, 14);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td><?php echo $row['bn_id']; ?></td>
<td><?php echo $bn_img_obj; ?></td>
<td><?php echo $row['bn_alt']; ?></td>
<td><?php echo $bn_begin_time; ?></td>
<td><?php echo $bn_end_time; ?></td>
<td><?php echo $row['bn_order']; ?></td>
<td>
<a href="./banner_form.php?w=u&amp;bn_id=<?php echo $row['bn_id']; ?>">수정</a></li>
<a href="./banner_form_update.php?w=d&amp;bn_id=<?php echo $row['bn_id']; ?>" onclick="return delete_confirm();">삭제</a>
</td>
</tr>
<?php
}
if ($i == 0) {
echo '<tr><td colspan="7" 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['PHP_SELF']}?$qstr&amp;position=$position&amp;page="); ?>
<script>
$(function() {
$(".sbn_img_view").on("click", function() {
$(this).closest(".td_img_view").find(".sbn_image").slideToggle();
});
});
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>

View file

@ -0,0 +1,73 @@
<?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>
<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">원본 테이블명</th>
<td><?php echo $bo_table ?></td>
</tr>
<tr>
<th scope="col"><label for="target_table">복사 테이블명<strong class="sound_only">필수</strong></label></th>
<td><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" 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_confirm01 btn_confirm">
<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');
?>

View 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.'&amp;'.$qstr);
?>

View 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);
?>

View file

@ -0,0 +1,920 @@
<?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'] = 1;
$board['bo_count_modify'] = 1;
$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'] = 1;
$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_005">포인트 설정</a></li>
<li><a href="#anc_006">여분필드</a></li>
</ul>';
$frm_submit = '<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./board_list.php?'.$qstr.'">목록</a>'.PHP_EOL;
if ($w == 'u') $frm_submit .= '<a href="./board_copy.php?bo_table='.$bo_table.'" id="board_copy" target="win_board_copy">게시판복사</a>
<a href="'.G5_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'" class="btn_frmline">게시판 바로가기</a>
<a href="./board_thumbnail_delete.php?bo_table='.$board['bo_table'].'&amp;'.$qstr.'" onclick="return delete_confirm2(\'게시판 썸네일 파일을 삭제하시겠습니까?\');">게시판 썸네일 삭제</a>'.PHP_EOL;
$frm_submit .= '</div>';
?>
<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">
<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>
<?php echo $frm_submit; ?>
<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>
<?php echo $frm_submit; ?>
<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_count_modify">원글 수정 불가<strong class="sound_only">필수</strong></label></th>
<td>
<?php echo help('댓글의 수가 설정 수 이상이면 원글을 수정할 수 없습니다. 0으로 설정하시면 댓글 수에 관계없이 수정할 수있습니다.'); ?>
댓글 <input type="text" name="bo_count_modify" value="<?php echo $board['bo_count_modify'] ?>" id="bo_count_modify" required class="required numeric frm_input" size="3"> 이상 달리면 수정불가
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_count_modify" value="1" id="chk_grp_count_modify">
<label for="chk_grp_count_modify">그룹적용</label>
<input type="checkbox" name="chk_all_count_modify" value="1" id="chk_all_count_modify">
<label for="chk_all_count_modify">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_count_delete">원글 삭제 불가<strong class="sound_only">필수</strong></label></th>
<td>
댓글 <input type="text" name="bo_count_delete" value="<?php echo $board['bo_count_delete'] ?>" id="bo_count_delete" required class="required numeric frm_input" size="3"> 이상 달리면 삭제불가
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_count_delete" value="1" id="chk_grp_count_delete">
<label for="chk_grp_count_delete">그룹적용</label>
<input type="checkbox" name="chk_all_count_delete" value="1" id="chk_all_count_delete">
<label for="chk_all_count_delete">전체적용</label>
</td>
</tr>
<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_chick">(이미지 선업로드) 사용</label></th>
<td>
<input type="checkbox" name="bo_use_chick" value="1" <?php echo $board['bo_use_chick']?'checked':''; ?> id="bo_use_chick">
사용
</td>
<td class="td_grpset"></td>
</tr>
<tr>
<th scope="row"><label for="bo_use_noname">익명 사용</label></th>
<td>
<input type="checkbox" name="bo_use_noname" value="1" <?php echo $board['bo_use_noname']?'checked':''; ?> id="bo_use_noname">
사용
</td>
<td class="td_grpset"></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_content">목록에서 내용 사용</label></th>
<td>
<?php echo help("목록에서 게시판 제목외에 내용도 읽어와야 할 경우에 설정하는 옵션입니다. 기본은 사용하지 않습니다."); ?>
<input type="checkbox" name="bo_use_list_content" value="1" id="bo_use_list_content" <?php echo $board['bo_use_list_content']?'checked':''; ?>>
사용 (사용시 속도가 느려질 있습니다.)
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_use_list_content" value="1" id="chk_grp_use_list_content">
<label for="chk_grp_use_list_content">그룹적용</label>
<input type="checkbox" name="chk_all_use_list_content" value="1" id="chk_all_use_list_content">
<label for="chk_all_use_list_content">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_list_file">목록에서 파일 사용</label></th>
<td>
<?php echo help("목록에서 게시판 첨부파일을 읽어와야 할 경우에 설정하는 옵션입니다. 기본은 사용하지 않습니다."); ?>
<input type="checkbox" name="bo_use_list_file" value="1" id="bo_use_list_file" <?php echo $board['bo_use_list_file']?'checked':''; ?>>
사용 (사용시 속도가 느려질 있습니다.)
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_use_list_file" value="1" id="chk_grp_use_list_file">
<label for="chk_grp_use_list_file">그룹적용</label>
<input type="checkbox" name="chk_all_use_list_file" value="1" id="chk_all_use_list_file">
<label for="chk_all_use_list_file">전체적용</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>
<tr>
<th scope="row"><label for="bo_write_min">최소 글수 제한</label></th>
<td>
<?php echo help('글 입력시 최소 글자수를 설정. 0을 입력하거나 최고관리자, DHTML 에디터 사용시에는 검사하지 않음') ?>
<input type="text" name="bo_write_min" value="<?php echo $board['bo_write_min'] ?>" id="bo_write_min" class="numeric frm_input" size="4">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_write_min" value="1" id="chk_grp_write_min">
<label for="chk_grp_write_min">그룹적용</label>
<input type="checkbox" name="chk_all_write_min" value="1" id="chk_all_write_min">
<label for="chk_all_write_min">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_write_max">최대 글수 제한</label></th>
<td>
<?php echo help('글 입력시 최대 글자수를 설정. 0을 입력하거나 최고관리자, DHTML 에디터 사용시에는 검사하지 않음') ?>
<input type="text" name="bo_write_max" value="<?php echo $board['bo_write_max'] ?>" id="bo_write_max" class="numeric frm_input" size="4">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_write_max" value="1" id="chk_grp_write_max">
<label for="chk_grp_write_max">그룹적용</label>
<input type="checkbox" name="chk_all_write_max" value="1" id="chk_all_write_max">
<label for="chk_all_write_max">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_comment_min">최소 댓글수 제한</label></th>
<td>
<?php echo help('댓글 입력시 최소 글자수를 설정. 0을 입력하면 검사하지 않음') ?>
<input type="text" name="bo_comment_min" value="<?php echo $board['bo_comment_min'] ?>" id="bo_comment_min" class="numeric frm_input" size="4">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_comment_min" value="1" id="chk_grp_comment_min">
<label for="chk_grp_comment_min">그룹적용</label>
<input type="checkbox" name="chk_all_comment_min" value="1" id="chk_all_comment_min">
<label for="chk_all_comment_min">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_comment_max">최대 댓글수 제한</label></th>
<td>
<?php echo help('댓글 입력시 최대 글자수를 설정. 0을 입력하면 검사하지 않음') ?>
<input type="text" name="bo_comment_max" value="<?php echo $board['bo_comment_max'] ?>" id="bo_comment_max" class="numeric frm_input" size="4">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_comment_max" value="1" id="chk_grp_comment_max">
<label for="chk_grp_comment_max">그룹적용</label>
<input type="checkbox" name="chk_all_comment_max" value="1" id="chk_all_comment_max">
<label for="chk_all_comment_max">전체적용</label>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<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_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_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_new">새글 아이콘<strong class="sound_only">필수</strong></label></th>
<td>
<?php echo help('글 입력후 new 이미지를 출력하는 시간. 0을 입력하시면 아이콘을 출력하지 않습니다.') ?>
<input type="text" name="bo_new" value="<?php echo $board['bo_new'] ?>" id="bo_new" required class="required numeric frm_input" size="4">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_new" value="1" id="chk_grp_new">
<label for="chk_grp_new">그룹적용</label>
<input type="checkbox" name="chk_all_new" value="1" id="chk_all_new">
<label for="chk_all_new">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_reply_order">답변 달기</label></th>
<td>
<select id="bo_reply_order" name="bo_reply_order">
<option value="1"<?php echo get_selected($board['bo_reply_order'], 1, true); ?>>나중에 쓴 답변 아래로 달기 (기본)
<option value="0"<?php echo get_selected($board['bo_reply_order'], 0); ?>>나중에 쓴 답변 위로 달기
</select>
</td>
<td class="td_grpset">
<input type="checkbox" id="chk_grp_reply_order" name="chk_grp_reply_order" value="1">
<label for="chk_grp_reply_order">그룹적용</label>
<input type="checkbox" id="chk_all_reply_order" name="chk_all_reply_order" value="1">
<label for="chk_all_reply_order">전체적용</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>
<?php echo $frm_submit; ?>
<section id="anc_005">
<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="chk_grp_point">기본값으로 설정</label></th>
<td colspan="2">
<?php echo help('환경설정에 입력된 포인트로 설정') ?>
<input type="checkbox" name="chk_grp_point" id="chk_grp_point" onclick="set_point(this.form)">
</td>
</tr>
<tr>
<th scope="row"><label for="bo_read_point">글읽기 포인트<strong class="sound_only">필수</strong></label></th>
<td>
<input type="text" name="bo_read_point" value="<?php echo $board['bo_read_point'] ?>" id="bo_read_point" required class="required frm_input" size="5">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_read_point" value="1" id="chk_grp_read_point">
<label for="chk_grp_read_point">그룹적용</label>
<input type="checkbox" name="chk_all_read_point" value="1" id="chk_all_read_point">
<label for="chk_all_read_point">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_write_point">글쓰기 포인트<strong class="sound_only">필수</strong></label></th>
<td>
<input type="text" name="bo_write_point" value="<?php echo $board['bo_write_point'] ?>" id="bo_write_point" required class="required frm_input" size="5">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_write_point" value="1" id="chk_grp_write_point">
<label for="chk_grp_write_point">그룹적용</label>
<input type="checkbox" name="chk_all_write_point" value="1" id="chk_all_write_point">
<label for="chk_all_write_point">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_comment_point">댓글쓰기 포인트<strong class="sound_only">필수</strong></label></th>
<td>
<input type="text" name="bo_comment_point" value="<?php echo $board['bo_comment_point'] ?>" id="bo_comment_point" required class="required frm_input" size="5">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_comment_point" value="1" id="chk_grp_comment_point">
<label for="chk_grp_comment_point">그룹적용</label>
<input type="checkbox" name="chk_all_comment_point" value="1" id="chk_all_comment_point">
<label for="chk_all_comment_point">전체적용</label>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<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>
<?php echo $frm_submit; ?>
</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');
?>

View 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}&amp;{$qstr}");
?>

View file

@ -0,0 +1,211 @@
<?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 = 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="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>
<?php if ($is_admin == 'super') { ?>
<div class="btn_add01 btn_add">
<a href="./board_form.php" id="bo_add">게시판 추가</a>
</div>
<?php } ?>
<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">
<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('a.gr_id') ?>그룹</a></th>
<th scope="col"><?php echo subject_sort_link('bo_table') ?>TABLE</a></th>
<th scope="col"><?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">읽기P<span class="sound_only">포인트</span></th>
<th scope="col">쓰기P<span class="sound_only">포인트</span></th>
<th scope="col">댓글P<span class="sound_only">포인트</span></th>
<th scope="col">다운P<span class="sound_only">포인트</span></th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$one_update = '<a href="./board_form.php?w=u&amp;bo_table='.$row['bo_table'].'&amp;'.$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>
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['bo_subject']) ?></label>
<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>
<label for="bo_skin_<?php echo $i; ?>" class="sound_only">스킨</label>
<?php echo get_skin_select('board', 'bo_skin_'.$i, "bo_skin[$i]", $row['bo_skin']); ?>
</td>
<td>
<label for="bo_subject_<?php echo $i; ?>" class="sound_only">게시판 제목<strong class="sound_only"> 필수</strong></label>
<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>
<label for="bo_read_point_<?php echo $i; ?>" class="sound_only">읽기 포인트</label>
<input type="text" name="bo_read_point[<?php echo $i ?>]" value="<?php echo $row['bo_read_point'] ?>" id="bo_read_point_<?php echo $i; ?>" class="frm_input" size="2">
</td>
<td>
<label for="bo_write_point_<?php echo $i; ?>" class="sound_only">쓰기 포인트</label>
<input type="text" name="bo_write_point[<?php echo $i ?>]" value="<?php echo $row['bo_write_point'] ?>" id="bo_write_point_<?php echo $i; ?>" class="frm_input" size="2">
</td>
<td>
<label for="bo_comment_point_<?php echo $i; ?>" class="sound_only">댓글 포인트</label>
<input type="text" name="bo_comment_point[<?php echo $i ?>]" value="<?php echo $row['bo_comment_point'] ?>" id="bo_comment_point_<?php echo $i; ?>" class="frm_input" size="2">
</td>
<td>
<label for="bo_download_point_<?php echo $i; ?>" class="sound_only">다운 포인트</label>
<input type="text" name="bo_download_point[<?php echo $i ?>]" value="<?php echo $row['bo_download_point'] ?>" id="bo_download_point_<?php echo $i; ?>" class="frm_input" size="2">
</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_list01 btn_list">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<?php if ($is_admin == 'super') { ?>
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
<?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.'&amp;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');
?>

View file

@ -0,0 +1,67 @@
<?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_read_point = '{$_POST['bo_read_point'][$k]}',
bo_write_point = '{$_POST['bo_write_point'][$k]}',
bo_comment_point = '{$_POST['bo_comment_point'][$k]}',
bo_download_point = '{$_POST['bo_download_point'][$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?'.$qstr);
?>

View 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&amp;bo_table=<?php echo $bo_table; ?>&amp;<?php echo $qstr; ?>">게시판 수정으로 돌아가기</a></div>
<?php
include_once('./admin.tail.php');
?>

View file

@ -0,0 +1,150 @@
<?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');
?>
<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="">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<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>
<tr>
<th scope="row"><label for="gr_device">접속기기</label></th>
<td>
<?php echo help("PC 와 모바일 사용을 구분합니다.") ?>
<select id="gr_device" name="gr_device">
<option value="both"<?php echo get_selected($group['gr_device'], 'both', true); ?>>PC와 모바일에서 모두 사용</option>
<option value="pc"<?php echo get_selected($group['gr_device'], 'pc'); ?>>PC 전용</option>
<option value="mobile"<?php echo get_selected($group['gr_device'], 'mobile'); ?>>모바일 전용</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><?php if ($is_admin == 'super') { ?><label for="gr_admin"><?php } ?>그룹 관리자<?php if ($is_admin == 'super') { ?></label><?php } ?></th>
<td>
<?php
if ($is_admin == 'super')
echo '<input type="text" id="gr_admin" name="gr_admin" class="frm_input" value="'.$gr['gr_admin'].'" maxlength="20">';
else
echo '<input type="hidden" id="gr_admin" name="gr_admin" value="'.$gr['gr_admin'].'">'.$gr['gr_admin'];
?>
</td>
</tr>
<tr>
<th scope="row"><label for="gr_use_access">접근회원사용</label></th>
<td>
<?php echo help("사용에 체크하시면 이 그룹에 속한 게시판은 접근가능한 회원만 접근이 가능합니다.") ?>
<input type="checkbox" name="gr_use_access" value="1" id="gr_use_access" <?php echo $gr['gr_use_access']?'checked':''; ?>>
사용
</td>
</tr>
<tr>
<th scope="row">접근회원수</th>
<td>
<?php
// 접근회원수
$sql1 = " select count(*) as cnt from {$g5['group_member_table']} where gr_id = '{$gr_id}' ";
$row1 = sql_fetch($sql1);
echo '<a href="./boardgroupmember_list.php?gr_id='.$gr_id.'">'.$row1['cnt'].'</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">
<input type="submit" class="btn_submit" accesskey="s" value="확인">
<a href="./boardgroup_list.php?<?php echo $qstr ?>">목록</a>
</div>
</form>
<div class="local_desc01 local_desc">
<p>
게시판을 생성하시려면 1 이상의 게시판그룹이 필요합니다.<br>
게시판그룹을 이용하시면 효과적으로 게시판을 관리할 있습니다.
</p>
</div>
<script>
function fboardgroup_check(f)
{
f.action = './boardgroup_form_update.php';
return true;
}
</script>
<?php
include_once ('./admin.tail.php');
?>

View 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&amp;gr_id='.$gr_id.'&amp;'.$qstr);
?>

View file

@ -0,0 +1,215 @@
<?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>
<?php if ($is_admin == 'super') { ?>
<div class="btn_add01 btn_add sort_with">
<a href="./boardgroup_form.php" id="bo_gr_add">게시판그룹 추가</a>
</div>
<?php } ?>
<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.'&amp;w=u&amp;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&amp;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_list01 btn_list">
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택수정">
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택삭제">
<a href="./boardgroup_form.php">게시판그룹 추가</a>
</div>
</form>
<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.'&amp;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');
?>

View 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&amp;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);
?>

View 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');
?>

View 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&amp;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');
?>

View 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);
?>

View 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');
?>

View 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');
?>

View 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>';
?>

View 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('');
?>

View file

@ -0,0 +1,48 @@
<?php
$sub_menu = '100900';
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');
?>

View 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');
?>

View file

@ -0,0 +1,327 @@
<?php
$sub_menu = "400100";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$token = get_token();
// 기본항목에 대한 설정값 가져오기
$profile = sql_fetch(" select * from {$g5['article_default_table']} ");
$profile['ad_text_thumb'] = $profile['ad_text_thumb'] ? $profile['ad_text_thumb'] : "두상";
$profile['ad_text_head'] = $profile['ad_text_head'] ? $profile['ad_text_head'] : "흉상";
$profile['ad_text_body'] = $profile['ad_text_body'] ? $profile['ad_text_body'] : "전신";
$profile['ad_text_name'] = $profile['ad_text_name'] ? $profile['ad_text_name'] : "이름";
$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>
</ul>';
$frm_submit = '<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
// 추가 항목에 대한 데이터들 가져오기
$sql = " select * from {$g5['article_table']} order by ar_theme asc, ar_order asc";
$result = sql_query($sql);
$g5['title'] = '프로필 양식 관리';
include_once ('./admin.head.php');
?>
<form name="farticle" method="post" action="./character_article_list_update.php" autocomplete="off">
<section id="anc_001">
<h2 class="h2_frm">기본 프로필 양식</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col style="width: 80px;">
<col />
</colgroup>
<tbody>
<tr>
<th>기능사용설정</th>
<td colspan="2">
<input type="checkbox" name="ad_use_title" value="1" id="ad_use_title" <?=$profile['ad_use_title'] ? "checked" : ""?>/>
<label for="ad_use_title">타이틀 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_closet" value="1" id="ad_use_closet" <?=$profile['ad_use_closet'] ? "checked" : ""?>/>
<label for="ad_use_closet">옷장 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_inven" value="1" id="ad_use_inven" <?=$profile['ad_use_inven'] ? "checked" : ""?>/>
<label for="ad_use_inven">인벤토리 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_money" value="1" id="ad_use_money" <?=$profile['ad_use_money'] ? "checked" : ""?>/>
<label for="ad_use_money">금액 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_exp" value="1" id="ad_use_exp" <?=$profile['ad_use_exp'] ? "checked" : ""?>/>
<label for="ad_use_exp">경험치 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_rank" value="1" id="ad_use_rank" <?=$profile['ad_use_rank'] ? "checked" : ""?>/>
<label for="ad_use_rank">랭킹 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_status" value="1" id="ad_use_status" <?=$profile['ad_use_status'] ? "checked" : ""?>/>
<label for="ad_use_status">스탯 사용</label>
</td>
</tr>
<tr>
<th rowspan="2"><input type="text" name="ad_text_thumb" value="<?=$profile['ad_text_thumb']?>" size="13"/></th>
<td class="bo-right bo-left">사용여부</td>
<td>
<input type="checkbox" name="ad_use_thumb" value="1" id="ad_use_thumb" <?=$profile['ad_use_thumb'] ? "checked" : ""?>/>
<label for="ad_use_thumb">사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_url_thumb" value="1" id="ad_url_thumb" <?=$profile['ad_url_thumb'] ? "checked" : ""?> />
<label for="ad_url_thumb">외부 이미지 경로로 등록</label>
</td></tr><tr>
<td class="bo-right bo-left">도움말</td>
<td>
<input type="text" name="ad_help_thumb" value="<?=$profile['ad_help_thumb']?>" size="80" />
</td>
</tr>
<tr>
<th rowspan="2"><input type="text" name="ad_text_head" value="<?=$profile['ad_text_head']?>" size="13"/></th>
<td class="bo-right bo-left">사용여부</td>
<td>
<input type="checkbox" name="ad_use_head" value="1" id="ad_use_head" <?=$profile['ad_use_head'] ? "checked" : ""?> />
<label for="ad_use_head">사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_url_head" value="1" id="ad_url_head" <?=$profile['ad_url_head'] ? "checked" : ""?> />
<label for="ad_url_head">외부 이미지 경로로 등록</label>
</td></tr><tr>
<td class="bo-right bo-left">도움말</td>
<td>
<input type="text" name="ad_help_head" value="<?=$profile['ad_help_head']?>" size="80" />
</td>
</tr>
<tr>
<th rowspan="2"><input type="text" name="ad_text_body" value="<?=$profile['ad_text_body']?>" size="13"/></th>
<td class="bo-right bo-left">사용여부</td>
<td>
<input type="checkbox" name="ad_use_body" value="1" id="ad_use_body" <?=$profile['ad_use_body'] ? "checked" : ""?> />
<label for="ad_use_body">사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_url_body" value="1" id="ad_url_body" <?=$profile['ad_url_body'] ? "checked" : ""?> />
<label for="ad_url_body">외부 이미지 경로로 등록</label>
</td></tr><tr>
<td class="bo-right bo-left">도움말</td>
<td>
<input type="text" name="ad_help_body" value="<?=$profile['ad_help_body']?>" size="80" />
</td>
</tr>
<tr>
<th><input type="text" name="ad_text_name" value="<?=$profile['ad_text_name']?>" size="13"/></th>
<td class="bo-right bo-left">도움말</td>
<td>
<input type="hidden" name="ad_use_name" value="1" />
<input type="text" name="ad_help_name" value="<?=$profile['ad_help_name']?>" size="80" />
</td>
</tr>
</tbody>
</table>
</div>
</section>
<? 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_head01 tbl_wrap">
<table>
<colgroup>
<col style="width:100px;" />
<col style="width:120px;" />
<col style="width:120px;" />
<col style="width:120px;" />
<col style="width:100px;" />
<col style="width:120px;" />
<col />
<col style="width:100px;" />
<col style="width:100px;" />
</colgroup>
<thead>
<tr>
<th>테마</th>
<th>고유코드</th>
<th>항목명</th>
<th>항목타입</th>
<th>폼크기</th>
<th>단위/항목</th>
<th>도움말</th>
<th>순서</th>
<th>공개영역</th>
</tr>
</thead>
<tbody>
<? for($i = 0; $ar = sql_fetch_array($result); $i++) { ?>
<tr>
<td>
<?php echo get_theme_select('theme_dir_'.$i, "ar_theme[$i]", $ar['ar_theme'], " class='full'"); ?>
</td>
<td>
<input type="hidden" name="ar_id[<?=$i?>]" value="<?=$ar['ar_id']?>" />
<input type="text" name="ar_code[<?=$i?>]" value="<?=$ar['ar_code']?>" class="full" />
</td>
<td>
<input type="text" name="ar_name[<?=$i?>]" value="<?=$ar['ar_name']?>" class="full" />
</td>
<td>
<select name="ar_type[<?=$i?>]" class="full">
<option value="text" <?=$ar['ar_type']=="text" ? "selected" : ""?>>한줄 텍스트</option>
<option value="textarea" <?=$ar['ar_type']=="textarea" ? "selected" : ""?>>텍스트</option>
<option value="select" <?=$ar['ar_type']=="select" ? "selected" : ""?>>단일선택</option>
<option value="file" <?=$ar['ar_type']=="file" ? "selected" : ""?>>이미지 업로드</option>
<option value="url" <?=$ar['ar_type']=="url" ? "selected" : ""?>>외부이미지 링크</option>
</select>
</td>
<td>
<input type="text" name="ar_size[<?=$i?>]" value="<?=$ar['ar_size']?>" style="width: 50px;"/> px
</td>
<td>
<input type="text" name="ar_text[<?=$i?>]" value="<?=$ar['ar_text']?>" class="full"/>
</td>
<td>
<input type="text" name="ar_help[<?=$i?>]" value="<?=$ar['ar_help']?>" class="full"/>
</td>
<td>
<input type="text" name="ar_order[<?=$i?>]" value="<?=$ar['ar_order']?>" class="full"/>
</td>
<td>
<select name="ar_secret[<?=$i?>]" class="full">
<option value="">전체공개</option>
<option value="S" <?=$ar['ar_secret']=="S" ? "selected" : ""?>>오너+관리자 공개</option>
<option value="H" <?=$ar['ar_secret']=="H" ? "selected" : ""?>>관리자 공개</option>
</select>
</td>
</tr>
<? }
if($i==0){ ?>
<tr>
<td colspan="9" class="empty_table">등록된 항목이 없습니다.</td>
</tr>
<? } ?>
</tbody>
</table>
</div>
</section>
<? echo $frm_submit; ?>
</form>
<form name="farticle_add" method="post" action="./character_article_update.php" autocomplete="off">
<section id="anc_003">
<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>
<colgroup>
<col style="width: 120px;">
<col />
</colgroup>
<tbody>
<tr>
<th>테마</th>
<td>
<?php echo help("테마 전용 항목을 지정할 경우, 테마가 지정되지 않거나 다른 테마에서는 출력되지 않습니다.") ?>
<?php echo get_theme_select('theme_dir', "ar_theme", ''); ?>
</td>
</tr>
<tr>
<th>고유코드</th>
<td>
<?php echo help("해당 항목만의 고유코드 영문 및 '_' 문자 만으로 입력해 주시길 바랍니다.") ?>
<input type="text" name="ar_code" value="" size="30" />
</td>
</tr>
<tr>
<th>항목명</th>
<td>
<input type="text" name="ar_name" value="" size="30" />
</td>
</tr>
<tr>
<th>항목타입</th>
<td>
<select name="ar_type">
<option value="text">한줄 텍스트</option>
<option value="textarea">텍스트</option>
<option value="select">단일선택</option>
<option value="file">이미지 업로드</option>
<option value="url">외부이미지 링크</option>
</select>
</td>
</tr>
<tr>
<th>폼크기</th>
<td>
<?php echo help("입력폼의 가로 사이즈를 지정합니다. (텍스트 타입의 경우, 세로 사이즈)") ?>
<input type="text" name="ar_size" value="" size="20" />px
</td>
</tr>
<tr>
<th>단위/항목</th>
<td>
<?php echo help("입력폼의 옆에 출력될 단위, 혹은 단일 선택 항목의 경우 선택할 항목을 입력해 주세요.") ?>
<?php echo help("항목 구분은 '||' 로 해주세요. (ex : 남성||여성)") ?>
<input type="text" name="ar_text" value="" size="30" />
</td>
</tr>
<tr>
<th>도움말</th>
<td>
<?php echo help("해당 항목에 대한 추가 설명문을 입력해 주세요.") ?>
<input type="text" name="ar_help" value="" size="80" />
</td>
</tr>
<tr>
<th>순서</th>
<td>
<?php echo help("항목 출력 순서를 작성해주세요. 숫자가 작을수록 먼저 출력됩니다.") ?>
<input type="text" name="ar_order" value="" size="10" />
</td>
</tr>
<tr>
<th>공개범위</th>
<td>
<select name="ar_secret">
<option value="">전체공개</option>
<option value="S">오너+관리자 공개</option>
<option value="H">관리자 공개</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<? echo $frm_submit; ?>
</form>
<?php
include_once ('./admin.tail.php');
?>

View file

@ -0,0 +1,124 @@
<?php
$sub_menu = '400100';
include_once('./_common.php');
check_demo();
auth_check($auth[$sub_menu], 'd');
check_token();
// 기본 프로필 양식 등록
$profile = sql_fetch(" select ad_id from {$g5['article_default_table']} ");
$ad_help_thumb = htmlspecialchars ($ad_help_thumb, ENT_QUOTES);
$ad_help_head = htmlspecialchars ($ad_help_head, ENT_QUOTES);
$ad_help_body = htmlspecialchars ($ad_help_body, ENT_QUOTES);
$ad_help_name = htmlspecialchars ($ad_help_name, ENT_QUOTES);
if($profile['ad_id']) {
// 업데이트
$sql = " update {$g5['article_default_table']}
set ad_use_thumb = '$ad_use_thumb',
ad_use_head = '$ad_use_head',
ad_use_body = '$ad_use_body',
ad_use_name = '$ad_use_name',
ad_text_thumb = '$ad_text_thumb',
ad_text_head = '$ad_text_head',
ad_text_body = '$ad_text_body',
ad_text_name = '$ad_text_name',
ad_help_thumb = '$ad_help_thumb',
ad_help_head = '$ad_help_head',
ad_help_body = '$ad_help_body',
ad_help_name = '$ad_help_name',
ad_url_thumb = '$ad_url_thumb',
ad_url_head = '$ad_url_head',
ad_url_body = '$ad_url_body',
ad_use_title = '$ad_use_title',
ad_use_closet = '$ad_use_closet',
ad_use_inven = '$ad_use_inven',
ad_use_money = '$ad_use_money',
ad_use_exp = '$ad_use_exp',
ad_use_rank = '$ad_use_rank',
ad_use_status = '$ad_use_status'
";
sql_query($sql);
} else {
// 신규등록
$sql = " insert into {$g5['article_default_table']}
set ad_use_thumb = '$ad_use_thumb',
ad_use_head = '$ad_use_head',
ad_use_body = '$ad_use_body',
ad_use_name = '$ad_use_name',
ad_text_thumb = '$ad_text_thumb',
ad_text_head = '$ad_text_head',
ad_text_body = '$ad_text_body',
ad_text_name = '$ad_text_name',
ad_help_thumb = '$ad_help_thumb',
ad_help_head = '$ad_help_head',
ad_help_body = '$ad_help_body',
ad_help_name = '$ad_help_name',
ad_url_thumb = '$ad_url_thumb',
ad_url_head = '$ad_url_head',
ad_url_body = '$ad_url_body',
ad_use_title = '$ad_use_title',
ad_use_closet = '$ad_use_closet',
ad_use_inven = '$ad_use_inven',
ad_use_money = '$ad_use_money',
ad_use_exp = '$ad_use_exp',
ad_use_rank = '$ad_use_rank',
ad_use_status = '$ad_use_status'
";
sql_query($sql);
}
// -------------- 기본 프로필 양식 등록
// 추가 프로필 양식 수정
for($i=0; $i < count($ar_id); $i++) {
$ar = sql_fetch(" select ar_code from {$g5['article_table']} where ar_id = '{$ar_id[$i]}' and ar_theme= '{$ar_theme[$i]}");
if($ar_code[$i] == '') {
// 등록된 캐릭터의 항목값 삭제
$sql = " delete from {$g5['value_table']} where ar_code = '{$ar['ar_code']}' ";
sql_query($sql);
// 등록된 항목 삭제
$sql = " delete from {$g5['article_table']} where ar_id = '{$ar_id[$i]}' ";
sql_query($sql);
} else {
if($ar['ar_code'] != $ar_code[$i]) {
// 코드 항목명 변경
// 등록된 캐릭터 항목값의 항목코드 변경
$sql = " update {$g5['value_table']}
set ar_code = '{$ar_code[$i]}'
where ar_code = '{$ar['ar_code']}'
";
sql_query($sql);
}
$ar_help[$i] = htmlspecialchars ($ar_help[$i], ENT_QUOTES);
// 업데이트
$sql = " update {$g5['article_table']}
set ar_code = '{$ar_code[$i]}',
ar_theme = '{$ar_theme[$i]}',
ar_name = '{$ar_name[$i]}',
ar_type = '{$ar_type[$i]}',
ar_size = '{$ar_size[$i]}',
ar_text = '{$ar_text[$i]}',
ar_help = '{$ar_help[$i]}',
ar_order = '{$ar_order[$i]}',
ar_secret = '{$ar_secret[$i]}'
where ar_id = '{$ar_id[$i]}'
";
sql_query($sql);
}
}
goto_url('./character_article_list.php?'.$qstr);
?>

View file

@ -0,0 +1,25 @@
<?php
$sub_menu = "400100";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
check_token();
$ar_help = htmlspecialchars ($ar_help, ENT_QUOTES);
$sql = " insert into {$g5['article_table']}
set ar_code = '$ar_code',
ar_theme = '$ar_theme',
ar_name = '$ar_name',
ar_type = '$ar_type',
ar_size = '$ar_size',
ar_text = '$ar_text',
ar_help = '$ar_help',
ar_order = '$ar_order',
ar_secret = '$ar_secret'
";
sql_query($sql);
goto_url('./character_article_list.php?'.$qstr);
?>

View file

@ -0,0 +1,36 @@
<?
$sub_menu = "400200";
include_once("./_common.php");
check_demo();
auth_check($auth[$sub_menu], "d");
$ch = sql_fetch("select * from {$g5['character_table']} where ch_id = '{$ch_id}'");
if (!$ch['ch_id']) {
alert("{$ch['ch_id']} : 캐릭터 자료가 존재하지 않습니다.");
} else {
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_thumb']);
@unlink($prev_file_path);
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_head']);
@unlink($prev_file_path);
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_body']);
@unlink($prev_file_path);
sql_query(" delete from {$g5['character_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['value_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['exp_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['title_has_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['closthes_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['inventory_table']} where ch_id = '{$ch['ch_id']}' ");
$sql = " update {$g5['member_table']}
set ch_id = ''
where mb_id = '{$ch['mb_id']}' and ch_id = '{$ch['ch_id']}' ";
sql_query($sql);
}
goto_url("./character_list.php?$qstr");
?>

View file

@ -0,0 +1,449 @@
<?php
$sub_menu = "400200";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
$token = get_token();
// 기본 항목 설정 데이터
$ad = sql_fetch("select * from {$g5['article_default_table']}");
// 추가 항목 설정 데이터
$ch_ar = array();
$ar_result = sql_query("select * from {$g5['article_table']} order by ar_order asc");
for($i = 0; $row = sql_fetch_array($ar_result); $i++) {
$ch_ar[$i] = $row;
}
$status = array();
if($ad['ad_use_status']) {
// 스탯 정보 가져오기
$st_result = sql_query("select * from {$g5['status_config_table']} order by st_order asc");
for($i = 0; $row = sql_fetch_array($st_result); $i++) {
$status[$i] = $row;
}
}
/** 세력 정보 **/
$ch_si = array();
if($config['cf_side_title']) {
$side_result = sql_query("select si_id, si_name from {$g5['side_table']} where si_auth <= '{$member['mb_level']}' order by si_id asc");
for($i=0; $row = sql_fetch_array($side_result); $i++) {
$ch_si[$i]['name'] = $row['si_name'];
$ch_si[$i]['id'] = $row['si_id'];
}
}
/** 종족 정보 **/
$ch_cl = array();
if($config['cf_class_title']) {
$class_result = sql_query("select cl_id, cl_name from {$g5['class_table']} where cl_auth <= '{$member['mb_level']}' order by cl_id asc");
for($i=0; $row = sql_fetch_array($class_result); $i++) {
$ch_cl[$i]['name'] = $row['cl_name'];
$ch_cl[$i]['id'] = $row['cl_id'];
}
}
if ($w == '') {
$html_title = '추가';
} else if ($w == 'u') {
$ch = get_character($ch_id);
if (!$ch['ch_id'])
alert('존재하지 않는 캐릭터 자료 입니다.');
$html_title = '수정';
} else {
alert('제대로 된 값이 넘어오지 않았습니다.');
}
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">기본 설정</a></li>
<li><a href="#anc_002">이미지 설정</a></li>
';
if($ad['ad_use_status']) {
$pg_anchor .= '<li><a href="#anc_004">스탯 설정</a></li>';
}
$pg_anchor .= '
<li><a href="#anc_003">프로필 설정</a></li>
</ul>';
$frm_submit = '<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./character_list.php?{$qstr}">목록</a>
</div>';
$g5['title'] .= "";
$g5['title'] .= '캐릭터 '.$html_title;
include_once('./admin.head.php');
?>
<form name="fmember" id="fmember" action="./character_form_update.php" 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="<?php echo $token ?>">
<input type="hidden" name="ch_id" value="<?php echo $ch_id ?>">
<section id="anc_001">
<h2 class="h2_frm">캐릭터 기본 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col style="width: 150px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">활동 승인</th>
<td >
<select name="ch_state">
<option value="수정중" <?=$ch['ch_state'] == '수정중' ? 'selected' : ''?>>수정중</option>
<option value="대기" <?=$ch['ch_state'] == '대기' ? 'selected' : ''?>>대기</option>
<option value="승인" <?=$ch['ch_state'] == '승인' ? 'selected' : ''?>>승인</option>
<option value="삭제" <?=$ch['ch_state'] == '삭제' ? 'selected' : ''?>>삭제</option>
</select>
</td>
</tr>
<tr>
<th>캐릭터유형</th>
<td>
<select name="ch_type">
<option value="main" <?=$ch['ch_type'] == 'main' ? 'selected' : ''?>>메인캐릭터</option>
<option value="sub" <?=$ch['ch_type'] == 'sub' ? 'selected' : ''?>>서브캐릭터</option>
<option value="npc" <?=$ch['ch_type'] == 'npc' ? 'selected' : ''?>>NPC</option>
</select>
</td>
</tr>
<tr>
<th scope="row">오너아이디</th>
<td>
<input type="text" name="mb_id" value="<?php echo $ch['mb_id'] ?>" id="mb_id" >
</td>
</tr>
<? if($config['cf_side_title']) { ?>
<tr>
<th><?=$config['cf_side_title']?></th>
<td>
<select name="ch_side" id="ch_side">
<option value=""><?=$config['cf_side_title']?> 선택</option>
<? for($i=0; $i < count($ch_si); $i++) { ?>
<option value="<?=$ch_si[$i]['id']?>" <?=$ch['ch_side'] == $ch_si[$i]['id'] ? "selected" : "" ?>><?=$ch_si[$i]['name']?></option>
<? } ?>
</select>
</td>
</tr>
<? } ?>
<? if($config['cf_class_title']) { ?>
<tr>
<th><?=$config['cf_class_title']?></th>
<td>
<select name="ch_class" id="ch_class">
<option value=""><?=$config['cf_class_title']?> 선택</option>
<? for($i=0; $i < count($ch_cl); $i++) { ?>
<option value="<?=$ch_cl[$i]['id']?>" <?=$ch['ch_class'] == $ch_cl[$i]['id'] ? "selected" : "" ?>><?=$ch_cl[$i]['name']?></option>
<? } ?>
</select>
</td>
</tr>
<? } ?>
</tbody>
</table>
</div>
</section>
<? echo $frm_submit; ?>
<section id="anc_002">
<h2 class="h2_frm">캐릭터 이미지 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col style="width: 150px;">
<col style="width: 200px;">
<col>
</colgroup>
<tbody>
<? if($ad['ad_use_thumb']) { ?>
<tr>
<th><?=$ad['ad_text_thumb']?></th>
<td class="bo-left bo-right txt-center">
<? if($ch['ch_thumb']) { ?>
<img src="<?=$ch['ch_thumb']?>" class="character-thumb">
<? } else { ?>
이미지 미등록
<? } ?>
</td>
<td>
<?php echo help($ad['ad_help_thumb']) ?>
<? if($ad['ad_url_thumb']) {
// 두상 - 외부링크 등록
?>
<input type="text" name="ch_thumb" value="<?php echo $ch['ch_thumb'] ?>" size="50"/>
<? } else {
// 두상 - 직접 업로드
?>
<input type="file" name="ch_thumb_file" />
<input type="hidden" name="ch_thumb" value="<?php echo $ch['ch_thumb'] ?>" />
<? } ?>
</td>
</tr>
<? } ?>
<? if($ad['ad_use_head']) { ?>
<tr>
<th><?=$ad['ad_text_head']?></th>
<td class="bo-left bo-right txt-center">
<? if($ch['ch_head']) { ?>
<img src="<?=$ch['ch_head']?>" class="character-thumb">
<? } else { ?>
이미지 미등록
<? } ?>
</td>
<td>
<?php echo help($ad['ad_help_head']) ?>
<? if($ad['ad_url_head']) {
// 흉상 - 외부링크 등록
?>
<input type="text" name="ch_head" value="<?php echo $ch['ch_head'] ?>" size="50"/>
<? } else {
// 흉상 - 직접 업로드
?>
<input type="file" name="ch_head_file" />
<input type="hidden" name="ch_head" value="<?php echo $ch['ch_head'] ?>" />
<? } ?>
</td>
</tr>
<? } ?>
<? if($ad['ad_use_body']) { ?>
<tr>
<th><?=$ad['ad_text_body']?></th>
<td class="bo-left bo-right txt-center">
<? if($ch['ch_body']) { ?>
<img src="<?=$ch['ch_body']?>" class="character-thumb">
<? } else { ?>
이미지 미등록
<? } ?>
</td>
<td>
<?php echo help($ad['ad_help_body']) ?>
<? if($ad['ad_url_body']) {
// 전신 - 외부링크 등록
?>
<input type="text" name="ch_body" value="<?php echo $ch['ch_body'] ?>" size="50"/>
<? } else {
// 전신 - 직접 업로드
?>
<input type="file" name="ch_body_file" />
<input type="hidden" name="ch_body" value="<?php echo $ch['ch_body'] ?>" />
<? } ?>
</td>
</tr>
<? } ?>
</tbody>
</table>
</div>
</section>
<? echo $frm_submit; ?>
<?if($ad['ad_use_status']) { ?>
<section id="anc_004">
<h2 class="h2_frm">캐릭터 스탯 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col style="width: 150px;">
<col style="width: 80px;">
<col>
</colgroup>
<tbody>
<?
$use_point = 0;
for($i = 0; $i < count($status); $i++) {
$st = $status[$i];
$sc = get_status($ch['ch_id'], $st['st_id']);
$use_point += $sc['has'];
?>
<tr>
<th rowspan="2" scope="row"><?=$st['st_name']?></th>
<td class="bo-right">보유 스탯</td>
<td>
<?php echo help($st['st_help']) ?>
<input type="hidden" name="st_id[]" value="<?php echo $st['st_id'] ?>" />
<input type="text" name="sc_max[]" value="<?php echo $sc['has'] ? $sc['has'] : $st['st_min'] ?>" size="5" >
</td></tr><tr>
<td class="bo-right">차감 수치</td>
<td>
<input type="text" name="sc_value[]" value="<?php echo $sc['drop']?>" size="5" >
</td>
</tr>
<? }
if($i == 0 ) { ?>
<tr>
<td colspan="3" class="empty_table txt-center">
등록된 스탯 정보가 존재하지 않습니다.
</td>
</tr>
<? } ?>
<tr>
<th rowspan="2" scope="row">스탯포인트</th>
<td class="bo-right">전체포인트</td>
<td>
<input type="text" name="ch_point" value="<?php echo $ch['ch_point'] ? $ch['ch_point'] : $config['cf_status_point'] ?>" size="5" >
</td></tr><tr>
<td class="bo-right">사용포인트</td>
<td>
<?=$use_point?>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<? echo $frm_submit; ?>
<? } ?>
<section id="anc_003">
<h2 class="h2_frm">캐릭터 프로필 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col style="width: 150px;">
<col>
</colgroup>
<tbody>
<? if($ad['ad_use_name']) { ?>
<tr>
<th scope="row"><?=$ad['ad_text_name']?></th>
<td colspan="3">
<?php echo help($ad['ad_help_name']) ?>
<input type="text" name="ch_name" value="<?php echo $ch['ch_name'] ?>" id="ch_name" >
</td>
</tr>
<? }
// 추가 항목 값 가져오기
$av_result = sql_query("select * from {$g5['value_table']} where ch_id = '{$ch['ch_id']}'");
for($i = 0; $row = sql_fetch_array($av_result); $i++) {
$ch['av_'.$row['ar_code']] = $row['av_value'];
}
?>
<? for($i=0; $i < count($ch_ar); $i++) {
$ar = $ch_ar[$i];
$key = 'av_'.$ar['ar_code'];
$ch[$key] = sql_fetch("select av_value from {$g5['value_table']} where ch_id = '{$ch_id}' and ar_code = '{$ar['ar_code']}' and ar_theme = '{$ar['ar_theme']}'");
$ch[$key] = $ch[$key]['av_value'];
$style = "";
if($ar['ar_size']) {
if($ar['ar_type'] != 'textarea')
$style = "style = 'width: {$ar['ar_size']}px;'";
else
$style = "style = 'width: 100%; height: {$ar['ar_size']}px;'";
} else {
$style = "style = 'width: 100%;'";
}
?>
<tr>
<th>
<input type="hidden" name="ar_theme[<?=$i?>]" value="<?=$ar['ar_theme']?>" />
<input type="hidden" name="ar_code[<?=$i?>]" value="<?=$ar['ar_code']?>" />
<? if($ar['ar_theme']) { echo "[{$ar['ar_theme']}]"; } ?>
<?=$ar['ar_name']?>
</th>
<?
if($ar['ar_type'] == 'file' || $ar['ar_type'] == 'url') {
// 이미지 타입의 파일
?>
<td class="bo-right txt-center">
<? if($ch[$key]) { ?>
<img src="<?=$ch[$key]?>" class="character-thumb" />
<? } else { ?>
이미지 미등록
<? } ?>
</td>
<td>
<?php echo help($ar['ar_help']) ?>
<? if($ar['ar_type'] == 'url') { ?>
<input type="text" name="av_value[<?=$i?>]" value="<?php echo $ch[$key] ?>" <?=$style?> />
<? } else {
// 두상 - 직접 업로드
?>
<input type="file" name="av_value_file[<?=$i?>]" />
<input type="hidden" name="av_value[<?=$i?>]" value="<?php echo $ch[$key] ?>" />
<? } ?>
</td>
<? } else { ?>
<td colspan="2">
<?php echo help($ad['ad_help']) ?>
<?
if($ar['ar_type'] == 'text') {
?>
<input type="text" name="av_value[<?=$i?>]" value="<?php echo $ch[$key] ?>" <?=$style?> /> <?=$ar['ar_text']?>
<? } else if($ar['ar_type'] == 'textarea') { ?>
<textarea name="av_value[<?=$i?>]" <?=$style?>><?php echo $ch[$key] ?></textarea>
<? } else if($ar['ar_type'] == 'select') {
$option = explode("||", $ar['ar_text']);
?>
<select name="av_value[<?=$i?>]" <?=$style?>>
<? for($j=0; $j < count($option); $j++) { ?>
<option value="<?=$option[$j]?>" <?=$option[$j] == $ch[$key] ? "selected" : ""?>><?=$option[$j]?></option>
<? } ?>
</select>
<? } ?>
</td>
<? } ?>
</tr>
<? } ?>
</tbody>
</table>
</div>
</section>
<? echo $frm_submit; ?>
</form>
<?php
include_once('./admin.tail.php');
?>

View file

@ -0,0 +1,238 @@
<?php
$sub_menu = "400200";
include_once("./_common.php");
if ($w == 'u') check_demo();
auth_check($auth[$sub_menu], 'w');
check_token();
$ch_id = trim($_POST['ch_id']);
$mb = get_member($mb_id);
if(!$mb['mb_id']) {
alert('존재하지 않는 회원 정보 입니다.');
}
$character_image_path = G5_DATA_PATH."/character/".$mb_id;
$character_image_url = G5_DATA_URL."/character/".$mb_id;
@mkdir($character_image_path, G5_DIR_PERMISSION);
@chmod($character_image_path, G5_DIR_PERMISSION);
$sql_article = "";
// 기본 데이터 등록
$ad = sql_fetch("select * from {$g5['article_default_table']}");
$sql_article .= "
ch_state = '{$ch_state}',
ch_type = '{$ch_type}',
mb_id = '{$mb_id}',
ch_side = '{$ch_side}',
ch_class = '{$ch_class}',
ch_name = '{$ch_name}',
ch_point = '{$ch_point}'
";
// 이미지 등록
// -- 두상
if ($ad['ad_use_thumb']) {
if($_FILES['ch_thumb_file']['name']) {
// 확장자 따기
$exp = explode(".", $_FILES['ch_thumb_file']['name']);
$exp = $exp[count($exp)-1];
$image_name = "thumb_".time().".".$exp;
upload_file($_FILES['ch_thumb_file']['tmp_name'], $image_name, $character_image_path);
$ch_thumb = $character_image_url."/".$image_name;
}
$sql_article .= " , ch_thumb = '{$ch_thumb}'";
}
// -- 흉상
if ($ad['ad_use_head']) {
if($_FILES['ch_head_file']['name']) {
// 확장자 따기
$exp = explode(".", $_FILES['ch_head_file']['name']);
$exp = $exp[count($exp)-1];
$image_name = "head_".time().".".$exp;
upload_file($_FILES['ch_head_file']['tmp_name'], $image_name, $character_image_path);
$ch_head = $character_image_url."/".$image_name;
}
$sql_article .= " , ch_head = '{$ch_head}'";
}
// -- 전신
if ($ad['ad_use_body']) {
if($_FILES['ch_body_file']['name']) {
// 확장자 따기
$exp = explode(".", $_FILES['ch_body_file']['name']);
$exp = $exp[count($exp)-1];
$image_name = "body_".time().".".$exp;
upload_file($_FILES['ch_body_file']['tmp_name'], $image_name, $character_image_path);
$ch_body = $character_image_url."/".$image_name;
}
$sql_article .= " , ch_body = '{$ch_body}'";
}
if($w == '') {
$sql = " insert into {$g5['character_table']} set {$sql_article}";
sql_query($sql);
$ch_id = sql_insert_id();
if($mb['ch_id'] == "") sql_query("update {$g5['member_table']} set ch_id = '{$ch_id}' where mb_id = '{$mb['mb_id']}'");
if($ch_body) {
$sql = " insert into {$g5['closthes_table']}
set ch_id = '{$ch_id}',
cl_subject = '기본의상',
cl_path = '{$ch_body}',
cl_use = '1',
cl_type = 'default'";
sql_query($sql);
}
} else {
// 기존 캐릭터 데이터 호출
$ch = get_character($ch_id);
if(!$ch['ch_id'])
alert("캐릭터 정보가 존재하지 않습니다.");
if($ad['ad_use_thumb'] && !$ad['ad_url_thumb'] && $ch['ch_thumb'] != $ch_thumb) {
// 해당 서버에 업로드 한 파일일 경우
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_thumb']);
@unlink($prev_file_path);
}
if($ad['ad_use_head'] && !$ad['ad_url_head'] && $ch['ch_head'] != $ch_head) {
// 해당 서버에 업로드 한 파일일 경우
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_head']);
@unlink($prev_file_path);
}
if($ad['ad_use_body'] && !$ad['ad_url_body'] && $ch['ch_body'] != $ch_body) {
// 해당 서버에 업로드 한 파일일 경우
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_body']);
@unlink($prev_file_path);
}
$sql = " update {$g5['character_table']}
set {$sql_article}
where ch_id = '{$ch_id}'";
sql_query($sql);
if($mb['ch_id'] == "") sql_query("update {$g5['member_table']} set ch_id = '{$ch_id}' where mb_id = '{$mb['mb_id']}'");
if($ch_body) {
// 옷장정보 불러오기
$cl_sql = "select cl_id from {$g5['closthes_table']} where ch_id = '{$ch_id}' and cl_type = 'default'";
$cl = sql_fetch($cl_sql);
if($cl['cl_id']) {
// 정보 업데이트
$sql = " update {$g5['closthes_table']}
set cl_path = '{$ch_body}'
where cl_id = '{$cl['cl_id']}'";
sql_query($sql);
} else {
// 신규등록
$sql = " insert into {$g5['closthes_table']}
set ch_id = '{$ch_id}',
cl_subject = '기본의상',
cl_path = '{$ch_body}',
cl_use = '1',
cl_type = 'default'";
sql_query($sql);
}
}
}
// --------------------- 추가 프로필 데이터
// 추가 항목 값 가져오기
for($i=0; $i < count($ar_code); $i++) {
$key = 'av_'.$ar_code[$i];
$prev_value = sql_fetch("select av_value from {$g5['value_table']} where ch_id = '{$ch_id}' and ar_code = '{$ar_code[$i]}' and ar_theme = '{$ar_theme[$i]}'");
$prev_value = $prev_value['av_value'];
// 파일 등록일 경우, 이미지 업로드 처리
if ($_FILES['av_value_file']['name'][$i]) {
// 확장자 따기
$exp = explode(".", $_FILES['av_value_file']['name'][$i]);
$exp = $exp[count($exp)-1];
$image_name = "img_".$ar_code[$i]."_".time().".".$exp;
upload_file($_FILES['av_value_file']['tmp_name'][$i], $image_name, $character_image_path);
$av_value[$i] = $character_image_url."/".$image_name;
}
if($prev_value != $av_value[$i] && strstr(G5_URL, $prev_value)) {
// 해당 서버에 업로드 한 파일일 경우
$prev_file_path = str_replace(G5_URL, G5_PATH, $prev_value);
@unlink($prev_file_path);
}
$sql_article = "
ch_id = '{$ch_id}',
ar_code = '{$ar_code[$i]}',
ar_theme = '{$ar_theme[$i]}',
av_value = '{$av_value[$i]}'
";
if(isset($prev_value)) {
// 업데이트
$sql = " update {$g5['value_table']}
set {$sql_article}
where ar_code = '{$ar_code[$i]}' and ch_id = '{$ch_id}' and ar_theme = '{$ar_theme[$i]}'
";
sql_query($sql);
} else {
// 추가
$sql = " insert into {$g5['value_table']}
set {$sql_article}
";
sql_query($sql);
}
}
// --------------------- 캐릭터 스탯 등록
if(count($st_id) > 0) {
// 저장되는 스탯 정보가 존재할 시
for($i=0; $i < count($st_id); $i++) {
$temp_st_id = $st_id[$i];
$old_sc = sql_fetch("select * from {$g5['status_table']} where ch_id = '{$ch_id}' and st_id = '{$temp_st_id}'");
if($old_sc['sc_id']) {
// 업데이트
$sql = " update {$g5['status_table']}
set sc_max = '{$sc_max[$i]}',
sc_value = '{$sc_value[$i]}'
where sc_id = '{$old_sc['sc_id']}'
";
sql_query($sql);
} else {
// 등록
$sql = " insert into {$g5['status_table']}
set st_id = '{$st_id[$i]}',
ch_id = '{$ch_id}',
sc_max = '{$sc_max[$i]}',
sc_value = '{$sc_value[$i]}'
";
sql_query($sql);
}
}
}
goto_url('./character_form.php?'.$qstr.'&amp;w=u&amp;ch_id='.$ch_id, false);
?>

View file

@ -0,0 +1,317 @@
<?php
$sub_menu = "400200";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$sql_common = " from {$g5['character_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default :
$sql_search .= " ({$sfl} like '{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if($sfl != 'ch_state' && $stx != '삭제') {
$sql_search .= " and ch_state != '삭제' ";
}
if($s_side) {
$sql_search .= " and ch_side = '{$s_side}' ";
}
if($s_class) {
$sql_search .= " and ch_class = '{$s_class}' ";
}
if (!$sst) {
$sst = "ch_type asc";
$sod = "";
}
$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 = 50;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
// 승인대기
$sql = " select count(*) as cnt {$sql_common} where ch_state = '대기' {$sql_order} ";
$row = sql_fetch($sql);
$leave_count = $row['cnt'];
// 수정중
$sql = " select count(*) as cnt {$sql_common} where ch_state = '수정중' {$sql_order} ";
$row = sql_fetch($sql);
$modify_count = $row['cnt'];
// 삭제
$sql = " select count(*) as cnt {$sql_common} where ch_state = '삭제' {$sql_order} ";
$row = sql_fetch($sql);
$del_count = $row['cnt'];
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" 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 = 8;
/** 세력 정보 **/
$ch_si = array();
if($config['cf_side_title']) {
$side_result = sql_query("select si_id, si_name from {$g5['side_table']} where si_auth <= '{$member['mb_level']}' order by si_id asc");
for($i=0; $row = sql_fetch_array($side_result); $i++) {
$ch_si[$i]['name'] = $row['si_name'];
$ch_si[$i]['id'] = $row['si_id'];
}
}
/** 종족 정보 **/
$ch_cl = array();
if($config['cf_class_title']) {
$class_result = sql_query("select cl_id, cl_name from {$g5['class_table']} where cl_auth <= '{$member['mb_level']}' order by cl_id asc");
for($i=0; $row = sql_fetch_array($class_result); $i++) {
$ch_cl[$i]['name'] = $row['cl_name'];
$ch_cl[$i]['id'] = $row['cl_id'];
}
}
$profile = sql_fetch(" select ad_use_rank from {$g5['article_default_table']} ");
if($profile['ad_use_rank']) {
$colspan++;
}
?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
총캐릭터수 <?php echo number_format($total_count) ?>
<span style="float: right;">
<a href="?sfl=ch_state&amp;stx=대기">승인대기 <?php echo number_format($leave_count) ?></a>명 |
<a href="?sfl=ch_state&amp;stx=수정중">수정중 <?php echo number_format($modify_count) ?></a>명 |
<a href="?sfl=ch_state&amp;stx=삭제">삭제 <?php echo number_format($del_count) ?></a>명
</span>
</div>
<form id="fsearch" name="fsearch" class="local_sch01 local_sch" method="get">
<label for="sfl" class="sound_only">검색대상</label>
<?
if(count($ch_si) > 0) {
?>
<select name="s_side" id="c_side">
<option value=""><?=$config['cf_side_title']?>선택</option>
<? for($i=0; $i < count($ch_si); $i++) { ?>
<option value="<?=$ch_si[$i]['id']?>" <?php echo get_selected($_GET['s_side'], $ch_si[$i]['id']); ?>><?=$ch_si[$i]['name']?></option>
<? } ?>
</select>
<? } ?>
<?
if(count($ch_cl) > 0) {
?>
<select name="s_class" id="c_class">
<option value=""><?=$config['cf_class_title']?>선택</option>
<? for($i=0; $i < count($ch_cl); $i++) { ?>
<option value="<?=$ch_cl[$i]['id']?>" <?php echo get_selected($_GET['s_class'], $ch_cl[$i]['id']); ?>><?=$ch_cl[$i]['name']?></option>
<? } ?>
</select>
<? } ?>
<select name="sfl" id="sfl">
<option value="ch_name"<?php echo get_selected($_GET['sfl'], "ch_name"); ?>>캐릭터 이름</option>
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>오너 아이디</option>
<option value="ch_state"<?php echo get_selected($_GET['sfl'], "ch_state"); ?>>승인현황</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" class="frm_input">
<input type="submit" class="btn_submit" value="검색">
</form>
<?php if ($is_admin == 'super') { ?>
<div class="btn_add01 btn_add">
<a href="./character_form.php" id="member_add">캐릭터추가</a>
</div>
<?php } ?>
<form name="fmemberlist" id="fmemberlist" action="./character_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 ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 100px;" />
<col />
<? if($profile['ad_use_rank']) { ?>
<col style="width: 120px;" />
<? } ?>
<? if($config['cf_side_title']) { ?>
<col style="width: 120px;" />
<? } ?>
<? if($config['cf_class_title']) { ?>
<col style="width: 120px;" />
<? } ?>
<col style="width: 80px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr>
<th>
<label for="chkall" class="sound_only">캐릭터 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th>유형</th>
<th>이름</th>
<? if($profile['ad_use_rank']) { ?>
<th>랭킹</th>
<? } ?>
<? if($config['cf_side_title']) { ?>
<th><?=$config['cf_side_title']?></th>
<? } ?>
<? if($config['cf_class_title']) { ?>
<th><?=$config['cf_class_title']?></th>
<? } ?>
<th>상태</th>
<th>관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$ch_id = $row['ch_id'];
$bg = 'bg'.($i%2);
$s_mod = '<a href="./character_form.php?'.$qstr.'&amp;w=u&amp;ch_id='.$row['ch_id'].'">수정</a>';
$s_del = '<a href="javascript:post_delete(\'character_delete.php\', \''.$row['ch_id'].'\');">제거</a>';
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="ch_id[<?php echo $i ?>]" value="<?php echo $row['ch_id'] ?>" id="ch_id_<?php echo $i ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['ch_name']); ?>님</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<select name="ch_type[<?=$i?>]" class="frm_input">
<option value="">유형선택</option>
<option value="main" <?=$row['ch_type'] == "main" ? "selected" : "" ?>>MAIN</option>
<option value="sub" <?=$row['ch_type'] == "sub" ? "selected" : "" ?>>SUB</option>
<option value="npc" <?=$row['ch_type'] == "npc" ? "selected" : "" ?>>NPC</option>
</select>
</td>
<td class="txt-left"><?php echo get_text($row['ch_name']); ?></td>
<? if($profile['ad_use_rank']) { ?>
<td>
<?=get_rank_name($row['ch_rank'])?>
</td>
<? } ?>
<? if($config['cf_side_title']) { ?>
<td>
<select name="ch_side[<?=$i?>]" class="frm_input">
<option value=""><?=$config['cf_side_title']?>선택</option>
<? for($k=0; $k < count($ch_si); $k++) { ?>
<option value="<?=$ch_si[$k]['id']?>" <?php echo get_selected($row['ch_side'], $ch_si[$k]['id']); ?>><?=$ch_si[$k]['name']?></option>
<? } ?>
</select>
</td>
<? } ?>
<? if($config['cf_class_title']) { ?>
<td>
<select name="ch_class[<?=$i?>]" class="frm_input">
<option value=""><?=$config['cf_class_title']?>선택</option>
<? for($k=0; $k < count($ch_cl); $k++) { ?>
<option value="<?=$ch_cl[$k]['id']?>" <?php echo get_selected($row['ch_class'], $ch_cl[$k]['id']); ?>><?=$ch_cl[$k]['name']?></option>
<? } ?>
</select>
</td>
<? } ?>
<td>
<select name="ch_state[<?=$i?>]" class="frm_input">
<option value="수정중">수정중</option>
<option value="대기" <?=$row['ch_state'] == "대기" ? "selected" : "" ?>>대기</option>
<option value="승인" <?=$row['ch_state'] == "승인" ? "selected" : "" ?>>승인</option>
<option value="삭제" <?=$row['ch_state'] == "삭제" ? "selected" : "" ?>>삭제</option>
</select>
</td>
<td><?php echo $s_mod ?>&nbsp;&nbsp;<?php echo $s_del ?></td>
</tr>
<?php
}
if ($i == 0)
echo "<tr><td colspan=\"".$colspan."\" class=\"empty_table\">자료가 없습니다.</td></tr>";
?>
</tbody>
</table>
</div>
<div class="local_desc02 local_desc pos-top">
<p>선택삭제 - 상태를 삭제로 변경, 차후 문제 복구가 가능합니다. / 선택제거 - 캐리터 정보 삭제. 복구 불가능. 캐릭터와 관련된 아이템, 포인트 등의 정보 까지 모두 제거 됩니다.</p>
</div>
<div class="btn_list01 btn_list">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택승인" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택제거" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?'.$qstr.'&amp;page='); ?>
<script>
function fmemberlist_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');
?>

View file

@ -0,0 +1,108 @@
<?php
$sub_menu = "400200";
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];
$ch = get_character($_POST['ch_id'][$k]);
if (!$ch['ch_id']) {
$msg .= $ch['ch_id'].' : 캐릭터 자료가 존재하지 않습니다.\\n';
} else {
$sql = " update {$g5['character_table']}
set ch_type = '{$_POST['ch_type'][$k]}',
ch_side = '{$_POST['ch_side'][$k]}',
ch_class = '{$_POST['ch_class'][$k]}',
ch_state = '{$_POST['ch_state'][$k]}'
where ch_id = '{$_POST['ch_id'][$k]}' ";
sql_query($sql);
}
}
} else if($_POST['act_button'] == "선택승인") {
for ($i=0; $i<count($_POST['chk']); $i++)
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ch = get_character($_POST['ch_id'][$k]);
if (!$ch['ch_id']) {
$msg .= $ch['ch_id'].' : 캐릭터 자료가 존재하지 않습니다.\\n';
} else {
$sql = " update {$g5['character_table']}
set ch_state = '승인'
where ch_id = '{$_POST['ch_id'][$k]}' ";
sql_query($sql);
}
}
} else if($_POST['act_button'] == "선택삭제") {
for ($i=0; $i<count($_POST['chk']); $i++)
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ch = get_character($_POST['ch_id'][$k]);
if (!$ch['ch_id']) {
$msg .= $ch['ch_id'].' : 캐릭터 자료가 존재하지 않습니다.\\n';
} else {
$sql = " update {$g5['character_table']}
set ch_state = '삭제'
where ch_id = '{$_POST['ch_id'][$k]}' ";
sql_query($sql);
$sql = " update {$g5['member_table']}
set ch_id = ''
where mb_id = '{$ch['mb_id']}' and ch_id = '{$ch['ch_id']}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택제거") {
for ($i=0; $i<count($_POST['chk']); $i++)
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ch = get_character($_POST['ch_id'][$k]);
if (!$ch['ch_id']) {
$msg .= "{$ch['ch_id']} : 캐릭터 자료가 존재하지 않습니다.\\n";
} else {
sql_query(" delete from {$g5['character_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['value_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['exp_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['title_has_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['closthes_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['inventory_table']} where ch_id = '{$ch['ch_id']}' ");
$sql = " update {$g5['member_table']}
set ch_id = ''
where mb_id = '{$ch['mb_id']}' and ch_id = '{$ch['ch_id']}' ";
sql_query($sql);
}
}
}
if ($msg)
alert($msg);
goto_url('./character_list.php');
?>

View file

@ -0,0 +1,214 @@
<?php
$sub_menu = "400700";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['class_table']} ";
$sql_search = " where (1) ";
if (!$sst) {
$sst = "cl_id";
$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);
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
$g5['title'] = $config['cf_class_title'].' 관리';
include_once ('./admin.head.php');
$colspan = 7;
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">'.$config['cf_class_title'].' 목록</a></li>
<li><a href="#anc_002">'.$config['cf_class_title'].' 등록</a></li>
</ul>';
?>
<section id="anc_001">
<h2 class="h2_frm"><?=$config['cf_class_title']?> 목록</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
</div>
<form name="fclasslist" id="fclasslist" method="post" action="./class_list_delete.php" onsubmit="return fclasslist_submit(this);" enctype="multipart/form-data">
<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>
<colgroup>
<col style="width: 50px;" />
<col style="width: 50px;" />
<col style="width: 120px;"/>
<col style="width: 120px;"/>
<col />
<col style="width: 100px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only"><?=$config['cf_class_title']?> 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">IDX</th>
<th scope="col" colspan="2">이미지</th>
<th scope="col"><?=$config['cf_class_title']?>명</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);
?>
<tr class="<?php echo $bg; ?>">
<td style="text-align: center">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<input type="text" name="cl_id[<?php echo $i ?>]" value="<?php echo $row['cl_id'] ?>" id="cl_id_<?php echo $i ?>" readonly style="width: 30px;">
</td>
<td style="text-align: center">
<?php if($row['cl_img']) { ?>
<img src='<?=$row['cl_img']?>' alt='<?=$row['cl_name']?>' style="max-width: 40px;">
<input type="hidden" name="old_cl_img[<?=$i?>]" value="<?=$row['cl_img']?>" />
<? } ?>
</td>
<td>
<input type="file" name="cl_img[<?=$i?>]" id="cl_img<?=$i?>" />
</td>
<td>
<input type="text" name="cl_name[<?php echo $i ?>]" value="<?php echo $row['cl_name'] ?>" class="frm_input" style="width: 98%;">
</td>
<td>
<?php echo get_member_level_select("cl_auth[$i]", 2, $member['mb_level'], $row['cl_auth']) ?>
</td>
<td>
<a href="<?=G5_URL?>/member/index.php?class=<?=$row['cl_id']?>" target="_blank">
멤버목록보기
</a>
</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="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
<section id="anc_002">
<h2 class="h2_frm"><?=$config['cf_class_title']?>정보 등록</h2>
<?php echo $pg_anchor ?>
<form name="fclassform" method="post" id="fclassform" action="./class_update.php" autocomplete="off" enctype="multipart/form-data">
<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="<?php echo $token ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="cl_name"><?=$config['cf_class_title']?>명<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="cl_name" id="cl_name" class="required frm_input" required></td>
</tr>
<tr>
<th scope="row"><label for="cl_img">이미지<strong class="sound_only">필수</strong></label></th>
<td><input type="file" name="cl_img" id="cl_img"></td>
</tr>
<tr>
<th scope="row"><label for="cl_auth">선택권한</label></th>
<td><?php echo get_member_level_select('cl_auth', 2, $member['mb_level'], $mb['mb_level']) ?></td>
</tr>
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
</section>
<script>
function fclasslist_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');
?>

View file

@ -0,0 +1,88 @@
<?php
$sub_menu = '400700';
include_once('./_common.php');
check_demo();
if (!count($_POST['chk'])) {
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
}
auth_check($auth[$sub_menu], 'w');
$class_path = G5_DATA_PATH."/class";
$class_url = G5_DATA_URL."/class";
@mkdir($class_path, G5_DIR_PERMISSION);
@chmod($class_path, G5_DIR_PERMISSION);
if ($_POST['act_button'] == "선택수정") {
for ($i=0; $i<count($_POST['chk']); $i++)
{
$sql_common = "";
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$si = sql_fetch("select * from {$g5['class_table']} where cl_id = '{$_POST['cl_id'][$k]}'");
if (!$si['cl_id']) {
$msg .= $si['cl_id'].' : 기존 자료가 존재하지 않습니다.\\n';
} else {
if ($img = $_FILES['cl_img']['name'][$k]) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("관련 이미지가 gif, jpg, png 파일이 아닙니다.");
} else {
// 기존 데이터 삭제
$prev_file_path = str_replace(G5_URL, G5_PATH, $si['cl_img'][$k]);
@unlink($prev_file_path);
// 확장자 따기
$exp = explode(".", $_FILES['cl_img']['name'][$k]);
$exp = $exp[count($exp)-1];
$image_name = "class_".time().".".$exp;
upload_file($_FILES['cl_img']['tmp_name'][$k], $image_name, $class_path);
$image_url = $class_url."/".$image_name;
$sql_common .= " , cl_img = '{$image_url}' ";
}
}
$sql = " update {$g5['class_table']}
set cl_name = '{$_POST['cl_name'][$k]}',
cl_auth = '{$_POST['cl_auth'][$k]}'
{$sql_common}
";
$sql .= " where cl_id = '{$_POST['cl_id'][$k]}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택삭제") {
$count = count($_POST['chk']);
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
// 소속 내역삭제
$sql = " delete from {$g5['class_table']} where cl_id = '{$_POST['cl_id'][$k]}' ";
sql_query($sql);
// 소속 아이콘 이미지 삭제
if($_POST['old_cl_img'][$k]) {
// 기존 데이터 삭제
$prev_file_path = str_replace(G5_URL, G5_PATH, $_POST['old_cl_img'][$k]);
@unlink($prev_file_path);
}
}
}
if ($msg)
alert($msg);
goto_url('./class_list.php?'.$qstr);
?>

View file

@ -0,0 +1,44 @@
<?php
$sub_menu = "400700";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
check_token();
$class_path = G5_DATA_PATH."/class";
$class_url = G5_DATA_URL."/class";
@mkdir($class_path, G5_DIR_PERMISSION);
@chmod($class_path, G5_DIR_PERMISSION);
/** 소속 아이콘 등록 **/
$sql_common = "";
if ($img = $_FILES['cl_img']['name']) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("타이틀 이미지가 gif, jpg, png 파일이 아닙니다.");
} else {
// 확장자 따기
$exp = explode(".", $_FILES['cl_img']['name']);
$exp = $exp[count($exp)-1];
$image_name = "class_".time().".".$exp;
upload_file($_FILES['cl_img']['tmp_name'], $image_name, $class_path);
$image_url = $class_url."/".$image_name;
$sql_common .= " , cl_img = '{$image_url}' ";
}
}
$sql = " insert into {$g5['class_table']}
set cl_name = '{$_POST['cl_name']}',
cl_auth = '{$_POST['cl_auth']}'
{$sql_common}
";
sql_query($sql);
goto_url('./class_list.php?'.$qstr);
?>

View file

@ -0,0 +1,272 @@
<?php
$sub_menu = "100200";
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');
$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>
</ul>';
$frm_submit = '<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
?>
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);" enctype="multipart/form-data">
<input type="hidden" name="token" value="" id="token">
<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>
</colgroup>
<tbody>
<tr>
<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>
&nbsp;&nbsp;
<input type="checkbox" name="cf_1" value="1" id="cf_1" <?php echo $config['cf_1']?'checked':''; ?>>
<label for="cf_1">계정생성 가능</label>
&nbsp;&nbsp;
<input type="checkbox" name="cf_2" value="1" id="cf_2" <?php echo $config['cf_2']?'checked':''; ?>>
<label for="cf_2">캐릭터생성 가능</label>
&nbsp;&nbsp;
<input type="checkbox" name="cf_3" value="1" id="cf_3" <?php echo $config['cf_3']?'checked':''; ?>>
<label for="cf_3">캐릭터수정 가능</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>
</tr>
<tr>
<th>사이트설명</th>
<td>
<input type="text" name="cf_site_descript" value="<?php echo $config['cf_site_descript'] ?>" size="50" />
</td>
</tr>
<tr>
<th rowspan="2">파비콘</th>
<td>
<?php echo help('파비콘 확장자는 ico 로 등록해 주셔야 적용됩니다.') ?>
직접등록&nbsp;&nbsp; <input type="file" name="cf_favicon_file" value="" size="50">
</td></tr><tr>
<td>
외부경로&nbsp;&nbsp; <input type="text" name="cf_favicon" value="<?=$config['cf_favicon']?>" size="50"/>
</td>
</tr>
<tr>
<th rowspan="2">사이트이미지</th>
<td>
<?php echo help('사이트 링크 추가시, SNS에서 미리보기로 뜨는 썸네일 이미지를 등록합니다. 290px * 160px 파일로 업로드해 주시길 바랍니다.') ?>
직접등록&nbsp;&nbsp; <input type="file" name="cf_site_img_file" value="" size="50">
</td></tr><tr>
<td>
외부경로&nbsp;&nbsp; <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>
<?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_twitter">트위터 위젯</label></th>
<td>
<?php echo help('트위터 아이디를 입력해 주세요.') ?>
<input type="text" name="cf_twitter" value="<?php echo $config['cf_twitter'] ?>" id="cf_twitter" size="40" />
</td>
</tr>
<tr>
<th scope="row">기능설정</th>
<td>
<input type="checkbox" name="cf_4" value="1" id="cf_4" <?php echo $config['cf_4']?'checked':''; ?>>
<label for="cf_4">탐색사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="cf_6" value="1" id="cf_6" <?php echo $config['cf_6']?'checked':''; ?>>
<label for="cf_6">탐색 수행 가능</label>
&nbsp;&nbsp;
<input type="checkbox" name="cf_5" value="1" id="cf_5" <?php echo $config['cf_5']?'checked':''; ?>>
<label for="cf_5">조합(레시피)사용</label>
</td>
</tr>
<tr>
<th scope="row">기타설정</th>
<td>
<?php echo help('디자인 관리 사용을 하시면, 기본 디자인 + 관리자 디자인 설정을 사용하실 수 있습니다.') ?>
<?php echo help('직접 디자인 수정을 원하신다면, 디자인 관리 사용하지 않음에 체크 하세요.') ?>
<input type="checkbox" name="cf_7" value="1" id="cf_7" <?php echo $config['cf_7']?'checked':''; ?>>
<label for="cf_7">디자인 관리 사용하지 않음</label>
</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="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 150px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">캐릭터 최대 생성 갯수</th>
<td>
<input type="text" name="cf_character_count" value="<?php echo get_text($config['cf_character_count']) ?>" id="cf_character_count" size="10">
</td>
</tr>
<tr>
<th scope="row">최초 스탯 포인트</th>
<td>
<?php echo help('스탯 사용 설정 시, 캐릭터가 최초로 획득하는 스탯 포인트를 설정합니다.') ?>
<input type="text" name="cf_status_point" value="<?php echo get_text($config['cf_status_point']) ?>" id="cf_status_point" size="10">
</td>
</tr>
<tr>
<th scope="row">하루 탐색 횟수</th>
<td>
<input type="text" name="cf_search_count" value="<?php echo get_text($config['cf_search_count']) ?>" id="cf_search_count" size="10">
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_003">
<h2 class="h2_frm">기타 항목명 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 150px;">
<col style="width: 100px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row" rowspan="2"><?=$config['cf_money']?> 설정</th>
<td>명칭</td>
<td>
<input type="text" name="cf_money" value="<?php echo get_text($config['cf_money']) ?>" id="cf_money" size="30">
</td>
</tr>
<tr>
<td>단위</td>
<td>
<input type="text" name="cf_money_pice" value="<?php echo get_text($config['cf_money_pice']) ?>" id="cf_money_pice" size="30">
</td>
</tr>
<tr>
<th scope="row" rowspan="2"><?=$config['cf_exp_name']?> 설정</th>
<td>명칭</td>
<td>
<input type="text" name="cf_exp_name" value="<?php echo get_text($config['cf_exp_name']) ?>" id="cf_exp_name" size="30">
</td>
</tr>
<tr>
<td>단위</td>
<td>
<input type="text" name="cf_exp_pice" value="<?php echo get_text($config['cf_exp_pice']) ?>" id="cf_exp_pice" size="30">
</td>
</tr>
<tr>
<th scope="row"><?=$config['cf_rank_name']?> 설정</th>
<td>명칭</td>
<td>
<input type="text" name="cf_rank_name" value="<?php echo get_text($config['cf_rank_name']) ?>" id="cf_rank_name" size="30">
</td>
</tr>
<tr>
<th scope="row"><?=$config['cf_side_title']?> (선택A)설정</th>
<td>명칭</td>
<td>
<?php echo help('명칭이 입력되지 않을 시, 프로필에 출력되지 않습니다.') ?>
<input type="text" name="cf_side_title" value="<?php echo get_text($config['cf_side_title']) ?>" id="cf_side_title" size="30">
</td>
</tr>
<tr>
<th scope="row"><?=$config['cf_class_title']?> (선택B)설정</th>
<td>명칭</td>
<td>
<?php echo help('명칭이 입력되지 않을 시, 프로필에 출력되지 않습니다.') ?>
<input type="text" name="cf_class_title" value="<?php echo get_text($config['cf_class_title']) ?>" id="cf_class_title" size="30">
</td>
</tr>
<tr>
<th scope="row">상점 카테고리</th>
<td>-</td>
<td>
<?php echo help('카테고리 구분은 || 를 사용합니다. ex) 일반||프로필수정||기타') ?>
<input type="text" name="cf_shop_category" value="<?php echo get_text($config['cf_shop_category']) ?>" id="cf_shop_category" size="100">
</td>
</tr>
<tr>
<th scope="row">아이템 기능</th>
<td>-</td>
<td>
<?php echo help('기능 구분은 || 를 사용합니다. ex) 일반||프로필수정||아이템추가') ?>
<input type="text" name="cf_item_category" value="<?php echo get_text($config['cf_item_category']) ?>" id="cf_item_category" size="100">
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
</form>
<script>
function fconfigform_submit(f)
{
f.action = "./community_form_update.php";
<?php echo get_editor_js("cf_menu_text"); ?>
<?php echo get_editor_js("cf_mobile_menu_text"); ?>
return true;
}
</script>
<?php
include_once ('./admin.tail.php');
?>

View file

@ -0,0 +1,80 @@
<?php
$sub_menu = "100200";
include_once('./_common.php');
check_demo();
auth_check($auth[$sub_menu], 'w');
if ($is_admin != 'super')
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);
$cf_site_img = $_POST['cf_site_img'];
// 이미지 등록 시, 이미지를 업로드한 뒤 - 해당 이미지 경로를 삽입
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);
$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);
$cf_favicon = $site_style_url."/".$image_name;
}
$sql = " update {$g5['config_table']}
set cf_title = '{$_POST['cf_title']}',
cf_bgm = '{$_POST['cf_bgm']}',
cf_twitter = '{$_POST['cf_twitter']}',
cf_side_title = '{$_POST['cf_side_title']}',
cf_class_title = '{$_POST['cf_class_title']}',
cf_shop_category = '{$_POST['cf_shop_category']}',
cf_item_category = '{$_POST['cf_item_category']}',
cf_open = '{$_POST['cf_open']}',
cf_site_descript = '{$_POST['cf_site_descript']}',
cf_site_img = '{$cf_site_img}',
cf_favicon = '{$cf_favicon}',
cf_character_count = '{$_POST['cf_character_count']}',
cf_search_count = '{$_POST['cf_search_count']}',
cf_money = '{$_POST['cf_money']}',
cf_money_pice = '{$_POST['cf_money_pice']}',
cf_exp_name = '{$_POST['cf_exp_name']}',
cf_exp_pice = '{$_POST['cf_exp_pice']}',
cf_rank_name = '{$_POST['cf_rank_name']}',
cf_status_point = '{$_POST['cf_status_point']}',
cf_1 = '{$_POST['cf_1']}',
cf_2 = '{$_POST['cf_2']}',
cf_3 = '{$_POST['cf_3']}',
cf_4 = '{$_POST['cf_4']}',
cf_5 = '{$_POST['cf_5']}',
cf_6 = '{$_POST['cf_6']}',
cf_7 = '{$_POST['cf_7']}',
cf_8 = '{$_POST['cf_8']}',
cf_9 = '{$_POST['cf_9']}',
cf_10 = '{$_POST['cf_10']}' ";
sql_query($sql);
//sql_query(" OPTIMIZE TABLE `$g5['config_table']` ");
goto_url('./community_form.php', false);
?>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,159 @@
<?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();
// 본인확인을 사용할 경우 아이핀, 휴대폰인증 중 하나는 선택되어야 함
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);
?>

View file

@ -0,0 +1,207 @@
<?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 class="grid_4">
<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; ?>" 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">모바일 내용</th>
<td><?php echo editor_html('co_mobile_content', get_text($co['co_mobile_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">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./contentlist.php">목록</a>
</div>
</form>
<script>
function frmcontentform_check(f)
{
errmsg = "";
errfld = "";
<?php echo get_editor_js('co_content'); ?>
<?php echo chk_editor_js('co_content'); ?>
<?php echo get_editor_js('co_mobile_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');
?>

View 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&amp;co_id=$co_id");
} else {
goto_url("./contentform.php?w=u&amp;co_id=$co_id");
}
}
else
{
goto_url("./contentlist.php");
}
?>

View file

@ -0,0 +1,98 @@
<?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_add01 btn_add">
<a href="./contentform.php">내용 추가</a>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">ID</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);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_id"><?php echo $row['co_id']; ?></td>
<td><?php echo htmlspecialchars2($row['co_subject']); ?></td>
<td class="td_mng">
<a href="./contentform.php?w=u&amp;co_id=<?php echo $row['co_id']; ?>"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>수정</a>
<a href="<?php echo G5_BBS_URL; ?>/content.php?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&amp;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="3" 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&amp;page="); ?>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>

View file

@ -0,0 +1,231 @@
<?php
$sub_menu = "400500";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['couple_table']} ";
$sql_search = " where (1) ";
if (!$sst) {
$sst = "co_order";
$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['PHP_SELF'].'" class="ov_listall">전체목록</a>';
$mb = array();
$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>
</ul>';
$colspan = 5;
?>
<form name="fpointlist" id="fpointlist" method="post" action="./couple_list_delete.php" onsubmit="return fpointlist_submit(this);">
<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 ?>">
<section id="anc_001">
<h2 class="h2_frm">커플 목록</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?> 커플
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 120px;" />
<col style="width: 120px;" />
<col />
<col style="width: 50px;" />
</colgroup>
<thead>
<tr>
<th>
<label for="chkall" class="sound_only">커플 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th>왼쪽</th>
<th>오른족</th>
<th><?php echo subject_sort_link('co_date') ?>사귄날짜</a></th>
<th><?php echo subject_sort_link('co_order') ?>순서</a></th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$ch_left = sql_fetch("select ch_thumb, ch_name, ch_id from {$g5['character_table']} where ch_id = '{$row['co_left']}'");
$ch_right = sql_fetch("select ch_thumb, ch_name, ch_id from {$g5['character_table']} where ch_id = '{$row['co_right']}'");
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="co_id[<?php echo $i ?>]" value="<?php echo $row['co_id'] ?>" id="co_id_<?php echo $i ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only">tt</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<a href=""><img src="<?=$ch_left['ch_thumb']?>" /></a>
</td>
<td>
<a href=""><img src="<?=$ch_right['ch_thumb']?>" /></a>
</td>
<td>
<?=$row['co_date']?>
</td>
<td>
<?=$row['co_order']?>
</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="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
</form>
<section id="anc_002">
<h2 class="h2_frm">커플 추가</h2>
<?php echo $pg_anchor ?>
<?
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
if (empty($fr_date)) $fr_date = G5_TIME_YMD;
?>
<form name="fpointlist2" method="post" id="fpointlist2" action="./couple_update.php" autocomplete="off">
<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="<?php echo $token ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="ch_name_left">왼쪽 캐릭터<strong class="sound_only">필수</strong></label></th>
<td>
<input type="hidden" name="co_left" id="co_left" value="<?php echo $co_left ?>" />
<input type="text" name="ch_name_left" value="" id="ch_name_left" onkeyup="get_ajax_character(this, 'character_left_list', 'co_left');" />
<div id="character_left_list" class="ajax-list-box"><div class="list"></div></div>
</td>
</tr>
<tr>
<th scope="row"><label for="ch_name_right">오른쪽 캐릭터<strong class="sound_only">필수</strong></label></th>
<td>
<input type="hidden" name="co_right" id="co_right" value="<?php echo $co_right ?>" />
<input type="text" name="ch_name_right" value="" id="ch_name_right" onkeyup="get_ajax_character(this, 'character_right_list', 'co_right');" />
<div id="character_right_list" class="ajax-list-box"><div class="list"></div></div>
</td>
</tr>
<tr>
<th scope="row"><label for="co_order">순서<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="co_order" id="co_order" required class="required" style="width: 50px;"></td>
</tr>
<tr>
<th scope="row"><label for="co_date">시작일</label></th>
<td><input type="text" name="co_date" value="<?php echo $co_date; ?>" id="co_date"></td>
</tr>
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
</section>
<script>
$(function(){
$("#co_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
});
</script>
<script>
function fpointlist_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');
?>

View file

@ -0,0 +1,26 @@
<?php
$sub_menu = '400500';
include_once('./_common.php');
check_demo();
auth_check($auth[$sub_menu], 'd');
check_token();
$count = count($_POST['chk']);
if(!$count)
alert($_POST['act_button'].' 하실 항목을 하나 이상 체크하세요.');
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
// 포인트 내역삭제
$sql = " delete from {$g5['couple_table']} where co_id = '{$_POST['co_id'][$k]}' ";
sql_query($sql);
}
goto_url('./couple_list.php?'.$qstr);
?>

View file

@ -0,0 +1,31 @@
<?php
$sub_menu = "400500";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
check_token();
if(!$co_left && $ch_name_left) {
$ch = sql_fetch("select ch_id, ch_name, ch_exp from {$g5['character_table']} where ch_name = '{$ch_name_left}'");
$co_left = $ch['ch_id'];
if(!$co_left) alert("존재하지 않는 캐릭터 입니다.");
}
if(!$co_right && $ch_name_right) {
$ch = sql_fetch("select ch_id, ch_name, ch_exp from {$g5['character_table']} where ch_name = '{$ch_name_right}'");
$co_right = $ch['ch_id'];
if(!$co_right) alert("존재하지 않는 캐릭터 입니다.");
}
$sql_common = " co_left = '{$_POST['co_left']}',
co_right = '{$_POST['co_right']}',
co_order = '{$_POST['co_order']}',
co_date = '{$_POST['co_date']}' ";
$sql = " insert into {$g5['couple_table']}
set $sql_common ";
sql_query($sql);
goto_url('./couple_list.php?'.$qstr);
?>

View file

@ -0,0 +1,426 @@
@charset "utf-8";
@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;}
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; }
input[type="text"],
input[type="password"],
select,
textarea {
border: 1px solid #dde3e0;
box-sizing: border-box;
font-family: 'Dotum';
font-size: 12px;
}
input[type="text"],
input[type="password"] { padding: 0 8px; }
input[type="text"],
input[type="password"],
select { height: 28px; padding-left: 8px; }
textarea { width: 100%; height: 150px; }
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;
}
.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;
}
.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: #29c7c9;
}
.ov_listall:before {
content: "";
display: block;
position: absolute;
right: 0;
top: 3px;
bottom: 3px;
width: 1px;
background: #e1e1e1;
}
.local_desc {
background: #f9f9f9;
padding: 5px 10px;
border: 1px solid #efeff1;
color: #5b5b5a;
margin-bottom: 10px;
line-height: 1.8em;
}
.local_desc .point {
color: #29c7c9;
}
.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: #29c7c9; 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; }
.btn_list a,
.btn_list button,
.btn_list input {
display: inline-block;
background: #29c7c9;
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: #29c7c9;
color: #fff;
font-size: 13px;
font-weight: 400;
text-decoration: none;
border: none;
line-height: 1.0em;
cursor: pointer;
}
.btn_confirm {
text-align: center;
padding: 50px 0;
}
section + .btn_confirm { padding-top: 0; }
.btn_confirm a,
.btn_confirm input[type="submit"],
.btn_confirm input[type="button"]{
display: inline-block;
vertical-align: middle;
box-sizing: border-box;
margin: 2px;
font-size: 13px;
line-height: 1.0em;
padding: 10px 25px;
border: none;
background: #f2f4f3;
color: #494c55;
cursor: pointer;
text-decoration: none;
}
.btn_confirm .btn_submit { background: #29c7c9 !important; color: #fff !important; }
.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: #e66149;
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;}
.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;
}
.tbl_head01 tbody td:first-child { border-left-width: 1px; }
.tbl_head01 tbody td a { color: #29c7ca; }
.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: #29c7c9; }
.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:#29c7c9}
/*테마*/
.theme_p{margin:0 0 10px }
#theme_list{padding:0;margin:0;list-style:none; width: 1000px;position:relative}
#theme_list:after{display:block;visibility:hidden;clear:both;content:""}
#theme_list li{margin:10px 10px 10px 0;float:left}
#theme_list li:after{display:block;visibility:hidden;clear:both;content:""}
#theme_list li .tmli_if{border: 1px solid #d1dee2;width:302px;}
#theme_list li .tmli_if>img{width:300px;height:225px;}
#theme_list li .tmli_if:hover>img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";filter: alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5;opacity: 0.5;}
#theme_list li .tmli_tit{position:relative; border-top: 1px solid #d1dee2; background: #e5ecef;}
#theme_list li .tmli_tit p{height:40px;line-height:40px;padding:0 10px 0;font-weight:bold;text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
#theme_list li .tmli_tit button.tmli_dt{position:absolute;top:8px;right:10px;padding:5px;background:#111;color:#fff;display:none;border:none}
#theme_list li .tmli_if:hover button.tmli_dt{display:block}
#theme_list li .theme_sl{float:left;border:none;margin-top:5px;padding:0 5px;height:26px;background:#999;color:#fff}
#theme_list li .theme_sl:hover{background:#ff3061}
#theme_list li .theme_deactive{margin-left:4px}
#theme_list li .theme_sl_use{background:#ff3061;line-height:26px}
#theme_list li .theme_pr{float:right;margin-top:5px;padding:0 5px;height:26px;line-height:24px; border: 1px solid #ccc; background: #fafafa; }
#theme_list li .theme_preview{ float: right; margin-top: 5px; padding:0 5px;height:26px; border: 1px solid #ccc; background: #fafafa; margin-right:3px}
#theme_detail{position:fixed;top:50%;height:540px;width:900px;margin-top:-271px;background:#fff;background:#f3f3f3;border:1px solid #000;
-webkit-box-shadow: 1px 2px 5px rgba(150,150,150,100.5);
-moz-box-shadow: 1px 2px 5px rgba(150,150,150,0.5);
box-shadow: 1px 2px 5px rgba(150,150,150,0.5);z-index:1000}
#theme_detail:after{display:block;visibility:hidden;clear:both;content:""}
#theme_detail h2{font-size:1.25em;background:#fff;padding:0 15px;line-height:40px;border-bottom:1px solid #d8d8d8;margin:0}
.theme_dt_img{float:left;padding:20px}
.theme_dt_img img{border:1px solid #aaa;}
.theme_dt_if{float:left;width:235px;padding:20px 0}
.theme_dt_if table{width:100%;border-collapse:collapse;margin:15px 0 0 ;font-size:0.92em}
.theme_dt_if table th{padding:5px;background:#fff;border-bottom:1px solid #f3f3f3;vertical-align:top;color:#3f51b5}
.theme_dt_if table td{padding:5px;background:#fff;border-bottom:1px solid #f3f3f3;line-height:1.56em}
.theme_dt_if table td a{text-decoration:underline}
.theme_dt_if p{line-height:1.5em}
.if_p_bg{display:inline-block;width:20px;height:1px ;background:#000;margin:30px 0 10px}
#theme_detail .theme_dt_btn{position:absolute;top:0px;right:0px;background:#fff;}
#theme_detail .theme_dt_btn .close_btn{border:0;border-left:1px solid #d8d8d8;background:url('../img/close.png') 50% 50% no-repeat;width:40px;height:40px;overflow:hidden;text-indent:-99999px}
#theme_detail .theme_dt_btn .close_btn:hover{background-color:#eceffc}
#theme_detail .theme_dt_btn .btn_03{line-height:28px;display:inline-block;vertical-align:top;margin-top:6px;padding:0 6px;border-radius:5px}

View file

@ -0,0 +1,280 @@
@charset "utf-8";
html,
body { height: 100%; }
#wrap {
display: table;
width: 100%;
min-height: 100%;
}
#header {
display: table-cell;
position: relative;
width: 200px;
min-height: 100%;
background: #1d1d1f;
vertical-align: top;
}
#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: #29c7ca;
border-right: 1px solid #0aa0a5;
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: #1e878a;
z-index: 1;
}
#admin_prof p {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 30px;
margin: 0;
background: #2bacb0;
}
#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: #d6eff1;
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: #d6eff1;
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: relative;
height: 71px;
box-sizing: border-box;
border-bottom: 1px solid #131a24;
background: #1d1d1f;
}
#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"; }
#wrapper {
display: table-cell;
position: relative;
vertical-align: top;
min-height: 100%;
}
#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: "\e994"; }
#gnb .gnb_2dli > a[data-text="팝업레이어관리"]:before { content: "\e925"; }
#gnb .gnb_2dli > a[data-text="세션파일 일괄삭제"]:before { content: "\e94d"; }
#gnb .gnb_2dli > a[data-text="캐시파일 일괄삭제"]:before { content: "\e94d"; }
#gnb .gnb_2dli > a[data-text="썸네일파일 일괄삭제"]:before { content: "\e90e"; }
#gnb .gnb_2dli > a[data-text="커뮤니티 설정"]:before { content: "\e96f"; }
#gnb .gnb_2dli > a[data-text="화면 설정"]:before { content: "\e956"; }
#gnb .gnb_2dli > a[data-text="디자인 설정"]:before { content: "\e90c"; }
#gnb .gnb_2dli > a[data-text="메인슬라이드 관리"]:before { content: "\e913"; }
#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: "\e926"; }
#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"; }
#gnb .gnb_2dli > a[data-text="프로필 양식 관리"]:before { content: "\ea72"; }
#gnb .gnb_2dli > a[data-text="캐릭터 관리"]:before { content: "\e9b2"; }
#gnb .gnb_2dli > a[data-text="타이틀 관리"]:before { content: "\e935"; }
#gnb .gnb_2dli > a[data-text="보유타이틀 관리"]:before { content: "\e936"; }
#gnb .gnb_2dli > a[data-text="레벨설정 관리"]:before { content: "\ea4f"; }
#gnb .gnb_2dli > a[data-text="경험치 관리"]:before { content: "\e993"; }
#gnb .gnb_2dli > a[data-text="커플 관리"]:before { content: "\e9da"; }
#gnb .gnb_2dli > a[data-text="스탯 관리"]:before { content: "\e99d"; }
#gnb .gnb_2dli > a[data-text="상점관리"]:before { content: "\e93a"; }
#gnb .gnb_2dli > a[data-text="아이템관리"]:before { content: "\e99f"; }
#gnb .gnb_2dli > a[data-text="아이템 보유현황"]:before { content: "\e9ae"; }
#gnb .gnb_2dli > a[data-text="아이템 구매기록"]:before { content: "\e9ba"; }
#gnb .gnb_2dli > a[data-text="레시피 관리"]:before { content: "\e996"; }
#gnb .gnb_2dli > a[data-text="소지금관리"]:before { content: "\e93f"; }
#container { padding: 25px; }
#fsearch input { margin: 0; }
#fsearch .btn_submit {
border: none;
background: #29c7c9;
color: #fff;
font-size: 13px;
width: 50px;
height: 28px;
cursor: pointer;
line-height: 1.0em;
}

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

View file

@ -0,0 +1,275 @@
<?php
$sub_menu = "900400";
include_once("./_common.php");
if ($is_admin != "super")
alert("최고관리자만 접근 가능합니다.", G5_URL);
$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_003">스탯설정</a></li>
<li><a href="#anc_004">경험치/포인트</a></li>
</ul>';
function get_bakup_list($cate) {
global $g5;
$backup_list = '';
$result = sql_query("select * from {$g5['backup_table']} where ba_cate = '{$cate}'");
for($i=0; $bak = sql_fetch_array($result); $i++) {
if($i == 0) { $border = ""; } else {
$border = "border-top: 1px dashed #e1e1e1;";
}
$backup_list .= "<p style='line-height: 3.0em; {$border}'>
백업 - ".$bak['ba_title']."&nbsp;&nbsp;
<a href='./data_backup_delete.php?ba_id=".$bak['ba_id']."' style='color: #29c7ca;'>삭제</a>
</p>";
}
return $backup_list;
}
$frm_submit = '<div class="btn_confirm01 btn_confirm">
<input type="submit" value="전체 백업" class="btn_submit" accesskey="s">
</div>';
?>
<div class="local_desc02 local_desc">
<p>
현재 사이트에 적용된 DB 데이터를 백업 합니다.<br />
이미지 파일은 백업 되지 않습니다. 이미지는 따로 백업 받아 주세요.
</p>
</div>
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);" enctype="multipart/form-data">
<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: 130px;">
<col style="width: 130px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[0]" value="css_config" />
디자인 설정
</th>
<td class="bo-right bo-left txt-center btn_confirm">
<a href="./data_backup_update.php?category=css_config" class="btn_submit">개별 백업</a>
</td>
<td>
<?=get_bakup_list('css_config')?>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[1]" value="content" />
메인/메뉴 화면
</th>
<td class="bo-right bo-left txt-center btn_confirm">
<a href="./data_backup_update.php?category=content" class="btn_submit">개별 백업</a>
</td>
<td>
<?=get_bakup_list('content')?>
</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="tbl_frm01 tbl_wrap">
<table>
<caption></caption>
<colgroup>
<col style="width: 130px;">
<col style="width: 130px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[2]" value="character" />
캐릭터 기본 정보
</th>
<td class="bo-right bo-left txt-center btn_confirm">
<a href="./data_backup_update.php?category=character" class="btn_submit">개별 백업</a>
</td>
<td>
<?=get_bakup_list('character')?>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[3]" value="article_value" />
추가 정보
</th>
<td class="bo-right bo-left txt-center btn_confirm">
<a href="./data_backup_update.php?category=article_value" class="btn_submit">개별 백업</a>
</td>
<td>
<?=get_bakup_list('article_value')?>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[4]" value="character_closthes" />
옷장 정보
</th>
<td class="bo-right bo-left txt-center btn_confirm">
<a href="./data_backup_update.php?category=character_closthes" class="btn_submit">개별 백업</a>
</td>
<td>
<?=get_bakup_list('character_closthes')?>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[5]" value="has_title" />
타이틀 정보
</th>
<td class="bo-right bo-left txt-center btn_confirm">
<a href="./data_backup_update.php?category=has_title" class="btn_submit">개별 백업</a>
</td>
<td>
<?=get_bakup_list('has_title')?>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<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: 130px;">
<col style="width: 130px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[6]" value="status" />
스탯 설정
</th>
<td class="bo-right bo-left txt-center btn_confirm">
<a href="./data_backup_update.php?category=status" class="btn_submit">개별 백업</a>
</td>
<td>
<?=get_bakup_list('status')?>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[7]" value="status_character" />
캐릭터 스탯 정보
</th>
<td class="bo-right bo-left txt-center btn_confirm">
<a href="./data_backup_update.php?category=status_character" class="btn_submit">개별 백업</a>
</td>
<td>
<?=get_bakup_list('status_character')?>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<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: 130px;">
<col style="width: 130px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[8]" value="exp" />
경험치 내역
</th>
<td class="bo-right bo-left txt-center btn_confirm">
<a href="./data_backup_update.php?category=exp" class="btn_submit">개별 백업</a>
</td>
<td>
<?=get_bakup_list('exp')?>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[9]" value="point" />
포인트(화폐) 내역
</th>
<td class="bo-right bo-left txt-center btn_confirm">
<a href="./data_backup_update.php?category=point" class="btn_submit">개별 백업</a>
</td>
<td>
<?=get_bakup_list('point')?>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
</form>
<script>
function fconfigform_submit(f)
{
f.action = "./data_backup_update.php";
return true;
}
</script>
<?php
include_once("./admin.tail.php");
?>

View file

@ -0,0 +1,11 @@
<?php
$sub_menu = "900400";
include_once("./_common.php");
$back = sql_fetch("select * from {$g5['backup_table']} where ba_id = '{$ba_id}'");
$file_path = $back['ba_path'];
@unlink($file_path);
sql_query(" delete from {$g5['backup_table']} where ba_id = '{$ba_id}'");
goto_url('./data_backup.php');
?>

View file

@ -0,0 +1,95 @@
<?php
$sub_menu = "900400";
include_once("./_common.php");
function backup_tables($host,$user,$pass,$name,$tables = '*', $is_viewer = false) {
$link = mysql_connect($host,$user,$pass);
mysql_select_db($name,$link);
//get all of the tables
if($tables == '*') {
$tables = array();
$result = mysql_query('SHOW TABLES');
while($row = mysql_fetch_row($result)) {
$tables[] = $row[0];
}
} else {
$tables = is_array($tables) ? $tables : explode(',',$tables);
}
foreach($tables as $table) {
$result = mysql_query('SELECT * FROM '.$table);
$num_fields = mysql_num_fields($result);
for ($i = 0; $i < $num_fields; $i++)
{
while($row = mysql_fetch_row($result)) {
if($is_viewer && $row[0] != 'site_menu' && $row[0] != 'site_main') {
continue;
}
$return.= 'INSERT INTO '.$table.' VALUES(';
for($j=0; $j<$num_fields; $j++) {
$row[$j] = addslashes($row[$j]);
$row[$j] = ereg_replace("\n","\\n",$row[$j]);
if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; }
if ($j<($num_fields-1)) { $return.= ','; }
}
$return.= ")[[avocado_end]]\n";
}
}
$return.="\n\n\n";
}
$tables_code = str_replace(",", "_", $tables[0]);
$tables_code = str_replace("*", "", $tables_code);
$file_name = G5_ADMIN_PATH.'/backup/'.'data_backup_'.$tables_code.'_'.date('Ymd_His').'.sql';
$handle = fopen($file_name,'w+');
fwrite($handle,$return);
fclose($handle);
return $file_name;
}
if(!$category) {
for($i = 0; $i < count($ba_cate); $i++) {
$category = $ba_cate[$i];
$is_viewer = false;
if($category == 'content') { $is_viewer = true; }
$file_name = backup_tables(G5_MYSQL_HOST,G5_MYSQL_USER,G5_MYSQL_PASSWORD,G5_MYSQL_DB, G5_TABLE_PREFIX.$category, $is_viewer);
$filepath = $file_name;
$sql_common = " ba_cate = '{$category}',
ba_title = '".date('Ymd_His', strtotime(G5_TIME_YMDHIS))."',
ba_path = '{$filepath}' ";
$sql = " insert into {$g5['backup_table']}
set $sql_common ";
sql_query($sql);
}
} else {
$is_viewer = false;
if($category == 'content') { $is_viewer = true; }
$file_name = backup_tables(G5_MYSQL_HOST,G5_MYSQL_USER,G5_MYSQL_PASSWORD,G5_MYSQL_DB, G5_TABLE_PREFIX.$category, $is_viewer);
$filepath = $file_name;
$sql_common = " ba_cate = '{$category}',
ba_title = '".date('Ymd_His', strtotime(G5_TIME_YMDHIS))."',
ba_path = '{$filepath}' ";
$sql = " insert into {$g5['backup_table']}
set $sql_common ";
sql_query($sql);
}
goto_url('./data_backup.php');
?>

View file

@ -0,0 +1,256 @@
<?php
$sub_menu = "900500";
include_once("./_common.php");
if ($is_admin != "super")
alert("최고관리자만 접근 가능합니다.", G5_URL);
$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_003">스탯설정</a></li>
<li><a href="#anc_004">경험치/포인트</a></li>
</ul>';
function get_bakup_list($cate) {
global $g5;
$backup_list = '';
$result = sql_query("select * from {$g5['backup_table']} where ba_cate = '{$cate}' order by ba_id desc");
$backup_list .= "<option value=''>복원 할 시점을 선택해 주세요.</option>";
for($i=0; $bak = sql_fetch_array($result); $i++) {
$backup_list .= "<option value='".$bak['ba_path']."'>복원 - ".$bak['ba_title']."</option>";
}
return $backup_list;
}
$frm_submit = '<div class="btn_confirm01 btn_confirm">
<input type="submit" value="복원하기" class="btn_submit" accesskey="s">
</div>';
?>
<div class="local_desc02 local_desc">
<p>
복원파일을 업로드 하여 디자인 설정을 복원합니다.<br />
이미지 파일은 복원 되지 않습니다. 이미지는 따로 올려주세요.
</p>
</div>
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);" enctype="multipart/form-data">
<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: 130px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[0]" value="css_config" />
디자인 설정
</th>
<td>
<select name="ba_path[0]">
<?=get_bakup_list('css_config')?>
</select>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[1]" value="content" />
메인/메뉴 화면
</th>
<td>
<select name="ba_path[1]">
<?=get_bakup_list('content')?>
</select>
</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="tbl_frm01 tbl_wrap">
<table>
<caption></caption>
<colgroup>
<col style="width: 130px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[2]" value="character" />
캐릭터 기본 정보
</th>
<td>
<select name="ba_path[2]">
<?=get_bakup_list('character')?>
</select>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[3]" value="article_value" />
추가 정보
</th>
<td>
<select name="ba_path[3]">
<?=get_bakup_list('article_value')?>
</select>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[4]" value="character_closthes" />
옷장 정보
</th>
<td>
<select name="ba_path[4]">
<?=get_bakup_list('character_closthes')?>
</select>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[5]" value="has_title" />
타이틀 정보
</th>
<td>
<select name="ba_path[5]">
<?=get_bakup_list('has_title')?>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<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: 130px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[6]" value="status" />
스탯 설정
</th>
<td>
<select name="ba_path[6]">
<?=get_bakup_list('status')?>
</select>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[7]" value="status_character" />
캐릭터 스탯 정보
</th>
<td>
<select name="ba_path[7]">
<?=get_bakup_list('status_character')?>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<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: 130px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[8]" value="exp" />
경험치 내역
</th>
<td>
<select name="ba_path[8]">
<?=get_bakup_list('exp')?>
</select>
</td>
</tr>
<tr>
<th scope="row">
<input type="hidden" name="ba_cate[9]" value="point" />
포인트(화폐) 내역
</th>
<td>
<select name="ba_path[9]">
<?=get_bakup_list('point')?>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
</form>
<script>
function fconfigform_submit(f)
{
f.action = "./data_restore_update.php";
return true;
}
</script>
<?php
include_once("./admin.tail.php");
?>

View file

@ -0,0 +1,35 @@
<?php
$sub_menu = '900500';
include_once('./_common.php');
for($k = 0; $k < count($ba_cate); $k++) {
$cate = $ba_cate[$k];
$file_name = $ba_path[$k];
if($file_name) {
$file = implode('', file($file_name));
eval("\$file = \"$file\";");
$f = explode('[[avocado_end]]', $file);
if(count($f) > 0) {
if($cate == 'content') {
sql_query("delete from {$g5['content_table']} where co_id = 'site_menu' or co_id = 'site_main'");
} else {
sql_query("delete from ".G5_TABLE_PREFIX.$cate);
}
for ($i=0; $i<count($f); $i++) {
if (trim($f[$i]) == '') continue;
sql_query($f[$i], false);
}
}
}
}
goto_url("./data_restore.php");
?>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,777 @@
<?
@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'];
}
$tab_width = 1024;
?>
@charset "utf-8";
/***************************************************************
Design Manager Setting Style: 자동생성 CSS
---------------------------------------------------------------
- 최종 수정일 : <?=date('Y-m-d H:i:s')."\n"?>
***************************************************************/
<?/**************************************************************
폰트 기본 색상 지정
***************************************************************/?>
<? if($css['color_default'][0]) { ?>
body,
.txt-default { color: <?=$css['color_default'][0]?>; }
<? } ?>
<? if($css['color_point'][0]) { ?>
a,
.txt-point { color: <?=$css['color_point'][0]?>; }
<? } ?>
<?/**************************************************************
기본 사이트 배경 설정
-
모바일 기준 : width 1000px
***************************************************************/?>
@media all and (min-width: <?=($tab_width + 1)?>px) {
html.single:before {
<? if($css['background'][0]) { ?>
background-image: url('<?=$css['background'][0]?>');
<? } if($css['background'][1]) { ?>
background-color: <?=$css['background'][1]?>;
<? } if($css['background'][2]) { ?>
background-repeat: <?=$css['background'][2]?>;
<? } if($css['background'][3]) { ?>
background-position: <?=$css['background'][3]?>;
<? } if($css['background'][4]) { ?>
background-size: <?=$css['background'][4]?>;
<? } if($css['background'][5]) { ?>
background-attachment: <?=$css['background'][5]?>;
<? } ?>
}
}
@media all and (max-width: <?=$tab_width?>px) {
html.single:before {
<? if($css['m_background'][0]) { ?>
background-image: url('<?=$css['m_background'][0]?>');
<? } else { ?>
background-image: none;
<? } if($css['m_background'][1]) { ?>
background-color: <?=$css['m_background'][1]?>;
<? } if($css['m_background'][2]) { ?>
background-repeat: <?=$css['m_background'][2]?>;
<? } if($css['m_background'][3]) { ?>
background-position: <?=$css['m_background'][3]?>;
<? } if($css['m_background'][4]) { ?>
background-size: <?=$css['m_background'][4]?>;
<? } if($css['m_background'][5]) { ?>
background-attachment: <?=$css['m_background'][5]?>;
<? } ?>
}
}
<?/**************************************************************
HEADER / GNB STYLE
***************************************************************/?>
@media all and (min-width: <?=($tab_width + 1)?>px) {
#header {
<? if($css['header_background'][0]) { ?>
background-image: url('<?=$css['header_background'][0]?>');
<? } if($css['header_background'][1]) { ?>
background-color: <?=$css['header_background'][1]?>;
<? } if($css['header_background'][2]) { ?>
background-repeat: <?=$css['header_background'][2]?>;
<? } if($css['header_background'][3]) { ?>
background-position: <?=$css['header_background'][3]?>;
<? } if($css['header_background'][4]) { ?>
background-size: <?=$css['header_background'][4]?>;
<? } if($css['header_background'][5]) { ?>
background-attachment: <?=$css['header_background'][5]?>;
<? } ?>
}
#gnb {
<? if($css['menu_background'][0]) { ?>
background-image: url('<?=$css['menu_background'][0]?>');
<? } if($css['menu_background'][1]) { ?>
background-color: <?=$css['menu_background'][1]?>;
<? } if($css['menu_background'][2]) { ?>
background-repeat: <?=$css['menu_background'][2]?>;
<? } if($css['menu_background'][3]) { ?>
background-position: <?=$css['menu_background'][3]?>;
<? } if($css['menu_background'][4]) { ?>
background-size: <?=$css['menu_background'][4]?>;
<? } if($css['menu_background'][5]) { ?>
background-attachment: <?=$css['menu_background'][5]?>;
<? } ?>
}
#gnb_control_box { display: none; }
}
@media all and (max-width: <?=$tab_width?>px) {
#header {
<? if($css['m_header_background'][0]) { ?>
background-image: url('<?=$css['m_header_background'][0]?>');
<? } if($css['m_header_background'][1]) { ?>
background-color: <?=$css['m_header_background'][1]?>;
<? } if($css['m_header_background'][2]) { ?>
background-repeat: <?=$css['m_header_background'][2]?>;
<? } if($css['m_header_background'][3]) { ?>
background-position: <?=$css['m_header_background'][3]?>;
<? } if($css['m_header_background'][4]) { ?>
background-size: <?=$css['m_header_background'][4]?>;
<? } if($css['m_header_background'][5]) { ?>
background-attachment: <?=$css['m_header_background'][5]?>;
<? } ?>
}
#gnb {
<? if($css['m_menu_background'][0]) { ?>
background-image: url('<?=$css['m_menu_background'][0]?>');
<? } if($css['m_menu_background'][1]) { ?>
background-color: <?=$css['m_menu_background'][1]?>;
<? } if($css['m_menu_background'][2]) { ?>
background-repeat: <?=$css['m_menu_background'][2]?>;
<? } if($css['m_menu_background'][3]) { ?>
background-position: <?=$css['m_menu_background'][3]?>;
<? } if($css['m_menu_background'][4]) { ?>
background-size: <?=$css['m_menu_background'][4]?>;
<? } if($css['m_menu_background'][5]) { ?>
background-attachment: <?=$css['m_menu_background'][5]?>;
<? } ?>
}
#gnb_control_box {
display: block;
}
}
<? if($css['use_header'][0] == 'N') {
/****************************************************
헤더 사용 여부 설정
*****************************************************/ ?>
#header,
#footer { display: none !important; }
#body { margin: 0 !important; }
<? } ?>
<? if($css['menu_pos'][0] == 'left') {
/****************************************************
메뉴 좌측 레이아웃 설정
*****************************************************/ ?>
#body { margin-left: <?=$css['menu_width'][0]?>px; }
#header {
position: fixed;
top: 0;
left: 0;
bottom: 0;
overflow-y: auto;
width: <?=$css['menu_width'][0]?>px;
}
#logo {
padding:20px 0;
text-align: center;
}
<? } else if($css['menu_pos'][0] == 'top') {
/****************************************************
메뉴 상단 레이아웃 설정
*****************************************************/ ?>
#header {
position: relative;
margin: 0;
padding: 0;
clear: both;
height: <?=$css['menu_height'][0]?>px;
}
#header .fix-layout { height: 100%; }
#logo {
display: block;
position: absolute;
top: 50%;
left: 0%;
transform: translateY(-50%);
}
<? } ?>
/*#gnb { float: right; }*/
#gnb,
#gnb * {
color: <?=$css['menu_text'][0]?>;
font-size: <?=$css['menu_text'][1]?>px;
}
#gnb a:hover {
color: <?=$css['menu_text'][2]?>;
font-size: <?=$css['menu_text'][3]?>px;
}
<?/**************************************************************
스크롤 / 마우스 드래그 블록 색상 지정
***************************************************************/?>
<?/*** Scroll Style ***************/?>
<? if($css['color_bak'][0]) { ?>
*::-webkit-scrollbar-track { background-color: <?=$css['color_bak'][0]?>; }
<? } if($css['color_point'][0]) { ?>
*::-webkit-scrollbar-thumb { background: <?=$css['color_point'][0]?>; }
<? } ?>
<?/*** Block Style ***************/?>
<? if($css['color_point'][0]) { ?>
* { outline-color: <?=$css['color_point'][0]?>; }
::selection { background:<?=$css['color_point'][0]?>; }
::-moz-selection { background:<?=$css['color_point'][0]?>; }
::-webkit-selection { background:<?=$css['color_point'][0]?>; }
<? } ?>
<? if($css['color_bak'][0]) { ?>
::selection { color:<?=$css['color_bak'][0]?>; }
::-moz-selection { color:<?=$css['color_bak'][0]?>; }
::-webkit-selection { color:<?=$css['color_bak'][0]?>; }
<? } ?>
<?/**************************************************************
버튼 색상 지정
***************************************************************/?>
.ui-btn {
color: <?=$css['btn_default'][0]?>;
background: <?=$css['btn_default'][1]?>;
border-color: <?=$css['btn_default'][2]?>;
}
.ui-btn:hover {
color: <?=$css['btn_default'][3]?>;
background: <?=$css['btn_default'][4]?>;
border-color: <?=$css['btn_default'][5]?>;
}
.ui-btn.point {
color: <?=$css['btn_point'][0]?>;
background: <?=$css['btn_point'][1]?>;
border-color: <?=$css['btn_point'][2]?>;
}
.ui-btn.point:hover {
color: <?=$css['btn_point'][3]?>;
background: <?=$css['btn_point'][4]?>;
border-color: <?=$css['btn_point'][5]?>;
}
.ui-btn.etc {
color: <?=$css['btn_etc'][0]?>;
background: <?=$css['btn_etc'][1]?>;
border-color: <?=$css['btn_etc'][2]?>;
}
.ui-btn.etc:hover {
color: <?=$css['btn_etc'][3]?>;
background: <?=$css['btn_etc'][4]?>;
border-color: <?=$css['btn_etc'][5]?>;
}
.swiper-pagination-bullet-active {background: <?=$css['btn_point'][4]?>;}
<?/**************************************************************
페이징 스타일 설정
***************************************************************/?>
.pg_wrap .pg_page {
color: <?=$css['btn_default'][0]?>;
background: <?=$css['btn_default'][1]?>;
border-color: <?=$css['btn_default'][2]?>;
}
.pg_wrap .pg_page:hover {
color: <?=$css['btn_default'][3]?>;
background: <?=$css['btn_default'][4]?>;
border-color: <?=$css['btn_default'][5]?>;
}
.pg_wrap .pg_current,
.pg_wrap .pg_current:hover {
color: <?=$css['btn_point'][0]?>;
background: <?=$css['btn_point'][1]?>;
border-color: <?=$css['btn_point'][2]?>;
}
<?/**************************************************************
이퀄라이저 설정
***************************************************************/?>
.bar-equalizer i {
<? if($css['equalizer'][0]) { ?>
background: <?=$css['equalizer'][0]?>;
<? } if($css['equalizer'][1]) { ?>
-webkit-box-shadow: 0px 0px 3px 0px <?=$css['equalizer'][1]?>;
-moz-box-shadow: 0px 0px 3px 0px <?=$css['equalizer'][1]?>;
box-shadow: 0px 0px 3px 0px <?=$css['equalizer'][1]?>;
<? } ?>
}
<?/**************************************************************
스테이터스바 설정
***************************************************************/?>
.status-bar dd p {
background: <?=$css['color_default'][0]?>;
}
.status-bar dd p span {
background: <?=$css['color_point'][0]?>;
opacity: .5;
}
.status-bar dd p sup {
background: <?=$css['color_point'][0]?>;
}
.status-bar dd p i {
color: <?=$css['color_bak'][0]?>;
}
<?/**************************************************************
구분선 설정
***************************************************************/?>
hr.line {
background: <?=$css['color_point'][0]?>;
}
<?/**************************************************************
인풋 타입
***************************************************************/?>
.form-input,
input[type="file"],
input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
color: <?=$css['input_bak'][1]?>;
background: <?=$css['input_bak'][0]?>;
border-color: <?=$css['input_bak'][2]?>;
<? if($css['input_bak'][3]) { ?>border-top-left-radius:<?=$css['input_bak'][3]?>px;<? } ?>
<? if($css['input_bak'][4]) { ?>border-top-right-radius:<?=$css['input_bak'][4]?>px;<? } ?>
<? if($css['input_bak'][5]) { ?>border-bottom-right-radius:<?=$css['input_bak'][5]?>px;<? } ?>
<? if($css['input_bak'][6]) { ?>border-bottom-left-radius:<?=$css['input_bak'][6]?>px;<? } ?>
}
::-webkit-input-placeholder {
color: <?=$css['input_bak'][1]?>;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: <?=$css['input_bak'][1]?>;
opacity: 1;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color: <?=$css['input_bak'][1]?>;
opacity: 1;
}
:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: <?=$css['input_bak'][1]?>;
}
*::-webkit-input-placeholder { color:#000; }
textarea:-moz-placeholder, input:-moz-placeholder { color:#000; }
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
background-color: <?=$css['input_bak'][0]?> !important;
color: <?=$css['input_bak'][1]?>;
}
<?/**************************************************************
비쥬얼 슬라이드 설정
***************************************************************/?>
.flex-control-paging a { background: <?=$css['color_default'][0]?>; }
.flex-control-paging a.flex-active { background: <?=$css['color_point'][0]?>; }
<?/**************************************************************
기본 박스 설정
***************************************************************/?>
.theme-box {
<? if($css['box_style'][0]) { ?>
background-color: <?=$css['box_style'][0]?>;
<? } if($css['box_style'][2]) { ?>
border: 1px solid <?=$css['box_style'][2]?>;
<? } if($css['box_style'][1]) { ?>
color: <?=$css['box_style'][1]?>;
<? } ?>
<? if($css['box_style'][3]) { ?>border-top-left-radius:<?=$css['box_style'][3]?>px;<? } ?>
<? if($css['box_style'][4]) { ?>border-top-right-radius:<?=$css['box_style'][4]?>px;<? } ?>
<? if($css['box_style'][5]) { ?>border-bottom-right-radius:<?=$css['box_style'][5]?>px;<? } ?>
<? if($css['box_style'][6]) { ?>border-bottom-left-radius:<?=$css['box_style'][6]?>px;<? } ?>
}
.theme-box.no-link a {
<? if($css['box_style'][1]) { ?>
color: <?=$css['box_style'][1]?>;
<? } ?>
}
<?/**************************************************************
인벤토리 팝업 설정 (기본 박스와 스타일을 함께 합니다)
***************************************************************/?>
.inven-popup-viewer {
<? if($css['box_style'][0]) { ?>
background-color: <?=$css['box_style'][0]?>;
<? } if($css['box_style'][2]) { ?>
border: 1px solid <?=$css['box_style'][2]?>;
<? } if($css['box_style'][1]) { ?>
color: <?=$css['box_style'][1]?>;
<? } ?>
}
<? /****************************************************
트위터 색상 설정
*****************************************************/ ?>
.timeline-Tweet:before { border-top-color: <?=$css['color_bak'][0]?>; }
.TweetAuthor-name { color: <?=$css['color_point'][0]?>; }
<?/**************************************************************
서브메뉴 출력
***************************************************************/?>
#submenu {
background-color: <?=$css['sub_menu'][0]?>;
color: <?=$css['sub_menu'][1]?>;
<?
$css['sub_menu']['border'] = explode("||", $css['sub_menu'][5]);
for($i=0; $i < count($css['sub_menu']['border']); $i++) {
if($css['sub_menu']['border'][$i]) { ?>
border-<?=$css['sub_menu']['border'][$i]?>-color: <?=$css['sub_menu'][2]?>;
border-<?=$css['sub_menu']['border'][$i]?>-style: <?=$css['sub_menu'][3]?>;
border-<?=$css['sub_menu']['border'][$i]?>-width: <?=$css['sub_menu'][4]?>px;
<? } } ?>
}
#submenu a {
color: <?=$css['sub_menu'][1]?>;
}
#submenu a:hover {
color: <?=$css['sub_menu'][6]?>;
}
<?/**************************************************************
테이블 설정
***************************************************************/?>
.theme-list,
.theme-form {
background-color: <?=$css['board_table'][0]?>;
color: <?=$css['board_table'][1]?>;
<?
$css['board_table']['border'] = explode("||", $css['board_table'][5]);
for($i=0; $i < count($css['board_table']['border']); $i++) {
if($css['board_table']['border'][$i]) { ?>
border-<?=$css['board_table']['border'][$i]?>-color: <?=$css['board_table'][2]?>;
border-<?=$css['board_table']['border'][$i]?>-style: <?=$css['board_table'][3]?>;
border-<?=$css['board_table']['border'][$i]?>-width: <?=$css['board_table'][4]?>px;
<? } } ?>
}
/*** Form Area ***/
.theme-form th {
background-color: <?=$css['form_header'][0]?>;
color: <?=$css['form_header'][1]?>;
<?
$css['form_header']['border'] = explode("||", $css['form_header'][5]);
for($i=0; $i < count($css['form_header']['border']); $i++) {
if($css['form_header']['border'][$i]) { ?>
border-<?=$css['form_header']['border'][$i]?>-color: <?=$css['form_header'][2]?>;
border-<?=$css['form_header']['border'][$i]?>-style: <?=$css['form_header'][3]?>;
border-<?=$css['form_header']['border'][$i]?>-width: <?=$css['form_header'][4]?>px;
<? } } ?>
}
.theme-form td {
background-color: <?=$css['form_body'][0]?>;
color: <?=$css['form_body'][1]?>;
<?
$css['form_body']['border'] = explode("||", $css['form_body'][5]);
for($i=0; $i < count($css['form_body']['border']); $i++) {
if($css['form_body']['border'][$i]) { ?>
border-<?=$css['form_body']['border'][$i]?>-color: <?=$css['form_body'][2]?>;
border-<?=$css['form_body']['border'][$i]?>-style: <?=$css['form_body'][3]?>;
border-<?=$css['form_body']['border'][$i]?>-width: <?=$css['form_body'][4]?>px;
<? } } ?>
}
/*** List Area ***/
.theme-list th {
background-color: <?=$css['list_header'][0]?>;
color: <?=$css['list_header'][1]?>;
<?
$css['list_header']['border'] = explode("||", $css['list_header'][5]);
for($i=0; $i < count($css['list_header']['border']); $i++) {
if($css['list_header']['border'][$i]) { ?>
border-<?=$css['list_header']['border'][$i]?>-color: <?=$css['list_header'][2]?>;
border-<?=$css['list_header']['border'][$i]?>-style: <?=$css['list_header'][3]?>;
border-<?=$css['list_header']['border'][$i]?>-width: <?=$css['list_header'][4]?>px;
<? } } ?>
}
.theme-list td {
background-color: <?=$css['list_body'][0]?>;
color: <?=$css['list_body'][1]?>;
<?
$css['list_body']['border'] = explode("||", $css['list_body'][5]);
for($i=0; $i < count($css['list_body']['border']); $i++) {
if($css['list_body']['border'][$i]) { ?>
border-<?=$css['list_body']['border'][$i]?>-color: <?=$css['list_body'][2]?>;
border-<?=$css['list_body']['border'][$i]?>-style: <?=$css['list_body'][3]?>;
border-<?=$css['list_body']['border'][$i]?>-width: <?=$css['list_body'][4]?>px;
<? } } ?>
}
<?/**************************************************************
설정
***************************************************************/?>
#tab_list { border-color: <?=$css['btn_point'][2]?>; }
<?/**************************************************************
인벤토리 설정
***************************************************************/?>
.inventory-list a {
/*border: 1px solid <?=$css['color_point'][0]?>;*/
border: 1px solid <?=$css['color_point'][0]?>;
}
.inventory-list a i {
/*
background: <?=$css['color_point'][0]?>;
color: <?=$css['color_bak'][0]?>;
*/
border: 1px solid <?=$css['color_point'][0]?>;
background: rgba(0, 0, 0, .7);
color: #fff;
}
<?/**************************************************************
로드비 게시판 설정
***************************************************************/?>
#load_log_board {
<? if($css['mmb_contain_bak'][0]) { ?>
background-image: url('<?=$css['mmb_contain_bak'][0]?>');
<? } if($css['mmb_contain_bak'][1]) { ?>
background-color: <?=$css['mmb_contain_bak'][1]?>;
<? } if($css['mmb_contain_bak'][2]) { ?>
background-repeat: <?=$css['mmb_contain_bak'][2]?>;
<? } if($css['mmb_contain_bak'][3]) { ?>
background-position: <?=$css['mmb_contain_bak'][3]?>;
<? } if($css['mmb_contain_bak'][4]) { ?>
background-size: <?=$css['mmb_contain_bak'][4]?>;
<? } if($css['mmb_contain_bak'][5]) { ?>
background-attachment: <?=$css['mmb_contain_bak'][5]?>;
<? } ?>
}
.board-notice {
<? if($css['mmb_notice'][0]) { ?>
background-color: <?=$css['mmb_notice'][0]?>;
<? } if($css['mmb_notice'][1]) { ?>
color: <?=$css['mmb_notice'][1]?>;
<? }
$css['mmb_notice']['border'] = explode("||", $css['mmb_notice'][5]);
for($i=0; $i < count($css['mmb_notice']['border']); $i++) {
if($css['mmb_notice']['border'][$i]) { ?>
border-<?=$css['mmb_notice']['border'][$i]?>-color: <?=$css['mmb_notice'][2]?>;
border-<?=$css['mmb_notice']['border'][$i]?>-style: <?=$css['mmb_notice'][3]?>;
border-<?=$css['mmb_notice']['border'][$i]?>-width: <?=$css['mmb_notice'][4]?>px;
<? } } ?>
}
#log_list {
<? if($css['mmb_list'][0]) { ?>
background-color: <?=$css['mmb_list'][0]?>;
<? } if($css['mmb_list'][1]) { ?>
color: <?=$css['mmb_list'][1]?>;
<? }
$css['mmb_list']['border'] = explode("||", $css['mmb_list'][5]);
for($i=0; $i < count($css['mmb_list']['border']); $i++) {
if($css['mmb_list']['border'][$i]) { ?>
border-<?=$css['mmb_list']['border'][$i]?>-color: <?=$css['mmb_list'][2]?>;
border-<?=$css['mmb_list']['border'][$i]?>-style: <?=$css['mmb_list'][3]?>;
border-<?=$css['mmb_list']['border'][$i]?>-width: <?=$css['mmb_list'][4]?>px;
<? } } ?>
}
<?
$is_item_area = false;
?>
#log_list .item {
<? if($css['mmb_list_item'][0]) { $is_item_area = true; ?>
background-color: <?=$css['mmb_list_item'][0]?>;
<? } if($css['mmb_list_item'][1]) { ?>
color: <?=$css['mmb_list_item'][1]?>;
<? }
$css['mmb_list_item']['border'] = explode("||", $css['mmb_list_item'][5]);
for($i=0; $i < count($css['mmb_list_item']['border']); $i++) {
if($css['mmb_list_item']['border'][$i]) { $is_item_area = true; ?>
border-<?=$css['mmb_list_item']['border'][$i]?>-color: <?=$css['mmb_list_item'][2]?>;
border-<?=$css['mmb_list_item']['border'][$i]?>-style: <?=$css['mmb_list_item'][3]?>;
border-<?=$css['mmb_list_item']['border'][$i]?>-width: <?=$css['mmb_list_item'][4]?>px;
<? } } ?>
<? if($css['mmb_list_item'][6]) { ?>
margin-bottom: <?=$css['mmb_list_item'][6]?>px !important;
<? } ?>
}
#log_list .item .item-inner .ui-pic {
<? if($css['mmb_log'][0]) { ?>
background-color: <?=$css['mmb_log'][0]?>;
<? } if($css['mmb_log'][1]) { ?>
color: <?=$css['mmb_log'][1]?>;
<? }
$css['mmb_log']['border'] = explode("||", $css['mmb_log'][5]);
for($i=0; $i < count($css['mmb_log']['border']); $i++) {
if($css['mmb_log']['border'][$i]) { ?>
border-<?=$css['mmb_log']['border'][$i]?>-color: <?=$css['mmb_log'][2]?>;
border-<?=$css['mmb_log']['border'][$i]?>-style: <?=$css['mmb_log'][3]?>;
border-<?=$css['mmb_log']['border'][$i]?>-width: <?=$css['mmb_log'][4]?>px;
<? } } ?>
}
<?
$is_comment_area = false;
?>
#log_list .item .item-inner .item-comment {
<? if($css['mmb_reply_item'][0]) { $is_comment_area = true; ?>
background-color: <?=$css['mmb_reply_item'][0]?>;
<? } if($css['mmb_reply_item'][1]) { ?>
color: <?=$css['mmb_reply_item'][1]?>;
<? }
$css['mmb_reply_item']['border'] = explode("||", $css['mmb_reply_item'][5]);
for($i=0; $i < count($css['mmb_reply_item']['border']); $i++) {
if($css['mmb_reply_item']['border'][$i]) { $is_comment_area = true; ?>
border-<?=$css['mmb_reply_item']['border'][$i]?>-color: <?=$css['mmb_reply_item'][2]?>;
border-<?=$css['mmb_reply_item']['border'][$i]?>-style: <?=$css['mmb_reply_item'][3]?>;
border-<?=$css['mmb_reply_item']['border'][$i]?>-width: <?=$css['mmb_reply_item'][4]?>px;
<? } } ?>
<? if($css['mmb_reply_item'][6]) { ?>
margin-bottom: <?=$css['mmb_reply_item'][6]?>px !important;
<? } ?>
}
#log_list .item .item-inner .ui-comment {
<? if($css['mmb_reply'][0]) { $is_comment_area = true; ?>
background-color: <?=$css['mmb_reply'][0]?>;
<? } if($css['mmb_reply'][1]) { ?>
color: <?=$css['mmb_reply'][1]?>;
<? }
$css['mmb_reply']['border'] = explode("||", $css['mmb_reply'][5]);
for($i=0; $i < count($css['mmb_reply']['border']); $i++) {
if($css['mmb_reply']['border'][$i]) { $is_comment_area = true; ?>
border-<?=$css['mmb_reply']['border'][$i]?>-color: <?=$css['mmb_reply'][2]?>;
border-<?=$css['mmb_reply']['border'][$i]?>-style: <?=$css['mmb_reply'][3]?>;
border-<?=$css['mmb_reply']['border'][$i]?>-width: <?=$css['mmb_reply'][4]?>px;
<? } } ?>
<? if($is_item_area && $is_comment_area) { ?>
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]) { ?>
color: <?=$css['mmb_name'][0]?>;
<? } ?>
<? if($css['mmb_name'][1]) { ?>
font-size: <?=$css['mmb_name'][1]?>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]) { ?>
color: <?=$css['mmb_owner_name'][0]?>;
<? } ?>
<? if($css['mmb_owner_name'][1]) { ?>
font-size: <?=$css['mmb_owner_name'][1]?>px;
<? } ?>
}
#log_list .item .item-inner .co-footer .date {
<? if($css['mmb_datetime'][0]) { ?>
color: <?=$css['mmb_datetime'][0]?>;
<? } ?>
<? if($css['mmb_datetime'][1]) { ?>
font-size: <?=$css['mmb_datetime'][1]?>px;
<? } ?>
}
#log_list .item .item-inner .co-content .other-site-link {
<? if($css['mmb_link'][0]) { ?>
color: <?=$css['mmb_link'][0]?>;
<? } ?>
}
#log_list .item .item-inner .co-content .link_hash_tag {
<? if($css['mmb_hash'][0]) { ?>
color: <?=$css['mmb_hash'][0]?>;
<? } ?>
}
#log_list .item .item-inner .co-content .log_link_tag {
<? if($css['mmb_log_ank'][0]) { ?>
color: <?=$css['mmb_log_ank'][0]?>;
<? } ?>
}
#log_list .item .item-inner .co-content .member_call {
<? if($css['mmb_call'][0]) { ?>
color: <?=$css['mmb_call'][0]?>;
<? } ?>
}

View file

@ -0,0 +1,103 @@
<?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 ($_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]}'
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]}'";
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);
?>

View file

@ -0,0 +1,28 @@
<?php
$sub_menu = "300700";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
check_token();
@mkdir(G5_DATA_PATH.'/emoticon', G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH.'/emoticon', G5_DIR_PERMISSION);
if ($img = $_FILES['me_img']['name']) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("이모티콘 이미지가 gif, jpg, png 파일이 아닙니다.");
} else {
$emoticon_path = G5_DATA_PATH.'/emoticon';
$emoticon_image_code = time();
$emoticon_image_path = "$emoticon_path/$emoticon_image_code";
$emoticon_image_url = "/data/emoticon/$emoticon_image_code";
move_uploaded_file($_FILES['me_img']['tmp_name'], $emoticon_image_path);
chmod($emoticon_image_path, 0606);
$sql_common = " , me_img = '{$emoticon_image_url}' ";
}
}
sql_query(" insert into {$g5['emoticon_table']} set me_text = '{$me_text}'".$sql_common);
goto_url('./emoticon_list.php?'.$qstr);
?>

View file

@ -0,0 +1,201 @@
<?php
$sub_menu = "300700";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['emoticon_table']} ";
$sql_search = " where (1) ";
if (!$sst) {
$sst = "me_id";
$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 = 18;
$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['PHP_SELF'].'" class="ov_listall">전체목록</a>';
$g5['title'] = '이모티콘 관리';
include_once ('./admin.head.php');
$colspan = 9;
$po_expire_term = '';
if($config['cf_point_term'] > 0) {
$po_expire_term = $config['cf_point_term'];
}
?>
<h2 class="h2_frm">이모티콘 목록</h2>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
</div>
<form name="fpointlist" id="fpointlist" method="post" action="./emoticon_list_update.php" onsubmit="return fpointlist_submit(this);">
<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>
<colgroup>
<col style="width: 50px;" />
<col style="width: 120px;"/>
<col />
<col style="width: 50px;" />
<col style="width: 120px;"/>
<col />
<col style="width: 50px;" />
<col style="width: 120px;"/>
<col />
</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">이미지</th>
<th scope="col">명령어</th>
<th scope="col">&nbsp;</th>
<th scope="col">이미지</th>
<th scope="col">명령어</th>
<th scope="col">&nbsp;</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);
?>
<? if($i % 3 == 0) {
if($i == 0) { echo "</tr>"; }
?>
<tr class="<?php echo $bg; ?>">
<? } ?>
<td style="text-align: center">
<input type="hidden" name="me_id[<?php echo $i ?>]" value="<?php echo $row['me_id'] ?>" id="me_id_<?php echo $i ?>">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td style="text-align: center"><?php echo "<img src='".G5_URL."{$row['me_img']}' alt='{$row['me_text']}'>"; ?></td>
<td class="txt-left"><?php echo $row['me_text']; ?></td>
<?php
}
if ($i == 0)
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
if($i%3) {
for($j = 0; $j < 3-($i%3); $j++) {
echo "<td></td><td></td><td></td>";
}
}
if($i > 0) { echo "</tr>"; }
?>
</tbody>
</table>
</div>
<div class="btn_list01 btn_list">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<section id="point_mng">
<h2 class="h2_frm">이모티콘 등록</h2>
<form name="fpointlist2" method="post" id="fpointlist2" action="./emoticon_form_update.php" autocomplete="off" enctype="multipart/form-data">
<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="<?php echo $token ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="me_text">이모티콘 명령어<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="me_text" id="me_text" class="required frm_input" required></td>
</tr>
<tr>
<th scope="row"><label for="me_img">이미지<strong class="sound_only">필수</strong></label></th>
<td><input type="file" name="me_img" id="me_img"></td>
</tr>
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
</section>
<script>
function fpointlist_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');
?>

View file

@ -0,0 +1,36 @@
<?php
$sub_menu = '300300';
include_once('./_common.php');
check_demo();
auth_check($auth[$sub_menu], 'd');
check_token();
$count = count($_POST['chk']);
if(!$count)
alert($_POST['act_button'].' 하실 항목을 하나 이상 체크하세요.');
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
// 이모티콘 등록 내역
$sql = " select * from {$g5['emoticon_table']} where me_id = '{$_POST['me_id'][$k]}' ";
$row = sql_fetch($sql);
if(!$row['me_id'])
continue;
// 이모티콘 내역삭제
$sql = " delete from {$g5['emoticon_table']} where me_id = '{$_POST['me_id'][$k]}' ";
sql_query($sql);
// 이모티콘 이미지 삭제
@unlink(G5_PATH.$row['me_img']);
}
goto_url('./emoticon_list.php?'.$qstr);
?>

View file

@ -0,0 +1,263 @@
<?php
$sub_menu = "400410";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['exp_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case 'mb_name' :
$temp_mb = sql_fetch("select mb_id, mb_10 from {$g5['member_table']} where mb_nick = '{$stx}'");
$sql_search .= " (ch_id = '{$temp_mb['mb_10']}') ";
break;
default :
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "ex_id";
$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);
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
$mb = array();
if ($sfl == 'mb_id' && $stx)
$mb = get_member($stx);
$g5['title'] = $config['cf_exp_name'].' 관리';
include_once ('./admin.head.php');
$colspan = 7;
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">'.$config['cf_exp_name'].' 지급/회수</a></li>
<li><a href="#anc_002">'.$config['cf_exp_name'].' 내역</a></li>
</ul>';
$frm_submit = '<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
?>
<form name="fpointlist2" method="post" id="fpointlist2" action="./exp_update.php" autocomplete="off">
<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="<?php echo $token ?>">
<section id="anc_001">
<h2 class="h2_frm"><?=$config['cf_exp_name']?> 지급/회수</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">지급유형</th>
<td>
<input type="radio" id="take_type_01" name="take_type" value="P" checked onclick="if(document.getElementById('take_type_01').checked) $('#take_member_name').show();"/>
<label for="take_type_01">개별지급</label>
&nbsp;&nbsp;
<input type="radio" id="take_type_02" name="take_type" value="A" onclick="if(document.getElementById('take_type_02').checked) $('#take_member_name').hide();"/>
<label for="take_type_02">전체지급</label>
</td>
</tr>
<tr id="take_member_name">
<th scope="row"><label for="ch_name">캐릭터 이름<strong class="sound_only">필수</strong></label></th>
<td>
<input type="hidden" name="ch_id" id="ch_id" value="" />
<input type="text" name="ch_name" value="" id="ch_name" onkeyup="get_ajax_character(this, 'character_list', 'ch_id');" />
<div id="character_list" class="ajax-list-box"><div class="list"></div></div>
</td>
</tr>
<tr>
<th scope="row"><label for="ex_content">지급 내용<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="ex_content" id="ex_content" required class="required frm_input" size="80"></td>
</tr>
<tr>
<th scope="row"><label for="ex_point"><?=$config['cf_exp_name']?><strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="ex_point" id="ex_point" required class="required frm_input"></td>
</tr>
</tbody>
</table>
</div>
</section>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
<section id="anc_002">
<h2 class="h2_frm"><?=$config['cf_exp_name']?> 내역</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
<?php
if (isset($mb['mb_id']) && $mb['mb_id']) {
echo '&nbsp;(' . $mb['mb_id'] .' 님 골드 합계 : ' . number_format($mb['mb_point']) . '점)';
} else {
$row2 = sql_fetch(" select sum(ex_point) as sum_point from {$g5['exp_table']} ");
echo '&nbsp;(전체 합계 '.number_format($row2['sum_point']).'점)';
}
?>
</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="ch_name"<?php echo get_selected($_GET['sfl'], "ch_name"); ?>>캐릭터이름</option>
<option value="mb_name"<?php echo get_selected($_GET['sfl'], "mb_name"); ?>>오너이름</option>
<option value="ex_content"<?php echo get_selected($_GET['sfl'], "ex_content"); ?>>내용</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="fpointlist" id="fpointlist" method="post" action="./exp_list_delete.php" onsubmit="return fpointlist_submit(this);">
<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>
<colgroup>
<col style="width: 45px;" />
<col style="width: 100px;" />
<col style="width: 150px;" />
<col />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr>
<th>
<label for="chkall" class="sound_only"><?=$config['cf_exp_name']?> 지급 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th>오너명</th>
<th>캐릭터 이름</th>
<th>지급 내용</th>
<th><?=$config['cf_exp_name']?></th>
<th>일시</th>
<th><?=$config['cf_exp_name']?> 합계</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$bg = 'bg'.($i%2);
$ch = get_character($row['ch_id']);
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="ch_id[<?php echo $i ?>]" value="<?php echo $row['ch_id'] ?>" id="ch_id_<?php echo $i ?>">
<input type="hidden" name="ex_id[<?php echo $i ?>]" value="<?php echo $row['ex_id'] ?>" id="ex_id_<?php echo $i ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['ex_content'] ?> 내역</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td><?=get_member_name($ch['mb_id'])?></td>
<td><a href="?sfl=ch_name&amp;stx=<?php echo $row['ch_name'] ?>"><?php echo $row['ch_name'] ?></a></td>
<td class="txt-left"><?php echo $row['ex_content'] ?></td>
<td><?php echo number_format($row['ex_point']) ?></td>
<td><?php echo $row['ex_datetime'] ?></td>
<td><?php echo number_format($row['ex_ch_exp']) ?></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="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
<script>
function fpointlist_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');
?>

View file

@ -0,0 +1,54 @@
<?php
$sub_menu = '400410';
include_once('./_common.php');
check_demo();
auth_check($auth[$sub_menu], 'd');
check_token();
$count = count($_POST['chk']);
if(!$count)
alert($_POST['act_button'].' 하실 항목을 하나 이상 체크하세요.');
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ch_id = $_POST['ch_id'][$k];
$ch = sql_fetch("select ch_id, ch_name, ch_exp, ch_rank, ch_point from {$g5['character_table']} where ch_id = '{$ch_id}'");
// 포인트 내역정보
$sql = " select * from {$g5['exp_table']} where ex_id = '{$_POST['ex_id'][$k]}' ";
$row = sql_fetch($sql);
if(!$row['ex_id'])
continue;
// 포인트 내역삭제
$sql = " delete from {$g5['exp_table']} where ex_id = '{$_POST['ex_id'][$k]}' ";
sql_query($sql);
// ex_ch_exp에 반영
$sql = " update {$g5['exp_table']}
set ex_ch_exp = ex_ch_exp - '{$row['ex_point']}'
where ch_id = '{$ch_id}'
and ex_id > '{$_POST['ex_id'][$k]}' ";
sql_query($sql);
// 포인트 UPDATE
$sum_point = get_exp_sum($ch_id);
$sql= " update {$g5['character_table']} set ch_exp = '$sum_point' where ch_id = '{$ch_id}' ";
sql_query($sql);
$rank_info = get_rank_exp($sum_point, $ch_id);
// 기존 랭크에서 변동이 있을 경우에만 실행
if($ch['ch_rank'] != $rank_info['rank']) {
$state_point = $ch['ch_point'] + $rank_info['add_point'];
// 스텟 포인트 변동 사항 및 랭크 변동사항 저장
$rank_up_sql = " update {$g5['character_table']} set ch_rank = '{$rank_info['rank']}', ch_point = '{$state_point}' where ch_id = '$ch_id' ";
sql_query($rank_up_sql);
}
}
goto_url('./exp_list.php?'.$qstr);
?>

View file

@ -0,0 +1,49 @@
<?php
$sub_menu = "400410";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
check_token();
$ch_id = $_POST['ch_id'];
$ch_name = $_POST['ch_name'];
$ex_point = $_POST['ex_point'];
$ex_content = $_POST['ex_content'];
$action = '획득';
if($ex_point < 0) {
$action = '차감';
}
if($take_type == 'A') {
// 전체지급
$sql_common = " from {$g5['character_table']} ";
$sql_search = " where ch_state = '승인' ";
$sql = " select * {$sql_common} {$sql_search} ";
$result = sql_query($sql);
for($i=0; $ch = sql_fetch_array($result); $i++) {
if (($ex_point < 0) && ($ex_point * (-1) > $ch['ch_exp'])) continue;
insert_exp($ch['ch_id'], $ex_point, $ex_content, $action);
}
} else {
// 개별지급
if(!$ch_id && $ch_name) {
$ch = sql_fetch("select ch_id, ch_name, ch_exp from {$g5['character_table']} where ch_name = '{$ch_name}'");
$ch_id = $ch['ch_id'];
} else {
$ch = sql_fetch("select ch_id, ch_name, ch_exp from {$g5['character_table']} where ch_id = '{$ch_id}'");
}
if (!$ch['ch_id'])
alert('존재하는 캐릭터가 아닙니다.');
if (($ex_point < 0) && ($ex_point * (-1) > $ch['ch_exp']))
alert('경험치를 차감하는 경우 현재 경험치보다 작으면 안됩니다.');
insert_exp($ch['ch_id'], $ex_point, $ex_content, $action);
}
goto_url('./exp_list.php?'.$qstr);
?>

View file

@ -0,0 +1,273 @@
<?php
$sub_menu = "500210";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$sql_common = " from {$g5['explorer_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default :
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if($sch_it_id) {
$sql_search .= " and it_id = '{$sch_it_id}' ";
}
if (!$sst) {
$sst = "ie_id";
$sod = "desc";
}
$sql_order = " order by it_id asc, {$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');
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">뽑기 설정 목록</a></li>
<li><a href="#anc_002">뽑기 등록</a></li>
</ul>';
$frm_submit = '<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
$colspan = 5;
if($sch_it_id) {
$sch_it = get_item($sch_it_id);
$sch_it_name = $sch_it['it_name'];
$sch_it_img = $sch_it['it_img'];
}
?>
<section id="anc_001">
<h2 class="h2_frm">뽑기 설정 목록</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
등록된 뽑기 설정 <?php echo number_format($total_count) ?>
</div>
<? if($sch_it_name) { ?>
<div style="padding-bottom: 10px;">
<img src="<?=$sch_it_img?>" style="width: 50px;"/>
[ <?=$sch_it_name?> ] 뽑기 설정
</div>
<? } ?>
<form name="ftitlelist" id="ftitlelist" action="./explorer_list_update.php" method="post" enctype="multipart/form-data">
<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="sch_it_id" value="<?php echo $sch_it_id ?>">
<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: 100px;" />
<col style="width: 200px;" />
<col style="width: 100px;" />
<col style="width: 200px;" />
<col />
</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 colspan="2">뽑기아이템</th>
<th colspan="2">획득아이템</th>
<th>획득구간</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $ie=sql_fetch_array($result); $i++) {
$it = sql_fetch("select it_id, it_name, it_img from {$g5['item_table']} where it_id = '{$ie['it_id']}'");
$re_it = sql_fetch("select it_id, it_name, it_img from {$g5['item_table']} where it_id = '{$ie['re_it_id']}'");
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="ie_id[<?php echo $i ?>]" value="<?php echo $ie['ie_id'] ?>" id="ie_id_<?php echo $i ?>">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<? if($it['it_img']) { ?>
<img src="<?=$it['it_img']?>" style="max-width: 50px;"/>
<? } else { ?>
이미지 없음
<? } ?>
</td>
<td>
<a href="?sch_it_id=<?=$it['it_id']?>"><?=$it['it_name']?></a>
</td>
<td>
<? if($re_it['it_img']) { ?>
<img src="<?=$re_it['it_img']?>" style="max-width: 50px;"/>
<? } else { ?>
이미지 없음
<? } ?>
</td>
<td>
<?=$re_it['it_name']?>
</td>
<td>
<input type="text" name="ie_per_s[<?php echo $i ?>]" value="<?php echo $ie['ie_per_s']; ?>" size="5" maxlength="11">
~
<input type="text" name="ie_per_e[<?php echo $i ?>]" value="<?php echo $ie['ie_per_e']; ?>" size="5" maxlength="11"> 구간 획득
</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="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.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&amp;page="); ?>
<script>
$(function() {
$('#ftitlelist').submit(function() {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
});
});
</script>
</section>
<?
if(!$sch_it_id || $sch_it['it_type'] == '뽑기') {
?>
<section id="anc_002" style="margin-top: 0; margin-bottom: 50px;">
<form name="fexplorerlist2" method="post" id="fexplorerlist2" action="./explorer_update.php" autocomplete="off" enctype="multipart/form-data">
<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="<?php echo $token ?>">
<input type="hidden" name="sch_it_id" value="<?php echo $sch_it_id ?>">
<h2 class="h2_frm">뽑기 등록</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">뽑기 아이템</th>
<td>
<? if($sch_it_name) { ?>
<input type="hidden" name="it_id" value="<?=$sch_it_id?>" />
<input type="hidden" name="it_name" value="<?=$sch_it_name?>" />
<img src="<?=$sch_it_img?>" alt="" style="max-width: 50px;" /> <?=$sch_it_name?>
<? } else { ?>
<?php echo help("※ [ 아이템 기능 - 뽑기 아이템 ] 이 설정되어 있어야 적용됩니다.") ?>
<input type="hidden" name="it_id" id="it_id" value="<?=$sch_it_id?>" />
<input type="text" name="it_name" value="<?=$sch_it_name?>" id="it_name" onkeyup="get_ajax_item(this, 'item_list', 'it_id', '뽑기');" />
<div id="item_list" class="ajax-list-box"><div class="list"></div></div>
<? } ?>
</td>
</tr>
<tr>
<th scope="row">획득 아이템</th>
<td>
<input type="hidden" name="re_it_id" id="re_it_id" value="" />
<input type="text" name="re_it_name" value="" id="re_it_name" onkeyup="get_ajax_item(this, 're_item_list', 're_it_id');" />
<div id="re_item_list" class="ajax-list-box"><div class="list"></div></div>
</td>
</tr>
<tr>
<th scope="row">획득구간</th>
<td>
<?php echo help("※ 100면체 주사위를 굴렸을 때 나오는 숫자 중 획득 가능 범위를 지정해 주시길 바랍니다. (0~100)<br />※ 다수의 구간이 겹칠 시,랜덤으로 획득 됩니다.") ?>
<input type="text" name="ie_per_s" value="" size="5" maxlength="11">
~
<input type="text" name="ie_per_e" value="" size="5" maxlength="11"> 구간 획득
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="등록" class="btn_submit" id="btn_submit">
</div>
</form>
</section>
<? } ?>
<?php
include_once ('./admin.tail.php');
?>

View file

@ -0,0 +1,46 @@
<?php
$sub_menu = "500210";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
check_token();
if ($_POST['act_button'] == "선택수정") {
for ($i=0; $i<count($_POST['chk']); $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ie = sql_fetch("select * from {$g5['explorer_table']} where ie_id = '{$_POST['ie_id'][$k]}'");
if (!$ie['ie_id']) {
$msg .= $ie['ie_id'].' : 설정 자료가 존재하지 않습니다.\\n';
} else {
$sql_common = "";
$sql = " update {$g5['explorer_table']}
set ie_per_s = '{$_POST['ie_per_s'][$k]}',
ie_per_e = '{$_POST['ie_per_e'][$k]}'
where ie_id = '{$ie['ie_id']}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택삭제") {
for ($i=0; $i<count($_POST['chk']); $i++)
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ie = sql_fetch("select * from {$g5['explorer_table']} where ie_id = '{$_POST['ie_id'][$k]}'");
if (!$ie['ie_id']) {
$msg .= $ie['ie_id'].' : 설정 자료가 존재하지 않습니다.\\n';
} else {
sql_query(" delete from {$g5['explorer_table']} where ie_id = '{$ie['ie_id']}' ");
}
}
}
if ($msg) alert($msg);
goto_url('./explorer_list.php?sch_it_id='.$sch_it_id.'&'.$qstr);
?>

View file

@ -0,0 +1,40 @@
<?php
$sub_menu = "500210";
include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
check_token();
/** 획득 아이템 설정 등록 **/
$sql_common = "";
if(!$it_id && $it_name) {
$it = sql_fetch("select it_id, it_type from {$g5['item_table']} where it_name = '{$it_name}'");
if($it['it_type'] != '뽑기') {
alert("해당 아이템은 뽑기 기능이 설정되지 않은 아이템입니다.");
}
$it_id = $it['it_id'];
}
if(!$re_it_id && $re_it_name) {
$it = sql_fetch("select it_id from {$g5['item_table']} where it_name = '{$re_it_name}'");
$re_it_id = $it['it_id'];
}
$sql = " insert into {$g5['explorer_table']}
set it_id = '{$it_id}',
re_it_id = '{$re_it_id}',
ie_per_s = '{$ie_per_s}',
ie_per_e = '{$ie_per_e}',
ma_id = '{$ma_id}',
ie_1 = '{$ie_1}',
ie_2 = '{$ie_2}',
ie_3 = '{$ie_3}',
ie_4 = '{$ie_4}',
ie_5 = '{$ie_5}'
";
sql_query($sql);
goto_url('./explorer_list.php?sch_it_id='.$sch_it_id.'&'.$qstr);
?>

View file

@ -0,0 +1,98 @@
<?php
$sub_menu = '300700';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
auth_check($auth[$sub_menu], "w");
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
$html_title = 'FAQ '.$fm['fm_subject'];
if ($w == "u")
{
$html_title .= " 수정";
$readonly = " readonly";
$sql = " select * from {$g5['faq_table']} where fa_id = '$fa_id' ";
$fa = sql_fetch($sql);
if (!$fa['fa_id']) alert("등록된 자료가 없습니다.");
}
else
$html_title .= ' 항목 입력';
$g5['title'] = $html_title.' 관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
<form name="frmfaqform" action="./faqformupdate.php" onsubmit="return frmfaqform_check(this);" method="post">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="fm_id" value="<?php echo $fm_id; ?>">
<input type="hidden" name="fa_id" value="<?php echo $fa_id; ?>">
<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>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="fa_order">출력순서</label></th>
<td>
<?php echo help('숫자가 작을수록 FAQ 페이지에서 먼저 출력됩니다.'); ?>
<input type="text" name="fa_order" value="<?php echo $fa['fa_order']; ?>" id="fa_order" class="frm_input" maxlength="10" size="10">
<?php if ($w == 'u') { ?><a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">내용보기</a><?php } ?>
</td>
</tr>
<tr>
<th scope="row">질문</th>
<td><?php echo editor_html('fa_subject', get_text($fa['fa_subject'], 0)); ?></td>
</tr>
<tr>
<th scope="row">답변</th>
<td><?php echo editor_html('fa_content', get_text($fa['fa_content'], 0)); ?></td>
</tr>
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./faqlist.php?fm_id=<?php echo $fm_id; ?>">목록</a>
</div>
</form>
<script>
function frmfaqform_check(f)
{
errmsg = "";
errfld = "";
//check_field(f.fa_subject, "제목을 입력하세요.");
//check_field(f.fa_content, "내용을 입력하세요.");
if (errmsg != "")
{
alert(errmsg);
errfld.focus();
return false;
}
<?php echo get_editor_js('fa_subject'); ?>
<?php echo get_editor_js('fa_content'); ?>
return true;
}
// document.getElementById('fa_order').focus(); 포커스 해제
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>

View file

@ -0,0 +1,45 @@
<?php
$sub_menu = '300700';
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();
$sql_common = " fa_subject = '$fa_subject',
fa_content = '$fa_content',
fa_order = '$fa_order' ";
if ($w == "")
{
$sql = " insert {$g5['faq_table']}
set fm_id ='$fm_id',
$sql_common ";
sql_query($sql);
$fa_id = sql_insert_id();
}
else if ($w == "u")
{
$sql = " update {$g5['faq_table']}
set $sql_common
where fa_id = '$fa_id' ";
sql_query($sql);
}
else if ($w == "d")
{
$sql = " delete from {$g5['faq_table']} where fa_id = '$fa_id' ";
sql_query($sql);
}
if ($w == 'd')
goto_url("./faqlist.php?fm_id=$fm_id");
else
goto_url("./faqform.php?w=u&amp;fm_id=$fm_id&amp;fa_id=$fa_id");
?>

View file

@ -0,0 +1,95 @@
<?php
$sub_menu = '300700';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g5['title'] = 'FAQ 상세관리';
if ($fm_subject) $g5['title'] .= ' : '.$fm_subject;
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
$sql_common = " from {$g5['faq_table']} where fm_id = '$fm_id' ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$sql = "select * $sql_common order by fa_order , fa_id ";
$result = sql_query($sql);
?>
<div class="local_ov01 local_ov">
등록된 FAQ 상세내용 <?php echo $total_count; ?>
</div>
<div class="local_desc01 local_desc">
<ol>
<li>FAQ는 무제한으로 등록할 있습니다</li>
<li><strong>FAQ 상세내용 추가</strong> 눌러 자주하는 질문과 답변을 입력합니다.</li>
</ol>
</div>
<div class="btn_add01 btn_add">
<a href="./faqform.php?fm_id=<?php echo $fm['fm_id']; ?>">FAQ 상세내용 추가</a>
</div>
<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>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$row1 = sql_fetch(" select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ");
$cnt = $row1['cnt'];
$s_mod = icon("수정", "");
$s_del = icon("삭제", "");
$num = $i + 1;
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_num"><?php echo $num; ?></td>
<td><?php echo stripslashes($row['fa_subject']); ?></td>
<td class="td_num"><?php echo $row['fa_order']; ?></td>
<td class="td_mngsmall">
<a href="./faqform.php?w=u&amp;fm_id=<?php echo $row['fm_id']; ?>&amp;fa_id=<?php echo $row['fa_id']; ?>"><span class="sound_only"><?php echo stripslashes($row['fa_subject']); ?> </span>수정</a>
<a href="./faqformupdate.php?w=d&amp;fm_id=<?php echo $row['fm_id']; ?>&amp;fa_id=<?php echo $row['fa_id']; ?>" onclick="return delete_confirm(this);"><span class="sound_only"><?php echo stripslashes($row['fa_subject']); ?> </span>삭제</a>
</td>
</tr>
<?php
}
if ($i == 0) {
echo '<tr><td colspan="4" class="empty_table">자료가 없습니다.</td></tr>';
}
?>
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<a href="./faqmasterlist.php">FAQ 관리</a>
</div>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>

View file

@ -0,0 +1,165 @@
<?php
$sub_menu = '300700';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
auth_check($auth[$sub_menu], "w");
$html_title = 'FAQ';
$fm_id = preg_replace('/[^0-9]/', '', $fm_id);
if ($w == "u")
{
$html_title .= ' 수정';
$readonly = ' readonly';
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
if (!$fm['fm_id']) alert('등록된 자료가 없습니다.');
}
else
{
$html_title .= ' 입력';
}
$g5['title'] = $html_title.' 관리';
// 모바일 상하단 내용 필드추가
if(!sql_query(" select fm_mobile_head_html from {$g5['faq_master_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['faq_master_table']}`
ADD `fm_mobile_head_html` text NOT NULL AFTER `fm_tail_html`,
ADD `fm_mobile_tail_html` text NOT NULL AFTER `fm_mobile_head_html` ", true);
}
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
<form name="frmfaqmasterform" action="./faqmasterformupdate.php" onsubmit="return frmfaqmasterform_check(this);" method="post" enctype="MULTIPART/FORM-DATA">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="fm_id" value="<?php echo $fm_id; ?>">
<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>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="fm_order">출력순서</label></th>
<td>
<?php echo help('숫자가 작을수록 FAQ 분류에서 먼저 출력됩니다.'); ?>
<input type="text" name="fm_order" value="<?php echo $fm['fm_order']; ?>" id="fm_order" class="frm_input" maxlength="10" size="10">
</td>
</tr>
<tr>
<th scope="row"><label for="fm_subject">제목</label></th>
<td>
<input type="text" value="<?php echo get_text($fm['fm_subject']); ?>" name="fm_subject" id="fm_subject" required class="frm_input required" size="70">
<?php if ($w == 'u') { ?>
<a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">보기</a>
<a href="./faqlist.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">상세보기</a>
<?php } ?>
</td>
</tr>
<tr>
<th scope="row"><label for="fm_himg">상단이미지</label></th>
<td>
<input type="file" name="fm_himg" id="fm_himg">
<?php
$himg = G5_DATA_PATH.'/faq/'.$fm['fm_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="fm_himg_del" value="1" id="fm_himg_del"> <label for="fm_himg_del">삭제</label>';
$himg_str = '<img src="'.G5_DATA_URL.'/faq/'.$fm['fm_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="fm_timg">하단이미지</label></th>
<td>
<input type="file" name="fm_timg" id="fm_timg">
<?php
$timg = G5_DATA_PATH.'/faq/'.$fm['fm_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="fm_timg_del" value="1" id="fm_timg_del"><label for="fm_timg_del">삭제</label>';
$timg_str = '<img src="'.G5_DATA_URL.'/faq/'.$fm['fm_id'].'_t" width="'.$width.'" alt="">';
}
if ($timg_str) {
echo '<div class="banner_or_img">';
echo $timg_str;
echo '</div>';
}
?>
</td>
</tr>
<tr>
<th scope="row">상단 내용</th>
<td>
<?php echo editor_html('fm_head_html', get_text($fm['fm_head_html'], 0)); ?>
</td>
</tr>
<tr>
<th scope="row">하단 내용</th>
<td>
<?php echo editor_html('fm_tail_html', get_text($fm['fm_tail_html'], 0)); ?>
</td>
</tr>
<tr>
<th scope="row">모바일상단 내용</th>
<td>
<?php echo editor_html('fm_mobile_head_html', get_text($fm['fm_mobile_head_html'], 0)); ?>
</td>
</tr>
<tr>
<th scope="row">모바일하단 내용</th>
<td>
<?php echo editor_html('fm_mobile_tail_html', get_text($fm['fm_mobile_tail_html'], 0)); ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./faqmasterlist.php">목록</a>
</div>
</form>
<script>
function frmfaqmasterform_check(f)
{
<?php echo get_editor_js('fm_head_html'); ?>
<?php echo get_editor_js('fm_tail_html'); ?>
<?php echo get_editor_js('fm_mobile_head_html'); ?>
<?php echo get_editor_js('fm_mobile_tail_html'); ?>
}
// document.frmfaqmasterform.fm_subject.focus();
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>

View file

@ -0,0 +1,74 @@
<?php
$sub_menu = '300700';
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."/faq", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
if ($fm_himg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_h");
if ($fm_timg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_t");
$sql_common = " set fm_subject = '$fm_subject',
fm_head_html = '$fm_head_html',
fm_tail_html = '$fm_tail_html',
fm_mobile_head_html = '$fm_mobile_head_html',
fm_mobile_tail_html = '$fm_mobile_tail_html',
fm_order = '$fm_order' ";
if ($w == "")
{
$sql = " alter table {$g5['faq_master_table']} auto_increment=1 ";
sql_query($sql);
$sql = " insert {$g5['faq_master_table']} $sql_common ";
sql_query($sql);
$fm_id = sql_insert_id();
}
else if ($w == "u")
{
$sql = " update {$g5['faq_master_table']} $sql_common where fm_id = '$fm_id' ";
sql_query($sql);
}
else if ($w == "d")
{
@unlink(G5_DATA_PATH."/faq/{$fm_id}_h");
@unlink(G5_DATA_PATH."/faq/{$fm_id}_t");
// FAQ삭제
$sql = " delete from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
sql_query($sql);
// FAQ상세삭제
$sql = " delete from {$g5['faq_table']} where fm_id = '$fm_id' ";
sql_query($sql);
}
if ($w == "" || $w == "u")
{
if ($_FILES['fm_himg']['name']){
$dest_path = G5_DATA_PATH."/faq/".$fm_id."_h";
@move_uploaded_file($_FILES['fm_himg']['tmp_name'], $dest_path);
@chmod($dest_path, G5_FILE_PERMISSION);
}
if ($_FILES['fm_timg']['name']){
$dest_path = G5_DATA_PATH."/faq/".$fm_id."_t";
@move_uploaded_file($_FILES['fm_timg']['tmp_name'], $dest_path);
@chmod($dest_path, G5_FILE_PERMISSION);
}
goto_url("./faqmasterform.php?w=u&amp;fm_id=$fm_id");
}
else
goto_url("./faqmasterlist.php");
?>

View file

@ -0,0 +1,128 @@
<?php
$sub_menu = '300700';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
//dbconfig파일에 $g5['faq_table'] , $g5['faq_master_table'] 배열변수가 있는지 체크
if( !isset($g5['faq_table']) || !isset($g5['faq_master_table']) ){
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <br ><strong>$g5[\'faq_table\'] = G5_TABLE_PREFIX.\'faq\';</strong><br ><strong>$g5[\'faq_master_table\'] = G5_TABLE_PREFIX.\'faq_master\';</strong><br > 를 추가해 주세요.');
}
//자주하시는 질문 마스터 테이블이 있는지 검사한다.
if(!sql_query(" DESCRIBE {$g5['faq_master_table']} ", false)) {
if(sql_query(" DESCRIBE {$g5['g5_shop_faq_master_table']} ", false)) {
sql_query(" ALTER TABLE {$g5['g5_shop_faq_master_table']} RENAME TO `{$g5['faq_master_table']}` ;", false);
} else {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_master_table']}` (
`fm_id` int(11) NOT NULL AUTO_INCREMENT,
`fm_subject` varchar(255) NOT NULL DEFAULT '',
`fm_head_html` text NOT NULL,
`fm_tail_html` text NOT NULL,
`fm_order` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`fm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
// FAQ Master
sql_query(" insert into `{$g5['faq_master_table']}` set fm_id = '1', fm_subject = '자주하시는 질문' ", false);
}
//자주하시는 질문 테이블이 있는지 검사한다.
if(!sql_query(" DESCRIBE {$g5['faq_table']} ", false)) {
if(sql_query(" DESCRIBE {$g5['g5_shop_faq_table']} ", false)) {
sql_query(" ALTER TABLE {$g5['g5_shop_faq_table']} RENAME TO `{$g5['faq_table']}` ;", false);
} else {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_table']}` (
`fa_id` int(11) NOT NULL AUTO_INCREMENT,
`fm_id` int(11) NOT NULL DEFAULT '0',
`fa_subject` text NOT NULL,
`fa_content` text NOT NULL,
`fa_order` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`fa_id`),
KEY `fm_id` (`fm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
}
$g5['title'] = 'FAQ관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql_common = " from {$g5['faq_master_table']} ";
// 테이블의 전체 레코드수만 얻음
$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 fm_order, fm_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>전체 FAQ <?php echo $total_count; ?>건</span>
</div>
<div class="local_desc01 local_desc">
<ol>
<li>FAQ는 무제한으로 등록할 있습니다</li>
<li><strong>FAQ추가</strong> 눌러 FAQ Master를 생성합니다. (하나의 FAQ 타이틀 생성 : 자주하시는 질문, 이용안내.. )</li>
<li>생성한 FAQ Master <strong>제목</strong> 눌러 세부 내용을 관리할 있습니다.</li>
</ol>
</div>
<div class="btn_add01 btn_add">
<a href="./faqmasterform.php">FAQ추가</a>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">제목</th>
<th scope="col">FAQ수</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['faq_table']} where fm_id = '{$row['fm_id']}' ";
$row1 = sql_fetch($sql1);
$cnt = $row1['cnt'];
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_num"><?php echo $row['fm_id']; ?></td>
<td><a href="./faqlist.php?fm_id=<?php echo $row['fm_id']; ?>&amp;fm_subject=<?php echo $row['fm_subject']; ?>"><?php echo stripslashes($row['fm_subject']); ?></a></td>
<td class="td_num"><?php echo $cnt; ?></td>
<td class="td_num"><?php echo $row['fm_order']?></td>
<td class="td_mng">
<a href="./faqmasterform.php?w=u&amp;fm_id=<?php echo $row['fm_id']; ?>"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>수정</a>
<a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $row['fm_id']; ?>"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>보기</a>
<a href="./faqmasterformupdate.php?w=d&amp;fm_id=<?php echo $row['fm_id']; ?>" onclick="return delete_confirm(this);"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>삭제</a>
</td>
</tr>
<?php
}
if ($i == 0){
echo '<tr><td colspan="5" class="empty_table"><span>자료가 한건도 없습니다.</span></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&amp;page="); ?>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>

View file

@ -0,0 +1,18 @@
<?php
$sub_menu = '600100';
include_once('./_common.php');
auth_check($auth[$sub_menu], "w");
$html_title = '파일 ';
$g5['title'] = $html_title.'관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

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