first commit 2
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
include_once('../common.php');
|
||||
|
||||
// 커뮤니티 사용여부
|
||||
/*
|
||||
if(defined('G5_COMMUNITY_USE') && G5_COMMUNITY_USE === false) {
|
||||
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
|
||||
die('<p>쇼핑몰 설치 후 이용해 주십시오.</p>');
|
||||
|
||||
define('_SHOP_', true);
|
||||
}
|
||||
*/
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
include_once('../common.php');
|
||||
|
||||
|
||||
if (!$member['mb_id']) {
|
||||
alert('회원만 이용하실 수 있습니다.', G5_URL);
|
||||
}
|
||||
|
||||
if (!$member['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id) {
|
||||
alert('자신의 정보를 공개하지 않으면 다른분의 정보를 조회할 수 없습니다.\\n\\n정보공개 설정은 회원정보수정에서 하실 수 있습니다.', G5_URL);
|
||||
}
|
||||
|
||||
$mb_id = isset($mb_id) ? $mb_id : '';
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
|
||||
if (!$mb['mb_id']) {
|
||||
alert('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
|
||||
}
|
||||
|
||||
|
||||
if (!$mb['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id) {
|
||||
alert('정보공개를 하지 않았습니다.', G5_URL);
|
||||
}
|
||||
|
||||
$g5['title'] = $mb['mb_nick'].'님의 미니홈';
|
||||
include_once(G5_BBS_PATH.'/_head.php');
|
||||
|
||||
$mb_nick = get_sideview($mb['mb_id'], get_text($mb['mb_nick']), $mb['mb_email'], $mb['mb_homepage'], $mb['mb_open']);
|
||||
|
||||
// 회원가입후 몇일째인지? + 1 은 당일을 포함한다는 뜻
|
||||
$sql = " select (TO_DAYS('".G5_TIME_YMDHIS."') - TO_DAYS('{$mb['mb_datetime']}') + 1) as days ";
|
||||
$row = sql_fetch($sql);
|
||||
$mb_reg_after = $row['days'];
|
||||
|
||||
$mb_homepage = set_http(get_text(clean_xss_tags($mb['mb_homepage'])));
|
||||
$mb_profile = $mb['mb_profile'] ? conv_content($mb['mb_profile'],0) : '소개 내용이 없습니다.';
|
||||
$mb_signature = $mb['mb_signature'] ? conv_content($mb['mb_signature'],0) : '서명이 없습니다.';
|
||||
|
||||
|
||||
include_once($member_skin_path.'/home.skin.php');
|
||||
include_once(G5_BBS_PATH.'/_tail.php');
|
||||
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$g5['title'] = '새글';
|
||||
include_once('../_head.php');
|
||||
|
||||
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id and b.bo_use_search = 1 ";
|
||||
|
||||
$gr_id = isset($_GET['gr_id']) ? substr(preg_replace('#[^a-z0-9_]#i', '', $_GET['gr_id']), 0, 10) : '';
|
||||
if ($gr_id) {
|
||||
$sql_common .= " and b.gr_id = '$gr_id' ";
|
||||
}
|
||||
|
||||
$view = isset($_GET['view']) ? $_GET['view'] : "";
|
||||
|
||||
if ($view == "w")
|
||||
$sql_common .= " and a.wr_id = a.wr_parent ";
|
||||
else if ($view == "c")
|
||||
$sql_common .= " and a.wr_id <> a.wr_parent ";
|
||||
else
|
||||
$view = '';
|
||||
|
||||
$mb_id = isset($_GET['mb_id']) ? ($_GET['mb_id']) : '';
|
||||
$mb_id = substr(preg_replace('#[^a-z0-9_]#i', '', $mb_id), 0, 20);
|
||||
|
||||
if ($mb_id) {
|
||||
$sql_common .= " and a.mb_id = '{$mb_id}' ";
|
||||
}
|
||||
$sql_order = " order by a.bn_id desc ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = G5_IS_MOBILE ? $config['cf_mobile_page_rows'] : $config['cf_new_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$group_select = '<label for="gr_id" class="sound_only">그룹</label><select name="gr_id" id="gr_id"><option value="">전체그룹';
|
||||
$sql = " select gr_id, gr_subject from {$g5['group_table']} order by gr_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$group_select .= "<option value=\"".$row['gr_id']."\">".$row['gr_subject'];
|
||||
}
|
||||
$group_select .= '</select>';
|
||||
|
||||
$list = array();
|
||||
$sql = " select a.*, b.bo_subject, b.bo_mobile_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$from_record}, {$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 = "";
|
||||
$comment_link = "";
|
||||
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
$list[$i] = $row2;
|
||||
|
||||
$name = get_sideview($row2['mb_id'], get_text(cut_str($row2['wr_name'], $config['cf_cut_name'])), $row2['wr_email'], $row2['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
$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);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// 코멘트
|
||||
$comment = '[코] ';
|
||||
$comment_link = '#c_'.$row['wr_id'];
|
||||
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime, wr_content, wr_option from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
$list[$i] = $row2;
|
||||
$list[$i]['wr_id'] = $row['wr_id'];
|
||||
$list[$i]['mb_id'] = $row3['mb_id'];
|
||||
$list[$i]['wr_name'] = $row3['wr_name'];
|
||||
$list[$i]['wr_email'] = $row3['wr_email'];
|
||||
$list[$i]['wr_homepage'] = $row3['wr_homepage'];
|
||||
|
||||
if (strstr($row2['wr_option'], 'secret') || strstr($row3['wr_option'], 'secret')) {
|
||||
$list[$i]['wr_content'] = '비밀 댓글입니다.';
|
||||
} else {
|
||||
$list[$i]['wr_content'] = $row3['wr_content'];
|
||||
}
|
||||
|
||||
$name = get_sideview($row3['mb_id'], get_text(cut_str($row3['wr_name'], $config['cf_cut_name'])), $row3['wr_email'], $row3['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
$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]['gr_id'] = $row['gr_id'];
|
||||
$list[$i]['bo_table'] = $row['bo_table'];
|
||||
$list[$i]['name'] = $name;
|
||||
$list[$i]['comment'] = $comment;
|
||||
$list[$i]['href'] = get_pretty_url($row['bo_table'], $row2['wr_id'], $comment_link);
|
||||
$list[$i]['datetime'] = $datetime;
|
||||
$list[$i]['datetime2'] = $datetime2;
|
||||
|
||||
$list[$i]['gr_subject'] = $row['gr_subject'];
|
||||
$list[$i]['bo_subject'] = ((G5_IS_MOBILE && $row['bo_mobile_subject']) ? $row['bo_mobile_subject'] : $row['bo_subject']);
|
||||
$list[$i]['wr_subject'] = $row2['wr_subject'];
|
||||
}
|
||||
|
||||
$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "?gr_id=$gr_id&view=$view&mb_id=$mb_id&page=");
|
||||
|
||||
include_once($new_skin_path.'/new.skin.php');
|
||||
|
||||
include_once('../_tail.php');
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $_POST['act'] === 'clear') {
|
||||
$cache_path = G5_DATA_PATH . '/cache';
|
||||
$removed = 0;
|
||||
|
||||
if (is_dir($cache_path)) {
|
||||
foreach (glob($cache_path . '/*') as $file) {
|
||||
if (is_file($file)) {
|
||||
@unlink($file);
|
||||
$removed++;
|
||||
}
|
||||
}
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo '캐시 폴더가 존재하지 않습니다.';
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
echo '잘못된 요청입니다.';
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $_POST['act'] === 'top_clear') {
|
||||
$v_path = G5_DATA_PATH . '/topvisual';
|
||||
$removed = 0;
|
||||
|
||||
// 1. 캐시 파일 삭제
|
||||
if (is_dir($v_path)) {
|
||||
foreach (glob($v_path . '/*') as $file) {
|
||||
if (is_file($file)) {
|
||||
@unlink($file);
|
||||
$removed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 2. rb_topvisual 테이블 전체 삭제
|
||||
sql_query("DELETE FROM rb_topvisual");
|
||||
|
||||
echo 'ok';
|
||||
exit;
|
||||
}
|
||||
|
||||
echo '잘못된 요청입니다.';
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$module_name = isset($_POST['module_name']) ? clean_xss_tags($_POST['module_name']) : '';
|
||||
$md_id = isset($_POST['md_id']) ? (int)$_POST['md_id'] : 0;
|
||||
$md_layout = isset($_POST['md_layout']) ? clean_xss_tags($_POST['md_layout']) : '';
|
||||
$md_theme = isset($_POST['md_theme']) ? clean_xss_tags($_POST['md_theme']) : '';
|
||||
|
||||
// 디버깅
|
||||
error_log('ajax.custom_config.php called with: ' . print_r($_POST, true));
|
||||
|
||||
if (!$module_name) {
|
||||
echo '<p class="text-muted">모듈을 선택해주세요.</p>';
|
||||
exit;
|
||||
}
|
||||
|
||||
// 커스텀 모듈 설정 파일 경로
|
||||
$config_file = G5_THEME_PATH . '/rb.custom/' . $module_name . '/config.php';
|
||||
|
||||
if (!file_exists($config_file)) {
|
||||
echo '<div class="alert alert-info">';
|
||||
echo '<i class="fa fa-info-circle"></i> ';
|
||||
echo '이 모듈에는 별도의 설정이 없습니다.';
|
||||
echo '</div>';
|
||||
exit;
|
||||
}
|
||||
|
||||
// 현재 모듈 설정 가져오기
|
||||
$row_mod = array();
|
||||
if ($md_id && $md_layout && $md_theme) {
|
||||
$row_mod = sql_fetch("SELECT * FROM rb_module WHERE md_id = '$md_id' AND md_layout = '$md_layout' AND md_theme = '$md_theme'");
|
||||
}
|
||||
|
||||
|
||||
// 설정 파일 포함
|
||||
ob_start();
|
||||
include $config_file;
|
||||
$config_content = ob_get_clean();
|
||||
|
||||
echo $config_content;
|
||||
?>
|
||||
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
// 💡 [핵심 수정] 모듈 설정 로드 라이브러리 포함 (500 에러 해결)
|
||||
include_once(G5_PATH.'/rb/rb.lib/module.lib.php');
|
||||
|
||||
// 테마의 중앙 함수 파일을 포함하여 rb_log() 함수를 사용할 수 있도록 합니다.
|
||||
if (defined('G5_THEME_PATH') && is_file(G5_THEME_PATH . '/functions.php')) {
|
||||
include_once(G5_THEME_PATH . '/functions.php');
|
||||
}
|
||||
|
||||
include_once(G5_LIB_PATH . '/latest.lib.php');
|
||||
include_once(G5_LIB_PATH . '/poll.lib.php');
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$layouts = array();
|
||||
if (isset($_POST['layouts']) && is_array($_POST['layouts'])) {
|
||||
$layouts = $_POST['layouts'];
|
||||
}
|
||||
|
||||
$layout_name = '';
|
||||
if (isset($rb_core['layout'])) {
|
||||
$layout_name = $rb_core['layout'];
|
||||
}
|
||||
|
||||
$theme_name = '';
|
||||
if (isset($rb_core['theme'])) {
|
||||
$theme_name = $rb_core['theme'];
|
||||
}
|
||||
|
||||
$result_data = array();
|
||||
$errors = array();
|
||||
|
||||
foreach ($layouts as $layout_no) {
|
||||
$cache_file = G5_DATA_PATH . "/cache/rb_layout_" . $layout_no . ".php";
|
||||
$hash_file = G5_DATA_PATH . "/cache/rb_layout_" . $layout_no . ".hash";
|
||||
|
||||
// 체크섬 생성
|
||||
$layout_sql = "SELECT * FROM rb_module WHERE md_layout = '" . $layout_no . "' AND md_theme = '" . $theme_name . "' AND md_layout_name = '" . $layout_name . "' ORDER BY md_order_id, md_id ASC";
|
||||
$layout_rows = sql_query($layout_sql);
|
||||
$layout_structure = '';
|
||||
while ($row = sql_fetch_array($layout_rows)) {
|
||||
$layout_structure .= implode('|', $row) . ';';
|
||||
}
|
||||
$layout_checksum = md5($layout_structure);
|
||||
|
||||
$use_cache = !$is_admin;
|
||||
|
||||
// 캐시 사용 조건 확인
|
||||
if ($use_cache && file_exists($cache_file) && file_exists($hash_file)) {
|
||||
$saved_checksum = file_get_contents($hash_file);
|
||||
if ($saved_checksum === $layout_checksum) {
|
||||
$result_data[$layout_no] = include $cache_file;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM rb_module WHERE md_layout = '" . $layout_no . "' AND md_theme = '" . $theme_name . "' AND md_layout_name = '" . $layout_name . "' ORDER BY md_order_id, md_id ASC";
|
||||
$result = sql_query($sql);
|
||||
$sql_cnts = sql_fetch("SELECT COUNT(*) as cnt FROM rb_module WHERE md_layout = '" . $layout_no . "' AND md_theme = '" . $theme_name . "' AND md_layout_name = '" . $layout_name . "'");
|
||||
$rb_module_table = "rb_module";
|
||||
|
||||
$output = "<?php\nob_start();\n\n\$rb_module_table = 'rb_module';\n\$GLOBALS['rb_module_table'] = \$rb_module_table;\n\$is_admin = " . var_export($is_admin, true) . ";\n?>\n";
|
||||
|
||||
while ($row_mod = sql_fetch_array($result)) {
|
||||
ob_start();
|
||||
echo "<?php\n\$row_mod = " . var_export($row_mod, true) . ";\n?>\n";
|
||||
?>
|
||||
|
||||
|
||||
<div
|
||||
class="rb_layout_box <?php echo isset($row_mod['md_show']) ? $row_mod['md_show'] : ''; ?>"
|
||||
style="width:<?php echo $row_mod['md_width']; ?><?php echo !empty($row_mod['md_size']) ? $row_mod['md_size'] : '%'; ?>; height:<?php echo $row_mod['md_height']; ?>;
|
||||
margin-top:<?php
|
||||
echo IS_MOBILE()
|
||||
? (!empty($row_mod['md_margin_top_mo']) ? $row_mod['md_margin_top_mo'] : '0')
|
||||
: (!empty($row_mod['md_margin_top_pc']) ? $row_mod['md_margin_top_pc'] : '0');
|
||||
?>px;
|
||||
margin-bottom:<?php
|
||||
echo IS_MOBILE()
|
||||
? (!empty($row_mod['md_margin_btm_mo']) ? $row_mod['md_margin_btm_mo'] : '0')
|
||||
: (!empty($row_mod['md_margin_btm_pc']) ? $row_mod['md_margin_btm_pc'] : '0');
|
||||
?>px;"
|
||||
data-order-id="<?php echo $row_mod['md_id']; ?>"
|
||||
data-id="<?php echo $row_mod['md_id']; ?>"
|
||||
data-layout="<?php echo $row_mod['md_layout']; ?>"
|
||||
data-title="<?php echo $row_mod['md_title']; ?>"
|
||||
>
|
||||
|
||||
<ul class="content_box rb_module_<?php echo $row_mod['md_id']; ?> rb_module_border_<?php echo $row_mod['md_border']; ?> rb_module_radius_<?php echo $row_mod['md_radius']; ?><?php if (isset($row_mod['md_padding']) && $row_mod['md_padding'] > 0) { ?> rb_module_padding_<?php echo $row_mod['md_padding']; ?><?php } ?> <?php echo isset($row_mod['md_show']) ? $row_mod['md_show'] : ''; ?>">
|
||||
|
||||
<?php if (isset($row_mod['md_type']) && $row_mod['md_type'] == 'latest') { ?>
|
||||
<div class="module_latest_wrap">
|
||||
<?php echo '<?php echo rb_latest("' . $row_mod['md_skin'] . '", "' . $row_mod['md_bo_table'] . '", ' . $row_mod['md_cnt'] . ', 999, 1, ' . $row_mod['md_id'] . ', "' . $row_mod['md_sca'] . '", "' . $row_mod['md_order_latest'] . '", "' . $rb_module_table . '", "' . $row_mod['md_notice'] . '"); ?>'; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($row_mod['md_type']) && $row_mod['md_type'] == 'tab') { ?>
|
||||
<div class="module_latest_wrap">
|
||||
<?php
|
||||
$tab_list_clean = addslashes($row_mod['md_tab_list']);
|
||||
|
||||
$tab_code = '<?php echo rb_latest_tabs("' . $row_mod['md_tab_skin'] . '", "' . $tab_list_clean . '", ' . intval($row_mod['md_cnt']) . ', 999, 1, "' . $row_mod['md_id'] . '", "' . $row_mod['md_order_latest'] . '", "' . $rb_module_table . '", "' . $row_mod['md_notice'] . '"); ?>';
|
||||
echo $tab_code;
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($row_mod['md_type']) && $row_mod['md_type'] == 'widget') { ?>
|
||||
<div class="module_widget_wrap">
|
||||
<?php echo '<?php @include (G5_PATH . "/rb/' . $row_mod['md_widget'] . '/widget.php"); ?>'; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($row_mod['md_type']) && $row_mod['md_type'] == 'banner') { ?>
|
||||
<div class="module_banner_wrap">
|
||||
<?php echo '<?php echo rb_banners("' . $row_mod['md_banner'] . '", "' . $row_mod['md_banner_id'] . '", "' . $row_mod['md_banner_skin'] . '"); ?>'; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($row_mod['md_type']) && $row_mod['md_type'] == 'poll') { ?>
|
||||
<div class="module_poll_wrap">
|
||||
<?php echo '<?php echo poll("' . $row_mod['md_poll'] . '", "' . $row_mod['md_poll_id'] . '"); ?>'; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 💡 [최종 수정] 커스텀 모듈 출력 로직 수정 -->
|
||||
<?php if (isset($row_mod['md_type']) && $row_mod['md_type'] == 'custom') { ?>
|
||||
<div class="module_custom_wrap">
|
||||
<?php echo '<?php $md_id = \'' . $row_mod['md_id'] . '\'; $md_banner_skin = \'' . $row_mod['md_banner_skin'] . '\'; @include (G5_THEME_PATH . "/rb.custom/' . $row_mod['md_custom_skin'] . '/module.php"); ?>'; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_admin) { ?>
|
||||
<span class="admin_ov">
|
||||
<div class="mod_edit">
|
||||
<ul class="middle_y text-center">
|
||||
<h2 class="font-B"><?php echo isset($row_mod['md_title']) ? $row_mod['md_title'] : ''; ?> <span>모듈 설정</span></h2>
|
||||
<h6 class="font-R">해당 모듈의 설정을 변경할 수 있습니다.</h6>
|
||||
<button type="button" class="btn_round btn_round_bg admin_set_btn" onclick="set_module_send(this);">설정</button>
|
||||
<button type="button" class="btn_round admin_set_btn" onclick="set_module_del(this);">삭제</button>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
<div class="flex_box_inner flex_box" data-layout="<?php echo $row_mod['md_layout']; ?>-<?php echo $row_mod['md_id']; ?>"></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$output .= ob_get_clean();
|
||||
}
|
||||
|
||||
if ($is_admin) {
|
||||
if (!isset($sql_cnts['cnt']) || !$sql_cnts['cnt']) {
|
||||
$output .= '<div class="no_data_section add_module_wrap"><ul><img src="'.G5_THEME_URL.'/rb.img/icon/icon_error.svg" style="width:50px;"></ul><ul class="no_data_section_ul1 font-B">추가된 모듈이 없습니다.</ul><ul class="no_data_section_ul2">모듈추가 버튼을 클릭해주세요.<br>모듈은 계속 추가할 수 있습니다.</ul></div>';
|
||||
}
|
||||
$output .= '<div class="add_module_wrap adm_co_gap_pc_' . $rb_core['gap_pc'] . '"><button type="button" class="add_module_btns font-B" onclick="set_module_send(this);">모듈추가</button></div>';
|
||||
}
|
||||
|
||||
$output .= "<?php\nreturn ob_get_clean();\n?>";
|
||||
|
||||
|
||||
if ($use_cache) {
|
||||
$cache_dir = dirname($cache_file);
|
||||
if(!is_dir($cache_dir)){
|
||||
@mkdir($cache_dir, 0777, true);
|
||||
@chmod($cache_dir,0755);
|
||||
}
|
||||
file_put_contents($cache_file, $output);
|
||||
file_put_contents($hash_file, $layout_checksum);
|
||||
}
|
||||
|
||||
try {
|
||||
ob_start();
|
||||
$eval_result = eval('?>' . $output);
|
||||
$eval_output = ob_get_clean();
|
||||
|
||||
if ($eval_output) {
|
||||
throw new Exception("eval() 실행 중 예기치 않은 출력이 발생했습니다: " . $eval_output);
|
||||
}
|
||||
|
||||
$result_data[$layout_no] = $eval_result;
|
||||
|
||||
} catch (ParseError $e) {
|
||||
$errors[] = "레이아웃 #{$layout_no} 처리 중 구문 오류가 발생했습니다: " . $e->getMessage();
|
||||
if ($is_admin) {
|
||||
$errors[] = "--- 생성된 코드 (일부) ---\n" . htmlspecialchars(substr($output, 0, 500)) . "...";
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
$errors[] = "레이아웃 #{$layout_no} 처리 중 오류가 발생했습니다: " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
if (!empty($errors)) {
|
||||
http_response_code(500);
|
||||
echo json_encode(['success' => false, 'message' => "레이아웃 데이터 처리 중 서버 오류가 발생했습니다.", 'errors' => $errors]);
|
||||
} else {
|
||||
echo json_encode($result_data);
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
include_once(G5_LIB_PATH.'/latest.lib.php');
|
||||
include_once(G5_LIB_PATH.'/poll.lib.php');
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$layouts = array();
|
||||
if (isset($_POST['layouts']) && is_array($_POST['layouts'])) {
|
||||
$layouts = $_POST['layouts'];
|
||||
}
|
||||
|
||||
$layout_name = '';
|
||||
if (isset($rb_core['layout_shop'])) {
|
||||
$layout_name = $rb_core['layout_shop'];
|
||||
}
|
||||
|
||||
$theme_name = '';
|
||||
if (isset($rb_core['theme'])) {
|
||||
$theme_name = $rb_core['theme'];
|
||||
}
|
||||
|
||||
$result_data = array();
|
||||
|
||||
foreach ($layouts as $layout_no) {
|
||||
$cache_file = G5_DATA_PATH . "/cache/rb_layout_shop_" . $layout_no . ".php";
|
||||
$hash_file = G5_DATA_PATH . "/cache/rb_layout_shop_" . $layout_no . ".hash";
|
||||
|
||||
// 체크섬 생성
|
||||
$layout_sql = "SELECT * FROM rb_module_shop WHERE md_layout = '" . $layout_no . "' AND md_theme = '" . $theme_name . "' AND md_layout_name = '" . $layout_name . "' ORDER BY md_order_id, md_id ASC";
|
||||
$layout_rows = sql_query($layout_sql);
|
||||
$layout_structure = '';
|
||||
while ($row = sql_fetch_array($layout_rows)) {
|
||||
$layout_structure .= implode('|', $row) . ';';
|
||||
}
|
||||
$layout_checksum = md5($layout_structure);
|
||||
|
||||
$use_cache = !$is_admin;
|
||||
|
||||
// 캐시 사용 조건 확인
|
||||
if ($use_cache && file_exists($cache_file) && file_exists($hash_file)) {
|
||||
$saved_checksum = file_get_contents($hash_file);
|
||||
if ($saved_checksum === $layout_checksum) {
|
||||
$result_data[$layout_no] = include $cache_file;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM rb_module_shop WHERE md_layout = '" . $layout_no . "' AND md_theme = '" . $theme_name . "' AND md_layout_name = '" . $layout_name . "' ORDER BY md_order_id, md_id ASC";
|
||||
$result = sql_query($sql);
|
||||
$sql_cnts = sql_fetch("SELECT COUNT(*) as cnt FROM rb_module_shop WHERE md_layout = '" . $layout_no . "' AND md_theme = '" . $theme_name . "' AND md_layout_name = '" . $layout_name . "'");
|
||||
$rb_module_table = "rb_module_shop";
|
||||
|
||||
$output = "<?php\nob_start();\n\n\$rb_module_table = 'rb_module_shop';\n\$GLOBALS['rb_module_table'] = \$rb_module_table;\n\$is_admin = " . var_export($is_admin, true) . ";\n?>\n";
|
||||
|
||||
while ($row_mod = sql_fetch_array($result)) {
|
||||
ob_start();
|
||||
echo "<?php\n\$row_mod = " . var_export($row_mod, true) . ";\n?>\n";
|
||||
?>
|
||||
|
||||
<div
|
||||
class="rb_layout_box <?php echo isset($row_mod['md_show']) ? $row_mod['md_show'] : ''; ?>"
|
||||
style="width:<?php echo $row_mod['md_width']; ?><?php echo !empty($row_mod['md_size']) ? $row_mod['md_size'] : '%'; ?>; height:<?php echo $row_mod['md_height']; ?>;
|
||||
margin-top:<?php
|
||||
echo IS_MOBILE()
|
||||
? (!empty($row_mod['md_margin_top_mo']) ? $row_mod['md_margin_top_mo'] : '0')
|
||||
: (!empty($row_mod['md_margin_top_pc']) ? $row_mod['md_margin_top_pc'] : '0');
|
||||
?>px;
|
||||
margin-bottom:<?php
|
||||
echo IS_MOBILE()
|
||||
? (!empty($row_mod['md_margin_btm_mo']) ? $row_mod['md_margin_btm_mo'] : '0')
|
||||
: (!empty($row_mod['md_margin_btm_pc']) ? $row_mod['md_margin_btm_pc'] : '0');
|
||||
?>px;"
|
||||
data-order-id="<?php echo $row_mod['md_id']; ?>"
|
||||
data-id="<?php echo $row_mod['md_id']; ?>"
|
||||
data-layout="<?php echo $row_mod['md_layout']; ?>"
|
||||
data-title="<?php echo $row_mod['md_title']; ?>"
|
||||
>
|
||||
|
||||
<ul class="content_box rb_module_shop_<?php echo $row_mod['md_id']; ?> rb_module_border_<?php echo $row_mod['md_border']; ?> rb_module_radius_<?php echo $row_mod['md_radius']; ?><?php if (isset($row_mod['md_padding']) && $row_mod['md_padding'] > 0) { ?> rb_module_padding_<?php echo $row_mod['md_padding']; ?><?php } ?> <?php echo isset($row_mod['md_show']) ? $row_mod['md_show'] : ''; ?>" >
|
||||
|
||||
<?php if (isset($row_mod['md_type']) && $row_mod['md_type'] == 'latest') { ?>
|
||||
<div class="module_latest_wrap">
|
||||
<?php echo '<?php echo rb_latest("' . $row_mod['md_skin'] . '", "' . $row_mod['md_bo_table'] . '", ' . $row_mod['md_cnt'] . ', 999, 1, ' . $row_mod['md_id'] . ', "' . $row_mod['md_sca'] . '", "' . $row_mod['md_order_latest'] . '", "' . $rb_module_table . '", "' . $row_mod['md_notice'] . '"); ?>'; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($row_mod['md_type']) && $row_mod['md_type'] == 'tab') { ?>
|
||||
<div class="module_latest_wrap">
|
||||
<?php
|
||||
$tab_list_clean = addslashes($row_mod['md_tab_list']);
|
||||
|
||||
$tab_code = '<?php echo rb_latest_tabs("' . $row_mod['md_tab_skin'] . '", "' . $tab_list_clean . '", ' . intval($row_mod['md_cnt']) . ', 999, 1, "' . $row_mod['md_id'] . '", "' . $row_mod['md_order_latest'] . '", "' . $rb_module_table . '", "' . $row_mod['md_notice'] . '"); ?>';
|
||||
echo $tab_code;
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($row_mod['md_type']) && $row_mod['md_type'] == 'widget') { ?>
|
||||
<div class="module_widget_wrap">
|
||||
<?php echo '<?php @include (G5_PATH . "/rb/' . $row_mod['md_widget'] . '/widget.php"); ?>'; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($row_mod['md_type']) && $row_mod['md_type'] == 'banner') { ?>
|
||||
<div class="module_banner_wrap">
|
||||
<?php echo '<?php echo rb_banners("' . $row_mod['md_banner'] . '", "' . $row_mod['md_banner_id'] . '", "' . $row_mod['md_banner_skin'] . '"); ?>'; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($row_mod['md_type']) && $row_mod['md_type'] == 'poll') { ?>
|
||||
<div class="module_poll_wrap">
|
||||
<?php echo '<?php echo poll("' . $row_mod['md_poll'] . '", "' . $row_mod['md_poll_id'] . '"); ?>'; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if(isset($row_mod['md_type']) && $row_mod['md_type'] == "item") { ?>
|
||||
<?php
|
||||
// item 관련 SQL문 및 변수들을 동적으로 생성하도록 PHP 코드로 기록합니다.
|
||||
$code = "\n<?php\n";
|
||||
$code .= "\$item_where = \" where it_use = '1' and it_stock_qty > 0 and it_soldout = 0\";\n";
|
||||
$code .= "if(isset(\$row_mod['md_module']) && \$row_mod['md_module'] > 0) {\n";
|
||||
$code .= " \$item_where .= \" and it_type\".\$row_mod['md_module'].\" = '1' \";\n";
|
||||
$code .= "}\n";
|
||||
$code .= "if(isset(\$row_mod['md_sca']) && \$row_mod['md_sca']) {\n";
|
||||
$code .= " \$item_where .= \" AND (ca_id = '\".\$row_mod['md_sca'].\"' OR ca_id LIKE '\".\$row_mod['md_sca'].\"%') \";\n";
|
||||
$code .= "}\n";
|
||||
$code .= "if(isset(\$row_mod['md_order']) && \$row_mod['md_order']) {\n";
|
||||
$code .= " \$item_order = \" order by \" . \$row_mod['md_order'];\n";
|
||||
$code .= "} else { \n";
|
||||
$code .= " \$item_order = \" order by it_id desc\";\n";
|
||||
$code .= "}\n";
|
||||
$code .= "\$item_limit = \" limit \" . \$row_mod['md_cnt'];\n";
|
||||
$code .= "\$item_sql = \" select * from {\$g5['g5_shop_item_table']} \" . \$item_where . \" \" . \$item_order . \" \" . \$item_limit;\n";
|
||||
?>
|
||||
<div class="module_item_wrap">
|
||||
<?php
|
||||
$code .= "\$list = new item_list();\n";
|
||||
$code .= "\$list->set_img_size(300, 300);\n";
|
||||
$code .= "\$list->set_list_skin(G5_SHOP_SKIN_PATH.'/'.\$row_mod['md_skin']);\n";
|
||||
$code .= "\$list->set_view('it_cust_price', true);\n";
|
||||
$code .= "\$list->set_view('it_price', true);\n";
|
||||
$code .= "\$list->set_view('sns', true);\n";
|
||||
$code .= "\$list->set_view('md_table', \$rb_module_table);\n";
|
||||
$code .= "\$list->set_view('md_id', \$row_mod['md_id']);\n";
|
||||
$code .= "\$list->set_query(\$item_sql);\n";
|
||||
$code .= "echo \$list->run();\n";
|
||||
$code .= "?>\n";
|
||||
echo $code;
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ($is_admin) { ?>
|
||||
<span class="admin_ov">
|
||||
<div class="mod_edit">
|
||||
<ul class="middle_y text-center">
|
||||
<h2 class="font-B"><?php echo isset($row_mod['md_title']) ? $row_mod['md_title'] : ''; ?> <span>모듈 설정</span></h2>
|
||||
<h6 class="font-R">해당 모듈의 설정을 변경할 수 있습니다.</h6>
|
||||
<button type="button" class="btn_round btn_round_bg admin_set_btn" onclick="set_module_send(this);">설정</button>
|
||||
<button type="button" class="btn_round admin_set_btn" onclick="set_module_del(this);">삭제</button>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
<div class="flex_box_inner flex_box" data-layout="<?php echo $row_mod['md_layout']; ?>-<?php echo $row_mod['md_id']; ?>"></div>
|
||||
</div>
|
||||
<?php
|
||||
$output .= ob_get_clean();
|
||||
}
|
||||
|
||||
if ($is_admin) {
|
||||
if (!isset($sql_cnts['cnt']) || !$sql_cnts['cnt']) {
|
||||
$output .= '<div class="no_data_section add_module_wrap"><ul><img src="'.G5_THEME_URL.'/rb.img/icon/icon_error.svg" style="width:50px;"></ul><ul class="no_data_section_ul1 font-B">추가된 모듈이 없습니다.</ul><ul class="no_data_section_ul2">모듈추가 버튼을 클릭해주세요.<br>모듈은 계속 추가할 수 있습니다.</ul></div>';
|
||||
}
|
||||
$output .= '<div class="add_module_wrap adm_co_gap_pc_' . $rb_core['gap_pc'] . '"><button type="button" class="add_module_btns font-B" onclick="set_module_send(this);">모듈추가</button></div>';
|
||||
}
|
||||
|
||||
$output .= "<?php\nreturn ob_get_clean();\n?>";
|
||||
|
||||
if ($use_cache) {
|
||||
file_put_contents($cache_file, $output);
|
||||
file_put_contents($hash_file, $layout_checksum);
|
||||
}
|
||||
|
||||
$result_data[$layout_no] = eval('?>' . $output);
|
||||
}
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
echo json_encode($result_data);
|
||||
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$md_id = isset($_POST['md_id']) ? $_POST['md_id'] : '';
|
||||
$md_title = isset($_POST['md_title']) ? $_POST['md_title'] : '';
|
||||
$md_title_color = isset($_POST['md_title_color']) ? $_POST['md_title_color'] : '#25282b';
|
||||
$md_title_size = isset($_POST['md_title_size']) ? $_POST['md_title_size'] : '20';
|
||||
$md_title_font = isset($_POST['md_title_font']) ? $_POST['md_title_font'] : 'font-B';
|
||||
$md_title_hide = isset($_POST['md_title_hide']) ? $_POST['md_title_hide'] : '0';
|
||||
$md_layout = isset($_POST['md_layout']) ? $_POST['md_layout'] : '';
|
||||
$md_skin = isset($_POST['md_skin']) ? $_POST['md_skin'] : '';
|
||||
$md_tab_list = isset($_POST['md_tab_list']) ? $_POST['md_tab_list'] : '';
|
||||
$md_tab_skin = isset($_POST['md_tab_skin']) ? $_POST['md_tab_skin'] : '';
|
||||
$md_custom_skin = isset($_POST['md_custom_skin']) ? $_POST['md_custom_skin'] : '';
|
||||
$md_type = isset($_POST['md_type']) ? $_POST['md_type'] : '';
|
||||
$md_bo_table = isset($_POST['md_bo_table']) ? $_POST['md_bo_table'] : '';
|
||||
$md_sca = isset($_POST['md_sca']) ? $_POST['md_sca'] : '';
|
||||
$md_widget = isset($_POST['md_widget']) ? $_POST['md_widget'] : '';
|
||||
$md_banner = isset($_POST['md_banner']) ? $_POST['md_banner'] : '';
|
||||
$md_banner_id = isset($_POST['md_banner_id']) ? $_POST['md_banner_id'] : '';
|
||||
$md_banner_bg = isset($_POST['md_banner_bg']) ? $_POST['md_banner_bg'] : '';
|
||||
$md_banner_skin = isset($_POST['md_banner_skin']) ? $_POST['md_banner_skin'] : '';
|
||||
$md_poll = isset($_POST['md_poll']) ? $_POST['md_poll'] : '';
|
||||
$md_poll_id = isset($_POST['md_poll_id']) ? $_POST['md_poll_id'] : '';
|
||||
$md_theme = isset($_POST['md_theme']) ? $_POST['md_theme'] : '';
|
||||
$md_layout_name = isset($_POST['md_layout_name']) ? $_POST['md_layout_name'] : '';
|
||||
$md_cnt = isset($_POST['md_cnt']) ? $_POST['md_cnt'] : '1';
|
||||
$md_notice = isset($_POST['md_notice']) ? $_POST['md_notice'] : '0';
|
||||
$md_col = isset($_POST['md_col']) ? $_POST['md_col'] : '1';
|
||||
$md_row = isset($_POST['md_row']) ? $_POST['md_row'] : '1';
|
||||
$md_col_mo = isset($_POST['md_col_mo']) ? $_POST['md_col_mo'] : '1';
|
||||
$md_row_mo = isset($_POST['md_row_mo']) ? $_POST['md_row_mo'] : '1';
|
||||
$md_width = isset($_POST['md_width']) ? $_POST['md_width'] : '100%';
|
||||
$md_height = isset($_POST['md_height']) ? $_POST['md_height'] : '';
|
||||
$md_show = isset($_POST['md_show']) ? $_POST['md_show'] : '';
|
||||
$md_size = isset($_POST['md_size']) ? $_POST['md_size'] : '%';
|
||||
$md_subject_is = isset($_POST['md_subject_is']) ? $_POST['md_subject_is'] : '';
|
||||
$md_thumb_is = isset($_POST['md_thumb_is']) ? $_POST['md_thumb_is'] : '';
|
||||
$md_nick_is = isset($_POST['md_nick_is']) ? $_POST['md_nick_is'] : '';
|
||||
$md_date_is = isset($_POST['md_date_is']) ? $_POST['md_date_is'] : '';
|
||||
$md_comment_is = isset($_POST['md_comment_is']) ? $_POST['md_comment_is'] : '';
|
||||
$md_content_is = isset($_POST['md_content_is']) ? $_POST['md_content_is'] : '';
|
||||
$md_icon_is = isset($_POST['md_icon_is']) ? $_POST['md_icon_is'] : '';
|
||||
$md_ca_is = isset($_POST['md_ca_is']) ? $_POST['md_ca_is'] : '';
|
||||
$md_gap = isset($_POST['md_gap']) ? $_POST['md_gap'] : '40';
|
||||
$md_gap_mo = isset($_POST['md_gap_mo']) ? $_POST['md_gap_mo'] : '20';
|
||||
$md_swiper_is = isset($_POST['md_swiper_is']) ? $_POST['md_swiper_is'] : '';
|
||||
$md_auto_is = isset($_POST['md_auto_is']) ? $_POST['md_auto_is'] : '';
|
||||
$md_auto_time = isset($_POST['md_auto_time']) ? $_POST['md_auto_time'] : '';
|
||||
$md_module = isset($_POST['md_module']) ? $_POST['md_module'] : '';
|
||||
$md_order = isset($_POST['md_order']) ? $_POST['md_order'] : '';
|
||||
$md_order_latest = isset($_POST['md_order_latest']) ? $_POST['md_order_latest'] : '';
|
||||
$md_border = isset($_POST['md_border']) ? $_POST['md_border'] : '';
|
||||
$md_radius = isset($_POST['md_radius']) ? $_POST['md_radius'] : '0';
|
||||
$md_padding = isset($_POST['md_padding']) ? $_POST['md_padding'] : '0';
|
||||
$md_margin_top_pc = isset($_POST['md_margin_top_pc']) ? $_POST['md_margin_top_pc'] : '';
|
||||
$md_margin_top_mo = isset($_POST['md_margin_top_mo']) ? $_POST['md_margin_top_mo'] : '';
|
||||
$md_margin_btm_pc = isset($_POST['md_margin_btm_pc']) ? $_POST['md_margin_btm_pc'] : '';
|
||||
$md_margin_btm_mo = isset($_POST['md_margin_btm_mo']) ? $_POST['md_margin_btm_mo'] : '';
|
||||
$del = isset($_POST['del']) ? $_POST['del'] : '';
|
||||
$is_shop = isset($_POST['is_shop']) ? $_POST['is_shop'] : '';
|
||||
$md_custom_survey_key = isset($_POST['md_custom_survey_key']) ? $_POST['md_custom_survey_key'] :'';
|
||||
|
||||
if(isset($is_shop) && $is_shop == 1) {
|
||||
$rb_module_tables = "rb_module_shop";
|
||||
} else {
|
||||
$rb_module_tables = "rb_module";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
if(isset($del) && $del == "true") {
|
||||
|
||||
if($is_admin) {
|
||||
$sql = " delete from {$rb_module_tables} where md_id = '{$md_id}' and md_layout = '{$md_layout}' and md_theme = '{$md_theme}' and md_layout_name = '{$md_layout_name}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
$data = array(
|
||||
'status' => 'ok',
|
||||
);
|
||||
echo json_encode($data);
|
||||
|
||||
|
||||
} else {
|
||||
if(isset($md_id) && $md_id == "new") {
|
||||
|
||||
// rb_module 테이블에 md_sca 컬럼이 있는지 검사
|
||||
$checkColumnQuery = "SHOW COLUMNS FROM `rb_module` LIKE 'md_sca'";
|
||||
$result = sql_query($checkColumnQuery);
|
||||
|
||||
if (sql_num_rows($result) == 0) {
|
||||
// md_sca 컬럼이 없으면 추가
|
||||
$addColumnQuery = "ALTER TABLE {$rb_module_tables} ADD `md_sca` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `md_bo_table`";
|
||||
sql_query($addColumnQuery);
|
||||
}
|
||||
|
||||
// rb_module 테이블에 md_order_id 컬럼이 있는지 검사
|
||||
$checkColumnQuery2 = "SHOW COLUMNS FROM {$rb_module_tables} LIKE 'md_order_id'";
|
||||
$result2 = sql_query($checkColumnQuery2);
|
||||
|
||||
if (sql_num_rows($result2) == 0) {
|
||||
// md_order_id 컬럼이 없으면 추가
|
||||
$addColumnQuery2 = "ALTER TABLE {$rb_module_tables} ADD `md_order_id` INT(4) COLLATE 'utf8_general_ci' NOT NULL AFTER `md_ip`";
|
||||
sql_query($addColumnQuery2);
|
||||
}
|
||||
|
||||
|
||||
if($is_admin) {
|
||||
|
||||
//컬럼의 가장 큰 숫자를 얻는다
|
||||
$mod_num = sql_fetch( " SELECT MAX(md_order_id) AS max_value FROM {$rb_module_tables} " );
|
||||
$md_order_id = isset($mod_num['max_value']) ? $mod_num['max_value'] + 1 : '0';
|
||||
|
||||
$sql = " insert {$rb_module_tables} set
|
||||
md_title = '{$md_title}',
|
||||
md_title_color = '{$md_title_color}',
|
||||
md_title_size = '{$md_title_size}',
|
||||
md_title_font = '{$md_title_font}',
|
||||
md_title_hide = '{$md_title_hide}',
|
||||
md_layout = '{$md_layout}',
|
||||
md_skin = '{$md_skin}',
|
||||
md_tab_skin = '{$md_tab_skin}',
|
||||
md_tab_list = '{$md_tab_list}',
|
||||
md_type = '{$md_type}',
|
||||
md_bo_table = '{$md_bo_table}',
|
||||
md_sca = '{$md_sca}',
|
||||
md_widget = '{$md_widget}',
|
||||
md_banner = '{$md_banner}',
|
||||
md_banner_id = '{$md_banner_id}',
|
||||
md_banner_bg = '{$md_banner_bg}',
|
||||
md_banner_skin = '{$md_banner_skin}',
|
||||
md_poll = '{$md_poll}',
|
||||
md_poll_id = '{$md_poll_id}',
|
||||
md_custom_skin = '{$md_custom_skin}',
|
||||
md_theme = '{$md_theme}',
|
||||
md_layout_name = '{$md_layout_name}',
|
||||
md_cnt = '{$md_cnt}',
|
||||
md_notice = '{$md_notice}',
|
||||
md_col = '{$md_col}',
|
||||
md_row = '{$md_row}',
|
||||
md_col_mo = '{$md_col_mo}',
|
||||
md_row_mo = '{$md_row_mo}',
|
||||
md_width = '{$md_width}',
|
||||
md_height = '{$md_height}',
|
||||
md_show = '{$md_show}',
|
||||
md_size = '{$md_size}',
|
||||
md_subject_is = '{$md_subject_is}',
|
||||
md_thumb_is = '{$md_thumb_is}',
|
||||
md_nick_is = '{$md_nick_is}',
|
||||
md_date_is = '{$md_date_is}',
|
||||
md_comment_is = '{$md_comment_is}',
|
||||
md_content_is = '{$md_content_is}',
|
||||
md_icon_is = '{$md_icon_is}',
|
||||
md_ca_is = '{$md_ca_is}',
|
||||
md_gap = '{$md_gap}',
|
||||
md_gap_mo = '{$md_gap_mo}',
|
||||
md_swiper_is = '{$md_swiper_is}',
|
||||
md_auto_is = '{$md_auto_is}',
|
||||
md_auto_time = '{$md_auto_time}',
|
||||
md_module = '{$md_module}',
|
||||
md_order = '{$md_order}',
|
||||
md_order_latest = '{$md_order_latest}',
|
||||
md_border = '{$md_border}',
|
||||
md_radius = '{$md_radius}',
|
||||
md_padding = '{$md_padding}',
|
||||
md_margin_top_pc = '{$md_margin_top_pc}',
|
||||
md_margin_top_mo = '{$md_margin_top_mo}',
|
||||
md_margin_btm_pc = '{$md_margin_btm_pc}',
|
||||
md_margin_btm_mo = '{$md_margin_btm_mo}',
|
||||
md_datetime = '".G5_TIME_YMDHIS."',
|
||||
md_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||
md_order_id = '{$md_order_id}',
|
||||
md_custom_survey_key = '{$md_custom_survey_key}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'md_title' => $md_title,
|
||||
'status' => 'ok',
|
||||
);
|
||||
echo json_encode($data);
|
||||
|
||||
} else {
|
||||
|
||||
if($is_admin) {
|
||||
$sql = " update {$rb_module_tables}
|
||||
set md_title = '{$md_title}',
|
||||
md_title_color = '{$md_title_color}',
|
||||
md_title_size = '{$md_title_size}',
|
||||
md_title_font = '{$md_title_font}',
|
||||
md_title_hide = '{$md_title_hide}',
|
||||
md_layout = '{$md_layout}',
|
||||
md_skin = '{$md_skin}',
|
||||
md_tab_skin = '{$md_tab_skin}',
|
||||
md_tab_list = '{$md_tab_list}',
|
||||
md_type = '{$md_type}',
|
||||
md_bo_table = '{$md_bo_table}',
|
||||
md_sca = '{$md_sca}',
|
||||
md_widget = '{$md_widget}',
|
||||
md_banner = '{$md_banner}',
|
||||
md_banner_id = '{$md_banner_id}',
|
||||
md_banner_bg = '{$md_banner_bg}',
|
||||
md_banner_skin = '{$md_banner_skin}',
|
||||
md_poll = '{$md_poll}',
|
||||
md_poll_id = '{$md_poll_id}',
|
||||
md_custom_skin = '{$md_custom_skin}',
|
||||
md_theme = '{$md_theme}',
|
||||
md_layout_name = '{$md_layout_name}',
|
||||
md_cnt = '{$md_cnt}',
|
||||
md_notice = '{$md_notice}',
|
||||
md_col = '{$md_col}',
|
||||
md_row = '{$md_row}',
|
||||
md_col_mo = '{$md_col_mo}',
|
||||
md_row_mo = '{$md_row_mo}',
|
||||
md_width = '{$md_width}',
|
||||
md_height = '{$md_height}',
|
||||
md_show = '{$md_show}',
|
||||
md_size = '{$md_size}',
|
||||
md_subject_is = '{$md_subject_is}',
|
||||
md_thumb_is = '{$md_thumb_is}',
|
||||
md_nick_is = '{$md_nick_is}',
|
||||
md_date_is = '{$md_date_is}',
|
||||
md_comment_is = '{$md_comment_is}',
|
||||
md_content_is = '{$md_content_is}',
|
||||
md_icon_is = '{$md_icon_is}',
|
||||
md_ca_is = '{$md_ca_is}',
|
||||
md_gap = '{$md_gap}',
|
||||
md_gap_mo = '{$md_gap_mo}',
|
||||
md_swiper_is = '{$md_swiper_is}',
|
||||
md_auto_is = '{$md_auto_is}',
|
||||
md_auto_time = '{$md_auto_time}',
|
||||
md_module = '{$md_module}',
|
||||
md_order = '{$md_order}',
|
||||
md_order_latest = '{$md_order_latest}',
|
||||
md_border = '{$md_border}',
|
||||
md_radius = '{$md_radius}',
|
||||
md_padding = '{$md_padding}',
|
||||
md_margin_top_pc = '{$md_margin_top_pc}',
|
||||
md_margin_top_mo = '{$md_margin_top_mo}',
|
||||
md_margin_btm_pc = '{$md_margin_btm_pc}',
|
||||
md_margin_btm_mo = '{$md_margin_btm_mo}',
|
||||
md_datetime = '".G5_TIME_YMDHIS."',
|
||||
md_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||
md_custom_survey_key = '{$md_custom_survey_key}'
|
||||
where md_id = '{$md_id}'";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'md_title' => $md_title,
|
||||
'status' => 'ok',
|
||||
);
|
||||
echo json_encode($data);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$mod_type = !empty($_POST['mod_type']) ? $_POST['mod_type'] : '';
|
||||
$v_code = isset($_POST['v_code']) ? trim($_POST['v_code']) : '';
|
||||
|
||||
// 조건: shop-list- 로 시작하고 ca_id가 붙은 구조일 때만 처리
|
||||
if (preg_match('/^shop-list-(\d+)$/', $v_code, $matches)) {
|
||||
$ca_id = $matches[1];
|
||||
// 2자리씩 하이픈 삽입
|
||||
$formatted_ca_id = implode('-', str_split($ca_id, 2));
|
||||
$v_code = 'shop-list-' . $formatted_ca_id;
|
||||
}
|
||||
|
||||
if (!$v_code) exit('페이지 코드가 없습니다.');
|
||||
|
||||
if(isset($mod_type) && $mod_type == 1) {
|
||||
|
||||
$co_topvisual_height = !empty($_POST['co_topvisual_height']) ? $_POST['co_topvisual_height'] : '200';
|
||||
$co_topvisual_width = !empty($_POST['co_topvisual_width']) ? $_POST['co_topvisual_width'] : '';
|
||||
$co_topvisual_bl = isset($_POST['co_topvisual_bl']) ? $_POST['co_topvisual_bl'] : '10';
|
||||
$co_topvisual_border = isset($_POST['co_topvisual_border']) ? $_POST['co_topvisual_border'] : '0';
|
||||
$co_topvisual_radius = isset($_POST['co_topvisual_radius']) ? $_POST['co_topvisual_radius'] : '0';
|
||||
$co_topvisual_m_color = !empty($_POST['co_topvisual_m_color']) ? $_POST['co_topvisual_m_color'] : '#ffffff';
|
||||
$co_topvisual_m_size = !empty($_POST['co_topvisual_m_size']) ? $_POST['co_topvisual_m_size'] : '20';
|
||||
$co_topvisual_m_font = !empty($_POST['co_topvisual_m_font']) ? $_POST['co_topvisual_m_font'] : 'font-B';
|
||||
$co_topvisual_m_align = !empty($_POST['co_topvisual_m_align']) ? $_POST['co_topvisual_m_align'] : 'left';
|
||||
$co_topvisual_s_color = !empty($_POST['co_topvisual_s_color']) ? $_POST['co_topvisual_s_color'] : '#ffffff';
|
||||
$co_topvisual_s_size = !empty($_POST['co_topvisual_s_size']) ? $_POST['co_topvisual_s_size'] : '16';
|
||||
$co_topvisual_s_font = !empty($_POST['co_topvisual_s_font']) ? $_POST['co_topvisual_s_font'] : 'font-R';
|
||||
$co_topvisual_s_align = !empty($_POST['co_topvisual_s_align']) ? $_POST['co_topvisual_s_align'] : 'left';
|
||||
$co_topvisual_bg_color = !empty($_POST['co_topvisual_bg_color']) ? $_POST['co_topvisual_bg_color'] : '#f9f9f9';
|
||||
$co_topvisual_style_all = !empty($_POST['co_topvisual_style_all']) ? $_POST['co_topvisual_style_all'] : '0';
|
||||
$v_time = G5_TIME_YMDHIS;
|
||||
|
||||
} else {
|
||||
$v_use = isset($_POST['v_use']) ? intval($_POST['v_use']) : 0;
|
||||
$v_url = isset($_POST['v_url']) ? trim($_POST['v_url']) : '';
|
||||
$v_time = G5_TIME_YMDHIS;
|
||||
}
|
||||
|
||||
$table = "rb_topvisual";
|
||||
$row = sql_fetch("SELECT COUNT(*) as cnt FROM {$table} WHERE v_code = '{$v_code}'");
|
||||
|
||||
if(isset($mod_type) && $mod_type == 1) {
|
||||
|
||||
if ($row['cnt'] > 0) {
|
||||
// 현재 노드 업데이트
|
||||
sql_query("UPDATE {$table} SET
|
||||
co_topvisual_height = '{$co_topvisual_height}',
|
||||
co_topvisual_width = '{$co_topvisual_width}',
|
||||
co_topvisual_bl = '{$co_topvisual_bl}',
|
||||
co_topvisual_border = '{$co_topvisual_border}',
|
||||
co_topvisual_radius = '{$co_topvisual_radius}',
|
||||
co_topvisual_m_color = '{$co_topvisual_m_color}',
|
||||
co_topvisual_m_size = '{$co_topvisual_m_size}',
|
||||
co_topvisual_m_font = '{$co_topvisual_m_font}',
|
||||
co_topvisual_m_align = '{$co_topvisual_m_align}',
|
||||
co_topvisual_s_color = '{$co_topvisual_s_color}',
|
||||
co_topvisual_s_size = '{$co_topvisual_s_size}',
|
||||
co_topvisual_s_font = '{$co_topvisual_s_font}',
|
||||
co_topvisual_s_align = '{$co_topvisual_s_align}',
|
||||
co_topvisual_bg_color = '{$co_topvisual_bg_color}',
|
||||
co_topvisual_style_all = '{$co_topvisual_style_all}',
|
||||
v_time = '{$v_time}'
|
||||
WHERE v_code = '{$v_code}'");
|
||||
|
||||
// co_topvisual_style_all = 1 이면 하위 노드도 동일하게 스타일 동기화
|
||||
if ($co_topvisual_style_all == 1) {
|
||||
sql_query("UPDATE {$table} SET
|
||||
co_topvisual_height = '{$co_topvisual_height}',
|
||||
co_topvisual_width = '{$co_topvisual_width}',
|
||||
co_topvisual_bl = '{$co_topvisual_bl}',
|
||||
co_topvisual_border = '{$co_topvisual_border}',
|
||||
co_topvisual_radius = '{$co_topvisual_radius}',
|
||||
co_topvisual_m_color = '{$co_topvisual_m_color}',
|
||||
co_topvisual_m_size = '{$co_topvisual_m_size}',
|
||||
co_topvisual_m_font = '{$co_topvisual_m_font}',
|
||||
co_topvisual_m_align = '{$co_topvisual_m_align}',
|
||||
co_topvisual_s_color = '{$co_topvisual_s_color}',
|
||||
co_topvisual_s_size = '{$co_topvisual_s_size}',
|
||||
co_topvisual_s_font = '{$co_topvisual_s_font}',
|
||||
co_topvisual_s_align = '{$co_topvisual_s_align}',
|
||||
co_topvisual_bg_color = '{$co_topvisual_bg_color}'
|
||||
WHERE v_code LIKE '{$v_code}-%'");
|
||||
}
|
||||
|
||||
// 응답
|
||||
$data = array(
|
||||
'co_topvisual_height' => $co_topvisual_height,
|
||||
'co_topvisual_width' => $co_topvisual_width,
|
||||
'co_topvisual_bl' => $co_topvisual_bl,
|
||||
'co_topvisual_border' => $co_topvisual_border,
|
||||
'co_topvisual_radius' => $co_topvisual_radius,
|
||||
'co_topvisual_m_color' => $co_topvisual_m_color,
|
||||
'co_topvisual_m_size' => $co_topvisual_m_size,
|
||||
'co_topvisual_m_font' => $co_topvisual_m_font,
|
||||
'co_topvisual_m_align' => $co_topvisual_m_align,
|
||||
'co_topvisual_s_color' => $co_topvisual_s_color,
|
||||
'co_topvisual_s_size' => $co_topvisual_s_size,
|
||||
'co_topvisual_s_font' => $co_topvisual_s_font,
|
||||
'co_topvisual_s_align' => $co_topvisual_s_align,
|
||||
'co_topvisual_bg_color' => $co_topvisual_bg_color,
|
||||
'co_topvisual_style_all' => $co_topvisual_style_all,
|
||||
'status' => 'ok',
|
||||
);
|
||||
echo json_encode($data);
|
||||
|
||||
} else {
|
||||
// 새로 등록되는 경우에는 스타일 정보가 없으므로 생략 그대로 OK
|
||||
sql_query("INSERT INTO {$table} (v_code, v_name, v_url, v_use, v_time)
|
||||
VALUES ('{$v_code}', '', '{$v_url}', '{$v_use}', '{$v_time}')");
|
||||
|
||||
$data = array(
|
||||
'v_use' => $v_use,
|
||||
'status' => 'ok',
|
||||
);
|
||||
echo json_encode($data);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if ($row['cnt'] > 0) {
|
||||
// 기존 항목이 존재하면 업데이트
|
||||
sql_query("UPDATE {$table} SET
|
||||
v_use = '{$v_use}',
|
||||
v_url = '{$v_url}',
|
||||
v_time = '{$v_time}'
|
||||
WHERE v_code = '{$v_code}'");
|
||||
|
||||
} else {
|
||||
// 없으면 삽입
|
||||
sql_query("INSERT INTO {$table}
|
||||
(v_code, v_name, v_url, v_use, v_time)
|
||||
VALUES ('{$v_code}', '', '{$v_url}', '{$v_use}', '{$v_time}')");
|
||||
}
|
||||
|
||||
// 추가 로직: 관련된 v_code의 하위/전체 처리
|
||||
if ($v_use == 2) {
|
||||
sql_query("UPDATE {$table} SET v_use = 1 WHERE v_code LIKE '{$v_code}-%'");
|
||||
sql_query("UPDATE {$table} SET v_use = '{$v_use}', co_topvisual_all = 1 WHERE v_code = '{$v_code}'");
|
||||
|
||||
} else {
|
||||
sql_query("UPDATE {$table} SET v_use = 0 WHERE v_code LIKE '{$v_code}-%'");
|
||||
sql_query("UPDATE {$table} SET v_use = '{$v_use}', co_topvisual_all = 0 WHERE v_code = '{$v_code}'");
|
||||
|
||||
}
|
||||
|
||||
// 응답 반환
|
||||
$data = array(
|
||||
'v_use' => $v_use,
|
||||
'status' => 'ok',
|
||||
);
|
||||
echo json_encode($data);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
if (!$is_admin) {
|
||||
echo json_encode(['success' => false, 'error' => '권한이 없습니다.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$me_code = isset($_POST['me_code']) ? $_POST['me_code'] : '';
|
||||
$key = $me_code;
|
||||
|
||||
if (!$key) {
|
||||
echo json_encode(['success' => false, 'error' => '메뉴 정보가 없습니다. 관리자모드에서 메뉴를 추가해주세요.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$file = G5_DATA_PATH . '/topvisual/' . $key . '.jpg';
|
||||
|
||||
if (file_exists($file)) {
|
||||
@unlink($file);
|
||||
echo json_encode(['success' => true]);
|
||||
} else {
|
||||
echo json_encode(['success' => false, 'error' => '삭제할 파일이 없습니다.']);
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
// 관리자만 허용
|
||||
if (!$is_admin) {
|
||||
echo '권한이 없습니다.';
|
||||
exit;
|
||||
}
|
||||
|
||||
$me_code = isset($_POST['me_code']) ? $_POST['me_code'] : '';
|
||||
$key = $me_code;
|
||||
|
||||
if (!$key) {
|
||||
echo '메뉴 정보가 없습니다. 관리자모드에서 메뉴를 추가해주세요.';
|
||||
exit;
|
||||
}
|
||||
|
||||
// 워딩 입력값 정리
|
||||
$main = isset($_POST['main']) ? trim($_POST['main']) : '';
|
||||
$sub = isset($_POST['sub']) ? trim($_POST['sub']) : '';
|
||||
|
||||
$main_lines = preg_split('/\r\n|\r|\n/', $main);
|
||||
$sub_lines = preg_split('/\r\n|\r|\n/', $sub);
|
||||
|
||||
// 메인 워딩 정리
|
||||
$final_lines = [];
|
||||
foreach ($main_lines as $line) {
|
||||
$line = trim($line);
|
||||
if ($line !== '') $final_lines[] = $line;
|
||||
}
|
||||
|
||||
// 서브 워딩이 있는 경우 [SUB] 구분자 추가
|
||||
$sub_has_content = false;
|
||||
foreach ($sub_lines as $line) {
|
||||
if (trim($line) !== '') {
|
||||
$sub_has_content = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($sub_has_content) {
|
||||
$final_lines[] = '[SUB]';
|
||||
foreach ($sub_lines as $line) {
|
||||
$line = trim($line);
|
||||
if ($line !== '') $final_lines[] = $line;
|
||||
}
|
||||
}
|
||||
|
||||
// 저장 디렉토리
|
||||
$save_dir = G5_DATA_PATH . '/topvisual';
|
||||
@mkdir($save_dir, G5_DIR_PERMISSION, true);
|
||||
|
||||
// 파일 저장 (현재 노드용 .txt)
|
||||
$main_file = $save_dir . '/' . $key . '.txt';
|
||||
file_put_contents($main_file, implode("\n", $final_lines));
|
||||
|
||||
// ✅ 조건 체크: co_topvisual_style_all = 1 인 경우에만 하위에 복사
|
||||
$parent_info = sql_fetch("SELECT co_topvisual_style_all FROM rb_topvisual WHERE v_code = '{$me_code}'");
|
||||
if (isset($parent_info['co_topvisual_style_all']) && intval($parent_info['co_topvisual_style_all']) === 1) {
|
||||
$sub_nodes = sql_query("SELECT v_code FROM rb_topvisual WHERE v_code LIKE '{$me_code}-%'");
|
||||
while ($row = sql_fetch_array($sub_nodes)) {
|
||||
$sub_code = $row['v_code'];
|
||||
|
||||
// 하위 .txt 복사
|
||||
$sub_txt = $save_dir . '/' . $sub_code . '.txt';
|
||||
@copy($main_file, $sub_txt);
|
||||
|
||||
// 하위 .jpg 복사 (이미지가 있을 경우만)
|
||||
$source_jpg = $save_dir . '/' . $me_code . '.jpg';
|
||||
$target_jpg = $save_dir . '/' . $sub_code . '.jpg';
|
||||
|
||||
if (file_exists($source_jpg)) {
|
||||
@copy($source_jpg, $target_jpg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo '저장이 완료되었습니다.';
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
// 관리자만 허용
|
||||
if (!$is_admin) {
|
||||
echo json_encode(['success' => false, 'error' => '권한이 없습니다.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$me_code = isset($_POST['me_code']) ? $_POST['me_code'] : '';
|
||||
$key = $me_code;
|
||||
|
||||
if (!$key) {
|
||||
echo json_encode(['success' => false, 'error' => '메뉴 정보가 없습니다. 관리자모드에서 메뉴를 추가해주세요.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_FILES['image'])) {
|
||||
echo json_encode(['success' => false, 'error' => '파일이 잘못되었습니다.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$ext = strtolower(pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION));
|
||||
$allow = ['jpg', 'jpeg', 'png', 'webp', 'gif'];
|
||||
if (!in_array($ext, $allow)) {
|
||||
echo json_encode(['success' => false, 'error' => '지원되지 않는 형식 입니다.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$save_dir = G5_DATA_PATH . '/topvisual';
|
||||
@mkdir($save_dir, G5_DIR_PERMISSION, true);
|
||||
|
||||
// 저장 경로는 무조건 jpg
|
||||
$dest_path = $save_dir . '/' . $key . '.jpg';
|
||||
|
||||
// move_uploaded_file (보안 업로드)
|
||||
if (move_uploaded_file($_FILES['image']['tmp_name'], $dest_path)) {
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'url' => G5_DATA_URL . '/topvisual/' . $key . '.jpg'
|
||||
]);
|
||||
} else {
|
||||
echo json_encode(['success' => false, 'error' => '업로드에 오류가 있습니다.']);
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
include_once(G5_LIB_PATH.'/naver_syndi.lib.php');
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
|
||||
$return = ['res' => 'false', 'msg' => '오류', 'list' => []];
|
||||
|
||||
if (empty($_POST['act_type']) || empty($_POST['bo_table']) || empty($_POST['write_table'])) {
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
|
||||
$bo_table = preg_replace('/[^a-z0-9_]/i', '', $_POST['bo_table']);
|
||||
$write_table = preg_replace('/[^a-z0-9_]/i', '', $_POST['write_table']);
|
||||
$wr_id = isset($_POST['wr_id']) ? intval($_POST['wr_id']) : 0;
|
||||
|
||||
// 삭제 처리
|
||||
if ($_POST['act_type'] === 'delete') {
|
||||
if (empty($_POST['bf_file'])) {
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
$bf_file = basename($_POST['bf_file']);
|
||||
$file_path = G5_DATA_PATH . "/file/{$bo_table}/{$bf_file}";
|
||||
|
||||
if (is_file($file_path)) {
|
||||
@unlink($file_path);
|
||||
if (isset($config['cf_image_extension']) && preg_match("/\.({$config['cf_image_extension']})$/i", $bf_file)) {
|
||||
delete_board_thumbnail($bo_table, $bf_file);
|
||||
}
|
||||
}
|
||||
|
||||
sql_query("DELETE FROM {$g5['board_file_table']} WHERE bo_table = '" . sql_real_escape_string($bo_table) . "' AND wr_id = '{$wr_id}' AND bf_file = '" . sql_real_escape_string($bf_file) . "'");
|
||||
|
||||
$return['res'] = 'true';
|
||||
$return['msg'] = '파일이 삭제 되었습니다.';
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
|
||||
// 업로드 처리
|
||||
@mkdir(G5_DATA_PATH . "/file/{$bo_table}", G5_DIR_PERMISSION, true);
|
||||
@chmod(G5_DATA_PATH . "/file/{$bo_table}", G5_DIR_PERMISSION);
|
||||
|
||||
$allowed_extensions = explode('|', $config['cf_image_extension'] . '|' . $config['cf_movie_extension'] . '|webp|hwp|xlsx|xls|zip|pdf|ppt|pptx|docx|doc|txt');
|
||||
$allowed_mimes = [
|
||||
// 이미지
|
||||
'image/jpeg', 'image/png', 'image/gif', 'image/bmp', 'image/webp', 'image/svg+xml',
|
||||
|
||||
// 동영상
|
||||
'video/mp4', 'video/mpeg', 'video/ogg', 'video/webm', 'video/x-msvideo', 'video/quicktime', 'video/x-flv',
|
||||
|
||||
// 오디오
|
||||
'audio/mpeg', 'audio/wav', 'audio/ogg', 'audio/mp4', 'audio/webm', 'audio/x-ms-wma',
|
||||
|
||||
// 문서
|
||||
'application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||
'application/rtf', 'text/plain', 'application/vnd.hancom.hwp',
|
||||
|
||||
// 압축파일
|
||||
'application/zip', 'application/x-rar-compressed', 'application/x-7z-compressed', 'application/x-tar', 'application/gzip',
|
||||
|
||||
// 코드 및 기타
|
||||
'text/html', 'application/javascript', 'text/css', 'application/json', 'application/xml', 'text/csv',
|
||||
|
||||
// 기타 가능성 있는 MIME
|
||||
'application/octet-stream'
|
||||
];
|
||||
|
||||
function get_mime_type_fallback($file) {
|
||||
// 1. finfo
|
||||
if (function_exists('finfo_open')) {
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||
$mime = finfo_file($finfo, $file);
|
||||
finfo_close($finfo);
|
||||
return $mime;
|
||||
}
|
||||
// 2. mime_content_type
|
||||
elseif (function_exists('mime_content_type')) {
|
||||
return mime_content_type($file);
|
||||
}
|
||||
// 3. shell_exec file 명령 (리눅스 서버)
|
||||
elseif (function_exists('shell_exec')) {
|
||||
$mime = trim(@shell_exec('file -b --mime-type ' . escapeshellarg($file)));
|
||||
if ($mime) return $mime;
|
||||
}
|
||||
// 4. 모두 실패: false 반환 (확장자 검사만 가능)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isset($_FILES['file']) && count($_FILES['file']['name']) > 0) {
|
||||
$list = [];
|
||||
for ($i = 0; $i < count($_FILES['file']['name']); $i++) {
|
||||
$tmp_file = $_FILES['file']['tmp_name'][$i];
|
||||
$orig_name = $_FILES['file']['name'][$i];
|
||||
$safe_name = preg_replace("/[^a-zA-Z0-9._-]/", "_", $orig_name);
|
||||
|
||||
// 이중 확장자 검사 (ex. test.php.jpg)
|
||||
if (preg_match("/\.(php|pht|phtml|cgi|pl|exe|jsp|asp|inc|sh|js|html|htm|xml)(\.[a-z0-9]+)?$/i", $safe_name)) {
|
||||
$return['msg'] = '이중 확장자 또는 금지된 확장자가 포함되어 있습니다.';
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
|
||||
// 확장자 추출
|
||||
$ext = strtolower(pathinfo($safe_name, PATHINFO_EXTENSION));
|
||||
// MIME 타입 추출 (환경별로 자동 fallback)
|
||||
$mime = get_mime_type_fallback($tmp_file);
|
||||
|
||||
// 검증 로직
|
||||
$pass = false;
|
||||
if ($mime !== false) {
|
||||
// MIME 타입까지 모두 체크
|
||||
if (in_array($ext, $allowed_extensions) && in_array($mime, $allowed_mimes)) {
|
||||
$pass = true;
|
||||
}
|
||||
} else {
|
||||
// MIME 타입 체크 불가 환경: 확장자만 체크 (주의 안내)
|
||||
if (in_array($ext, $allowed_extensions)) {
|
||||
$pass = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$pass) {
|
||||
$return['msg'] = '허용되지 않는 파일 형식입니다.';
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
|
||||
// 저장 파일명 생성
|
||||
$unique = abs(ip2long($_SERVER['REMOTE_ADDR'])) . '_' . uniqid();
|
||||
$new_filename = $unique . '_' . $safe_name;
|
||||
$dest_file = G5_DATA_PATH . "/file/{$bo_table}/{$new_filename}";
|
||||
|
||||
if (move_uploaded_file($tmp_file, $dest_file)) {
|
||||
chmod($dest_file, G5_FILE_PERMISSION);
|
||||
|
||||
$f = [
|
||||
'bf_source' => htmlspecialchars($orig_name, ENT_QUOTES, 'UTF-8'),
|
||||
'bf_file' => $new_filename,
|
||||
'bf_filesize' => filesize($dest_file),
|
||||
'bf_datetime' => G5_TIME_YMDHIS,
|
||||
'extension' => $ext,
|
||||
'view' => '',
|
||||
];
|
||||
|
||||
$timg = @getimagesize($dest_file);
|
||||
if ($timg) {
|
||||
$f['bf_width'] = $timg[0];
|
||||
$f['bf_height'] = $timg[1];
|
||||
$f['bf_type'] = $timg[2];
|
||||
$f['view'] = '<img src="' . G5_DATA_URL . '/file/' . $bo_table . '/' . $new_filename . '" style="max-width:100%;" />';
|
||||
} else {
|
||||
$f['view'] = "<div class=\"w_pd\"><a href=\"javascript:void(0);\" class=\"w_etc w_{$ext}\">{$ext}</a></div>";
|
||||
}
|
||||
|
||||
$list[] = $f;
|
||||
}
|
||||
}
|
||||
$return['res'] = 'true';
|
||||
$return['msg'] = '업로드 완료';
|
||||
$return['list'] = $list;
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
} else {
|
||||
$return['msg'] = '파일을 선택하세요';
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,584 @@
|
||||
.clr-picker {
|
||||
display: none;
|
||||
flex-wrap: wrap;
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
z-index: 1000;
|
||||
border-radius: 10px;
|
||||
background-color: #fff;
|
||||
justify-content: flex-end;
|
||||
direction: ltr;
|
||||
box-shadow: 0 0 5px rgba(0,0,0,.05), 0 5px 20px rgba(0,0,0,.1);
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.clr-picker.clr-open,
|
||||
.clr-picker[data-inline="true"] {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.clr-picker[data-inline="true"] {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.clr-gradient {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
margin-bottom: 15px;
|
||||
border-radius: 3px 3px 0 0;
|
||||
background-image: linear-gradient(rgba(0,0,0,0), #000), linear-gradient(90deg, #fff, currentColor);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clr-marker {
|
||||
position: absolute;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin: -6px 0 0 -6px;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 50%;
|
||||
background-color: currentColor;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clr-picker input[type="range"]::-webkit-slider-runnable-track {
|
||||
width: 100%;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.clr-picker input[type="range"]::-webkit-slider-thumb {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.clr-picker input[type="range"]::-moz-range-track {
|
||||
width: 100%;
|
||||
height: 16px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.clr-picker input[type="range"]::-moz-range-thumb {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.clr-hue {
|
||||
background-image: linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%);
|
||||
}
|
||||
|
||||
.clr-hue,
|
||||
.clr-alpha {
|
||||
position: relative;
|
||||
width: calc(100% - 40px);
|
||||
height: 8px;
|
||||
margin: 5px 20px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.clr-alpha span {
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border-radius: inherit;
|
||||
background-image: linear-gradient(90deg, rgba(0,0,0,0), currentColor);
|
||||
}
|
||||
|
||||
.clr-hue input[type="range"],
|
||||
.clr-alpha input[type="range"] {
|
||||
position: absolute;
|
||||
width: calc(100% + 32px);
|
||||
height: 16px;
|
||||
left: -16px;
|
||||
top: -4px;
|
||||
margin: 0;
|
||||
background-color: transparent;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.clr-hue div,
|
||||
.clr-alpha div {
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
margin-left: -8px;
|
||||
transform: translateY(-50%);
|
||||
border: 2px solid #fff;
|
||||
border-radius: 50%;
|
||||
background-color: currentColor;
|
||||
box-shadow: 0 0 1px #888;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.clr-alpha div:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-radius: 50%;
|
||||
background-color: currentColor;
|
||||
}
|
||||
|
||||
.clr-format {
|
||||
display: none;
|
||||
order: 1;
|
||||
width: calc(100% - 40px);
|
||||
margin: 0 20px 20px;
|
||||
}
|
||||
|
||||
.clr-segmented {
|
||||
display: flex;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 15px;
|
||||
box-sizing: border-box;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.clr-segmented input,
|
||||
.clr-segmented legend {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.clr-segmented label {
|
||||
flex-grow: 1;
|
||||
margin: 0;
|
||||
padding: 4px 0;
|
||||
font-size: inherit;
|
||||
font-weight: normal;
|
||||
line-height: initial;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clr-segmented label:first-of-type {
|
||||
border-radius: 10px 0 0 10px;
|
||||
}
|
||||
|
||||
.clr-segmented label:last-of-type {
|
||||
border-radius: 0 10px 10px 0;
|
||||
}
|
||||
|
||||
.clr-segmented input:checked + label {
|
||||
color: #fff;
|
||||
background-color: #666;
|
||||
}
|
||||
|
||||
.clr-swatches {
|
||||
order: 2;
|
||||
width: calc(100% - 32px);
|
||||
margin: 0 16px;
|
||||
}
|
||||
|
||||
.clr-swatches div {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding-bottom: 12px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.clr-swatches button {
|
||||
position: relative;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0 4px 6px 4px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
color: inherit;
|
||||
text-indent: -1000px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clr-swatches button:after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-radius: inherit;
|
||||
background-color: currentColor;
|
||||
box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
input.clr-color {
|
||||
order: 1;
|
||||
width: calc(100% - 80px);
|
||||
height: 32px;
|
||||
margin: 15px 20px 20px auto;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 16px;
|
||||
color: #444;
|
||||
background-color: #fff;
|
||||
font-family: sans-serif;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
input.clr-color:focus {
|
||||
outline: none;
|
||||
border: 1px solid #1e90ff;
|
||||
}
|
||||
|
||||
.clr-close,
|
||||
.clr-clear {
|
||||
display: none;
|
||||
order: 2;
|
||||
height: 24px;
|
||||
margin: 0 20px 20px;
|
||||
padding: 0 20px;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
color: #fff;
|
||||
background-color: #666;
|
||||
font-family: inherit;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clr-close {
|
||||
display: block;
|
||||
margin: 0 20px 20px auto;
|
||||
}
|
||||
|
||||
.clr-preview {
|
||||
position: relative;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin: 15px 0 20px 20px;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.clr-preview:before,
|
||||
.clr-preview:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.clr-preview:after {
|
||||
border: 0;
|
||||
background-color: currentColor;
|
||||
box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
.clr-preview button {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
outline-offset: -2px;
|
||||
background-color: transparent;
|
||||
text-indent: -9999px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.clr-marker,
|
||||
.clr-hue div,
|
||||
.clr-alpha div,
|
||||
.clr-color {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.clr-field {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.clr-field input {
|
||||
margin: 0;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.clr-field.clr-rtl input {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.clr-field button {
|
||||
position: absolute;
|
||||
width: 30px;
|
||||
height: 100%;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
color: inherit;
|
||||
text-indent: -1000px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.clr-field.clr-rtl button {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.clr-field button:after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-radius: inherit;
|
||||
background-color: currentColor;
|
||||
box-shadow: inset 0 0 1px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
.clr-alpha,
|
||||
.clr-alpha div,
|
||||
.clr-swatches button,
|
||||
.clr-preview:before,
|
||||
.clr-field button {
|
||||
background-image: repeating-linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%, #aaa), repeating-linear-gradient(45deg, #aaa 25%, #fff 25%, #fff 75%, #aaa 75%, #aaa);
|
||||
background-position: 0 0, 4px 4px;
|
||||
background-size: 8px 8px;
|
||||
}
|
||||
|
||||
.clr-marker:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.clr-keyboard-nav .clr-marker:focus,
|
||||
.clr-keyboard-nav .clr-hue input:focus + div,
|
||||
.clr-keyboard-nav .clr-alpha input:focus + div,
|
||||
.clr-keyboard-nav .clr-segmented input:focus + label {
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 2px #1e90ff, 0 0 2px 2px #fff;
|
||||
}
|
||||
|
||||
.clr-picker[data-alpha="false"] .clr-alpha {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.clr-picker[data-minimal="true"] {
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
.clr-picker[data-minimal="true"] .clr-gradient,
|
||||
.clr-picker[data-minimal="true"] .clr-hue,
|
||||
.clr-picker[data-minimal="true"] .clr-alpha,
|
||||
.clr-picker[data-minimal="true"] .clr-color,
|
||||
.clr-picker[data-minimal="true"] .clr-preview {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/** Dark theme **/
|
||||
|
||||
.clr-dark {
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
.clr-dark .clr-segmented {
|
||||
border-color: #777;
|
||||
}
|
||||
|
||||
.clr-dark .clr-swatches button:after {
|
||||
box-shadow: inset 0 0 0 1px rgba(255,255,255,.3);
|
||||
}
|
||||
|
||||
.clr-dark input.clr-color {
|
||||
color: #fff;
|
||||
border-color: #777;
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
.clr-dark input.clr-color:focus {
|
||||
border-color: #1e90ff;
|
||||
}
|
||||
|
||||
.clr-dark .clr-preview:after {
|
||||
box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
|
||||
}
|
||||
|
||||
.clr-dark .clr-alpha,
|
||||
.clr-dark .clr-alpha div,
|
||||
.clr-dark .clr-swatches button,
|
||||
.clr-dark .clr-preview:before {
|
||||
background-image: repeating-linear-gradient(45deg, #666 25%, transparent 25%, transparent 75%, #888 75%, #888), repeating-linear-gradient(45deg, #888 25%, #444 25%, #444 75%, #888 75%, #888);
|
||||
}
|
||||
|
||||
/** Polaroid theme **/
|
||||
|
||||
.clr-picker.clr-polaroid {
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 0 5px rgba(0,0,0,.1), 0 5px 30px rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
.clr-picker.clr-polaroid:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
height: 10px;
|
||||
left: 20px;
|
||||
top: -10px;
|
||||
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));
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.clr-picker.clr-polaroid.clr-dark:before {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.clr-picker.clr-polaroid.clr-left:before {
|
||||
left: auto;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.clr-picker.clr-polaroid.clr-top:before {
|
||||
top: auto;
|
||||
bottom: -10px;
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
|
||||
.clr-polaroid .clr-gradient {
|
||||
width: calc(100% - 20px);
|
||||
height: 120px;
|
||||
margin: 10px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.clr-polaroid .clr-hue,
|
||||
.clr-polaroid .clr-alpha {
|
||||
width: calc(100% - 30px);
|
||||
height: 10px;
|
||||
margin: 6px 15px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.clr-polaroid .clr-hue div,
|
||||
.clr-polaroid .clr-alpha div {
|
||||
box-shadow: 0 0 5px rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
.clr-polaroid .clr-format {
|
||||
width: calc(100% - 20px);
|
||||
margin: 0 10px 15px;
|
||||
}
|
||||
|
||||
.clr-polaroid .clr-swatches {
|
||||
width: calc(100% - 12px);
|
||||
margin: 0 6px;
|
||||
}
|
||||
.clr-polaroid .clr-swatches div {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.clr-polaroid .clr-swatches button {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.clr-polaroid input.clr-color {
|
||||
width: calc(100% - 60px);
|
||||
margin: 10px 10px 15px auto;
|
||||
}
|
||||
|
||||
.clr-polaroid .clr-clear {
|
||||
margin: 0 10px 15px 10px;
|
||||
}
|
||||
|
||||
.clr-polaroid .clr-close {
|
||||
margin: 0 10px 15px auto;
|
||||
}
|
||||
|
||||
.clr-polaroid .clr-preview {
|
||||
margin: 10px 0 15px 10px;
|
||||
}
|
||||
|
||||
/** Large theme **/
|
||||
|
||||
.clr-picker.clr-large {
|
||||
width: 275px;
|
||||
}
|
||||
|
||||
.clr-large .clr-gradient {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.clr-large .clr-swatches button {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
/** Pill (horizontal) theme **/
|
||||
|
||||
.clr-picker.clr-pill {
|
||||
width: 380px;
|
||||
padding-left: 180px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.clr-pill .clr-gradient {
|
||||
position: absolute;
|
||||
width: 180px;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
.clr-pill .clr-hue {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.square .clr-field button {width: 22px;height: 22px;left: 5px;right: auto;border-radius: 5px;}
|
||||
.square .clr-field input{padding-left: 35px;}
|
||||
.clr-picker {z-index: 92345678902; position:absolute;}
|
||||
.square .clr-field input {height:35px !important; border-radius: 6px !important; width: 238px !important;}
|
||||
.color_set_wrap {position: relative;}
|
||||
.color_set_wrap span {position: absolute; top:9px; left: 30px;}
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg>
|
||||
|
After Width: | Height: | Size: 264 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.7749 0.391876C16.2979 0.391876 20.7749 4.86888 20.7749 10.3919C20.7749 15.9149 16.2979 20.3919 10.7749 20.3919C5.2519 20.3919 0.774902 15.9149 0.774902 10.3919C0.774902 4.86888 5.2519 0.391876 10.7749 0.391876ZM14.3099 6.77288L9.3599 11.7229L7.2399 9.60188C7.14706 9.50897 7.03682 9.43525 6.91549 9.38494C6.79416 9.33464 6.6641 9.30872 6.53276 9.30867C6.26749 9.30858 6.01304 9.41387 5.8254 9.60138C5.63776 9.78888 5.53229 10.0433 5.5322 10.3085C5.53211 10.5738 5.63739 10.8282 5.8249 11.0159L8.5829 13.7739C8.68505 13.8761 8.80634 13.9571 8.93983 14.0125C9.07332 14.0678 9.21641 14.0962 9.3609 14.0962C9.5054 14.0962 9.64848 14.0678 9.78197 14.0125C9.91547 13.9571 10.0368 13.8761 10.1389 13.7739L15.7249 8.18788C15.9125 8.00024 16.018 7.74574 16.018 7.48038C16.018 7.21501 15.9125 6.96052 15.7249 6.77288C15.5373 6.58524 15.2828 6.47982 15.0174 6.47982C14.752 6.47982 14.4975 6.58524 14.3099 6.77288Z" fill="#09244B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.37629 8.76571L13.0333 14.4227C13.2219 14.6049 13.4745 14.7057 13.7367 14.7034C13.9989 14.7011 14.2497 14.5959 14.4351 14.4105C14.6205 14.2251 14.7257 13.9743 14.728 13.7121C14.7302 13.4499 14.6294 13.1973 14.4473 13.0087L8.79029 7.35171L14.4473 1.69471C14.6294 1.50611 14.7302 1.25351 14.728 0.991311C14.7257 0.729114 14.6205 0.478302 14.4351 0.292894C14.2497 0.107485 13.9989 0.00231622 13.7367 3.78026e-05C13.4745 -0.00224062 13.2219 0.0985537 13.0333 0.280712L7.37629 5.93771L1.71929 0.280712C1.52984 0.103057 1.2787 0.0060773 1.01902 0.0102941C0.759336 0.0145109 0.51148 0.119593 0.327898 0.303306C0.144315 0.487018 0.0394078 0.734948 0.0353747 0.994633C0.0313417 1.25432 0.128499 1.50539 0.306288 1.69471L5.96229 7.35171L0.305288 13.0087C0.209778 13.101 0.133596 13.2113 0.0811869 13.3333C0.0287779 13.4553 0.00119157 13.5865 3.7757e-05 13.7193C-0.00111606 13.8521 0.0241854 13.9838 0.0744663 14.1067C0.124747 14.2296 0.199 14.3412 0.292893 14.4351C0.386786 14.529 0.498438 14.6033 0.621334 14.6535C0.74423 14.7038 0.87591 14.7291 1.00869 14.728C1.14147 14.7268 1.27269 14.6992 1.39469 14.6468C1.5167 14.5944 1.62704 14.5182 1.71929 14.4227L7.37629 8.76571Z" fill="#09244B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="103" height="91" viewBox="0 0 103 91" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M51.501 31.9809V50.3207M51.501 68.6604H51.5465M43.7258 8.41412L5.2185 73.2452C4.42457 74.6318 4.00448 76.2038 4.00004 77.805C3.99559 79.4061 4.40694 80.9806 5.19316 82.3716C5.97938 83.7627 7.11306 84.9219 8.48143 85.7339C9.84979 86.5459 11.4051 86.9824 12.9927 87H90.0073C91.5949 86.9824 93.1502 86.5459 94.5186 85.7339C95.8869 84.9219 97.0206 83.7627 97.8068 82.3716C98.5931 80.9806 99.0044 79.4061 99 77.805C98.9955 76.2038 98.5754 74.6318 97.7815 73.2452L59.2742 8.41412C58.4637 7.06664 57.3226 5.95256 55.9608 5.17937C54.5991 4.40619 53.0627 4 51.5 4C49.9373 4 48.4009 4.40619 47.0392 5.17937C45.6774 5.95256 44.5363 7.06664 43.7258 8.41412Z" stroke="#F1F1F1" stroke-width="7" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 844 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="17" height="15" viewBox="0 0 17 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.26667 3.24661e-09C6.4911 -1.40043e-05 6.71322 0.0452993 6.91971 0.133222C7.1262 0.221145 7.3128 0.349867 7.46833 0.511667L7.56833 0.625833L8.73333 2.08333H15C15.4205 2.0832 15.8255 2.24201 16.1338 2.52791C16.4421 2.81382 16.631 3.2057 16.6625 3.625L16.6667 3.75V13.3333C16.6668 13.7538 16.508 14.1588 16.2221 14.4671C15.9362 14.7754 15.5443 14.9643 15.125 14.9958L15 15H1.66667C1.24619 15.0001 0.841195 14.8413 0.532877 14.5554C0.224559 14.2695 0.0357029 13.8776 0.00416685 13.4583L8.35568e-08 13.3333V1.66667C-0.000132983 1.24619 0.158672 0.841194 0.444581 0.532877C0.73049 0.224559 1.12237 0.0357028 1.54167 0.00416677L1.66667 3.24661e-09H6.26667ZM6.26667 1.66667H1.66667V13.3333H15V3.75H8.73333C8.5089 3.75001 8.28678 3.7047 8.08029 3.61678C7.8738 3.52885 7.6872 3.40013 7.53167 3.23833L7.43167 3.12417L6.26667 1.66667ZM5.83333 7.5C6.05435 7.5 6.26631 7.5878 6.42259 7.74408C6.57887 7.90036 6.66667 8.11232 6.66667 8.33333C6.66667 8.55435 6.57887 8.76631 6.42259 8.92259C6.26631 9.07887 6.05435 9.16667 5.83333 9.16667C5.61232 9.16667 5.40036 9.07887 5.24408 8.92259C5.0878 8.76631 5 8.55435 5 8.33333C5 8.11232 5.0878 7.90036 5.24408 7.74408C5.40036 7.5878 5.61232 7.5 5.83333 7.5ZM8.33333 7.5C8.55435 7.5 8.76631 7.5878 8.92259 7.74408C9.07887 7.90036 9.16667 8.11232 9.16667 8.33333C9.16667 8.55435 9.07887 8.76631 8.92259 8.92259C8.76631 9.07887 8.55435 9.16667 8.33333 9.16667C8.11232 9.16667 7.90036 9.07887 7.74408 8.92259C7.5878 8.76631 7.5 8.55435 7.5 8.33333C7.5 8.11232 7.5878 7.90036 7.74408 7.74408C7.90036 7.5878 8.11232 7.5 8.33333 7.5ZM10.8333 7.5C11.0543 7.5 11.2663 7.5878 11.4226 7.74408C11.5789 7.90036 11.6667 8.11232 11.6667 8.33333C11.6667 8.55435 11.5789 8.76631 11.4226 8.92259C11.2663 9.07887 11.0543 9.16667 10.8333 9.16667C10.6123 9.16667 10.4004 9.07887 10.2441 8.92259C10.0878 8.76631 10 8.55435 10 8.33333C10 8.11232 10.0878 7.90036 10.2441 7.74408C10.4004 7.5878 10.6123 7.5 10.8333 7.5Z" fill="#D6DCE0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="18" height="20" viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M17.559 5.75094L17.581 5.94094L17.588 6.13494V13.4029C17.5879 13.8115 17.4877 14.2138 17.2961 14.5747C17.1045 14.9356 16.8274 15.244 16.489 15.4729L16.339 15.5679L10.044 19.2019L9.92 19.2689L9.794 19.3289V10.3389L17.559 5.75094ZM0.0289998 5.75094L7.794 10.3399V19.3279C7.70839 19.2906 7.62493 19.2485 7.544 19.2019L1.25 15.5679C0.869961 15.3485 0.554373 15.0329 0.334952 14.6529C0.115532 14.2729 1.1148e-05 13.8418 0 13.4029V6.13494C0 6.00494 0.00999997 5.87694 0.03 5.75094H0.0289998ZM10.044 0.335936L16.338 3.96994C16.388 3.99994 16.438 4.02994 16.486 4.06194L8.794 8.60894L1.102 4.06094C1.15 4.02894 1.199 3.99794 1.25 3.96894L7.544 0.334936C7.92405 0.115516 8.35516 0 8.794 0C9.23284 0 9.66395 0.116515 10.044 0.335936Z" fill="#09244B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 854 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="17" height="22" viewBox="0 0 17 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.00959 4.37262L7.56359 8.07562C7.83761 8.2582 8.06231 8.50561 8.21774 8.79589C8.37317 9.08618 8.45453 9.41034 8.45459 9.73962V20.2046C8.45462 20.3857 8.4055 20.5633 8.31246 20.7186C8.21943 20.8739 8.08599 21.0011 7.92636 21.0865C7.76673 21.1719 7.5869 21.2124 7.40607 21.2036C7.22524 21.1948 7.05019 21.1371 6.89959 21.0366L1.34559 17.3346C1.07143 17.1519 0.846645 16.9044 0.691205 16.6139C0.535765 16.3234 0.454486 15.9991 0.45459 15.6696V5.20462C0.454563 5.02357 0.503685 4.84592 0.596716 4.69061C0.689746 4.5353 0.823195 4.40815 0.982825 4.32274C1.14245 4.23733 1.32228 4.19686 1.50311 4.20565C1.68394 4.21443 1.85899 4.27214 2.00959 4.37262ZM4.98259 2.32262C5.14226 2.23718 5.32213 2.19671 5.50301 2.20551C5.68388 2.21432 5.85898 2.27207 6.00959 2.37262L11.5636 6.07562C11.8376 6.2582 12.0623 6.50561 12.2177 6.7959C12.3732 7.08618 12.4545 7.41034 12.4546 7.73962V18.2046C12.4546 18.3857 12.4055 18.5633 12.3125 18.7186C12.2194 18.8739 12.086 19.0011 11.9264 19.0865C11.7667 19.1719 11.5869 19.2124 11.4061 19.2036C11.2252 19.1948 11.0502 19.1371 10.8996 19.0366L9.95459 18.4066V9.73962C9.95451 9.16341 9.81217 8.59613 9.54021 8.08814C9.26825 7.58015 8.87507 7.14717 8.39559 6.82762L4.45459 4.19962V3.20462C4.45452 3.02358 4.50359 2.84591 4.59658 2.69058C4.68957 2.53525 4.82298 2.40807 4.98259 2.32262ZM10.0096 0.372618L15.5636 4.07562C15.8376 4.2582 16.0623 4.50561 16.2177 4.7959C16.3732 5.08618 16.4545 5.41034 16.4546 5.73962V16.2046C16.4546 16.3857 16.4055 16.5633 16.3125 16.7186C16.2194 16.8739 16.086 17.0011 15.9264 17.0865C15.7667 17.1719 15.5869 17.2124 15.4061 17.2036C15.2252 17.1948 15.0502 17.1371 14.8996 17.0366L13.9546 16.4066V7.73962C13.9545 7.16341 13.8122 6.59613 13.5402 6.08814C13.2682 5.58015 12.8751 5.14717 12.3956 4.82762L8.45459 2.19962V1.20462C8.45456 1.02357 8.50368 0.845921 8.59671 0.690609C8.68975 0.535296 8.82319 0.408153 8.98282 0.322744C9.14245 0.237334 9.32228 0.196862 9.50311 0.205646C9.68394 0.214429 9.85899 0.272139 10.0096 0.372618Z" fill="#09244B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 0C15.523 0 20 4.477 20 10C20 10.649 19.938 11.284 19.82 11.9C19.447 13.835 17.56 14.691 15.913 14.495L15.738 14.47L13.998 14.18C13.7955 14.1462 13.5879 14.1613 13.3924 14.2239C13.1969 14.2865 13.0192 14.3949 12.874 14.54C12.504 14.91 12.327 15.419 12.576 15.916C12.999 16.762 13.005 17.728 12.631 18.519C12.131 19.58 11.11 20 10 20C4.477 20 0 15.523 0 10C0 4.477 4.477 0 10 0ZM5.5 9C5.30302 9 5.10796 9.0388 4.92597 9.11418C4.74399 9.18956 4.57863 9.30005 4.43934 9.43934C4.30005 9.57863 4.18956 9.74399 4.11418 9.92597C4.0388 10.108 4 10.303 4 10.5C4 10.697 4.0388 10.892 4.11418 11.074C4.18956 11.256 4.30005 11.4214 4.43934 11.5607C4.57863 11.6999 4.74399 11.8104 4.92597 11.8858C5.10796 11.9612 5.30302 12 5.5 12C5.89782 12 6.27936 11.842 6.56066 11.5607C6.84196 11.2794 7 10.8978 7 10.5C7 10.1022 6.84196 9.72064 6.56066 9.43934C6.27936 9.15804 5.89782 9 5.5 9ZM12.5 5C12.1022 5 11.7206 5.15804 11.4393 5.43934C11.158 5.72064 11 6.10218 11 6.5C11 6.89782 11.158 7.27936 11.4393 7.56066C11.7206 7.84196 12.1022 8 12.5 8C12.8978 8 13.2794 7.84196 13.5607 7.56066C13.842 7.27936 14 6.89782 14 6.5C14 6.10218 13.842 5.72064 13.5607 5.43934C13.2794 5.15804 12.8978 5 12.5 5ZM7.5 5C7.10218 5 6.72064 5.15804 6.43934 5.43934C6.15804 5.72064 6 6.10218 6 6.5C6 6.89782 6.15804 7.27936 6.43934 7.56066C6.72064 7.84196 7.10218 8 7.5 8C7.89782 8 8.27936 7.84196 8.56066 7.56066C8.84196 7.27936 9 6.89782 9 6.5C9 6.10218 8.84196 5.72064 8.56066 5.43934C8.27936 5.15804 7.89782 5 7.5 5Z" fill="#09244B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.58597 1.1C9.93996 0.746476 10.4136 0.538456 10.9134 0.516981C11.4132 0.495507 11.903 0.662139 12.286 0.984002L12.414 1.101L14.314 3H17C17.5044 3.00009 17.9901 3.19077 18.3599 3.53384C18.7297 3.8769 18.9561 4.34702 18.994 4.85L19 5V7.686L20.9 9.586C21.2538 9.94004 21.462 10.4139 21.4834 10.9139C21.5049 11.414 21.3381 11.9039 21.016 12.287L20.899 12.414L18.999 14.314V17C18.9991 17.5046 18.8086 17.9906 18.4655 18.3605C18.1224 18.7305 17.6521 18.9572 17.149 18.995L17 19H14.315L12.415 20.9C12.0609 21.2538 11.5871 21.462 11.087 21.4835C10.587 21.505 10.097 21.3382 9.71397 21.016L9.58697 20.9L7.68697 19H4.99997C4.49539 19.0002 4.0094 18.8096 3.63942 18.4665C3.26944 18.1234 3.04281 17.6532 3.00497 17.15L2.99997 17V14.314L1.09997 12.414C0.746165 12.06 0.537968 11.5861 0.516492 11.0861C0.495016 10.586 0.661821 10.0961 0.98397 9.713L1.09997 9.586L2.99997 7.686V5C3.00006 4.4956 3.19074 4.00986 3.53381 3.64009C3.87687 3.27032 4.34699 3.04383 4.84997 3.006L4.99997 3H7.68597L9.58597 1.1ZM11 8C10.2043 8 9.44126 8.31607 8.87865 8.87868C8.31604 9.44129 7.99997 10.2044 7.99997 11C7.99997 11.7957 8.31604 12.5587 8.87865 13.1213C9.44126 13.6839 10.2043 14 11 14C11.7956 14 12.5587 13.6839 13.1213 13.1213C13.6839 12.5587 14 11.7957 14 11C14 10.2044 13.6839 9.44129 13.1213 8.87868C12.5587 8.31607 11.7956 8 11 8Z" fill="#09244B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,344 @@
|
||||
.sh-side-options {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
z-index: 12345678902;
|
||||
transition: all 600ms cubic-bezier(0.86, 0, 0.07, 1);
|
||||
padding: 0 0;
|
||||
width: 400px;
|
||||
transform: translateX(400px);
|
||||
}
|
||||
|
||||
.sh-side-options.open {
|
||||
transform: translateX(0px);
|
||||
box-shadow: 0 0px 39px 10px rgba(0, 0, 0, 0.05);
|
||||
transition: all 600ms cubic-bezier(0.86, 0, 0.07, 1);
|
||||
}
|
||||
|
||||
.sh-side-options-container {
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
left: -125px;
|
||||
width: 60px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
border-radius: 5px;
|
||||
margin-right: 15px;
|
||||
box-shadow: -10px 0px 20px 2px rgba(0, 0, 0, .06);
|
||||
transition: all 600ms cubic-bezier(0.86, 0, 0.07, 1);
|
||||
}
|
||||
|
||||
|
||||
.sh-side-options-item {
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin: 0px;
|
||||
transition: all 600ms cubic-bezier(0.86, 0, 0.07, 1);
|
||||
position: relative;
|
||||
padding: 7px;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.sh-side-options-item:not(:last-child) {
|
||||
border-bottom: 1px solid #f1f3fc;
|
||||
}
|
||||
|
||||
.sh-side-options-item-container {
|
||||
border-radius: 4px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.sh-side-options-item:hover .sh-side-options-item-container,
|
||||
.sh-side-options-item:focus .sh-side-options-item-container,
|
||||
.setting_set_btn.open .sh-side-options-item-container {
|
||||
background-color: #f3f5fd;
|
||||
}
|
||||
|
||||
.mobule_set_btn.open .sh-side-options-item-container {
|
||||
background-color: #f3f5fd;
|
||||
}
|
||||
|
||||
|
||||
.sh-side-options-item i {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.sh-side-options-item:not(:hover):not(:focus) {
|
||||
color: #9396a5 !important;
|
||||
}
|
||||
|
||||
.sh-side-options-item:hover .sh-side-options-hover {
|
||||
opacity: 1;
|
||||
transform: translateX(-97%);
|
||||
}
|
||||
|
||||
.sh-side-options-hover {
|
||||
position: absolute;
|
||||
background-color: #ffffff;
|
||||
color: #32343d;
|
||||
padding: 20px 26px;
|
||||
transform: translateX(-70%);
|
||||
left: 0px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
opacity: 0;
|
||||
transition: all 600ms cubic-bezier(0.86, 0, 0.07, 1);
|
||||
z-index: -100;
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
font-size: 13px;
|
||||
box-shadow: 0px 0px 20px 2px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.sh-side-options-hover span {
|
||||
padding: 0px 3px;
|
||||
}
|
||||
|
||||
.sh-side-options-item i {
|
||||
color: #9396a5 !important;
|
||||
}
|
||||
|
||||
.sh-side-options.open .sh-side-options-item-trigger-demos i,
|
||||
.sh-side-options-item:hover i,
|
||||
.sh-side-options-item:focus i {
|
||||
color: #294cff !important;
|
||||
}
|
||||
|
||||
.sh-side-demos-container {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0px;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
overflow-y: scroll;
|
||||
background-color: #fff;
|
||||
background-repeat: no-repeat;
|
||||
background-position: right top;
|
||||
padding: 30px;
|
||||
transition: all 600ms cubic-bezier(0.86, 0, 0.07, 1);
|
||||
}
|
||||
|
||||
|
||||
.sh-side-demos-container::-webkit-scrollbar {display: none;}
|
||||
.sh-side-demos-container {-ms-overflow-style: none; scrollbar-width: none;}
|
||||
|
||||
|
||||
.sh-side-demos-container-close {
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
right: 30px;
|
||||
cursor: pointer;
|
||||
z-index: 97;
|
||||
}
|
||||
|
||||
.sh-side-demos-container-close i {
|
||||
color: #c5c5c5;
|
||||
font-size: 18px;
|
||||
transition: all 600ms cubic-bezier(0.86, 0, 0.07, 1);
|
||||
}
|
||||
|
||||
.sh-side-demos-container-close:hover i,
|
||||
.sh-side-demos-container-close:focus i {
|
||||
color: #7f7f7f;
|
||||
}
|
||||
|
||||
|
||||
/* Demo Items */
|
||||
.sh-side-demos-loop-container {
|
||||
position: relative;
|
||||
margin: 0 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.sh-side-demos-item {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin-right: -4px;
|
||||
margin-bottom: 25px;
|
||||
width: 50%;
|
||||
padding: 0 10px;
|
||||
text-align: center;
|
||||
transition: all 600ms cubic-bezier(0.86, 0, 0.07, 1);
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.sh-side-demos-item:hover {
|
||||
top: -4px;
|
||||
}
|
||||
|
||||
.sh-side-demos-item .sh-image-lazy-loading {
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 2px 20px 1px rgba(0, 0, 0, .1);
|
||||
}
|
||||
|
||||
.sh-side-demos-item img {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.sh-side-demos-item-name {
|
||||
font-size: 12px;
|
||||
color: #32343d;
|
||||
font-weight: 600;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.rb_config {padding:0px; box-sizing: border-box;}
|
||||
.rb_config h2 {color:#25282B; font-size: 20px;}
|
||||
.rb_config h2 span {color:#AA20FF;}
|
||||
.rb_config h6 {font-size: 14px; color:#999;}
|
||||
.rb_config_sec {margin-top: 30px;}
|
||||
.rb_config .config_wrap {margin-top: 10px;}
|
||||
.rb_config_sub_txt {color:#999; font-weight: normal; margin-top: 5px; font-size: 12px !important; line-height: 140%;}
|
||||
.rb_config .no_data {background-color: #f9f9f9; border-radius: 10px; padding-top: 50px; padding-bottom: 50px; text-align: center; font-size: 14px; color:#999;}
|
||||
.rb_config .rb_config_reload {width:49%; background-color: #25282B; color:#fff; height:47px; border-radius: 10px; border:0px; float:left;}
|
||||
.rb_config .rb_config_save {width:49%; background-color: #25282B; color:#fff; height:47px; border-radius: 10px; border:0px; float:left;}
|
||||
.rb_config .rb_config_close {width:49%; background-color: #f1f1f1; color:#25282B; height:47px; border-radius: 10px; border:0px; float:right;}
|
||||
.rb_config .skin_path_url {}
|
||||
.rb_config .skin_path_url_img {float:left; width: 7%}
|
||||
.rb_config .skin_path_url_txt {float:left; width: 93%; font-size: 12px; color:#999; margin-top: 4px;}
|
||||
.rb_config .rows_inp_lr {}
|
||||
.rb_config .rows_inp_l {float:left; width: 35%;}
|
||||
.rb_config .rows_inp_l_span {color:#999; font-size: 12px; margin-top: 6px;}
|
||||
.rb_config .rows_inp_l_span span {color:#000}
|
||||
.rb_config .rows_inp_r {float:left; width: 65%;}
|
||||
|
||||
.sh-side-demos-container .input {padding-left: 15px; padding-right: 10px;}
|
||||
.sh-side-demos-container .select {padding-left: 15px; padding-right: 15px; background-position: right 15px center;}
|
||||
.flex_box .add_module_wrap {display: none;}
|
||||
.sh-side-options-container {
|
||||
position: fixed !important;
|
||||
top: auto !important;
|
||||
bottom: 40px !important;
|
||||
right: auto !important;
|
||||
left: 50% !important;
|
||||
transform: translateX(-50%);
|
||||
width: auto;
|
||||
margin-right: 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
border-radius: 6px !important;
|
||||
z-index: 999999;
|
||||
}
|
||||
.sh-side-options-item-container {padding-left: 10px; padding-right: 10px; min-width: 42px; min-height: 38px; position:relative; text-align: center; border-radius: 6px;}
|
||||
.sh-side-options-item-container img {position: absolute; top:50%; left: 50%; transform: translate(-50%, -50%);}
|
||||
.sh-side-options-item {border-bottom: 0px !important; padding: 2px;}
|
||||
|
||||
.add_module_btns {background-color: #fff; border:1px dashed #ccc; color:#888;}
|
||||
.add_module_btns:hover {border-color:#25282B; color:#25282B;}
|
||||
#clr-clear {display: none !important;}
|
||||
.none_inp_cl .clr-field button {margin-top:-1px !important; left: 0px !important; width:24px !important; height:24px !important; border-radius: 6px !important;}
|
||||
.none_inp_cl input {color: transparent; width:40px !important; border:0px !important; padding:0px !important;}
|
||||
.none_inp_cl input:focus {border:0px !important;}
|
||||
.config_wrap .tiny_input {width: 50px; height:25px; border-radius: 6px; font-size: 11px; padding: 5px; margin-left: 5px;}
|
||||
.config_wrap .select_tiny {width: 70px; height:25px; border-radius: 6px; font-size: 11px; padding: 5px; background: url(../../theme/rb.basic/rb.img/icon/arr_down.svg) no-repeat right 10px center; margin-left: 5px;}
|
||||
.config_wrap_flex {display: flex; gap: 0px 5px;flex-direction: row;flex-wrap: wrap; align-items: center; font-size: 12px;}
|
||||
input#md_title_hide + label:before {top:-2px !important;}
|
||||
input#md_title_hide + label:after {top:3px !important;}
|
||||
.rb_config_sec {border-top:1px dashed #ddd; padding-top: 30px;}
|
||||
.rb_config h6 {font-size: 16px;}
|
||||
.config_wrap_bg {border:1px dashed #ddd; border-radius: 10px; padding: 15px 15px; margin-top: 20px;}
|
||||
.config_wrap_bg_shop {border:1px dashed #ddd; border-radius: 10px; padding: 15px 15px; margin-top: 20px;}
|
||||
.config_wrap_sub_tit {background-color: #F0F3F9; padding: 5px 10px; border-radius: 30px; font-size: 12px;}
|
||||
#topvisual_btn_wrap {text-align: center; margin-top: -18px; z-index: 2; position: absolute; width: 100%;}
|
||||
#topvisual_btn_wrap button {border:0px; padding: 10px 20px; border-radius: 30px; background-color: #F0F3F9;}
|
||||
#topvisual_btn_wrap_shop {text-align: center; margin-top: -18px; z-index: 2; position: absolute; width: 100%;}
|
||||
#topvisual_btn_wrap_shop button {border:0px; padding: 10px 20px; border-radius: 30px; background-color: #F0F3F9;}
|
||||
|
||||
.tiny_inp_cl input {width:120px !important; padding-left:30px !important; color:#000; font-size: 12px;}
|
||||
.config_wrap_bg input[type="radio"] + label {padding-top: 7px;}
|
||||
|
||||
.rb_right_adm_btn {color:#fff; font-size: 13px; padding: 5px 10px; border-radius: 6px;}
|
||||
.rb_right_err_box {border:1px dashed #ddd; padding: 10px 20px; padding-bottom: 20px; border-radius: 10px; margin-top: 20px;}
|
||||
.rb_page_add_wrap {margin-top: 15px;}
|
||||
.rb_page_add_wrap input {height:25px; border-radius: 4px; padding: 5px !important; font-size:12px;}
|
||||
.rb_page_add_wrap button {margin-top: 0px !important;}
|
||||
|
||||
|
||||
.selected_tags .tag {
|
||||
display: block;
|
||||
background: #f9f9f9;
|
||||
padding: 10px 15px;
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tag-remove {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
position: absolute; top:7px; right:15px;
|
||||
}
|
||||
|
||||
.rb_sub_page_cr {margin-bottom: 15px; margin-top: 20px;}
|
||||
.rb_sub_page_cr span {background-color: #aaa; color:#fff; font-size: 11px; padding: 5px 10px; border-radius: 30px;}
|
||||
|
||||
#clear_cache_btn {width: 100%;color: #fff;height: 47px;border-radius: 10px;border: 0px;}
|
||||
#clear_top_btn {width: 100%;color: #000;height: 47px;border-radius: 10px;border: 0px; background-color: #f0f0f0; font-size: 14px; margin-top: 20px;}
|
||||
.rb_config h6 {word-break: keep-all;}
|
||||
|
||||
#clear_topvisual_btn {padding: 5px 10px; border-radius: 6px; color:#fff; border:0px;}
|
||||
.bg_fff {background-color: #fff;}
|
||||
.flex_box_inner .rb_layout_box {border:0px;}
|
||||
.ui-sortable-handle {border:1px dashed #B9FAFF; margin: -0.5px; background-color: rgba(0,0,0,0.02); }
|
||||
.content_box_set {border:0px; background-color: #fff; border-bottom:1px dashed #B9FAFF;}
|
||||
.flex_box_inner .ui-sortable-handle {border-top:1px dashed #B9FAFF !important;}
|
||||
.rb_layout_box .add_module_wrap {padding: 0px !important;}
|
||||
.rb_layout_box .add_module_wrap .add_module_btns {
|
||||
width: auto;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
padding-left: 7px;
|
||||
padding-right: 7px;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
height: 30px;
|
||||
font-size: 12px;
|
||||
z-index: 97;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.flex_box_inner {
|
||||
position: relative;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#rb_sidemenu .flex_box_inner {display: none !important;}
|
||||
.ml-0 {margin-left: 0px !important;}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
|
||||
.sh-side-options {
|
||||
/*display: none;*/
|
||||
}
|
||||
|
||||
.sh-side-options {
|
||||
width: 370px;
|
||||
transform: translateX(370px);
|
||||
}
|
||||
|
||||
.sh-side-options-container {
|
||||
bottom:20px;
|
||||
left: -70px;
|
||||
margin-right: 0px;
|
||||
width: 50px;
|
||||
display: none;}
|
||||
}
|
||||
|
||||
.sh-side-options-item {padding-bottom: 5px; padding-top: 5px;}
|
||||
|
||||
#rb_topvisual {width: 100%}
|
||||
#rb_topvisual_shop {width: 100%;}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
|
||||
if (isset($rb_v_info['v_use']) && intval($rb_v_info['v_use']) === 1 || isset($rb_v_info['v_use']) && intval($rb_v_info['v_use']) === 2) {
|
||||
|
||||
$topvisual_class = !empty($rb_v_info['v_code']) ? $rb_v_info['v_code'] : '';
|
||||
$topvisual_width = (!empty($rb_v_info['topvisual_width']) && $rb_v_info['topvisual_width'] > 0) ? $rb_v_info['topvisual_width'] . '%' : $rb_core['sub_width'] . 'px';
|
||||
$topvisual_height = !empty($rb_v_info['topvisual_height']) ? $rb_v_info['topvisual_height'] : '200';
|
||||
$topvisual_radius = isset($rb_v_info['topvisual_radius']) ? $rb_v_info['topvisual_radius'] : '0';
|
||||
$topvisual_border = isset($rb_v_info['topvisual_border']) ? $rb_v_info['topvisual_border'] : '0';
|
||||
$topvisual_bg_color = !empty($rb_v_info['topvisual_bg_color']) ? $rb_v_info['topvisual_bg_color'] : '#f9f9f9';
|
||||
$topvisual_bl = isset($rb_v_info['topvisual_bl']) ? $rb_v_info['topvisual_bl'] : '0';
|
||||
|
||||
if(isset($topvisual_width) && $topvisual_width == "100%") {
|
||||
$topvisual_padding = "padding-left:0px; padding-right:0px;";
|
||||
} else {
|
||||
$topvisual_padding = "padding-left:50px; padding-right:50px;";
|
||||
}
|
||||
|
||||
function get_topvisual_key() {
|
||||
global $rb_v_info;
|
||||
return isset($rb_v_info['v_code']) ? $rb_v_info['v_code'] : '';
|
||||
}
|
||||
|
||||
$key = get_topvisual_key();
|
||||
$img = G5_DATA_URL.'/topvisual/'.$key.'.jpg';
|
||||
$txt = G5_DATA_PATH.'/topvisual/'.$key.'.txt';
|
||||
|
||||
$main = '';
|
||||
$sub = '';
|
||||
|
||||
if (file_exists($txt)) {
|
||||
$lines = file($txt, FILE_IGNORE_NEW_LINES);
|
||||
$split = array_search('[SUB]', $lines);
|
||||
if ($split !== false) {
|
||||
$main = implode("\n", array_slice($lines, 0, $split));
|
||||
$sub = implode("\n", array_slice($lines, $split + 1));
|
||||
} else {
|
||||
$main = implode("\n", $lines);
|
||||
}
|
||||
}
|
||||
$has_main = trim($main) !== '';
|
||||
$has_sub = trim($sub) !== '';
|
||||
|
||||
if($topvisual_border == 0) {
|
||||
$topvisual_border_in = "border:0px;";
|
||||
} else if($topvisual_border == 1) {
|
||||
$topvisual_border_in = "border:1px dashed rgba(0,0,0,0.1);";
|
||||
} else if($topvisual_border == 2) {
|
||||
$topvisual_border_in = "border:1px solid rgba(0,0,0,0.1);";
|
||||
} else {
|
||||
$topvisual_border_in = "";
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="rb_topvisual" class="rb_topvisual <?php echo $topvisual_class; ?>" style="background-color:<?php echo $topvisual_bg_color ?>; width:<?php echo $topvisual_width; ?>; height:<?php echo $topvisual_height; ?>px; <?php if(isset($topvisual_width) && $topvisual_width == "100%") { ?>margin-top:0px; border-radius:0px; overflow:inherit;<?php } else { ?>margin-top:50px; border-radius:<?php echo $topvisual_radius ?>px; overflow:hidden;<?php } ?> <?php echo $topvisual_border_in ?>" data-layout="rb_topvisual">
|
||||
|
||||
<?php if ($is_admin) { ?>
|
||||
<input type="file" id="topvisual_file_input" accept="image/*" style="display:none;">
|
||||
<?php } ?>
|
||||
|
||||
<!-- 텍스트 영역 -->
|
||||
<div id="rb_topvisual_txt">
|
||||
<div id="rb_topvisual_txt_inner" style="width:<?php echo $rb_core['sub_width']; ?>px;">
|
||||
<div class="main_wording" style="<?php echo $topvisual_padding ?> text-align:<?php echo !empty($rb_v_info['topvisual_m_align']) ? $rb_v_info['topvisual_m_align'] : 'left'; ?>; font-size:<?php echo !empty($rb_v_info['topvisual_m_size']) ? $rb_v_info['topvisual_m_size'] : '20'; ?>px; color:<?php echo !empty($rb_v_info['topvisual_m_color']) ? $rb_v_info['topvisual_m_color'] : '#ffffff'; ?>; font-family:<?php echo !empty($rb_v_info['topvisual_m_font']) ? $rb_v_info['topvisual_m_font'] : 'font-R'; ?>;" <?php if ($is_admin) echo 'contenteditable="true"'; ?>>
|
||||
<?php echo $has_main ? nl2br(htmlspecialchars($main)) : ($is_admin ? nl2br("메인 워딩을 입력할 수 있어요.") : ''); ?>
|
||||
</div>
|
||||
<div class="sub_wording" style="<?php echo $topvisual_padding ?> text-align:<?php echo !empty($rb_v_info['topvisual_s_align']) ? $rb_v_info['topvisual_s_align'] : 'left'; ?>; font-size:<?php echo !empty($rb_v_info['topvisual_s_size']) ? $rb_v_info['topvisual_s_size'] : '16'; ?>px; color:<?php echo !empty($rb_v_info['topvisual_s_color']) ? $rb_v_info['topvisual_s_color'] : '#ffffff'; ?>; font-family:<?php echo !empty($rb_v_info['topvisual_s_font']) ? $rb_v_info['topvisual_s_font'] : 'font-R'; ?>;" <?php if ($is_admin) echo 'contenteditable="true"'; ?>>
|
||||
<?php echo $has_sub ? nl2br(htmlspecialchars($sub)) : ($is_admin ? nl2br("이미지 드랍 및 서브 워딩을 입력할 수 있어요.<br>이 글은 관리자만 볼 수 있어요.") : ''); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const container = document.querySelector('#rb_topvisual_txt');
|
||||
if (!container) return;
|
||||
|
||||
const editableElements = container.querySelectorAll('[contenteditable="true"]');
|
||||
|
||||
editableElements.forEach(el => {
|
||||
el.addEventListener('paste', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
// 클립보드에서 순수 텍스트만 추출
|
||||
const text = (e.clipboardData || window.clipboardData).getData('text');
|
||||
|
||||
// 현재 커서 위치에 삽입
|
||||
if (document.queryCommandSupported('insertText')) {
|
||||
document.execCommand('insertText', false, text);
|
||||
} else {
|
||||
this.innerText += text;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 블러 배경 -->
|
||||
<div id="rb_topvisual_bl" style="border-radius:<?php echo $topvisual_radius ?>px; background-color:rgba(0,0,0,<?php echo $topvisual_bl / 100; ?>);"></div>
|
||||
</div>
|
||||
|
||||
<?php if ($is_admin) { ?>
|
||||
<div id="topvisual_btn_wrap">
|
||||
<button type="button" id="save_topvisual_btn">워딩 저장</button>
|
||||
<button type="button" id="delete_topvisual_btn">이미지 삭제</button>
|
||||
</div>
|
||||
<script>
|
||||
const visual = document.getElementById('rb_topvisual');
|
||||
const fileInput = document.getElementById('topvisual_file_input');
|
||||
|
||||
visual.addEventListener('click', (e) => {
|
||||
if (!e.target.closest('#rb_topvisual_txt')) fileInput.click();
|
||||
});
|
||||
|
||||
visual.addEventListener('dragover', e => {
|
||||
e.preventDefault();
|
||||
visual.style.outline = '2px dashed #ccc';
|
||||
});
|
||||
visual.addEventListener('dragleave', () => visual.style.outline = 'none');
|
||||
visual.addEventListener('drop', e => {
|
||||
e.preventDefault();
|
||||
visual.style.outline = 'none';
|
||||
const file = e.dataTransfer.files[0];
|
||||
if (file) uploadImage(file);
|
||||
});
|
||||
|
||||
fileInput.addEventListener('change', e => {
|
||||
const file = e.target.files[0];
|
||||
if (file) uploadImage(file);
|
||||
});
|
||||
|
||||
function uploadImage(file) {
|
||||
if (!file.type.match('image.*')) return alert('이미지 파일만 업로드 할 수 있습니다.');
|
||||
const formData = new FormData();
|
||||
formData.append('image', file);
|
||||
formData.append('me_code', '<?php echo $rb_v_info['v_code']; ?>');
|
||||
|
||||
fetch('<?php echo G5_URL ?>/rb/rb.config/ajax.topvisual_upload.php', {
|
||||
method: 'POST', body: formData
|
||||
}).then(res => res.json()).then(data => {
|
||||
if (data.success) {
|
||||
const now = new Date().getTime();
|
||||
visual.style.backgroundImage = `url('${data.url}?v=${now}')`;
|
||||
} else alert('업로드 오류 : ' + data.error);
|
||||
});
|
||||
}
|
||||
|
||||
document.getElementById('save_topvisual_btn').addEventListener('click', () => {
|
||||
const main = document.querySelector('.main_wording').innerText.trim();
|
||||
const sub = document.querySelector('.sub_wording').innerText.trim();
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('main', main);
|
||||
formData.append('sub', sub);
|
||||
formData.append('me_code', '<?php echo $rb_v_info['v_code']; ?>');
|
||||
|
||||
fetch('<?php echo G5_URL ?>/rb/rb.config/ajax.topvisual_save.php', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
}).then(res => res.text()).then(res => alert(res));
|
||||
});
|
||||
|
||||
document.getElementById('delete_topvisual_btn').addEventListener('click', () => {
|
||||
if (!confirm('상단 백그라운드 이미지를 삭제 하시겠습니까?')) return;
|
||||
const formData = new FormData();
|
||||
formData.append('me_code', '<?php echo $rb_v_info['v_code']; ?>');
|
||||
|
||||
fetch('<?php echo G5_URL ?>/rb/rb.config/ajax.topvisual_delete.php', {
|
||||
method: 'POST', body: formData
|
||||
}).then(res => res.json()).then(data => {
|
||||
if (data.success) {
|
||||
visual.style.backgroundImage = 'none';
|
||||
alert('이미지가 삭제 되었습니다.');
|
||||
} else alert('삭제 오류 : ' + data.error);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const visual = document.getElementById('rb_topvisual');
|
||||
const main = document.querySelector('.main_wording');
|
||||
const sub = document.querySelector('.sub_wording');
|
||||
|
||||
<?php if (file_exists(G5_DATA_PATH.'/topvisual/'.$key.'.jpg')) { ?>
|
||||
visual.style.backgroundImage = "url('<?php echo $img . '?v=' . time(); ?>')";
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!$is_admin) { ?>
|
||||
main.setAttribute('contenteditable', 'false');
|
||||
sub.setAttribute('contenteditable', 'false');
|
||||
<?php } ?>
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
|
||||
if (isset($rb_v_info['v_use']) && intval($rb_v_info['v_use']) === 1 || isset($rb_v_info['v_use']) && intval($rb_v_info['v_use']) === 2) {
|
||||
|
||||
$topvisual_class = !empty($rb_v_info['v_code']) ? $rb_v_info['v_code'] : '';
|
||||
$topvisual_width = (!empty($rb_v_info['topvisual_width']) && $rb_v_info['topvisual_width'] > 0) ? $rb_v_info['topvisual_width'] . '%' : $rb_core['sub_width'] . 'px';
|
||||
$topvisual_height = !empty($rb_v_info['topvisual_height']) ? $rb_v_info['topvisual_height'] : '200';
|
||||
$topvisual_radius = isset($rb_v_info['topvisual_radius']) ? $rb_v_info['topvisual_radius'] : '0';
|
||||
$topvisual_border = isset($rb_v_info['topvisual_border']) ? $rb_v_info['topvisual_border'] : '0';
|
||||
$topvisual_bg_color = !empty($rb_v_info['topvisual_bg_color']) ? $rb_v_info['topvisual_bg_color'] : '#f9f9f9';
|
||||
$topvisual_bl = isset($rb_v_info['topvisual_bl']) ? $rb_v_info['topvisual_bl'] : '0';
|
||||
|
||||
if(isset($topvisual_width) && $topvisual_width == "100%") {
|
||||
$topvisual_padding = "padding-left:0px; padding-right:0px;";
|
||||
} else {
|
||||
$topvisual_padding = "padding-left:50px; padding-right:50px;";
|
||||
}
|
||||
|
||||
function get_topvisual_key() {
|
||||
global $rb_v_info;
|
||||
return isset($rb_v_info['v_code']) ? $rb_v_info['v_code'] : '';
|
||||
}
|
||||
|
||||
$key = get_topvisual_key();
|
||||
$img = G5_DATA_URL.'/topvisual/'.$key.'.jpg';
|
||||
$txt = G5_DATA_PATH.'/topvisual/'.$key.'.txt';
|
||||
|
||||
$main = '';
|
||||
$sub = '';
|
||||
|
||||
if (file_exists($txt)) {
|
||||
$lines = file($txt, FILE_IGNORE_NEW_LINES);
|
||||
$split = array_search('[SUB]', $lines);
|
||||
if ($split !== false) {
|
||||
$main = implode("\n", array_slice($lines, 0, $split));
|
||||
$sub = implode("\n", array_slice($lines, $split + 1));
|
||||
} else {
|
||||
$main = implode("\n", $lines);
|
||||
}
|
||||
}
|
||||
$has_main = trim($main) !== '';
|
||||
$has_sub = trim($sub) !== '';
|
||||
|
||||
if($topvisual_border == 0) {
|
||||
$topvisual_border_in = "border:0px;";
|
||||
} else if($topvisual_border == 1) {
|
||||
$topvisual_border_in = "border:1px dashed rgba(0,0,0,0.1);";
|
||||
} else if($topvisual_border == 2) {
|
||||
$topvisual_border_in = "border:1px solid rgba(0,0,0,0.1);";
|
||||
} else {
|
||||
$topvisual_border_in = "";
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="rb_topvisual" class="rb_topvisual <?php echo $topvisual_class; ?>" style="background-color:<?php echo $topvisual_bg_color ?>; width:<?php echo $topvisual_width; ?>; height:<?php echo $topvisual_height; ?>px; <?php if(isset($topvisual_width) && $topvisual_width == "100%") { ?>margin-top:0px; border-radius:0px; overflow:inherit;<?php } else { ?>margin-top:50px; border-radius:<?php echo $topvisual_radius ?>px; overflow:hidden;<?php } ?> <?php echo $topvisual_border_in ?>" data-layout="rb_topvisual">
|
||||
|
||||
<?php if ($is_admin) { ?>
|
||||
<input type="file" id="topvisual_file_input" accept="image/*" style="display:none;">
|
||||
<?php } ?>
|
||||
|
||||
<!-- 텍스트 영역 -->
|
||||
<div id="rb_topvisual_txt">
|
||||
<div id="rb_topvisual_txt_inner" style="width:<?php echo $rb_core['sub_width']; ?>px;">
|
||||
<div class="main_wording" style="<?php echo $topvisual_padding ?> text-align:<?php echo !empty($rb_v_info['topvisual_m_align']) ? $rb_v_info['topvisual_m_align'] : 'left'; ?>; font-size:<?php echo !empty($rb_v_info['topvisual_m_size']) ? $rb_v_info['topvisual_m_size'] : '20'; ?>px; color:<?php echo !empty($rb_v_info['topvisual_m_color']) ? $rb_v_info['topvisual_m_color'] : '#ffffff'; ?>; font-family:<?php echo !empty($rb_v_info['topvisual_m_font']) ? $rb_v_info['topvisual_m_font'] : 'font-R'; ?>;" <?php if ($is_admin) echo 'contenteditable="true"'; ?>>
|
||||
<?php echo $has_main ? nl2br(htmlspecialchars($main)) : ($is_admin ? nl2br("메인 워딩을 입력할 수 있어요.") : ''); ?>
|
||||
</div>
|
||||
<div class="sub_wording" style="<?php echo $topvisual_padding ?> text-align:<?php echo !empty($rb_v_info['topvisual_s_align']) ? $rb_v_info['topvisual_s_align'] : 'left'; ?>; font-size:<?php echo !empty($rb_v_info['topvisual_s_size']) ? $rb_v_info['topvisual_s_size'] : '16'; ?>px; color:<?php echo !empty($rb_v_info['topvisual_s_color']) ? $rb_v_info['topvisual_s_color'] : '#ffffff'; ?>; font-family:<?php echo !empty($rb_v_info['topvisual_s_font']) ? $rb_v_info['topvisual_s_font'] : 'font-R'; ?>;" <?php if ($is_admin) echo 'contenteditable="true"'; ?>>
|
||||
<?php echo $has_sub ? nl2br(htmlspecialchars($sub)) : ($is_admin ? nl2br("이미지 드랍 및 서브 워딩을 입력할 수 있어요.<br>이 글은 관리자만 볼 수 있어요.") : ''); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const container = document.querySelector('#rb_topvisual_txt');
|
||||
if (!container) return;
|
||||
|
||||
const editableElements = container.querySelectorAll('[contenteditable="true"]');
|
||||
|
||||
editableElements.forEach(el => {
|
||||
el.addEventListener('paste', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
// 클립보드에서 순수 텍스트만 추출
|
||||
const text = (e.clipboardData || window.clipboardData).getData('text');
|
||||
|
||||
// 현재 커서 위치에 삽입
|
||||
if (document.queryCommandSupported('insertText')) {
|
||||
document.execCommand('insertText', false, text);
|
||||
} else {
|
||||
this.innerText += text;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 블러 배경 -->
|
||||
<div id="rb_topvisual_bl" style="border-radius:<?php echo $topvisual_radius ?>px; background-color:rgba(0,0,0,<?php echo $topvisual_bl / 100; ?>);"></div>
|
||||
</div>
|
||||
|
||||
<?php if ($is_admin) { ?>
|
||||
<div id="topvisual_btn_wrap">
|
||||
<button type="button" id="save_topvisual_btn">워딩 저장</button>
|
||||
<button type="button" id="delete_topvisual_btn">이미지 삭제</button>
|
||||
</div>
|
||||
<script>
|
||||
const visual = document.getElementById('rb_topvisual');
|
||||
const fileInput = document.getElementById('topvisual_file_input');
|
||||
|
||||
visual.addEventListener('click', (e) => {
|
||||
if (!e.target.closest('#rb_topvisual_txt')) fileInput.click();
|
||||
});
|
||||
|
||||
visual.addEventListener('dragover', e => {
|
||||
e.preventDefault();
|
||||
visual.style.outline = '2px dashed #ccc';
|
||||
});
|
||||
visual.addEventListener('dragleave', () => visual.style.outline = 'none');
|
||||
visual.addEventListener('drop', e => {
|
||||
e.preventDefault();
|
||||
visual.style.outline = 'none';
|
||||
const file = e.dataTransfer.files[0];
|
||||
if (file) uploadImage(file);
|
||||
});
|
||||
|
||||
fileInput.addEventListener('change', e => {
|
||||
const file = e.target.files[0];
|
||||
if (file) uploadImage(file);
|
||||
});
|
||||
|
||||
function uploadImage(file) {
|
||||
if (!file.type.match('image.*')) return alert('이미지 파일만 업로드 할 수 있습니다.');
|
||||
const formData = new FormData();
|
||||
formData.append('image', file);
|
||||
formData.append('me_code', '<?php echo $rb_v_info['v_code']; ?>');
|
||||
|
||||
fetch('<?php echo G5_URL ?>/rb/rb.config/ajax.topvisual_upload.php', {
|
||||
method: 'POST', body: formData
|
||||
}).then(res => res.json()).then(data => {
|
||||
if (data.success) {
|
||||
const now = new Date().getTime();
|
||||
visual.style.backgroundImage = `url('${data.url}?v=${now}')`;
|
||||
} else alert('업로드 오류 : ' + data.error);
|
||||
});
|
||||
}
|
||||
|
||||
document.getElementById('save_topvisual_btn').addEventListener('click', () => {
|
||||
const main = document.querySelector('.main_wording').innerText.trim();
|
||||
const sub = document.querySelector('.sub_wording').innerText.trim();
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('main', main);
|
||||
formData.append('sub', sub);
|
||||
formData.append('me_code', '<?php echo $rb_v_info['v_code']; ?>');
|
||||
|
||||
fetch('<?php echo G5_URL ?>/rb/rb.config/ajax.topvisual_save.php', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
}).then(res => res.text()).then(res => alert(res));
|
||||
});
|
||||
|
||||
document.getElementById('delete_topvisual_btn').addEventListener('click', () => {
|
||||
if (!confirm('상단 백그라운드 이미지를 삭제 하시겠습니까?')) return;
|
||||
const formData = new FormData();
|
||||
formData.append('me_code', '<?php echo $rb_v_info['v_code']; ?>');
|
||||
|
||||
fetch('<?php echo G5_URL ?>/rb/rb.config/ajax.topvisual_delete.php', {
|
||||
method: 'POST', body: formData
|
||||
}).then(res => res.json()).then(data => {
|
||||
if (data.success) {
|
||||
visual.style.backgroundImage = 'none';
|
||||
alert('이미지가 삭제 되었습니다.');
|
||||
} else alert('삭제 오류 : ' + data.error);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const visual = document.getElementById('rb_topvisual');
|
||||
const main = document.querySelector('.main_wording');
|
||||
const sub = document.querySelector('.sub_wording');
|
||||
|
||||
<?php if (file_exists(G5_DATA_PATH.'/topvisual/'.$key.'.jpg')) { ?>
|
||||
visual.style.backgroundImage = "url('<?php echo $img . '?v=' . time(); ?>')";
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!$is_admin) { ?>
|
||||
main.setAttribute('contenteditable', 'false');
|
||||
sub.setAttribute('contenteditable', 'false');
|
||||
<?php } ?>
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
header("Content-Type: text/css");
|
||||
$rb_color_set = isset($_GET['rb_color_set']) ? htmlspecialchars($_GET['rb_color_set']) : htmlspecialchars($rb_core['color']);
|
||||
$rb_color_code = isset($_GET['rb_color_code']) ? htmlspecialchars($_GET['rb_color_code']) : htmlspecialchars($rb_config['co_color']);
|
||||
?>
|
||||
|
||||
.<?php echo $rb_color_set ?> .gnb_wrap .snb_wrap .qm_wrap button span {background-color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .gnb_wrap .snb_wrap .qm_wrap a span {background-color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .gnb_wrap .snb_wrap .member_info_wrap a span {color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .top1_bg {background-color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .gnb_wrap nav a:hover {color:<?php echo $rb_color_code ?>}
|
||||
.<?php echo $rb_color_set ?> .bbs_list_label2.label_w3 {color:<?php echo $rb_color_code ?>}
|
||||
.<?php echo $rb_color_set ?> .content_box .admin_ov .mod_edit h2 span {color:<?php echo $rb_color_code ?>}
|
||||
.<?php echo $rb_color_set ?> .bbs_list_label2.label_w3 {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_config h2 span {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .btn_round.btn_round_bg {background-color: <?php echo $rb_color_code ?>; border:1px solid <?php echo $rb_color_code ?>; color:#fff;}
|
||||
.<?php echo $rb_color_set ?> .rb_bbs_wrap .btns_gr_wrap .btns_gr .fl_btns.main_color_bg {background-color: <?php echo $rb_color_code ?>; border-color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_bbs_wrap #bo_cate #bo_cate_on {color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_bbs_wrap .btns_gr_wrap .btns_gr .fl_btns:hover {border-color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .sch_word {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_bbs_wrap .btm_btns .fl_btns:hover {border-color:<?php echo $rb_color_code ?>; color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .btn_submit {background:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .btn_submit:hover {background:<?php echo $rb_color_code ?>}
|
||||
.<?php echo $rb_color_set ?> .main_color {color:<?php echo $rb_color_code ?> !important;}
|
||||
.<?php echo $rb_color_set ?> .rb_bbs_wrap .writer_prof_ul2 .fl_btns:hover {border-color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_bbs_wrap .writer_prof_ul2 .gd_btn {background-color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .btn_submit {background-color: <?php echo $rb_color_code ?> !important;}
|
||||
.<?php echo $rb_color_set ?> .new_win .win_ul .selected {background: <?php echo $rb_color_code ?>; border-color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .reply_btn {background: <?php echo $rb_color_code ?> !important;}
|
||||
.<?php echo $rb_color_set ?> .memo_list .no_read {background-color: <?php echo $rb_color_code ?> !important;}
|
||||
.<?php echo $rb_color_set ?> .add_qa {background-color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_status_bt.active {background-color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_faq .faq_ser_wrap input {border:1px solid <?php echo $rb_color_code ?>; color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_faq #faq_con .con_inner .closer_btn {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_faq #bo_cate #bo_cate_on {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_faq .btns_gr_wrap .btns_gr .fl_btns:hover {border-color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .pg_current {background-color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> #point .point_all {background-color: <?php echo $rb_color_code ?> !important;}
|
||||
.<?php echo $rb_color_set ?> .cbp-hrmenu > ul > li.cbp-hropen a {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .cbp-hrmenu > ul > li.cbp-hropen > a:hover {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> #search_top_btn.ser_open svg path {fill:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> #search_box_wrap .ser_ul_pd .ser_label b {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> #search_box_wrap ul input.w100 {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_serch_skin #bo_cate .sch_on {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_serch_skin .faq_ser_wrap input {color:<?php echo $rb_color_code ?>; border-color:<?php echo $rb_color_code ?>}
|
||||
.<?php echo $rb_color_set ?> .rb_prof .rb_prof_btn .fl_btns {background-color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_prof_tab #bo_cate #bo_cate_on {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> #loadings_spin {border-top-color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> #current_connect .cc_flex .fl_btns:hover {border-color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_bbs_wrap .btm_btns .fl_btns.main_color_bg {background-color: <?php echo $rb_color_code ?>; border-color:<?php echo $rb_color_code ?>}
|
||||
.<?php echo $rb_color_set ?> .beta_ico {background-color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .cc_total_cnt {background-color: <?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .main_rb_bg {background-color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .main_rb_color {color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .main_rb_bordercolor {border-color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_range_item .ui-slider-handle {background-color:<?php echo $rb_color_code ?>;}
|
||||
.<?php echo $rb_color_set ?> .rb_range_item .ui-slider-range {background-color:<?php echo $rb_color_code ?>;}
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
header("Content-type: text/css");
|
||||
include_once('../../common.php');
|
||||
|
||||
// 💡 [핵심 수정] URL 파라미터가 없을 경우를 대비해 기본값을 설정하고, 불필요한 문자를 제거합니다.
|
||||
$header_class = isset($_GET['rb_header_set']) ? preg_replace('/[^a-z0-9_]/i', '', $_GET['rb_header_set']) : (isset($rb_core['header']) ? htmlspecialchars($rb_core['header']) : 'co_header_000000');
|
||||
$header_color = isset($_GET['rb_header_code']) ? $_GET['rb_header_code'] : (isset($rb_config['co_header']) ? htmlspecialchars($rb_config['co_header']) : '#000000');
|
||||
$text_color_name = isset($_GET['rb_header_txt']) && in_array($_GET['rb_header_txt'], ['white', 'black']) ? $_GET['rb_header_txt'] : 'white';
|
||||
|
||||
// 💡 [핵심 수정] 텍스트 색상 이름에 따라 실제 CSS 색상 코드를 할당합니다.
|
||||
$final_text_color = ($text_color_name === 'white') ? '#ffffff' : '#333333';
|
||||
$final_text_color_opposite = ($text_color_name === 'white') ? '#333333' : '#ffffff';
|
||||
|
||||
// 💡 [핵심 수정] 기존 헤더와의 호환성을 위해 변수를 재생성합니다.
|
||||
if ($text_color_name == 'black') { // 밝은 배경
|
||||
$rb_rgba_border = "border-color:rgba(0,0,0,0.1);";
|
||||
$rb_rgba_bg = "background-color:rgba(0,0,0,0.05);";
|
||||
$rb_header_txt = $final_text_color; // #333333
|
||||
$rb_header_search_h = "color:rgba(0,0,0,0.6);";
|
||||
$rb_header_a = $final_text_color;
|
||||
$arr_w = "";
|
||||
} else { // 어두운 배경
|
||||
$rb_rgba_border = "border-color:rgba(255,255,255,0.1);";
|
||||
$rb_rgba_bg = "background-color:rgba(255,255,255,0.1);";
|
||||
$rb_header_txt = $final_text_color; // #ffffff
|
||||
$rb_header_search_h = "color:rgba(255,255,255,0.6);";
|
||||
$rb_header_a = $final_text_color;
|
||||
$arr_w = "background-image: url(../rb.config/image/arr_down_w.svg)";
|
||||
}
|
||||
?>
|
||||
|
||||
/* ==========================================================================
|
||||
1. 새로운 'Trendy' 헤더용 동적 스타일
|
||||
========================================================================== */
|
||||
|
||||
/* 헤더가 is-scrolled 상태일 때만 배경색 적용 (서브페이지 또는 스크롤 시) */
|
||||
main .main-header.is-scrolled {
|
||||
background-color: <?php echo $header_color; ?> !important;
|
||||
/* 투명도가 있는 색상일 경우를 대비해 backdrop-filter 유지 */
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
/* 헤더의 모든 텍스트 및 아이콘 색상을 한 번에 제어 */
|
||||
main .main-header.is-scrolled .gnb-link,
|
||||
main .main-header.is-scrolled .utility-nav a,
|
||||
main .main-header.is-scrolled .utility-nav button,
|
||||
main .main-header.is-scrolled .utility-nav .fa {
|
||||
color: <?php echo $final_text_color; ?> !important;
|
||||
}
|
||||
|
||||
/* 헤더 색상에 따라 메뉴 밑줄 색상도 변경 */
|
||||
main .main-header.is-scrolled .gnb-link::after {
|
||||
background-color: <?php echo $final_text_color; ?> !important;
|
||||
}
|
||||
|
||||
/* 회원가입 버튼 스타일 조정 */
|
||||
main .main-header.is-scrolled .utility-nav .btn-join {
|
||||
background-color: <?php echo $final_text_color; ?> !important;
|
||||
color: <?php echo $final_text_color_opposite; ?> !important;
|
||||
opacity: 0.8;
|
||||
}
|
||||
main .main-header.is-scrolled .utility-nav .btn-join:hover {
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
2. 기존 헤더와의 호환성을 위한 스타일 (원본 유지)
|
||||
========================================================================== */
|
||||
|
||||
.<?php echo $rb_header_set ?> #header {background-color: <?php echo $rb_header_code ?>; border-bottom: 1px solid <?php echo $rb_header_code ?>;}
|
||||
.<?php echo $rb_header_set ?> #header .rows_gnb_wrap {<?php echo $rb_rgba_border ?>}
|
||||
.<?php echo $rb_header_set ?> #header .tog_wrap button svg path {fill:<?php echo $rb_header_txt ?>;}
|
||||
.<?php echo $rb_header_set ?> #header .gnb_wrap nav a {color:<?php echo $rb_header_a ?>;}
|
||||
.<?php echo $rb_header_set ?> #header .gnb_wrap nav a:hover{color:<?php echo $rb_header_txt ?>;}
|
||||
.<?php echo $rb_header_set ?> #header .gnb_wrap .snb_wrap .member_info_wrap span {color:<?php echo $rb_header_txt ?>;}
|
||||
.<?php echo $rb_header_set ?> #header .gnb_wrap .snb_wrap .member_info_wrap {color:<?php echo $rb_header_txt ?>;}
|
||||
.<?php echo $rb_header_set ?> #header .my_btn_wrap .btn_round {<?php echo $rb_rgba_border ?>;}
|
||||
.<?php echo $rb_header_set ?> #header .gnb_wrap .snb_wrap .member_info_wrap a {color:<?php echo $rb_header_a ?>}
|
||||
.<?php echo $rb_header_set ?> #header .logo_wrap span {color:<?php echo $rb_header_txt ?>;}
|
||||
.<?php echo $rb_header_set ?> #header .search_top_wrap_inner button svg path {fill:<?php echo $rb_header_a ?>}
|
||||
.<?php echo $rb_header_set ?> #header .gnb_wrap .snb_wrap .qm_wrap a svg path {fill:<?php echo $rb_header_a ?>}
|
||||
.<?php echo $rb_header_set ?> #header .gnb_wrap .snb_wrap .qm_wrap button svg path {fill:<?php echo $rb_header_a ?>}
|
||||
.<?php echo $rb_header_set ?> #header .gnb_all_menu {<?php echo $arr_w ?>}
|
||||
|
||||
.<?php echo $rb_header_set ?> .co_header_ex_dd {background-color:<?php echo $rb_header_code ?>; color:<?php echo $rb_header_txt ?>; border:1px solid rgba(0,0,0,0.1);}
|
||||
.<?php echo $rb_header_set ?> .co_header_ex_dd svg path {fill:<?php echo $rb_header_a ?>;}
|
||||
.<?php echo $rb_header_set ?> .search_top_wrap input {<?php echo $rb_rgba_bg ?>}
|
||||
.<?php echo $rb_header_set ?> .search_top_wrap input::placeholder {<?php echo $rb_header_search_h ?>}
|
||||
@@ -0,0 +1,228 @@
|
||||
.rb_module_border_ .module_latest_wrap {border:0px;}
|
||||
.rb_module_border_solid .module_latest_wrap {border: 1px solid #ddd;}
|
||||
.rb_module_border_dashed .module_latest_wrap {border: 1px dashed #ddd;}
|
||||
|
||||
.rb_module_border_ .module_widget_wrap {border:0px;}
|
||||
.rb_module_border_solid .module_widget_wrap {border: 1px solid #ddd;}
|
||||
.rb_module_border_dashed .module_widget_wrap {border: 1px dashed #ddd;}
|
||||
|
||||
.rb_module_border_ .module_poll_wrap {border:0px;}
|
||||
.rb_module_border_solid .module_poll_wrap {border: 1px solid #ddd;}
|
||||
.rb_module_border_dashed .module_poll_wrap {border: 1px dashed #ddd;}
|
||||
|
||||
.rb_module_border_ .module_banner_wrap {border:0px;}
|
||||
.rb_module_border_solid .module_banner_wrap {border: 1px solid #ddd;}
|
||||
.rb_module_border_dashed .module_banner_wrap {border: 1px dashed #ddd;}
|
||||
|
||||
.rb_module_border_ .module_item_wrap {border:0px;}
|
||||
.rb_module_border_solid .module_item_wrap {border: 1px solid #ddd;}
|
||||
.rb_module_border_dashed .module_item_wrap {border: 1px dashed #ddd;}
|
||||
|
||||
.rb_module_radius_ .module_latest_wrap {border-radius: 0px;}
|
||||
.rb_module_radius_0 .module_latest_wrap {border-radius: 0px;}
|
||||
.rb_module_radius_5 .module_latest_wrap {border-radius: 5px;}
|
||||
.rb_module_radius_10 .module_latest_wrap {border-radius: 10px;}
|
||||
.rb_module_radius_15 .module_latest_wrap {border-radius: 15px;}
|
||||
.rb_module_radius_20 .module_latest_wrap {border-radius: 20px;}
|
||||
.rb_module_radius_25 .module_latest_wrap {border-radius: 25px;}
|
||||
.rb_module_radius_30 .module_latest_wrap {border-radius: 30px;}
|
||||
|
||||
.rb_module_radius_ .module_widget_wrap {border-radius: 0px;}
|
||||
.rb_module_radius_0 .module_widget_wrap {border-radius: 0px;}
|
||||
.rb_module_radius_5 .module_widget_wrap {border-radius: 5px;}
|
||||
.rb_module_radius_10 .module_widget_wrap {border-radius: 10px;}
|
||||
.rb_module_radius_15 .module_widget_wrap {border-radius: 15px;}
|
||||
.rb_module_radius_20 .module_widget_wrap {border-radius: 20px;}
|
||||
.rb_module_radius_25 .module_widget_wrap {border-radius: 25px;}
|
||||
.rb_module_radius_30 .module_widget_wrap {border-radius: 30px;}
|
||||
|
||||
.rb_module_radius_ .module_poll_wrap {border-radius: 0px;}
|
||||
.rb_module_radius_0 .module_poll_wrap {border-radius: 0px;}
|
||||
.rb_module_radius_5 .module_poll_wrap {border-radius: 5px;}
|
||||
.rb_module_radius_10 .module_poll_wrap {border-radius: 10px;}
|
||||
.rb_module_radius_15 .module_poll_wrap {border-radius: 15px;}
|
||||
.rb_module_radius_20 .module_poll_wrap {border-radius: 20px;}
|
||||
.rb_module_radius_25 .module_poll_wrap {border-radius: 25px;}
|
||||
.rb_module_radius_30 .module_poll_wrap {border-radius: 30px;}
|
||||
|
||||
.rb_module_radius_ .module_item_wrap {border-radius: 0px;}
|
||||
.rb_module_radius_0 .module_item_wrap {border-radius: 0px;}
|
||||
.rb_module_radius_5 .module_item_wrap {border-radius: 5px;}
|
||||
.rb_module_radius_10 .module_item_wrap {border-radius: 10px;}
|
||||
.rb_module_radius_15 .module_item_wrap {border-radius: 15px;}
|
||||
.rb_module_radius_20 .module_item_wrap {border-radius: 20px;}
|
||||
.rb_module_radius_25 .module_item_wrap {border-radius: 25px;}
|
||||
.rb_module_radius_30 .module_item_wrap {border-radius: 30px;}
|
||||
|
||||
.rb_module_radius_ .module_banner_wrap {border-radius: 0px;}
|
||||
.rb_module_radius_0 .module_banner_wrap {border-radius: 0px;}
|
||||
.rb_module_radius_5 .module_banner_wrap {border-radius: 5px;}
|
||||
.rb_module_radius_10 .module_banner_wrap {border-radius: 10px;}
|
||||
.rb_module_radius_15 .module_banner_wrap {border-radius: 15px;}
|
||||
.rb_module_radius_20 .module_banner_wrap {border-radius: 20px;}
|
||||
.rb_module_radius_25 .module_banner_wrap {border-radius: 25px;}
|
||||
.rb_module_radius_30 .module_banner_wrap {border-radius: 30px;}
|
||||
|
||||
.rb_module_padding_ .module_latest_wrap {padding: 0px;}
|
||||
.rb_module_padding_0 .module_latest_wrap {padding: 0px;}
|
||||
.rb_module_padding_5 .module_latest_wrap {padding: 5px;}
|
||||
.rb_module_padding_10 .module_latest_wrap {padding: 10px;}
|
||||
.rb_module_padding_15 .module_latest_wrap {padding: 15px;}
|
||||
.rb_module_padding_20 .module_latest_wrap {padding: 20px;}
|
||||
.rb_module_padding_25 .module_latest_wrap {padding: 25px;}
|
||||
.rb_module_padding_30 .module_latest_wrap {padding: 30px;}
|
||||
|
||||
.rb_module_padding_ .module_widget_wrap {padding: 0px;}
|
||||
.rb_module_padding_0 .module_widget_wrap {padding: 0px;}
|
||||
.rb_module_padding_5 .module_widget_wrap {padding: 5px;}
|
||||
.rb_module_padding_10 .module_widget_wrap {padding: 10px;}
|
||||
.rb_module_padding_15 .module_widget_wrap {padding: 15px;}
|
||||
.rb_module_padding_20 .module_widget_wrap {padding: 20px;}
|
||||
.rb_module_padding_25 .module_widget_wrap {padding: 25px;}
|
||||
.rb_module_padding_30 .module_widget_wrap {padding: 30px;}
|
||||
|
||||
.rb_module_padding_ .module_banner_wrap {padding: 0px;}
|
||||
.rb_module_padding_0 .module_banner_wrap {padding: 0px;}
|
||||
.rb_module_padding_5 .module_banner_wrap {padding: 5px;}
|
||||
.rb_module_padding_10 .module_banner_wrap {padding: 10px;}
|
||||
.rb_module_padding_15 .module_banner_wrap {padding: 15px;}
|
||||
.rb_module_padding_20 .module_banner_wrap {padding: 20px;}
|
||||
.rb_module_padding_25 .module_banner_wrap {padding: 25px;}
|
||||
.rb_module_padding_30 .module_banner_wrap {padding: 30px;}
|
||||
|
||||
.rb_module_padding_ .module_poll_wrap {padding: 0px;}
|
||||
.rb_module_padding_0 .module_poll_wrap {padding: 0px;}
|
||||
.rb_module_padding_5 .module_poll_wrap {padding: 5px;}
|
||||
.rb_module_padding_10 .module_poll_wrap {padding: 10px;}
|
||||
.rb_module_padding_15 .module_poll_wrap {padding: 15px;}
|
||||
.rb_module_padding_20 .module_poll_wrap {padding: 20px;}
|
||||
.rb_module_padding_25 .module_poll_wrap {padding: 25px;}
|
||||
.rb_module_padding_30 .module_poll_wrap {padding: 30px;}
|
||||
|
||||
.rb_module_padding_ .module_item_wrap {padding: 0px;}
|
||||
.rb_module_padding_0 .module_item_wrap {padding: 0px;}
|
||||
.rb_module_padding_5 .module_item_wrap {padding: 5px;}
|
||||
.rb_module_padding_10 .module_item_wrap {padding: 10px;}
|
||||
.rb_module_padding_15 .module_item_wrap {padding: 15px;}
|
||||
.rb_module_padding_20 .module_item_wrap {padding: 20px;}
|
||||
.rb_module_padding_25 .module_item_wrap {padding: 25px;}
|
||||
.rb_module_padding_30 .module_item_wrap {padding: 30px;}
|
||||
|
||||
|
||||
|
||||
.co_gap_pc_ .content_box {padding: 0px;}
|
||||
.co_gap_pc_ .flex_box {margin-left: -0px; margin-right: -0px;}
|
||||
.co_gap_pc_0 .content_box {padding: 0px;}
|
||||
.co_gap_pc_0 .flex_box {margin-left: -0px; margin-right: -0px;}
|
||||
.co_gap_pc_5 .content_box {padding: 5px;}
|
||||
.co_gap_pc_5 .flex_box {margin-left: -5px; margin-right: -5px;}
|
||||
.co_gap_pc_10 .content_box {padding: 10px;}
|
||||
.co_gap_pc_10 .flex_box {margin-left: -10px; margin-right: -10px;}
|
||||
.co_gap_pc_15 .content_box {padding: 15px;}
|
||||
.co_gap_pc_15 .flex_box {margin-left: -15px; margin-right: -15px;}
|
||||
.co_gap_pc_20 .content_box {padding: 20px;}
|
||||
.co_gap_pc_20 .flex_box {margin-left: -20px; margin-right: -20px;}
|
||||
.co_gap_pc_25 .content_box {padding: 25px;}
|
||||
.co_gap_pc_25 .flex_box {margin-left: -25px; margin-right: -25px;}
|
||||
.co_gap_pc_30 .content_box {padding: 30px;}
|
||||
.co_gap_pc_30 .flex_box {margin-left: -30px; margin-right: -30px;}
|
||||
|
||||
.adm_co_gap_pc_ {padding: 0px;}
|
||||
.adm_co_gap_pc_0 {padding: 0px;}
|
||||
.adm_co_gap_pc_5 {padding: 5px;}
|
||||
.adm_co_gap_pc_10 {padding: 10px;}
|
||||
.adm_co_gap_pc_15 {padding: 15px;}
|
||||
.adm_co_gap_pc_20 {padding: 20px;}
|
||||
.adm_co_gap_pc_25 {padding: 25px;}
|
||||
.adm_co_gap_pc_30 {padding: 30px;}
|
||||
/*
|
||||
section.co_gap_pc_0 {margin-top: 20px;}
|
||||
section.co_gap_pc_5 {margin-top: 15px;}
|
||||
section.co_gap_pc_10 {margin-top: 10px;}
|
||||
section.co_gap_pc_15 {margin-top: 5px;}
|
||||
section.co_gap_pc_20 {margin-top: 0px;}
|
||||
section.co_gap_pc_25 {margin-top: -5px;}
|
||||
section.co_gap_pc_30 {margin-top: -10px;}
|
||||
*/
|
||||
@media all and (max-width:1024px) {
|
||||
.content_box {padding:0px !important;}
|
||||
.flex_box {margin-left: 0px !important; margin-right: 0px !important; margin-bottom: 20px;}
|
||||
|
||||
|
||||
.rb_module_border_solid .module_latest_wrap {margin-left: 20px; margin-right: 20px; margin-top: 20px;}
|
||||
.rb_module_border_dashed .module_latest_wrap {margin-left: 20px; margin-right: 20px; margin-top: 20px;}
|
||||
|
||||
.rb_module_border_solid .module_widget_wrap {margin-left: 20px; margin-right: 20px; margin-top: 20px;}
|
||||
.rb_module_border_dashed .module_widget_wrap {margin-left: 20px; margin-right: 20px; margin-top: 20px;}
|
||||
|
||||
.rb_module_border_solid .module_poll_wrap {margin-left: 20px; margin-right: 20px; margin-top: 20px;}
|
||||
.rb_module_border_dashed .module_poll_wrap {margin-left: 20px; margin-right: 20px; margin-top: 20px;}
|
||||
|
||||
.rb_module_border_solid .module_item_wrap {margin-left: 20px; margin-right: 20px; margin-top: 20px;}
|
||||
.rb_module_border_dashed .module_item_wrap {margin-left: 20px; margin-right: 20px; margin-top: 20px;}
|
||||
|
||||
.rb_module_border_solid .module_banner_wrap {margin-left: 20px; margin-right: 20px; margin-top: 20px;}
|
||||
.rb_module_border_dashed .module_banner_wrap {margin-left: 20px; margin-right: 20px; margin-top: 20px;}
|
||||
|
||||
.module_latest_wrap {padding: 0px !important;}
|
||||
.module_widget_wrap {padding: 0px !important;}
|
||||
.module_poll_wrap {padding: 0px !important;}
|
||||
.module_item_wrap {padding: 0px !important;}
|
||||
.module_banner_wrap {padding: 0px !important;}
|
||||
|
||||
}
|
||||
|
||||
/* ui { */
|
||||
.module_style_set_wrap {display: flex; gap: 0px 20px;flex-direction: row;flex-wrap: wrap; align-items: center;}
|
||||
.rb_range_item {
|
||||
width: 70%;
|
||||
height: 4px;
|
||||
border: 0;
|
||||
border-radius: 100px;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
border:0px !important;
|
||||
}
|
||||
|
||||
.rb_range_item .ui-slider-handle {
|
||||
position: absolute;
|
||||
margin: -6px 0 0 -17px;
|
||||
border-radius: 100px;
|
||||
color: #fff;
|
||||
border: 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
width: 34px;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
font-size: 10px;
|
||||
text-decoration: none;
|
||||
transition: transform 0.1s ease;
|
||||
color:#fff !important;
|
||||
}
|
||||
|
||||
.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%);
|
||||
}
|
||||
/* } */
|
||||
|
||||
.content_box {position: relative;}
|
||||
|
||||
.flex_box_inner .no_data_section {display: none !important;}
|
||||
.flex_box_inner {margin-left: 0px !important; margin-right: 0px !important;}
|
||||
.flex_box_inner .rb_layout_box .add_module_wrap {display: none !important;}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
if (!$is_member)
|
||||
alert('회원만 이용하실 수 있습니다.');
|
||||
|
||||
$sql = " delete from {$g5['memo_table']} where me_send_mb_id = 'system-msg' and me_recv_mb_id = '{$member['mb_id']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = " update `{$g5['member_table']}` set mb_memo_cnt = '".get_memo_not_read($member['mb_id'])."' where mb_id = '{$member['mb_id']}' ";
|
||||
sql_query($sql);
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
$mod_type = isset($_POST['mod_type']) ? $_POST['mod_type'] : '';
|
||||
$is_shop = isset($_POST['is_shop']) ? $_POST['is_shop'] : '';
|
||||
?>
|
||||
|
||||
<?php if(isset($mod_type) && $mod_type == "ca_name") {
|
||||
|
||||
$md_bo_table = isset($_POST['md_bo_table']) ? $_POST['md_bo_table'] : '';
|
||||
|
||||
if(isset($md_bo_table) && $md_bo_table) {
|
||||
|
||||
// 해당게시판의 카테고리 조회
|
||||
$res_ca = sql_fetch (" select bo_category_list from {$g5['board_table']} where bo_table = '{$md_bo_table}' and bo_use_category = '1' ");
|
||||
$cat = isset($res_ca['bo_category_list']) ? $res_ca['bo_category_list'] : '';
|
||||
$cat_opt = explode("|", $cat);
|
||||
|
||||
}
|
||||
?>
|
||||
<?php if(isset($md_bo_table) && $md_bo_table) { ?>
|
||||
<?php if(isset($cat) && $cat) { ?>
|
||||
<ul class="mt-5 selected_latest selected_select">
|
||||
<select class="select w100" name="md_sca" id="md_sca">
|
||||
<option value="">전체 카테고리</option>
|
||||
<?php foreach($cat_opt as $option): ?>
|
||||
<option value="<?php echo $option; ?>"><?php echo $option; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if(isset($mod_type) && $mod_type == "ca_name_tab") {
|
||||
|
||||
$md_bo_table = isset($_POST['md_bo_table']) ? $_POST['md_bo_table'] : '';
|
||||
|
||||
if(isset($md_bo_table) && $md_bo_table) {
|
||||
|
||||
// 해당게시판의 카테고리 조회
|
||||
$res_ca = sql_fetch (" select bo_category_list from {$g5['board_table']} where bo_table = '{$md_bo_table}' and bo_use_category = '1' ");
|
||||
$cat = isset($res_ca['bo_category_list']) ? $res_ca['bo_category_list'] : '';
|
||||
$cat_opt = explode("|", $cat);
|
||||
|
||||
}
|
||||
?>
|
||||
<?php if(isset($md_bo_table) && $md_bo_table) { ?>
|
||||
|
||||
<ul class="mt-5 selected_tab selected_select">
|
||||
<select class="select w100" name="md_sca_tab" id="tab_sca">
|
||||
|
||||
<option value="">카테고리를 선택하세요.</option>
|
||||
<?php foreach($cat_opt as $option): ?>
|
||||
<?php if(isset($option) && $option) { ?>
|
||||
<option value="<?php echo $option; ?>"><?php echo $option; ?></option>
|
||||
<?php } ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<option value="">전체</option>
|
||||
|
||||
</select>
|
||||
</ul>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php
|
||||
if(isset($mod_type) && $mod_type == "mod_order") {
|
||||
$order = $_POST['order'];
|
||||
|
||||
if ($order && is_array($order)) {
|
||||
// 각 아이템의 순서를 업데이트
|
||||
foreach ($order as $item) {
|
||||
$md_id = $item['id'];
|
||||
$order_id = $item['order_id'];
|
||||
if(isset($is_shop) && $is_shop == 1) {
|
||||
$sql = "UPDATE rb_module_shop SET md_order_id = {$order_id} WHERE md_id = {$md_id};";
|
||||
} else {
|
||||
$sql = "UPDATE rb_module SET md_order_id = {$order_id} WHERE md_id = {$md_id};";
|
||||
}
|
||||
sql_query($sql);
|
||||
}
|
||||
echo "success";
|
||||
} else {
|
||||
echo "Invalid order data";
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
include_once(G5_LIB_PATH.'/naver_syndi.lib.php');
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
|
||||
$return = ['res' => 'false', 'msg' => '오류', 'list' => []];
|
||||
|
||||
if (empty($_POST['act_type']) || empty($_POST['bo_table']) || empty($_POST['write_table'])) {
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
|
||||
$bo_table = preg_replace('/[^a-z0-9_]/i', '', $_POST['bo_table']);
|
||||
$write_table = preg_replace('/[^a-z0-9_]/i', '', $_POST['write_table']);
|
||||
$wr_id = isset($_POST['wr_id']) ? intval($_POST['wr_id']) : 0;
|
||||
|
||||
// 삭제 처리
|
||||
if ($_POST['act_type'] === 'delete') {
|
||||
if (empty($_POST['bf_file'])) {
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
$bf_file = basename($_POST['bf_file']);
|
||||
$file_path = G5_DATA_PATH . "/file/{$bo_table}/{$bf_file}";
|
||||
|
||||
if (is_file($file_path)) {
|
||||
@unlink($file_path);
|
||||
if (isset($config['cf_image_extension']) && preg_match("/\.({$config['cf_image_extension']})$/i", $bf_file)) {
|
||||
delete_board_thumbnail($bo_table, $bf_file);
|
||||
}
|
||||
}
|
||||
|
||||
sql_query("DELETE FROM {$g5['board_file_table']} WHERE bo_table = '" . sql_real_escape_string($bo_table) . "' AND wr_id = '{$wr_id}' AND bf_file = '" . sql_real_escape_string($bf_file) . "'");
|
||||
|
||||
$return['res'] = 'true';
|
||||
$return['msg'] = '파일이 삭제 되었습니다.';
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
|
||||
// 업로드 처리
|
||||
@mkdir(G5_DATA_PATH . "/file/{$bo_table}", G5_DIR_PERMISSION, true);
|
||||
@chmod(G5_DATA_PATH . "/file/{$bo_table}", G5_DIR_PERMISSION);
|
||||
|
||||
$allowed_extensions = explode('|', $config['cf_image_extension'] . '|' . $config['cf_movie_extension'] . '|webp|hwp|xlsx|xls|zip|pdf|ppt|pptx|docx|doc|txt');
|
||||
$allowed_mimes = [
|
||||
// 이미지
|
||||
'image/jpeg', 'image/png', 'image/gif', 'image/bmp', 'image/webp', 'image/svg+xml',
|
||||
|
||||
// 동영상
|
||||
'video/mp4', 'video/mpeg', 'video/ogg', 'video/webm', 'video/x-msvideo', 'video/quicktime', 'video/x-flv',
|
||||
|
||||
// 오디오
|
||||
'audio/mpeg', 'audio/wav', 'audio/ogg', 'audio/mp4', 'audio/webm', 'audio/x-ms-wma',
|
||||
|
||||
// 문서
|
||||
'application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||
'application/rtf', 'text/plain', 'application/vnd.hancom.hwp',
|
||||
|
||||
// 압축파일
|
||||
'application/zip', 'application/x-rar-compressed', 'application/x-7z-compressed', 'application/x-tar', 'application/gzip',
|
||||
|
||||
// 코드 및 기타
|
||||
'text/html', 'application/javascript', 'text/css', 'application/json', 'application/xml', 'text/csv',
|
||||
|
||||
// 기타 가능성 있는 MIME
|
||||
'application/octet-stream'
|
||||
];
|
||||
|
||||
if (isset($_FILES['file']) && count($_FILES['file']['name']) > 0) {
|
||||
$list = [];
|
||||
for ($i = 0; $i < count($_FILES['file']['name']); $i++) {
|
||||
$tmp_file = $_FILES['file']['tmp_name'][$i];
|
||||
$orig_name = $_FILES['file']['name'][$i];
|
||||
$safe_name = preg_replace("/[^a-zA-Z0-9._-]/", "_", $orig_name);
|
||||
|
||||
// 이중 확장자 검사 (ex. test.php.jpg)
|
||||
if (preg_match("/\.(php|pht|phtml|cgi|pl|exe|jsp|asp|inc|sh|js|html|htm|xml)(\.[a-z0-9]+)?$/i", $safe_name)) {
|
||||
$return['msg'] = '이중 확장자 또는 금지된 확장자가 포함되어 있습니다.';
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
|
||||
// MIME 타입 검사
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||
$mime = finfo_file($finfo, $tmp_file);
|
||||
finfo_close($finfo);
|
||||
|
||||
$ext = strtolower(pathinfo($safe_name, PATHINFO_EXTENSION));
|
||||
if (!in_array($ext, $allowed_extensions) || !in_array($mime, $allowed_mimes)) {
|
||||
$return['msg'] = '허용되지 않는 파일 형식입니다.';
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
|
||||
// 저장 파일명 생성
|
||||
$unique = abs(ip2long($_SERVER['REMOTE_ADDR'])) . '_' . uniqid();
|
||||
$new_filename = $unique . '_' . $safe_name;
|
||||
$dest_file = G5_DATA_PATH . "/file/{$bo_table}/{$new_filename}";
|
||||
|
||||
if (move_uploaded_file($tmp_file, $dest_file)) {
|
||||
chmod($dest_file, G5_FILE_PERMISSION);
|
||||
|
||||
$f = [
|
||||
'bf_source' => htmlspecialchars($orig_name, ENT_QUOTES, 'UTF-8'),
|
||||
'bf_file' => $new_filename,
|
||||
'bf_filesize' => filesize($dest_file),
|
||||
'bf_datetime' => G5_TIME_YMDHIS,
|
||||
'extension' => $ext,
|
||||
'view' => '',
|
||||
];
|
||||
|
||||
$timg = @getimagesize($dest_file);
|
||||
if ($timg) {
|
||||
$f['bf_width'] = $timg[0];
|
||||
$f['bf_height'] = $timg[1];
|
||||
$f['bf_type'] = $timg[2];
|
||||
$f['view'] = '<img src="' . G5_DATA_URL . '/file/' . $bo_table . '/' . $new_filename . '" style="max-width:100%;" />';
|
||||
} else {
|
||||
$f['view'] = "<div class=\"w_pd\"><a href=\"javascript:void(0);\" class=\"w_etc w_{$ext}\">{$ext}</a></div>";
|
||||
}
|
||||
|
||||
$list[] = $f;
|
||||
}
|
||||
}
|
||||
$return['res'] = 'true';
|
||||
$return['msg'] = '업로드 완료';
|
||||
$return['list'] = $list;
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
} else {
|
||||
$return['msg'] = '파일을 선택하세요';
|
||||
echo json_encode($return);
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
if (!$is_member) {
|
||||
alert('회원만 이용하실 수 있습니다.');
|
||||
}
|
||||
|
||||
// JSON 응답 함수
|
||||
function send_json_response($success, $message, $image_url = '') {
|
||||
echo json_encode(['success' => $success, 'message' => $message, 'image_url' => $image_url]);
|
||||
exit;
|
||||
}
|
||||
|
||||
// 요청 방식과 파일 확인
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['profile_image'])) {
|
||||
$file = $_FILES['profile_image'];
|
||||
$mb_id = isset($member['mb_id']) ? $member['mb_id'] : '';
|
||||
|
||||
if (empty($mb_id)) {
|
||||
send_json_response(false, '회원 아이디가 없습니다.');
|
||||
}
|
||||
|
||||
// 회원 ID 앞 두 글자로 디렉토리 생성
|
||||
$first_two_chars = substr($mb_id, 0, 2);
|
||||
$upload_dir = G5_DATA_PATH . "/member_image/$first_two_chars";
|
||||
|
||||
// 디렉토리 존재 확인 및 생성
|
||||
if (!is_dir($upload_dir)) {
|
||||
if (!mkdir($upload_dir, G5_DIR_PERMISSION, true) && !is_dir($upload_dir)) {
|
||||
send_json_response(false, '디렉토리를 생성할 수 없습니다.');
|
||||
}
|
||||
chmod($upload_dir, G5_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
// 파일 확장자 확인
|
||||
$allowed_ext = ['gif', 'jpg', 'jpeg', 'png'];
|
||||
$file_ext = strtolower(pathinfo($file['name'], PATHINFO_EXTENSION));
|
||||
|
||||
if (!in_array($file_ext, $allowed_ext)) {
|
||||
send_json_response(false, '허용되지 않은 파일 형식입니다.');
|
||||
}
|
||||
|
||||
// 용량 제한 검사
|
||||
if ($file['size'] > $config['cf_member_img_size']) {
|
||||
send_json_response(false, '파일 크기가 너무 큽니다. 최대 ' . number_format($config['cf_member_img_size']) . ' 바이트까지 업로드 가능합니다.');
|
||||
}
|
||||
|
||||
// 파일명 지정 (고정된 GIF 이름 사용)
|
||||
$new_filename = "$mb_id.gif";
|
||||
$upload_path = "$upload_dir/$new_filename";
|
||||
|
||||
// 파일 업로드
|
||||
if (!move_uploaded_file($file['tmp_name'], $upload_path)) {
|
||||
send_json_response(false, '파일 업로드 실패');
|
||||
}
|
||||
|
||||
// 업로드된 이미지 정보 확인
|
||||
$size = @getimagesize($upload_path);
|
||||
if (!$size || !in_array($size[2], [IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG])) {
|
||||
@unlink($upload_path);
|
||||
send_json_response(false, '잘못된 이미지 파일입니다.');
|
||||
}
|
||||
|
||||
// 섬네일 생성 (원본 크기보다 크면 생성)
|
||||
if ($size[0] > $config['cf_member_img_width'] || $size[1] > $config['cf_member_img_height']) {
|
||||
$thumb = thumbnail($new_filename, $upload_dir, $upload_dir, $config['cf_member_img_width'], $config['cf_member_img_height'], true, true);
|
||||
if ($thumb) {
|
||||
@unlink($upload_path);
|
||||
rename("$upload_dir/$thumb", $upload_path);
|
||||
} else {
|
||||
@unlink($upload_path);
|
||||
send_json_response(false, '섬네일 생성 실패');
|
||||
}
|
||||
}
|
||||
|
||||
// 업로드된 이미지 URL 반환
|
||||
$image_url = G5_DATA_URL . "/member_image/$first_two_chars/$new_filename?v=".G5_SERVER_TIME;
|
||||
send_json_response(true, '파일 업로드 성공', $image_url);
|
||||
} else {
|
||||
send_json_response(false, '잘못된 요청');
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
$ajax_files = json_decode(stripslashes($_POST['ajax_files']),true);
|
||||
$files = empty($ajax_files['files']) ? [] : $ajax_files['files'];
|
||||
$del = empty($ajax_files['del']) ? [] : $ajax_files['del'];
|
||||
//echo '<pre>';
|
||||
//print_r($ajax_files);
|
||||
//print_r($files);
|
||||
//print_r($del);
|
||||
//exit;
|
||||
|
||||
if($files){
|
||||
$file_cnt = count($files);
|
||||
if($del){ //여집합으로 총파일수구함
|
||||
$not_del = [];
|
||||
foreach($files as $v){ $not_del[] = empty($v['file']) ? $v['bf_file'] : $v['file']; }
|
||||
$c = array_intersect($del,$not_del);
|
||||
$d = array_diff($del,$c);
|
||||
$e = array_diff($not_del,$c);
|
||||
$f = array_merge($d,$e);
|
||||
$file_cnt = count($f);
|
||||
}
|
||||
if($file_cnt>$board['bo_upload_count']){
|
||||
foreach($files as $v){
|
||||
if(empty($v['href'])){
|
||||
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$v['bf_file']);
|
||||
delete_board_thumbnail($bo_table,$v['bf_file']);
|
||||
}
|
||||
}
|
||||
alert('첨부파일을 '.number_format($board['bo_upload_count']).'개 이하로 업로드 해주십시오.');exit;
|
||||
}
|
||||
$row = sql_fetch(" select max(bf_no) as num from {$g5['board_file_table']} where bo_table='{$bo_table}' and wr_id ='{$wr_id}'");
|
||||
$num = empty($row['num']) ? 0 : $row['num'];
|
||||
foreach($files as $v){
|
||||
if(empty($v['href'])){
|
||||
$num++;
|
||||
$sql = "insert into {$g5['board_file_table']} set
|
||||
bo_table = '{$bo_table}',
|
||||
wr_id = '{$wr_id}',
|
||||
bf_no = '{$num}',
|
||||
bf_source = '{$v['bf_source']}',
|
||||
bf_file = '{$v['bf_file']}',
|
||||
bf_filesize = '{$v['bf_filesize']}',
|
||||
bf_width = '{$v['bf_width']}',
|
||||
bf_height = '{$v['bf_height']}',
|
||||
bf_type = '{$v['bf_type']}',
|
||||
bf_datetime = '".G5_TIME_YMDHIS."' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
if($del){
|
||||
sql_query('delete from `'.$g5['board_file_table'].'` where bo_table="'.$bo_table.'" and wr_id='.$wr_id.' and bf_file in ("'.implode('","',array_values($del)).'")');
|
||||
}
|
||||
$sql = "select * from {$g5['board_file_table']} where bo_table='{$bo_table}' and wr_id='{$wr_id}'";
|
||||
$result = sql_query($sql);
|
||||
$i=0;
|
||||
while($row = sql_fetch_array($result)){
|
||||
$sql = "update {$g5['board_file_table']} set bf_no='{$i}' where bo_table='{$bo_table}' and wr_id='{$wr_id}' and bf_no='{$row['bf_no']}'";
|
||||
sql_query($sql);
|
||||
$i++;
|
||||
}
|
||||
//sql_query('delete from `'.$g5['board_file_table'].'` where bo_table="'.$bo_table.'" and wr_id='.$wr_id.' and bf_file=""');
|
||||
|
||||
// 파일의 개수를 게시물에 업데이트 한다.
|
||||
$rows = 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 = '{$rows['cnt']}' where wr_id = '{$wr_id}' ");
|
||||
?>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
/**
|
||||
* Rebuilder 모듈 설정 로드 라이브러리
|
||||
* rb/rb.lib/module.lib.php
|
||||
*/
|
||||
|
||||
function get_rb_module_config($md_id) {
|
||||
global $g5, $rb_module_table;
|
||||
|
||||
if (!$md_id) return array();
|
||||
|
||||
// 모듈 설정 테이블 조회
|
||||
$rb_skin = sql_fetch(" select * from {$rb_module_table} where md_id = '{$md_id}' ");
|
||||
|
||||
// 기본값 설정 (필요시)
|
||||
if (!isset($rb_skin['md_width']) || !$rb_skin['md_width']) $rb_skin['md_width'] = 180;
|
||||
if (!isset($rb_skin['md_height']) || !$rb_skin['md_height']) $rb_skin['md_height'] = 150;
|
||||
|
||||
return $rb_skin;
|
||||
}
|
||||
|
||||
/*
|
||||
[참고] 모듈설정 연동 변수 ($rb_skin 배열 키)
|
||||
$rb_skin['md_id'] 설정ID
|
||||
$rb_skin['md_layout'] 레이아웃 섹션ID
|
||||
$rb_skin['md_layout_name'] 레이아웃 스킨명
|
||||
$rb_skin['md_theme'] 테마명
|
||||
$rb_skin['md_title'] 타이틀(제목)
|
||||
$rb_skin['md_bo_table'] 게시판ID
|
||||
$rb_skin['md_skin'] 스킨명
|
||||
$rb_skin['md_cnt'] 출력갯수
|
||||
$rb_skin['md_col'] 행갯수
|
||||
$rb_skin['md_row'] 열갯수
|
||||
$rb_skin['md_col_mo'] 행갯수(모바일)
|
||||
$rb_skin['md_row_mo'] 열갯수(모바일)
|
||||
$rb_skin['md_gap'] 게시물 간격(여백)
|
||||
$rb_skin['md_gap_mo'] 모바일 게시물 간격(여백)
|
||||
$rb_skin['md_width'] 가로사이즈
|
||||
$rb_skin['md_height'] 세로사이즈
|
||||
$rb_skin['md_auto_time'] 자동롤링 시간
|
||||
$rb_skin['md_thumb_is'] 썸네일 출력여부(1,0)
|
||||
$rb_skin['md_nick_is'] 닉네임 출력여부(1,0)
|
||||
$rb_skin['md_date_is'] 작성일 출력여부(1,0)
|
||||
$rb_skin['md_content_is'] 본문내용 출력여부(1,0)
|
||||
$rb_skin['md_icon_is'] 아이콘 출력여부(1,0)
|
||||
$rb_skin['md_comment_is'] 댓글수 출력여부(1,0)
|
||||
$rb_skin['md_swiper_is'] 스와이프 여부(1,0)
|
||||
$rb_skin['md_auto_is'] 자동롤링 여부(1,0)
|
||||
*/
|
||||
?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
include_once('../../../common.php');
|
||||
|
||||
// 커뮤니티 사용여부
|
||||
/*
|
||||
if(defined('G5_COMMUNITY_USE') && G5_COMMUNITY_USE === false) {
|
||||
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
|
||||
die('<p>쇼핑몰 설치 후 이용해 주십시오.</p>');
|
||||
|
||||
define('_SHOP_', true);
|
||||
}
|
||||
*/
|
||||
@@ -0,0 +1,91 @@
|
||||
var show_alarm_exist=false;
|
||||
|
||||
function check_alarm(){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
data: { act: 'alarm' },
|
||||
url: memo_alarm_url + '/get-events.php',
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
cache: false,
|
||||
success: function(result) {
|
||||
if(result.msg == 'SUCCESS') {
|
||||
// URL을 추출하는 정규식
|
||||
const urlRegex = /(https?:\/\/[^\s]+)/g;
|
||||
const urlMatches = result.content.match(urlRegex);
|
||||
// 추출된 URL이 있으면 그 값을 사용하고, 없으면 me_id 사용
|
||||
const urlOrMeId = urlMatches ? urlMatches[0] : result.me_id;
|
||||
// 추출된 값을 show_alarm으로 전달
|
||||
show_alarm(result.title, result.content, result.url, urlOrMeId, result.me_send_datetime, result.me_id);
|
||||
} else {
|
||||
// 오류 처리
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function show_alarm(title, content, url, urlOrMeId, me_send_datetime, me_id) {
|
||||
if(show_alarm_exist) hide_alarm();
|
||||
show_alarm_exist = true;
|
||||
var html = "";
|
||||
// audio.play(); // 알림 소리 재생
|
||||
html = "<div id='alarm_layer' class='wrapper-notification bottom right side' style='display:none'>";
|
||||
html += "<div class='notification notification-primary notification-msg animated bounceInUp' id='" + me_id + "'>";
|
||||
|
||||
// 알림 옵션 부분 (닫기 버튼, 읽음 처리 버튼 등)
|
||||
html += "<div class='notification-option'>";
|
||||
|
||||
|
||||
html += "<button class='notification-check' data-toggle='tooltip' data-trigger='hover' data-html='true' data-placement='top' data-original-title='읽음' onclick='set_recv_memo(\"" + me_id + "\")'>";
|
||||
|
||||
html += "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-x'><line x1='18' y1='6' x2='6' y2='18'></line><line x1='6' y1='6' x2='18' y2='18'></line></svg></button>";
|
||||
html += "</div>";
|
||||
|
||||
html += "<a href='../bbs/memo_view.php?me_id=" + me_id + "&kind=recv' onclick='win_memo(this.href); return false;'>";
|
||||
|
||||
html += "<div class='notification-heading'><span class='font-B'>새 알림</span> <span class='al_date'>" + me_send_datetime + "</span></div>";
|
||||
html += "<div class='notification-content cut2 cursor'>" + content + "</div>";
|
||||
html += "</a>";
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
|
||||
$('body').prepend(html);
|
||||
$('#alarm_layer').fadeIn();
|
||||
setTimeout(function(){ hide_alarm(); }, 30000);
|
||||
}
|
||||
|
||||
|
||||
function hide_alarm(){
|
||||
if(show_alarm_exist){
|
||||
show_alarm_exist=false;
|
||||
$("#alarm_layer").fadeOut(400,function(){
|
||||
$('#alarm_layer').remove();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
function set_recv_memo(me_id){
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
data : ({act : 'recv_memo', me_id : me_id}),
|
||||
url: memo_alarm_url + '/get-events.php',
|
||||
dataType:'json',
|
||||
async:true,
|
||||
cache:false,
|
||||
success:function(result){
|
||||
if(result.msg=='SUCCESS'){
|
||||
hide_alarm();
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function RemoveTag(s){
|
||||
var tmp = '';
|
||||
tmp = s;
|
||||
tmp = tmp.replace('<','<');
|
||||
tmp = tmp.replace('>','>');
|
||||
tmp = tmp.replace('"','"');
|
||||
|
||||
return tmp;
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
.alert {
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.alert h4 {
|
||||
margin-top: 0;
|
||||
color: inherit
|
||||
}
|
||||
|
||||
.alert .alert-link {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.alert>p,
|
||||
.alert>ul {
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.alert>p+p {
|
||||
margin-top: 5px
|
||||
}
|
||||
|
||||
.alert-dismissable,
|
||||
.alert-dismissible {
|
||||
padding-right: 35px
|
||||
}
|
||||
|
||||
.alert-dismissable .close,
|
||||
.alert-dismissible .close {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
right: -21px;
|
||||
color: inherit
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
background-color: #dff0d8;
|
||||
border-color: #d6e9c6;
|
||||
color: #3c763d
|
||||
}
|
||||
|
||||
.alert-success hr {
|
||||
border-top-color: #c9e2b3
|
||||
}
|
||||
|
||||
.alert-success .alert-link {
|
||||
color: #2b542c
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
background-color: #d9edf7;
|
||||
border-color: #bce8f1;
|
||||
color: #31708f
|
||||
}
|
||||
|
||||
.alert-info hr {
|
||||
border-top-color: #a6e1ec
|
||||
}
|
||||
|
||||
.alert-info .alert-link {
|
||||
color: #245269
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
background-color: #fcf8e3;
|
||||
border-color: #faebcc;
|
||||
color: #8a6d3b
|
||||
}
|
||||
|
||||
.alert-warning hr {
|
||||
border-top-color: #f7e1b5
|
||||
}
|
||||
|
||||
.alert-warning .alert-link {
|
||||
color: #66512c
|
||||
}
|
||||
|
||||
.alert-danger {
|
||||
background-color: #f2dede;
|
||||
border-color: #ebccd1;
|
||||
color: #a94442
|
||||
}
|
||||
|
||||
.alert-danger hr {
|
||||
border-top-color: #e4b9c0
|
||||
}
|
||||
|
||||
.alert-danger .alert-link {
|
||||
color: #843534
|
||||
}
|
||||
|
||||
.wrapper-alert,
|
||||
.wrapper-notification {
|
||||
position: fixed;
|
||||
padding: 10px;
|
||||
left: 5px;
|
||||
bottom:5px;
|
||||
/*position: absolute;*/
|
||||
z-index: 999;
|
||||
/*left: 5px;
|
||||
right: 5px*/
|
||||
}
|
||||
|
||||
.wrapper-alert.top,
|
||||
.wrapper-notification.top {
|
||||
top: 10px
|
||||
}
|
||||
|
||||
.wrapper-alert.bottom,
|
||||
.wrapper-notification.bottom {
|
||||
bottom: 0
|
||||
}
|
||||
|
||||
.wrapper-alert.left,
|
||||
.wrapper-notification.left {
|
||||
left: 10px;
|
||||
right: auto
|
||||
}
|
||||
|
||||
.wrapper-alert.right,
|
||||
.wrapper-notification.right {
|
||||
left: 50px;
|
||||
right: auto;
|
||||
bottom:40px;
|
||||
}
|
||||
|
||||
.wrapper-alert-circle {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-top: -60px;
|
||||
margin-left: -60px;
|
||||
z-index: 3001
|
||||
}
|
||||
|
||||
.alert-circle {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
font-size: 150%;
|
||||
color: #fff;
|
||||
animation-duration: .2s;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
padding-top: 65px
|
||||
}
|
||||
.notification,
|
||||
.notification-custom {
|
||||
padding: 20px;
|
||||
margin-bottom: 0px;
|
||||
border: 0px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 5px 5px 15px rgba(0, 0, 0, .1);
|
||||
background: #fff;
|
||||
min-width: 300px;
|
||||
max-height: 600px;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
word-wrap: break-word;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.notification-close,
|
||||
.notification-custom-close {
|
||||
text-align: right
|
||||
}
|
||||
|
||||
.notification-close>.dropdown-menu,
|
||||
.notification-custom-close>.dropdown-menu {
|
||||
top: 8px;
|
||||
float: right;
|
||||
right: 20px;
|
||||
left: auto;
|
||||
min-width: 50px
|
||||
}
|
||||
|
||||
.notification-close>.dropdown-menu>li,
|
||||
.notification-custom-close>.dropdown-menu>li {
|
||||
text-align: right
|
||||
}
|
||||
|
||||
.notification-close>a,
|
||||
.notification-custom-close>a {
|
||||
color: #999
|
||||
}
|
||||
|
||||
.notification-close>.close,
|
||||
.notification-custom-close>.close {
|
||||
opacity: .6;
|
||||
font-size: 13px
|
||||
}
|
||||
.wrapper-notification.side {
|
||||
width: 350px
|
||||
}
|
||||
|
||||
.wrapper-notification.side>.notification,
|
||||
.wrapper-notification.side>.notification-custom {
|
||||
cursor: pointer;
|
||||
overflow: visible
|
||||
}
|
||||
|
||||
.wrapper-notification.main {
|
||||
top: 20%;
|
||||
left: 50%;
|
||||
width: 500px;
|
||||
margin: 0 0 0 -250px
|
||||
}
|
||||
|
||||
.wrapper-notification.main .notification,
|
||||
.wrapper-notification.main .notification-custom {
|
||||
padding-left: 10px
|
||||
}
|
||||
|
||||
.notification-heading,
|
||||
.notification-custom-heading {
|
||||
padding: 0 15px 10px 0px;
|
||||
/*color: #005b9e;*/
|
||||
color: #000;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.wrapper-notification.main .notification-heading,
|
||||
.wrapper-notification.main .notification-custom-heading {
|
||||
font-size: 116.6666%;
|
||||
font-weight: bold;
|
||||
padding-left: 0
|
||||
}
|
||||
|
||||
.notification-success,
|
||||
.notification-success .notification,
|
||||
.notification-success .notification-custom {
|
||||
border-color: #10b045 !important
|
||||
}
|
||||
|
||||
.notification-success .notification-heading,
|
||||
.notification-success .notification-custom-heading {
|
||||
color: #10b045 !important
|
||||
}
|
||||
|
||||
.notification-info,
|
||||
.notification-info .notification,
|
||||
.notification-info .notification-custom {
|
||||
border-color: #3a87ad !important
|
||||
}
|
||||
|
||||
.notification-info .notification-heading,
|
||||
.notification-info .notification-custom-heading {
|
||||
color: #3a87ad !important
|
||||
}
|
||||
|
||||
.notification-warning,
|
||||
.notification-warning .notification,
|
||||
.notification-warning .notification-custom {
|
||||
border-color: #ff8f32 !important
|
||||
}
|
||||
|
||||
.notification-warning .notification-heading,
|
||||
.notification-warning .notification-custom-heading {
|
||||
color: #db741d !important
|
||||
}
|
||||
|
||||
.notification-danger,
|
||||
.notification-danger .notification,
|
||||
.notification-danger .notification-custom {
|
||||
border-color: #d23737 !important
|
||||
}
|
||||
|
||||
.notification-danger .notification-heading,
|
||||
.notification-danger .notification-custom-heading {
|
||||
color: #d23737 !important
|
||||
}
|
||||
|
||||
.notification-icon {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: 10px;
|
||||
z-index: 6;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
background-color: #756FAD;
|
||||
padding-left: 7px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
.notification-info .notification-icon {
|
||||
background-color: #3a87ad
|
||||
}
|
||||
|
||||
.notification-success .notification-icon {
|
||||
background-color: #10b045
|
||||
}
|
||||
|
||||
.notification-warning .notification-icon {
|
||||
background-color: #ff8f32
|
||||
}
|
||||
|
||||
.notification-danger .notification-icon {
|
||||
background-color: #d23737
|
||||
}
|
||||
.notification-option {
|
||||
position: absolute;
|
||||
right: 13px;
|
||||
top: 15px;
|
||||
}
|
||||
|
||||
.notification-content {line-height: 150%;}
|
||||
|
||||
.notification-option .notification-check {
|
||||
border: none;
|
||||
color: #000;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.al_date {font-size: 11px; color:#888;}
|
||||
|
||||
.close {
|
||||
float: right;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
opacity: .2
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
opacity: .5
|
||||
}
|
||||
|
||||
button.close {
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
-webkit-appearance: none
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media all and (max-width:1024px) {
|
||||
.wrapper-alert.right,
|
||||
.wrapper-notification.right {
|
||||
max-width:250px;
|
||||
left: 10px;
|
||||
bottom:10px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
var show_alarm_exist=false;
|
||||
|
||||
function check_alarm(){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
data: { act: 'alarm' },
|
||||
url: memo_alarm_url + '/get-events.php',
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
cache: false,
|
||||
success: function(result) {
|
||||
if(result.msg == 'SUCCESS') {
|
||||
// URL을 추출하는 정규식
|
||||
const urlRegex = /(https?:\/\/[^\s]+)/g;
|
||||
const urlMatches = result.content.match(urlRegex);
|
||||
// 추출된 URL이 있으면 그 값을 사용하고, 없으면 me_id 사용
|
||||
const urlOrMeId = urlMatches ? urlMatches[0] : result.me_id;
|
||||
// 추출된 값을 show_alarm으로 전달
|
||||
show_alarm(result.title, result.content, result.url, urlOrMeId, result.me_send_datetime, result.me_id);
|
||||
} else {
|
||||
// 오류 처리
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function show_alarm(title, content, url, urlOrMeId, me_send_datetime, me_id) {
|
||||
if(show_alarm_exist) hide_alarm();
|
||||
show_alarm_exist = true;
|
||||
var html = "";
|
||||
// audio.play(); // 알림 소리 재생
|
||||
html = "<div id='alarm_layer' class='wrapper-notification bottom right side' style='display:none'>";
|
||||
html += "<div class='notification notification-primary notification-msg animated bounceInUp' id='" + me_id + "'>";
|
||||
|
||||
// 알림 옵션 부분 (닫기 버튼, 읽음 처리 버튼 등)
|
||||
html += "<div class='notification-option'>";
|
||||
|
||||
|
||||
html += "<button class='notification-check' data-toggle='tooltip' data-trigger='hover' data-html='true' data-placement='top' data-original-title='읽음' onclick='set_recv_memo(\"" + me_id + "\")'>";
|
||||
|
||||
html += "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-x'><line x1='18' y1='6' x2='6' y2='18'></line><line x1='6' y1='6' x2='18' y2='18'></line></svg></button>";
|
||||
html += "</div>";
|
||||
|
||||
if (urlOrMeId.startsWith("http")) {
|
||||
html += "<a href='" + urlOrMeId + "' data-original-title='읽음' onclick='set_recv_memo(\"" + me_id + "\");'>";
|
||||
} else {
|
||||
html += "<a href='../bbs/memo_view.php?me_id=" + me_id + "&kind=recv' onclick='win_memo(this.href); return false;'>";
|
||||
}
|
||||
html += "<div class='notification-heading'><span class='font-B'>새 알림</span> <span class='al_date'>" + me_send_datetime + "</span></div>";
|
||||
html += "<div class='notification-content cut2 cursor'>" + content + "</div>";
|
||||
html += "</a>";
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
|
||||
$('body').prepend(html);
|
||||
$('#alarm_layer').fadeIn();
|
||||
setTimeout(function(){ hide_alarm(); }, 30000);
|
||||
}
|
||||
|
||||
|
||||
function hide_alarm(){
|
||||
if(show_alarm_exist){
|
||||
show_alarm_exist=false;
|
||||
$("#alarm_layer").fadeOut(400,function(){
|
||||
$('#alarm_layer').remove();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
function set_recv_memo(me_id){
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
data : ({act : 'recv_memo', me_id : me_id}),
|
||||
url: memo_alarm_url + '/get-events.php',
|
||||
dataType:'json',
|
||||
async:true,
|
||||
cache:false,
|
||||
success:function(result){
|
||||
if(result.msg=='SUCCESS'){
|
||||
hide_alarm();
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function RemoveTag(s){
|
||||
var tmp = '';
|
||||
tmp = s;
|
||||
tmp = tmp.replace('<','<');
|
||||
tmp = tmp.replace('>','>');
|
||||
tmp = tmp.replace('"','"');
|
||||
|
||||
return tmp;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; //개별 페이지 접근 불가
|
||||
|
||||
// 간격
|
||||
//echo help('기본 60000ms, 밀리초(ms)는 천분의 1초. ex) 60초 = 60000ms');
|
||||
$wset['delay'] = '60000';
|
||||
$wset['delay'] = (isset($wset['delay']) && $wset['delay'] >= 60000) ? $wset['delay'] : 60000;
|
||||
$alarm_url = G5_URL . "/rb/rb.mod/alarm";
|
||||
?>
|
||||
|
||||
<?php
|
||||
// 특정 페이지에서 alarm 표시 안함
|
||||
$except_alarm_page = array(
|
||||
'memo.php',
|
||||
'point.php',
|
||||
'scrap.php',
|
||||
'profile.php',
|
||||
'coupon.php',
|
||||
'memo_form.php'
|
||||
);
|
||||
|
||||
if (!in_array(basename($_SERVER['PHP_SELF']), $except_alarm_page)) {
|
||||
if (isset($member['mb_id']) && $member['mb_id']) { // $member 배열과 'mb_id' 키가 정의되어 있는지 확인 ?>
|
||||
<link rel="stylesheet" href="<?php echo $alarm_url ?>/alarm.css">
|
||||
<script>
|
||||
var memo_alarm_url = "<?php echo $alarm_url; ?>";
|
||||
//var audio = new Audio("<?php echo $alarm_url;?>/memo_on.mp3"); // 임의 폴더 아래에 사운드 파일을 넣고 자바스크립트 동일경로
|
||||
</script>
|
||||
<?php
|
||||
$dirs = dirname($_SERVER['PHP_SELF']); // $PHP_SELF 대신 $_SERVER['PHP_SELF'] 사용
|
||||
$dirs_chk = str_replace('/', '', $dirs);
|
||||
?>
|
||||
|
||||
<?php if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == $app['ap_title']) { ?>
|
||||
<script src="<?php echo $alarm_url ?>/alarm.app.js"></script>
|
||||
<?php } else { ?>
|
||||
<script src="<?php echo $alarm_url ?>/alarm.js"></script>
|
||||
<?php } ?>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
setInterval(function() {
|
||||
check_alarm();
|
||||
}, <?php echo $wset['delay'] ?>);
|
||||
check_alarm();
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
include_once('../_common.php');
|
||||
|
||||
$act = isset($_POST['act']) ? $_POST['act'] : '';
|
||||
|
||||
if ($act == 'alarm') {
|
||||
$result = array();
|
||||
$row = sql_fetch("SELECT * FROM {$g5['memo_table']} WHERE me_recv_mb_id = '{$member['mb_id']}' AND me_send_datetime >= NOW() - INTERVAL 2 DAY AND me_read_datetime = '0000-00-00 00:00:00' ORDER BY me_id DESC LIMIT 1");
|
||||
|
||||
if ($row) {
|
||||
$result['content'] = isset($row['me_memo']) ? $row['me_memo'] : '';
|
||||
$result['msg'] = 'SUCCESS';
|
||||
$result['me_id'] = isset($row['me_id']) ? $row['me_id'] : '';
|
||||
//$result['sound'] = 'N';
|
||||
$mb = get_member($row['me_send_mb_id'], 'mb_name');
|
||||
$result['title'] = isset($mb['mb_name']) ? $mb['mb_name'] : '';
|
||||
$result['me_send_datetime'] = isset($row['me_send_datetime']) ? $row['me_send_datetime'] : '';
|
||||
$result['url'] = G5_URL . '/bbs/memo.php';
|
||||
} else {
|
||||
$result['msg'] = 'NOMSG';
|
||||
$result['me_id'] = '';
|
||||
}
|
||||
echo json_encode($result);
|
||||
}
|
||||
|
||||
if ($act == 'recv_memo') {
|
||||
$result = array();
|
||||
|
||||
$me_id = isset($_POST['me_id']) ? $_POST['me_id'] : '';
|
||||
|
||||
$sql = "UPDATE {$g5['memo_table']}
|
||||
SET me_read_datetime = '".G5_TIME_YMDHIS."'
|
||||
WHERE me_id = '$me_id'
|
||||
AND me_read_datetime = '0000-00-00 00:00:00'";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = "UPDATE `{$g5['member_table']}` SET mb_memo_cnt = '".get_memo_not_read($member['mb_id'])."' WHERE mb_id = '{$member['mb_id']}'";
|
||||
sql_query($sql);
|
||||
|
||||
$result['msg'] = 'SUCCESS';
|
||||
|
||||
echo json_encode($result);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
$i = 0; // $i 변수를 초기화
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$bn_border = isset($row['bn_border']) && $row['bn_border'] ? ' bn_border' : '';
|
||||
$bn_radius = isset($row['bn_radius']) && $row['bn_radius'] ? ' bn_radius' : '';
|
||||
|
||||
// 새창 옵션
|
||||
$bn_new_win = isset($row['bn_new_win']) && $row['bn_new_win'] ? ' target="_blank"' : '';
|
||||
|
||||
if ($i == 0) echo '<div class="random_bn">'.PHP_EOL;
|
||||
|
||||
$bimg = G5_DATA_PATH.'/banners/'.$row['bn_id'];
|
||||
if (file_exists($bimg)) {
|
||||
$banner = '';
|
||||
$size = getimagesize($bimg);
|
||||
echo '<div class="random_item top_ad'.$bn_border.$bn_radius.'">'.PHP_EOL;
|
||||
if ($row['bn_url'][0] == '#')
|
||||
$banner .= '<a href="'.$row['bn_url'].'">';
|
||||
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
|
||||
$banner .= '<a href="'.G5_URL.'/rb/rb.mod/banner/bannerhit.php?bn_id='.$row['bn_id'].'"'.$bn_new_win.'>';
|
||||
}
|
||||
echo $banner.'<img src="'.G5_DATA_URL.'/banners/'.$row['bn_id'].'?ver='.G5_SERVER_TIME.'" title="'.get_text($row['bn_alt']).'" width="100%">';
|
||||
if ($banner) {
|
||||
echo '</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if (isset($row['bn_ad_ico']) && $row['bn_ad_ico']) {
|
||||
echo '<span class="ico_ad">AD</span>'.PHP_EOL;
|
||||
}
|
||||
echo '</div>'.PHP_EOL;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($i > 0) echo '</div>'.PHP_EOL;
|
||||
?>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
include_once("../_common.php");
|
||||
|
||||
$bn_id = isset($bn_id) ? (int)$bn_id : 0;
|
||||
|
||||
$sql = "SELECT bn_id, bn_url FROM rb_banner WHERE bn_id = '$bn_id'";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if (!isset($row['bn_id']) || !$row['bn_id']) {
|
||||
alert('등록된 배너가 없습니다.', G5_URL);
|
||||
}
|
||||
|
||||
if (!isset($_COOKIE['ck_bn_id']) || $_COOKIE['ck_bn_id'] != $bn_id) {
|
||||
$sql = "UPDATE rb_banner SET bn_hit = bn_hit + 1 WHERE bn_id = '$bn_id'";
|
||||
sql_query($sql);
|
||||
// 하루 동안
|
||||
set_cookie("ck_bn_id", $bn_id, 60*60*24);
|
||||
}
|
||||
|
||||
$url = isset($row['bn_url']) ? clean_xss_tags($row['bn_url']) : G5_URL;
|
||||
|
||||
goto_url($url);
|
||||
?>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: border_anim/banner.skin.php
|
||||
* 배너 그룹 스킨 (래퍼)
|
||||
*/
|
||||
|
||||
// CSS 로드
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/border_anim/style.css">', 0);
|
||||
|
||||
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
|
||||
if (isset($banners) && is_array($banners)) {
|
||||
foreach ($banners as $banner) {
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
} else if (isset($banner)) {
|
||||
// 단일 배너인 경우
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: border_anim/skin.php
|
||||
* 단일 배너 아이템 스킨
|
||||
*/
|
||||
?>
|
||||
<div class="rb-banner-border-anim">
|
||||
<a href="<?php echo $banner['bn_url']; ?>"
|
||||
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
|
||||
onclick="banner_click_count(this); return true;"
|
||||
data-banner-id="<?php echo $banner['bn_id']; ?>">
|
||||
<div class="banner-image">
|
||||
<?php echo $banner['bn_img']; ?>
|
||||
</div>
|
||||
<div class="banner-content">
|
||||
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
|
||||
</div>
|
||||
<div class="border-top-left"></div>
|
||||
<div class="border-top-right"></div>
|
||||
<div class="border-bottom-left"></div>
|
||||
<div class="border-bottom-right"></div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -0,0 +1,71 @@
|
||||
.rb-banner-border-anim {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-border-anim a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-border-anim .banner-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-border-anim .banner-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.rb-banner-border-anim .banner-content {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
background: rgba(0,0,0,0.5);
|
||||
padding: 10px 20px;
|
||||
border-radius: 5px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.rb-banner-border-anim:hover .banner-content {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.rb-banner-border-anim h3 {
|
||||
margin: 0;
|
||||
font-size: 1.2rem;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.rb-banner-border-anim [class^="border-"] {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
.rb-banner-border-anim .border-top-left, .rb-banner-border-anim .border-top-right { height: 3px; width: 0; }
|
||||
.rb-banner-border-anim .border-bottom-left, .rb-banner-border-anim .border-bottom-right { width: 3px; height: 0; }
|
||||
|
||||
.rb-banner-border-anim .border-top-left { top: 0; left: 0; }
|
||||
.rb-banner-border-anim .border-top-right { top: 0; right: 0; }
|
||||
.rb-banner-border-anim .border-bottom-left { bottom: 0; left: 0; }
|
||||
.rb-banner-border-anim .border-bottom-right { bottom: 0; right: 0; }
|
||||
|
||||
.rb-banner-border-anim:hover .border-top-left, .rb-banner-border-anim:hover .border-top-right { width: 100%; }
|
||||
.rb-banner-border-anim:hover .border-bottom-left, .rb-banner-border-anim:hover .border-bottom-right { height: 100%; }
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: card_overlay/banner.skin.php
|
||||
* 배너 그룹 스킨 (래퍼)
|
||||
*/
|
||||
|
||||
// CSS 로드
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/card_overlay/style.css">', 0);
|
||||
|
||||
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
|
||||
if (isset($banners) && is_array($banners)) {
|
||||
foreach ($banners as $banner) {
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
} else if (isset($banner)) {
|
||||
// 단일 배너인 경우
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: card_overlay/skin.php
|
||||
* 단일 배너 아이템 스킨
|
||||
*/
|
||||
?>
|
||||
<div class="rb-banner-card-overlay">
|
||||
<a href="<?php echo $banner['bn_url']; ?>"
|
||||
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
|
||||
onclick="banner_click_count(this); return true;"
|
||||
data-banner-id="<?php echo $banner['bn_id']; ?>">
|
||||
<div class="banner-image">
|
||||
<?php echo $banner['bn_img']; ?>
|
||||
</div>
|
||||
<div class="banner-content">
|
||||
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -0,0 +1,46 @@
|
||||
/* 💡 [최종 수정] 스킨 자체는 크기를 갖지 않고, 부모 컨테이너를 100% 채우도록 수정 */
|
||||
.rb-banner-card-overlay {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-card-overlay a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-card-overlay .banner-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-card-overlay .banner-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.rb-banner-card-overlay .banner-content {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.rb-banner-card-overlay h3 {
|
||||
margin: 0;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: image_only/banner.skin.php
|
||||
* 배너 그룹 스킨 (래퍼)
|
||||
*/
|
||||
|
||||
// CSS 로드
|
||||
|
||||
|
||||
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
|
||||
if (isset($banners) && is_array($banners)) {
|
||||
foreach ($banners as $banner) {
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
} else if (isset($banner)) {
|
||||
// 단일 배너인 경우
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: image_only/skin.php
|
||||
* 단일 배너 아이템 스킨 (이미지만 출력)
|
||||
*/
|
||||
|
||||
// 💡 [핵심 수정] 이 스킨의 CSS 파일을 불러옵니다.
|
||||
//add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/image_only/style.css?ver='.G5_SERVER_TIME.'">', 0);
|
||||
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_URL; ?>/rb/rb.mod/banner/skin/image_only/style.css?ver=<?php echo G5_SERVER_TIME; ?>">
|
||||
<div class="rb-banner-image-only">
|
||||
<a href="<?php echo $banner['bn_url']; ?>"
|
||||
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
|
||||
onclick="banner_click_count(this); return true;"
|
||||
data-banner-id="<?php echo $banner['bn_id']; ?>">
|
||||
<div class="banner-image">
|
||||
<?php echo $banner['bn_img']; ?>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -0,0 +1,26 @@
|
||||
/* Image Only Banner Skin - Final Fix */
|
||||
|
||||
/* 💡 [핵심] 부모(.banner-unit-wrapper)의 공간을 100% 채우도록 강제 */
|
||||
.rb-banner-image-only {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-image-only a,
|
||||
.rb-banner-image-only .banner-image {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-image-only img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: fill;
|
||||
max-height: 85px;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 💡 [핵심] 스킨이 의존하는 전역 변수들을 명시적으로 선언합니다.
|
||||
global $row_mod, $rb_module_table;
|
||||
|
||||
// 💡 [초기화] $rb_skin 변수를 빈 배열로 먼저 선언합니다.
|
||||
// 이렇게 하면, 아래에서 설정을 불러오지 못하더라도 다른 부분에서 오류가 발생하지 않습니다.
|
||||
$rb_skin = array();
|
||||
|
||||
// 💡 [핵심 수정] Rebuilder 모듈 변수($row_mod)가 존재하고, 그 안에 md_id 값이 있을 때만 DB 조회를 실행합니다.
|
||||
// 이렇게 하면 $row_mod가 null일 때 발생하는 오류를 원천적으로 방지할 수 있습니다.
|
||||
if (isset($row_mod['md_id']) && $row_mod['md_id'] && isset($rb_module_table) && $rb_module_table) {
|
||||
$rb_skin = sql_fetch("SELECT * FROM {$rb_module_table} WHERE md_id = '{$row_mod['md_id']}'");
|
||||
}
|
||||
|
||||
// 💡 [개선] $rb_skin['md_banner_bg'] 값이 없을 경우를 대비하여 기본값을 설정합니다.
|
||||
$md_banner_bg = isset($rb_skin['md_banner_bg']) ? $rb_skin['md_banner_bg'] : '';
|
||||
|
||||
?>
|
||||
|
||||
<style>
|
||||
.basic_item {margin-top: 10px;}
|
||||
.basic_item:first-child {margin-top: 0px;}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
$i = 0; // $i 변수를 초기화
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$bn_border = isset($row['bn_border']) && $row['bn_border'] ? ' bn_border' : '';
|
||||
$bn_radius = isset($row['bn_radius']) && $row['bn_radius'] ? ' bn_radius' : '';
|
||||
|
||||
// 새창 옵션
|
||||
$bn_new_win = isset($row['bn_new_win']) && $row['bn_new_win'] ? ' target="_blank"' : '';
|
||||
|
||||
// 💡 [개선] 배경색($md_banner_bg)이 있을 때만 style 속성을 출력하도록 수정합니다.
|
||||
if ($i == 0) {
|
||||
$bg_style = $md_banner_bg ? ' style="background-color:'.$md_banner_bg.'"' : '';
|
||||
echo '<div class="mod_bn_wrap"'.$bg_style.'>'.PHP_EOL;
|
||||
}
|
||||
|
||||
$bimg = G5_DATA_PATH.'/banners/'.$row['bn_id'];
|
||||
if (file_exists($bimg)) {
|
||||
$banner = '';
|
||||
$size = getimagesize($bimg);
|
||||
echo '<div class="basic_item top_ad '.$bn_border.$bn_radius.'">'.PHP_EOL;
|
||||
if ($row['bn_url'][0] == '#')
|
||||
$banner .= '<a href="'.$row['bn_url'].'">';
|
||||
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
|
||||
$banner .= '<a href="'.G5_URL.'/rb/rb.mod/banner/bannerhit.php?bn_id='.$row['bn_id'].'"'.$bn_new_win.'>';
|
||||
}
|
||||
echo $banner.'<img src="'.G5_DATA_URL.'/banners/'.$row['bn_id'].'?ver='.G5_SERVER_TIME.'" title="'.get_text($row['bn_alt']).'" width="100%">';
|
||||
if ($banner) {
|
||||
echo '</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if (isset($row['bn_ad_ico']) && $row['bn_ad_ico']) {
|
||||
echo '<span class="ico_ad">AD</span>'.PHP_EOL;
|
||||
}
|
||||
echo '</div>'.PHP_EOL;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($i > 0) echo '</div>'.PHP_EOL;
|
||||
?>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
global $row_mod, $rb_module_table;
|
||||
$rb_skin = sql_fetch (" select * from {$rb_module_table} where md_id = '{$row_mod['md_id']}' "); //최신글 환경설정 테이블 조회 (삭제금지)
|
||||
$md_banner_bg = isset($rb_skin['md_banner_bg']) ? $rb_skin['md_banner_bg'] : '';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
$i = 0; // $i 변수를 초기화
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$bn_border = isset($row['bn_border']) && $row['bn_border'] ? ' bn_border' : '';
|
||||
$bn_radius = isset($row['bn_radius']) && $row['bn_radius'] ? ' bn_radius' : '';
|
||||
|
||||
// 새창 옵션
|
||||
$bn_new_win = isset($row['bn_new_win']) && $row['bn_new_win'] ? ' target="_blank"' : '';
|
||||
|
||||
if ($i == 0) echo '<div class="mod_bn_wrap" style="background-color:'.$md_banner_bg.'">'.PHP_EOL;
|
||||
|
||||
$bimg = G5_DATA_PATH.'/banners/'.$row['bn_id'];
|
||||
if (file_exists($bimg)) {
|
||||
$banner = '';
|
||||
$size = getimagesize($bimg);
|
||||
echo '<div class="random_item top_ad '.$bn_border.$bn_radius.'">'.PHP_EOL;
|
||||
if ($row['bn_url'][0] == '#')
|
||||
$banner .= '<a href="'.$row['bn_url'].'">';
|
||||
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
|
||||
$banner .= '<a href="'.G5_URL.'/rb/rb.mod/banner/bannerhit.php?bn_id='.$row['bn_id'].'"'.$bn_new_win.'>';
|
||||
}
|
||||
echo $banner.'<img src="'.G5_DATA_URL.'/banners/'.$row['bn_id'].'?ver='.G5_SERVER_TIME.'" title="'.get_text($row['bn_alt']).'" width="100%">';
|
||||
if ($banner) {
|
||||
echo '</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if (isset($row['bn_ad_ico']) && $row['bn_ad_ico']) {
|
||||
echo '<span class="ico_ad">AD</span>'.PHP_EOL;
|
||||
}
|
||||
echo '</div>'.PHP_EOL;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($i > 0) echo '</div>'.PHP_EOL;
|
||||
?>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
global $row_mod, $rb_module_table;
|
||||
$rb_skin = sql_fetch (" select * from {$rb_module_table} where md_id = '{$row_mod['md_id']}' "); //최신글 환경설정 테이블 조회 (삭제금지)
|
||||
$md_banner_bg = isset($rb_skin['md_banner_bg']) ? $rb_skin['md_banner_bg'] : '';
|
||||
|
||||
?>
|
||||
|
||||
<style>
|
||||
.swiper-button-next-slide_bn {right:20px;}
|
||||
.swiper-button-prev-slide_bn {left:20px;}
|
||||
.swiper-button-next-slide_bn svg {width: 10px;}
|
||||
.swiper-button-prev-slide_bn svg {width: 10px;}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<?php
|
||||
$i = 0; // $i 변수를 초기화
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$bn_border = isset($row['bn_border']) && $row['bn_border'] ? ' bn_border' : '';
|
||||
$bn_radius = isset($row['bn_radius']) && $row['bn_radius'] ? ' bn_radius' : '';
|
||||
|
||||
// 새창 옵션
|
||||
$bn_new_win = isset($row['bn_new_win']) && $row['bn_new_win'] ? ' target="_blank"' : '';
|
||||
|
||||
if ($i == 0) echo '<div class="mod_bn_wrap" style="background-color:'.$md_banner_bg.'"><div class="swiper-container swiper-container-slide_bn swiper-container-slide_bn_'.$row_mod['md_id'].'"><ul class="swiper-wrapper swiper-wrapper-slide_bn swiper-wrapper-slide_bn_'.$row_mod['md_id'].'">'.PHP_EOL;
|
||||
|
||||
$bimg = G5_DATA_PATH.'/banners/'.$row['bn_id'];
|
||||
if (file_exists($bimg)) {
|
||||
$banner = '';
|
||||
$size = getimagesize($bimg);
|
||||
echo '<div class="swiper-slide swiper-slide-slide_bn swiper-slide-slide_bn_'.$row_mod['md_id'].' slide_item top_ad '.$bn_border.$bn_radius.'">'.PHP_EOL;
|
||||
if ($row['bn_url'][0] == '#')
|
||||
$banner .= '<a href="'.$row['bn_url'].'">';
|
||||
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
|
||||
$banner .= '<a href="'.G5_URL.'/rb/rb.mod/banner/bannerhit.php?bn_id='.$row['bn_id'].'"'.$bn_new_win.'>';
|
||||
}
|
||||
echo $banner.'<img src="'.G5_DATA_URL.'/banners/'.$row['bn_id'].'?ver='.G5_SERVER_TIME.'" title="'.get_text($row['bn_alt']).'" width="100%">';
|
||||
if ($banner) {
|
||||
echo '</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if (isset($row['bn_ad_ico']) && $row['bn_ad_ico']) {
|
||||
echo '<span class="ico_ad">AD</span>'.PHP_EOL;
|
||||
}
|
||||
echo '</div>'.PHP_EOL;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($i > 0) echo '</ul>';
|
||||
|
||||
if ($i > 1) echo '
|
||||
<div class="swiper-button-next swiper-button-next-slide_bn swiper-button-next-slide_bn_'.$row_mod['md_id'].'">
|
||||
<svg width="24" height="46" viewBox="0 0 24 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 45L22.3333 23L1 1" stroke="#09244B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="swiper-button-prev swiper-button-next-slide_bn swiper-button-prev-slide_bn_'.$row_mod['md_id'].'">
|
||||
<svg width="24" height="46" viewBox="0 0 24 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M23 0.999999L1.66667 23L23 45" stroke="#09244B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>'.PHP_EOL;
|
||||
|
||||
if ($i > 0) echo '</div></div>';
|
||||
|
||||
?>
|
||||
|
||||
<script>
|
||||
|
||||
var swiper = new Swiper('.swiper-container-slide_bn_<?php echo $row_mod['md_id'] ?>', {
|
||||
slidesPerView: 1, //가로갯수
|
||||
spaceBetween: 0, // 간격
|
||||
observer: true, //리셋
|
||||
observeParents: true, //리셋
|
||||
<?php if ($i > 1) { ?>
|
||||
touchRatio: 1,
|
||||
loop: true,
|
||||
|
||||
navigation: { //네비
|
||||
nextEl: '.swiper-button-next-slide_bn_<?php echo $row_mod['md_id'] ?>',
|
||||
prevEl: '.swiper-button-prev-slide_bn_<?php echo $row_mod['md_id'] ?>',
|
||||
},
|
||||
|
||||
<?php } else { ?>
|
||||
touchRatio: 0,
|
||||
loop: false,
|
||||
<?php } ?>
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: rb.wide_slide/banner.skin.php
|
||||
* 배너 그룹 스킨 (래퍼)
|
||||
*/
|
||||
|
||||
// CSS 로드
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/rb.wide_slide/style.css">', 0);
|
||||
|
||||
// Swiper 라이브러리 로드 (테마에 포함된 경우)
|
||||
if (is_file(G5_THEME_PATH.'/js/swiper/swiper-bundle.min.js')) {
|
||||
add_javascript('<script src="'.G5_THEME_URL.'/js/swiper/swiper-bundle.min.js"></script>', 10);
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="rb-banner-wide-slide">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
<?php
|
||||
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
|
||||
if (isset($banners) && is_array($banners)) {
|
||||
foreach ($banners as $banner) {
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<!-- 네비게이션 버튼 -->
|
||||
<div class="swiper-button-next"></div>
|
||||
<div class="swiper-button-prev"></div>
|
||||
<!-- 페이징 -->
|
||||
<div class="swiper-pagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 이 스킨 전용 Swiper 초기화
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// 동일한 스킨이 여러 개 있을 수 있으므로, 고유한 클래스를 부여하거나 ID를 사용해야 합니다.
|
||||
// 여기서는 이 스킨의 최상위 클래스 내에 있는 swiper-container를 찾습니다.
|
||||
var swiper = new Swiper('.rb-banner-wide-slide .swiper-container', {
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 5000,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
clickable: true,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: rb.wide_slide/skin.php
|
||||
* 단일 배너 아이템 스킨 (슬라이드용)
|
||||
*/
|
||||
?>
|
||||
<div class="swiper-slide">
|
||||
<a href="<?php echo $banner['bn_url']; ?>" target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>">
|
||||
<div class="banner-image">
|
||||
<?php echo $banner['bn_img']; ?>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -0,0 +1,53 @@
|
||||
@charset "utf-8";
|
||||
|
||||
/* 💡 [최종 수정] 와이드 슬라이드 스타일 */
|
||||
.rb-banner-wide-slide {
|
||||
position: relative;
|
||||
width: 728px; /* 💡 [핵심] 와이드 배너 너비 고정 */
|
||||
height: 90px; /* 💡 [핵심] 와이드 배너 높이 고정 */
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
||||
border-radius: 8px;
|
||||
margin: 0 auto; /* 중앙 정렬 */
|
||||
}
|
||||
|
||||
.rb-banner-wide-slide .swiper-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-wide-slide .swiper-slide {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-wide-slide .banner-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 💡 [최종 수정] img 태그 자체의 크기를 와이드 배너(728x90)로 강제 고정 */
|
||||
.rb-banner-wide-slide .banner-image img {
|
||||
width: 728px !important;
|
||||
height: 90px !important;
|
||||
object-fit: cover !important;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Swiper 네비게이션 버튼 스타일 (필요시 수정) */
|
||||
.rb-banner-wide-slide .swiper-button-next,
|
||||
.rb-banner-wide-slide .swiper-button-prev {
|
||||
color: #fff;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.rb-banner-wide-slide .swiper-button-next:after,
|
||||
.rb-banner-wide-slide .swiper-button-prev:after {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.rb-banner-wide-slide .swiper-pagination-bullet-active {
|
||||
background: #fff;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: split_layout/banner.skin.php
|
||||
* 배너 그룹 스킨 (래퍼)
|
||||
*/
|
||||
|
||||
// CSS 로드
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/split_layout/style.css">', 0);
|
||||
|
||||
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
|
||||
if (isset($banners) && is_array($banners)) {
|
||||
foreach ($banners as $banner) {
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
} else if (isset($banner)) {
|
||||
// 단일 배너인 경우
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: split_layout/skin.php
|
||||
* 단일 배너 아이템 스킨 (내용에 따라 3단 변신)
|
||||
*/
|
||||
|
||||
// 이미지와 텍스트 유무 확인
|
||||
$has_image = (isset($banner['bn_img']) && !empty($banner['bn_img']));
|
||||
$has_text = (isset($banner['bn_alt']) && !empty($banner['bn_alt']));
|
||||
|
||||
// 클래스 동적 생성
|
||||
$layout_class = '';
|
||||
if ($has_image && $has_text) {
|
||||
$layout_class = 'has-image-and-text';
|
||||
} elseif ($has_image) {
|
||||
$layout_class = 'has-image-only';
|
||||
} elseif ($has_text) {
|
||||
$layout_class = 'has-text-only';
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="<?php echo G5_URL; ?>/rb/rb.mod/banner/skin/split_layout/style.css?ver=<?php echo G5_SERVER_TIME; ?>">
|
||||
<div class="rb-banner-split-layout <?php echo $layout_class; ?>">
|
||||
<a href="<?php echo $banner['bn_url']; ?>"
|
||||
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
|
||||
onclick="banner_click_count(this); return true;"
|
||||
data-banner-id="<?php echo $banner['bn_id']; ?>">
|
||||
<?php if ($has_image): ?>
|
||||
<div class="banner-image">
|
||||
<?php echo $banner['bn_img']; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($has_text): ?>
|
||||
<div class="banner-content">
|
||||
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
@@ -0,0 +1,110 @@
|
||||
/* ================================
|
||||
0. 배너 고정 크기 (절대 필수)
|
||||
================================ */
|
||||
.banner-unit-wrapper {
|
||||
width: 180px;
|
||||
height: 80px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* ================================
|
||||
1. 링크 전체 채우기
|
||||
================================ */
|
||||
.rb-banner-split-layout a {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
border: 1px solid #eee;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* ================================
|
||||
2. 이미지 영역 (flex 문제 해결)
|
||||
================================ */
|
||||
.banner-image {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background: #f8f8f8;
|
||||
min-height: 0; /* 🔥 flex 기본값 무력화 */
|
||||
}
|
||||
|
||||
.banner-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
/* ================================
|
||||
3. 이미지 + 텍스트
|
||||
================================ */
|
||||
.has-image-and-text .banner-image {
|
||||
flex: 0 0 60px; /* 🔥 이게 핵심 */
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.has-image-and-text .banner-content {
|
||||
flex: 0 0 20px;
|
||||
height: 20px;
|
||||
border-top: 1px solid #eee;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.has-image-and-text .banner-content h3 {
|
||||
margin: 0;
|
||||
font-size: 11px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* ================================
|
||||
4. 이미지만
|
||||
================================ */
|
||||
.has-image-only .banner-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/*object-fit: fill;*/
|
||||
max-height: 85px;
|
||||
}
|
||||
.banner-image img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: fill;
|
||||
max-height: 85px;
|
||||
}
|
||||
|
||||
.has-image-only .banner-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ================================
|
||||
5. 텍스트만
|
||||
================================ */
|
||||
.has-text-only .banner-image {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.has-text-only .banner-content {
|
||||
flex: 0 0 100%;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.has-text-only .banner-content h3 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: text_reveal/banner.skin.php
|
||||
* 배너 그룹 스킨 (래퍼)
|
||||
*/
|
||||
|
||||
// CSS 로드
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/text_reveal/style.css">', 0);
|
||||
|
||||
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
|
||||
if (isset($banners) && is_array($banners)) {
|
||||
foreach ($banners as $banner) {
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
} else if (isset($banner)) {
|
||||
// 단일 배너인 경우
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: text_reveal/skin.php
|
||||
* 단일 배너 아이템 스킨
|
||||
*/
|
||||
?>
|
||||
<div class="rb-banner-text-reveal">
|
||||
<a href="<?php echo $banner['bn_url']; ?>"
|
||||
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
|
||||
onclick="banner_click_count(this); return true;"
|
||||
data-banner-id="<?php echo $banner['bn_id']; ?>">
|
||||
<div class="banner-image">
|
||||
<?php echo $banner['bn_img']; ?>
|
||||
</div>
|
||||
<div class="banner-content">
|
||||
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -0,0 +1,51 @@
|
||||
.rb-banner-text-reveal {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-text-reveal a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-text-reveal .banner-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-text-reveal .banner-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.rb-banner-text-reveal .banner-content {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background: rgba(0,0,0,0.6);
|
||||
color: #fff;
|
||||
transform: translateY(100%);
|
||||
transition: transform 0.4s ease;
|
||||
}
|
||||
|
||||
.rb-banner-text-reveal:hover .banner-content {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.rb-banner-text-reveal h3 {
|
||||
margin: 0;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: zoom_in_hover/banner.skin.php
|
||||
* 배너 그룹 스킨 (래퍼)
|
||||
*/
|
||||
|
||||
// CSS 로드
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/rb/rb.mod/banner/skin/zoom_in_hover/style.css">', 0);
|
||||
|
||||
// 배너 목록이 있으면 루프를 돌며 skin.php를 include
|
||||
if (isset($banners) && is_array($banners)) {
|
||||
foreach ($banners as $banner) {
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
} else if (isset($banner)) {
|
||||
// 단일 배너인 경우
|
||||
include(dirname(__FILE__).'/skin.php');
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
/**
|
||||
* rb.mod.banner :: zoom_in_hover/skin.php
|
||||
* 단일 배너 아이템 스킨
|
||||
*/
|
||||
?>
|
||||
<div class="rb-banner-zoom-in-hover">
|
||||
<a href="<?php echo $banner['bn_url']; ?>"
|
||||
target="_<?php echo $banner['bn_new_win'] ? 'blank' : 'self'; ?>"
|
||||
onclick="banner_click_count(this); return true;"
|
||||
data-banner-id="<?php echo $banner['bn_id']; ?>">
|
||||
<div class="banner-image">
|
||||
<?php echo $banner['bn_img']; ?>
|
||||
</div>
|
||||
<div class="banner-content">
|
||||
<h3><?php echo get_text($banner['bn_alt']); ?></h3>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
.rb-banner-zoom-in-hover {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover .banner-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover .banner-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
transition: transform 0.4s ease;
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover:hover .banner-image img {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover .banner-content {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.rb-banner-zoom-in-hover h3 {
|
||||
margin: 0;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
@@ -0,0 +1,292 @@
|
||||
/* PrismJS 1.29.0
|
||||
https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+css-extras+git+http+java+javadoclike+js-extras+json+markup-templating+php+phpdoc+php-extras+python+sass+scss+sql+visual-basic+wgsl+xml-doc&plugins=line-highlight+line-numbers+toolbar+copy-to-clipboard */
|
||||
code[class*=language-],
|
||||
pre[class*=language-] {
|
||||
color: #ddddcb;
|
||||
background: 0 0;
|
||||
text-shadow: 0 1px rgba(0, 0, 0, .3);
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none
|
||||
}
|
||||
|
||||
pre[class*=language-] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border-radius: .3em
|
||||
}
|
||||
|
||||
:not(pre) > code[class*=language-],
|
||||
pre[class*=language-] {
|
||||
background: #272822
|
||||
}
|
||||
|
||||
:not(pre) > code[class*=language-] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal
|
||||
}
|
||||
|
||||
.token.cdata,
|
||||
.token.comment,
|
||||
.token.doctype,
|
||||
.token.prolog {
|
||||
color: #8292a2
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #ddddcb
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7
|
||||
}
|
||||
|
||||
.token.constant {
|
||||
color:#ddddcb;
|
||||
}
|
||||
.token.deleted,
|
||||
.token.property,
|
||||
.token.symbol,
|
||||
.token.tag {
|
||||
color: #66a9ee
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.number {
|
||||
color: #dc6360
|
||||
}
|
||||
|
||||
.token.attr-name {
|
||||
color:#ddddcb;
|
||||
}
|
||||
.token.builtin,
|
||||
.token.char,
|
||||
.token.inserted,
|
||||
.token.selector,
|
||||
.token.string {
|
||||
color: #e8c152
|
||||
}
|
||||
|
||||
.token.operator {
|
||||
color:#ddddcb;
|
||||
}
|
||||
|
||||
.language-css .token.string,
|
||||
.style .token.string,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.token.variable {
|
||||
color: #e57a35
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.class-name,
|
||||
.token.function {
|
||||
color: #ddddcb
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #82cc87
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.regex {
|
||||
color: #8c5aec
|
||||
}
|
||||
|
||||
.token.bold,
|
||||
.token.important {
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help
|
||||
}
|
||||
|
||||
pre[data-line] {
|
||||
position: relative;
|
||||
padding: 1em 0 1em 3em
|
||||
}
|
||||
|
||||
.line-highlight {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: inherit 0;
|
||||
margin-top: 1em;
|
||||
background: hsla(24, 20%, 50%, .08);
|
||||
background: linear-gradient(to right, hsla(24, 20%, 50%, .1) 70%, hsla(24, 20%, 50%, 0));
|
||||
pointer-events: none;
|
||||
line-height: inherit;
|
||||
white-space: pre
|
||||
}
|
||||
|
||||
@media print {
|
||||
.line-highlight {
|
||||
-webkit-print-color-adjust: exact;
|
||||
color-adjust: exact
|
||||
}
|
||||
}
|
||||
|
||||
.line-highlight:before,
|
||||
.line-highlight[data-end]:after {
|
||||
content: attr(data-start);
|
||||
position: absolute;
|
||||
top: .4em;
|
||||
left: .6em;
|
||||
min-width: 1em;
|
||||
padding: 0 .5em;
|
||||
background-color: hsla(24, 20%, 50%, .4);
|
||||
color: #f4f1ef;
|
||||
font: bold 65%/1.5 sans-serif;
|
||||
text-align: center;
|
||||
vertical-align: .3em;
|
||||
border-radius: 999px;
|
||||
text-shadow: none;
|
||||
box-shadow: 0 1px #fff
|
||||
}
|
||||
|
||||
.line-highlight[data-end]:after {
|
||||
content: attr(data-end);
|
||||
top: auto;
|
||||
bottom: .4em
|
||||
}
|
||||
|
||||
.line-numbers .line-highlight:after,
|
||||
.line-numbers .line-highlight:before {
|
||||
content: none
|
||||
}
|
||||
|
||||
pre[id].linkable-line-numbers span.line-numbers-rows {
|
||||
pointer-events: all
|
||||
}
|
||||
|
||||
pre[id].linkable-line-numbers span.line-numbers-rows > span:before {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before {
|
||||
background-color: rgba(128, 128, 128, .2)
|
||||
}
|
||||
|
||||
pre[class*=language-].line-numbers {
|
||||
position: relative;
|
||||
padding-left: 3.8em;
|
||||
counter-reset: linenumber
|
||||
}
|
||||
|
||||
pre[class*=language-].line-numbers > code {
|
||||
position: relative;
|
||||
white-space: inherit
|
||||
}
|
||||
|
||||
.line-numbers .line-numbers-rows {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
top: 0;
|
||||
font-size: 100%;
|
||||
left: -3.8em;
|
||||
width: 3em;
|
||||
letter-spacing: -1px;
|
||||
border-right: 1px solid #666;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none
|
||||
}
|
||||
|
||||
.line-numbers-rows > span {
|
||||
display: block;
|
||||
counter-increment: linenumber
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
content: counter(linenumber);
|
||||
color: #666;
|
||||
display: block;
|
||||
padding-right: .8em;
|
||||
text-align: right
|
||||
}
|
||||
|
||||
div.code-toolbar {
|
||||
position: relative
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: .3em;
|
||||
right: .2em;
|
||||
transition: opacity .3s ease-in-out;
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
div.code-toolbar:hover > .toolbar {
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
div.code-toolbar:focus-within > .toolbar {
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar > .toolbar-item {
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar > .toolbar-item > a {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar > .toolbar-item > button {
|
||||
background: 0 0;
|
||||
border: 0;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
line-height: normal;
|
||||
overflow: visible;
|
||||
padding: 0;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar > .toolbar-item > a,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > button,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > span {
|
||||
color: #bbb;
|
||||
font-size: 11px;
|
||||
padding: 3px 5px 3px 5px;
|
||||
background: #f5f2f0;
|
||||
background: rgba(224, 224, 224, .2);
|
||||
box-shadow: 0 2px 0 0 rgba(0, 0, 0, .2);
|
||||
border-radius: .5em
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar > .toolbar-item > a:focus,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > a:hover,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > button:focus,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > button:hover,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > span:focus,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > span:hover {
|
||||
color: inherit;
|
||||
text-decoration: none
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if(isset($sb['sb_use']) && $sb['sb_use'] == 1) {
|
||||
$sb_is = sb_is($view['mb_id']);
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?php if($view['mb_id']) { ?>
|
||||
<div class="writer_prof">
|
||||
<ul class="writer_prof_ul1">
|
||||
<li class="writer_prof_li_prof">
|
||||
<dd class="writer_prof_li_prof_img"><?php echo get_member_profile_img($view['mb_id']) ?></dd>
|
||||
<dd class="writer_prof_li_prof_txt">
|
||||
<span class="prof_nick"><?php echo $view['name'] ?></span>
|
||||
@<?php echo $view['mb_id'] ?> <?php if(isset($sb['sb_use']) && $sb['sb_use'] == 1) { // 구독 사용시 ?><?php echo sb_cnt($view['mb_id']) ?><?php } ?>
|
||||
</dd>
|
||||
<div class="cb"></div>
|
||||
</li>
|
||||
<?php if ($is_signature && $signature) { ?>
|
||||
<li class="writer_prof_li_txt">
|
||||
<?php echo $signature ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
<ul class="writer_prof_ul2">
|
||||
|
||||
<?php if($is_member) { ?>
|
||||
<a class="fl_btns" href="<?php echo G5_URL ?>/rb/home.php?mb_id=<?php echo $view['mb_id'] ?>">
|
||||
<?php } else { ?>
|
||||
<a class="fl_btns" href="javascript:alert('로그인 후 이용해주세요.');">
|
||||
<?php } ?>
|
||||
<img src="<?php echo $board_skin_url ?>/img/ico_home.svg">
|
||||
<span class="tooltips">미니홈</span>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="fl_btns" href="<?php echo G5_BBS_URL ?>/memo_form.php?me_recv_mb_id=<?php echo $view['mb_id'] ?>" onclick="win_memo(this.href); return false;">
|
||||
<img src="<?php echo $board_skin_url ?>/img/ico_msg.svg">
|
||||
<span class="tooltips">쪽지</span>
|
||||
</a>
|
||||
|
||||
<?php
|
||||
if(isset($sb['sb_use']) && $sb['sb_use'] == 1) { // 구독 사용시
|
||||
$sb_mb_id = $view['mb_id'];
|
||||
include_once(G5_PATH.'/rb/rb.mod/subscribe/subscribe.skin.php');
|
||||
}
|
||||
?>
|
||||
|
||||
</ul>
|
||||
<div class="cb"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<style>
|
||||
.gap_inner_line_wrap {height:1px; border-top:1px solid rgba(0,0,0,0.1);}
|
||||
</style>
|
||||
|
||||
<div class="gap_inner_line_wrap pc"></div>
|
||||
@@ -0,0 +1,45 @@
|
||||
<style>
|
||||
.gap_width_line_wrap {height:1px; border-top:1px solid rgba(0,0,0,0.1);}
|
||||
</style>
|
||||
|
||||
<div class="gap_width_line_wrap gap_width_line_wrap_<?php echo $row_mod['md_id'] ?> pc"></div>
|
||||
|
||||
<script>
|
||||
|
||||
//부모 width를 무시하고 div 를 100%로 만들고, 모듈설정 버튼의 100% 처리를 위해 스크립트를 사용 합니다.
|
||||
//복제 사용을 위해 $row_mod['md_id'](모듈ID) 를 활용 합니다.
|
||||
|
||||
function gap_width_line_wrap_<?php echo $row_mod['md_id'] ?>() {
|
||||
const content_w = $('.gap_width_line_wrap_<?php echo $row_mod['md_id'] ?>');
|
||||
const firstAdminOv_w = content_w.nextUntil('.admin_ov').next('.admin_ov');
|
||||
|
||||
if ($(window).width() > <?php echo $rb_core['main_width'] ?>) {
|
||||
content_w.css({
|
||||
'width': '100vw',
|
||||
'position': 'relative',
|
||||
'left': '50%',
|
||||
'transform': 'translateX(-50%)'
|
||||
});
|
||||
firstAdminOv_w.css({
|
||||
'width': '100vw',
|
||||
'left': '50%',
|
||||
'transform': 'translateX(-50%)'
|
||||
});
|
||||
} else {
|
||||
content_w.css({
|
||||
'width': '100%',
|
||||
'position': 'static',
|
||||
'left': '0',
|
||||
'transform': 'none'
|
||||
});
|
||||
firstAdminOv_w.css({
|
||||
'width': '100%',
|
||||
'left': '0',
|
||||
'transform': 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(gap_width_line_wrap_<?php echo $row_mod['md_id'] ?>);
|
||||
$(window).resize(gap_width_line_wrap_<?php echo $row_mod['md_id'] ?>);
|
||||
</script>
|
||||
@@ -0,0 +1,5 @@
|
||||
<style>
|
||||
.gap_wrap {height:1px; margin-top: -10px; margin-bottom: -10px;}
|
||||
</style>
|
||||
|
||||
<div class="gap_wrap pc"></div>
|
||||
@@ -0,0 +1,32 @@
|
||||
<!--
|
||||
경로 : /rb/rb.widget/rb.quick_btns/
|
||||
사용자코드를 입력하세요.
|
||||
-->
|
||||
<div class="q_btns">
|
||||
<button type="button" class="arr_bg" onclick="location.href='#';">
|
||||
<i><img src="<?php echo G5_THEME_URL ?>/rb.img/icon/icon_btn1.svg"></i>
|
||||
<span>레벨링 가이드</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="arr_bg" onclick="location.href='#';">
|
||||
<i><img src="<?php echo G5_THEME_URL ?>/rb.img/icon/icon_btn2.svg"></i>
|
||||
<span>배너광고 신청</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="arr_bg" onclick="location.href='#';">
|
||||
<i><img src="<?php echo G5_THEME_URL ?>/rb.img/icon/icon_btn3.svg"></i>
|
||||
<span>포인트 충전</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
function openNewWindow(url) {
|
||||
var width = Math.min(window.screen.width, 1380);
|
||||
var height = Math.min(window.screen.height, 768);
|
||||
var left = (window.screen.width - width) / 2;
|
||||
var top = (window.screen.height - height) / 2;
|
||||
|
||||
window.open(url, '_blank', `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=yes`);
|
||||
}
|
||||
</script>
|
||||