리빌더 부분 추가

This commit is contained in:
2025-07-02 14:13:16 +09:00
parent b491c16b5e
commit 68797db562
1200 changed files with 264947 additions and 0 deletions

10
adm/rb/_common.php Normal file
View File

@ -0,0 +1,10 @@
<?php
define('G5_IS_ADMIN', true);
require_once '../../common.php';
require_once G5_ADMIN_PATH . '/admin.lib.php';
if (isset($token)) {
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
}
run_event('admin_common');

210
adm/rb/banner_form.php Normal file
View File

@ -0,0 +1,210 @@
<?php
$sub_menu = '000300';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$bn_id = isset($bn_id) ? preg_replace('/[^0-9]/', '', $bn_id) : '';
$html_title = '배너';
$g5['title'] = $html_title . ' 관리';
if (isset($w) && $w == "u") {
$html_title .= ' 수정';
$sql = "SELECT * FROM rb_banner WHERE bn_id = '$bn_id'";
$bn = sql_fetch($sql);
} else {
$html_title .= ' 입력';
$bn = [
'bn_url' => "http://",
'bn_begin_time' => date("Y-m-d 00:00:00", time()),
'bn_end_time' => date("Y-m-d 00:00:00", time() + (60 * 60 * 24 * 31)),
'bn_id' => ''
];
}
// 접속기기 필드 추가
if (!sql_query("SELECT bn_device FROM rb_banner LIMIT 0, 1")) {
sql_query("ALTER TABLE `rb_banner` ADD `bn_device` varchar(10) NOT NULL DEFAULT '' AFTER `bn_url`", true);
sql_query("UPDATE rb_banner SET bn_device = 'pc'", true);
}
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 isset($w) ? $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 class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">이미지</th>
<td>
<input type="file" name="bn_bimg">
<?php
$bimg_str = "";
$bimg = G5_DATA_PATH . "/banners/" . $bn['bn_id'];
if (isset($bn['bn_id']) && file_exists($bimg)) {
$size = @getimagesize($bimg);
$width = (isset($size[0]) && $size[0] > 750) ? 750 : (isset($size[0]) ? $size[0] : 0);
echo '<input type="checkbox" name="bn_bimg_del" value="1" id="bn_bimg_del"> <label for="bn_bimg_del">삭제</label>';
$bimg_str = '<img src="' . G5_DATA_URL . '/banners/' . $bn['bn_id'] . '?ver=' . G5_SERVER_TIME . '" width="' . $width . '">';
}
if (isset($bn['bn_id']) && $bn['bn_id']) {
echo '<div class="banner_or_img">';
echo $bimg_str;
echo '</div>';
}
?>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_alt">메인타이틀</label></th>
<td>
<?php echo help("메인 타이틀 워딩 입니다."); ?>
<input type="text" name="bn_alt" value="<?php echo isset($bn['bn_alt']) ? get_text($bn['bn_alt']) : ''; ?>" id="bn_alt" class="frm_input" size="80">
</td>
</tr>
<tr>
<th scope="row"><label for="bn_alt">서브워딩</label></th>
<td>
<?php echo help("메인 타이틀 아래에 출력되는 서브워딩 입니다."); ?>
<input type="text" name="bn_alt2" value="<?php echo isset($bn['bn_alt2']) ? get_text($bn['bn_alt2']) : ''; ?>" id="bn_alt2" class="frm_input" size="50">
</td>
</tr>
<tr>
<th scope="row"><label for="bn_alt">기간</label></th>
<td>
<?php echo help("기간 및 워딩을 출력할 수 있습니다."); ?>
<input type="text" name="bn_alt3" value="<?php echo isset($bn['bn_alt3']) ? get_text($bn['bn_alt3']) : ''; ?>" id="bn_alt3" class="frm_input" size="50">
</td>
</tr>
<tr>
<th scope="row"><label for="bn_url">링크</label></th>
<td>
<?php echo help("버튼 클릭시 이동하는 Url입니다."); ?>
<input type="text" name="bn_url" size="70" value="<?php echo isset($bn['bn_url']) ? $bn['bn_url'] : 'http://'; ?>" id="bn_url" class="frm_input">
<input type="text" name="bn_alt4" value="<?php echo isset($bn['bn_alt4']) ? get_text($bn['bn_alt4']) : ''; ?>" id="bn_alt4" class="frm_input" size="30" placeholder="버튼명">
</td>
</tr>
<tr>
<th scope="row"><label for="bn_position">출력그룹</label></th>
<td>
<select name="bn_position" id="bn_position">
<?php echo rb_banner_group_list($bn['bn_position']) ?>
<option value="개별출력" <?php echo get_selected(isset($bn['bn_position']) ? $bn['bn_position'] : '', '개별출력'); ?>>개별출력</option>
<option value="" <?php echo get_selected(isset($bn['bn_position']) ? $bn['bn_position'] : '', ''); ?>>미출력</option>
</select> <input type="text" name="bn_position_use" id="bn_position_use" class="frm_input" placeholder="그룹생성">
<br><br>
<?php echo help("개별출력의 경우 그룹화 되지 않습니다. 그룹이 없는 경우 그룹생성 항목에 직접 입력하시면 생성 됩니다.<br>생성되는 배너는 모두 모듈설정 패널에서 사용하실 수 있습니다."); ?>
<?php echo htmlspecialchars("그룹별 출력 : <?php echo rb_banners('그룹명'); ?>"); ?><br>
<?php echo htmlspecialchars("개별출력 : <?php echo rb_banners('개별출력', '배너ID'); ?>"); ?><br>
<?php echo htmlspecialchars("미출력 : 배너를 출력하지 않습니다."); ?>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_device">출력기기</label></th>
<td>
<?php echo help('배너이미지를 출력할 기기를 선택할 수 있습니다.'); ?>
<?php $bn_device = isset($bn['bn_device']) ? $bn['bn_device'] : null; ?>
<select name="bn_device" id="bn_device">
<option value="both"<?php echo get_selected($bn_device, 'both', true); ?>>PC와 모바일</option>
<option value="pc"<?php echo get_selected($bn_device, 'pc', true); ?>>PC</option>
<option value="mobile"<?php echo get_selected($bn_device, 'mobile', true); ?>>모바일</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_border">테두리</label></th>
<td>
<?php echo help("배너이미지에 테두리를 넣을지를 설정합니다.", 50); ?>
<select name="bn_border" id="bn_border">
<option value="0" <?php echo get_selected(isset($bn['bn_border']) ? $bn['bn_border'] : 0, 0); ?>>사용안함</option>
<option value="1" <?php echo get_selected(isset($bn['bn_border']) ? $bn['bn_border'] : 1, 1); ?>>사용</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_radius">모서리</label></th>
<td>
<?php echo help("배너이미지에 모서리를 둥글게 처리할지를 설정 합니다.", 50); ?>
<select name="bn_radius" id="bn_radius">
<option value="0" <?php echo get_selected(isset($bn['bn_radius']) ? $bn['bn_radius'] : 0, 0); ?>>사용안함</option>
<option value="1" <?php echo get_selected(isset($bn['bn_radius']) ? $bn['bn_radius'] : 1, 1); ?>>사용</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_ad_ico">AD아이콘</label></th>
<td>
<?php echo help("배너이미지에 AD 아이콘을 보여줄지 설정 합니다.", 50); ?>
<select name="bn_ad_ico" id="bn_ad_ico">
<option value="0" <?php echo get_selected(isset($bn['bn_ad_ico']) ? $bn['bn_ad_ico'] : 0, 0); ?>>사용안함</option>
<option value="1" <?php echo get_selected(isset($bn['bn_ad_ico']) ? $bn['bn_ad_ico'] : 1, 1); ?>>사용</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_new_win">새창</label></th>
<td>
<?php echo help("배너이미지 클릭시 새창연결 여부를 선택할 수 있습니다.", 50); ?>
<select name="bn_new_win" id="bn_new_win">
<option value="0" <?php echo get_selected(isset($bn['bn_new_win']) ? $bn['bn_new_win'] : 0, 0); ?>>사용안함</option>
<option value="1" <?php echo get_selected(isset($bn['bn_new_win']) ? $bn['bn_new_win'] : 1, 1); ?>>사용</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_begin_time">게시 시작일시</label></th>
<td>
<?php echo help("배너 게시 시작일시를 설정합니다."); ?>
<input type="text" name="bn_begin_time" value="<?php echo isset($bn['bn_begin_time']) ? $bn['bn_begin_time'] : date("Y-m-d 00:00:00", 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>
<?php echo help("배너 게시 종료일시를 설정합니다."); ?>
<input type="text" name="bn_end_time" value="<?php echo isset($bn['bn_end_time']) ? $bn['bn_end_time'] : date("Y-m-d 00:00:00", time() + 60 * 60 * 24 * 31); ?>" 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>
<?php echo help("배너를 출력할 때 순서를 정합니다. 숫자가 작을수록 먼저 출력됩니다."); ?>
<?php echo order_select("bn_order", isset($bn['bn_order']) ? $bn['bn_order'] : 0); ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./banner_list.php" class="btn_02 btn">목록</a>
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
</div>
</form>
<?php
include_once(G5_ADMIN_PATH . '/admin.tail.php');
?>

View File

@ -0,0 +1,111 @@
<?php
$sub_menu = '000300';
include_once('./_common.php');
check_demo();
if ($w == 'd')
auth_check_menu($auth, $sub_menu, "d");
else
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
@mkdir(G5_DATA_PATH."/banners", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/banners", G5_DIR_PERMISSION);
$bn_bimg = isset($_FILES['bn_bimg']['tmp_name']) ? $_FILES['bn_bimg']['tmp_name'] : null;
$bn_bimg_name = isset($_FILES['bn_bimg']['name']) ? $_FILES['bn_bimg']['name'] : null;
$bn_id = isset($bn_id) ? (int) $bn_id : 0;
$bn_bimg_del = isset($bn_bimg_del) ? $bn_bimg_del : null;
if ($bn_bimg_del) {
@unlink(G5_DATA_PATH."/banners/$bn_id");
}
// 파일이 이미지인지 체크합니다.
if ($bn_bimg || $bn_bimg_name) {
if (!preg_match('/\.(gif|jpe?g|bmp|png)$/i', $bn_bimg_name)) {
alert("이미지 파일만 업로드 할 수 있습니다.");
}
$timg = @getimagesize($bn_bimg);
if ($timg === false || $timg[2] < 1 || $timg[2] > 16) {
alert("이미지 파일만 업로드 할 수 있습니다.");
}
}
$bn_url = isset($bn_url) ? clean_xss_tags($bn_url) : '';
$bn_alt = isset($bn_alt) ? (function_exists('clean_xss_attributes') ? clean_xss_attributes(strip_tags($bn_alt)) : strip_tags($bn_alt)) : '';
$bn_alt2 = isset($bn_alt2) ? (function_exists('clean_xss_attributes') ? clean_xss_attributes(strip_tags($bn_alt2)) : strip_tags($bn_alt2)) : '';
$bn_alt3 = isset($bn_alt3) ? (function_exists('clean_xss_attributes') ? clean_xss_attributes(strip_tags($bn_alt3)) : strip_tags($bn_alt3)) : '';
$bn_alt4 = isset($bn_alt4) ? (function_exists('clean_xss_attributes') ? clean_xss_attributes(strip_tags($bn_alt4)) : strip_tags($bn_alt4)) : '';
if(isset($_POST['bn_position_use']) && $_POST['bn_position_use']) {
$bn_position = $_POST['bn_position_use'];
} else {
$bn_position = $_POST['bn_position'];
}
if ($w == "") {
if (!$bn_bimg_name) alert('배너 이미지를 업로드 하세요.');
sql_query("ALTER TABLE rb_banner AUTO_INCREMENT=1");
$sql = "INSERT INTO rb_banner
SET bn_alt = '$bn_alt',
bn_alt2 = '$bn_alt2',
bn_alt3 = '$bn_alt3',
bn_alt4 = '$bn_alt4',
bn_url = '$bn_url',
bn_device = '$bn_device',
bn_position = '$bn_position',
bn_border = '$bn_border',
bn_radius = '$bn_radius',
bn_ad_ico = '$bn_ad_ico',
bn_new_win = '$bn_new_win',
bn_begin_time = '$bn_begin_time',
bn_end_time = '$bn_end_time',
bn_time = '$now',
bn_hit = '0',
bn_order = '$bn_order'";
sql_query($sql);
$bn_id = sql_insert_id();
} elseif ($w == "u") {
$sql = "UPDATE rb_banner
SET bn_alt = '$bn_alt',
bn_alt2 = '$bn_alt2',
bn_alt3 = '$bn_alt3',
bn_alt4 = '$bn_alt4',
bn_url = '$bn_url',
bn_device = '$bn_device',
bn_position = '$bn_position',
bn_border = '$bn_border',
bn_radius = '$bn_radius',
bn_ad_ico = '$bn_ad_ico',
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);
} elseif ($w == "d") {
@unlink(G5_DATA_PATH."/banners/$bn_id");
$sql = "DELETE FROM rb_banner WHERE bn_id = $bn_id";
$result = sql_query($sql);
}
if ($w == "" || $w == "u") {
if (isset($_FILES['bn_bimg']['name']) && $_FILES['bn_bimg']['name']) {
rb_upload_files($_FILES['bn_bimg']['tmp_name'], $bn_id, G5_DATA_PATH."/banners");
}
goto_url("./banner_form.php?w=u&amp;bn_id=$bn_id");
} else {
goto_url("./banner_list.php");
}
?>

165
adm/rb/banner_list.php Normal file
View File

@ -0,0 +1,165 @@
<?php
$sub_menu = '000300';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
//배너 테이블이 있는지 검사한다.
if(!sql_query(" DESCRIBE rb_banner ", false)) {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_banner` (
`bn_id` int(11) NOT NULL AUTO_INCREMENT,
`bn_alt` varchar(255) NOT NULL DEFAULT '',
`bn_url` varchar(255) NOT NULL DEFAULT '',
`bn_device` varchar(10) NOT NULL DEFAULT '',
`bn_position` varchar(255) NOT NULL DEFAULT '',
`bn_border` tinyint(4) NOT NULL DEFAULT '0',
`bn_radius` tinyint(4) NOT NULL DEFAULT '0',
`bn_ad_ico` tinyint(4) NOT NULL DEFAULT '0',
`bn_new_win` tinyint(4) NOT NULL DEFAULT '0',
`bn_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`bn_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`bn_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`bn_hit` int(11) NOT NULL DEFAULT '0',
`bn_order` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`bn_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
sql_query(" ALTER TABLE `rb_banner` ADD PRIMARY KEY (`bn_id`) ", false);
sql_query(" ALTER TABLE `rb_banner` MODIFY `bn_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;COMMIT ", false);
}
$g5['title'] = '배너관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql_common = " from rb_banner ";
// 테이블의 전체 레코드수만 얻음
$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; // 시작 열을 구함
?>
<div class="local_ov01 local_ov">
<span class="btn_ov01"><span class="ov_txt"> 등록된 배너 </span><span class="ov_num"> <?php echo $total_count; ?>개</span></span>
</div>
<div class="btn_fixed_top">
<a href="./banner_form.php" class="btn_01 btn">배너추가</a>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col" id="th_id">ID</th>
<th scope="col" id="th_dvc">배너 Url</th>
<th scope="col" id="th_inf">배너설명</th>
<th scope="col" id="th_loc">출력그룹</th>
<th scope="col" id="th_dev">출력기기</th>
<th scope="col" id="th_st">시작일시</th>
<th scope="col" id="th_end">종료일시</th>
<th scope="col" id="th_odr">출력순서</th>
<th scope="col" id="th_hit">클릭</th>
<th scope="col" id="th_mng">관리</th>
</tr>
</thead>
<tbody>
<?php
$sql = " select * from rb_banner
order by bn_position, bn_id desc
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$bn_border = $row['bn_border'];
$bn_radius = $row['bn_radius'];
$bn_ad_ico = $row['bn_ad_ico'];
// 새창 띄우기인지
$bn_new_win = ($row['bn_new_win']) ? 'target="_blank"' : '';
$bimg = G5_DATA_PATH.'/banners/'.$row['bn_id'];
if(file_exists($bimg)) {
$size = @getimagesize($bimg);
if($size[0] && $size[0] > 800)
$width = 800;
else
$width = $size[0];
$bn_img = "";
$bn_img .= G5_DATA_URL."/banners/".$row['bn_id'];
}
switch($row['bn_device']) {
case 'pc':
$bn_device = 'PC';
break;
case 'mobile':
$bn_device = '모바일';
break;
default:
$bn_device = 'PC와 모바일';
break;
}
$bn_begin_time = substr($row['bn_begin_time'], 0, 19);
$bn_end_time = substr($row['bn_end_time'], 0, 19);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td headers="th_id" class="td_num"><?php echo $row['bn_id']; ?></td>
<td headers="th_dvc"><a href="<?php echo $bn_img; ?>" target="_blank"><?php echo $bn_img; ?></a></td>
<td headers="th_loc"><?php echo $row['bn_alt']; ?></td>
<td headers="th_loc">
<?php if($row['bn_position'] == "") {
echo "-";
} else {
echo $row['bn_position'];
}
?>
</td>
<td headers="th_loc">
<?php echo $bn_device; ?>
</td>
<td headers="th_st" class="td_datetime"><?php echo $bn_begin_time; ?></td>
<td headers="th_end" class="td_datetime"><?php echo $bn_end_time; ?></td>
<td headers="th_odr" class="td_num"><?php echo $row['bn_order']; ?></td>
<td headers="th_hit" class="td_num"><?php echo number_format($row['bn_hit']); ?></td>
<td headers="th_mng" class="td_mng td_mns_m">
<a href="./banner_form.php?w=u&amp;bn_id=<?php echo $row['bn_id']; ?>" class="btn btn_03">수정</a>
<a href="./banner_form_update.php?w=d&amp;bn_id=<?php echo $row['bn_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02">삭제</a>
</td>
</tr>
<?php
}
if ($i == 0) {
echo '<tr><td colspan="10" 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="); ?>
<div class="local_desc01 local_desc">
<p>
배너를 등록하시면 모듈설정에서 추가하실 수 있습니다.
</p>
</div>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>

252
adm/rb/bbs_form.php Normal file
View File

@ -0,0 +1,252 @@
<?php
$sub_menu = '000400';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
auth_check_menu($auth, $sub_menu, "w");
$bo_table = $_GET['bo_table'];
$write_table = $g5['write_prefix'] . $bo_table;
global $g5, $board;
if($w == "u") {
$wr_id = isset($_REQUEST['wr_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['wr_id']) : 0;
$sql = " select * from {$write_table} where wr_id = '$wr_id' and wr_is_comment = '0' ";
$wr = sql_fetch($sql);
if (! (isset($wr['wr_id']) && $wr['wr_id'])) alert('등록된 게시물이 없습니다.');
$name = get_text($wr['wr_name']);
}
$g5['title'] = '게시물 관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
$qstr .= ($qstr ? '&amp;' : '').'sca='.$sca;
// 게시글에 첨부된 파일을 얻는다. (배열로 반환)
if($w == "u") {
function get_file_qa($bo_table, $wr_id)
{
global $g5, $qstr, $board;
$file['count'] = 0;
$sql = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result))
{
$no = (int) $row['bf_no'];
$bf_content = $row['bf_content'] ? html_purifier($row['bf_content']) : '';
$file[$no]['href'] = G5_BBS_URL."/download.php?bo_table=$bo_table&amp;wr_id=$wr_id&amp;no=$no" . $qstr;
$file[$no]['download'] = $row['bf_download'];
// 4.00.11 - 파일 path 추가
$file[$no]['path'] = G5_DATA_URL.'/file/'.$bo_table;
$file[$no]['size'] = get_filesize($row['bf_filesize']);
$file[$no]['datetime'] = $row['bf_datetime'];
$file[$no]['source'] = addslashes($row['bf_source']);
$file[$no]['bf_content'] = $bf_content;
$file[$no]['content'] = get_text($bf_content);
//$file[$no]['view'] = view_file_link($row['bf_file'], $file[$no]['content']);
$file[$no]['view'] = view_file_link($row['bf_file'], $row['bf_width'], $row['bf_height'], $file[$no]['content']);
$file[$no]['file'] = $row['bf_file'];
$file[$no]['image_width'] = $row['bf_width'] ? $row['bf_width'] : 640;
$file[$no]['image_height'] = $row['bf_height'] ? $row['bf_height'] : 480;
$file[$no]['image_type'] = $row['bf_type'];
$file[$no]['bf_fileurl'] = $row['bf_fileurl'];
$file[$no]['bf_thumburl'] = $row['bf_thumburl'];
$file[$no]['bf_storage'] = $row['bf_storage'];
$file['count']++;
}
return run_replace('get_files', $file, $bo_table, $wr_id);
}
$file = get_file($bo_table, $wr_id);
if (!isset($file_count)) {
$file_count = 0;
}
if (isset($file['count']) && $file_count < $file['count']) {
$file_count = $file['count'];
}
for($i=0;$i<$file_count;$i++){
if(! isset($file[$i])) {
$file[$i] = array('file'=>null, 'source'=>null, 'size'=>null, 'bf_content' => null);
}
}
}
//카테고리
$is_category = false;
$category_option = '';
if ($board['bo_use_category']) {
$ca_name = "";
if (isset($wr['ca_name']))
$ca_name = $wr['ca_name'];
$category_option = get_category_option($bo_table, $ca_name);
$is_category = true;
}
//링크
$is_link = false;
if ($member['mb_level'] >= $board['bo_link_level']) {
$is_link = true;
}
//파일
$is_file = false;
if ($member['mb_level'] >= $board['bo_upload_level']) {
$is_file = true;
}
$is_file_content = false;
if ($board['bo_use_file_content']) {
$is_file_content = true;
}
$file_count = (int)$board['bo_upload_count'];
//공지
$notice_array = explode(',', trim($board['bo_notice']));
$notice_checked = '';
if ($w == 'u') {
if (in_array((int)$wr_id, $notice_array)) {
$notice_checked = 'checked';
}
}
?>
<form name="fitemqaform" method="post" action="./bbs_form_update.php" method="post" enctype="multipart/form-data" onsubmit="return fitemqaform_submit(this);">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<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="bo_table" value="<?php echo $bo_table; ?>">
<input type="hidden" value="html1" name="html">
<?php if($w == "u") { ?>
<input type="hidden" name="wr_id" value="<?php echo $wr_id; ?>">
<input type="hidden" name="mb_id" value="<?php echo $wr['mb_id']; ?>">
<input type="hidden" name="wr_name" value="<?php echo $wr['wr_name']; ?>">
<input type="hidden" name="wr_email" value="<?php echo $wr['wr_email']; ?>">
<?php } else { ?>
<input type="hidden" name="mb_id" value="<?php echo $member['mb_id']; ?>">
<input type="hidden" name="wr_name" value="<?php echo $member['mb_nick']; ?>">
<input type="hidden" name="wr_email" value="<?php echo $member['mb_email']; ?>">
<?php } ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<?php if ($is_category) { ?>
<tr>
<th scope="row">분류</th>
<td class="">
<select name="ca_name" id="ca_name" required class="select">
<option value="">분류를 선택하세요</option>
<?php echo $category_option ?>
</select>
</td>
</tr>
<?php } ?>
<tr>
<th scope="row">옵션</th>
<td class="">
<input type="checkbox" id="notice" name="notice" value="1" <?php echo $notice_checked ?>><label for="notice"> 공지</label>
</td>
</tr>
<?php if($w == "u") { ?>
<tr>
<th scope="row">작성자</th>
<td>
<a href="./member_form.php?w=u&mb_id=<?php echo $wr['mb_id'] ?>"><?php echo $name; ?></a>
</td>
</tr>
<?php } ?>
<tr>
<th scope="row"><label for="wr_subject">제목</label></th>
<td><input type="text" name="wr_subject" value="<?php echo isset($wr['wr_subject']) ? $wr['wr_subject'] : ''; ?>" id="wr_subject" required class="frm_input required" size="95"></td>
</tr>
<tr>
<th scope="row"><label for="wr_content">내용</label></th>
<td><?php echo editor_html('wr_content', get_text(html_purifier(isset($wr['wr_content']) ? $wr['wr_content'] : ''), 0)); ?></td>
</tr>
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
<tr>
<th scope="row">링크 <?php echo $i ?></th>
<td class="">
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){ echo $wr['wr_link'.$i]; } ?>" id="wr_link<?php echo $i ?>" class="frm_input" size="50" placeholder="링크 <?php echo $i ?>">
</td>
</tr>
<?php } ?>
<?php
if($w == "u") {
$file = get_file_qa($bo_table, $wr_id);
}
for ($i=0; $is_file && $i<$file_count; $i++) {
?>
<tr>
<th scope="row"><label for="mb_icon">첨부파일 <?php echo $i+1 ?></label></th>
<td>
<input type="file" name="bf_file[]" id="bf_file_<?php echo $i+1 ?>" title="파일첨부 <?php echo $i+1 ?>" class="frm_input"> 
<?php if ($w == "u" && isset($file[$i]['source']) && $file[$i]['source']) { ?>
<a href="<?php echo $file[$i]['href']; ?>" style="font-weight:bold"><?php echo $file[$i]['source'] ?></a> (<?php echo $file[$i]['size'] ?>) 
<?php } ?>
<?php if ($w == 'u' && isset($file[$i]['file']) && $file[$i]['file']) { ?>
<span class="file_del">
<input type="checkbox" id="bf_file_del<?php echo $i ?>" name="bf_file_del[<?php echo $i; ?>]" value="1"> <label for="bf_file_del<?php echo $i ?>"> 파일삭제</label>
</span>
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./bbs_list.php?<?php echo $qstr; ?>&amp;bo_table=<?php echo $bo_table; ?>" class="btn btn_02">목록</a>
<input type="submit" accesskey='s' value="확인" class="btn_submit btn">
</div>
</form>
<script>
function fitemqaform_submit(f)
{
<?php echo get_editor_js('wr_content'); ?>
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');

521
adm/rb/bbs_form_update.php Normal file
View File

@ -0,0 +1,521 @@
<?php
$sub_menu = '000400';
include_once('./_common.php');
check_demo();
if ($w == 'd')
auth_check_menu($auth, $sub_menu, "d");
else
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$bo_table = $_POST['bo_table'];
global $g5, $board;
if ($w == 'u') {
$wr_id = $_POST['wr_id'];
}
$mb_id = $_POST['mb_id'];
$msg = array();
//분류확인
if($board['bo_use_category']) {
$ca_name = isset($_POST['ca_name']) ? trim($_POST['ca_name']) : '';
if(!$ca_name) {
$msg[] = '<strong>분류</strong>를 선택하세요.';
}
} else {
$ca_name = '';
}
//제목확인
$wr_subject = '';
if (isset($_POST['wr_subject'])) {
$wr_subject = substr(trim($_POST['wr_subject']),0,255);
$wr_subject = preg_replace("#[\\\]+$#", "", $wr_subject);
}
if ($wr_subject == '') {
$msg[] = '<strong>제목</strong>을 입력하세요.';
}
//내용확인
$wr_content = '';
if (isset($_POST['wr_content'])) {
$wr_content = substr(trim($_POST['wr_content']),0,65536);
$wr_content = preg_replace("#[\\\]+$#", "", $wr_content);
}
if ($wr_content == '') {
$msg[] = '<strong>내용</strong>을 입력하세요.';
}
//링크확인
$wr_link1 = '';
if (isset($_POST['wr_link1'])) {
$wr_link1 = substr($_POST['wr_link1'],0,1000);
$wr_link1 = trim(strip_tags($wr_link1));
$wr_link1 = preg_replace("#[\\\]+$#", "", $wr_link1);
}
$wr_link2 = '';
if (isset($_POST['wr_link2'])) {
$wr_link2 = substr($_POST['wr_link2'],0,1000);
$wr_link2 = trim(strip_tags($wr_link2));
$wr_link2 = preg_replace("#[\\\]+$#", "", $wr_link2);
}
//경고출력
$msg = implode('<br>', $msg);
if ($msg) {
alert($msg);
}
$upload_max_filesize = ini_get('upload_max_filesize');
if (empty($_POST)) {
alert("파일 또는 글내용의 크기가 서버에서 설정한 값을 넘어 오류가 발생하였습니다.\\npost_max_size=".ini_get('post_max_size')." , upload_max_filesize=".$upload_max_filesize."\\n서버관리자에게 문의 바랍니다.");
}
$notice_array = explode(",", $board['bo_notice']);
$wr_password = isset($_POST['wr_password']) ? $_POST['wr_password'] : '';
$bf_content = isset($_POST['bf_content']) ? (array) $_POST['bf_content'] : array();
$_POST['html'] = isset($_POST['html']) ? clean_xss_tags($_POST['html'], 1, 1) : '';
$_POST['secret'] = isset($_POST['secret']) ? clean_xss_tags($_POST['secret'], 1, 1) : '';
$_POST['mail'] = isset($_POST['mail']) ? clean_xss_tags($_POST['mail'], 1, 1) : '';
if ($w == 'u') {
$wr = get_write($write_table, $wr_id);
if (!$wr['wr_id']) {
alert("해당 게시물이 존재하지 않습니다.");
}
}
//비밀글 체크
$secret = '';
if (isset($_POST['secret']) && $_POST['secret']) {
if(preg_match('#secret#', strtolower($_POST['secret']), $matches))
$secret = $matches[0];
}
//html 체크
$html = '';
if (isset($_POST['html']) && $_POST['html']) {
if(preg_match('#html(1|2)#', strtolower($_POST['html']), $matches))
$html = $matches[0];
}
//메일발송 체크
$mail = '';
if (isset($_POST['mail']) && $_POST['mail']) {
if(preg_match('#mail#', strtolower($_POST['mail']), $matches))
$mail = $matches[0];
}
//공지체크
$notice = '';
if (isset($_POST['notice']) && $_POST['notice']) {
$notice = $_POST['notice'];
}
//여분필드 체크
for ($i=1; $i<=10; $i++) {
$var = "wr_$i";
$$var = "";
if (isset($_POST['wr_'.$i]) && settype($_POST['wr_'.$i], 'string')) {
$$var = trim($_POST['wr_'.$i]);
}
}
//옵션
$options = array($html,$secret,$mail);
$wr_option = implode(',', array_filter(array_map('trim', $options)));
if ($w == ""){
if ($member['mb_id']) {
$mb_id = $member['mb_id'];
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
$wr_password = '';
$wr_email = addslashes($member['mb_email']);
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
} else {
$mb_id = '';
// 비회원의 경우 이름이 누락되는 경우가 있음
$wr_name = clean_xss_tags(trim($_POST['wr_name']));
if (!$wr_name)
alert('이름은 필히 입력하셔야 합니다.');
$wr_password = get_encrypt_string($wr_password);
$wr_email = get_email_address(trim($_POST['wr_email']));
$wr_homepage = clean_xss_tags($wr_homepage);
}
}
$wr_seo_title = exist_seo_title_recursive('bbs', generate_seo_title($wr_subject), $write_table, $wr_id);
$wr_num = get_next_num($write_table);
$wr_reply = '';
if ($w == "") {
$sql = " insert into $write_table
set wr_num = '$wr_num',
wr_reply = '$wr_reply',
wr_comment = 0,
ca_name = '$ca_name',
wr_option = '$wr_option',
wr_subject = '$wr_subject',
wr_content = '$wr_content',
wr_seo_title = '$wr_seo_title',
wr_link1 = '$wr_link1',
wr_link2 = '$wr_link2',
wr_link1_hit = 0,
wr_link2_hit = 0,
wr_hit = 0,
wr_good = 0,
wr_nogood = 0,
mb_id = '{$member['mb_id']}',
wr_password = '$wr_password',
wr_name = '$wr_name',
wr_email = '$wr_email',
wr_homepage = '$wr_homepage',
wr_datetime = '".G5_TIME_YMDHIS."',
wr_last = '".G5_TIME_YMDHIS."',
wr_ip = '{$_SERVER['REMOTE_ADDR']}' ";
sql_query($sql);
$wr_id = sql_insert_id();
// 부모 아이디에 UPDATE
sql_query(" update $write_table set wr_parent = '$wr_id' where wr_id = '$wr_id' ");
// 새글 INSERT
sql_query(" insert into {$g5['board_new_table']} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '{$bo_table}', '{$wr_id}', '{$wr_id}', '".G5_TIME_YMDHIS."', '{$member['mb_id']}' ) ");
// 게시글 1 증가
sql_query("update {$g5['board_table']} set bo_count_write = bo_count_write + 1 where bo_table = '{$bo_table}'");
// 공지처리
if ($w == '') {
if ($notice) {
$bo_notice = $wr_id.($board['bo_notice'] ? ",".$board['bo_notice'] : '');
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
}
} else {
}
} else if($w == "u") {
if ($member['mb_id']) {
// 자신의 글이라면
if ($member['mb_id'] === $wr['mb_id']) {
$mb_id = $member['mb_id'];
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
$wr_email = addslashes($member['mb_email']);
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
} else {
$mb_id = $wr['mb_id'];
if(isset($_POST['wr_name']) && $_POST['wr_name'])
$wr_name = clean_xss_tags(trim($_POST['wr_name']));
else
$wr_name = addslashes(clean_xss_tags($wr['wr_name']));
if(isset($_POST['wr_email']) && $_POST['wr_email'])
$wr_email = get_email_address(trim($_POST['wr_email']));
else
$wr_email = addslashes($wr['wr_email']);
if(isset($_POST['wr_homepage']) && $_POST['wr_homepage'])
$wr_homepage = addslashes(clean_xss_tags($_POST['wr_homepage']));
else
$wr_homepage = addslashes(clean_xss_tags($wr['wr_homepage']));
}
} else {
$mb_id = "";
// 비회원의 경우 이름이 누락되는 경우가 있음
if (!trim($wr_name)) alert("이름은 필히 입력하셔야 합니다.");
$wr_name = clean_xss_tags(trim($_POST['wr_name']));
$wr_email = get_email_address(trim($_POST['wr_email']));
}
$sql_password = $wr_password ? " , wr_password = '".get_encrypt_string($wr_password)."' " : "";
$sql_ip = '';
if (!$is_admin)
$sql_ip = " , wr_ip = '{$_SERVER['REMOTE_ADDR']}' ";
$sql = " update {$write_table}
set ca_name = '{$ca_name}',
wr_option = '{$wr_option}',
wr_subject = '{$wr_subject}',
wr_content = '{$wr_content}',
wr_seo_title = '$wr_seo_title',
wr_link1 = '{$wr_link1}',
wr_link2 = '{$wr_link2}',
mb_id = '{$mb_id}',
wr_name = '{$wr_name}',
wr_email = '{$wr_email}',
wr_homepage = '{$wr_homepage}'
{$sql_ip}
{$sql_password}
where wr_id = '{$wr['wr_id']}' ";
sql_query($sql);
// 분류가 수정되는 경우 해당되는 코멘트의 분류명도 모두 수정함
// 코멘트의 분류를 수정하지 않으면 검색이 제대로 되지 않음
$sql = " update {$write_table} set ca_name = '{$ca_name}' where wr_parent = '{$wr['wr_id']}' ";
sql_query($sql);
$bo_notice = board_notice($board['bo_notice'], $wr_id, $notice);
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
// 글을 수정한 경우에는 제목이 달라질수도 있으니 static variable 를 새로고침합니다.
$write = get_write( $write_table, $wr['wr_id'], false);
}
// 파일개수 체크
$file_count = 0;
$upload_count = (isset($_FILES['bf_file']['name']) && is_array($_FILES['bf_file']['name'])) ? count($_FILES['bf_file']['name']) : 0;
for ($i=0; $i<$upload_count; $i++) {
if($_FILES['bf_file']['name'][$i] && is_uploaded_file($_FILES['bf_file']['tmp_name'][$i]))
$file_count++;
}
if($w == 'u') {
$file = get_file($bo_table, $wr_id);
if($file_count && (int)$file['count'] > $board['bo_upload_count'])
alert('기존 파일을 삭제하신 후 첨부파일을 '.number_format($board['bo_upload_count']).'개 이하로 업로드 해주십시오.');
} else {
if($file_count > $board['bo_upload_count'])
alert('첨부파일을 '.number_format($board['bo_upload_count']).'개 이하로 업로드 해주십시오.');
}
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
@mkdir(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION);
$chars_array = array_merge(range(0,9), range('a','z'), range('A','Z'));
// 가변 파일 업로드
$file_upload_msg = '';
$upload = array();
if(isset($_FILES['bf_file']['name']) && is_array($_FILES['bf_file']['name'])) {
for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
$upload[$i]['file'] = '';
$upload[$i]['source'] = '';
$upload[$i]['filesize'] = 0;
$upload[$i]['image'] = array();
$upload[$i]['image'][0] = 0;
$upload[$i]['image'][1] = 0;
$upload[$i]['image'][2] = 0;
$upload[$i]['fileurl'] = '';
$upload[$i]['thumburl'] = '';
$upload[$i]['storage'] = '';
// 삭제에 체크가 되어있다면 파일을 삭제합니다.
if (isset($_POST['bf_file_del'][$i]) && $_POST['bf_file_del'][$i]) {
$upload[$i]['del_check'] = true;
$row = sql_fetch(" select * from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' ");
$delete_file = run_replace('delete_file_path', G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '', $row['bf_file']), $row);
if( file_exists($delete_file) ){
@unlink($delete_file);
}
// 썸네일삭제
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row['bf_file'])) {
delete_board_thumbnail($bo_table, $row['bf_file']);
}
}
else
$upload[$i]['del_check'] = false;
$tmp_file = $_FILES['bf_file']['tmp_name'][$i];
$filesize = $_FILES['bf_file']['size'][$i];
$filename = $_FILES['bf_file']['name'][$i];
$filename = get_safe_filename($filename);
// 서버에 설정된 값보다 큰파일을 업로드 한다면
if ($filename) {
if ($_FILES['bf_file']['error'][$i] == 1) {
$file_upload_msg .= '\"'.$filename.'\" 파일의 용량이 서버에 설정('.$upload_max_filesize.')된 값보다 크므로 업로드 할 수 없습니다.\\n';
continue;
}
else if ($_FILES['bf_file']['error'][$i] != 0) {
$file_upload_msg .= '\"'.$filename.'\" 파일이 정상적으로 업로드 되지 않았습니다.\\n';
continue;
}
}
if (is_uploaded_file($tmp_file)) {
// 관리자가 아니면서 설정한 업로드 사이즈보다 크다면 건너뜀
if (!$is_admin && $filesize > $board['bo_upload_size']) {
$file_upload_msg .= '\"'.$filename.'\" 파일의 용량('.number_format($filesize).' 바이트)이 게시판에 설정('.number_format($board['bo_upload_size']).' 바이트)된 값보다 크므로 업로드 하지 않습니다.\\n';
continue;
}
//=================================================================\
// 090714
// 이미지나 플래시 파일에 악성코드를 심어 업로드 하는 경우를 방지
// 에러메세지는 출력하지 않는다.
//-----------------------------------------------------------------
$timg = @getimagesize($tmp_file);
// image type
if ( preg_match("/\.({$config['cf_image_extension']})$/i", $filename) ||
preg_match("/\.({$config['cf_flash_extension']})$/i", $filename) ) {
if ($timg['2'] < 1 || $timg['2'] > 18)
continue;
}
//=================================================================
$upload[$i]['image'] = $timg;
// 4.00.11 - 글답변에서 파일 업로드시 원글의 파일이 삭제되는 오류를 수정
if ($w == 'u') {
// 존재하는 파일이 있다면 삭제합니다.
$row = sql_fetch(" select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' ");
if(isset($row['bf_file']) && $row['bf_file']){
$delete_file = run_replace('delete_file_path', G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '', $row['bf_file']), $row);
if( file_exists($delete_file) ){
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row['bf_file']);
}
// 이미지파일이면 썸네일삭제
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row['bf_file'])) {
delete_board_thumbnail($bo_table, $row['bf_file']);
}
}
}
// 프로그램 원래 파일명
$upload[$i]['source'] = $filename;
$upload[$i]['filesize'] = $filesize;
// 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함
$filename = preg_replace("/\.(php|pht|phtm|htm|cgi|pl|exe|jsp|asp|inc|phar)/i", "$0-x", $filename);
shuffle($chars_array);
$shuffle = implode('', $chars_array);
// 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925)
$upload[$i]['file'] = md5(sha1($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename);
$dest_file = G5_DATA_PATH.'/file/'.$bo_table.'/'.$upload[$i]['file'];
// 업로드가 안된다면 에러메세지 출력하고 죽어버립니다.
$error_code = move_uploaded_file($tmp_file, $dest_file) or die($_FILES['bf_file']['error'][$i]);
// 올라간 파일의 퍼미션을 변경합니다.
chmod($dest_file, G5_FILE_PERMISSION);
$dest_file = run_replace('write_update_upload_file', $dest_file, $board, $wr_id, $w);
$upload[$i] = run_replace('write_update_upload_array', $upload[$i], $dest_file, $board, $wr_id, $w);
}
} // end for
} // end if
// 나중에 테이블에 저장하는 이유는 $wr_id 값을 저장해야 하기 때문입니다.
for ($i=0; $i<count($upload); $i++)
{
$upload[$i]['source'] = sql_real_escape_string($upload[$i]['source']);
$bf_content[$i] = isset($bf_content[$i]) ? sql_real_escape_string($bf_content[$i]) : '';
$bf_width = isset($upload[$i]['image'][0]) ? (int) $upload[$i]['image'][0] : 0;
$bf_height = isset($upload[$i]['image'][1]) ? (int) $upload[$i]['image'][1] : 0;
$bf_type = isset($upload[$i]['image'][2]) ? (int) $upload[$i]['image'][2] : 0;
$row = sql_fetch(" select count(*) as cnt from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' ");
if ($row['cnt'])
{
// 삭제에 체크가 있거나 파일이 있다면 업데이트를 합니다.
// 그렇지 않다면 내용만 업데이트 합니다.
if ($upload[$i]['del_check'] || $upload[$i]['file'])
{
$sql = " update {$g5['board_file_table']}
set bf_source = '{$upload[$i]['source']}',
bf_file = '{$upload[$i]['file']}',
bf_content = '{$bf_content[$i]}',
bf_fileurl = '{$upload[$i]['fileurl']}',
bf_thumburl = '{$upload[$i]['thumburl']}',
bf_storage = '{$upload[$i]['storage']}',
bf_filesize = '".(int)$upload[$i]['filesize']."',
bf_width = '".$bf_width."',
bf_height = '".$bf_height."',
bf_type = '".$bf_type."',
bf_datetime = '".G5_TIME_YMDHIS."'
where bo_table = '{$bo_table}'
and wr_id = '{$wr_id}'
and bf_no = '{$i}' ";
sql_query($sql);
}
else
{
$sql = " update {$g5['board_file_table']}
set bf_content = '{$bf_content[$i]}'
where bo_table = '{$bo_table}'
and wr_id = '{$wr_id}'
and bf_no = '{$i}' ";
sql_query($sql);
}
}
else
{
$sql = " insert into {$g5['board_file_table']}
set bo_table = '{$bo_table}',
wr_id = '{$wr_id}',
bf_no = '{$i}',
bf_source = '{$upload[$i]['source']}',
bf_file = '{$upload[$i]['file']}',
bf_content = '{$bf_content[$i]}',
bf_fileurl = '{$upload[$i]['fileurl']}',
bf_thumburl = '{$upload[$i]['thumburl']}',
bf_storage = '{$upload[$i]['storage']}',
bf_download = 0,
bf_filesize = '".(int)$upload[$i]['filesize']."',
bf_width = '".$bf_width."',
bf_height = '".$bf_height."',
bf_type = '".$bf_type."',
bf_datetime = '".G5_TIME_YMDHIS."' ";
sql_query($sql);
run_event('write_update_file_insert', $bo_table, $wr_id, $upload[$i], $w);
}
}
// 업로드된 파일 내용에서 가장 큰 번호를 얻어 거꾸로 확인해 가면서
// 파일 정보가 없다면 테이블의 내용을 삭제합니다.
$row = sql_fetch(" select max(bf_no) as max_bf_no from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' ");
for ($i=(int)$row['max_bf_no']; $i>=0; $i--)
{
$row2 = sql_fetch(" select bf_file from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' ");
// 정보가 있다면 빠집니다.
if (isset($row2['bf_file']) && $row2['bf_file']) break;
// 그렇지 않다면 정보를 삭제합니다.
sql_query(" delete from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' ");
}
// 파일의 개수를 게시물에 업데이트 한다.
$row = sql_fetch(" select count(*) as cnt from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' ");
sql_query(" update {$write_table} set wr_file = '{$row['cnt']}' where wr_id = '{$wr_id}' ");
// 자동저장된 레코드를 삭제한다.
sql_query(" delete from {$g5['autosave_table']} where as_uid = '{$uid}' ");
//------------------------------------------------------------------------------
delete_cache_latest($bo_table);
if ($file_upload_msg) {
alert($file_upload_msg);
}
if($w == "u") {
goto_url("./bbs_form.php?w=u&amp;wr_id=$wr_id&amp;sca=$sca&amp;$qstr&amp;bo_table=$bo_table");
} else if ($w == "") {
goto_url("./bbs_list.php?$qstr&amp;bo_table=$bo_table");
}

231
adm/rb/bbs_list.php Normal file
View File

@ -0,0 +1,231 @@
<?php
$sub_menu = '000400';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '게시물 관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
add_stylesheet('<link rel="stylesheet" href="'.G5_ADMIN_URL.'/rb/css/style.css">', 1);
$bo_table = isset($_GET['bo_table']) ? $_GET['bo_table'] : '';
$write_table = isset($g5['write_prefix']) ? $g5['write_prefix'] . $bo_table : '';
global $board;
$where = " where wr_is_comment = 0 and ";
$sql_search = "";
if ($stx != "") {
if ($sfl != "") {
$sql_search .= " $where $sfl like '%$stx%' ";
$where = " and ";
}
if ($save_stx != $stx)
$page = 1;
}
if ($sca != "") {
$sql_search .= " and ca_id like '$sca%' ";
}
//if ($sfl == "") $sfl = "it_name";
if (!$sst) {
$sst = "wr_id";
$sod = "desc";
}
if ($stx) {
$sql_common = " from {$write_table} ";
} else {
$sql_common = " from {$write_table} where wr_is_comment = 0 ";
}
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = isset($row['cnt']) ? $row['cnt'] : 0;
$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 $sst $sod, wr_id desc
limit $from_record, $rows ";
$result = sql_query($sql);
//$qstr = 'page='.$page.'&amp;sst='.$sst.'&amp;sod='.$sod.'&amp;stx='.$stx;
$qstr .= ($qstr ? '&amp;' : '').'sca='.$sca.'&amp;save_stx='.$stx;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'?bo_table='.$bo_table.'" class="ov_listall">전체목록</a>';
//제외할 게시판이 있다면 아래 예제와 같이 추가
//$sql_wheres = " where (1) ";
//$sql_wheres .= " and bo_table != 'aaa' ";
//$sql_wheres .= " and bo_table != 'bbb' ";
//$sql_wheres .= " and bo_table != 'ccc' ";
$sql_wheres = isset($sql_wheres) ? $sql_wheres : '';
$sql_b = "SELECT bo_table, bo_subject FROM " . (isset($g5['board_table']) ? $g5['board_table'] : '') . " " . $sql_wheres . " ORDER BY bo_mobile_subject";
$res_b = sql_query($sql_b);
//
?>
<form name="fcategory" method="get" class="local_sch01 local_sch">
<div class="local_ov01 local_ov">
<select name="bo_table" onchange="this.form.submit();" class="select">
<option value=''>게시판 선택</option>
<?php
for ($i = 0; $row_b = sql_fetch_array($res_b); $i++) {
$bo_table_id = isset($row_b['bo_table']) ? $row_b['bo_table'] : '';
$bo_table_tit = isset($row_b['bo_subject']) ? $row_b['bo_subject'] : '';
$bo_table_partner_txt = isset($bo_table_partner_txt) ? $bo_table_partner_txt : '';
?>
<option value="<?php echo $bo_table_id ?>" <?php if (isset($bo_table) && $bo_table == $bo_table_id) { ?>selected<?php } ?>><?php echo $bo_table_partner_txt; ?><?php echo $bo_table_tit; ?></option>
<?php
}
?>
</select>
<!--
<?php echo $listall; ?>
-->
<?php if($bo_table) { ?>
<span class="btn_ov01"><span class="ov_txt"> <?php echo $board['bo_mobile_subject']; ?> </span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
<?php } else { ?>
<span class="btn_ov01"><span class="ov_txt"> 미선택</span><span class="ov_num">게시판을 선택해주세요.</span></span>
<?php } ?>
</div>
</form>
<!--
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="save_stx" value="<?php echo $stx; ?>">
<input type="hidden" name="bo_table" value="<?php echo $bo_table; ?>">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="wr_name" <?php echo get_selected($sfl, 'wr_name'); ?>>작성자</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="frm_input required">
<input type="submit" value="검색" class="btn_submit">
</form>
-->
<form name="fitemqalist" method="post" action="./bbs_list_update.php" onsubmit="return fitemqalist_submit(this);" autocomplete="off">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<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="bo_table" value="<?php echo $bo_table; ?>">
<div class="tbl_head01 tbl_wrap" id="itemqalist">
<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('wr_subject'); ?>제목</a></th>
<th scope="col"><?php echo subject_sort_link('wr_datetime'); ?>작성일</a></th>
<th scope="col"><?php echo subject_sort_link('wr_name'); ?>작성자</a></th>
<th scope="col"><?php echo subject_sort_link('wr_hit'); ?>조회</a></th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$row['wr_subject'] = $row['wr_subject'];
$mb_info = get_member($row['mb_id']);
$name = get_sideview($row['mb_id'], get_text($mb_info['mb_nick']), $mb_info['mb_email'], $mb_info['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 get_text($row['wr_subject']) ?></label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i; ?>">
<input type="hidden" name="wr_id[<?php echo $i; ?>]" value="<?php echo $row['wr_id']; ?>">
</td>
<td class="td_left">
<?php if($row['ca_name']) { ?>[<?php echo $row['ca_name']; ?>]<?php } ?> <a href="./bbs_form.php?w=u&amp;wr_id=<?php echo $row['wr_id']; ?>&amp;<?php echo $qstr; ?>&amp;bo_table=<?php echo $bo_table; ?>"><?php echo get_text($row['wr_subject']); ?></a>
</td>
<td class="td_datetime"><?php echo $row['wr_datetime']; ?></td>
<td class="td_name sv_use" nowrap><div><?php echo $name ?></div></td>
<td class="td_mng td_mng_s"><?php echo $row['wr_hit']; ?></td>
<td class="td_mng td_mng_s">
<a href="./bbs_form.php?w=u&amp;wr_id=<?php echo $row['wr_id']; ?>&amp;<?php echo $qstr; ?>&amp;bo_table=<?php echo $bo_table; ?>" class="btn btn_03"><span class="sound_only"><?php echo get_text($row['wr_subject']); ?> </span>수정</a>
</td>
</tr>
<?php
}
if ($i == 0) {
if($bo_table) {
echo '<tr><td colspan="6" class="empty_table"><span>게시물이 없습니다.</span></td></tr>';
} else {
echo '<tr><td colspan="6" class="empty_table"><span>게시판을 선택해주세요.</span></td></tr>';
}
}
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
<?php if(!$bo_table) { ?>
<a href="javascript:alert('게시판을 선택해주세요.');" id="bo_add" class="btn_01 btn">게시글 등록</a>
<?php } else { ?>
<a href="./bbs_form.php?bo_table=<?php echo $bo_table; ?>" id="bo_add" class="btn_01 btn">게시글 등록</a>
<?php } ?>
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;bo_table=$bo_table&amp;page="); ?>
<script>
function fitemqalist_submit(f)
{
if (!is_checked("chk[]")) {
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');

View File

@ -0,0 +1,38 @@
<?php
$sub_menu = '000400';
include_once('./_common.php');
check_demo();
check_admin_token();
$count_post_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
$bo_table = $_POST['bo_table'];
$write_table = $g5['write_prefix'] . $bo_table;
if (! $count_post_chk) {
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
}
if ($_POST['act_button'] == "선택삭제") {
auth_check_menu($auth, $sub_menu, 'd');
for ($i=0; $i<$count_post_chk; $i++) {
// 실제 번호를 넘김
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$iwr_id = isset($_POST['wr_id'][$i]) ? (int) $_POST['wr_id'][$k] : 0;
// 게시글과 댓글 삭제
sql_query(" delete from {$write_table} where wr_parent = '{$iwr_id}' ");
// 최근게시물 삭제
sql_query(" delete from {$g5['board_new_table']} where bo_table = '{$bo_table}' and wr_parent = '{$iwr_id}' ");
// 스크랩 삭제
sql_query(" delete from {$g5['scrap_table']} where bo_table = '{$bo_table}' and wr_id = '{$iwr_id}' ");
}
}
goto_url("./bbs_list.php?sca=$sca&amp;sst=$sst&amp;sod=$sod&amp;sfl=$sfl&amp;stx=$stx&amp;page=$page&amp;bo_table=$bo_table");

17
adm/rb/config_form.php Normal file
View File

@ -0,0 +1,17 @@
<?php
$sub_menu = '000100';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
$g5['title'] = '환경설정';
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
메인페이지 > 우측 하단의 환경설정 버튼을 이용해주세요.<br>
(추후 업데이트 예정)
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');

7
adm/rb/css/style.css Normal file
View File

@ -0,0 +1,7 @@
@charset "utf-8";
.border_box_adm {border:1px solid #ddd; padding: 15px 20px 15px 20px; margin-bottom: 20px; box-sizing: border-box;}
.td_name.sv_use a img {height: 12px; margin-left: 2px;}
.td_name.sv_use a .profile_img img {height:22px;}
.td_name.sv_use div .sv_wrap .sv {width: 100px !important;}
.sv_wrap .sv a {display: block !important;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

287
adm/rb/memo_form.php Normal file
View File

@ -0,0 +1,287 @@
<?php
$sub_menu = '000630';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
add_stylesheet('<link rel="stylesheet" href="./css/style.css">', 0);
$g5['title'] = '쪽지 관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
// 메세지 목록처리
$where = " where me_recv_mb_id != '' and ";
$sql_search = "";
if ($stx != "") {
if ($sfl != "") {
$sql_search .= " $where $sfl like '%$stx%' ";
$where = " and ";
}
if ($save_stx != $stx)
$page = 1;
}
if (!$sst) {
$sst = "me_id";
$sod = "desc";
}
$sql_common = " from {$g5['memo_table']} ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql_list = " select count(*) as cnt " . $sql_common;
$list = sql_fetch($sql_list);
$total_count = isset($list['cnt']) ? $list['cnt'] : 0;
$rows = 10;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql_is = " select *
$sql_common
order by $sst $sod
limit $from_record, $rows ";
$result_is = sql_query($sql_is);
$qstr .= ($qstr ? '&amp;' : '').'save_stx='.$stx;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
?>
<style>
.chat_list_image img {height: 40px; width: auto; border-radius: 8px;}
.view_image img {height: 40px; width: auto; border-radius: 8px;}
.chat_list_video {border-radius: 8px;}
.chat_list_audio {height:40px;}
.chat_file_icos {margin-right: 5px;}
</style>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="save_stx" value="<?php echo $stx; ?>">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="me_send_mb_id" <?php echo get_selected($sfl, 'me_send_mb_id'); ?>>발송인(ID)</option>
<option value="me_recv_mb_id" <?php echo get_selected($sfl, 'me_recv_mb_id'); ?>>수신인(ID)</option>
<option value="me_send_ip" <?php echo get_selected($sfl, 'me_send_ip'); ?>>발송 IP</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="frm_input required">
<input type="submit" value="검색" class="btn_submit"> <?php echo $listall ?> <span class="btn_ov01"><span class="ov_txt">총 </span><span class="ov_num"> <?php echo number_format($total_count) ?>건 </span></span>
</form>
<form name="fitemqalist" method="post" action="./memo_list_update.php" onsubmit="return fitemqalist_submit(this);" autocomplete="off">
<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" id="itemqalist">
<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('me_send_mb_id'); ?>보냄</a></th>
<th scope="col"><?php echo subject_sort_link('me_recv_mb_id'); ?>받음</a></th>
<th scope="col"><?php echo subject_sort_link('me_memo'); ?>내용</a></th>
<th scope="col"><?php echo subject_sort_link('me_send_datetime'); ?>발송시간</a></th>
<th scope="col"><?php echo subject_sort_link('me_read_datetime'); ?>수신시간</a></th>
<th scope="col"><?php echo subject_sort_link('me_send_ip'); ?>발송IP</a></th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $rowss=sql_fetch_array($result_is); $i++) {
$mbx1 = isset($rowss['me_send_mb_id']) ? get_member($rowss['me_send_mb_id']) : '';
$mbx2 = isset($rowss['me_recv_mb_id']) ? get_member($rowss['me_recv_mb_id']) : '';
$name1 = isset($mbx1['mb_nick']) ? get_text($mbx1['mb_nick']) : '';
$name2 = isset($mbx2['mb_nick']) ? get_text($mbx2['mb_nick']) : '';
$bg = 'bg'.($i%2);
?>
<tr style="background-color:#fff;">
<td class="td_chk">
<label for="chk_<?php echo $i; ?>"></label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i; ?>">
<input type="hidden" name="me_id[<?php echo $i; ?>]" value="<?php echo $rowss['me_id']; ?>">
<input type="hidden" name="mb_id[<?php echo $i; ?>]" value="<?php echo $mbx2['mb_id']; ?>">
</td>
<td class="td_datetime" nowrap>
<?php if(isset($name1) && $name1) { ?>
<a href="../member_form.php?w=u&mb_id=<?php echo $rowss['me_send_mb_id'] ?>"><?php echo $name1; ?></a>
<?php } else { ?>
<span style="color:#ff4081">시스템</span>
<?php } ?>
</td>
<td class="td_datetime" nowrap><a href="../member_form.php?w=u&mb_id=<?php echo $rowss['me_recv_mb_id'] ?>"><?php echo $name2; ?></a></td>
<td class="td_left">
<?php echo $rowss['me_memo']; ?>
</td>
<td class="td_datetime" nowrap><?php echo $rowss['me_send_datetime']; ?></td>
<td class="td_datetime" nowrap><?php echo $rowss['me_read_datetime']; ?></td>
<td class="td_datetime" nowrap>
<?php if(isset($rowss['me_send_ip']) && $rowss['me_send_ip']) { ?>
<?php echo $rowss['me_send_ip']; ?>
<?php } else { ?>
-
<?php } ?>
</td>
</tr>
<?php
}
if ($i == 0) {
echo '<tr><td colspan="7" class="empty_table"><span>메세지가 없습니다.</span></td></tr>';
}
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top" style="right:60px;">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_02">
<input type="submit" name="act_button" value="전체삭제" onclick="document.pressed=this.value" class="btn btn_02">
</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 fitemqalist_submit(f)
{
if(document.pressed == "선택삭제") {
if (!is_checked("chk[]")) {
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
return false;
}
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
if(document.pressed == "전체삭제") {
if(!confirm("전체 데이터를 삭제하시겠습니까?\n삭제된 데이터는 복구되지 않습니다.")) {
return false;
}
}
return true;
}
</script>
<form name="fmemoform" id="fmemoform" action="./memo_update.php" onsubmit="return fmemoform_submit(this);" method="post">
<section>
<h2 class="h2_frm">시스템메세지 전체 발송</h2>
<div class="local_desc01 local_desc">
<p>
쪽지미수신(정보비공개) 회원을 포함하여 발송 됩니다.<br>
10레벨 발송의 경우 최고 관리자는 제외합니다.
</p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="de_admin_company_name">수신그룹</label></th>
<td>
<input type="checkbox" id="all_check" onclick="check_alls(this.form)">
<label for="all_check">전체회원</label> 
<?php for ($i=2; $i<=10; $i++) { ?>
<input type="checkbox" name="mb_level[]" id="mb_level_<?php echo $i ?>" value="<?php echo $i ?>">
<label for="mb_level_<?php echo $i ?>"><?php echo $i ?> 레벨</label> 
<?php } ?>
</td>
</tr>
<tr>
<th scope="row"><label for="de_admin_company_name">시스템메세지</label></th>
<td>
<textarea name="me_memo" id="me_memo" required></textarea>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<div class="btn_fixed_top">
<input type="submit" name="act_button" value="발송" onclick="document.pressed=this.value" class="btn btn_01">
</div>
</form>
<script>
function check_alls(f)
{
var chk = document.getElementsByName("mb_level[]");
for (i=0; i<chk.length; i++)
chk[i].checked = f.all_check.checked;
}
function fmemoform_submit(f)
{
var chk = document.getElementsByName("mb_level[]");
var isChecked = false;
for (i=0; i<chk.length; i++) {
if (chk[i].checked) {
isChecked = true;
break;
}
}
if (!isChecked) {
alert("수신그룹을 선택해주세요.");
return false;
}
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');

View File

@ -0,0 +1,46 @@
<?php
$sub_menu = '000630';
include_once('./_common.php');
check_demo();
check_admin_token();
if ($_POST['act_button'] == "선택삭제") {
$count_post_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
if (! $count_post_chk) {
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
}
auth_check_menu($auth, $sub_menu, 'd');
for ($i = 0; $i < $count_post_chk; $i++) {
// 실제 번호를 넘김
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$ime_id = isset($_POST['me_id'][$k]) ? (int) $_POST['me_id'][$k] : 0;
$imb_id = isset($_POST['mb_id'][$k]) ? $_POST['mb_id'][$k] : '';
// 삭제를 위해 메모 내용을 가져옴
$sqls = "SELECT * FROM {$g5['memo_table']} WHERE me_id = '{$ime_id}'";
$rows = sql_fetch($sqls);
// 삭제
sql_query("DELETE FROM {$g5['memo_table']} WHERE me_id = '{$ime_id}'");
$sql = " update {$g5['member_table']} set mb_memo_cnt = '".get_memo_not_read($imb_id)."' where mb_id = '{$imb_id}' ";
sql_query($sql);
}
} else if ($_POST['act_button'] == "전체삭제") {
// 삭제
sql_query(" DELETE FROM {$g5['memo_table']} ");
sql_query(" update {$g5['member_table']} set mb_memo_cnt = '0' ");
alert('전체 데이터가 삭제 되었습니다.');
}
goto_url("./memo_form.php?sst=$sst&amp;sod=$sod&amp;sfl=$sfl&amp;stx=$stx&amp;page=$page");

46
adm/rb/memo_update.php Normal file
View File

@ -0,0 +1,46 @@
<?php
$sub_menu = '000630';
include_once('./_common.php');
check_demo();
check_admin_token();
$sql_common = " FROM {$g5['member_table']}";
$sql_where = " WHERE (1) AND mb_id NOT IN ('{$config['cf_admin']}') ";
for ($i = 0; $i < count($_POST['mb_level']); $i++) {
$sql = "SELECT * {$sql_common} {$sql_where} AND mb_level = '".sql_escape_string($_POST['mb_level'][$i])."'";
$sql_cnt = sql_fetch ("SELECT COUNT(*) as cnt {$sql_common} {$sql_where} AND mb_level = '".sql_escape_string($_POST['mb_level'][$i])."'");
$result = sql_query($sql);
if (isset($sql_cnt['cnt']) && $sql_cnt['cnt'] > 0) {
while ($row = sql_fetch_array($result)) {
if (!$row['mb_leave_date']) {
$rows_me = sql_fetch("SELECT MAX(me_id) AS new_me_id FROM {$g5['memo_table']}");
$me_id = $rows_me['new_me_id'] + 1;
$send_id = 'system-msg'; // 발송할 아이디
$memo_content = sql_escape_string($_POST['me_memo']);
$from_id = $row['mb_id'];
$sql_m1 = "INSERT INTO {$g5['memo_table']} SET me_id='$me_id', me_recv_mb_id='$from_id', me_send_mb_id='$send_id', me_type='recv', me_send_datetime='".G5_TIME_YMDHIS."', me_memo='$memo_content'";
sql_query($sql_m1);
$sql_m2 = "UPDATE {$g5['member_table']} SET mb_memo_call='$send_id', mb_memo_cnt='".get_memo_not_read($from_id)."' WHERE mb_id='$from_id'";
sql_query($sql_m2);
}
}
alert('시스템메세지를 발송했습니다.');
} else {
alert('시스템메세지를 발송할 회원이 없습니다.');
}
}
?>

212
adm/rb/module_list.php Normal file
View File

@ -0,0 +1,212 @@
<?php
$sub_menu = '000200';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '모듈관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
<?php
#ff4081
if(isset($_GET['tables']) && $_GET['tables'] == "rb_module_shop") {
$table_name = $_GET['tables'];
$cr2 = 'style="background-color:#ff4081"';
$cr1 = "";
} else {
$table_name = "rb_module";
$cr1 = 'style="background-color:#ff4081"';
$cr2 = "";
}
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall" '.$cr1.'>일반모듈</a>';
$listall2 = '<a href="'.$_SERVER['SCRIPT_NAME'].'?tables=rb_module_shop" class="ov_listall" '.$cr2.'>마켓모듈</a>';
$where = " where ";
$sql_search = "";
$sfl = in_array($sfl, array('md_title', 'md_theme', 'md_layout_name')) ? $sfl : '';
if ($stx != "") {
if ($sfl != "") {
$sql_search .= " $where $sfl like '%$stx%' ";
$where = " and ";
}
if (isset($save_stx) && $save_stx && ($save_stx != $stx))
$page = 1;
}
$sql_common = " from {$table_name} ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$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; // 시작 열을 구함
if (!$sst)
{
$sst = "md_id";
$sod = "asc";
}
$sql_order = "order by $sst $sod";
// 출력할 레코드를 얻음
$sql = " select *
$sql_common
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
?>
<div class="local_ov01 local_ov">
<?php echo $listall; ?> <?php echo $listall2; ?>
<span class="btn_ov01"><span class="ov_txt">생성된 모듈 수</span><span class="ov_num"> <?php echo number_format($total_count); ?>개</span></span>
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="save_stx" value="<?php echo $stx; ?>">
<input type="hidden" name="tables" value="<?php echo $table_name; ?>">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="md_title"<?php echo get_selected($sfl, "md_title", true); ?>>모듈명</option>
<option value="md_theme"<?php echo get_selected($sfl, "md_theme", true); ?>>적용테마</option>
<option value="md_layout_name"<?php echo get_selected($sfl, "md_layout_name", true); ?>>적용레이아웃</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="fmodulelist" method="post" action="./modulelistupdate.php" autocomplete="off">
<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="tables" value="<?php echo $table_name; ?>">
<div id="sct" class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col"><?php echo subject_sort_link("md_id"); ?>ID</a></th>
<th scope="col"><?php echo subject_sort_link("md_title"); ?>모듈명</a></th>
<th scope="col"><?php echo subject_sort_link("md_theme"); ?>테마</a></th>
<th scope="col"><?php echo subject_sort_link("md_layout_name"); ?>레이아웃</a></th>
<th scope="col"><?php echo subject_sort_link("md_layout"); ?>섹션</a></th>
<th scope="col"><?php echo subject_sort_link("md_type"); ?>타입</a></th>
<th scope="col"><?php echo subject_sort_link("md_order_id"); ?>진열순서</a></th>
<th scope="col"><?php echo subject_sort_link("md_datetime"); ?>생성일시</a></th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
$s_add = $s_vie = $s_upd = $s_del = '';
for ($i=0; $row=sql_fetch_array($result); $i++)
{
if ($is_admin == 'super')
$s_del = '<a href="./moduleformupdate.php?tables='.$table_name.'&amp;w=d&amp;md_id='.$row['md_id'].'&amp;'.$qstr.'" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only">'.get_text($row['md_title']).' </span>삭제</a> ';
if($row['md_type'] == "latest") {
$md_type = "최신글";
} else if($row['md_type'] == "widget") {
$md_type = "위젯";
} else if($row['md_type'] == "poll") {
$md_type = "투표";
} else if($row['md_type'] == "banner") {
$md_type = "배너";
} else if($row['md_type'] == "item") {
$md_type = "상품";
} else {
$md_type = "-";
}
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_code">
<input type="hidden" name="md_id[<?php echo $i; ?>]" value="<?php echo $row['md_id']; ?>">
<?php echo $row['md_id']; ?>
</td>
<td>
<label for="md_title<?php echo $i; ?>" class="sound_only">모듈명</label>
<input type="text" name="md_title[<?php echo $i; ?>]" value="<?php echo get_text($row['md_title']); ?>" id="md_title<?php echo $i; ?>" class="tbl_input">
</td>
<td>
<label for="md_theme<?php echo $i; ?>" class="sound_only">테마</label>
<input type="text" name="md_theme[<?php echo $i; ?>]" value="<?php echo get_text($row['md_theme']); ?>" id="md_theme<?php echo $i; ?>" class="tbl_input">
</td>
<td>
<label for="md_layout_name<?php echo $i; ?>" class="sound_only">레이아웃</label>
<input type="text" name="md_layout_name[<?php echo $i; ?>]" value="<?php echo get_text($row['md_layout_name']); ?>" id="md_layout_name<?php echo $i; ?>" class="tbl_input">
</td>
<td>
<label for="md_layout<?php echo $i; ?>" class="sound_only">섹션</label>
<input type="text" name="md_layout[<?php echo $i; ?>]" value="<?php echo get_text($row['md_layout']); ?>" id="md_layout<?php echo $i; ?>" class="tbl_input">
</td>
<td>
<label for="md_type<?php echo $i; ?>" class="sound_only">타입</label>
<?php echo $md_type ?>
</td>
<td>
<label for="md_order_id<?php echo $i; ?>" class="sound_only">진열순서</label>
<?php echo $row['md_order_id'] ?>
</td>
<td>
<label for="md_datetime<?php echo $i; ?>" class="sound_only">생성일시</label>
<?php echo $row['md_datetime'] ?>
</td>
<td class="td_mng td_mng_s">
<?php echo $s_del; ?>
</td>
</tr>
<?php }
if ($i == 0) echo "<tr><td colspan=\"9\" class=\"empty_table\">데이터가 없습니다.</td></tr>\n";
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<input type="submit" value="일괄수정" class="btn_submit btn">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?tables=$table_name&amp;$qstr&amp;page="); ?>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');

View File

@ -0,0 +1,27 @@
<?php
$sub_menu = '000200';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "d");
check_admin_token();
$md_id = isset($_REQUEST['md_id']) ? preg_replace('/[^0-9a-z]/i', '', $_REQUEST['md_id']) : '';
$table_name = (isset($_REQUEST['tables']) && $_REQUEST['tables']) ? $_REQUEST['tables'] : 'rb_module';
if( ! $md_id ){
alert('모듈 ID가 없습니다.');
}
if ($w == 'd' && $is_admin != 'super')
alert("최고관리자만 삭제할 수 있습니다.");
if ($w == "d")
{
// 삭제
$sql = " delete from {$table_name} where md_id = '$md_id' ";
sql_query($sql);
}
goto_url("./module_list.php?tables=$table_name&amp;$qstr");

View File

@ -0,0 +1,40 @@
<?php
$sub_menu = '000200';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$post_md_id_count = (isset($_POST['md_id']) && is_array($_POST['md_id'])) ? count($_POST['md_id']) : 0;
$table_name = (isset($_POST['tables']) && $_POST['tables']) ? $_POST['tables'] : 'rb_module';
for ($i=0; $i<$post_md_id_count; $i++)
{
$p_md_title = is_array($_POST['md_title']) ? strip_tags(clean_xss_attributes($_POST['md_title'][$i])) : '';
$posts = array();
$check_keys = array('md_id', 'md_theme', 'md_layout_name', 'md_layout',);
foreach($check_keys as $key){
$posts[$key] = (isset($_POST[$key]) && isset($_POST[$key][$i])) ? $_POST[$key][$i] : '';
}
$sql = " update {$table_name}
set md_title = '".$p_md_title."',
md_theme = '".sql_real_escape_string(strip_tags($posts['md_theme']))."',
md_layout_name = '".sql_real_escape_string(strip_tags($posts['md_layout_name']))."',
md_layout = '".sql_real_escape_string(strip_tags($posts['md_layout']))."'
where md_id = '".sql_real_escape_string($posts['md_id'])."' ";
sql_query($sql);
}
goto_url("./module_list.php?tables=$table_name&amp;$qstr");

6
adm/rb/rb_db_update.php Normal file

File diff suppressed because one or more lines are too long

579
adm/rb/rb_form.php Normal file
View File

@ -0,0 +1,579 @@
<?php
$sub_menu = '000000';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
add_stylesheet('<link rel="stylesheet" href="./css/style.css">', 0);
$g5['title'] = '빌더설정';
include_once (G5_ADMIN_PATH.'/admin.head.php');
// 설치여부 (테이블조회)
$rbx = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_builder' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' ");
$is_rb = $rbx['cnt'];
?>
<?php if($rbx['cnt'] > 0) { ?>
<?php
$sql = " select * from rb_builder limit 1";
$bu = sql_fetch($sql);
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_rb0">빌더정보</a></li>
<li><a href="#anc_rb1">로고설정</a></li>
<li><a href="#anc_rb2">회사정보</a></li>
<li><a href="#anc_rb3">로딩인디케이터</a></li>
<li><a href="#anc_rb6">시스템메세지</a></li>
<li><a href="#anc_rb5">모바일설정</a></li>
<li><a href="#anc_rb4">운영채널</a></li>
</ul>';
?>
<section id="anc_rb0">
<h2 class="h2_frm">빌더정보</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">빌더버전</th>
<td colspan="3">
<?php echo RB_VER ?>
</td>
</tr>
<tr>
<th scope="row">라이선스키</th>
<td colspan="3">
<?php echo help('최초설치 > DB 업데이트시에 자동 생성 됩니다.<br>라이선스키를 공식홈페이지 > 마이페이지 에서 등록해주세요.<br>키 등록이 되지않았거나, 키를 임의로 변경하시는 경우 빌더 업데이트가 불가능 합니다.') ?>
<?php
$key_info = sql_fetch (" select key_no from rb_key limit 1 ");
?>
<?php echo !empty($key_info['key_no']) ? $key_info['key_no'] : '라이선스키가 없습니다. DB업데이트를 진행해주세요.'; ?>
<?php if(!empty($key_info['key_no'])) { ?>
 <a href="javascript:void(0);" class="btn_frmline" style="height:25px; line-height:25px;" id="data-copy">복사하기</a>
<a href="https://rebuilder.co.kr" target="_blank" class="btn_frmline" style="height:25px; line-height:25px;">라이선스키 등록</a>
<input type="hidden" id="data-area" class="data-area" value="<?php echo !empty($key_info['key_no']) ? $key_info['key_no'] : ''; ?>">
<script>
$(document).ready(function() {
$('#data-copy').click(function() {
$('#data-area').attr('type', 'text'); // 화면에서 hidden 처리한 input box type을 text로 일시 변환
$('#data-area').select(); // input에 담긴 데이터를 선택
var copy = document.execCommand('copy'); // clipboard에 데이터 복사
$('#data-area').attr('type', 'hidden'); // input box를 다시 hidden 처리
if (copy) {
alert("라이선스키가 클립보드에 복사 되었습니다."); // 사용자 알림
}
});
});
</script>
<?php } ?>
</td>
</tr>
<tr>
<th scope="row">DB업데이트</th>
<td colspan="3">
<?php echo help('업데이트된 DB가 있는지 확인합니다.') ?>
<a href="./rb_db_update.php" class="btn_frmline">DB 업데이트 실행</a>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<form name="bu_form" id="bu_form" action="./rb_form_update.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="token" value="" id="token">
<input type="hidden" name="install" value="1" id="install">
<section id="anc_rb1">
<h2 class="h2_frm">로고설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">로고 PC</th>
<td>
<?php echo help('PC 버전 로고이미지를 등록하세요.') ?>
<input type="file" name="bu_logo_pc">
<?php
$lp_str = "";
$lpimg = G5_DATA_PATH."/logos/pc";
if (file_exists($lpimg)) {
$size = @getimagesize($lpimg);
if($size[0] && $size[0] > 400)
$width = 400;
else
$width = $size[0];
echo '<input type="checkbox" name="bu_logo_pc_del" value="1" id="bu_logo_pc_del"> <label for="bu_logo_pc_del">삭제</label>';
$lpimg_str = '<img src="'.G5_DATA_URL.'/logos/pc?ver='.G5_SERVER_TIME.'" width="'.$width.'">';
}
if (isset($lpimg_str) && $lpimg_str) {
echo '<br><span style="margin-top:20px; background-color:#f1f1f1; padding:10px 20px 10px 20px; display:inline-block; box-sizing:border-box;">';
echo $lpimg_str;
echo '</span>';
}
?>
</td>
</tr>
<tr>
<th scope="row">로고 PC (화이트)</th>
<td>
<?php echo help('PC 버전 로고이미지(화이트)를 등록하세요.<br>어두운 백그라운드가 사용될 때 변경 됩니다.') ?>
<input type="file" name="bu_logo_pc_w">
<?php
$lpw_str = "";
$lpwimg = G5_DATA_PATH."/logos/pc_w";
if (file_exists($lpwimg)) {
$size = @getimagesize($lpwimg);
if($size[0] && $size[0] > 400)
$width = 400;
else
$width = $size[0];
echo '<input type="checkbox" name="bu_logo_pc_w_del" value="1" id="bu_logo_pc_w_del"> <label for="bu_logo_pc_w_del">삭제</label>';
$lpwimg_str = '<img src="'.G5_DATA_URL.'/logos/pc_w?ver='.G5_SERVER_TIME.'" width="'.$width.'">';
}
if (isset($lpwimg_str) && $lpwimg_str) {
echo '<br><span style="margin-top:20px; background-color:#f1f1f1; padding:10px 20px 10px 20px; display:inline-block; box-sizing:border-box;">';
echo $lpwimg_str;
echo '</span>';
}
?>
</td>
</tr>
<tr>
<th scope="row">로고 Mobile</th>
<td>
<?php echo help('Mobile 버전 로고이미지를 등록하세요.') ?>
<input type="file" name="bu_logo_mo">
<?php
$lm_str = "";
$lmimg = G5_DATA_PATH."/logos/mo";
if (file_exists($lmimg)) {
$size = @getimagesize($lmimg);
if($size[0] && $size[0] > 400)
$width = 400;
else
$width = $size[0];
echo '<input type="checkbox" name="bu_logo_mo_del" value="1" id="bu_logo_mo_del"> <label for="bu_logo_mo_del">삭제</label>';
$lmimg_str = '<img src="'.G5_DATA_URL.'/logos/mo?ver='.G5_SERVER_TIME.'" width="'.$width.'">';
}
if (isset($lmimg_str) && $lmimg_str) {
echo '<br><span style="margin-top:20px; background-color:#f1f1f1; padding:10px 20px 10px 20px; display:inline-block; box-sizing:border-box;">';
echo $lmimg_str;
echo '</span>';
}
?>
</td>
</tr>
<tr>
<th scope="row">로고 Mobile (화이트)</th>
<td>
<?php echo help('Mobile 버전 로고이미지(화이트)를 등록하세요.<br>어두운 백그라운드가 사용될 때 변경 됩니다.') ?>
<input type="file" name="bu_logo_mo_w">
<?php
$lmw_str = "";
$lmwimg = G5_DATA_PATH."/logos/mo_w";
if (file_exists($lmwimg)) {
$size = @getimagesize($lmwimg);
if($size[0] && $size[0] > 400)
$width = 400;
else
$width = $size[0];
echo '<input type="checkbox" name="bu_logo_mo_w_del" value="1" id="bu_logo_mo_w_del"> <label for="bu_logo_mo_w_del">삭제</label>';
$lmwimg_str = '<img src="'.G5_DATA_URL.'/logos/mo_w?ver='.G5_SERVER_TIME.'" width="'.$width.'">';
}
if (isset($lmwimg_str) && $lmwimg_str) {
echo '<br><span style="margin-top:20px; background-color:#f1f1f1; padding:10px 20px 10px 20px; display:inline-block; box-sizing:border-box;">';
echo $lmwimg_str;
echo '</span>';
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_rb2">
<h2 class="h2_frm">하단 회사정보</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">회사명(사이트명)</th>
<td>
<input type="text" name="bu_1" value="<?php echo isset($bu['bu_1']) ? get_sanitize_input($bu['bu_1']) : ''; ?>" id="bu_1" class="frm_input" size="40">
</td>
<th scope="row">대표자명</th>
<td>
<input type="text" name="bu_2" value="<?php echo isset($bu['bu_2']) ? get_sanitize_input($bu['bu_2']) : ''; ?>" id="bu_2" class="frm_input" size="40">
</td>
</tr>
<tr>
<th scope="row">전화번호</th>
<td>
<input type="text" name="bu_3" value="<?php echo isset($bu['bu_3']) ? get_sanitize_input($bu['bu_3']) : ''; ?>" id="bu_3" class="frm_input" size="40">
</td>
<th scope="row">팩스번호</th>
<td>
<input type="text" name="bu_4" value="<?php echo isset($bu['bu_4']) ? get_sanitize_input($bu['bu_4']) : ''; ?>" id="bu_4" class="frm_input" size="40">
</td>
</tr>
<tr>
<th scope="row">사업자등록번호</th>
<td>
<input type="text" name="bu_5" value="<?php echo isset($bu['bu_5']) ? get_sanitize_input($bu['bu_5']) : ''; ?>" id="bu_5" class="frm_input" size="40">
</td>
<th scope="row">통신판매업신고번호</th>
<td>
<input type="text" name="bu_6" value="<?php echo isset($bu['bu_6']) ? get_sanitize_input($bu['bu_6']) : ''; ?>" id="bu_6" class="frm_input" size="40">
</td>
</tr>
<tr>
<th scope="row">부가통신사업자번호</th>
<td>
<input type="text" name="bu_7" value="<?php echo isset($bu['bu_7']) ? get_sanitize_input($bu['bu_7']) : ''; ?>" id="bu_7" class="frm_input" size="40">
</td>
<th scope="row">기타등록번호</th>
<td>
<input type="text" name="bu_8" value="<?php echo isset($bu['bu_8']) ? get_sanitize_input($bu['bu_8']) : ''; ?>" id="bu_8" class="frm_input" size="40">
</td>
</tr>
<tr>
<th scope="row">우편번호</th>
<td>
<input type="text" name="bu_9" value="<?php echo isset($bu['bu_9']) ? get_sanitize_input($bu['bu_9']) : ''; ?>" id="bu_9" class="frm_input" size="40">
</td>
<th scope="row">사업장주소</th>
<td>
<input type="text" name="bu_10" value="<?php echo isset($bu['bu_10']) ? get_sanitize_input($bu['bu_10']) : ''; ?>" id="bu_10" class="frm_input" size="40">
</td>
</tr>
<tr>
<th scope="row">개인정보책임자(이메일)</th>
<td>
<input type="text" name="bu_11" value="<?php echo isset($bu['bu_11']) ? get_sanitize_input($bu['bu_11']) : ''; ?>" id="bu_11" class="frm_input" size="40">
</td>
<th scope="row">카피라이트</th>
<td>
<input type="text" name="bu_12" value="<?php echo isset($bu['bu_12']) ? get_sanitize_input($bu['bu_12']) : ''; ?>" id="bu_12" class="frm_input" size="40">
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_rb3">
<h2 class="h2_frm">로딩인디케이터</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">사용여부</th>
<td colspan="3">
<?php echo help('사용시 로딩 스피너를 표기하며<br>DOM을 포함한 모든 페이지가 준비 되면 사라집니다.') ?>
<input type="checkbox" name="bu_load" value="1" id="bu_load" <?php echo isset($bu['bu_load']) && $bu['bu_load'] ? 'checked' : ''; ?>> <label for="bu_load">사용</label>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_rb6">
<h2 class="h2_frm">시스템메세지</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">수신여부</th>
<td colspan="3">
<?php echo help('시스템메세지 관리자 수신 여부를 설정할 수 있습니다.<br>신규 게시물등록, 주문접수, 회원가입 등 웹사이트에서 일어나는 주요 활동에 대한 알림 입니다.') ?>
<input type="checkbox" name="bu_systemmsg_use" value="1" id="bu_systemmsg_use" <?php echo isset($bu['bu_systemmsg_use']) && $bu['bu_systemmsg_use'] ? 'checked' : ''; ?>> <label for="bu_systemmsg_use">수신함</label>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_rb5">
<h2 class="h2_frm">모바일설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">Viewport</th>
<td colspan="3">
<?php echo help('빌더의 기본 뷰포트 값은 0.9 입니다. 값이 없으면 0.9 로 적용되며,<br>/theme/테마폴더/head.sub.php 파일의 meta name="viewport" 값이 변경 됩니다.<br>숫자가 작을수록 오브젝트의 크기가 축소되며, 1이 정비율 입니다.<br>커스텀 테마를 사용하시는 경우 적용이 되지않을 수 있습니다.') ?>
<input type="text" name="bu_viewport" value="<?php echo isset($bu['bu_viewport']) ? get_sanitize_input($bu['bu_viewport']) : ''; ?>" id="bu_viewport" class="frm_input" size="10">
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_rb4">
<h2 class="h2_frm">운영채널</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">카카오채널 URL</th>
<td>
<input type="text" name="bu_sns1" value="<?php echo isset($bu['bu_sns1']) ? get_sanitize_input($bu['bu_sns1']) : ''; ?>" id="bu_sns1" class="frm_input" size="70">
</td>
<th scope="row">카카오채널 상담 URL</th>
<td>
<input type="text" name="bu_sns2" value="<?php echo isset($bu['bu_sns2']) ? get_sanitize_input($bu['bu_sns2']) : ''; ?>" id="bu_sns2" class="frm_input" size="70">
</td>
</tr>
<tr>
<th scope="row">유튜브 URL</th>
<td>
<input type="text" name="bu_sns3" value="<?php echo isset($bu['bu_sns3']) ? get_sanitize_input($bu['bu_sns3']) : ''; ?>" id="bu_sns3" class="frm_input" size="70">
</td>
<th scope="row">인스타그램 URL</th>
<td>
<input type="text" name="bu_sns4" value="<?php echo isset($bu['bu_sns4']) ? get_sanitize_input($bu['bu_sns4']) : ''; ?>" id="bu_sns4" class="frm_input" size="70">
</td>
</tr>
<tr>
<th scope="row">페이스북 URL</th>
<td>
<input type="text" name="bu_sns5" value="<?php echo isset($bu['bu_sns5']) ? get_sanitize_input($bu['bu_sns5']) : ''; ?>" id="bu_sns5" class="frm_input" size="70">
</td>
<th scope="row">트위터 URL</th>
<td>
<input type="text" name="bu_sns6" value="<?php echo isset($bu['bu_sns6']) ? get_sanitize_input($bu['bu_sns6']) : ''; ?>" id="bu_sns6" class="frm_input" size="70">
</td>
</tr>
<tr>
<th scope="row">네이버블로그 URL</th>
<td>
<input type="text" name="bu_sns7" value="<?php echo isset($bu['bu_sns7']) ? get_sanitize_input($bu['bu_sns7']) : ''; ?>" id="bu_sns7" class="frm_input" size="70">
</td>
<th scope="row">텔레그램 URL</th>
<td>
<input type="text" name="bu_sns8" value="<?php echo isset($bu['bu_sns8']) ? get_sanitize_input($bu['bu_sns8']) : ''; ?>" id="bu_sns8" class="frm_input" size="70">
</td>
</tr>
<tr>
<th scope="row">SIR URL</th>
<td>
<input type="text" name="bu_sns9" value="<?php echo isset($bu['bu_sns9']) ? get_sanitize_input($bu['bu_sns9']) : ''; ?>" id="bu_sns9" class="frm_input" size="70">
</td>
<th scope="row">기타 URL</th>
<td>
<input type="text" name="bu_sns10" value="<?php echo isset($bu['bu_sns10']) ? get_sanitize_input($bu['bu_sns10']) : ''; ?>" id="bu_sns10" class="frm_input" size="70">
</td>
</tr>
</tbody>
</table>
</div>
</section>
<div class="btn_fixed_top">
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
</div>
</form>
<?php } else { ?>
<section>
<h2 class="h2_frm">그누보드 리빌더</h2>
<div class="local_desc01 local_desc">
그누보드 리빌더를 사용해주셔서 고맙습니다.<br><br>
리빌더는 그누보드의 기능을 모두 그대로 사용하면서 폴더의 추가만으로<br>
손쉽게 웹사이트를 완성하고 다양한 편의기능을 사용할 수 있습니다.<br><br>
<b>본 페이지는 테이블이 설치되면 더이상 볼 수 없습니다.</b>
</div>
</section>
<section>
<h2 class="h2_frm">빌더 설치안내 및 주의사항</h2>
<div class="local_desc01 local_desc">
빌더 구동에 필요한 테이블이 설치 됩니다.<br><br>
rb_ 로 시작하는 동일한 테이블명 있는경우 테이블 생성이 되지 않을 수 있으며<br>
성능 보장을 위해 가급적 PHP7.X ~ PHP8.X 버전을 사용해주세요.<br>
<strong>DB 테이블 설치 후 빌더설정 > [DB 업데이트] 를 반드시 실행해주세요.</strong><br><br>
--------------<br>
<b>생성되는 테이블 목록</b><br>
rb_builder (빌더설정), rb_config (환경설정), rb_module (모듈설정)<br>
rb_banner (배너관리), rb_seo (SEO설정)<br>
--------------<br><br>
테이블 설치 후 <b>환경설정 > 테마설정</b> 메뉴에서<br>
<b>Rebuilder Basic 테마를 적용</b> 해주시고<br>
테마적용 직후 뜨는 팝업창에서 <b>[확인]</b> 을 클릭합니다.<br><br>
[확인] 을 클릭하지 못하였다면 <b>환경설정 > 기본환경설정</b> 메뉴에서<br>
<b>[테마 스킨설정 가져오기], [테마 회원스킨설정 가져오기]</b> 를 클릭하신 후<br>
반드시 <b>[확인]</b> 을 클릭 해주세요.<br><br>
설치가 완료 되었다면, <b>관리자모드 > 게시판관리</b> 에서<br>
게시판의 스킨을 <b>rb.XXX 로 변경</b> 합니다.<br><br>
메인페이지로 이동 후 <b>[모듈추가]</b> 버튼을 통해 메인페이지에 출력될 모듈을 구성 합니다.
</div>
</section>
<section>
<form name="rb_form" id="rb_form" action="./rb_form_update.php" method="post">
<h2 class="h2_frm">라이선스 정책</h2>
<div class="local_desc01 local_desc">
본 빌더는 납품물 제작의 용도나 자사운영 목적의 용도로 사용할 수 있습니다.<br>
빌더 및 빌더를 구성하는 디자인, 스킨, 프로그램 등을 웹사이트에 게재(전시) 하여 판매 하는 행위 또는<br>
배포 (타인이 다운로드 할 수 있도록 게재하는 행위) 는 불가능 합니다.<br><br>
기타 문의사항 및 기술지원은<br>
공식홈페이지 <a href="https://rebuilder.co.kr" target="_blank"><strong>https://rebuilder.co.kr</strong></a> 를 이용해주세요.<br><br>
<input type="checkbox" value="1" id="agrees">
<label for="agrees">상기 내용을 모두 확인하였으며, 라이선스 정책에 동의 합니다.</label>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="DB 테이블 설치하기" class="btn_submit btn">
</div>
</form>
</section>
<script>
$(document).ready(function() {
$("#rb_form").on("submit", function(event) {
if (confirm("상기 주의사항 및 라이선스 정책을 확인해주세요.\nDB 테이블을 설치 하시겠습니까?")) {
if (!$("#agrees").is(":checked")) {
alert("라이선스 정책에 동의 하셔야 빌더를 사용할 수 있습니다.");
event.preventDefault();
}
} else {
event.preventDefault();
}
});
});
</script>
<?php } ?>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');

389
adm/rb/rb_form_update.php Normal file
View File

@ -0,0 +1,389 @@
<?php
$sub_menu = '000000';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
if (isset($_POST['install']) && $_POST['install'] == 1) {
@mkdir(G5_DATA_PATH."/logos", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/logos", G5_DIR_PERMISSION);
$lpimg = isset($_FILES['bu_logo_pc']['tmp_name']) ? $_FILES['bu_logo_pc']['tmp_name'] : null;
$lpimg_name = isset($_FILES['bu_logo_pc']['name']) ? $_FILES['bu_logo_pc']['name'] : null;
$lpwimg = isset($_FILES['bu_logo_pc_w']['tmp_name']) ? $_FILES['bu_logo_pc_w']['tmp_name'] : null;
$lpwimg_name = isset($_FILES['bu_logo_pc_w']['name']) ? $_FILES['bu_logo_pc_w']['name'] : null;
$lmimg = isset($_FILES['bu_logo_mo']['tmp_name']) ? $_FILES['bu_logo_mo']['tmp_name'] : null;
$lmimg_name = isset($_FILES['bu_logo_mo']['name']) ? $_FILES['bu_logo_mo']['name'] : null;
$lmwimg = isset($_FILES['bu_logo_mo_w']['tmp_name']) ? $_FILES['bu_logo_mo_w']['tmp_name'] : null;
$lmwimg_name = isset($_FILES['bu_logo_mo_w']['name']) ? $_FILES['bu_logo_mo_w']['name'] : null;
if (isset($bu_logo_pc_del) && $bu_logo_pc_del) @unlink(G5_DATA_PATH."/logos/pc");
if (isset($bu_logo_pc_w_del) && $bu_logo_pc_w_del) @unlink(G5_DATA_PATH."/logos/pc_w");
if (isset($bu_logo_mo_del) && $bu_logo_mo_del) @unlink(G5_DATA_PATH."/logos/mo");
if (isset($bu_logo_mo_w_del) && $bu_logo_mo_w_del) @unlink(G5_DATA_PATH."/logos/mo_w");
//이미지인지 체크
if( $lpimg || $lpimg_name){
if( !preg_match('/\.(gif|jpe?g|bmp|png)$/i', $lpimg_name) ){
alert("이미지 파일만 업로드 할수 있습니다.");
}
}
//이미지인지 체크
if( $lpwimg || $lpwimg_name ){
if( !preg_match('/\.(gif|jpe?g|bmp|png)$/i', $lpwimg_name) ){
alert("이미지 파일만 업로드 할수 있습니다.");
}
}
//이미지인지 체크
if( $lmimg || $lmimg_name ){
if( !preg_match('/\.(gif|jpe?g|bmp|png)$/i', $lmimg_name) ){
alert("이미지 파일만 업로드 할수 있습니다.");
}
}
//이미지인지 체크
if( $lmwimg || $lmwimg_name ){
if( !preg_match('/\.(gif|jpe?g|bmp|png)$/i', $lmwimg_name) ){
alert("이미지 파일만 업로드 할수 있습니다.");
}
}
//컬럼이 있는지 검사한다.
$cnt = sql_fetch (" select COUNT(*) as cnt from rb_builder ");
if($cnt['cnt'] > 0) {
$sql = " update rb_builder
set bu_load = '{$_POST['bu_load']}',
bu_1 = '{$_POST['bu_1']}',
bu_2 = '{$_POST['bu_2']}',
bu_3 = '{$_POST['bu_3']}',
bu_4 = '{$_POST['bu_4']}',
bu_5 = '{$_POST['bu_5']}',
bu_6 = '{$_POST['bu_6']}',
bu_7 = '{$_POST['bu_7']}',
bu_8 = '{$_POST['bu_8']}',
bu_9 = '{$_POST['bu_9']}',
bu_10 = '{$_POST['bu_10']}',
bu_11 = '{$_POST['bu_11']}',
bu_12 = '{$_POST['bu_12']}',
bu_13 = '{$_POST['bu_13']}',
bu_14 = '{$_POST['bu_14']}',
bu_15 = '{$_POST['bu_15']}',
bu_16 = '{$_POST['bu_16']}',
bu_17 = '{$_POST['bu_17']}',
bu_18 = '{$_POST['bu_18']}',
bu_19 = '{$_POST['bu_19']}',
bu_20 = '{$_POST['bu_20']}',
bu_sns1 = '{$_POST['bu_sns1']}',
bu_sns2 = '{$_POST['bu_sns2']}',
bu_sns3 = '{$_POST['bu_sns3']}',
bu_sns4 = '{$_POST['bu_sns4']}',
bu_sns5 = '{$_POST['bu_sns5']}',
bu_sns6 = '{$_POST['bu_sns6']}',
bu_sns7 = '{$_POST['bu_sns7']}',
bu_sns8 = '{$_POST['bu_sns8']}',
bu_sns9 = '{$_POST['bu_sns9']}',
bu_sns10 = '{$_POST['bu_sns10']}',
bu_viewport = '{$_POST['bu_viewport']}',
bu_systemmsg_use = '{$_POST['bu_systemmsg_use']}',
bu_datetime = '".G5_TIME_YMDHIS."' ";
sql_query($sql);
} else {
$sql = " insert rb_builder
set bu_load = '{$_POST['bu_load']}',
bu_1 = '{$_POST['bu_1']}',
bu_2 = '{$_POST['bu_2']}',
bu_3 = '{$_POST['bu_3']}',
bu_4 = '{$_POST['bu_4']}',
bu_5 = '{$_POST['bu_5']}',
bu_6 = '{$_POST['bu_6']}',
bu_7 = '{$_POST['bu_7']}',
bu_8 = '{$_POST['bu_8']}',
bu_9 = '{$_POST['bu_9']}',
bu_10 = '{$_POST['bu_10']}',
bu_11 = '{$_POST['bu_11']}',
bu_12 = '{$_POST['bu_12']}',
bu_13 = '{$_POST['bu_13']}',
bu_14 = '{$_POST['bu_14']}',
bu_15 = '{$_POST['bu_15']}',
bu_16 = '{$_POST['bu_16']}',
bu_17 = '{$_POST['bu_17']}',
bu_18 = '{$_POST['bu_18']}',
bu_19 = '{$_POST['bu_19']}',
bu_20 = '{$_POST['bu_20']}',
bu_sns1 = '{$_POST['bu_sns1']}',
bu_sns2 = '{$_POST['bu_sns2']}',
bu_sns3 = '{$_POST['bu_sns3']}',
bu_sns4 = '{$_POST['bu_sns4']}',
bu_sns5 = '{$_POST['bu_sns5']}',
bu_sns6 = '{$_POST['bu_sns6']}',
bu_sns7 = '{$_POST['bu_sns7']}',
bu_sns8 = '{$_POST['bu_sns8']}',
bu_sns9 = '{$_POST['bu_sns9']}',
bu_sns10 = '{$_POST['bu_sns10']}',
bu_viewport = '{$_POST['bu_viewport']}',
bu_systemmsg_use = '{$_POST['bu_systemmsg_use']}',
bu_datetime = '".G5_TIME_YMDHIS."' ";
sql_query($sql);
}
if ($lpimg_name) rb_upload_files($lpimg, 'pc', G5_DATA_PATH."/logos");
if ($lpwimg_name) rb_upload_files($lpwimg, 'pc_w', G5_DATA_PATH."/logos");
if ($lmimg_name) rb_upload_files($lmimg, 'mo', G5_DATA_PATH."/logos");
if ($lmwimg_name) rb_upload_files($lmwimg, 'mo_w', G5_DATA_PATH."/logos");
$lpimg_in = G5_DATA_PATH."/logos/pc";
if (file_exists($lpimg_in)) {
$sql = " update rb_builder set bu_logo_pc = 'pc' ";
sql_query($sql);
}
$lpwimg_in = G5_DATA_PATH."/logos/pc_w";
if (file_exists($lpwimg_in)) {
$sql = " update rb_builder set bu_logo_pc_w = 'pc_w' ";
sql_query($sql);
}
$lmimg_in = G5_DATA_PATH."/logos/mo";
if (file_exists($lmimg_in)) {
$sql = " update rb_builder set bu_logo_mo = 'mo' ";
sql_query($sql);
}
$lmwimg_in = G5_DATA_PATH."/logos/mo_w";
if (file_exists($lmwimg_in)) {
$sql = " update rb_builder set bu_logo_mo_w = 'mo_w' ";
sql_query($sql);
}
} else {
//폴더생성
@mkdir(G5_DATA_PATH."/seo", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/seo", G5_DIR_PERMISSION);
//폴더생성
@mkdir(G5_DATA_PATH."/banners", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/banners", G5_DIR_PERMISSION);
//폴더생성
@mkdir(G5_DATA_PATH."/logos", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/logos", G5_DIR_PERMISSION);
//빌더설정 테이블
if(!sql_query(" DESCRIBE rb_builder ", false)) {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_builder` (
`bu_logo_pc` varchar(255) NOT NULL DEFAULT '' COMMENT '로고 PC',
`bu_logo_pc_w` varchar(255) NOT NULL DEFAULT '' COMMENT '로고 PC W',
`bu_logo_mo` varchar(255) NOT NULL DEFAULT '' COMMENT '로고 MO',
`bu_logo_mo_w` varchar(255) NOT NULL DEFAULT '' COMMENT '로고 MO W',
`bu_load` int(4) NOT NULL DEFAULT 1 COMMENT '로딩인디케이터',
`bu_systemmsg_use` int(4) NOT NULL DEFAULT 1 COMMENT '시스템메세지 관리자수신여부',
`bu_1` varchar(255) NOT NULL DEFAULT '' COMMENT '회사명',
`bu_2` varchar(255) NOT NULL DEFAULT '' COMMENT '대표자명',
`bu_3` varchar(255) NOT NULL DEFAULT '' COMMENT '전화번호',
`bu_4` varchar(255) NOT NULL DEFAULT '' COMMENT '팩스번호',
`bu_5` varchar(255) NOT NULL DEFAULT '' COMMENT '사업자등록번호',
`bu_6` varchar(255) NOT NULL DEFAULT '' COMMENT '통신판매업신고번호',
`bu_7` varchar(255) NOT NULL DEFAULT '' COMMENT '부가통신사업자번호',
`bu_8` varchar(255) NOT NULL DEFAULT '' COMMENT '기타등록번호1',
`bu_9` varchar(255) NOT NULL DEFAULT '' COMMENT '우편번호',
`bu_10` varchar(255) NOT NULL DEFAULT '' COMMENT '사업장주소',
`bu_11` varchar(255) NOT NULL DEFAULT '' COMMENT '개인정보책임자',
`bu_12` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_13` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_14` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_15` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_16` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_17` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_18` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_19` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_20` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_sns1` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_sns2` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_sns3` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_sns4` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_sns5` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_sns6` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_sns7` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_sns8` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_sns9` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_sns10` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`bu_viewport` varchar(10) NOT NULL,
`bu_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
//환경설정 테이블
if(!sql_query(" DESCRIBE rb_config ", false)) {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_config` (
`co_id` int(11) NOT NULL AUTO_INCREMENT,
`co_color` varchar(20) NOT NULL DEFAULT '#aa20ff' COMMENT '강조 컬러',
`co_dark` varchar(20) NOT NULL DEFAULT '' COMMENT '다크모드',
`co_layout` varchar(20) NOT NULL DEFAULT '' COMMENT '레이아웃',
`co_layout_hd` varchar(20) NOT NULL DEFAULT '' COMMENT '레이아웃(헤더)',
`co_layout_ft` varchar(20) NOT NULL DEFAULT '' COMMENT '레이아웃(푸더)',
`co_sub_width` varchar(20) NOT NULL COMMENT '서브가로폭',
`co_main_width` varchar(20) NOT NULL COMMENT '메인가로폭',
`co_tb_width` varchar(20) NOT NULL COMMENT '상/하단가로폭',
`co_header` varchar(20) NOT NULL DEFAULT '#ffffff' COMMENT '헤더',
`co_footer` varchar(20) NOT NULL COMMENT '풋터',
`co_font` varchar(20) NOT NULL DEFAULT '' COMMENT '폰트',
`co_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)',
`co_ip` varchar(100) NOT NULL DEFAULT '' COMMENT '등록자IP',
PRIMARY KEY (`co_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
$sql = " insert rb_config
set co_color = '#aa20ff',
co_dark = '',
co_layout = 'basic',
co_layout_hd = 'basic',
co_layout_ft = 'basic',
co_sub_width = '960',
co_main_width = '1400',
co_tb_width = '1400',
co_header = '#ffffff',
co_footer = '0',
co_font = 'Pretendard',
co_datetime = '".G5_TIME_YMDHIS."',
co_ip = '' ";
sql_query($sql);
//모듈설정 테이블
if(!sql_query(" DESCRIBE rb_module ", false)) {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_module` (
`md_id` int(11) NOT NULL AUTO_INCREMENT,
`md_layout` varchar(20) NOT NULL DEFAULT '' COMMENT '레이아웃 아이디',
`md_layout_name` varchar(255) NOT NULL DEFAULT '' COMMENT '레이아웃이름',
`md_theme` varchar(255) NOT NULL DEFAULT '' COMMENT '테마명',
`md_title` varchar(255) NOT NULL DEFAULT '' COMMENT '모듈타이틀',
`md_type` varchar(255) NOT NULL DEFAULT '' COMMENT '모듈타입',
`md_bo_table` varchar(255) NOT NULL DEFAULT '' COMMENT '연결 게시판',
`md_sca` varchar(255) NOT NULL DEFAULT '' COMMENT '연결 카테고리',
`md_widget` varchar(255) NOT NULL DEFAULT '' COMMENT '프로그램',
`md_poll` varchar(255) NOT NULL DEFAULT '' COMMENT '투표',
`md_poll_id` varchar(20) NOT NULL DEFAULT '' COMMENT '투표ID',
`md_banner` varchar(255) NOT NULL DEFAULT '' COMMENT '배너',
`md_banner_id` varchar(20) NOT NULL DEFAULT '' COMMENT '배너ID',
`md_banner_skin` varchar(255) NOT NULL DEFAULT '' COMMENT '배너스킨',
`md_module` varchar(255) NOT NULL DEFAULT '' COMMENT '출력모듈',
`md_skin` varchar(255) NOT NULL DEFAULT '' COMMENT '출력스킨',
`md_cnt` int(10) NOT NULL DEFAULT 1 COMMENT '출력갯수',
`md_auto_time` int(10) NOT NULL DEFAULT 3000 COMMENT '오토플레이타임',
`md_gap` int(10) NOT NULL DEFAULT 40 COMMENT '여백(간격)',
`md_gap_mo` int(10) NOT NULL DEFAULT 20 COMMENT '모바일 여백(간격)',
`md_col` int(10) NOT NULL DEFAULT 1 COMMENT '출력갯수(열/가로)',
`md_row` int(10) NOT NULL DEFAULT 1 COMMENT '출력갯수(행/세로)',
`md_col_mo` int(10) NOT NULL DEFAULT 1 COMMENT '모바일 출력갯수(열/가로)',
`md_row_mo` int(10) NOT NULL DEFAULT 1 COMMENT '모바일 출력갯수(행/세로)',
`md_width` varchar(20) NOT NULL DEFAULT '100%' COMMENT '가로사이즈',
`md_height` varchar(20) NOT NULL DEFAULT 'auto' COMMENT '세로사이즈',
`md_subject_is` int(4) NOT NULL COMMENT '출력항목(제목)',
`md_thumb_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(썸네일)',
`md_nick_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(닉네임)',
`md_date_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(작성일시)',
`md_content_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(본문)',
`md_icon_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(아이콘)',
`md_comment_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(코멘트)',
`md_ca_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(카테고리)',
`md_swiper_is` int(4) NOT NULL DEFAULT 0 COMMENT '스와이프여부',
`md_auto_is` int(4) NOT NULL DEFAULT 0 COMMENT '오토플레이 여부',
`md_order` varchar(255) NOT NULL DEFAULT 'wr_num' COMMENT '출력순서',
`md_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)',
`md_ip` varchar(100) NOT NULL DEFAULT '' COMMENT '등록자IP',
`md_order_id` int(4) NOT NULL DEFAULT 0 COMMENT '모듈순서',
PRIMARY KEY (`md_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
//배너관리 테이블
if(!sql_query(" DESCRIBE rb_banner ", false)) {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_banner` (
`bn_id` int(11) NOT NULL AUTO_INCREMENT,
`bn_alt` varchar(255) NOT NULL DEFAULT '',
`bn_url` varchar(255) NOT NULL DEFAULT '',
`bn_device` varchar(10) NOT NULL DEFAULT '',
`bn_position` varchar(255) NOT NULL DEFAULT '',
`bn_border` tinyint(4) NOT NULL DEFAULT '0',
`bn_radius` tinyint(4) NOT NULL DEFAULT '0',
`bn_ad_ico` tinyint(4) NOT NULL DEFAULT '0',
`bn_new_win` tinyint(4) NOT NULL DEFAULT '0',
`bn_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`bn_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`bn_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`bn_hit` int(11) NOT NULL DEFAULT '0',
`bn_order` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`bn_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
sql_query(" ALTER TABLE `rb_banner` ADD PRIMARY KEY (`bn_id`) ", false);
sql_query(" ALTER TABLE `rb_banner` MODIFY `bn_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;COMMIT ", false);
}
//SEO설정 테이블
if(!sql_query(" DESCRIBE rb_seo ", false)) {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_seo` (
`se_title` varchar(255) NOT NULL COMMENT '사이트명',
`se_description` mediumtext NOT NULL COMMENT '사이트설명',
`se_keywords` mediumtext NOT NULL COMMENT '키워드',
`se_favicon` varchar(255) NOT NULL COMMENT '파비콘',
`se_google_meta` varchar(255) NOT NULL COMMENT '구글 소유권 메타',
`se_naver_meta` varchar(255) NOT NULL COMMENT '네이버 소유권 메타',
`se_robots` mediumtext NOT NULL COMMENT '로봇접근제어',
`se_og_image` varchar(255) NOT NULL COMMENT '오픈그래프 이미지',
`se_og_site_name` varchar(255) NOT NULL COMMENT '오픈그래프 사이트명',
`se_og_title` varchar(255) NOT NULL COMMENT '오픈그래프 사이트명',
`se_og_description` varchar(255) NOT NULL COMMENT '오픈그래프 사이트 설명',
`se_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
// 빌더설정 테이블 설치여부
$chk0 = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_builder' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' ");
$chk0_is = $chk0['cnt'];
// 환경설정 테이블 설치여부
$chk1 = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_config' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' ");
$chk1_is = $chk1['cnt'];
// 모듈설정 테이블 설치여부
$chk2 = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_module' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' ");
$chk2_is = $chk2['cnt'];
// 배너관리 테이블 설치여부
$chk3 = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_banner' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' ");
$chk3_is = $chk3['cnt'];
// SEO설정 테이블 설치여부
$chk4 = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_seo' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' ");
$chk4_is = $chk4['cnt'];
if($chk0_is > 0 && $chk1_is > 0 && $chk2_is > 0 && $chk3_is > 0 && $chk4_is > 0) {
alert('DB 테이블 설치가 완료 되었습니다.\n[DB 업데이트] 를 반드시 실행해주세요.\n테이블 설치 후 환경설정 > 테마설정 메뉴에서\nRebuilder Basic 테마를 적용해주세요.');
} else {
alert('설치가 누락된 테이블이 있습니다.\nDB 테이블을 확인해주세요.');
}
}
update_rewrite_rules();
goto_url('./rb_form.php', false);
?>

View File

@ -0,0 +1,64 @@
<?php
header("Content-Type: application/json; charset=UTF-8");
include_once('./_common.php');
$list = array();
$rst = sql_query("SELECT * FROM {$g5['g5_shop_cart_table']} WHERE ct_types != '0' and io_type = '0' and ct_date_s != '0000-00-00' and ct_status NOT IN ('쇼핑') order by ct_id desc ");
while ($row = sql_fetch_array($rst)) {
$start_date = $row['ct_date_s'];
$db_end_date = $row['ct_date_e']; // DB에서 가져온 종료일
//od_id로 정보얻기
$od = sql_fetch (" SELECT * FROM {$g5['g5_shop_order_table']} WHERE od_id = '{$row['od_id']}' and mb_id = '{$row['mb_id']}' ");
if($od['od_status'] == "주문") {
$bgColor = "#aaa";
} else if($od['od_status'] == "취소") {
$bgColor = "#ffcc00";
} else {
$bgColor = "#000";
}
// 1) 종료일이 비어 있거나 '0000-00-00'이면 => 단일날짜로 취급
if ($db_end_date == '0000-00-00' || empty($db_end_date)) {
$end_date = $start_date;
}
// 2) 시작일과 종료일이 같은 경우 => 단일날짜 (종료일 포함 표시하려면 그대로)
else if ($start_date == $db_end_date) {
$end_date = $start_date;
}
// 3) 기간(시작일 != 종료일) => 종료일 + 1일
else {
$end_date = date('Y-m-d', strtotime($db_end_date . ' +1 day'));
}
$list[] = [
'id' => $row['ct_id'],
'title' => $od['od_name']."님 (".$od['od_status'].")", //예약자명
'od_name' => $od['od_name'],
'od_id' => $od['od_id'],
'od_status' => $od['od_status'],
'start' => $start_date, //시작일
'end' => $end_date, //종료일
'ct_item' => $row['it_name'], //상품명
'od_hp' => $od['od_hp'], //예약자연락처
'allDay' => true,
'db_start' => $row['ct_date_s'], // DB에 기록된 'ct_date_s' 그대로
'db_end' => ($row['ct_date_e'] == '0000-00-00' || empty($row['ct_date_e']))
? $row['ct_date_s']
: $row['ct_date_e'], // DB 원본 종료일 (없으면 시작일)
'price' => $row['ct_price'], //금액
'textColor' => '#fff',
'backgroundColor' => $bgColor,
'borderColor' => $bgColor,
'bgColor' => $bgColor,
'editable' => false
];
}
// JSON 반환
echo json_encode($list, JSON_UNESCAPED_UNICODE);
?>

View File

@ -0,0 +1,284 @@
<?php
$sub_menu = '000812';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '예약내역(캘린더)';
include_once (G5_ADMIN_PATH.'/admin.head.php');
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
add_javascript('<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/core@4.3.1/main.min.js"></script>');
add_javascript('<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/core@4.3.1/locales-all.min.js"></script>');
add_javascript('<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/daygrid@4.3.0/main.min.js"></script>');
add_javascript('<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/timegrid@4.3.0/main.min.js"></script>');
add_javascript('<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/list@4.3.0/main.min.js"></script>');
add_javascript('<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/bootstrap@4.3.0/main.min.js"></script>');
add_javascript('<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/interaction@4.3.0/main.min.js"></script>');
add_stylesheet('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fullcalendar/core@4.3.1/main.min.css">');
add_stylesheet('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fullcalendar/daygrid@4.3.0/main.min.css">');
add_stylesheet('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fullcalendar/bootstrap@4.3.0/main.min.css">');
?>
<style>
.fc-head {
background: #eee;
}
.fc-day-header {
padding: 0.5rem !important;
}
.fc-sun span,
.fc-sun a.fc-day-number {
color: red;
}
.fc-sat span,
.fc-sat a.fc-day-number {
color: blue;
}
.fc td,
.fc th {
border-color: #eee;
}
.fc th {
background-color: #f9f9f9;
padding: 20px !important;
}
.fc-day-number {
font-size: 11px !important;
padding-top: 10px !important;
padding-right: 10px !important;
padding-bottom: 10px !important;
color: #999 !important;
}
.fc-content {
font-size: 12px;
padding: 7px;
}
.fc-day-grid-event {
margin: 2px 3px 2px 3px;
}
.fc-today {
background-color: #f9f9f9;
}
.fc-today span {
color: #002268 !important;
}
.fc-right button {
font-size: 14px;
display: inline-block;
background-color: #fff;
border: 1px solid #eee;
box-sizing: border-box;
margin-left: 5px;
border-radius: 6px;
}
.fc-right .btn-group {
display: inline-block;
margin-left: 0px;
}
.fc-toolbar h2 {
font-family: 'font-B', sans-serif;
font-size: 16px;
}
/* 팝업 스타일 */
#eventDetailPopup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0, 0, 0, 0.85);
color: white;
padding: 15px 20px;
border-radius: 10px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
z-index: 1000;
min-width: 250px;
max-width: 350px;
text-align: left;
}
/* 제목 스타일 */
#popupTitle {
font-size: 14px;
margin-bottom: 5px;
}
/* 금액 강조 */
#popupAmount {
font-size: 20px;
color: #ffcc00;
}
/* 상세 내용 스타일 */
#popupContent {
font-size: 12px;
margin-top: 10px;
line-height: 1.4;
color:#999;
}
/* 닫기 버튼 */
.close-btn {
display: block;
margin-top: 10px;
padding: 10px 10px;
background: rgba(255,255,255,0.1);;
color: white;
border: none;
border-radius: 5px;
font-size: 14px;
cursor: pointer;
width: 100%;
}
/* 오버레이 */
#overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
z-index: 999;
}
.fc-event {
cursor: pointer;
color: #fff !important;
}
</style>
<div>
<div id="calendar"></div>
</div>
<!-- 팝업 레이어 -->
<div id="overlay"></div>
<div id="eventDetailPopup">
<ul id="popupTitle"></ul>
<ul id="popupAmount" class="font-B"></ul>
<ul id="popupContent"></ul>
<button id="DetailBtn" class="close-btn">예약상세정보</button>
<button id="closePopupBtn" class="close-btn">닫기</button>
</div>
<script>
$(document).ready(function() {
function openPopup(title, amount, content) {
$("#popupTitle").text(title);
$("#popupAmount").html(amount);
$("#popupContent").html(content);
$("#overlay, #eventDetailPopup").fadeIn(200);
}
function closePopup() {
$("#overlay, #eventDetailPopup").fadeOut(200);
}
// 닫기 버튼에 클릭 이벤트 연결
$(document).on("click", "#closePopupBtn", closePopup);
$(document).on("click", "#overlay", closePopup);
var calendarEl = $("#calendar").get(0);
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: ['dayGrid', 'interaction', 'bootstrap'],
editable: false,
droppable: false,
defaultDate: '<?php echo G5_TIME_YMD?>', // 초기 날짜
locale: 'ko',
height: 'auto',
themeSystem: 'bootstrap',
weekNumbers: false,
eventLimit: false,
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,dayGridWeek,dayGridDay'
},
events: function(fetchInfo, successCallback, failureCallback) {
$.ajax({
url: './reservation_list.json.php',
dataType: 'json',
success: function(data) {
if (!data || !Array.isArray(data)) {
console.error("Invalid JSON response:", data);
alert("이벤트 데이터를 불러올 수 없습니다.");
failureCallback("Invalid data format");
return;
}
successCallback(data);
},
error: function(jqXHR, textStatus, errorThrown) {
console.error("AJAX 요청 실패:", textStatus, errorThrown);
console.error("응답 데이터:", jqXHR.responseText);
alert("이벤트 데이터를 불러오는 중 오류가 발생했습니다.");
failureCallback(errorThrown);
}
});
},
eventClick: function(info) {
// FullCalendar 이벤트 객체
var event = info.event.extendedProps || {};
// DB 원본 날짜 (팝업용)
var db_start = event.db_start || "";
var db_end = event.db_end || "";
// 그 외 예약 정보
var od_name = event.od_name || "예약자 없음";
var od_status = event.od_status || "상태 미정";
var od_hp = event.od_hp || "연락처 없음";
var od_id = event.od_id || "주문번호 없음";
var ct_item = event.ct_item || "상품 없음";
var points = Number(event.price) || 0;
// 팝업 내용 (DB 원본 날짜 그대로 표시)
var details = `
<li><strong>예약현황 :</strong> ${od_status}</li>
<li><strong>연락처 :</strong> ${od_hp}</li>
<li><strong>상품명 :</strong> ${ct_item}</li>
`;
// 팝업 열기
openPopup(
db_start + (db_end && db_end !== db_start ? " ~ " + db_end : ""), // 제목 영역에 날짜 범위 표시 가능
od_name,
`<ul>${details}</ul>`
);
// 예약 상세정보 버튼
$("#DetailBtn").off("click").on("click", function() {
if (od_id) {
window.location.href = "../shop_admin/orderform.php?od_id=" + od_id;
}
});
}
});
calendar.render();
});
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');

138
adm/rb/reservation_set.php Normal file
View File

@ -0,0 +1,138 @@
<?php
$sub_menu = '000810';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
add_stylesheet('<link rel="stylesheet" href="./css/style.css">', 0);
$g5['rb_prefix'] = G5_TABLE_PREFIX.'rb_'; // 리빌더 테이블명 접두사
$rb_table_name = $g5['rb_prefix'].'reservation'; // g5_rb_reservation
//테이블이 있는지 검사한다.
if(!sql_query(" DESCRIBE {$rb_table_name} ", false)) {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$rb_table_name}` (
`res_is` int(4) NOT NULL COMMENT '사용여부',
`res_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
$columns_to_add = [
'it_types' => 'INT(10) NOT NULL DEFAULT 0',
'it_date_s' => 'DATE NOT NULL',
'it_date_e' => 'DATE NOT NULL',
'it_date_n' => 'LONGTEXT NOT NULL DEFAULT \'\'',
'it_date_t' => 'LONGTEXT NOT NULL DEFAULT \'\'',
'it_date_j' => 'INT(4) NOT NULL DEFAULT 0',
'it_date_g' => 'INT(4) NOT NULL DEFAULT 0',
'it_not_c' => 'INT(10) NOT NULL DEFAULT 0',
'it_not_d' => 'INT(10) NOT NULL DEFAULT 0',
'it_not_s' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_min' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_max' => 'INT(10) NOT NULL DEFAULT 0',
'it_date_min' => 'INT(10) NOT NULL DEFAULT 0',
'it_date_max' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_min1' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_max1' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_min2' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_max2' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_min3' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_max3' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_pri1' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_pri2' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_pri3' => 'INT(10) NOT NULL DEFAULT 0',
'it_user_use1' => 'INT(4) NOT NULL DEFAULT 0',
'it_user_use2' => 'INT(4) NOT NULL DEFAULT 0',
'it_user_use3' => 'INT(4) NOT NULL DEFAULT 0',
'it_user_txt1' => 'VARCHAR(100) NOT NULL DEFAULT \'\'',
'it_user_txt2' => 'VARCHAR(100) NOT NULL DEFAULT \'\'',
'it_user_txt3' => 'VARCHAR(100) NOT NULL DEFAULT \'\'',
];
foreach ($columns_to_add as $column => $attributes) {
// 컬럼이 있는지 확인
$column_check = sql_query("SHOW COLUMNS FROM {$g5['g5_shop_item_table']} LIKE '{$column}'", false);
if (!sql_num_rows($column_check)) {
// 컬럼 추가
sql_query("ALTER TABLE {$g5['g5_shop_item_table']} ADD {$column} {$attributes}", true);
}
}
$columns_to_add2 = [
'ct_types' => 'INT(10) NOT NULL DEFAULT 0',
'ct_date_s' => 'DATE NOT NULL', //시작일
'ct_date_e' => 'DATE NOT NULL', //종료일
'ct_date_d' => 'INT(10) NOT NULL DEFAULT 0', //일수
'ct_date_t' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //선택옵션
'ct_user_txt1' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //추가옵션1 항목
'ct_user_txt2' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //추가옵션2 항목
'ct_user_txt3' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //추가옵션3 항목
'ct_user_qty1' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션1 수량
'ct_user_qty2' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션2 수량
'ct_user_qty3' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션3 수량
'ct_user_pri1' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션금액1
'ct_user_pri2' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션금액2
'ct_user_pri3' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션금액3
];
foreach ($columns_to_add2 as $column => $attributes) {
// 컬럼이 있는지 확인
$column_check = sql_query("SHOW COLUMNS FROM {$g5['g5_shop_cart_table']} LIKE '{$column}'", false);
if (!sql_num_rows($column_check)) {
// 컬럼 추가
sql_query("ALTER TABLE {$g5['g5_shop_cart_table']} ADD {$column} {$attributes}", true);
}
}
$sql = " select * from {$rb_table_name} limit 1";
$res = sql_fetch($sql);
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_rb1">기본설정</a></li>
</ul>';
$g5['title'] = '예약 설정';
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
<form name="rb_form" id="rb_form" action="./reservation_set_update.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="token" value="" id="token">
<section id="anc_rb1">
<h2 class="h2_frm">기본 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">예약기능 사용여부</th>
<td colspan="3">
<?php echo help('체크를 해제 하시면 예약기능을 사용하지 않습니다.') ?>
<input type="checkbox" name="res_is" value="1" id="res_is" <?php echo isset($res['res_is']) && $res['res_is'] == 1 ? 'checked' : ''; ?>> <label for="res_is">예약기능을 사용 합니다.</label>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<div class="btn_fixed_top">
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
</div>
</form>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');

View File

@ -0,0 +1,31 @@
<?php
$sub_menu = '000810';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$g5['rb_prefix'] = G5_TABLE_PREFIX.'rb_'; // 리빌더 테이블명 접두사
$rb_table_name = $g5['rb_prefix'].'reservation'; // g5_rb_reservation
// 컬럼이 있는지 검사한다.
$cnt = sql_fetch("SELECT COUNT(*) as cnt FROM {$rb_table_name}");
if ($cnt['cnt'] > 0) {
$sql = "UPDATE {$rb_table_name}
SET res_is = '{$_POST['res_is']}',
res_datetime = '" . G5_TIME_YMDHIS . "'";
sql_query($sql);
} else {
$sql = "INSERT INTO {$rb_table_name}
SET res_is = '{$_POST['res_is']}',
res_datetime = '" . G5_TIME_YMDHIS . "'";
sql_query($sql);
}
update_rewrite_rules();
goto_url('./reservation_set.php', false);
?>

265
adm/rb/seo_form.php Normal file
View File

@ -0,0 +1,265 @@
<?php
$sub_menu = '000500';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "w");
add_stylesheet('<link rel="stylesheet" href="./css/style.css">', 0);
//테이블이 있는지 검사한다.
if(!sql_query(" DESCRIBE rb_seo ", false)) {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_seo` (
`se_title` varchar(255) NOT NULL COMMENT '사이트명',
`se_description` mediumtext NOT NULL COMMENT '사이트설명',
`se_keywords` mediumtext NOT NULL COMMENT '키워드',
`se_favicon` varchar(255) NOT NULL COMMENT '파비콘',
`se_google_meta` varchar(255) NOT NULL COMMENT '구글 소유권 메타',
`se_naver_meta` varchar(255) NOT NULL COMMENT '네이버 소유권 메타',
`se_robots` mediumtext NOT NULL COMMENT '로봇접근제어',
`se_og_image` varchar(255) NOT NULL COMMENT '오픈그래프 이미지',
`se_og_site_name` varchar(255) NOT NULL COMMENT '오픈그래프 사이트명',
`se_og_title` varchar(255) NOT NULL COMMENT '오픈그래프 사이트명',
`se_og_description` varchar(255) NOT NULL COMMENT '오픈그래프 사이트 설명',
`se_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
$sql = " select * from rb_seo limit 1";
$seo = sql_fetch($sql);
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_seo1">기본설정</a></li>
<li><a href="#anc_seo2">검색엔진</a></li>
<li><a href="#anc_seo3">오픈그래프</a></li>
<li><a href="#anc_seo4">기타설정</a></li>
</ul>';
$g5['title'] = 'SEO 관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
<form name="seo_form" id="seo_form" action="./seo_form_update.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="token" value="" id="token">
<section id="anc_seo1">
<h2 class="h2_frm">기본설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">웹사이트 제목<strong class="sound_only">필수</strong></th>
<td colspan="3">
<?php echo help('검색결과와 브라우저 제목에 반영되는 대표 정보로,<br>웹사이트 이름과 함께 고유한 브랜드메시지를 짧게 입력하는 것도 좋습니다.') ?>
<input type="text" name="se_title" value="<?php echo isset($seo['se_title']) ? get_sanitize_input($seo['se_title']) : ''; ?>" id="se_title" required class="required frm_input" size="40">
</td>
</tr>
<tr>
<th scope="row">웹사이트 설명</th>
<td colspan="3">
<?php echo help('웹사이트 유형, 판매 상품 정보, 사용자의 클릭을 유도하는 설명 등을 요약하여 입력하세요.') ?>
<input type="text" name="se_description" value="<?php echo isset($seo['se_description']) ? get_sanitize_input($seo['se_description']) : ''; ?>" id="se_description" class="frm_input" size="100">
</td>
</tr>
<tr>
<th scope="row">키워드</th>
<td colspan="3">
<?php echo help('검색형 키워드를 콤마로 구분하여 입력하세요.') ?>
<input type="text" name="se_keywords" value="<?php echo isset($seo['se_keywords']) ? get_sanitize_input($seo['se_keywords']) : ''; ?>" id="se_keywords" class="frm_input" size="100">
</td>
</tr>
<tr>
<th scope="row">파비콘</th>
<td>
<div class="border_box_adm">
<img src="./img/bg_favicon_example.png"><br><br>
<?php echo help('파비콘은 주소창에 표시되는 웹사이트를 대표하는 아이콘입니다.<br>브라우저의 상단 탭과 북마크 영역에서 나타납니다.') ?>
</div>
<?php echo help('ico 파일만 업로드 가능합니다.') ?>
<input type="file" name="se_favicon">
<?php
$favimg = G5_DATA_PATH . "/seo/favicon";
if (file_exists($favimg)) {
echo '<input type="checkbox" name="se_favicon_del" value="1" id="se_favicon_del"> <label for="se_favicon_del">삭제</label>';
if (isset($seo['se_favicon'])) {
echo '<div>' . G5_URL . '/data/seo/' . $seo['se_favicon'] . '</div>';
}
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_seo2">
<h2 class="h2_frm">검색엔진</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">구글 서치 콘솔</th>
<td colspan="3">
<?php echo help('구글에 웹사이트를 등록하고 발급받은 HTML 태그를 입력하여 사이트 소유권을 확인합니다.') ?>
<input type="text" name="se_google_meta" value="<?php echo isset($seo['se_google_meta']) ? get_text($seo['se_google_meta']) : ''; ?>" id="se_google_meta" class="frm_input" size="50" placeholder="<meta name=....">
<a href="https://search.google.com/search-console/about" target="_blank" class="btn_frmline">바로가기</a>
</td>
</tr>
<tr>
<th scope="row">네이버 서치 어드바이저</th>
<td colspan="3">
<?php echo help('네이버에 웹사이트를 등록하고 발급받은 HTML 태그를 입력하여 사이트 소유권을 확인합니다.') ?>
<input type="text" name="se_naver_meta" value="<?php echo isset($seo['se_naver_meta']) ? get_text($seo['se_naver_meta']) : ''; ?>" id="se_naver_meta" class="frm_input" size="50" placeholder="<meta name=....">
<a href="https://searchadvisor.naver.com/" target="_blank" class="btn_frmline">바로가기</a>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_seo3">
<h2 class="h2_frm">오픈그래프</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">og:image</th>
<td>
<?php echo help('SNS에서 공유할 때 노출되는 이미지를 설정합니다.<br>게시판, 상품 등의 페이지는 자동적용 됩니다.') ?>
<input type="file" name="se_og_image">
<?php
$ogimg_str = "";
$ogimg = G5_DATA_PATH . "/seo/og_image";
if (file_exists($ogimg)) {
$size = @getimagesize($ogimg);
if ($size !== false) {
if ($size[0] && $size[0] > 400) {
$width = 400;
} else {
$width = $size[0];
}
echo '<input type="checkbox" name="se_og_image_del" value="1" id="se_og_image_del"> <label for="se_og_image_del">삭제</label>';
$ogimg_str = '<img src="' . G5_DATA_URL . '/seo/og_image?ver=' . G5_SERVER_TIME . '" width="' . $width . '">';
}
}
if (isset($seo['se_og_image'])) {
echo '<div>' . G5_URL . '/data/seo/' . $seo['se_og_image'] . '</div>';
}
if (!empty($ogimg_str)) {
echo '<div style="margin-top:20px;">';
echo $ogimg_str;
echo '</div>';
}
?>
</td>
</tr>
<tr>
<th scope="row">og:site_name</th>
<td colspan="3">
<?php echo help('SNS에서 공유할 때 노출되는 사이트이름을 설정합니다.<br>게시판, 상품 등의 페이지는 자동적용 됩니다.') ?>
<input type="text" name="se_og_site_name" value="<?php echo isset($seo['se_og_site_name']) ? get_sanitize_input($seo['se_og_site_name']) : ''; ?>" id="se_og_site_name" class="frm_input" size="30">
</td>
</tr>
<tr>
<th scope="row">og:title</th>
<td colspan="3">
<?php echo help('SNS에서 공유할 때 노출되는 페이지제목(사이트이름)을 설정합니다.<br>게시판, 상품 등의 페이지는 자동적용 됩니다.') ?>
<input type="text" name="se_og_title" value="<?php echo isset($seo['se_og_title']) ? get_sanitize_input($seo['se_og_title']) : ''; ?>" id="se_og_title" class="frm_input" size="50">
</td>
</tr>
<tr>
<th scope="row">og:description</th>
<td colspan="3">
<?php echo help('SNS에서 공유할 때 노출되는 페이지설명(사이트설명)을 설정합니다.<br>게시판, 상품 등의 페이지는 자동적용 됩니다.') ?>
<input type="text" name="se_og_description" value="<?php echo isset($seo['se_og_description']) ? get_sanitize_input($seo['se_og_description']) : ''; ?>" id="se_og_description" class="frm_input" size="100">
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_seo4">
<h2 class="h2_frm">기타설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">robots.txt</th>
<td>
<?php echo help('robots.txt 파일은 검색로봇에게 페이지를 수집할 수 있도록 허용하거나 제한하는 표준 규약입니다.') ?>
<textarea name="se_robots" id="se_robots"><?php echo isset($seo['se_robots']) ? get_text($seo['se_robots']) : ''; ?></textarea>
<?php
$r_files = G5_PATH."/robots.txt";
if (file_exists($r_files)) {
echo '<div>'.G5_URL.'/robots.txt</div>';
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<div class="btn_fixed_top">
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
</div>
</form>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');

122
adm/rb/seo_form_update.php Normal file
View File

@ -0,0 +1,122 @@
<?php
$sub_menu = '000500';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
@mkdir(G5_DATA_PATH . "/seo", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH . "/seo", G5_DIR_PERMISSION);
$favimg = isset($_FILES['se_favicon']['tmp_name']) ? $_FILES['se_favicon']['tmp_name'] : null;
$favimg_name = isset($_FILES['se_favicon']['name']) ? $_FILES['se_favicon']['name'] : null;
$ogimg = isset($_FILES['se_og_image']['tmp_name']) ? $_FILES['se_og_image']['tmp_name'] : null;
$ogimg_name = isset($_FILES['se_og_image']['name']) ? $_FILES['se_og_image']['name'] : null;
$se_favicon_del = isset($_POST['se_favicon_del']) ? $_POST['se_favicon_del'] : null;
$se_og_image_del = isset($_POST['se_og_image_del']) ? $_POST['se_og_image_del'] : null;
if ($se_favicon_del) {
@unlink(G5_DATA_PATH . "/seo/favicon");
}
if ($se_og_image_del) {
@unlink(G5_DATA_PATH . "/seo/og_image");
}
// ico 파일인지 체크
if ($favimg || $favimg_name) {
if (!preg_match('/\.(ico)$/i', $favimg_name)) {
alert("ico 파일만 업로드 할수 있습니다.");
}
}
// 파일이 이미지인지 체크
if ($ogimg || $ogimg_name) {
if (!preg_match('/\.(gif|jpe?g|bmp|png)$/i', $ogimg_name)) {
alert("이미지 파일만 업로드 할수 있습니다.");
}
$oimg = @getimagesize($ogimg);
if ($oimg === false || $oimg[2] < 1 || $oimg[2] > 16) {
alert("이미지 파일만 업로드 할수 있습니다.");
}
}
// 컬럼이 있는지 검사한다.
$cnt = sql_fetch("SELECT COUNT(*) as cnt FROM rb_seo");
if ($cnt['cnt'] > 0) {
$sql = "UPDATE rb_seo
SET se_title = '{$_POST['se_title']}',
se_description = '{$_POST['se_description']}',
se_keywords = '{$_POST['se_keywords']}',
se_google_meta = '{$_POST['se_google_meta']}',
se_naver_meta = '{$_POST['se_naver_meta']}',
se_robots = '{$_POST['se_robots']}',
se_og_site_name = '{$_POST['se_og_site_name']}',
se_og_title = '{$_POST['se_og_title']}',
se_og_description = '{$_POST['se_og_description']}',
se_datetime = '" . G5_TIME_YMDHIS . "'";
sql_query($sql);
} else {
$sql = "INSERT INTO rb_seo
SET se_title = '{$_POST['se_title']}',
se_description = '{$_POST['se_description']}',
se_keywords = '{$_POST['se_keywords']}',
se_google_meta = '{$_POST['se_google_meta']}',
se_naver_meta = '{$_POST['se_naver_meta']}',
se_robots = '{$_POST['se_robots']}',
se_og_site_name = '{$_POST['se_og_site_name']}',
se_og_title = '{$_POST['se_og_title']}',
se_og_description = '{$_POST['se_og_description']}',
se_datetime = '" . G5_TIME_YMDHIS . "'";
sql_query($sql);
}
if ($favimg_name) {
rb_upload_files($favimg, 'favicon', G5_DATA_PATH . "/seo");
}
if ($ogimg_name) {
rb_upload_files($ogimg, 'og_image', G5_DATA_PATH . "/seo");
}
// 파일이 있는지 체크
$ogimg_in = G5_DATA_PATH . "/seo/og_image";
if (file_exists($ogimg_in)) {
$sql = "UPDATE rb_seo SET se_og_image = 'og_image'";
sql_query($sql);
}
$favimg_in = G5_DATA_PATH . "/seo/favicon";
if (file_exists($favimg_in)) {
$sql = "UPDATE rb_seo SET se_favicon = 'favicon'";
sql_query($sql);
}
// robots.txt 파일 생성
if (isset($_POST['se_robots'])) {
// textarea에서 입력된 내용을 가져옴
$robotsContent = $_POST['se_robots'];
// robots.txt 파일의 경로를 정의함
$filePath = G5_PATH . '/robots.txt';
// 쓰기 모드로 파일을 오픈
if ($fileHandle = fopen($filePath, 'w')) {
// 파일에 내용을 저장함
if (fwrite($fileHandle, $robotsContent) === false) {
echo "robots.txt 파일 쓰기에 실패 했습니다.";
}
// 파일 핸들을 닫음
fclose($fileHandle);
} else {
echo "robots.txt 파일을 쓰기 위해 여는 데 실패했습니다.";
}
}
update_rewrite_rules();
goto_url('./seo_form.php', false);
?>

10
adm/rb/shop/_common.php Normal file
View File

@ -0,0 +1,10 @@
<?php
define('G5_IS_ADMIN', true);
require_once '../../../common.php';
require_once G5_ADMIN_PATH . '/admin.lib.php';
if (isset($token)) {
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
}
run_event('admin_common');

1916
adm/rb/shop/itemform.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,709 @@
<?php
$sub_menu = '400300';
include_once('./_common.php');
if ($w == "u" || $w == "d")
check_demo();
if ($w == '' || $w == 'u')
auth_check_menu($auth, $sub_menu, "w");
else if ($w == 'd')
auth_check_menu($auth, $sub_menu, "d");
check_admin_token();
@mkdir(G5_DATA_PATH."/item", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/item", G5_DIR_PERMISSION);
// input vars 체크
check_input_vars();
$ca_id = isset($_POST['ca_id']) ? preg_replace('/[^0-9a-z]/i', '', $_POST['ca_id']) : '';
$ca_id2 = isset($_POST['ca_id2']) ? preg_replace('/[^0-9a-z]/i', '', $_POST['ca_id2']) : '';
$ca_id3 = isset($_POST['ca_id3']) ? preg_replace('/[^0-9a-z]/i', '', $_POST['ca_id3']) : '';
if ($is_admin != 'super') { // 최고관리자가 아니면 체크
if( $w === '' ){
$sql = "select ca_mb_id from {$g5['g5_shop_category_table']} where ca_id = '$ca_id'";
} else {
$sql = "select b.ca_mb_id from {$g5['g5_shop_item_table']} a , {$g5['g5_shop_category_table']} b where (a.ca_id = b.ca_id) and a.it_id = '$it_id'";
}
$checks = sql_fetch($sql);
if( ! (isset($checks['ca_mb_id']) && $checks['ca_mb_id']) || $checks['ca_mb_id'] !== $member['mb_id'] ){
alert("해당 분류의 관리회원이 아닙니다.");
}
}
$it_img1 = $it_img2 = $it_img3 = $it_img4 = $it_img5 = $it_img6 = $it_img7 = $it_img8 = $it_img9 = $it_img10 = '';
// 파일정보
if($w == "u") {
$sql = " select it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
from {$g5['g5_shop_item_table']}
where it_id = '$it_id' ";
$file = sql_fetch($sql);
$it_img1 = $file['it_img1'];
$it_img2 = $file['it_img2'];
$it_img3 = $file['it_img3'];
$it_img4 = $file['it_img4'];
$it_img5 = $file['it_img5'];
$it_img6 = $file['it_img6'];
$it_img7 = $file['it_img7'];
$it_img8 = $file['it_img8'];
$it_img9 = $file['it_img9'];
$it_img10 = $file['it_img10'];
}
$it_img_dir = G5_DATA_PATH.'/item';
for($i=0;$i<=10;$i++){
${'it_img'.$i.'_del'} = ! empty($_POST['it_img'.$i.'_del']) ? 1 : 0;
}
// 파일삭제
if ($it_img1_del) {
$file_img1 = $it_img_dir.'/'.clean_relative_paths($it_img1);
@unlink($file_img1);
delete_item_thumbnail(dirname($file_img1), basename($file_img1));
$it_img1 = '';
}
if ($it_img2_del) {
$file_img2 = $it_img_dir.'/'.clean_relative_paths($it_img2);
@unlink($file_img2);
delete_item_thumbnail(dirname($file_img2), basename($file_img2));
$it_img2 = '';
}
if ($it_img3_del) {
$file_img3 = $it_img_dir.'/'.clean_relative_paths($it_img3);
@unlink($file_img3);
delete_item_thumbnail(dirname($file_img3), basename($file_img3));
$it_img3 = '';
}
if ($it_img4_del) {
$file_img4 = $it_img_dir.'/'.clean_relative_paths($it_img4);
@unlink($file_img4);
delete_item_thumbnail(dirname($file_img4), basename($file_img4));
$it_img4 = '';
}
if ($it_img5_del) {
$file_img5 = $it_img_dir.'/'.clean_relative_paths($it_img5);
@unlink($file_img5);
delete_item_thumbnail(dirname($file_img5), basename($file_img5));
$it_img5 = '';
}
if ($it_img6_del) {
$file_img6 = $it_img_dir.'/'.clean_relative_paths($it_img6);
@unlink($file_img6);
delete_item_thumbnail(dirname($file_img6), basename($file_img6));
$it_img6 = '';
}
if ($it_img7_del) {
$file_img7 = $it_img_dir.'/'.clean_relative_paths($it_img7);
@unlink($file_img7);
delete_item_thumbnail(dirname($file_img7), basename($file_img7));
$it_img7 = '';
}
if ($it_img8_del) {
$file_img8 = $it_img_dir.'/'.clean_relative_paths($it_img8);
@unlink($file_img8);
delete_item_thumbnail(dirname($file_img8), basename($file_img8));
$it_img8 = '';
}
if ($it_img9_del) {
$file_img9 = $it_img_dir.'/'.clean_relative_paths($it_img9);
@unlink($file_img9);
delete_item_thumbnail(dirname($file_img9), basename($file_img9));
$it_img9 = '';
}
if ($it_img10_del) {
$file_img10 = $it_img_dir.'/'.clean_relative_paths($it_img10);
@unlink($file_img10);
delete_item_thumbnail(dirname($file_img10), basename($file_img10));
$it_img10 = '';
}
// 이미지업로드
if ($_FILES['it_img1']['name']) {
if($w == 'u' && $it_img1) {
$file_img1 = $it_img_dir.'/'.clean_relative_paths($it_img1);
@unlink($file_img1);
delete_item_thumbnail(dirname($file_img1), basename($file_img1));
}
$it_img1 = it_img_upload($_FILES['it_img1']['tmp_name'], $_FILES['it_img1']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img2']['name']) {
if($w == 'u' && $it_img2) {
$file_img2 = $it_img_dir.'/'.clean_relative_paths($it_img2);
@unlink($file_img2);
delete_item_thumbnail(dirname($file_img2), basename($file_img2));
}
$it_img2 = it_img_upload($_FILES['it_img2']['tmp_name'], $_FILES['it_img2']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img3']['name']) {
if($w == 'u' && $it_img3) {
$file_img3 = $it_img_dir.'/'.clean_relative_paths($it_img3);
@unlink($file_img3);
delete_item_thumbnail(dirname($file_img3), basename($file_img3));
}
$it_img3 = it_img_upload($_FILES['it_img3']['tmp_name'], $_FILES['it_img3']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img4']['name']) {
if($w == 'u' && $it_img4) {
$file_img4 = $it_img_dir.'/'.clean_relative_paths($it_img4);
@unlink($file_img4);
delete_item_thumbnail(dirname($file_img4), basename($file_img4));
}
$it_img4 = it_img_upload($_FILES['it_img4']['tmp_name'], $_FILES['it_img4']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img5']['name']) {
if($w == 'u' && $it_img5) {
$file_img5 = $it_img_dir.'/'.clean_relative_paths($it_img5);
@unlink($file_img5);
delete_item_thumbnail(dirname($file_img5), basename($file_img5));
}
$it_img5 = it_img_upload($_FILES['it_img5']['tmp_name'], $_FILES['it_img5']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img6']['name']) {
if($w == 'u' && $it_img6) {
$file_img6 = $it_img_dir.'/'.clean_relative_paths($it_img6);
@unlink($file_img6);
delete_item_thumbnail(dirname($file_img6), basename($file_img6));
}
$it_img6 = it_img_upload($_FILES['it_img6']['tmp_name'], $_FILES['it_img6']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img7']['name']) {
if($w == 'u' && $it_img7) {
$file_img7 = $it_img_dir.'/'.clean_relative_paths($it_img7);
@unlink($file_img7);
delete_item_thumbnail(dirname($file_img7), basename($file_img7));
}
$it_img7 = it_img_upload($_FILES['it_img7']['tmp_name'], $_FILES['it_img7']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img8']['name']) {
if($w == 'u' && $it_img8) {
$file_img8 = $it_img_dir.'/'.clean_relative_paths($it_img8);
@unlink($file_img8);
delete_item_thumbnail(dirname($file_img8), basename($file_img8));
}
$it_img8 = it_img_upload($_FILES['it_img8']['tmp_name'], $_FILES['it_img8']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img9']['name']) {
if($w == 'u' && $it_img9) {
$file_img9 = $it_img_dir.'/'.clean_relative_paths($it_img9);
@unlink($file_img9);
delete_item_thumbnail(dirname($file_img9), basename($file_img9));
}
$it_img9 = it_img_upload($_FILES['it_img9']['tmp_name'], $_FILES['it_img9']['name'], $it_img_dir.'/'.$it_id);
}
if ($_FILES['it_img10']['name']) {
if($w == 'u' && $it_img10) {
$file_img10 = $it_img_dir.'/'.clean_relative_paths($it_img10);
@unlink($file_img10);
delete_item_thumbnail(dirname($file_img10), basename($file_img10));
}
$it_img10 = it_img_upload($_FILES['it_img10']['tmp_name'], $_FILES['it_img10']['name'], $it_img_dir.'/'.$it_id);
}
if ($w == "" || $w == "u")
{
// 다음 입력을 위해서 옵션값을 쿠키로 한달동안 저장함
//@setcookie("ck_ca_id", $ca_id, time() + 86400*31, $default[de_cookie_dir], $default[de_cookie_domain]);
//@setcookie("ck_maker", stripslashes($it_maker), time() + 86400*31, $default[de_cookie_dir], $default[de_cookie_domain]);
//@setcookie("ck_origin", stripslashes($it_origin), time() + 86400*31, $default[de_cookie_dir], $default[de_cookie_domain]);
@set_cookie("ck_ca_id", $ca_id, time() + 86400*31);
@set_cookie("ck_ca_id2", $ca_id2, time() + 86400*31);
@set_cookie("ck_ca_id3", $ca_id3, time() + 86400*31);
@set_cookie("ck_maker", stripslashes($it_maker), time() + 86400*31);
@set_cookie("ck_origin", stripslashes($it_origin), time() + 86400*31);
}
// 관련상품을 삭제한 뒤에 경고가 노출되어 등록, 수정 없이 관련상품만 삭제될 수 있는 오류 수정 (squared2님,210617)
// 포인트 비율 값 체크
if(($it_point_type == 1 || $it_point_type == 2) && ($it_point < 0 || $it_point > 99))
alert("포인트 비율을 0과 99 사이의 값으로 입력해 주십시오.");
// 관련상품을 우선 삭제함
sql_query(" delete from {$g5['g5_shop_item_relation_table']} where it_id = '$it_id' ");
// 관련상품의 반대도 삭제
sql_query(" delete from {$g5['g5_shop_item_relation_table']} where it_id2 = '$it_id' ");
// 이벤트상품을 우선 삭제함
sql_query(" delete from {$g5['g5_shop_event_item_table']} where it_id = '$it_id' ");
// 선택옵션
sql_query(" delete from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '$it_id' "); // 기존선택옵션삭제
$option_count = (isset($_POST['opt_id']) && is_array($_POST['opt_id'])) ? count($_POST['opt_id']) : array();
$it_option_subject = '';
$it_supply_subject = '';
if($option_count) {
// 옵션명
$opt1_cnt = $opt2_cnt = $opt3_cnt = 0;
for($i=0; $i<$option_count; $i++) {
$post_opt_id = isset($_POST['opt_id'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($_POST['opt_id'][$i])) : '';
$opt_val = explode(chr(30), $post_opt_id);
if(isset($opt_val[0]) && $opt_val[0])
$opt1_cnt++;
if(isset($opt_val[1]) && $opt_val[1])
$opt2_cnt++;
if(isset($opt_val[2]) && $opt_val[2])
$opt3_cnt++;
}
if($opt1_subject && $opt1_cnt) {
$it_option_subject = $opt1_subject;
if($opt2_subject && $opt2_cnt)
$it_option_subject .= ','.$opt2_subject;
if($opt3_subject && $opt3_cnt)
$it_option_subject .= ','.$opt3_subject;
}
}
// 추가옵션
sql_query(" delete from {$g5['g5_shop_item_option_table']} where io_type = '1' and it_id = '$it_id' "); // 기존추가옵션삭제
$supply_count = (isset($_POST['spl_id']) && is_array($_POST['spl_id'])) ? count($_POST['spl_id']) : array();
if($supply_count) {
// 추가옵션명
$arr_spl = array();
for($i=0; $i<$supply_count; $i++) {
$post_spl_id = isset($_POST['spl_id'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($_POST['spl_id'][$i])) : '';
$spl_val = explode(chr(30), $post_spl_id);
if(!in_array($spl_val[0], $arr_spl))
$arr_spl[] = $spl_val[0];
}
$it_supply_subject = implode(',', $arr_spl);
}
// 상품요약정보
$value_array = array();
$count_ii_article = (isset($_POST['ii_article']) && is_array($_POST['ii_article'])) ? count($_POST['ii_article']) : 0;
for($i=0; $i<$count_ii_article; $i++) {
$key = isset($_POST['ii_article'][$i]) ? html_purifier($_POST['ii_article'][$i]) : '';
$val = isset($_POST['ii_value'][$i]) ? html_purifier($_POST['ii_value'][$i]) : '';
$value_array[$key] = $val;
}
$it_info_value = addslashes(serialize($value_array));
$it_name = isset($_POST['it_name']) ? strip_tags(clean_xss_attributes(trim($_POST['it_name']))) : '';
// KVE-2019-0708
$check_sanitize_keys = array(
'it_order', // 출력순서
'it_maker', // 제조사
'it_origin', // 원산지
'it_brand', // 브랜드
'it_model', // 모델
'it_tel_inq', // 전화문의
'it_use', // 판매가능
'it_nocoupon', // 쿠폰적용안함
'ec_mall_pid', // 네이버쇼핑 상품ID
'it_sell_email', // 판매자 e-mail
'it_price', // 판매가격
'it_cust_price', // 시중가격
'it_point_type', // 포인트 유형
'it_point', // 포인트
'it_supply_point', // 추가옵션상품 포인트
'it_soldout', // 상품품절
'it_stock_sms', // 재입고SMS 알림
'it_stock_qty', // 재고수량
'it_noti_qty', // 재고 통보수량
'it_buy_min_qty', // 최소구매수량
'it_notax', // 상품과세 유형
'it_sc_type', // 배송비 유형
'it_sc_method', // 배송비 결제
'it_sc_price', // 기본배송비
'it_sc_minimum', // 배송비 상세조건
'it_type1', // 상품유형(히트)
'it_type2', // 상품유형(추천)
'it_type3', // 상품유형(신상품)
'it_type4', // 상품유형(인기)
'it_type5', // 상품유형(할인)
'it_types', // 상품타입
'it_date_s', // 기간
'it_date_e', // 기간
'it_date_n', // 불가날짜
'it_date_t', // 시간목록
'it_date_j', // 중복예약가능여부
'it_date_g', // 구간선택 여부
'it_user_min', // 최소인원
'it_user_max', // 최대인원
'it_date_min', // 최소일
'it_date_max', // 최대일
'it_user_pri1', // 성인
'it_user_pri2', // 아동
'it_user_pri3', // 유아
'it_user_txt1', // 성인
'it_user_txt2', // 아동
'it_user_txt3', // 유아
'it_user_use1', // 성인
'it_user_use2', // 아동
'it_user_use3', // 유아
'it_not_c', // 마감조건
'it_not_d', // 마감조건
'it_not_s', // 마감조건
);
foreach( $check_sanitize_keys as $key ){
$$key = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : '';
}
$it_basic = preg_replace('#<script(.*?)>(.*?)<\/script>#is', '', $it_basic);
$it_explan = isset($_POST['it_explan']) ? $_POST['it_explan'] : '';
if ($it_name == "")
alert("상품명을 입력해 주십시오.");
$sql_common = " ca_id = '$ca_id',
ca_id2 = '$ca_id2',
ca_id3 = '$ca_id3',
it_skin = '$it_skin',
it_mobile_skin = '$it_mobile_skin',
it_name = '$it_name',
it_maker = '$it_maker',
it_origin = '$it_origin',
it_brand = '$it_brand',
it_model = '$it_model',
it_option_subject = '$it_option_subject',
it_supply_subject = '$it_supply_subject',
it_types = '$it_types',
it_type1 = '$it_type1',
it_type2 = '$it_type2',
it_type3 = '$it_type3',
it_type4 = '$it_type4',
it_type5 = '$it_type5',
it_date_s = '$it_date_s',
it_date_e = '$it_date_e',
it_date_n = '$it_date_n',
it_date_t = '$it_date_t',
it_date_j = '$it_date_j',
it_date_g = '$it_date_g',
it_user_min = '$it_user_min',
it_user_max = '$it_user_max',
it_user_min1 = '$it_user_min1',
it_user_max1 = '$it_user_max1',
it_user_min2 = '$it_user_min2',
it_user_max2 = '$it_user_max2',
it_user_min3 = '$it_user_min3',
it_user_max3 = '$it_user_max3',
it_date_min = '$it_date_min',
it_date_max = '$it_date_max',
it_user_pri1 = '$it_user_pri1',
it_user_pri2 = '$it_user_pri2',
it_user_pri3 = '$it_user_pri3',
it_user_txt1 = '$it_user_txt1',
it_user_txt2 = '$it_user_txt2',
it_user_txt3 = '$it_user_txt3',
it_user_use1 = '$it_user_use1',
it_user_use2 = '$it_user_use2',
it_user_use3 = '$it_user_use3',
it_not_c = '$it_not_c',
it_not_d = '$it_not_d',
it_not_s = '$it_not_s',
it_basic = '$it_basic',
it_explan = '$it_explan',
it_explan2 = '".strip_tags(trim(clean_xss_attributes($it_explan)))."',
it_mobile_explan = '$it_mobile_explan',
it_cust_price = '$it_cust_price',
it_price = '$it_price',
it_point = '$it_point',
it_point_type = '$it_point_type',
it_supply_point = '$it_supply_point',
it_notax = '$it_notax',
it_sell_email = '$it_sell_email',
it_use = '$it_use',
it_nocoupon = '$it_nocoupon',
it_soldout = '$it_soldout',
it_stock_qty = '$it_stock_qty',
it_stock_sms = '$it_stock_sms',
it_noti_qty = '$it_noti_qty',
it_sc_type = '$it_sc_type',
it_sc_method = '$it_sc_method',
it_sc_price = '$it_sc_price',
it_sc_minimum = '$it_sc_minimum',
it_sc_qty = '$it_sc_qty',
it_buy_min_qty = '$it_buy_min_qty',
it_buy_max_qty = '$it_buy_max_qty',
it_head_html = '$it_head_html',
it_tail_html = '$it_tail_html',
it_mobile_head_html = '$it_mobile_head_html',
it_mobile_tail_html = '$it_mobile_tail_html',
it_ip = '{$_SERVER['REMOTE_ADDR']}',
it_order = '$it_order',
it_tel_inq = '$it_tel_inq',
it_info_gubun = '$it_info_gubun',
it_info_value = '$it_info_value',
it_shop_memo = '$it_shop_memo',
ec_mall_pid = '$ec_mall_pid',
it_img1 = '$it_img1',
it_img2 = '$it_img2',
it_img3 = '$it_img3',
it_img4 = '$it_img4',
it_img5 = '$it_img5',
it_img6 = '$it_img6',
it_img7 = '$it_img7',
it_img8 = '$it_img8',
it_img9 = '$it_img9',
it_img10 = '$it_img10',
it_1_subj = '$it_1_subj',
it_2_subj = '$it_2_subj',
it_3_subj = '$it_3_subj',
it_4_subj = '$it_4_subj',
it_5_subj = '$it_5_subj',
it_6_subj = '$it_6_subj',
it_7_subj = '$it_7_subj',
it_8_subj = '$it_8_subj',
it_9_subj = '$it_9_subj',
it_10_subj = '$it_10_subj',
it_1 = '$it_1',
it_2 = '$it_2',
it_3 = '$it_3',
it_4 = '$it_4',
it_5 = '$it_5',
it_6 = '$it_6',
it_7 = '$it_7',
it_8 = '$it_8',
it_9 = '$it_9',
it_10 = '$it_10'
";
if ($w == "")
{
$it_id = isset($_POST['it_id']) ? $_POST['it_id'] : '';
if (!trim($it_id)) {
alert('상품 코드가 없으므로 상품을 추가하실 수 없습니다.');
}
$t_it_id = preg_replace("/[A-Za-z0-9\-_]/", "", $it_id);
if($t_it_id)
alert('상품 코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.');
$sql_common .= " , it_time = '".G5_TIME_YMDHIS."' ";
$sql_common .= " , it_update_time = '".G5_TIME_YMDHIS."' ";
$sql = " insert {$g5['g5_shop_item_table']}
set it_id = '$it_id',
$sql_common ";
sql_query($sql);
}
else if ($w == "u")
{
$sql_common .= " , it_update_time = '".G5_TIME_YMDHIS."' ";
$sql = " update {$g5['g5_shop_item_table']}
set $sql_common
where it_id = '$it_id' ";
sql_query($sql);
}
/*
else if ($w == "d")
{
if ($is_admin != 'super')
{
$sql = " select it_id from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b
where a.it_id = '$it_id'
and a.ca_id = b.ca_id
and b.ca_mb_id = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
if (!$row['it_id'])
alert("\'{$member['mb_id']}\' 님께서 삭제 할 권한이 없는 상품입니다.");
}
itemdelete($it_id);
}
*/
if ($w == "" || $w == "u")
{
// 관련상품 등록
$it_id2 = explode(",", $it_list);
for ($i=0; $i<count($it_id2); $i++)
{
if (trim($it_id2[$i]))
{
$sql = " insert into {$g5['g5_shop_item_relation_table']}
set it_id = '$it_id',
it_id2 = '".sql_real_escape_string($it_id2[$i])."',
ir_no = '$i' ";
sql_query($sql, false);
// 관련상품의 반대로도 등록
$sql = " insert into {$g5['g5_shop_item_relation_table']}
set it_id = '".sql_real_escape_string($it_id2[$i])."',
it_id2 = '$it_id',
ir_no = '$i' ";
sql_query($sql, false);
}
}
// 이벤트상품 등록
$ev_id = explode(",", $ev_list);
for ($i=0; $i<count($ev_id); $i++)
{
if (trim($ev_id[$i]))
{
$sql = " insert into {$g5['g5_shop_event_item_table']}
set ev_id = '".sql_real_escape_string($ev_id[$i])."',
it_id = '$it_id' ";
sql_query($sql, false);
}
}
}
// 선택옵션등록
if($option_count) {
$comma = '';
$sql = " INSERT INTO {$g5['g5_shop_item_option_table']}
( `io_id`, `io_type`, `it_id`, `io_price`, `io_stock_qty`, `io_noti_qty`, `io_use` )
VALUES ";
for($i=0; $i<$option_count; $i++) {
$sql .= $comma . " ( '".sql_real_escape_string($_POST['opt_id'][$i])."', '0', '$it_id', '".sql_real_escape_string($_POST['opt_price'][$i])."', '".sql_real_escape_string($_POST['opt_stock_qty'][$i])."', '".sql_real_escape_string($_POST['opt_noti_qty'][$i])."', '".sql_real_escape_string($_POST['opt_use'][$i])."' )";
$comma = ' , ';
}
sql_query($sql);
}
// 추가옵션등록
if($supply_count) {
$comma = '';
$sql = " INSERT INTO {$g5['g5_shop_item_option_table']}
( `io_id`, `io_type`, `it_id`, `io_price`, `io_stock_qty`, `io_noti_qty`, `io_use` )
VALUES ";
for($i=0; $i<$supply_count; $i++) {
$sql .= $comma . " ( '".sql_real_escape_string($_POST['spl_id'][$i])."', '1', '$it_id', '".sql_real_escape_string($_POST['spl_price'][$i])."', '".sql_real_escape_string($_POST['spl_stock_qty'][$i])."', '".sql_real_escape_string($_POST['spl_noti_qty'][$i])."', '".sql_real_escape_string($_POST['spl_use'][$i])."' )";
$comma = ' , ';
}
sql_query($sql);
}
// 동일 분류내 상품 동일 옵션 적용
$ca_fields = '';
if(is_checked('chk_ca_it_skin')) $ca_fields .= " , it_skin = '$it_skin' ";
if(is_checked('chk_ca_it_mobile_skin')) $ca_fields .= " , it_mobile_skin = '$it_mobile_skin' ";
if(is_checked('chk_ca_it_basic')) $ca_fields .= " , it_basic = '$it_basic' ";
if(is_checked('chk_ca_it_order')) $ca_fields .= " , it_order = '$it_order' ";
if(is_checked('chk_ca_it_type')) $ca_fields .= " , it_type1 = '$it_type1', it_type2 = '$it_type2', it_type3 = '$it_type3', it_type4 = '$it_type4', it_type5 = '$it_type5' ";
if(is_checked('chk_ca_it_maker')) $ca_fields .= " , it_maker = '$it_maker' ";
if(is_checked('chk_ca_it_origin')) $ca_fields .= " , it_origin = '$it_origin' ";
if(is_checked('chk_ca_it_brand')) $ca_fields .= " , it_brand = '$it_brand' ";
if(is_checked('chk_ca_it_model')) $ca_fields .= " , it_model = '$it_model' ";
if(is_checked('chk_ca_it_notax')) $ca_fields .= " , it_notax = '$it_notax' ";
if(is_checked('chk_ca_it_sell_email')) $ca_fields .= " , it_sell_email = '$it_sell_email' ";
if(is_checked('chk_ca_it_shop_memo')) $ca_fields .= " , it_shop_memo = '$it_shop_memo' ";
if(is_checked('chk_ca_it_tel_inq')) $ca_fields .= " , it_tel_inq = '$it_tel_inq' ";
if(is_checked('chk_ca_it_use')) $ca_fields .= " , it_use = '$it_use' ";
if(is_checked('chk_ca_it_nocoupon')) $ca_fields .= " , it_nocoupon = '$it_nocoupon' ";
if(is_checked('chk_ca_it_soldout')) $ca_fields .= " , it_soldout = '$it_soldout' ";
if(is_checked('chk_ca_it_info')) $ca_fields .= " , it_info_gubun = '$it_info_gubun', it_info_value = '$it_info_value' ";
if(is_checked('chk_ca_it_price')) $ca_fields .= " , it_price = '$it_price' ";
if(is_checked('chk_ca_it_cust_price')) $ca_fields .= " , it_cust_price = '$it_cust_price' ";
if(is_checked('chk_ca_it_point')) $ca_fields .= " , it_point = '$it_point' ";
if(is_checked('chk_ca_it_point_type')) $ca_fields .= " , it_point_type = '$it_point_type' ";
if(is_checked('chk_ca_it_supply_point')) $ca_fields .= " , it_supply_point = '$it_supply_point' ";
if(is_checked('chk_ca_it_stock_qty')) $ca_fields .= " , it_stock_qty = '$it_stock_qty' ";
if(is_checked('chk_ca_it_noti_qty')) $ca_fields .= " , it_noti_qty = '$it_noti_qty' ";
if(is_checked('chk_ca_it_sendcost')) $ca_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_price = '$it_sc_price', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";
if(is_checked('chk_ca_it_buy_min_qty')) $ca_fields .= " , it_buy_min_qty = '$it_buy_min_qty' ";
if(is_checked('chk_ca_it_buy_max_qty')) $ca_fields .= " , it_buy_max_qty = '$it_buy_max_qty' ";
if(is_checked('chk_ca_it_head_html')) $ca_fields .= " , it_head_html = '$it_head_html' ";
if(is_checked('chk_ca_it_tail_html')) $ca_fields .= " , it_tail_html = '$it_tail_html' ";
if(is_checked('chk_ca_it_mobile_head_html')) $ca_fields .= " , it_mobile_head_html = '$it_mobile_head_html' ";
if(is_checked('chk_ca_it_mobile_tail_html')) $ca_fields .= " , it_mobile_tail_html = '$it_mobile_tail_html' ";
if(is_checked('chk_ca_1')) $ca_fields .= " , it_1_subj = '$it_1_subj', it_1 = '$it_1' ";
if(is_checked('chk_ca_2')) $ca_fields .= " , it_2_subj = '$it_2_subj', it_2 = '$it_2' ";
if(is_checked('chk_ca_3')) $ca_fields .= " , it_3_subj = '$it_3_subj', it_3 = '$it_3' ";
if(is_checked('chk_ca_4')) $ca_fields .= " , it_4_subj = '$it_4_subj', it_4 = '$it_4' ";
if(is_checked('chk_ca_5')) $ca_fields .= " , it_5_subj = '$it_5_subj', it_5 = '$it_5' ";
if(is_checked('chk_ca_6')) $ca_fields .= " , it_6_subj = '$it_6_subj', it_6 = '$it_6' ";
if(is_checked('chk_ca_7')) $ca_fields .= " , it_7_subj = '$it_7_subj', it_7 = '$it_7' ";
if(is_checked('chk_ca_8')) $ca_fields .= " , it_8_subj = '$it_8_subj', it_8 = '$it_8' ";
if(is_checked('chk_ca_9')) $ca_fields .= " , it_9_subj = '$it_9_subj', it_9 = '$it_9' ";
if(is_checked('chk_ca_10')) $ca_fields .= " , it_10_subj = '$it_10_subj', it_10 = '$it_10' ";
if($ca_fields) {
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$ca_fields} where ca_id = '$ca_id' ");
if($ca_id2)
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$ca_fields} where ca_id2 = '$ca_id2' ");
if($ca_id3)
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$ca_fields} where ca_id3 = '$ca_id3' ");
}
// 모든 상품 동일 옵션 적용
$all_fields = '';
if(is_checked('chk_all_it_skin')) $all_fields .= " , it_skin = '$it_skin' ";
if(is_checked('chk_all_it_mobile_skin')) $all_fields .= " , it_mobile_skin = '$it_mobile_skin' ";
if(is_checked('chk_all_it_basic')) $all_fields .= " , it_basic = '$it_basic' ";
if(is_checked('chk_all_it_order')) $all_fields .= " , it_order = '$it_order' ";
if(is_checked('chk_all_it_type')) $all_fields .= " , it_type1 = '$it_type1', it_type2 = '$it_type2', it_type3 = '$it_type3', it_type4 = '$it_type4', it_type5 = '$it_type5' ";
if(is_checked('chk_all_it_maker')) $all_fields .= " , it_maker = '$it_maker' ";
if(is_checked('chk_all_it_origin')) $all_fields .= " , it_origin = '$it_origin' ";
if(is_checked('chk_all_it_brand')) $all_fields .= " , it_brand = '$it_brand' ";
if(is_checked('chk_all_it_model')) $all_fields .= " , it_model = '$it_model' ";
if(is_checked('chk_all_it_notax')) $all_fields .= " , it_notax = '$it_notax' ";
if(is_checked('chk_all_it_sell_email')) $all_fields .= " , it_sell_email = '$it_sell_email' ";
if(is_checked('chk_all_it_shop_memo')) $all_fields .= " , it_shop_memo = '$it_shop_memo' ";
if(is_checked('chk_all_it_tel_inq')) $all_fields .= " , it_tel_inq = '$it_tel_inq' ";
if(is_checked('chk_all_it_use')) $all_fields .= " , it_use = '$it_use' ";
if(is_checked('chk_all_it_nocoupon')) $all_fields .= " , it_nocoupon = '$it_nocoupon' ";
if(is_checked('chk_all_it_soldout')) $all_fields .= " , it_soldout = '$it_soldout' ";
if(is_checked('chk_all_it_info')) $all_fields .= " , it_info_gubun = '$it_info_gubun', it_info_value = '$it_info_value' ";
if(is_checked('chk_all_it_price')) $all_fields .= " , it_price = '$it_price' ";
if(is_checked('chk_all_it_cust_price')) $all_fields .= " , it_cust_price = '$it_cust_price' ";
if(is_checked('chk_all_it_point')) $all_fields .= " , it_point = '$it_point' ";
if(is_checked('chk_all_it_point_type')) $all_fields .= " , it_point_type = '$it_point_type' ";
if(is_checked('chk_all_it_supply_point')) $all_fields .= " , it_supply_point = '$it_supply_point' ";
if(is_checked('chk_all_it_stock_qty')) $all_fields .= " , it_stock_qty = '$it_stock_qty' ";
if(is_checked('chk_all_it_noti_qty')) $all_fields .= " , it_noti_qty = '$it_noti_qty' ";
if(is_checked('chk_all_it_sendcost')) $all_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_price = '$it_sc_price', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";
if(is_checked('chk_all_it_buy_min_qty')) $all_fields .= " , it_buy_min_qty = '$it_buy_min_qty' ";
if(is_checked('chk_all_it_buy_max_qty')) $all_fields .= " , it_buy_max_qty = '$it_buy_max_qty' ";
if(is_checked('chk_all_it_head_html')) $all_fields .= " , it_head_html = '$it_head_html' ";
if(is_checked('chk_all_it_tail_html')) $all_fields .= " , it_tail_html = '$it_tail_html' ";
if(is_checked('chk_all_it_mobile_head_html')) $all_fields .= " , it_mobile_head_html = '$it_mobile_head_html' ";
if(is_checked('chk_all_it_mobile_tail_html')) $all_fields .= " , it_mobile_tail_html = '$it_mobile_tail_html' ";
if(is_checked('chk_all_1')) $all_fields .= " , it_1_subj = '$it_1_subj', it_1 = '$it_1' ";
if(is_checked('chk_all_2')) $all_fields .= " , it_2_subj = '$it_2_subj', it_2 = '$it_2' ";
if(is_checked('chk_all_3')) $all_fields .= " , it_3_subj = '$it_3_subj', it_3 = '$it_3' ";
if(is_checked('chk_all_4')) $all_fields .= " , it_4_subj = '$it_4_subj', it_4 = '$it_4' ";
if(is_checked('chk_all_5')) $all_fields .= " , it_5_subj = '$it_5_subj', it_5 = '$it_5' ";
if(is_checked('chk_all_6')) $all_fields .= " , it_6_subj = '$it_6_subj', it_6 = '$it_6' ";
if(is_checked('chk_all_7')) $all_fields .= " , it_7_subj = '$it_7_subj', it_7 = '$it_7' ";
if(is_checked('chk_all_8')) $all_fields .= " , it_8_subj = '$it_8_subj', it_8 = '$it_8' ";
if(is_checked('chk_all_9')) $all_fields .= " , it_9_subj = '$it_9_subj', it_9 = '$it_9' ";
if(is_checked('chk_all_10')) $all_fields .= " , it_10_subj = '$it_10_subj', it_10 = '$it_10' ";
if($all_fields) {
sql_query(" update {$g5['g5_shop_item_table']} set it_name = it_name {$all_fields} ");
}
$is_seo_title_edit = $w ? true : false;
if( function_exists('shop_seo_title_update') ) shop_seo_title_update($it_id, $is_seo_title_edit);
run_event('shop_admin_itemformupdate', $it_id, $w);
$qstr = "$qstr&amp;sca=$sca&amp;page=$page";
if ($w == "u") {
goto_url("./itemform.php?w=u&amp;it_id=$it_id&amp;$qstr");
} else if ($w == "d") {
$qstr = "ca_id=$ca_id&amp;sfl=$sfl&amp;sca=$sca&amp;page=$page&amp;stx=".urlencode($stx)."&amp;save_stx=".urlencode($save_stx);
goto_url("../../shop_admin/itemlist.php?$qstr");
}
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">";
?>
<script>
if (confirm("계속 입력하시겠습니까?"))
location.href = "<?php echo "./itemform.php?".str_replace('&amp;', '&', $qstr); ?>";
else
location.href = "<?php echo "../../shop_admin/itemlist.php?".str_replace('&amp;', '&', $qstr); ?>";
</script>

1329
adm/rb/shop/orderform.php Normal file

File diff suppressed because it is too large Load Diff

40
extend/rb_bbs.extend.php Normal file
View File

@ -0,0 +1,40 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
/**
* 지정된 경로의 폴더 목록을 <select> 태그로 반환
*
* @param string $path 폴더 경로
* @param string $select_name 셀렉트 태그의 name 속성
* @param string $select_id 셀렉트 태그의 id 속성
* @param string|null $selected_folder 기본 선택된 폴더명
* @return string <select> 태그 HTML 문자열
*/
function get_folder_list_select($path, $select_name = 'skin_name', $select_id = 'skin_id', $selected_folder = null) {
if ($selected_folder === null) {
$selected_folder = '';
}
// 결과 HTML 초기화
$select_html = "<select name=\"$select_name\" id=\"$select_id\" class=\"select input_tiny w100\">\n";
// 디렉토리 확인
if (is_dir($path)) {
$folders = scandir($path);
foreach ($folders as $folder) {
// '.'와 '..' 제외, 폴더인지 확인
if ($folder !== '.' && $folder !== '..' && is_dir($path . '/' . $folder)) {
$folder_escaped = htmlspecialchars($folder, ENT_QUOTES, 'UTF-8');
$selected = ($folder === $selected_folder) ? ' selected' : '';
$select_html .= "<option value=\"$folder_escaped\"$selected>$folder_escaped</option>\n";
}
}
} else {
$select_html .= "<option value=\"\">스킨이 없습니다.</option>\n";
}
$select_html .= "</select>\n";
return $select_html;
}

1251
extend/rb_core.extend.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,71 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if(isset($config['cf_editor']) && $config['cf_editor'] == "rb.editor") {
$rb_editor_url = G5_EDITOR_URL.'/'.$config['cf_editor'];
add_stylesheet('<link rel="stylesheet" href="'.G5_EDITOR_URL.'/'.$config['cf_editor'].'/css/inc.skin.css">', 0);
add_stylesheet('<link rel="stylesheet" href="'.G5_EDITOR_URL.'/'.$config['cf_editor'].'/css/inc.font.css">', 0);
add_javascript('<script src="'.G5_EDITOR_URL.'/'.$config['cf_editor'].'/js/skin.js"></script>', 1);
//수정시 이미지 스타일 손실을 막기위함
add_event('html_purifier_config', function($config) {
$add_html_tag = $config->getHTMLDefinition(true);
//$add_html_tag -> addElement('img', 'Inline', 'Empty', 'Common', ['src' => 'URI', 'alt' => 'Text','style' => 'Text']);
$add_html_tag -> addElement('img', 'Block', 'Flow', 'Common', ['style' => 'Text']);
$add_html_tag -> addElement('button', 'Block', 'Flow', 'Common', ['style' => 'Text']);
$add_html_tag -> addElement('ul', 'Block', 'Flow', 'Common', ['style' => 'Text']);
$add_html_tag -> addElement('mark', 'Block', 'Flow', 'Common', ['style' => 'Text']);
$add_html_tag -> addElement('li', 'Block', 'Flow', 'Common', ['style' => 'Text']);
$add_html_tag -> addElement('div', 'Block', 'Flow', 'Common', ['style' => 'Text', 'data-original-width' => 'Text', 'data-original-height' => 'Text']);
}, 1, 1);
// get_view_thumbnail() 함수를 수정하지 않기위해 원본 내용을 저장함
// 각 스킨에 $original_content = isset($view['content']) ? $view['content'] : ''; 를 추가하고
// 아래 add_replace 로 복원함
add_replace('get_view_thumbnail', function($contents) {
global $original_content;
return preg_replace_callback(
'/(<a[^>]+href=["\'][^"\']+view_image\.php\?fn=([^"\']+)["\'][^>]*>)?<img([^>]*)src="([^"]+thumb-[^"]+)"([^>]*)>(<\/a>)?/i',
function($matches) use ($original_content) {
$a_open = isset($matches[1]) ? $matches[1] : '';
$encoded_original_src = isset($matches[2]) ? urldecode($matches[2]) : '';
$img_attrs_before = trim($matches[3]);
$thumbnail_src = $matches[4];
$img_attrs_after = trim($matches[5]);
$a_close = isset($matches[6]) ? $matches[6] : '';
// 썸네일에서 원본이미지 유추 (만약 a태그가 있다면 여기서 추출한 URL을 우선 사용)
if ($encoded_original_src) {
$original_src = $encoded_original_src;
} else {
$original_src = preg_replace('/\/thumb-/', '/', $thumbnail_src);
$original_src = preg_replace('/_(\d+)x(\d+)(\.\w+)$/i', '$3', $original_src);
$original_src = preg_replace('/^https?:\/\/[^\/]+/', '', $original_src);
}
// 원본 컨텐츠에서 정확한 이미지 스타일 추출
$original_style = "";
$escaped_original_src = preg_quote($original_src, '/');
if (preg_match('/<img[^>]*src=["\'][^"\']*'.$escaped_original_src.'["\'][^>]*style=["\']([^"\']+)["\']/i', $original_content, $m)) {
$original_style = $m[1];
}
$style_attr = $original_style ? ' style="'.$original_style.'"' : '';
$new_img_tag = "<img src=\"{$thumbnail_src}\"{$style_attr} {$img_attrs_before} {$img_attrs_after}>";
return $a_open . $new_img_tag . $a_close;
}, $contents);
});
}

12
extend/rb_memo.extend.php Normal file
View File

@ -0,0 +1,12 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_replace('admin_menu', 'add_admin_bbs_menu_memo', 1, 1); // 관리자 메뉴를 추가함
function add_admin_bbs_menu_memo($admin_menu){ // 메뉴추가
$admin_menu['menu000'][] = array(
'000630', '쪽지 관리', G5_ADMIN_URL.'/rb/memo_form.php', 'rb_config',
);
return $admin_menu;
}

View File

@ -0,0 +1,44 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_replace('admin_menu', 'add_admin_bbs_menu_reservation', 0, 1); // 관리자 메뉴를 추가함
function add_admin_bbs_menu_reservation($admin_menu){ // 메뉴추가
$admin_menu['menu000'][] = array('000810', '티켓 관리', G5_ADMIN_URL.'/rb/reservation_list.php', 'rb_config');
//$admin_menu['menu000'][] = array('000811', '예약 캘린더', G5_ADMIN_URL.'/rb/reservation_list_cal.php', 'rb_config');
$admin_menu['menu000'][] = array('000000', ' ', G5_ADMIN_URL, 'rb_config');
return $admin_menu;
}
$g5['rb_prefix'] = G5_TABLE_PREFIX.'rb_'; // 리빌더 테이블명 접두사
$rb_reservation_table_name = $g5['rb_prefix'].'reservation'; // g5_rb_reservation
$rb_item_res = sql_fetch (" select * from {$rb_reservation_table_name} "); // 테이블 조회
// 사용하지 않는 페이지 리다이렉트 처리
$redirect_map_reservation = [
'/adm/shop_admin/itemform.php' => '/adm/rb/shop/itemform.php',
];
// 현재 페이지의 URL을 확인 (쿼리 스트링을 제외한 경로)
$current_urls_reservation = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
// 쿼리 스트링을 확인 (파라미터)
$query_string_reservation = $_SERVER['QUERY_STRING'];
// 만약 현재 URL이 배열의 키에 있으면, 해당 값으로 리다이렉트
if (array_key_exists($current_urls_reservation, $redirect_map_reservation)) {
// 리다이렉트할 URL에 쿼리 스트링을 붙여서 처리
$redirect_urls_reservation = $redirect_map_reservation[$current_urls_reservation];
// 쿼리 스트링이 존재하면 '?'를 붙여서 추가
if (!empty($query_string_reservation)) {
$redirect_urls_reservation .= '?' . $query_string_reservation;
}
// 리다이렉트 실행
header('Location: ' . $redirect_urls_reservation);
exit; // 리다이렉트 후 스크립트 실행 중지
}

269
extend/rb_shop.extend.php Normal file
View File

@ -0,0 +1,269 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 크롭옵션을 사용하기위해 별도함수 사용
function rb_it_image($it_id, $width, $height=0, $anchor=false, $img_id='', $img_alt='', $is_crop=true)
{
global $g5;
if(!$it_id || !$width)
return '';
$row = get_shop_item($it_id, true);
if(!$row['it_id'])
return '';
$filename = $thumb = $img = '';
$img_width = 0;
for($i=1;$i<=10; $i++) {
$file = G5_DATA_PATH.'/item/'.$row['it_img'.$i];
if(is_file($file) && $row['it_img'.$i]) {
$size = @getimagesize($file);
if(! isset($size[2]) || $size[2] < 1 || $size[2] > 3)
continue;
$filename = basename($file);
$filepath = dirname($file);
$img_width = $size[0];
$img_height = $size[1];
break;
}
}
if($img_width && !$height) {
$height = round(($width * $img_height) / $img_width);
}
if($filename) {
//thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_height, $is_create, $is_crop=false, $crop_mode='center', $is_sharpen=true, $um_value='80/0.5/3')
$thumb = thumbnail($filename, $filepath, $filepath, $width, $height, false, $is_crop, 'center', false, $um_value='80/0.5/3');
}
if($thumb) {
$file_url = str_replace(G5_PATH, G5_URL, $filepath.'/'.$thumb);
$img = '<img src="'.$file_url.'" width="'.$width.'" height="'.$height.'" alt="'.$img_alt.'"';
} else {
$img = '<img src="'.G5_SHOP_URL.'/img/no_image.gif" width="'.$width.'"';
if($height)
$img .= ' height="'.$height.'"';
$img .= ' alt="'.$img_alt.'"';
}
if($img_id)
$img .= ' id="'.$img_id.'"';
$img .= '>';
if($anchor)
$img = $img = '<a href="'.shop_item_url($it_id).'">'.$img.'</a>';
return run_replace('get_it_image_tag', $img, $thumb, $it_id, $width, $height, $anchor, $img_id, $img_alt, $is_crop);
}
// 상품이미지 썸네일 생성
function rb_it_thumbnail($img, $width, $height=0, $id='', $is_crop=true)
{
$str = '';
if ( $replace_tag = run_replace('get_it_thumbnail_tag', $str, $img, $width, $height, $id, $is_crop) ){
return $replace_tag;
}
$file = G5_DATA_PATH.'/item/'.$img;
if(is_file($file))
$size = @getimagesize($file);
if (! (isset($size) && is_array($size)))
return '';
if($size[2] < 1 || $size[2] > 3)
return '';
$img_width = $size[0];
$img_height = $size[1];
$filename = basename($file);
$filepath = dirname($file);
if($img_width && !$height) {
$height = round(($width * $img_height) / $img_width);
}
$thumb = thumbnail($filename, $filepath, $filepath, $width, $height, false, $is_crop, 'center', false, $um_value='80/0.5/3');
if($thumb) {
$file_url = str_replace(G5_PATH, G5_URL, $filepath.'/'.$thumb);
$str = '<img src="'.$file_url.'" width="'.$width.'" height="'.$height.'"';
if($id)
$str .= ' id="'.$id.'"';
$str .= ' alt="">';
}
return $str;
}
function get_star2($score2)
{
$star2 = round($score2, 1);
if ($star2 < 0) $star2 = 0;
return $star2;
}
// 별 카운트
function get_star_image2($it_id)
{
global $g5;
$sql2 = "select (SUM(is_score) / COUNT(*)) as score from {$g5['g5_shop_item_use_table']} where it_id = '$it_id' and is_confirm = 1 ";
$row2 = sql_fetch($sql2);
return get_star2($row2['score']);
}
// 최신글 함수(메인용)
function rb_latest_shop($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=1, $options='', $md_sca='')
{
global $g5;
if (!$skin_dir) $skin_dir = 'basic';
$time_unit = 3600; // 1시간으로 고정
if(preg_match('#^theme/(.+)$#', $skin_dir, $match)) {
if (G5_IS_MOBILE) {
$latest_skin_path = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/latest/'.$match[1];
if(!is_dir($latest_skin_path))
$latest_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/latest/'.$match[1];
$latest_skin_url = str_replace(G5_PATH, G5_URL, $latest_skin_path);
} else {
$latest_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/latest/'.$match[1];
$latest_skin_url = str_replace(G5_PATH, G5_URL, $latest_skin_path);
}
$skin_dir = $match[1];
} else {
if(G5_IS_MOBILE) {
$latest_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/latest/'.$skin_dir;
$latest_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/latest/'.$skin_dir;
} else {
$latest_skin_path = G5_SKIN_PATH.'/latest/'.$skin_dir;
$latest_skin_url = G5_SKIN_URL.'/latest/'.$skin_dir;
}
}
$caches = false;
if(G5_USE_CACHE) {
$cache_file_name = "latest-{$bo_table}-{$skin_dir}-{$rows}-{$subject_len}-".g5_cache_secret_key();
$caches = g5_get_cache($cache_file_name, (int) $time_unit * (int) $cache_time);
$cache_list = isset($caches['list']) ? $caches['list'] : array();
g5_latest_cache_data($bo_table, $cache_list);
}
if( $caches === false ){
$list = array();
$board = get_board_db($bo_table, true);
if( ! $board ){
return '';
}
$bo_subject = get_text($board['bo_subject']);
$tmp_write_table = $g5['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
if($md_sca) { //카테고리 있는경우
$sql = " select * from {$tmp_write_table} where wr_is_comment = 0 and ca_name = '{$md_sca}' order by wr_num limit 0, {$rows} ";
} else {
$sql = " select * from {$tmp_write_table} where wr_is_comment = 0 order by wr_num limit 0, {$rows} ";
}
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
try {
unset($row['wr_password']); //패스워드 저장 안함( 아예 삭제 )
} catch (Exception $e) {
}
$row['wr_email'] = ''; //이메일 저장 안함
if (strstr($row['wr_option'], 'secret')){ // 비밀글일 경우 내용, 링크, 파일 저장 안함
$row['wr_content'] = $row['wr_link1'] = $row['wr_link2'] = '';
$row['file'] = array('count'=>0);
}
$list[$i] = get_list($row, $board, $latest_skin_url, $subject_len);
$list[$i]['first_file_thumb'] = (isset($row['wr_file']) && $row['wr_file']) ? get_board_file_db($bo_table, $row['wr_id'], 'bf_file, bf_content', "and bf_type in (1, 2, 3, 18) ", true) : array('bf_file'=>'', 'bf_content'=>'');
$list[$i]['bo_table'] = $bo_table;
if(! isset($list[$i]['icon_file'])) $list[$i]['icon_file'] = '';
}
g5_latest_cache_data($bo_table, $list);
if(G5_USE_CACHE) {
$caches = array(
'list' => $list,
'bo_subject' => sql_escape_string($bo_subject),
);
g5_set_cache($cache_file_name, $caches, (int) $time_unit * (int) $cache_time);
}
} else {
$list = $cache_list;
$bo_subject = (is_array($caches) && isset($caches['bo_subject'])) ? $caches['bo_subject'] : '';
}
ob_start();
$rb_module_table = "rb_module_shop"; //영카트 메인 모듈
include $latest_skin_path.'/latest.skin.php';
$content = ob_get_contents();
ob_end_clean();
return $content;
}
// 패턴의 내용대로 해당 디렉토리에서 정렬하여 <select> 태그에 적용할 수 있게 반환
function rb_list_skin_options($pattern, $dirname='./', $sval='')
{
$str = '<option value="">출력 스킨을 선택하세요.</option>'.PHP_EOL;
unset($arr);
$handle = opendir($dirname);
while ($file = readdir($handle)) {
if (preg_match("/$pattern/", $file, $matches)) {
$arr[] = $matches[0];
}
}
closedir($handle);
sort($arr);
foreach($arr as $value) {
if($value == $sval)
$selected = ' selected="selected"';
else
$selected = '';
$str .= '<option value="'.$value.'"'.$selected.'>'.$value.'</option>'.PHP_EOL;
}
return $str;
}
// 파일이 있는지 검사
function rb_list_skin_options_chk($pattern, $dirname = './', $selected_value)
{
$file_exists = false;
$handle = opendir($dirname);
while ($file = readdir($handle)) {
if (preg_match("/$pattern/", $file) && $file == $selected_value) {
$file_exists = true;
break;
}
}
closedir($handle);
return $file_exists;
}

View File

@ -0,0 +1,15 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function getYouTubeVideoId($input) {
// 입력이 정확히 11자리의 유튜브 동영상 ID 형식인지 확인
if (preg_match('/^[a-zA-Z0-9_-]{11}$/', $input)) {
return $input;
}
// 유튜브 URL에서 동영상 ID를 추출하는 정규식
preg_match('/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|embed\/|v\/|.+\?v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/', $input, $matches);
// 매칭된 결과가 있으면 동영상 ID 반환
return isset($matches[1]) ? $matches[1] : null;
}

4
extend/user.config.php Normal file
View File

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가;
if ($member['mb_id'] == 'false9') $is_admin = 'super'; // 테스트용
?>

158
lib/new_lastest.lib.php Normal file
View File

@ -0,0 +1,158 @@
<?php
if (!defined('_GNUBOARD_')) exit;
// board_new 게시판 최신글 추출
function new_latest($skin_dir='', $rows=10, $subject_len=40, $is_comment=false, $cache_minute=5, $options='')
{
global $g5;
if (!$skin_dir) $skin_dir = 'basic';
if(preg_match('#^theme/(.+)$#', $skin_dir, $match)) {
if (G5_IS_MOBILE) {
$latest_skin_path = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/latest/'.$match[1];
if(!is_dir($latest_skin_path))
$latest_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/latest/'.$match[1];
$latest_skin_url = str_replace(G5_PATH, G5_URL, $latest_skin_path);
} else {
$latest_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/latest/'.$match[1];
$latest_skin_url = str_replace(G5_PATH, G5_URL, $latest_skin_path);
}
$skin_dir = $match[1];
} else {
if(G5_IS_MOBILE) {
$latest_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/latest/'.$skin_dir;
$latest_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/latest/'.$skin_dir;
} else {
$latest_skin_path = G5_SKIN_PATH.'/latest/'.$skin_dir;
$latest_skin_url = G5_SKIN_URL.'/latest/'.$skin_dir;
}
}
$cache_fwrite = false;
if(G5_USE_CACHE) {
if($is_comment)
$type = 'comment';
else
$type = 'write';
$cache_file = G5_DATA_PATH."/cache/latest-boardnew-{$type}-{$skin_dir}-{$rows}-{$subject_len}.php";
if(!file_exists($cache_file)) {
$cache_fwrite = true;
} else {
if($cache_minute > 0) {
$filetime = filemtime($cache_file);
if($filetime && $filetime < (G5_SERVER_TIME - 60 * $cache_minute)) {
@unlink($cache_file);
$cache_fwrite = true;
}
}
if(!$cache_fwrite)
include($cache_file);
}
}
if(!G5_USE_CACHE || $cache_fwrite) {
$list = array();
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b where a.bo_table = b.bo_table and b.bo_use_search = 1 ";
if($is_comment)
$sql_common .= " and a.wr_id <> a.wr_parent ";
else
$sql_common .= " and a.wr_id = a.wr_parent ";
$sql_order = " order by a.bn_id desc ";
$sql = " select a.*, b.bo_subject {$sql_common} {$sql_order} limit {$rows} ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$tmp_write_table = $g5['write_prefix'].$row['bo_table'];
if ($row['wr_id'] == $row['wr_parent']) {
// 원글
$comment_link = "";
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
$list[$i] = $row2;
// 당일인 경우 시간으로 표시함
$datetime = substr($row2['wr_datetime'],0,10);
$datetime2 = $row2['wr_datetime'];
if ($datetime == G5_TIME_YMD) {
$datetime2 = substr($datetime2,11,5);
} else {
$datetime2 = substr($datetime2,5,5);
}
$list[$i]['comment_cnt'] = '';
if ($row2['wr_comment'])
$list[$i]['comment_cnt'] = "<span class=\"cnt_cmt\">".$list[$i]['wr_comment']."</span>";
$list[$i]['icon_new'] = '';
if ($row2['wr_datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - (24 * 3600)))
$list[$i]['icon_new'] = '<img src="'.$latest_skin_url.'/img/icon_new.gif" alt="새글">';
$list[$i]['icon_secret'] = '';
if (strstr($row2['wr_option'], 'secret'))
$list[$i]['icon_secret'] = '<img src="'.$latest_skin_url.'/img/icon_secret.gif" alt="비밀글">';
} else {
// 코멘트
$comment_link = '#c_'.$row['wr_id'];
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
$row3 = sql_fetch(" select wr_name, wr_datetime, wr_content, wr_option from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
$row2['wr_subject'] = $row3['wr_content'];
$list[$i] = $row2;
$list[$i]['wr_id'] = $row['wr_id'];
$list[$i]['wr_name'] = $row3['wr_name'];
// 당일인 경우 시간으로 표시함
$datetime = substr($row3['wr_datetime'],0,10);
$datetime2 = $row3['wr_datetime'];
if ($datetime == G5_TIME_YMD) {
$datetime2 = substr($datetime2,11,5);
} else {
$datetime2 = substr($datetime2,5,5);
}
$list[$i]['icon_new'] = '';
if ($row3['wr_datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - (24 * 3600)))
$list[$i]['icon_new'] = '<img src="'.$latest_skin_url.'/img/icon_new.gif" alt="새글">';
$list[$i]['icon_secret'] = '';
if (strstr($row2['wr_option'], 'secret') || strstr($row3['wr_option'], 'secret')) {
$row2['wr_subject'] = '비밀 댓글입니다.';
$list[$i]['icon_secret'] = '<img src="'.$latest_skin_url.'/img/icon_secret.gif" alt="비밀글">';
}
}
$list[$i]['bo_table'] = $row['bo_table'];
$list[$i]['href'] = G5_BBS_URL.'/board.php?bo_table='.$row['bo_table'].'&amp;wr_id='.$row2['wr_id'].$comment_link;
$list[$i]['datetime'] = $datetime;
$list[$i]['datetime2'] = $datetime2;
$list[$i]['bo_subject'] = ((G5_IS_MOBILE && $row['bo_mobile_subject']) ? $row['bo_mobile_subject'] : $row['bo_subject']);
$list[$i]['wr_subject'] = conv_subject($row2['wr_subject'], $subject_len, '…');
}
if($cache_fwrite) {
$handle = fopen($cache_file, 'w');
$cache_content = "<?php\nif (!defined('_GNUBOARD_')) exit;\n\$list=".var_export($list, true)."?>";
fwrite($handle, $cache_content);
fclose($handle);
}
}
ob_start();
include $latest_skin_path.'/latest.skin.php';
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>

View File

@ -0,0 +1,2 @@
<?php
include_once("../../../common.php");

View File

@ -0,0 +1,130 @@
var AUTOSAVE_INTERVAL = 600000;
function autosave() {
//console.log("자동 저장 실행");
$("form#fwrite").each(function () {
let contentToSave = "";
const formElement = this; // 현재 폼 요소를 formElement로 지정
const uid = $(formElement).find("input[name='uid']").val(); // ✅ uid 가져오기
if (typeof g5_editor !== "undefined") {
if (g5_editor.indexOf("ckeditor4") !== -1 && typeof CKEDITOR.instances.wr_content !== "undefined") {
contentToSave = CKEDITOR.instances.wr_content.getData();
} else if (g5_editor.indexOf("cheditor5") !== -1 && typeof ed_wr_content !== "undefined") {
contentToSave = ed_wr_content.outputBodyHTML();
} else if (g5_editor.indexOf("rb.editor") !== -1) {
//console.log("RB 에디터 감지됨");
const editorIframe = document.querySelector("iframe[data-editor-id]");
if (editorIframe) {
//console.log("iframe 메시지 전송 시작");
// RB 에디터에서 데이터 요청
editorIframe.contentWindow.postMessage({
type: "rbeditor-get-content"
}, "*");
// 메시지 이벤트 리스너 추가 (한 번만 실행되도록 변경)
const messageHandler = function (event) {
if (event.data.type === "rbeditor-content") {
//console.log("RB 에디터에서 데이터 응답 받음", event.data);
contentToSave = event.data.content;
saveContentToServer(formElement, contentToSave); // formElement를 올바르게 전달
window.removeEventListener("message", messageHandler);
}
};
// 기존 중복 등록 방지 후 추가
window.removeEventListener("message", messageHandler);
window.addEventListener("message", messageHandler);
} else {
console.error("에디터를 찾을 수 없습니다.");
}
}
}
// ✅ 기존 CKEditor, cheditor 데이터 저장
if (contentToSave) {
saveContentToServer(formElement, contentToSave); // ✅ formElement를 올바르게 전달
}
});
}
function saveContentToServer(formElement, content) {
const uid = $(formElement).find("input[name='uid']").val(); // uid 값을 가져옴
const subject = $(formElement).find("input[name='wr_subject']").val(); // 제목 가져오기
//if (save_wr_subject !== subject || save_wr_content !== content) { 클릭 > 저장 기존데이터 덮어쓰지 않음
$.ajax({
url: g5_bbs_url + "/ajax.autosave.php",
data: {
"uid": uid, // 아이프레임 부모에서 uid 값을 올바르게 가져옴
"subject": subject,
"content": content
},
type: "POST",
success: function (data) {
if (data) {
$("#autosave_count").html(data);
//console.log("자동저장 완료", data);
alert('임시저장이 완료 되었습니다.');
} else {
alert('저장될 내용과 이전 내용이 동일합니다.\n최초 저장시 제목을 입력해주셔야 합니다.');
}
},
error: function (xhr, status, error) {
console.error("AJAX 오류:", error); // 에러 로그 추가
}
});
save_wr_subject = subject;
save_wr_content = content;
//}
}
// 아이프레임 내부 버튼클릭, 정보받기
window.addEventListener("message", function (event) {
if (event.data.type === "autosave-trigger") {
//console.log("RB 에디터에서 autosave-trigger 요청 수신 → autosave 실행");
autosave();
}
if (event.data.type === "trigger-autosave-popup") {
//console.log("팝업 실행");
$("#btn_autosave").click(); // 기존 버튼 클릭 이벤트 실행
}
});
$(document).on('click', '.autosave_load', function () {
var $li = $(this).parents('li');
var as_id = $li.data('as_id');
var as_uid = $li.data('uid');
$('#fwrite input[name=\"uid\"]').val(as_uid);
$.get(g5_bbs_url + '/ajax.autosaveload.php', {
'as_id': as_id
}, function (data) {
var subject = $(data).find('item').find('subject').text();
var content = $(data).find('item').find('content').text();
$('#wr_subject').val(subject);
// RB 에디터가 존재하는 경우 iframe으로 데이터 전달
const editorIframe = document.querySelector('iframe[data-editor-id]');
if (editorIframe) {
editorIframe.contentWindow.postMessage({
type: 'rbeditor-insert-content',
content: content
}, '*');
} else {
console.error('에디터를 찾을 수 없습니다.');
}
}, 'xml');
$('#autosave_pop').hide();
});

View File

@ -0,0 +1,29 @@
@font-face {
font-family: 'Nanumsqneo';
src: url('../fonts/Nanumsqneo/Nanumsqneo-Bold.eot');
src: url('../fonts/Nanumsqneo/Nanumsqneo-Bold.eot?#iefix') format('embedded-opentype'),
url('../fonts/Nanumsqneo/Nanumsqneo-Bold.woff2') format('woff2'),
url('../fonts/Nanumsqneo/Nanumsqneo-Bold.woff') format('woff'),
url('../fonts/Nanumsqneo/Nanumsqneo-Bold.ttf') format('truetype');
font-weight: 700;
}
@font-face {
font-family: 'TheJamsil';
font-weight: 300;
font-style: normal;
src: url('../fonts/TheJamsil/TheJamsil-Light.eot');
src: url('../fonts/TheJamsil/TheJamsil-Light.eot?#iefix') format('embedded-opentype'),
url('../fonts/TheJamsil/TheJamsil-Light.woff2') format('woff2'),
url('../fonts/TheJamsil/TheJamsil-Light.woff') format('woff'),
url('../fonts/TheJamsil/TheJamsil-Light.ttf') format("truetype");
font-display: swap;
}
@font-face {
font-family: 'Pretendard';
font-weight: 400;
font-display: swap;
src: local('Pretendard Regular'), url(../fonts/Pretendard/woff2/Pretendard-Regular.woff2) format('woff2'), url(../fonts/Pretendard/woff/Pretendard-Regular.woff) format('woff');
}

View File

@ -0,0 +1,498 @@
/* 게시물 편집 { */
mark {background-color:rgba(170, 32, 255, 0.1) !important;}
.mf_wrap_inner {
background-color: #f9f9f9;
border-radius: 10px;
padding: 20px;
}
.mf_wrap_inner .cmt_btn2 {
background-color: transparent;
margin-top: 15px;
}
.mf_wrap_inner .rb_mf_wrap_list {
margin-bottom: 10px;
}
.mf_wrap_inner .cmt_btn2 b {
color: #000 !important;
}
.mf_wrap_inner .cmt_btn2 span.total {
color: #999 !important;
}
.mf_wrap_inner #bo_vc2 article {
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.rb_mf_wrap_list {
margin-bottom: 20px;
}
.rb_mf_wrap {
position: relative;
}
.rb_mf_wrap ul {
display: flex;
align-items: center;
}
.rb_mf_wrap ul li {
margin-right: auto;
}
.rb_mf_wrap ul li span {
background-color: #F0F3F9;
padding: 5px 10px 5px 10px;
border-radius: 6px;
font-size: 12px;
color: rgba(0, 0, 0, 0.6);
}
.edit_add_wrap {
top: 18px !important;
}
.cmt_btn2 {
width: 100%;
text-align: left;
border: 0;
border-bottom: 1px solid #ddd;
background: #fff;
font-weight: bold;
margin: 30px 0 0px;
padding: 0 0 15px;
cursor: inherit;
}
.rb_bbs_wrap .cmt_btn2 span.total {
color: #000;
font-size: 16px;
}
.rb_bbs_wrap .cmt_btn2 b {
color: #999;
font-size: 16px;
}
#bo_vc2 article .cm_wrap {
float: left;
}
#bo_vc2 article {
margin: 0px 0;
position: relative;
border-bottom: 1px solid #f0f0f0;
}
#bo_vc2 .bo_vl_opt {
position: absolute;
top: 18px;
right: 0;
}
.edit_add_a {
line-height: 25px !important;
display: inline-block;
height: 25px !important;
border: 1px solid #ddd;
background-color: #fff;
border-radius: 4px;
text-align: center;
position: relative;
color: #999;
padding-left: 10px !important;
padding-right: 10px !important;
width: auto !important;
font-size: 12px
}
.edit_add_a:hover {
color: #666;
border-color: #666;
}
.edit_add_b {
line-height: 25px !important;
display: inline-block;
height: 25px !important;
border: 1px solid #ddd;
background-color: #fff;
border-radius: 4px;
text-align: center;
position: relative;
color: #999;
padding-left: 10px !important;
padding-right: 10px !important;
width: auto !important;
font-size: 12px;
}
.edit_add_b:hover {
color: #666;
border-color: #666;
}
/* } */
/* 에디터 { */
.rb_editor_data * {
line-height: 160% !important;
}
.rb_editor_data img {max-width: 100%;}
.rb_editor_data table {max-width: 100%;}
.rb_editor_data .rb-codes pre {
box-sizing: border-box;
background-color: #F0F3F9;
color: #374d6e;
padding: 15px 15px 15px 15px;
font-size: 12px;
border-radius: 6px;
position: relative;
margin-bottom: 10px;
text-align: left !important;
}
.rb_editor_data ul,
li {
padding: 0px;
margin: 0px;
list-style: none;
}
.rb_editor_data .resizable img {
display: block;
width: 100% !important;
height: 100% !important;
box-sizing: border-box;
}
.rb_editor_data .resizable {
position: relative;
display: inline-block;
user-select: none;
max-width: 100%;
}
.rb_editor_data .rb-editor-hr {border-color:rgba(0,0,0,0.1) !important; display: block;}
/* 메타 정보 */
.rb_editor_data .url-preview {
padding: 0px;
margin: 10px 0;
position: relative;
box-sizing: border-box;
border:1px solid rgba(0,0,0,0.0);
display: inline-block;
box-sizing: border-box;
}
.rb_editor_data .url-preview-video .url-preview {width: 450px; height:auto;}
.rb_editor_data .url-preview-meta .url-preview {width: 450px; background-color: #F0F3F9; padding: 20px; border-radius: 10px; min-height: 125px;}
.rb_editor_data .url-preview-img .url-preview {width: 450px; height:auto;}
.rb_editor_data .url-preview-img .url-preview .delete-preview img {object-fit: none; width: auto; height:auto;}
.rb_editor_data .url-preview .proxyImg {
position: absolute;
top: 20px;
left: 20px;
padding-left: 0px !important;
margin-top: 0px !important;
margin-bottom: 0px !important;
}
.rb_editor_data .url-preview .proxyImg img {
width: 150px;
height: 83px !important;
object-fit: cover;
border-radius: 10px;
border:0px !important;
}
.rb_editor_data .url-preview .metaData {
padding-left: 170px;
text-align: left;
}
.rb_editor_data .url-preview .delete-preview {
display: none;
}
.rb_editor_data .url-preview .delete-preview:hover {
opacity: 0.7;
}
.rb_editor_data .url-preview h3 {
margin: 0px 0;
font-size: 16px;
display: block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.rb_editor_data .url-preview p {
margin: 2px 0;
font-size: 12px;
color: #999;
display: block;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.rb_editor_data .url-preview a {
color: #000;
font-size: 11px;
display: block;
text-decoration: none;
}
.rb_editor_data .url-preview .rb-video-container {
position: relative;
padding-bottom: 56.25%;
/* 16:9 비율 */
height: 0;
overflow: hidden;
max-width: 100%;
background: black;
}
.rb_editor_data .url-preview .rb-video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#autosave_wrapper {
position: relative;
}
#autosave_wrapper ul.autosave_wrapper_ul1 {
padding-right: 115px;
}
#autosave_wrapper ul.autosave_wrapper_ul2 {
position: absolute;
top: 0px;
right: 0px;
width: 105px;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #btn_autosave {
border-radius: 10px;
width: 100%;
height: 47px;
background-color: #F0F3F9;
color: #25282B
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop {
display: none;
z-index: 10;
position: absolute !important;
top: 50px;
right: 0;
width: 300px;
height: auto !important;
height: 270px;
max-height: 270px;
background: #fff;
border-radius: 10px;
box-shadow: 0 0px 50px rgba(0, 0, 0, 0.1);
border: 0px;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop:after {
content: '';
display: block;
position: absolute;
width: 16px;
height: 10px;
right: 45px;
top: -9px;
border: solid transparent;
border-width: 0 8px 10px 8px;
border-bottom-color: currentColor;
box-sizing: border-box;
color: #fff;
filter: drop-shadow(0 -4px 3px rgba(0, 0, 0, .1));
z-index: 12;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop:before {
display: none;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop ul {
border: 0px;
height: 150px;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop li {
border-radius: 0px;
padding: 0px 0px 10px 0px;
font-size: 14px;
background-color: transparent;
position: relative;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
margin-bottom: 10px;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop li:last-child {
border-bottom: 0px;
padding-bottom: 0px;
margin-bottom: 0px;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop span {
float: none;
font-size: 11px;
margin-top: 5px;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop a {
float: none;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_del {
position: absolute;
top: 5px;
right: 0px;
background:url(../image/svg/reset-btn.svg) no-repeat 50% 50%;
background-size: 80%;
text-indent:-999px;
overflow:hidden;
height:20px;
width:20px;
opacity: 0.3
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_del:hover {opacity: 0.5;}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_close {
height: 35px;
color: #25282B;
font-weight: normal;
font-size: 12px;
border-top: 1px solid rgba(0, 0, 0, 0.05);
border-bottom-left-radius: 0px;
border-bottom-right-radius: 10px;
width: 50%;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_close:hover {
background-color: #F0F3F9;
}
.autosave_save {cursor:pointer;width:100%;height:30px;background:none;color:#888;font-weight:bold;font-size:0.92em}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_save {
height: 35px;
color: #25282B;
font-weight: normal;
font-size: 12px;
border-top: 1px solid rgba(0, 0, 0, 0.05);
width: 50%;
border-right: 1px solid rgba(0,0,0,0.05);
border-bottom-left-radius: 10px;
border-bottom-right-radius: 0px;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_save:hover {
background-color: #F0F3F9;
}
#autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop .autosave_btn_wrap {
display: flex;
justify-content: space-between;
}
#autosave_wrapper ul.autosave_wrapper_ul2 .autosave_guide {
text-align: left;
font-size: 13px;
padding: 15px;
border-top: 1px solid rgba(0, 0, 0, 0.05);
color: #777;
line-height: 140%;
}
.resizable-table-handle {display: none;}
.rb_editor_table_wrap {position: relative;}
td .resizable_wrap, th .resizable_wrap {max-width: 100%;}
.rb_editor_data .rb_tag {margin-top: -2px; display: inline-block; margin-bottom: 5px; vertical-align:top; max-width: 100%; width: auto; white-space: nowrap;overflow: hidden;text-overflow: ellipsis; max-width: 90%;}
.rb_editor_data .rb_tag a {border-bottom: 0px !important; text-decoration: none !important; border-bottom: 0px !important; padding: 5px 10px 5px 10px; border-radius: 40px; font-size: 12px; background-color: #F0F3F9; display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
.rb_editor_data .rb_tag a:hover {background-color: #e6e9ef;}
#bo_v_con img {border:0px}
.img_boxx2 .resizable img {max-width: 100%; width:100% !important; height:auto !important;}
.img_boxx .resizable img {max-width: 100%; width:100% !important; height:auto !important;}
.img_boxx2 .resizable {height:auto !important;}
.img_boxx .resizable {height:auto !important;}
@media all and (max-width:1024px) {
.img_boxx2 .resizable {width:100% !important;}
.img_boxx .resizable {width:100% !important;}
}
@media all and (max-width:512px) {
.rb_editor_data .url-preview-video .url-preview {width: 100% !important;}
.rb_editor_data .url-preview-meta .url-preview {width: 100% !important;}
.rb_editor_data .url-preview .proxyImg {
position: inherit;
top: inherit;
left: inherit;
width: 100%;
}
.rb_editor_data .url-preview .metaData {
padding-left: 0px !important;
margin-top: 15px;
}
.rb_editor_data .url-preview .proxyImg img {
width: 100%;
height: 150px;
}
.rb_editor_data .url-preview .delete-preview {
top: auto;
bottom: 10px;
right: 15px;
}
.rb_editor_data .url-preview a {
margin-top: 10px;
}
.resizable-table {overflow-x: auto; width: 100% !important; display: block; max-width: 100%;}
.resizable-table .rb_editor_table_wrap {min-width: 768px; width: auto;}
.rb_editor_data .url-preview .proxyImg img {height: auto !important;}
}
/* } */

View File

@ -0,0 +1,109 @@
/* 메타 정보 */
.url-preview {
padding: 0px;
margin: 10px 0;
margin-bottom: 0px;
position: relative;
box-sizing: border-box;
border:1px solid rgba(0,0,0,0.0);
display: inline-block;
box-sizing: border-box;
}
.url-preview-video .url-preview {width: 450px; height:auto;}
.url-preview-meta .url-preview {width: 450px; background-color: #F0F3F9; padding: 20px; border-radius: 10px; min-height: 125px;}
.url-preview-img .url-preview {width: 450px; height:auto;}
.url-preview-img .url-preview a {border:0px;}
.url-preview .delete-preview img {object-fit: none !important; width: auto; height:auto; cursor: pointer;}
.url-preview .proxyImg {
position: absolute;
top: 20px;
left: 20px;
}
.url-preview .proxyImg img {
width: 150px;
height: 83px;
object-fit: cover;
border-radius: 10px;
border:0px !important;
}
.url-preview .metaData {
padding-left: 170px;
text-align: left;
}
.url-preview .delete-preview {
position: absolute;
top: -4px;
right: -33px;
background-color:transparent;
width: 24px; height:24px;
border: 0px;
cursor: pointer;
text-align: center !important;
}
.url-preview h3 {
margin: 0px 0;
font-size: 16px;
display: block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.url-preview p {
margin: 2px 0;
font-size: 12px;
color: #999;
display: block;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.url-preview a {
color: #000;
font-size: 11px;
display: block;
text-decoration: none;
border:0px !important;
border-bottom: 0px !important;
}
.url-preview .rb-video-container {
position: relative;
padding-bottom: 56.25%; /* 16:9 비율 */
height: 0;
overflow: hidden;
max-width: 100%;
background: black;
width: 100%;
box-sizing: border-box;
}
.url-preview .rb-video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-sizing: border-box;
}
@media all and (max-width:512px) {
.url-preview-video .url-preview {width: 100% !important;}
.url-preview-meta .url-preview {width: 100% !important;}
.url-preview .proxyImg {position: inherit; top:inherit; left: inherit; width: 100%;}
.url-preview .metaData {padding-left: 0px !important; margin-top: 15px;}
.url-preview .proxyImg img {width: 100%; height:150px;}
.url-preview .delete-preview {top:-1px; right:-1px; background-color: #fff;}
.url-preview a {margin-top: 10px;}
.url-preview .proxyImg img {height: auto !important; border:0px !important;}
}

View File

@ -0,0 +1,151 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
position: relative;
word-wrap: break-word;
font-family:'font-R',sans-serif !important;
}
.font-R {font-family:'font-R',sans-serif !important;}
.font-B {font-family:'font-B',sans-serif !important;}
.font-H {font-family:'font-H',sans-serif !important;}
ul, li {padding: 0px; margin: 0px; list-style: none;}
mark {background-color:rgba(170, 32, 255, 0.1) !important;}
#rb_editor_preview * {line-height: 140% !important;}
#rb_editor_preview img {max-width: 100%;}
#rb_editor_preview table {max-width: 100%;}
#rb_editor_preview {
padding: 20px;
box-sizing: border-box;
}
#rb_editor_preview .resizable img {
display: block;
width: 100% !important;
height: 100% !important;
box-sizing: border-box;
}
#rb_editor_preview .resizable {
position: relative;
display: inline-block;
user-select: none;
max-width: 100%;
}
/* 메타 정보 */
#rb_editor_preview .url-preview {
padding: 0px;
margin: 10px 0;
position: relative;
box-sizing: border-box;
border:1px solid rgba(0,0,0,0.0);
display: inline-block;
box-sizing: border-box;
}
#rb_editor_preview .url-preview-video .url-preview {width: 450px; height:auto;}
#rb_editor_preview .url-preview-meta .url-preview {width: 450px; background-color: #F0F3F9; padding: 20px; border-radius: 10px; min-height: 125px;}
#rb_editor_preview .url-preview-img .url-preview {width: 450px; height:auto;}
#rb_editor_preview .url-preview-img .url-preview a {border:0px;}
#rb_editor_preview .url-preview-img .url-preview .delete-preview img {object-fit: none; width: auto; height:auto;}
#rb_editor_preview .url-preview .proxyImg {
position: absolute;
top: 20px;
left: 20px;
}
#rb_editor_preview .url-preview .proxyImg img {
width: 150px;
height: 83px;
object-fit: cover;
border-radius: 10px;
border:0px !important;
}
#rb_editor_preview .url-preview .metaData {
padding-left: 170px;
text-align: left;
}
#rb_editor_preview .url-preview .delete-preview {
display: none;
}
#rb_editor_preview .url-preview .delete-preview:hover {
opacity: 0.7;
}
#rb_editor_preview .url-preview h3 {
margin: 0px 0;
font-size: 16px;
display: block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#rb_editor_preview .url-preview p {
margin: 2px 0;
font-size: 12px;
color: #999;
display: block;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
#rb_editor_preview .url-preview a {
color: #000;
font-size: 11px;
display: block;
margin-top: 0px;
text-decoration: none;
}
#rb_editor_preview .url-preview .rb-video-container {
position: relative;
padding-bottom: 56.25%; /* 16:9 비율 */
height: 0;
overflow: hidden;
max-width: 100%;
background: black;
}
#rb_editor_preview .url-preview .rb-video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#rb_editor_preview .rb-editor-hr {border-color:rgba(0,0,0,0.1);}
.resizable-table-handle {display: none;}
.rb_editor_table_wrap {position: relative;}
td .resizable_wrap, th .resizable_wrap {max-width: 100%;}
#rb_editor_preview .rb_tag {margin-top: -2px; display: inline-block; margin-bottom: 5px; vertical-align:top; max-width: 100%; width: auto; white-space: nowrap;overflow: hidden;text-overflow: ellipsis; max-width: 90%;}
#rb_editor_preview .rb_tag a {border-bottom: 0px !important; text-decoration: none !important; border-bottom: 0px !important; padding: 5px 10px 5px 10px; border-radius: 40px; font-size: 12px; background-color: #F0F3F9; display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
#rb_editor_preview .rb_tag a:hover {background-color: #e6e9ef;}
@media all and (max-width:512px) {
#rb_editor_preview .url-preview-video .url-preview {width: 100% !important;}
#rb_editor_preview .url-preview-meta .url-preview {width: 100% !important;}
#rb_editor_preview .url-preview .proxyImg {position: inherit; top:inherit; left: inherit; width: 100%;}
#rb_editor_preview .url-preview .metaData {padding-left: 0px !important; margin-top: 15px;}
#rb_editor_preview .url-preview .proxyImg img {width: 100%; height:150px;}
#rb_editor_preview .url-preview .delete-preview {top:auto; bottom:10px; right:15px;}
#rb_editor_preview .url-preview a {margin-top: 10px;}
#rb_editor_preview .url-preview .proxyImg img {height: auto !important;}
#rb_editor_preview .resizable-table {overflow-x: auto; width: 100% !important; display: block; max-width: 100%;}
#rb_editor_preview .resizable-table .rb_editor_table_wrap {min-width: 768px; width: auto;}
}

View File

@ -0,0 +1,118 @@
/* 커스텀 */
.rb_range_item {
width: 100px;
height: 3px;
border: 0;
border-radius: 3px;
background: rgba(0, 0, 0, 0.1);
outline: none;
border:0px !important;
margin-left: 0px; margin-right: 0px;
margin-top: -3px;
}
.rb_range_item .ui-slider-handle {
position: absolute;
margin: -7px 0 0 -15px; border-radius: 100px;
color: #fff;
border: 0;
height: 18px;
line-height: 18px;
text-align: center;
width: 30px;
outline: none;
cursor: pointer;
font-size: 9px;
text-decoration: none;
transition: transform 0.1s ease;
color:#fff !important;
background-color: #09244B;
}
.rb_range_item .ui-slider-range {
border:0px !important; border-radius: 4px !important;
}
.rb_range_item .ui-slider-handle:hover,
.rb_range_item .ui-slider-handle:focus {
transform: scale(1.1);
}
.rb_range_item .cntr {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* 기본 */
#image-toolbar [type="range"] {
appearance: none;
cursor: pointer;
outline: none;
width: 70px;
height: 2px; /* thumb의 height와 일치 */
margin: 0; /* reset margin */
padding: 0; /* reset padding */
background-color: transparent;
}
/* thumb */
#image-toolbar [type="range"]::-webkit-slider-thumb { /* Webkit 기반 브라우저 */
appearance: none;
width: 1rem; /* height와 일치 */
height: 1rem;
border: none;
border-radius: 50%;
background-color: #09244B;
transition: all 0.15s ease-in-out;
margin-top: calc((0.1rem - 1rem) * 0.5); /* calc((track의 height - thumb의 height) * 0.5) */
}
#image-toolbar [type="range"]::-moz-range-thumb { /* 파이어폭스 */
appearance: none;
width: 1rem; /* height와 일치 */
height: 1rem;
border: none;
border-radius: 50%;
background-color: #09244B;
transition: all 0.15s ease-in-out;
}
#image-toolbar [type="range"]:focus::-webkit-slider-thumb { /* Webkit 기반 브라우저 */
box-shadow: 0 0 0 1px #fff, 0 0 0 .25rem rgba(0, 0, 0, .1);
}
#image-toolbar [type="range"]:focus::-moz-range-thumb { /* 파이어폭스 */
box-shadow: 0 0 0 1px #fff, 0 0 0 .25rem rgba(0, 0, 0, .1);
}
#image-toolbar [type="range"]::-webkit-slider-thumb:active { /* Webkit 기반 브라우저 */
opacity: 0.7
}
#image-toolbar [type="range"]::-moz-range-thumb:active { /* 파이어폭스 */
opacity: 0.7
}
/* track */
#image-toolbar [type="range"]::-webkit-slider-runnable-track { /* Webkit 기반 브라우저 */
cursor: pointer;
width: 100%;
height: 2px;
background-color: #d3d9de;
border-radius: 0.25rem;
}
#image-toolbar [type="range"]::-moz-range-track { /* 파이어폭스 */
cursor: pointer;
width: 100%;
height: 2px;
background-color: #d3d9de;
border-radius: 0.25rem;
}
/* disabled 속성 적용 시 */
#image-toolbar [type="range"]:disabled::-webkit-slider-thumb { /* Webkit 기반 브라우저 */
pointer-events: none;
opacity: .5
}
#image-toolbar [type="range"]:disabled::-moz-range-thumb { /* 파이어폭스 */
opacity: .5
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,245 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function editor_html($id, $content, $is_dhtml_editor = true)
{
global $g5, $config;
static $js = true;
$editor_url = G5_EDITOR_URL.'/'.$config['cf_editor'];
// ✅ Nonce 생성 및 세션에 저장
if (!isset($_SESSION['token_' . FT_NONCE_SESSION_KEY])) {
$_SESSION['token_' . FT_NONCE_SESSION_KEY] = ft_nonce_create('rbeditor');
}
$nonce = $_SESSION['token_' . FT_NONCE_SESSION_KEY];
$html = "<span class=\"sound_only\">웹에디터 시작</span>";
if ($is_dhtml_editor) {
if ($js) {
$js = false;
}
$html .= "<script>
var g5_editor_url = '{$editor_url}';
var ed_nonce = '{$nonce}';
window.addEventListener('message', function(event) {
if (event.data.type === 'request-nonce') {
event.source.postMessage({ type: 'rbeditor-nonce', nonce: ed_nonce }, '*');
}
if (event.data.type === 'rbeditor-ready') {
const editorId = event.data.editorId;
const iframe = document.getElementById('rb-editor-frame-' + editorId);
const hiddenInput = document.getElementById('rb-' + editorId + '-hidden');
if (iframe && hiddenInput) {
setTimeout(() => {
iframe.contentWindow.postMessage({
type: 'rbeditor-set-content',
content: hiddenInput.value,
editorId: editorId
}, '*');
}, 100);
}
}
});
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('.rb-editor-frames').forEach((iframe) => {
iframe.addEventListener('load', function() {
var messageData = {
type: 'rbeditor-config',
g5_editor_url: g5_editor_url || '',
g5_bo_table: typeof g5_bo_table !== 'undefined' ? g5_bo_table : '',
g5_is_member: typeof g5_is_member !== 'undefined' ? g5_is_member : '',
g5_is_mobile: typeof g5_is_mobile !== 'undefined' ? g5_is_mobile : '',
g5_url: typeof g5_url !== 'undefined' ? g5_url : '',
g5_bbs_url: typeof g5_bbs_url !== 'undefined' ? g5_bbs_url : '',
g5_editor: typeof g5_editor !== 'undefined' ? g5_editor : '',
g5_is_admin: typeof g5_is_admin !== 'undefined' ? g5_is_admin : ''
};
if (typeof g5_admin_url !== 'undefined') {
messageData.g5_admin_url = g5_admin_url;
}
iframe.contentWindow.postMessage(messageData, '*');
});
});
});
</script>";
$html .= "
<iframe id='rb-editor-frame-{$id}' src='{$editor_url}/rb.editor.html?editorId={$id}' data-editor-id='{$id}' class='rb-editor-frames' width='100%' height='670px' frameborder='0'></iframe>
<input type='hidden' name='{$id}' id='rb-{$id}-hidden' value='".htmlspecialchars($content, ENT_QUOTES, 'UTF-8')."'>";
$html .= "<script>
window.addEventListener('message', function(event) {
if (event.data.type === 'rbeditor-content') {
const editorId = event.data.editorId;
const hiddenInput = document.getElementById('rb-' + editorId + '-hidden');
if (hiddenInput) {
let content = event.data.content;
const iframe = document.getElementById('rb-editor-frame-' + editorId);
if (!iframe) {
hiddenInput.value = ensureEditorDataWrapper(content);
return;
}
try {
const editorElem = iframe.contentWindow.document.querySelector('#editor');
let editorStyle = editorElem ? editorElem.style.cssText.trim() : '';
content = ensureEditorDataWrapper(content, editorStyle);
hiddenInput.value = content;
} catch (e) {
hiddenInput.value = ensureEditorDataWrapper(content);
}
}
}
});
function ensureEditorDataWrapper(content, editorStyle = '') {
let parser = new DOMParser();
let doc = parser.parseFromString(content, 'text/html');
// 내용이 텍스트도 없이 완전히 비어있거나 빈 div만 존재하면 빈 값 리턴
if (!doc.body.textContent.trim() && !doc.body.querySelector('img, video, iframe')) {
return '';
}
let existingEditorData = doc.querySelector('.rb_editor_data');
if (!existingEditorData) {
let wrapper = doc.createElement('div');
wrapper.className = 'rb_editor_data';
if (editorStyle) wrapper.style.cssText = editorStyle;
wrapper.innerHTML = doc.body.innerHTML.trim();
doc.body.innerHTML = '';
doc.body.appendChild(wrapper);
} else {
let allElements = [...doc.body.children];
allElements.forEach(el => {
if (!el.classList.contains('rb_editor_data')) {
existingEditorData.appendChild(el);
}
});
if (editorStyle) {
existingEditorData.style.cssText = editorStyle;
}
}
return doc.body.innerHTML;
}
</script>";
} else {
$html .= "<textarea id='$id' name='$id' style='width:100%;height:300px;'>$content</textarea>\n";
}
$html .= "<span class=\"sound_only\">웹 에디터 끝</span>";
return $html;
}
// 에디터 내용 저장 (TEXTAREA → DIV 대응)
function get_editor_js($id, $is_dhtml_editor = true)
{
if ($is_dhtml_editor) {
return "
const iframe_{$id} = document.getElementById('rb-editor-frame-{$id}').querySelector('iframe');
if (iframe_{$id} && iframe_{$id}.contentWindow) {
iframe_{$id}.contentWindow.postMessage({
type: 'rbeditor-get-content',
editorId: '{$id}'
}, '*');
}
";
} else {
return "var {$id}_editor = document.getElementById('{$id}');\n";
}
}
// 에디터 값이 비어 있는지 검사 (TEXTAREA → DIV 대응)
function chk_editor_js($id, $is_dhtml_editor = true)
{
if ($is_dhtml_editor) {
return "
var content = document.getElementById('rb-{$id}-hidden').value;
if (!content || content.trim() === '') {
alert('내용을 입력해 주십시오.');
return false;
}
";
} else {
return "if (!{$id}_editor.value) { alert(\"내용을 입력해 주십시오.\"); {$id}_editor.focus(); return false; }\n";
}
}
// Nonce 관련 상수 및 함수 정의
if (!defined('FT_NONCE_UNIQUE_KEY'))
define('FT_NONCE_UNIQUE_KEY', sha1($_SERVER['SERVER_SOFTWARE'] . G5_MYSQL_USER . session_id() . G5_TABLE_PREFIX));
if (!defined('FT_NONCE_SESSION_KEY'))
define('FT_NONCE_SESSION_KEY', substr(md5(FT_NONCE_UNIQUE_KEY), 5));
if (!defined('FT_NONCE_DURATION'))
define('FT_NONCE_DURATION', 60 * 60);
if (!defined('FT_NONCE_KEY'))
define('FT_NONCE_KEY', '_nonce');
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
function ft_nonce_create($action = '', $user = '', $timeoutSeconds = FT_NONCE_DURATION)
{
$secret = ft_get_secret_key($action . $user);
set_session('token_' . FT_NONCE_SESSION_KEY, $secret);
$salt = ft_nonce_generate_hash();
$time = time();
$maxTime = $time + $timeoutSeconds;
$nonce = $salt . '|' . $maxTime . '|' . sha1($salt . $secret . $maxTime);
return $nonce;
}
function ft_nonce_is_valid($nonce, $action = '', $user = '')
{
$secret = ft_get_secret_key($action.$user);
$token = get_session('token_'.FT_NONCE_SESSION_KEY);
if ($secret != $token) return false;
if (!is_string($nonce)) return false;
$a = explode('|', $nonce);
if (count($a) != 3) return false;
$salt = $a[0];
$maxTime = intval($a[1]);
$hash = $a[2];
$back = sha1($salt . $secret . $maxTime);
if ($back != $hash || time() > $maxTime) return false;
return true;
}
function ft_get_secret_key($secret)
{
return md5(FT_NONCE_UNIQUE_KEY . $secret);
}
function ft_nonce_generate_hash()
{
$length = 10;
$chars = '1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM';
$ll = strlen($chars) - 1;
$o = '';
while (strlen($o) < $length) {
$o .= $chars[rand(0, $ll)];
}
return $o;
}

View File

@ -0,0 +1,4 @@
body, html, * {font-family:'Malgun Gothic', dotum, sans-serif !important;}
.font-H {font-weight: black !important;}
.font-B {font-weight: bold !important;}
.font-R {font-weight: normal !important;}

View File

@ -0,0 +1,31 @@
@font-face {
font-family: 'font-R';
src: url('./Nanumsqneo-Bold.eot');
src: url('./Nanumsqneo-Bold.eot?#iefix') format('embedded-opentype'),
url('./Nanumsqneo-Bold.woff2') format('woff2'),
url('./Nanumsqneo-Bold.woff') format('woff'),
url('./Nanumsqneo-Bold.ttf') format('truetype');
font-weight: normal;
}
@font-face {
font-family: 'font-B';
src: url('./Nanumsqneo-ExtraBold.eot');
src: url('./Nanumsqneo-ExtraBold.eot?#iefix') format('embedded-opentype'),
url('./Nanumsqneo-ExtraBold.woff2') format('woff2'),
url('./Nanumsqneo-ExtraBold.woff') format('woff'),
url('./Nanumsqneo-ExtraBold.ttf') format('truetype');
font-weight: bold;
}
@font-face {
font-family: 'font-H';
src: url('./Nanumsqneo-Heavy.eot');
src: url('./Nanumsqneo-Heavy.eot?#iefix') format('embedded-opentype'),
url('./Nanumsqneo-Heavy.woff2') format('woff2'),
url('./Nanumsqneo-Heavy.woff') format('woff'),
url('./Nanumsqneo-Heavy.ttf') format('truetype');
font-weight: black;
}

View File

@ -0,0 +1,30 @@
/*
Copyright (c) 2021 Kil Hyung-jin, with Reserved Font Name Pretendard.
https://github.com/orioncactus/pretendard
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
*/
@font-face {
font-family: 'font-H';
font-weight: black;
font-display: swap;
src: local('Pretendard Black'), url(./woff2/Pretendard-Black.woff2) format('woff2'), url(./woff/Pretendard-Black.woff) format('woff');
}
@font-face {
font-family: 'font-B';
font-weight: bold;
font-display: swap;
src: local('Pretendard Bold'), url(./woff2/Pretendard-Bold.woff2) format('woff2'), url(./woff/Pretendard-Bold.woff) format('woff');
}
@font-face {
font-family: 'font-R';
font-weight: normal;
font-display: swap;
src: local('Pretendard Regular'), url(./woff2/Pretendard-Regular.woff2) format('woff2'), url(./woff/Pretendard-Regular.woff) format('woff');
}

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 4.7 MiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 4.8 MiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 4.9 MiB

View File

@ -0,0 +1,34 @@
@font-face {
font-family: 'font-R';
font-weight: normal;
src: url('./TheJamsil-Light.eot');
src: url('./TheJamsil-Light.eot?#iefix') format('embedded-opentype'),
url('./TheJamsil-Light.woff2') format('woff2'),
url('./TheJamsil-Light.woff') format('woff'),
url('./TheJamsil-Light.ttf') format("truetype");
font-display: swap;
}
@font-face {
font-family: 'font-B';
font-weight: bold;
src: url('./TheJamsil-Medium.eot');
src: url('./TheJamsil-Medium.eot?#iefix') format('embedded-opentype'),
url('./TheJamsil-Medium.woff2') format('woff2'),
url('./TheJamsil-Medium.woff') format('woff'),
url('./TheJamsil-Medium.ttf') format("truetype");
font-display: swap;
}
@font-face {
font-family: 'font-H';
font-weight: black;
src: url('./TheJamsil-ExtraBold.eot');
src: url('./TheJamsil-ExtraBold.eot?#iefix') format('embedded-opentype'),
url('./TheJamsil-ExtraBold.woff2') format('woff2'),
url('./TheJamsil-ExtraBold.woff') format('woff'),
url('./TheJamsil-ExtraBold.ttf') format("truetype");
font-display: swap;
}
h2 {font-weight: normal !important;}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,21 @@
<svg width="478" height="145" viewBox="0 0 478 145" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_146_176)">
<rect width="478" height="145" fill="white"/>
<path d="M31.082 107.543C42.727 107.543 50.206 101.673 50.206 92.396C50.206 85.201 45.567 80.183 37.331 78.29L32.313 77.059L31.581 76.89C27.435 75.899 25.402 74.797 25.402 71.663C25.402 68.918 27.579 67.403 31.272 67.403C43.009 67.403 47.264 71.663 47.264 71.663V62.433L47.112 62.285C46.263 61.497 41.753 57.841 31.177 57.841C20.006 57.841 13 63.521 13 72.42C13 79.487 17.566 84.361 25.801 86.417L30.987 87.662C35.342 88.703 37.519 89.839 37.519 93.153C37.519 96.182 35.152 97.887 30.987 97.887C18.987 97.887 13 91.476 13 91.476V102.544L13.154 102.707C14.02 103.566 18.694 107.543 31.082 107.543ZM88.391 106.978V96.686L86.469 96.721C85.353 96.731 83.762 96.73 81.73 96.694L81.318 96.686C76.177 96.596 74.39 94.171 74.39 88.489V69.154H87.275V58.783H74.391V48.447H62.306V58.784H55.482V69.155H62.306V89.301C62.306 101.206 68.078 106.978 79.892 106.978H88.391ZM316.835 106.978V96.686L314.913 96.721C313.797 96.731 312.206 96.73 310.174 96.694L309.762 96.686C304.621 96.596 302.834 94.171 302.834 88.489V69.154H315.719V58.783H302.834V48.447H290.749V58.784H283.925V69.155H290.749V89.301C290.749 101.206 296.521 106.978 308.335 106.978H316.835ZM131.266 58.87V65.89C128.084 60.742 122.178 57.841 115.439 57.841C102.055 57.841 92.789 67.949 92.789 82.457C92.789 96.965 101.961 106.979 115.158 106.979C121.99 106.979 127.99 104.078 131.266 98.93V105.95H142.582V58.872H131.266V58.87ZM117.441 96.98C109.833 96.98 104.762 91.102 104.762 82.892C104.762 74.784 109.931 68.804 117.441 68.804C125.049 68.804 130.608 74.784 130.608 82.892C130.608 91.102 124.951 96.98 117.441 96.98ZM181.853 57.84C174.275 57.84 169.746 62.425 166.59 67.205V37.27H154.505V105.985H166.229V99.131C169.295 104.091 175.27 106.701 181.853 106.701C194.479 106.701 203.678 96.78 203.678 82.892C203.678 69.093 195.651 57.84 181.853 57.84ZM179.238 96.162C171.504 96.162 166.119 90.288 166.119 82.358C166.119 74.526 171.993 68.945 179.532 68.945C187.168 68.945 192.064 74.428 192.064 82.358C192.063 90.288 186.678 96.162 179.238 96.162ZM220.228 50.543C223.986 50.543 226.785 47.824 226.785 44.146C226.785 40.388 224.066 37.749 220.228 37.749C216.47 37.749 213.751 40.388 213.751 44.146C213.752 47.905 216.47 50.543 220.228 50.543ZM214.226 106.724H226.311V59.255H214.226V106.724ZM269.651 50.543C273.409 50.543 276.208 47.824 276.208 44.146C276.208 40.388 273.489 37.749 269.651 37.749C265.893 37.749 263.174 40.388 263.174 44.146C263.175 47.905 265.893 50.543 269.651 50.543ZM263.649 106.724H275.734V59.255H263.649V106.724ZM238.797 106.155H251.252V37H238.797V106.155ZM329.442 124.654H342.814L368.501 58.985H355.977L344.751 91L333.488 58.985H319.599L338.221 104.827L329.442 124.654Z" fill="url(#paint0_linear_146_176)"/>
<path d="M428.639 58.87V65.89C425.457 60.742 419.551 57.841 412.812 57.841C399.428 57.841 390.162 67.949 390.162 82.457C390.162 96.965 399.334 106.979 412.531 106.979C419.363 106.979 425.363 104.078 428.638 98.93V105.95H439.954V58.872H428.639V58.87ZM414.815 96.98C407.208 96.98 402.136 91.102 402.136 82.892C402.136 74.784 407.305 68.804 414.815 68.804C422.423 68.804 427.982 74.784 427.982 82.892C427.981 91.102 422.325 96.98 414.815 96.98ZM458.443 50.543C462.201 50.543 465 47.824 465 44.146C465 40.388 462.281 37.749 458.443 37.749C454.685 37.749 451.966 40.388 451.966 44.146C451.967 47.905 454.685 50.543 458.443 50.543ZM452.441 106.724H464.526V59.255H452.441V106.724Z" fill="url(#paint1_linear_146_176)"/>
<path d="M375.638 107.335C379.779 107.335 382.864 104.339 382.864 100.286C382.864 96.1451 379.868 93.2371 375.638 93.2371C371.497 93.2371 368.501 96.1451 368.501 100.286C368.5 104.427 371.496 107.335 375.638 107.335Z" fill="#E80000"/>
</g>
<defs>
<linearGradient id="paint0_linear_146_176" x1="190.728" y1="37.0237" x2="190.728" y2="124.676" gradientUnits="userSpaceOnUse">
<stop stop-color="#9D39FF"/>
<stop offset="1" stop-color="#A380FF"/>
</linearGradient>
<linearGradient id="paint1_linear_146_176" x1="427.586" y1="37.7746" x2="427.586" y2="107.002" gradientUnits="userSpaceOnUse">
<stop stop-color="#9D39FF"/>
<stop offset="1" stop-color="#A380FF"/>
</linearGradient>
<clipPath id="clip0_146_176">
<rect width="478" height="145" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140.43 140.43"><defs><style>.cls-1{fill:#ff919b;}.cls-2{fill:#fff;}</style></defs><g id="레이어_2" data-name="레이어 2"><g id="Graphic_Elements" data-name="Graphic Elements"><path class="cls-1" d="M140.41,74.34c.22,6.25-1.11,12.25-2.91,18.2-2.06,6.79-4,13.62-6.7,20.21-2.08,5.16-4.71,10.11-8.91,13.86-2.39,2.14-4.87,4.46-8.12,5.35-2.68.73-5.21,1.91-8,2.45-3.53.7-6.79,2.28-10.25,3.25A61,61,0,0,1,78,140.24c-1.22,0-2.44.13-3.66.18a30.64,30.64,0,0,1-6.47-.55,37.3,37.3,0,0,0-8.58,0,49.15,49.15,0,0,1-8.23-.14c-2-.21-4.08-.5-6.12-.76a26.66,26.66,0,0,1-9.16-3.46,82.88,82.88,0,0,1-11.2-7.55,40.85,40.85,0,0,1-10.64-12.16c-1.95-3.41-4.1-6.7-6.18-10A49.52,49.52,0,0,1,2.09,91.29,49.4,49.4,0,0,1,.61,80.45C.48,74.28.15,68.1,0,61.93a62.36,62.36,0,0,1,.9-8.5C1.42,49,3.31,45,5,41c1-2.48,1.71-5.06,2.77-7.52A27.41,27.41,0,0,1,18.49,21c3.73-2.39,7.27-5,10.79-7.73,2-1.56,4.39-2.76,6.58-4.15A72.47,72.47,0,0,1,45.8,4.19,34.91,34.91,0,0,1,55,2.08c4.38-.63,8.8-.89,13.17-1.56A34.68,34.68,0,0,1,71.73.28C74.66.11,77.6.05,80.54,0s6,.86,8.89,1.51a90.45,90.45,0,0,1,23.71,9,16,16,0,0,1,3.13,2.29c3.13,2.86,6.27,5.72,9.33,8.65a40.11,40.11,0,0,1,6.06,8.16,40.75,40.75,0,0,1,5.82,14c.64,3.52,1.29,7,1.83,10.57a126.74,126.74,0,0,1,.9,14C140.29,70.22,140.34,72.28,140.41,74.34Z"/><path class="cls-2" d="M100.7,60.31A12.86,12.86,0,0,0,94,49a4.17,4.17,0,0,0-2.21-.62c-2.06,0-4.12-.09-6.17,0a14.06,14.06,0,0,0-10.1,4.55c-.88,1-1.72,2-2.74,3.17-.34-1.59-.69-2.94-.92-4.3-.73-4.4-3.6-6.86-7.51-8.38a15.58,15.58,0,0,0-4.52-1c-3.12-.21-6.34-.6-9.25.88a23.75,23.75,0,0,0-7.47,6A9.8,9.8,0,0,0,41,53.44,40.21,40.21,0,0,0,40.1,63.7a14.22,14.22,0,0,0,1.84,6.65c2.27,4.1,5.06,7.9,7.25,12.05a30.64,30.64,0,0,0,6.75,8.68c1.54,1.36,3,2.86,4.62,4.07,1.87,1.38,3.3,3.61,6.08,3.42,1-.07,2.16.14,3-.41a36.82,36.82,0,0,0,3.09-2.51c4-3.1,8.27-5.73,12.37-8.67a54.82,54.82,0,0,0,9.21-8.46,31.61,31.61,0,0,0,4-5.7C100.48,68.9,100.82,64.68,100.7,60.31Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140.43 140.43"><defs><style>.cls-1{fill:#ffd561;}.cls-2{fill:#fff;}.cls-3{fill:#292929;}</style></defs><g id="레이어_2" data-name="레이어 2"><g id="Graphic_Elements" data-name="Graphic Elements"><path class="cls-1" d="M140.42,64a49.73,49.73,0,0,0-1.37-10c-1.12-4.81-2.45-9.57-3.85-14.31h0c-.73-2.39-1.44-4.78-2.2-7.17A39.61,39.61,0,0,0,128.24,22c-1.91-4.64-5.67-7.69-9.51-10.51-2.74-2-6.19-2.79-9.42-3.87-1.73-.58-3.53-.94-5.21-1.64A82.77,82.77,0,0,0,94,2.51h0A48.41,48.41,0,0,0,80.34.43c-2.89-.09-5.79-.74-8.66-.2a23.9,23.9,0,0,1-6.59.25c-.75-.07-1.52,0-2.28,0A24.23,24.23,0,0,0,57.71,0c-3-.16-6.06.37-9.09.55A27.66,27.66,0,0,0,37.09,4.29a81.4,81.4,0,0,0-14,9.46A32.3,32.3,0,0,0,16,22.17h0A131.8,131.8,0,0,0,6.21,37.7a24.25,24.25,0,0,0-1.09,2.63A61.32,61.32,0,0,0,1.5,53.58,59,59,0,0,0,1,61.32H1a12.23,12.23,0,0,0-.24,2.27c-.15,3-.28,5.94-.53,8.9A51.13,51.13,0,0,0,.41,83.27,44,44,0,0,0,3.19,94.53c1.05,2.61,1.92,5.3,2.75,8a27.65,27.65,0,0,0,10,14.25c1.18.9,2.47,1.66,3.67,2.54,5,3.66,9.62,7.84,15,11,4.68,2.71,9.33,5.47,14.72,6.61,3.66.77,7.37,1.12,11.05,1.75,5.45.94,11,1.32,16.46,1.74,3.71.28,7.26-.65,10.86-1.26a87.54,87.54,0,0,0,17.12-5.25c3.7-1.44,7.35-3,10.32-5.77,1.65-1.53,3.3-3.07,5.09-4.43,6.42-4.9,10.66-11.44,14.15-18.56a42.26,42.26,0,0,0,2.87-9.72q1.05-4.85,1.79-9.75a75.08,75.08,0,0,0,.66-7.62C140,73.35,140.54,68.7,140.42,64Z"/><path class="cls-2" d="M38.28,39a3.63,3.63,0,0,1-.91.13c-3-.28-5.4,1.13-7.76,2.77C25.2,44.94,20.36,47.36,16,50.5c-4,2.89-8,5.89-12,8.81C3,60,2,60.65,1,61.32a59,59,0,0,1,.54-7.74A61.32,61.32,0,0,1,5.12,40.33,24.25,24.25,0,0,1,6.21,37.7,131.8,131.8,0,0,1,16,22.17a16.58,16.58,0,0,1,4.38-.48c2-.11,4-.05,6.06,0A4.44,4.44,0,0,0,29,20.9Q41,13.3,53.15,5.81c2.78-1.74,5.68-3.28,8.5-4.95A3.42,3.42,0,0,1,62.81.45c.76,0,1.53,0,2.28,0A23.9,23.9,0,0,0,71.68.23c2.87-.54,5.77.11,8.66.2A48.41,48.41,0,0,1,94,2.51c0,.62-.56.77-1,1C84.24,9.05,74.77,13.3,66,18.78c-.58.36-1.15.72-1.91,1.23,1.83,0,3.42,0,5,0,3.29,0,6.53.57,9.81.61s6.31.4,9.47.52c2.29.1,4.58.06,6.87,0,9-.16,17.92.32,26.88.26,1.67,0,3.34.25,5,.21a1.9,1.9,0,0,1,1.09.31A39.61,39.61,0,0,1,133,32.47c.76,2.39,1.47,4.78,2.2,7.17,0,.5-.27.58-.75.56q-9.93-.33-19.85-.61c-5.43-.15-10.87-.26-16.31-.39-.51.06-.63-.37-.8-.68a10,10,0,0,1-1.67-3.6c0-.28-.13-.57-.42-.63a7.34,7.34,0,0,0-3.06,0c-.52.12-.42.66-.32,1.07A11.12,11.12,0,0,0,93.28,38c.21.36.66.69.34,1.21-.53,0-1.06-.07-1.59-.06-7.52.18-15-.25-22.51-.75-8.16-.53-16.3-.15-24.45.06-.53,0-1.06.1-1.59.16-.23-.5.16-.78.42-1.08.69-.8,1.24-1.7,2-2.47a4,4,0,0,0-5,1.3,24.78,24.78,0,0,1-1.57,2C39,38.66,38.77,39,38.28,39Z"/><path class="cls-3" d="M69.15,62.69a17.77,17.77,0,0,1,4.86.58c4.72,1.43,7.1,4.94,8.47,9.39a44.76,44.76,0,0,1,1.2,7.08c.07.5-.17.63-.53.67a13,13,0,0,1-3.3,0c-.93-.15-.83-1-.86-1.64a21.19,21.19,0,0,0-2.16-8.93c-1.27-2.48-2.94-4.6-5.77-5.53a8.2,8.2,0,0,0-6.62.48,17.86,17.86,0,0,0-6,4.52c-1.38,1.8-3,1.1-4.61,1.12-.68,0-.78-.58-.29-1,3.47-3.17,6.9-6.42,12-6.47C66.79,62.91,68,62.77,69.15,62.69Z"/><path class="cls-2" d="M42.8,51c0-3.28-.46-3.39,2.4-3.4a29.54,29.54,0,0,0,4.5-.16,24.13,24.13,0,0,1,7,.45,1.63,1.63,0,0,1,1.49,1.83,6.28,6.28,0,0,1-.6,3,12.54,12.54,0,0,0-.75,2.86c-.08.29-.15.59-.24.88-.85,2.7-2,3.43-4.78,3.2-1.67-.14-3.34-.31-5-.33a1.92,1.92,0,0,1-2-1.25C43.81,55.48,42.83,52.85,42.8,51Z"/><path class="cls-2" d="M87.52,58.63a43.26,43.26,0,0,1-5.15-.43,4.58,4.58,0,0,1-3.6-4,11.73,11.73,0,0,1,.76-5.71c.12-.27.13-.64.45-.76,2-.76,4-1.7,6.34-1.2,1.81.39,3.66.63,5.45,1.13.37.11.88.22.87.62,0,1.58.93,2.92.85,4.55a6.41,6.41,0,0,1-3,5.41C89.62,58.79,88.56,58.55,87.52,58.63Z"/><path class="cls-3" d="M50.68,48.32c3.79,0,4,.11,3.74,3.83a31.63,31.63,0,0,1-.7,4.62,1.29,1.29,0,0,1-1.25,1.1,7.2,7.2,0,0,1-1.14.07c-1.24,0-2.9.5-3.59-.47a7.91,7.91,0,0,1-1.22-4.17c0-.72,0-1.45,0-2.17,0-1.94.74-2.71,2.69-2.81C49.69,48.3,50.19,48.32,50.68,48.32Z"/><path class="cls-3" d="M82.27,52.35V50.41c0-1.79,0-1.81,1.72-2.21a12.77,12.77,0,0,1,4-.11,13.24,13.24,0,0,1,2.21,2.4,34.89,34.89,0,0,1-.09,4.9,1.77,1.77,0,0,1-1.31,1.54,10.83,10.83,0,0,1-5,.44c-.85-.09-1.3-.46-1.31-1.37,0-1.21-.11-2.43-.17-3.64Z"/><path class="cls-3" d="M93.62,39.26a26.28,26.28,0,0,1-1.86-3.62c-.41-1.41-.22-1.7,1.22-1.74.38,0,.76,0,1.14,0,1.06,0,2.11-.25,2.17,1.56,0,1.39,1.19,2.57,2,3.76,1.06,2.34,3,3.91,4.87,5.5.71.61,1.51,1.11,2.25,1.78-1.86.16-3.7.8-5.49-.54A22.34,22.34,0,0,1,93.62,39.26Z"/><path class="cls-3" d="M46.33,34.94c-.42-.79-1.52-.33-2.32-.44a3.24,3.24,0,0,0-3.38,1.74A10.47,10.47,0,0,1,38.28,39a18.9,18.9,0,0,1-4,4.2c-.46.32-1.27.59-1.15,1.13s1,.32,1.51.4a3.94,3.94,0,0,0,2.87-.28,16.74,16.74,0,0,0,4-3.7,11.19,11.19,0,0,1,1.95-2.06,19.28,19.28,0,0,0,1.68-2.27C45.49,35.8,46.62,35.47,46.33,34.94Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140.43 140.43"><defs><style>.cls-1{fill:#ffd561;}.cls-2{fill:#fff;}.cls-3{fill:#292929;}.cls-4{fill:#d6674c;}</style></defs><g id="레이어_2" data-name="레이어 2"><g id="Graphic_Elements" data-name="Graphic Elements"><path class="cls-1" d="M139.7,62.52c.32,2.91-.35,5.46.32,7.88.93,3.34,0,6.6-.13,9.89-.14,3-.75,6-1.09,9.08s-1.49,5.75-2.33,8.6a20,20,0,0,1-4.07,7.33,79.6,79.6,0,0,0-5.35,6.24,55.76,55.76,0,0,1-3.44,4.89,67,67,0,0,1-8.67,8.17A108,108,0,0,1,101,133.91a41.64,41.64,0,0,1-19.33,6c-2.31.08-4.61.44-6.93.55a22.09,22.09,0,0,1-5.78-.58,29,29,0,0,0-7.25-.66,22.62,22.62,0,0,1-9.33-1.63c-1.82-.73-3.82-.61-5.75-.84-4.77-.58-9.37-1.6-13.47-4.27-2.53-1.64-4.69-3.75-7.07-5.58-1-.73-1.92-1.44-2.85-2.2-4.94-4.07-7.78-9.58-10.17-15.37a11.67,11.67,0,0,0-1.45-2.12,38.07,38.07,0,0,1-6.34-14A68.16,68.16,0,0,0,3.2,86.47a76.06,76.06,0,0,1-3-14.11A42.06,42.06,0,0,1,.74,61c.43-2.87.53-5.84,1.6-8.53,2.9-7.29,5.85-14.53,10.89-20.73,3.17-3.9,6.12-8,9.54-11.69a36.88,36.88,0,0,1,10.35-8c1.44-.72,2.81-1.58,4.19-2.41A21,21,0,0,1,42.6,7.15a22.13,22.13,0,0,0,5-2.24,21.28,21.28,0,0,1,9.16-2.76C60,1.94,63,1,66.12.35a15.32,15.32,0,0,1,6-.1,30.34,30.34,0,0,0,8.14.41,46,46,0,0,1,15.65,1.8,47,47,0,0,1,7.82,2.79A30.81,30.81,0,0,1,112,11.43a18.62,18.62,0,0,0,1.93,1.73c2.62,2,4.62,4.6,6.92,6.91,3.75,3.77,6.41,8.35,9.16,12.83A133.64,133.64,0,0,1,137.19,46a5.2,5.2,0,0,1,.37.95C138.92,52.16,140.4,57.41,139.7,62.52Z"/><path class="cls-2" d="M37.9,41.15a15.14,15.14,0,0,1,.68-4.85,3.48,3.48,0,0,1,3-2.65,17.76,17.76,0,0,1,7,.47c3.62.79,5.21,3.56,4.11,7.09a13.29,13.29,0,0,1-2.45,4.25,4.53,4.53,0,0,1-3.62,1.45A12.85,12.85,0,0,1,40,45.72c-1.47-.74-2.23-1.67-2.06-3.31C37.93,42.07,37.9,41.73,37.9,41.15Z"/><path class="cls-2" d="M97.88,36a3.18,3.18,0,0,0-1.69-2.93c-4.24-2-14-3.83-14.28,3.55a11.91,11.91,0,0,1-.23,1.77c-.45,2.46,0,3.44,2.17,4.73a11,11,0,0,0,5.61,1.26A7.21,7.21,0,0,0,95.51,42C97.15,40.18,98.07,38.47,97.88,36Z"/><path class="cls-3" d="M93.42,44.8c-1.22.35-1.89-.72-2.81-1.12a24.37,24.37,0,0,1-7.1-4.82c-1.07-1-1-1.56-.15-2.73a21.47,21.47,0,0,1,2.7-2.86A14.26,14.26,0,0,0,89,30a1.39,1.39,0,0,1,1.41-.73c.18,0,.37,0,.56,0a6.09,6.09,0,0,1,2.84.28,22.86,22.86,0,0,1-1.59,2.26c-1.31,1.45-2.88,2.62-4.13,4.13s-1.26,1.81.13,3A25.09,25.09,0,0,0,95,43.28c.48.19,1.3.28,1.18,1s-.87.41-1.37.46S93.87,44.77,93.42,44.8Z"/><path class="cls-3" d="M35.67,33.83c1.77-.44,3.37-.66,4.83.06A46,46,0,0,0,45,36.1a24,24,0,0,1,5.25,3.19c.82.56.57,1.36.08,2-1.68,2.1-3.41,4.15-5.13,6.22-.51.62-1.24.47-1.89.46-.84,0-2.1.38-2.4-.33s.69-1.54,1.32-2.13a50.93,50.93,0,0,0,3.68-4.37c.54-.64.44-1.09-.24-1.67-2.29-2-5.16-2.83-7.75-4.21A14.47,14.47,0,0,1,35.67,33.83Z"/><path class="cls-4" d="M74.72,81.48a15.06,15.06,0,0,1-5.82-.89A6,6,0,0,1,65,76.11a74.78,74.78,0,0,1-1.36-9.54c-.33-3.24.18-6.43.23-9.63,0-.57.2-.92.82-.95,4.06-.16,8.09-.78,12.15-1a64.33,64.33,0,0,0,8-1.26c2.07-.35,4.09-1,6.25-.68,1.38.18,1.67.32,2,1.62a4.05,4.05,0,0,1,.12,1.69c-.51,2.83-.3,5.75-.93,8.55a34.82,34.82,0,0,1-2.78,8.46,19.12,19.12,0,0,1-5.17,6.22,9,9,0,0,1-4.47,1.5A28.51,28.51,0,0,1,74.72,81.48Z"/><path class="cls-3" d="M93.12,50.66a29,29,0,0,0-6,.24c-2.45.26-4.91.42-7.36.75-4.58.61-9.15,1.32-13.72,2-2.22.3-4.47.43-6.68.78-4.89.79-9.63,2.36-14.54,3.06-.27,0-.6.12-.61.39s.35.45.64.46A15.11,15.11,0,0,0,49,58.18c2.84-.64,5.68-1.23,8.5-2,1-.26,1,.09.76.83A33.93,33.93,0,0,0,57.08,69.3c.2,4.2,1.32,8,5.21,10.35A19.66,19.66,0,0,1,64.06,81a4.49,4.49,0,0,0,2.48.9c2.1.16,4.2.1,6.56.13A38.61,38.61,0,0,0,81,81.45c5-1.19,9.39-3.12,11.36-8.41a22.35,22.35,0,0,0,1.14-4.8c.73-5.5.4-11.06.64-16.59C94.17,50.89,93.78,50.72,93.12,50.66Zm-3.44,1.81c-.3,5.75.13,11.52-.83,17.25-1,6.11-4.82,9.41-10.55,10.8-3,.73-6.11.42-9.17.44a1.26,1.26,0,0,1-.73-.25,35.16,35.16,0,0,1-4.71-4c-1.6-1.82-1.81-4.16-2.1-6.42a33.26,33.26,0,0,1,1.22-14,1.47,1.47,0,0,1,1.41-1.27c2.74-.28,5.48-.69,8.2-1.1.52-.07.56.11.57.51.07,3,.62,5.88.64,8.84,0,.94,0,1.88,0,2.81s.26,1.2,1.16,1.23c3.22.12,3.21.15,3.22-3a69,69,0,0,0-.6-8.62,6.4,6.4,0,0,1,0-1.45,1.13,1.13,0,0,1,1.13-1.13c3.44-.45,6.87-1,10.33-1.24C89.33,51.86,89.72,51.75,89.68,52.47Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140.43 140.43"><defs><style>.cls-1{fill:#ffd561;}.cls-2{fill:#292929;}.cls-3{fill:#fff;}</style></defs><g id="레이어_2" data-name="레이어 2"><g id="Graphic_Elements" data-name="Graphic Elements"><path class="cls-1" d="M.32,74.9c0-4.21-.15-8.42,0-12.62A103,103,0,0,1,1.75,49.17a45.32,45.32,0,0,1,2.92-8.49,90.55,90.55,0,0,1,12.2-21.53,21,21,0,0,1,3.8-3.43c2.37-1.91,4.74-3.82,7.07-5.78,3.4-2.85,7.4-4.6,11.42-6.37C45.14.93,51.42.13,57.88.06c3.06,0,6.11-.12,9.18,0,3.51.14,7,.73,10.45,1.05,2.17.19,4.31.51,6.47.73A43.5,43.5,0,0,1,96.92,5.4a213.47,213.47,0,0,1,24.37,12c4.35,2.61,8.53,5.69,11.25,10,2,3.18,3.88,6.49,4.42,10.54.61,4.51,1.14,9.07,2.12,13.56a53.51,53.51,0,0,1,1.3,13.88c-.18,3.93-.82,7.84-1.19,11.76a23.15,23.15,0,0,1-1.38,5.49,25.53,25.53,0,0,0-1,6.84,65.52,65.52,0,0,1-3.59,16.62,27.7,27.7,0,0,1-5.42,8.65c-4.41,5.25-9,10.27-14.9,14a31.89,31.89,0,0,1-3.84,2c-5.2,2.35-10.41,4.7-15.75,6.74-4.43,1.68-9.08,2.2-13.74,2.73-5.28.59-10.48-.25-15.7-.84-3.62-.4-7.25-.87-10.88-1.2a39.19,39.19,0,0,1-9-2c-2.34-.78-4.77-1.32-6.91-2.61-4-2.42-8.24-4.61-12.35-6.93-5.63-3.16-9.34-8-11.88-13.82a91.88,91.88,0,0,0-5.21-10,70.49,70.49,0,0,1-4-8.93A57.14,57.14,0,0,1,.47,83.29,36.72,36.72,0,0,1,.05,74.9Z"/><path class="cls-2" d="M70.85,70.09a26.8,26.8,0,0,1-8.76-1,14.17,14.17,0,0,1-6.42-3.69,25.87,25.87,0,0,1-6.13-8.53,51.49,51.49,0,0,1-1.95-6.64c-.06-.22-.1-.45-.15-.67-.5-2.09-.5-2.09,1.7-2.11s2.31,0,2.81,2.23c.77,3.45,1.55,6.94,3.55,9.9,4.55,6.76,8.39,9.62,16.83,9.48,4.51-.08,7-2.7,9.32-5.91,2-2.81,3.08-6.07,4.21-9.29q.47-1.33,1-2.67c0-.11.14-.23.11-.32-.55-1.79.83-1.4,1.69-1.41,2.68,0,3.53-.29,2.29,2.85-1.5,3.8-2.46,7.84-4.93,11.2-2.13,2.89-4.41,5.69-8.31,6.19A37.3,37.3,0,0,1,70.85,70.09Z"/><path class="cls-3" d="M94.78,37.88c-.06-1,0-1.9,0-2.85h0c0-1.25,0-2.5,0-3.75,0-.41,0-.87-.47-.94-1.26-.19-2.25-1.12-3.5-1.26a22.84,22.84,0,0,0-10.09.82,1.71,1.71,0,0,0-1.34,2c.34,2.39.44,4.82,1.57,7.05A5.21,5.21,0,0,0,85.11,42a18,18,0,0,0,6.33-.25C93.43,41.24,94.93,40.38,94.78,37.88Z"/><path class="cls-3" d="M58.49,31.35a7.59,7.59,0,0,0-5.33-3.51c-2.28-.41-4.42.39-6.64.54a1,1,0,0,0-.69.35c-.69,1.36-1.69,2.59-1.84,4.19-.19,2,.33,3.92.4,5.89a2,2,0,0,0,.67,1.28c1.28,1.35,3.07,1.42,4.69,1.69,2.39.38,4.57-.47,6.75-1.5a3.47,3.47,0,0,0,2.27-3.53c0-.6,0-1.21,0-2.08S59.16,32.4,58.49,31.35Z"/><path class="cls-2" d="M91.36,33.46a2.18,2.18,0,0,0-1.21-2,17.14,17.14,0,0,0-2.69-.43,10.3,10.3,0,0,0-2.9.23c-.77.06-1.17.39-1.13,1.22.08,2.24.13,4.47.17,6.71a.69.69,0,0,0,.66.76,16.26,16.26,0,0,0,3.75.2,7.06,7.06,0,0,0,1.88-.38c.74-.27.83-.46,1.06-1.18A16.08,16.08,0,0,0,91.36,33.46Z"/><path class="cls-2" d="M54.93,30.6c.64.23.75.77.83,1.35.27,2-.09,4.09.55,6.09.18.58-.39,1-.9,1.13a14.13,14.13,0,0,1-6.15.71A1.85,1.85,0,0,1,47.61,38c-.09-2-.08-3.94,0-5.91a1.59,1.59,0,0,1,1.15-1.63,3.36,3.36,0,0,0,1.34.06,19.82,19.82,0,0,1,4.68.12Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140.43 140.43"><defs><style>.cls-1{fill:#ffd561;}.cls-2{fill:#fff;}.cls-3{fill:#292929;}</style></defs><g id="레이어_2" data-name="레이어 2"><g id="Graphic_Elements" data-name="Graphic Elements"><path class="cls-1" d="M72.94.05c4.25.11,8.49.33,12.72.84a25.34,25.34,0,0,1,5.45,1.57C94.82,3.78,98.63,4.86,102,7a38.37,38.37,0,0,1,5.94,4.33c1.44,1.36,3.08,2.5,4.53,3.84,2.17,2,3.87,4.47,6.2,6.27a31,31,0,0,1,8.46,10.39,71.47,71.47,0,0,0,5.21,7.76c3.21,4.62,5.62,9.54,6.28,15.25.31,2.7,1.21,5.28,1.58,8a25.93,25.93,0,0,1-1,11.35c-.76,2.41-1.64,4.78-2.49,7.16a11.36,11.36,0,0,0-.56,2.83,21.59,21.59,0,0,1-2.53,7.91,33.16,33.16,0,0,0-2.92,7.68c-.83,3.35-2.77,6.13-4.47,9-2.44,4.17-5,8.28-8.69,11.38a75.71,75.71,0,0,1-10.4,7.54A103.83,103.83,0,0,1,91.5,135.5a49,49,0,0,1-11,2.46c-2.54.33-4.9,1.36-7.38,1.92a18.55,18.55,0,0,1-7.78.25c-1.63-.33-3.28-.64-4.94-.82-2.28-.24-4.3-1.34-6.42-2.07-3.45-1.18-6.83-2.55-10.21-3.92a9,9,0,0,1-2.72-1.6,11.09,11.09,0,0,0-3.09-2.07c-2.36-1-4.46-2.52-6.79-3.57-2.67-1.2-4.75-3.23-7.07-5-4.2-3.15-6.58-7.68-9.41-11.9-1.84-2.73-3.51-5.56-5.1-8.45A74.9,74.9,0,0,1,3.9,87.87c-1-3.07-1.75-6.21-2.59-9.31a28.84,28.84,0,0,1-1-12.43,75.8,75.8,0,0,1,3-12.75,56.09,56.09,0,0,1,4.46-9.19A21.35,21.35,0,0,0,9.5,39.63a16,16,0,0,1,3.07-5.86,81.62,81.62,0,0,0,7-9.54,10.7,10.7,0,0,1,2.67-2.78c2.84-2.13,5.43-4.58,8.16-6.85A73.7,73.7,0,0,1,41.51,7.14a38.16,38.16,0,0,1,7.87-2.93C51.58,3.54,53.8,3,56,2.51q5.51-1.09,11-2A23.46,23.46,0,0,1,72.94.05Z"/><path class="cls-2" d="M62.88,31.1c1.71.84,2.94,2.18,2.44,4.46a11.68,11.68,0,0,1-4.87,7.62,11.89,11.89,0,0,1-6.64,1.66,8.06,8.06,0,0,1-5.05-1.29,2,2,0,0,1-.82-.85c-1-2.75-2.08-5.48-1.1-8.51.31-1,1.08-1.33,1.79-1.79a5.58,5.58,0,0,0,1.53-1.34c1.9-2.55,6.46-1.66,9-1.11A16,16,0,0,1,62.88,31.1Z"/><path class="cls-2" d="M94.93,31.44a4.52,4.52,0,0,1,.69,5.43,27.77,27.77,0,0,1-2.08,3.82c-1,1.32-1.9,2.49-3.78,2.53a14.9,14.9,0,0,1-4.6-.23,17.74,17.74,0,0,1-3.67-1.76,3.52,3.52,0,0,1-1.84-2.79A15.07,15.07,0,0,0,79.36,37c-.59-2.37.22-4.5,1.16-6.58a3.28,3.28,0,0,1,2-1.48c2-.77,5-.72,7.17-.68a5,5,0,0,1,1.44.19,5.43,5.43,0,0,1,1.51.91A14.35,14.35,0,0,1,94.93,31.44Z"/><path class="cls-3" d="M83.78,56.11A6.76,6.76,0,0,1,79.84,55c-.41-.24-.49-.69-.62-1.11a13.83,13.83,0,0,0-2.12-4.75,1.56,1.56,0,0,0-1.37-.69,19.89,19.89,0,0,0-8.42,1.88c-6.26,2.85-10.63,7.63-14.15,13.33a2.84,2.84,0,0,0-.62,1.61c0,.53-.39.43-.69.4a7.8,7.8,0,0,1-3.06-1.12c-.66-.39-.37-.93-.15-1.43a28.09,28.09,0,0,1,3.89-5.77A28.68,28.68,0,0,1,65,48a17.46,17.46,0,0,1,12.25-.63,8.74,8.74,0,0,1,5.56,6A14.91,14.91,0,0,0,83.78,56.11Z"/><path class="cls-3" d="M62.88,32.37l-1,2.89a1.57,1.57,0,0,1-1.44,1.11,16.76,16.76,0,0,1-5.29,0c-.56-.08-.84-.28-.8-.9.08-1.33.12-2.68.17-4a7.88,7.88,0,0,0,.1-2.47,1.08,1.08,0,0,1,1-1.26,24.41,24.41,0,0,1,5-.27,2.45,2.45,0,0,1,2.42,2.49A12.85,12.85,0,0,1,62.88,32.37Z"/><path class="cls-3" d="M86.4,30.43c0-.11.07-.22.1-.33.12-.68.25-1.35.34-2a.88.88,0,0,1,.75-.83c2.1-.31,4.18-.51,6.09.8a1.38,1.38,0,0,1,.7,1.1,27,27,0,0,1,0,4c-.57,1.43-1.12,2.72-3.07,2.86-1.37.09-2.74.12-4.1.15-.6,0-.87-.28-1-.88-.33-1.29.11-2.52.1-3.78C86.47,31.18,86.13,30.77,86.4,30.43Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140.43 140.43"><defs><style>.cls-1{fill:#d6674c;}.cls-2{fill:#292929;}.cls-3{fill:#fff;}</style></defs><g id="레이어_2" data-name="레이어 2"><g id="Graphic_Elements" data-name="Graphic Elements"><path class="cls-1" d="M77.3,140.43c-5.75-.25-11.51,0-17.23-.9a52.78,52.78,0,0,1-10.32-2.91c-3.47-1.31-6.94-2.58-10.41-3.86a71.43,71.43,0,0,1-8.92-4.25c-3.39-1.81-6.9-3.47-9.87-5.95-6.47-5.39-11.73-11.76-14.8-19.8a25.19,25.19,0,0,0-1.61-3.59C1.67,94.81.91,90,.48,85.11q-.52-6-.48-12a57.11,57.11,0,0,1,4.76-23c3-6.68,5.64-13.5,9.25-19.87,1.57-2.76,3.86-4.85,5.93-7.14a63.42,63.42,0,0,1,8.7-7.85c2.6-2,5.29-3.84,7.93-5.77,1.19-.88,2.37-1.81,3.48-2.8A25.91,25.91,0,0,1,50.68,1.34,31.73,31.73,0,0,1,59.16.57,71.64,71.64,0,0,0,66.78.12c4-.43,7.88.38,11.75,1.07,5.31.94,10.15,3.38,15.22,5.1,2.53.86,5,1.79,7.51,2.76a57.43,57.43,0,0,1,12.62,7.36c5.06,3.69,8.77,8.68,12.72,13.44A56.49,56.49,0,0,1,133,38.37a55,55,0,0,1,4.28,10.38A67.06,67.06,0,0,1,140.38,63c.27,3.14-.56,6.12-1,9.16-.8,5-2.82,9.65-4.46,14.4a13.88,13.88,0,0,0-.86,3.94c-.08,2.19-1.09,4.12-1.7,6.16A66.63,66.63,0,0,1,121.57,118c-2,2.6-3.68,5.36-5.53,8a37.81,37.81,0,0,1-5.15,6.55,4.14,4.14,0,0,1-1.18.83c-1.93.8-3.26,2.5-5.19,3.4a43.16,43.16,0,0,1-9.55,2.8c-5.07,1.08-10.22.81-15.35.87Z"/><path class="cls-2" d="M61.08,71.15c-.11,0-.22,0-.34,0-2.2.18-2.33-.71-1.51-2.63a16.71,16.71,0,0,1,5.94-7.23c2.53-1.75,5.4-1.8,8.34-1.56,3.6.29,5.73,2.46,7.28,5.45a8,8,0,0,0,.64,1.19c1.22,1.53,1.36,3.37,1.57,5.2.13,1.16-.08,2.38.71,3.42.24.32-.2.42-.43.44a18.83,18.83,0,0,1-3.6,0c-.51-.06-.75-.38-.8-.92a26.27,26.27,0,0,0-.64-5.12,15.19,15.19,0,0,0-5.45-8.19c-1.24-.89-2.41-.15-3.42.55a16.78,16.78,0,0,0-6,7.57,1.79,1.79,0,0,1-.13.32c-.26.42.23.87,0,1.29a.29.29,0,0,1-.18.13l-1.91.14Z"/><path class="cls-3" d="M56.17,55.78a22.58,22.58,0,0,1-3.56-.24c-1.82-.12-2.87-1.44-3.94-2.67a1.62,1.62,0,0,1-.18-1.42c.53-2.53,1.11-5,1.68-7.56a1.65,1.65,0,0,1,.94-1.19,18,18,0,0,1,11-1.78,5.13,5.13,0,0,1,2.55,1.36,1.53,1.53,0,0,1,.6,1.51c-.93,3.35-1.36,6.84-3.22,9.92C61,55.6,59.38,56,57.44,55.89Z"/><path class="cls-3" d="M95.19,46.72v1.92c0,2.86-1.69,4.49-4.11,5.49a16.27,16.27,0,0,1-7.93,1.22c-1.57-.17-2.25-.44-2.25-1.94,0-3.41-1-6.78-.43-10.22.16-1,.56-1.39,1.59-1.44,1.72-.08,3.44-.32,5.15-.52a14.62,14.62,0,0,1,4.72.18c1.55.34,3.5,1.61,3.29,3.84a14.42,14.42,0,0,0,0,1.47Z"/><path class="cls-2" d="M64.6,36.73a1,1,0,0,1-.81-.31c-2.86-2.55-6.39-3.88-9.77-5.5-2.49-1.18-5.05-2.12-7.59-3.15-.33-.13-.82-.24-.85-.66s.5-.6.85-.77,1-.42,1.56-.63a2.53,2.53,0,0,1,2.51.23c1.52,1,3.41,1.09,5,2,2.08,1.13,4.27,2,6.45,3a26,26,0,0,1,6,3.85c.41.32.38.6-.06.86A7.88,7.88,0,0,1,64.6,36.73Z"/><path class="cls-2" d="M91,28.44a7.82,7.82,0,0,1,3.51,1.69c.42.36.13.49-.28.63A100.33,100.33,0,0,0,81.5,36c-.54.26-1.06.56-1.58.85-.14.07-.37.14-.38.22-.07,1.64-1.14.67-1.7.57A7.27,7.27,0,0,1,75,36.3c-.57-.41-.67-.71.08-1.1a128.58,128.58,0,0,1,15.3-6.61C90.58,28.53,90.76,28.49,91,28.44Z"/><path class="cls-2" d="M60.72,43.73a3.82,3.82,0,0,0-1.43-.56c-.43-.38-.9,0-1.35-.06h0a10.22,10.22,0,0,0-4.57,0l-.2,0c-.57.16-.61.66-.73,1.12-.3.22-.65.43-.64.86,0,1.89-.72,3.69-.68,5.57.05,2.27.59,2.8,2.64,2.86.3,0,.59.12.89.12,2.77,0,4.2,0,5.1-2.36.76-1.32.64-2.87,1.14-4.26a1.85,1.85,0,0,0,.43-1.19h0a.38.38,0,0,0,.06-.13A1.36,1.36,0,0,0,60.72,43.73Z"/><path class="cls-2" d="M91.79,44c.11-1.25-.38-1.76-1.57-1.74a.59.59,0,0,0-.19-.05c-.14-.32-.42-.22-.67-.23-.07-.06-.12-.07-.17-.05a10.42,10.42,0,0,0-4,0,2,2,0,0,0-1.93,1.85,9.34,9.34,0,0,0-.33,4.45A7.58,7.58,0,0,0,83,49.32c0,.26,0,.52,0,.78,0,1.65.1,1.83,1.7,2a19.26,19.26,0,0,0,5-.06,1.84,1.84,0,0,0,1.72-1.63A4.05,4.05,0,0,0,92.16,48C92.28,46.64,91.67,45.35,91.79,44Zm-2.68-1.94Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140.43 140.43"><defs><style>.cls-1{fill:#ffb340;}.cls-2{fill:#292929;}.cls-3{fill:#fff;}.cls-4{fill:#d6674c;}</style></defs><g id="레이어_2" data-name="레이어 2"><g id="Graphic_Elements" data-name="Graphic Elements"><path class="cls-1" d="M82.08,140.43h-25c-2.25-.27-4.52-.45-6.76-.9a32,32,0,0,1-6.76-2.06c-3.11-1.37-6.2-2.8-9.38-4-.79-.3-1.55-.67-2.32-1-4.23-1.68-7.52-4.62-10.53-7.93a8.07,8.07,0,0,1-1-1.28q-3-4.94-6.24-9.76c-.35-.55-.68-1.11-1.08-1.63A72.16,72.16,0,0,1,4.12,95.81c-.4-1-.92-1.93-1.25-3A55.25,55.25,0,0,1,.8,80.2C.63,77.8.49,75.4.21,73A28.22,28.22,0,0,1,0,69.57C0,65.7,0,61.83,0,58a21.74,21.74,0,0,1,.69-5.57c.6-2.33,1.21-4.67,1.73-7a74.24,74.24,0,0,1,3.31-8.94,69.71,69.71,0,0,1,5.74-11.5,9.3,9.3,0,0,1,1.29-1.75c3.39-3.32,6.51-6.91,9.92-10.2,3-2.88,6.63-4.75,10.15-6.83,6-3.53,12.56-4.64,19.25-5.55A76.94,76.94,0,0,1,61.43,0c5.35-.06,10.7,0,16.05,0A44,44,0,0,1,91.87,2.36c7.43,2.46,14.88,4.91,22.09,8,5.05,2.16,9.87,4.88,13.57,9a26.6,26.6,0,0,1,6.38,11c1.28,4.8,2.38,9.66,3.94,14.39a65,65,0,0,1,2.53,12.14,15.78,15.78,0,0,1,0,2.06c0,4.11,0,8.21,0,12.31a7.1,7.1,0,0,1-.24,2.16,17.74,17.74,0,0,0-.58,5.8,86.22,86.22,0,0,1-1.31,18.07,32.09,32.09,0,0,1-4.71,11.14,82.3,82.3,0,0,1-10.09,13.06,29.32,29.32,0,0,1-6,4.92,186.78,186.78,0,0,1-16.33,9.32,44.1,44.1,0,0,1-18.52,4.62A.74.74,0,0,0,82.08,140.43Z"/><path class="cls-2" d="M78.43,31a7.67,7.67,0,0,1-3.36-1.61c-.5-.4-.3-.65.19-.92,1.47-.8,2.89-1.7,4.39-2.45,3.75-1.89,7.39-4,11-6a1.08,1.08,0,0,1,.86-.07,9.14,9.14,0,0,1,2.86,1.34c.66.44.81.79-.07,1.23-3.52,1.75-6.85,3.85-10.38,5.58-1.61.79-3.13,1.74-4.69,2.62C79,30.82,78.78,31.06,78.43,31Z"/><path class="cls-2" d="M46.89,26.34c6.18.4,11.4,1.16,16.28,3.45.86.41,1.66.95,2.5,1.4.56.3.46.61.07,1a8.07,8.07,0,0,1-2.8,1.71,1.34,1.34,0,0,1-1.18-.22c-5.67-3.42-11.93-4.42-18.42-4.52-.34,0-.86.28-1-.2s.36-.63.66-.86C44.4,27,45.89,26.16,46.89,26.34Z"/><path class="cls-2" d="M84.55,66.92c-.17-.7-.2-1.43-.32-2.15-.51-3-.89-6-2.7-8.54-1.66-2.33-3.69-4.43-6.63-4.66A19.22,19.22,0,0,0,63,54.2a13.37,13.37,0,0,0-6.37,9.46c-.17,1-.43,1.93-.69,2.89-.5,1.84-.51,1.83,1.3,2.22.08,0,.18,0,.22,0,.92,1,2.18.7,3.28.68,3.44-.08,6.87-.27,10.3-.42v-.23c4.15-.18,8.31-.38,12.46-.52C84.48,68.29,84.81,67.92,84.55,66.92Zm-5.43.62c-5.93.26-11.86.56-17.79.83-1.23,0-1.4-.21-1.08-1.42s.66-2.56,1-3.85h0a10.67,10.67,0,0,1,3-6.27,13,13,0,0,1,7.16-4,3.22,3.22,0,0,1,2.56.72,12,12,0,0,1,4.81,7h0c.56,2,.77,4,1.15,6C80.1,67.26,79.83,67.51,79.12,67.54Z"/><path class="cls-3" d="M61.78,39c-3-.71-6-.44-9-.33a11.87,11.87,0,0,0-5.57,1.83.93.93,0,0,0-.42,1c.06,1.26.11,2.52.16,3.78h-.06c0,1.14.15,2.29.13,3.43a1.64,1.64,0,0,0,1.44,1.78,29.27,29.27,0,0,0,8.71.87c3.71-.3,5.44-2,6-4.4a18.23,18.23,0,0,0,.6-5.55C63.7,39.74,63.35,39.33,61.78,39Z"/><path class="cls-3" d="M90.51,36.89a81.59,81.59,0,0,0-10.72-.1c-1.76.17-2,.36-1.94,2.07a26.57,26.57,0,0,1-.48,5.9c-.57,2.89.57,4,3.49,4.2,3.12.22,6-.58,9-1.26A2.92,2.92,0,0,0,92,46a19.92,19.92,0,0,0,1.3-5.51C93.2,37.65,92.71,37,90.51,36.89Z"/><path class="cls-4" d="M61.25,63.1c3-.32,5.94-.84,8.94-.89a5.15,5.15,0,0,1,3.46.88A.86.86,0,0,0,75,63c1-1.11,2-2.17,3.68-2.21.06,0,.12-.18.18-.28.56,2,.77,4,1.15,6,.13.69-.14.94-.85,1-5.93.26-11.86.56-17.79.83-1.23,0-1.4-.21-1.08-1.42S60.91,64.39,61.25,63.1Z"/><path class="cls-2" d="M55.61,40.14l.57.08c2.5.32,2.5.32,2.61,2.93.08,1.75.13,3.51.24,5.26a1.1,1.1,0,0,1-.9,1.33,16.6,16.6,0,0,1-5.5.85c-1.18-.05-1.77-.5-1.85-1.7-.14-2.21-.24-4.42-.33-6.63-.05-1.24.25-1.52,1.83-1.79C53.36,40.06,54.42,39.47,55.61,40.14Z"/><path class="cls-2" d="M89.15,42.48c0,.91.13,1.82.1,2.73,0,1.61-.61,2.15-2.2,2.3a16.71,16.71,0,0,1-5-.14,1.62,1.62,0,0,1-1.43-1.75c0-2.21,0-4.42.08-6.62,0-.74.49-1,1.16-1.16a13.62,13.62,0,0,1,6,.62,1.58,1.58,0,0,1,1.32,1.73c0,.75.06,1.52.09,2.28Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140.43 140.43"><defs><style>.cls-1{fill:#ffd561;}.cls-2{fill:#fff;}.cls-3{fill:#d6674c;}.cls-4{fill:#292929;}</style></defs><g id="레이어_2" data-name="레이어 2"><g id="Graphic_Elements" data-name="Graphic Elements"><path class="cls-1" d="M.17,73.41c-.72-5.33,1-10.54,2.38-15.77C4.06,52,6.06,46.5,7.88,41c1.93-5.86,5.53-10.64,9.51-15.18C19,24,20.56,22.16,22.24,20.44c1.83-1.88,4-3.39,5.87-5.24s3.58-3.42,5.32-5.18A26.19,26.19,0,0,1,48.57,2.34C52.81,1.71,57.05,1,61.26.25A27.6,27.6,0,0,1,67.62.12a49.21,49.21,0,0,1,6.87.56c2,.38,3.93.9,5.89,1.37,5,1.22,10.1,2.38,15.11,3.72A56.12,56.12,0,0,1,109.21,12a48.37,48.37,0,0,1,8,6.29c2.8,2.54,5.42,5.29,8.2,7.86a39.75,39.75,0,0,1,9.08,12.93,87.52,87.52,0,0,1,5.21,13.83c1,3.66.7,7.31.49,11-.33,5.58-2,10.88-3.22,16.27a4.45,4.45,0,0,0-.23,1.22c.33,4.44-1.25,8.54-2.12,12.77-1.46,7-4.71,13.25-8.3,19.32a33.87,33.87,0,0,0-2.42,4.47,78.15,78.15,0,0,1-3.78,6.9,9.42,9.42,0,0,1-3.19,3.87c-1.8,1.08-3,2.91-4.84,4a44.83,44.83,0,0,1-14.63,5.11c-7.36,1.24-14.8,1.86-22.24,2.46a50.61,50.61,0,0,1-11.79-.33c-5.07-.77-9.95-2.33-14.94-3.43-6.78-1.51-13.1-4.29-19.41-7.09a31.85,31.85,0,0,1-8.6-5.87c-3-2.76-6.1-5.37-8.28-8.86-2-3.13-3.63-6.43-5.68-9.49-3.18-4.73-4.1-10.16-5-15.57C.61,84.34-.24,79,.17,73.41Z"/><path class="cls-2" d="M81.14,42.91a6.54,6.54,0,0,0,2,1.78c2.66,1.64,6,2.45,9,1.39s5.1-4.39,4.2-7.38a10.38,10.38,0,0,0-2.73-4c-3.15-3.3-5.65-4.2-9.67-1.3C81.28,35.35,79.08,39.92,81.14,42.91Z"/><path class="cls-2" d="M40.66,41.55a6.06,6.06,0,0,0,3.19,6.27,8.15,8.15,0,0,0,5.55-.06,10.88,10.88,0,0,0,4-1.9,7.16,7.16,0,0,0,1-9.57C49.84,30.49,41.45,35.37,40.66,41.55Z"/><path class="cls-3" d="M76.65,56.38a29.13,29.13,0,0,1,1.1,8.15c0,.89-.51.81-1.09.81-5,0-9.93.13-14.89-.25a20.76,20.76,0,0,1-4.23-.34c-.68-.19-.75-.45-.56-1a36,36,0,0,1,1.66-4,3.7,3.7,0,0,1,2.49-.28,10.41,10.41,0,0,1,2.43.28A3.2,3.2,0,0,0,66.74,59c.47-.42,1.07-.68,1.57-1.07C70,56.59,72,56.56,74,56.65A4.92,4.92,0,0,0,76.65,56.38Z"/><path class="cls-4" d="M84.25,33c1.83-.3,2.81.66,3.58,2.2,1.17,2.34,1.33,2.4,3,.46,1.42-1.64,3.13-1,4.75-.91.69,0,.31.52,0,.84a53.25,53.25,0,0,1-4.39,3.83c-.57.49-.67.8-.15,1.41,1.32,1.55,1.9,3.53,2.83,5.31a.75.75,0,0,1-.64,1.15,12.61,12.61,0,0,1-3.13,0c-.27,0-.56-.1-.58-.42-.11-1.34-1-2.36-1.41-3.6-.24-.77-.74-1.27-1.61-.43a22.21,22.21,0,0,0-2,1.74c-.45.58-1.1.34-1.67.38s-1.12,0-1.68,0c-.37,0-.81,0-1-.4s.27-.66.55-.88c1.46-1.11,2.9-2.24,4.41-3.27.65-.45.73-.86.31-1.45-1.21-1.72-1.72-3.89-3.43-5.31-.43-.35.1-.53.32-.56C83,33,83.62,33,84.25,33Z"/><path class="cls-4" d="M56.06,44.93a4.08,4.08,0,0,1-3.44-1.19,3,3,0,0,0-.36-.26c-2.54-1.65-2.33-1.81-3.74,1.14-1.11,2.33-1,2.39-3.61,2.31-1.72,0-1.65,0-1.13-1.62a21.16,21.16,0,0,1,2.31-4.2c.39-.65.26-1-.34-1.3-1.56-.87-3.1-1.76-4.65-2.63-.15-.09-.37-.15-.37-.37s.26-.37.47-.38c1.9,0,3.84-.53,5.49,1,1.05,1,1.15.9,1.84-.32s1.39-2.39,2-3.61a1.35,1.35,0,0,1,1.19-.86c1,0,1.95,0,2.91,0,.46,0,.9.1.45.82-1.23,2-2.34,4-3.57,5.95-.39.63-.26.9.32,1.19,1.9,1,3.92,1.67,5.56,3.08.32.28,1,.42.87.88s-.77.27-1.2.3S56.51,44.93,56.06,44.93Z"/><path class="cls-4" d="M80.92,55.85a8.13,8.13,0,0,0-6.45-5.63,21.06,21.06,0,0,0-9.24.28c-5.12,1.32-9.2,4-11.11,9.28-.58,1.61-1.51,3.1-1.73,4.84-.12.95.11,1.48,1.23,1.44,5.65-.19,11.28.53,16.92.35,3.48-.11,6.95.13,10.43-.14,1-.08,1.23-.42,1.25-1.36A28.27,28.27,0,0,0,80.92,55.85Zm-4.26,9.49c-5,0-9.93.13-14.89-.25a20.76,20.76,0,0,1-4.23-.34c-.68-.19-.75-.45-.56-1a36,36,0,0,1,1.66-4h0c1.89-5,5.74-7.67,10.83-8.55,3.14-.54,6.44,2,7.18,5.19h0a29.13,29.13,0,0,1,1.1,8.15C77.75,65.42,77.24,65.34,76.66,65.34Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 142.47 140.43"><defs><style>.cls-1{fill:#ffd561;}.cls-2{fill:#292929;}.cls-3{fill:#fff;}.cls-4{fill:#ffb340;}.cls-5{fill:#d6674c;}</style></defs><g id="레이어_2" data-name="레이어 2"><g id="Graphic_Elements" data-name="Graphic Elements"><path class="cls-1" d="M68.56.07a81.89,81.89,0,0,1,15,.76c6.44,1,12.62,2.8,18.07,6.7,2.5,1.79,5.29,3.13,7.65,5.16A18.16,18.16,0,0,1,111.62,15a38.24,38.24,0,0,0,7,6.43,18.93,18.93,0,0,1,4.93,5.42,16.57,16.57,0,0,0,2.38,2.89,77.85,77.85,0,0,1,6.76,7.18,27.78,27.78,0,0,1,4.92,11c.64,3,1.43,6,2.25,8.9,1,3.62.51,7.24.25,10.87a42.55,42.55,0,0,1-1.9,9.3c-.9,2.94-1,6-1.5,9a95.56,95.56,0,0,1-4.36,15.9c-2.07,5.62-4.46,11.18-8.43,15.72-4.43,5.08-8.94,10.07-15,13.21-3.12,1.61-6.05,3.64-9.34,4.89a76.93,76.93,0,0,1-16.84,4.21,76.3,76.3,0,0,1-11,.51,55.78,55.78,0,0,1-15.85-2.13c-3.45-1-7.1-1.23-10.53-2.4a39.24,39.24,0,0,1-13.21-7,23,23,0,0,0-5-3.25,47,47,0,0,1-14.21-10.94,77.51,77.51,0,0,1-7.53-10.4A13.46,13.46,0,0,1,4,100.86C3,97.63,2.48,94.3,1.73,91S.84,84.66.39,81.48c-.8-5.6-.2-11.19.31-16.75.42-4.68.92-9.38,1.79-14,.5-2.69,2-4.94,2.89-7.47a17.63,17.63,0,0,1,2.53-4.7c2.27-3.18,4.82-6.22,6.63-9.67,2.22-4.22,5.51-7.37,8.54-10.81.9-1,2-1.92,2.79-3,2.68-3.4,6.31-5.59,9.72-8C38,5.36,40.92,4.76,43.8,4.32a42.79,42.79,0,0,0,8.81-2.43A36.74,36.74,0,0,1,62.1.11,63.22,63.22,0,0,1,68.56.07Z"/><path class="cls-2" d="M94.42,40.53a8.07,8.07,0,0,1-4.45.19,41.67,41.67,0,0,1-10.31-3.08,11.53,11.53,0,0,1-1.11-.56c-1.28-.8-1.43-1.71-.43-2.88A19.11,19.11,0,0,1,82.32,31a25.19,25.19,0,0,0,3.22-2.27c1.57-1.46,3.43-1.05,5.25-1,.2,0,.48.1.49.37s-.28.31-.46.43l-7.7,5.33a3.69,3.69,0,0,0-.41.38c-1.15,1.2-1,1.93.47,2.66a43,43,0,0,0,9.87,3A2,2,0,0,1,94.42,40.53Z"/><path class="cls-2" d="M81.83,49.58a4.06,4.06,0,0,0-4.16-4.29h-.9a15.26,15.26,0,0,0-4,.38c-3.88.88-7.75,1.81-11.63,2.7a76.67,76.67,0,0,0-9.28,2.3c-.76.27-1,.57-.74,1.37s.5,1.89.72,2.85c.8,3.39,1.76,6.7,4,9.47A9.21,9.21,0,0,0,59.13,67a18.92,18.92,0,0,0,11.52,1.78c2.73-.51,5.2-1.63,6.6-4.27A36.32,36.32,0,0,0,79,60.89C80.46,57.25,81.94,53.61,81.83,49.58Zm-4.64,3.09a36,36,0,0,1-1.48,5.09h0a22.86,22.86,0,0,1-3.87,8c-1.74,2.14-4.33,2.48-7.26,1.39-4-1.47-6-4.55-7.19-8.39h0c-.93-2.12-1.1-4.45-1.79-6.65-.24-.76.45-.86.91-1a58,58,0,0,1,6.34-1.55c4.1-.93,8.2-1.86,12.29-2.86a1.18,1.18,0,0,1,1.53.63C77.74,49,77.45,50.89,77.19,52.67Z"/><path class="cls-3" d="M57.56,32.83a4.61,4.61,0,0,0-2.75-4.21c-2.42-1.16-5-.87-7.44-.62a10.46,10.46,0,0,0-5,1.4A2.85,2.85,0,0,0,40.8,32c.05,2.25,0,4.51.25,6.76a2.92,2.92,0,0,0,3,2.94c1.87.12,3.75.2,5.63.3A18.52,18.52,0,0,0,56,41.25c.57-.2,1-.44,1.11-1.11A49.71,49.71,0,0,0,57.56,32.83Z"/><path class="cls-4" d="M120.7,50.58a23.9,23.9,0,0,1-2.53.18c.21-6.22-3.53-13.26-7.65-17.82a20.93,20.93,0,0,0-8-5.92c-.32-.12-.63-.25-.94-.4s-.74-.24-.72-.63.46-.46.77-.56a20.79,20.79,0,0,0,10.87-8.32c2.91-4.3,4.22-8.81,5.41-13.75,1.52-.15,3.56-1.09,5-.43,1.17.53.74,1.83.75,3.05a28.16,28.16,0,0,0,.73,6.73A11.38,11.38,0,0,0,128.77,19c2.86,2.2,5.52,4.68,8.62,6.58a24.81,24.81,0,0,0,4.13,1.82c.38.15.87.29.94.74s-.48.61-.81.8a37.55,37.55,0,0,0-10.26,8.1,61,61,0,0,0-4.9,6.21c-.43.66-2.71,6.74-3,6.81A23.77,23.77,0,0,1,120.7,50.58Z"/><path class="cls-2" d="M46.06,40.34A2,2,0,0,1,45,38.6a49.24,49.24,0,0,1,.11-6.54,1.56,1.56,0,0,1,1.65-1.48,25.66,25.66,0,0,1,5.61.26c.43.06.64.2.8.73.78,2.59.4,5.21.34,7.83,0,.53-.39.78-.84,1-.26.15-.58,0-.85.17a7.84,7.84,0,0,0-1.36.14c-.17,0-.35,0-.48-.12H49A7.57,7.57,0,0,1,46.06,40.34Z"/><path class="cls-5" d="M57.39,58.72c2.29-1.43,4.82-1.55,7.41-1.41a3.73,3.73,0,0,1,2.56,1.28c.41.45.7.58,1.29.11,1.72-1.37,3.81-1.14,5.83-1.07.41,0,.82.08,1.23.13a22.86,22.86,0,0,1-3.87,8c-1.74,2.14-4.33,2.48-7.26,1.39C60.62,65.64,58.57,62.56,57.39,58.72Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

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