update codes

This commit is contained in:
Amberstone 2024-09-19 21:03:48 +09:00
parent e5fe8baa7e
commit 837d9bb990
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
54 changed files with 2344 additions and 508 deletions

View file

@ -1,11 +0,0 @@
# AvocadoEdition
아보카도 에디션 코어 파일
-----------------------------
해당 경로에 있는 파일들을 설치할 Root 디렉토리에 업로드해주세요.
자세한 설치 방법은 https://github.com/tateck-develop/AvocadoEdition/wiki 이곳을 참고해 주시길 바랍니다.
-----------------------------
2022.04.24 : enter.php 파일 44번 라인 css 연결 경로 수정

View file

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

View file

@ -2,4 +2,4 @@
if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
include_once (G5_PATH . '/head.php');
include_once G5_PATH . '/head.php';

View file

@ -2,4 +2,4 @@
if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
include_once (G5_PATH . '/tail.php');
include_once G5_PATH . '/tail.php';

View file

@ -2,15 +2,6 @@
if (!defined('_GNUBOARD_'))
exit;
/*
// 081022 : CSRF 방지를 위해 코드를 작성했으나 효과가 없어 주석처리 함
if (!get_session('ss_admin')) {
set_session('ss_admin', true);
goto_url('.');
}
*/
// 스킨디렉토리를 SELECT 형식으로 얻음
function get_skin_select($skin_gubun, $id, $name, $selected = '', $event = '')
{
global $config;
@ -102,7 +93,6 @@ function get_skin_dir($skin, $skin_path = G5_SKIN_PATH)
return $result_array;
}
// 테마
function get_theme_dir()
{
@ -146,7 +136,6 @@ function get_theme_select($id, $name, $selected = '', $event = '')
return $str;
}
// 테마정보
function get_theme_info($dir)
{
@ -266,6 +255,14 @@ function get_member_id_select($name, $level, $selected = "", $event = "")
return $str;
}
/* 2024.06.04 check */
// php8 버전 호환 권한 검사 함수
function auth_check_menu($auth, $sub_menu, $attr, $return = false)
{
$check_auth = isset($auth[$sub_menu]) ? $auth[$sub_menu] : '';
return auth_check($check_auth, $attr, $return);
}
// 권한 검사
function auth_check($auth, $attr, $return = false)
{

View file

@ -1,9 +1,10 @@
<?php
$menu['menu100'] = array(
array('100000', '사이트 설정', G5_ADMIN_URL . '/site_config_form.php', 'config'),
array('100100', '환경설정', G5_ADMIN_URL . '/site_config_form.php', ''),
array('100250', '메인 편집', G5_ADMIN_URL . '/viewer_form.php', ''),
array('100300', '디자인 설정', G5_ADMIN_URL . '/design_form.php', ''),
array('100400', '메뉴 설정', G5_ADMIN_URL . '/menu_list.php', ''),
array('100990', 'DB관리', G5_DB_URL, '')
);
$menu['menu100'] = [
['100000', '사이트 설정', G5_ADMIN_URL . '/site_config_form.php', 'config'],
['100100', '환경설정', G5_ADMIN_URL . '/site_config_form.php', ''],
['100250', '메인 편집', G5_ADMIN_URL . '/viewer_form.php', ''],
['100280', '테마 설정', G5_ADMIN_URL . '/theme.php', 'cf_theme', 1],
['100300', '디자인 설정', G5_ADMIN_URL . '/design_form.php', ''],
['100400', '메뉴 설정', G5_ADMIN_URL . '/menu_list.php', ''],
['100990', 'DB관리', G5_DB_URL, '']
];

View file

@ -97,7 +97,7 @@ input[type=text],
input[type=password],
input[type=submit],
input[type=image] {
-webkit-appearance: none
-webkit-appearance: none;
}
button {
@ -757,3 +757,242 @@ table {
height: 15px;
background: #d18686
}
/*테마*/
.theme_p {
margin: 0 0 10px
}
#theme_list {
padding: 0;
margin: 0;
list-style: none;
width: 1000px;
position: relative
}
#theme_list:after {
display: block;
visibility: hidden;
clear: both;
content: ""
}
#theme_list li {
margin: 10px 10px 10px 0;
float: left
}
#theme_list li:after {
display: block;
visibility: hidden;
clear: both;
content: ""
}
#theme_list li .tmli_if {
border: 1px solid #d1dee2;
width: 302px;
}
#theme_list li .tmli_if>img {
width: 300px;
height: 225px;
}
#theme_list li .tmli_if:hover>img {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);
-moz-opacity: 0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
}
#theme_list li .tmli_tit {
position: relative;
border-top: 1px solid #d1dee2;
background: #e5ecef;
}
#theme_list li .tmli_tit p {
height: 40px;
line-height: 40px;
padding: 0 10px 0;
font-weight: bold;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
#theme_list li .tmli_tit button.tmli_dt {
position: absolute;
top: 8px;
right: 10px;
padding: 5px;
background: #111;
color: #fff;
display: none;
border: none
}
#theme_list li .tmli_if:hover button.tmli_dt {
display: block
}
#theme_list li .theme_sl {
float: left;
border: none;
margin-top: 5px;
padding: 0 5px;
height: 26px;
background: #999;
color: #fff
}
#theme_list li .theme_sl:hover {
background: #ff3061
}
#theme_list li .theme_deactive {
margin-left: 4px
}
#theme_list li .theme_sl_use {
background: #ff3061;
line-height: 26px
}
#theme_list li .theme_pr {
float: right;
margin-top: 5px;
padding: 0 5px;
height: 26px;
line-height: 24px;
border: 1px solid #ccc;
background: #fafafa;
}
#theme_list li .theme_preview {
float: right;
margin-top: 5px;
padding: 0 5px;
height: 26px;
border: 1px solid #ccc;
background: #fafafa;
margin-right: 3px
}
#theme_detail {
position: fixed;
top: 50%;
height: 540px;
width: 900px;
margin-top: -271px;
background: #fff;
background: #f3f3f3;
border: 1px solid #000;
-webkit-box-shadow: 1px 2px 5px rgba(150, 150, 150, 100.5);
-moz-box-shadow: 1px 2px 5px rgba(150, 150, 150, 0.5);
box-shadow: 1px 2px 5px rgba(150, 150, 150, 0.5);
z-index: 1000
}
#theme_detail:after {
display: block;
visibility: hidden;
clear: both;
content: ""
}
#theme_detail h2 {
font-size: 1.25em;
background: #fff;
padding: 0 15px;
line-height: 40px;
border-bottom: 1px solid #d8d8d8;
margin: 0
}
.theme_dt_img {
float: left;
padding: 20px
}
.theme_dt_img img {
border: 1px solid #aaa;
}
.theme_dt_if {
float: left;
width: 235px;
padding: 20px 0
}
.theme_dt_if table {
width: 100%;
border-collapse: collapse;
margin: 15px 0 0;
font-size: 0.92em
}
.theme_dt_if table th {
padding: 5px;
background: #fff;
border-bottom: 1px solid #f3f3f3;
vertical-align: top;
color: #3f51b5
}
.theme_dt_if table td {
padding: 5px;
background: #fff;
border-bottom: 1px solid #f3f3f3;
line-height: 1.56em
}
.theme_dt_if table td a {
text-decoration: underline
}
.theme_dt_if p {
line-height: 1.5em
}
.if_p_bg {
display: inline-block;
width: 20px;
height: 1px;
background: #000;
margin: 30px 0 10px
}
#theme_detail .theme_dt_btn {
position: absolute;
top: 0px;
right: 0px;
background: #fff;
}
#theme_detail .theme_dt_btn .close_btn {
border: 0;
border-left: 1px solid #d8d8d8;
background: url('../img/close.png') 50% 50% no-repeat;
width: 40px;
height: 40px;
overflow: hidden;
text-indent: -99999px
}
#theme_detail .theme_dt_btn .close_btn:hover {
background-color: #eceffc
}
#theme_detail .theme_dt_btn .btn_03 {
line-height: 28px;
display: inline-block;
vertical-align: top;
margin-top: 6px;
padding: 0 6px;
border-radius: 5px
}

View file

@ -5,7 +5,9 @@ body {
height: 100%;
}
#wrap {}
#wrap {
display: block;
}
#header {
display: block;
@ -16,7 +18,6 @@ body {
width: 200px;
min-height: 100%;
background: #1d1d1f;
vertical-align: top;
z-index: 999;
}

View file

@ -0,0 +1,216 @@
.amber-color-picker {
border: 1px solid #E8E7E0;
background: #FFFFFF;
border-radius: 2px;
line-height: 24px;
min-height: 24px;
min-width: 200px;
display: inline-block;
position: relative;
}
.amber-color-picker>input {
border: 0;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
box-sizing: border-box;
padding: 0 8px 0 24px;
background: transparent;
}
.amber-color-picker>.neo-preview {
pointer-events: none;
position: absolute;
left: 4px;
top: 4px;
height: 16px;
width: 16px;
border: 1px solid #0004;
box-sizing: border-box;
background: #FFF;
border-radius: 2px;
background-image:
linear-gradient(45deg, #ccc 25%, transparent 25%),
linear-gradient(-45deg, #ccc 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #ccc 75%),
linear-gradient(-45deg, transparent 75%, #ccc 75%);
background-size: 14px 14px;
background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
.amber-color-picker>.neo-preview::before {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
background: var(--background);
}
.amber-color-picker>.amber-palette {
z-index: 10000;
background: #FFF;
position: absolute;
left: -1px;
top: 26px;
padding: 8px;
border-radius: 4px;
border: 1px solid #E8E7E0;
box-shadow: 0 1px 1px #0004;
display: flex;
flex-direction: column;
gap: 2px;
}
.amber-color-picker>.amber-palette>.amber-inner {
width: 100%;
height: 100%;
flex-grow: 1;
display: flex;
gap: 2px;
}
.amber-color-picker>.amber-palette::before {
content:"Amber Color Picker :: Author: Arcturus";
font-size: 8px;
color: #CCC;
right: 8px;
bottom: 0px;
line-height: 8px;
position: absolute;
}
.amber-color-picker>.amber-palette>.amber-inner>.amber-palette-area {
position: relative;
width: 200px;
height: 200px;
border: 1px solid #E8E7E0;
cursor: crosshair;
}
.amber-color-picker>.amber-palette>.amber-inner>.amber-palette-area::before {
content: "";
position:absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
background: linear-gradient(to bottom, transparent, #000);
pointer-events: none;
}
.amber-color-picker>.amber-palette>.amber-inner>.amber-palette-area>div {
position: absolute;
pointer-events: none;
height: 11px;
width: 11px;
border-radius: 50%;
border:2px solid #fff;
box-sizing: border-box;
box-shadow: 0 0 2px #000;
margin-left: -7px;
margin-top: -7px
}
.amber-color-picker>.amber-palette>.amber-inner>.amber-hue-area {
border: 1px solid #E8E7E0;
width: 16px;
height: 200px;
position: relative;
background: linear-gradient(to bottom, red 0%, magenta 16.67%, blue 33.34%, cyan 50%, lime 66.67%, yellow 83.33%, red 100%);
cursor:ns-resize;
}
.amber-color-picker>.amber-palette>.amber-inner>.amber-hue-area>div {
position: absolute;
pointer-events: none;
margin-left: -1px;
margin-top: -3px;
width: 100%;
height:2px;
border:2px solid #FFF;
border-width: 2px 1px 2px 1px;
box-shadow: 0 0 2px #000;
}
.amber-color-picker>.amber-palette>.amber-inner>.amber-alpha-area {
border: 1px solid #E8E7E0;
width: 16px;
height: 200px;
position: relative;
cursor:ns-resize;
background-image:
linear-gradient(45deg, #ccc 25%, transparent 25%),
linear-gradient(-45deg, #ccc 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #ccc 75%),
linear-gradient(-45deg, transparent 75%, #ccc 75%);
background-size: 16px 16px;
background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.amber-color-picker>.amber-palette>.amber-inner>.amber-alpha-area::before {
content: "";
position: absolute;
pointer-events: none;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: var(--background);
}
.amber-color-picker>.amber-palette>.amber-inner>.amber-alpha-area>div {
position: absolute;
pointer-events: none;
margin-left: -1px;
margin-top: -3px;
width: 100%;
height:2px;
border:2px solid #FFF;
border-width: 2px 1px 2px 1px;
box-shadow: 0 0 2px #000;
}
.amber-color-picker>.amber-palette>.amber-inner>.amber-recent-color {
display: grid;
position: relative;
border: 1px solid #E8E7E0;
grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(9, 1fr);
width: calc(21px * 5 - 1);
gap: 1px;
align-items: start;
padding: 1px;
}
.amber-color-picker>.amber-palette>.amber-inner>.amber-recent-color>div {
border: 1px solid #E8E7E0;
box-sizing: border-box;
width: 20px;
height: 20px;
border-radius: 3px;
overflow: hidden;
position: relative;
background-image:
linear-gradient(45deg, #ccc 25%, transparent 25%),
linear-gradient(-45deg, #ccc 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #ccc 75%),
linear-gradient(-45deg, transparent 75%, #ccc 75%);
background-size: 16px 16px;
background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.amber-color-picker>.amber-palette>.amber-inner>.amber-recent-color>div::before {
content: "";
position: absolute;
pointer-events: none;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: var(--background);
}

View file

@ -88,7 +88,7 @@ h1 {
top: 50%;
white-space: nowrap;
transform: translateY(-50%);
-webkit=transform: translateY(-50%);
-webkit-transform: translateY(-50%);
}
.admin-preview-box .ui-btn {

View file

@ -31,7 +31,7 @@ body {
height: 50px;
line-height: 50px;
padding: 0 3px;
*display: inline;
display: inline;
zoom: 1;
}

View file

@ -0,0 +1,633 @@
class ColorPicker {
constructor(wrapper) {
this.pointerDrag = false;
this.hueDrag = false;
this.opacityDrag = false;
this.currentSaturation = 0;
this.currentValue = 0;
this.currentHue = 0;
this.currentAlpha = 1;
this.currentX;
this.currentY;
this.initialX;
this.initialY;
this.xOffset = 0;
this.yOffset = 0;
// this.element = wrapper;
this.wrapper = createElement("div", {
classList: ["amber-color-picker"]
});
this.preview = createElement("div", {
classList: ["neo-preview"]
});
this.input = createElement("input", {
});
this.dialog = createElement("div", {
classList: ["amber-palette"],
css: {
display: "none"
}
});
this.inner = createElement("div", {
classList: ["amber-inner"]
});
this.palette_area = createElement("div", {
classList: ["amber-palette-area"]
});
this.palette_pointer = createElement("div", {
});
this.hue_area = createElement("div", {
classList: ["amber-hue-area"]
});
this.hue_pointer = createElement("div", {
});
this.alpha_area = createElement("div", {
classList: ["amber-alpha-area"]
});
this.alpha_pointer = createElement("div", {
});
this.desc = createElement("div", {
innerHTML: "rgb(0,0,0), rgba(0,0,0,0) 등 css 에서 지원하는 색상 형식 입력 가능",
css: {
"color":"#A0A0A0",
"font-size":"9px",
"line-height":"16px",
"padding": "4px"
}
});
this.recentcolor = createElement("div", {
classList: ["amber-recent-color"]
});
this.palette_area.appendChild(this.palette_pointer);
this.hue_area.appendChild(this.hue_pointer);
this.alpha_area.appendChild(this.alpha_pointer);
this.inner.appendChild(this.palette_area);
this.inner.appendChild(this.hue_area);
this.inner.appendChild(this.alpha_area);
this.inner.appendChild(this.recentcolor);
this.dialog.appendChild(this.inner);
this.dialog.appendChild(this.desc);
this.wrapper.appendChild(this.input);
this.wrapper.appendChild(this.preview);
this.wrapper.appendChild(this.dialog);
for (let j = 0; j < wrapper.attributes.length; j++) {
const attr = wrapper.attributes[j];
if (attr.name == "class") continue;
this.input.setAttribute(attr.name, attr.value);
}
wrapper.parentNode.replaceChild(this.wrapper, wrapper);
this.input.addEventListener("change", (evt) => {
this.procEvent(evt, true);
});
this.input.addEventListener("keyup", (evt) => {
this.procEvent(evt);
});
this.input.addEventListener("focus", (evt) => {
this.openDialog();
});
this.palette_area.addEventListener("mousedown", (evt) => {
this.pointerDrag = true;
this.movePointer(evt);
});
this.hue_area.addEventListener("mousedown", (evt) => {
this.hueDrag = true;
this.moveHue(evt);
});
this.alpha_area.addEventListener("mousedown", (evt) => {
this.opacityDrag = true;
this.moveAlpha(evt);
});
window.addEventListener("mouseup", (evt) => {
this.pointerDrag = false;
this.hueDrag = false;
this.opacityDrag = false;
});
window.addEventListener("mousemove", (evt) => {
this.movePointer(evt);
this.moveHue(evt);
this.moveAlpha(evt);
});
this.init();
}
init() {
this.checkFocusLeave(() => {
this.dialog.style.setProperty('display', 'none');
this.addPaletteColor(this.input.value);
});
this.regex = /[ㅁㅠㅊㅇㄷㄹ]/g;
this.replacementMap = {
'ㅁ': 'a',
'ㅠ': 'b',
'ㅊ': 'c',
'ㅇ': 'd',
'ㄷ': 'e',
'ㄹ': 'f'
};
this.setColor(1);
this.getSavedPalette();
}
getSavedPalette() {
const d = localStorage.getItem('amber-palette');
if (d) {
try {
this.saved_palette = JSON.parse(d);
this.prepareSavedPalette();
} catch(ex) {
console.error(ex);
}
} else {
this.saved_palette = [];
localStorage.setItem('amber-palette', JSON.stringify([]));
}
}
addPaletteColor(color) {
const index = this.saved_palette.indexOf(color.toLowerCase());
if (index > -1) {
this.saved_palette.splice(index, 1);
}
this.saved_palette.unshift(color.toLowerCase());
if (this.saved_palette.length > 45) {
this.saved_palette.pop();
}
localStorage.setItem('amber-palette', JSON.stringify(this.saved_palette));
}
prepareSavedPalette() {
this.recentcolor.innerHTML = "";
for(const e of this.saved_palette) {
const col = createElement("div", {
css: {
"--background": e
},
attributes: {
title: e
}
});
col.addEventListener("click", (evt) => {
this.input.value = e;
this.setColor(1);
});
this.recentcolor.appendChild(col);
}
}
openDialog() {
this.dialog.style.setProperty('display', 'flex');
this.getSavedPalette();
}
movePointer(evt) {
if (this.pointerDrag) {
evt.preventDefault();
let rect = this.palette_area.getBoundingClientRect();
let cstyle = getComputedStyle(this.palette_area);
let newX = evt.clientX - rect.left;
let newY = evt.clientY - rect.top;
newX = Math.max(0, Math.min(parseInt(cstyle.width), newX));
newY = Math.max(0, Math.min(parseInt(cstyle.height), newY));
this.currentSaturation = newX / parseInt(cstyle.width);
this.currentValue = 1 - (newY / parseInt(cstyle.height));
const newRgb = this.hsvToRgba(this.currentHue, this.currentSaturation, this.currentValue);
this.input.value = this.rgbToHex(newRgb.r, newRgb.g, newRgb.b) + (Math.max(0, Math.min(255, Math.floor(this.currentAlpha * 255)))).toString(16).padStart(2, '0');
this.setColor();
this.currentX = newX;
this.currentY = newY;
this.setTranslate(this.currentX, this.currentY, this.palette_pointer);
}
}
moveHue(evt) {
if (this.hueDrag) {
evt.preventDefault();
let rect = this.hue_area.getBoundingClientRect();
let cstyle = getComputedStyle(this.hue_area);
let newY = evt.clientY - rect.top;
const my = parseInt(cstyle.height);
newY = Math.max(0, Math.min(my, newY));
this.currentHue = (1 - (newY / my)) * 360;
const newRgb = this.hsvToRgba(this.currentHue, this.currentSaturation, this.currentValue);
this.input.value = this.rgbToHex(newRgb.r, newRgb.g, newRgb.b) + (Math.max(0, Math.min(255, Math.floor(this.currentAlpha * 255)))).toString(16).padStart(2, '0');
this.setColor();
this.setTranslateY(newY, this.hue_pointer);
}
}
moveAlpha(evt) {
if (this.opacityDrag) {
evt.preventDefault();
let rect = this.alpha_area.getBoundingClientRect();
let cstyle = getComputedStyle(this.alpha_area);
let newY = evt.clientY - rect.top;
const my = parseInt(cstyle.height);
newY = Math.max(0, Math.min(my, newY));
this.currentAlpha = 1 - Math.min(1, Math.max(0, newY / my));
const newRgb = this.hsvToRgba(this.currentHue, this.currentSaturation, this.currentValue);
this.input.value = this.rgbToHex(newRgb.r, newRgb.g, newRgb.b) + (Math.max(0, Math.min(255, Math.floor(this.currentAlpha * 255)))).toString(16).padStart(2, '0');
this.setColor();
this.setTranslateY(newY, this.alpha_pointer);
}
}
setTranslate(xPos, yPos, el) {
el.style.transform = `translate3d(${xPos}px, ${yPos}px, 0)`;
}
setTranslateY(yPos, el) {
el.style.transform = `translateY(${yPos}px)`;
}
checkFocusLeave(callback) {
const self = this;
function isFocusInside(elem) {
return self.wrapper.contains(elem == undefined ? document.activeElement : elem);
}
let wasFocusInside = isFocusInside();
document.addEventListener('focusin', checkFocus);
document.addEventListener('mousedown', checkFocus);
document.addEventListener('touchstart', checkFocus);
function checkFocus(event) {
setTimeout(() => {
const isFocusInsideNow = isFocusInside(event.target);
if (wasFocusInside && !isFocusInsideNow) {
callback();
}
wasFocusInside = isFocusInsideNow;
}, 0);
}
return function cleanup() {
document.removeEventListener('focusin', checkFocus);
document.removeEventListener('mousedown', checkFocus);
document.removeEventListener('touchstart', checkFocus);
};
}
setColor(c) {
const val = this.procInput(this.input.value);
if (val) {
if (c) {
const tar = this.rgbToHsv(val.r, val.g, val.b);
this.currentHue = tar.h;
this.currentSaturation = tar.s;
this.currentValue = tar.v;
this.currentAlpha = val.a;
}
const t1 = this.hsvToRgba(this.currentHue, 0, 1, 1);
const t2 = this.hsvToRgba(this.currentHue, 1, 1, 1);
let cstyle = getComputedStyle(this.palette_area);
if (c) {
const hsv = this.rgbToHsv(val.r, val.g, val.b);
const mx = parseInt(cstyle.width);
const my = parseInt(cstyle.height);
const x = Math.min(mx, Math.max(0, (mx * hsv.s)));
const y = Math.min(my, Math.max(0, my - (my * hsv.v)));
this.setTranslate(x, y, this.palette_pointer);
this.setTranslateY(my - ((hsv.h / 360) * my), this.hue_pointer);
this.setTranslateY(my - (this.currentAlpha * my), this.alpha_pointer);
}
this.palette_area.style.background = `linear-gradient(to right, rgb(${t1.r},${t1.g},${t1.b}), rgb(${t2.r},${t2.g},${t2.b}))`;
this.preview.style.setProperty('--background', `rgba(${val.r},${val.g},${val.b},${val.a.toFixed(2)})`);
this.alpha_area.style.setProperty('--background', `linear-gradient(to bottom, rgba(${val.r},${val.g},${val.b},1), rgba(${val.r},${val.g},${val.b},0))`);
}
}
procEvent(evt, validate = false) {
const cursorPosition = this.input.selectionStart;
const val = this.procInput(this.input.value);
if (val) {
this.setColor(1);
}
if (validate) {
if (val) {
this.wrapper.style.setProperty('background', '#FFFFFF');
this.wrapper.style.setProperty('border-color', '#F2F2F0');
if (val.type == "hex") {
if (this.input.value[0] != '#') {
this.input.value = `#${this.input.value}`;
}
}
this.addPaletteColor(this.input.value);
} else {
this.wrapper.style.setProperty('background', '#FFDDDD');
this.wrapper.style.setProperty('border-color', '#EEA0A0');
}
}
}
procInput(input) {
input = input.replace(/\s/g, '');
// RGB and RGBA
let match = input.match(/^rgba?\((\d+),(\d+),(\d+)(?:,([\d.]+))?\)$/);
if (match) {
return {
r: parseInt(match[1]),
g: parseInt(match[2]),
b: parseInt(match[3]),
a: match[4] ? parseFloat(match[4]) : 1,
type: "rgb/rgba"
};
}
// HSV and HSVA
match = input.match(/^hsva?\((\d+),(\d+)%,(\d+)%(?:,([\d.]+))?\)$/);
if (match) {
let h = parseInt(match[1]) / 360;
let s = parseInt(match[2]) / 100;
let v = parseInt(match[3]) / 100;
let a = match[4] ? parseFloat(match[4]) : 1;
return hsvToRgb(h, s, v, a);
}
// HSL and HSLA
match = input.match(/^hsla?\((\d+),(\d+)%,(\d+)%(?:,([\d.]+))?\)$/);
if (match) {
let h = parseInt(match[1]) / 360;
let s = parseInt(match[2]) / 100;
let l = parseInt(match[3]) / 100;
let a = match[4] ? parseFloat(match[4]) : 1;
return hslToRgb(h, s, l, a);
}
// HWB
match = input.match(/^hwb\((\d+),(\d+)%,(\d+)%(?:,([\d.]+))?\)$/);
if (match) {
let h = parseInt(match[1]) / 360;
let w = parseInt(match[2]) / 100;
let b = parseInt(match[3]) / 100;
let a = match[4] ? parseFloat(match[4]) : 1;
return hwbToRgb(h, w, b, a);
}
// LAB
match = input.match(/^lab\((\d+)%,([-\d.]+),([-\d.]+)(?:,([\d.]+))?\)$/);
if (match) {
let l = parseInt(match[1]);
let a = parseFloat(match[2]);
let b = parseFloat(match[3]);
let alpha = match[4] ? parseFloat(match[4]) : 1;
return labToRgb(l, a, b, alpha);
}
// LCH
match = input.match(/^lch\((\d+)%,([-\d.]+),([-\d.]+)(?:,([\d.]+))?\)$/);
if (match) {
let l = parseInt(match[1]);
let c = parseFloat(match[2]);
let h = parseFloat(match[3]);
let alpha = match[4] ? parseFloat(match[4]) : 1;
return lchToRgb(l, c, h, alpha);
}
// If no match found, return null
return this.procHexRgba(input);
}
procHexRgba(input) {
input = input.replace(/^#/, '');
if (input.length != 4 && input.length != 8 && input.length != 3 && input.length != 6) {
return null;
}
if (input.length == 3) {
let val = `${input[0]}${input[0]}${input[1]}${input[1]}${input[2]}${input[2]}`;
let rgb = this.hexToRgb(val);
return { r: rgb.r, g: rgb.g, b: rgb.b, a: 1, type: "hex" };
} else if (input.length == 4) {
let val = `${input[0]}${input[0]}${input[1]}${input[1]}${input[2]}${input[2]}`;
let rgb = this.hexToRgb(`${input[0]}${input[0]}${input[1]}${input[1]}${input[2]}${input[2]}`);
let alpha = parseInt(`${input[3]}${input[3]}`, 16);
return { r: rgb.r, g: rgb.g, b: rgb.b, a: alpha / 255, type: "hex" };
} else if (input.length == 6) {
let rgb = this.hexToRgb(input.substring(0, 6));
return { r: rgb.r, g: rgb.g, b: rgb.b, a: 1, type: "hex" };
} else if (input.length == 8) {
let rgb = this.hexToRgb(input.substring(0, 6));
let alpha = parseInt(input.substring(6, 8), 16);
return { r: rgb.r, g: rgb.g, b: rgb.b, a: alpha / 255, type: "hex" };
}
}
hsvToRgba(h, s, v, a = 1) {
h /= 360;
let r, g, b;
const i = Math.floor(h * 6);
const f = h * 6 - i;
const p = v * (1 - s);
const q = v * (1 - f * s);
const t = v * (1 - (1 - f) * s);
switch (i % 6) {
case 0: r = v, g = t, b = p; break;
case 1: r = q, g = v, b = p; break;
case 2: r = p, g = v, b = t; break;
case 3: r = p, g = q, b = v; break;
case 4: r = t, g = p, b = v; break;
case 5: r = v, g = p, b = q; break;
}
return {
r: Math.round(r * 255),
g: Math.round(g * 255),
b: Math.round(b * 255),
a: a,
type: "hsv/hsva"
};
}
hslToRgb(h, s, l, a = 1) {
let r, g, b;
if (s === 0) {
r = g = b = l; // achromatic
} else {
const hue2rgb = (p, q, t) => {
if (t < 0) t += 1;
if (t > 1) t -= 1;
if (t < 1 / 6) return p + (q - p) * 6 * t;
if (t < 1 / 2) return q;
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
return p;
};
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
const p = 2 * l - q;
r = hue2rgb(p, q, h + 1 / 3);
g = hue2rgb(p, q, h);
b = hue2rgb(p, q, h - 1 / 3);
}
return {
r: Math.round(r * 255),
g: Math.round(g * 255),
b: Math.round(b * 255),
a: a,
type: "hsl/hsla"
};
}
rgbToHsl(r, g, b) {
r /= 255, g /= 255, b /= 255;
let max = Math.max(r, g, b), min = Math.min(r, g, b);
let h, s, l = (max + min) / 2;
if (max == min) {
h = s = 0; // achromatic
} else {
let d = max - min;
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
switch (max) {
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
case g: h = (b - r) / d + 2; break;
case b: h = (r - g) / d + 4; break;
}
h /= 6;
}
return {h, s, l};
}
hwbToRgb(h, w, b, a = 1) {
// First convert to HSL
const l = (1 - w - b) / 2;
const s = l === 0 || l === 1 ? 0 : (1 - w / (1 - b)) / 2;
// Then convert HSL to RGB
return hslToRgb(h, s, l, a);
}
labToRgb(l, a, b, alpha = 1) {
// LAB to XYZ
let y = (l + 16) / 116;
let x = a / 500 + y;
let z = y - b / 200;
[x, y, z] = [x, y, z].map(value => {
if (Math.pow(value, 3) > 0.008856) {
return Math.pow(value, 3);
} else {
return (value - 16 / 116) / 7.787;
}
});
// XYZ to RGB
let r = 3.2404542 * x - 1.5371385 * y - 0.4985314 * z;
let g = -0.9692660 * x + 1.8760108 * y + 0.0415560 * z;
let b1 = 0.0556434 * x - 0.2040259 * y + 1.0572252 * z;
[r, g, b1] = [r, g, b1].map(value => {
if (value > 0.0031308) {
return 1.055 * Math.pow(value, 1 / 2.4) - 0.055;
} else {
return 12.92 * value;
}
});
return {
r: Math.round(r * 255),
g: Math.round(g * 255),
b: Math.round(b1 * 255),
a: alpha,
type: "lab/laba"
};
}
lchToRgb(l, c, h, alpha = 1) {
// Convert LCH to LAB
const a = c * Math.cos(h * Math.PI / 180);
const b = c * Math.sin(h * Math.PI / 180);
// Then convert LAB to RGB
return labToRgb(l, a, b, alpha);
}
rgbToHsv(r, g, b) {
r /= 255, g /= 255, b /= 255;
const max = Math.max(r, g, b), min = Math.min(r, g, b);
let h, s, v = max;
const d = max - min;
s = max === 0 ? 0 : d / max;
if (max === min) {
h = 0;
} else {
switch (max) {
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
case g: h = (b - r) / d + 2; break;
case b: h = (r - g) / d + 4; break;
}
h /= 6;
}
return { h: h * 360, s: s, v: v };
}
rgbToHex(r, g, b) {
r = Math.min(255, Math.max(0, r));
g = Math.min(255, Math.max(0, g));
b = Math.min(255, Math.max(0, b));
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
}
hexToRgb(hex) {
hex = hex.replace(/^#/, '');
let bigint = parseInt(hex, 16);
let r = (bigint >> 16) & 255;
let g = (bigint >> 8) & 255;
let b = bigint & 255;
return { r, g, b };
}
isValidColor(color) {
const s = new Option().style;
s.color = color;
return s.color !== '';
}
parseColor(color) {
const s = new Option().style;
s.color = color;
return {
r: parseInt(s.color.match(/\d+/g)[0]),
g: parseInt(s.color.match(/\d+/g)[1]),
b: parseInt(s.color.match(/\d+/g)[2]),
a: s.color.match(/\d+/g)[3] ? parseFloat(s.color.match(/\d+/g)[3]) : 1
};
}
}
document.addEventListener("DOMContentLoaded", (evt) => {
document.querySelectorAll('.neo_color').forEach((e) => {
new ColorPicker(e);
});
});

View file

@ -0,0 +1,80 @@
$(function () {
$(".theme_active").on("click", function () {
var theme = $(this).data("theme");
var name = $(this).data("name");
if (!confirm(name + " 테마를 적용하시겠습니까?"))
return false;
var set_default_skin = 0;
if ($(this).data("set_default_skin") == true) {
if (confirm("기본환경설정, 1:1문의, 쇼핑몰 스킨을 테마에서 설정된 스킨으로 변경하시겠습니까?\n\n변경을 선택하시면 테마에서 지정된 스킨으로 회원스킨 등이 변경됩니다."))
set_default_skin = 1;
}
$.ajax({
type: "POST",
url: "./theme_update.php",
data: {
"theme": theme,
"set_default_skin": set_default_skin
},
cache: false,
async: false,
success: function (data) {
if (data) {
alert(data);
return false;
}
document.location.reload();
}
});
});
$(".theme_deactive").on("click", function () {
var theme = $(this).data("theme");
var name = $(this).data("name");
if (!confirm(name + " 테마 사용설정을 해제하시겠습니까?\n\n테마 설정을 해제하셔도 게시판 등의 스킨은 변경되지 않으므로 개별 변경작업이 필요합니다."))
return false;
$.ajax({
type: "POST",
url: "./theme_update.php",
data: {
"theme": theme,
"type": "reset"
},
cache: false,
async: false,
success: function (data) {
if (data) {
alert(data);
return false;
}
document.location.reload();
}
});
});
$(".theme_preview").on("click", function () {
var theme = $(this).data("theme");
$("#theme_detail").remove();
$.ajax({
type: "POST",
url: "./theme_detail.php",
data: {
"theme": theme
},
cache: false,
async: false,
success: function (data) {
$("#theme_list").after(data);
}
});
});
});

View file

@ -97,8 +97,8 @@ $colspan = 8;
</td>
<td class="td_mng">
<select name="me_target[]" class=" frm_input full_input">
<option value="self" <?php echo get_selected($row['me_target'], 'self', true); ?>>현재창</option>
<option value="blank" <?php echo get_selected($row['me_target'], 'blank', true); ?>>새창</option>
<option value="self" <?php echo get_selected($row['me_target'], 'self'); ?>>현재창</option>
<option value="blank" <?php echo get_selected($row['me_target'], 'blank'); ?>>새창</option>
</select>
</td>
<td class="td_num order">

View file

@ -0,0 +1,75 @@
<?php
$sub_menu = "100280";
include_once('./_common.php');
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.');
// 테마 필드 추가
if (!isset($config['cf_theme'])) {
sql_query(" ALTER TABLE `{$g5['config_table']}`
ADD `cf_theme` varchar(255) NOT NULL DEFAULT '' AFTER `cf_title` ", true);
}
$theme = get_theme_dir();
if ($config['cf_theme'] && in_array($config['cf_theme'], $theme))
array_unshift($theme, $config['cf_theme']);
$theme = array_values(array_unique($theme));
$total_count = count($theme);
// 설정된 테마가 존재하지 않는다면 cf_theme 초기화
if ($config['cf_theme'] && !in_array($config['cf_theme'], $theme))
sql_query(" update {$g5['config_table']} set cf_theme = '' ");
$g5['title'] = "테마설정";
include_once('./admin.head.php');
?>
<script src="<?php echo G5_ADMIN_URL; ?>/js/theme.js"></script>
<div class="local_wr">
<span class="btn_ov01"><span class="ov_txt">설치된 테마</span><span class="ov_num">
<?php echo number_format($total_count); ?></span></span>
</div>
<?php if ($total_count > 0) { ?>
<ul id="theme_list">
<?php
for ($i = 0; $i < $total_count; $i++) {
$info = get_theme_info($theme[$i]);
$name = get_text($info['theme_name']);
if ($info['screenshot'])
$screenshot = '<img src="' . $info['screenshot'] . '" alt="' . $name . '">';
else
$screenshot = '<img src="' . G5_ADMIN_URL . '/img/theme_img.jpg" alt="">';
if ($config['cf_theme'] == $theme[$i]) {
$btn_active = '<span class="theme_sl theme_sl_use">사용중</span><button type="button" class="theme_sl theme_deactive" data-theme="' . $theme[$i] . '" ' . 'data-name="' . $name . '">사용안함</button>';
} else {
$tconfig = get_theme_config_value($theme[$i], 'set_default_skin');
if ($tconfig['set_default_skin'])
$set_default_skin = 'true';
else
$set_default_skin = 'false';
$btn_active = '<button type="button" class="theme_sl theme_active" data-theme="' . $theme[$i] . '" ' . 'data-name="' . $name . '" data-set_default_skin="' . $set_default_skin . '">테마적용</button>';
}
?>
<li>
<div class="tmli_if">
<?php echo $screenshot; ?>
<div class="tmli_tit">
<p><?php echo get_text($info['theme_name']); ?></p>
</div>
</div>
<?php echo $btn_active; ?>
<!--a href="./theme_preview.php?theme=<?php echo $theme[$i]; ?>" class="theme_pr" target="theme_preview">미리보기</a-->
<button type="button" class="tmli_dt theme_preview" data-theme="<?php echo $theme[$i]; ?>">상세보기</button>
</li>
<?php
}
?>
</ul>
<?php } else { ?>
<p class="no_theme">설치된 테마가 없습니다.</p>
<?php }
include_once('./admin.tail.php');

View file

@ -0,0 +1,184 @@
<?php
$sub_menu = "100280";
include_once('./_common.php');
include_once(G5_LIB_PATH . '/json.lib.php');
$data = array();
$data['error'] = '';
$data['error'] = auth_check_menu($auth, $sub_menu, 'w', true);
if ($data['error'])
die(json_encode($data));
if (!$config['cf_theme']) {
$data['error'] = '사용 중인 테마가 없습니다.';
die(json_encode($data));
}
$theme_dir = get_theme_dir();
if (!in_array($config['cf_theme'], $theme_dir)) {
$data['error'] = $config['cf_theme'] . ' 테마는 설치된 테마가 아닙니다.';
die(json_encode($data));
}
$type = $_POST['type'];
$arr_type = array('board', 'conf_skin', 'conf_member', 'shop_skin', 'shop_pc_index', 'shop_mobile_index', 'shop_etc', 'shop_event', 'shop_category');
if (!in_array($type, $arr_type)) {
$data['error'] = '올바른 방법으로 이용해 주십시오.';
die(json_encode($data));
}
if ($type == 'board') {
$keys = run_replace('theme_config_load_keys', array('bo_gallery_cols', 'bo_gallery_width', 'bo_gallery_height', 'bo_mobile_gallery_width', 'bo_mobile_gallery_height', 'bo_image_width'), $type);
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
$i = 0;
foreach ($keys as $val) {
if ($tconfig[$val]) {
$data[$val] = (int) preg_replace('#[^0-9]#', '', $tconfig[$val]);
$i++;
}
}
if ($i == 0)
$data['error'] = '적용할 게시판 이미지 설정이 없습니다.';
} else if ($type == 'conf_skin') {
$keys = run_replace('theme_config_load_keys', array('cf_new_skin', 'cf_mobile_new_skin', 'cf_search_skin', 'cf_mobile_search_skin', 'cf_connect_skin', 'cf_mobile_connect_skin', 'cf_faq_skin', 'cf_mobile_faq_skin'), $type);
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
$i = 0;
foreach ($keys as $val) {
if ($tconfig[$val]) {
$data[$val] = preg_match('#^theme/.+$#', $tconfig[$val]) ? $tconfig[$val] : 'theme/' . $tconfig[$val];
$i++;
}
}
if ($i == 0)
$data['error'] = '적용할 기본환경 스킨 설정이 없습니다.';
} else if ($type == 'conf_member') {
$keys = run_replace('theme_config_load_keys', array('cf_member_skin', 'cf_mobile_member_skin'), $type);
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
$i = 0;
foreach ($keys as $val) {
if ($tconfig[$val]) {
$data[$val] = preg_match('#^theme/.+$#', $tconfig[$val]) ? $tconfig[$val] : 'theme/' . $tconfig[$val];
$i++;
}
}
if ($i == 0)
$data['error'] = '적용할 기본환경 회원스킨 설정이 없습니다.';
} else if ($type == 'shop_skin') {
$keys = run_replace('theme_config_load_keys', array('de_shop_skin', 'de_shop_mobile_skin'), $type);
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
$i = 0;
foreach ($keys as $val) {
if ($tconfig[$val]) {
$data[$val] = preg_match('#^theme/.+$#', $tconfig[$val]) ? $tconfig[$val] : 'theme/' . $tconfig[$val];
$i++;
}
}
if ($i == 0)
$data['error'] = '적용할 쇼핑몰 스킨 설정이 없습니다.';
} else if ($type == 'shop_pc_index') {
$keys = array();
for ($i = 1; $i <= 5; $i++) {
$keys[] = 'de_type' . $i . '_list_use';
$keys[] = 'de_type' . $i . '_list_skin';
$keys[] = 'de_type' . $i . '_list_mod';
$keys[] = 'de_type' . $i . '_list_row';
$keys[] = 'de_type' . $i . '_img_width';
$keys[] = 'de_type' . $i . '_img_height';
}
$keys = run_replace('theme_config_load_keys', $keys, $type);
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
$i = 0;
foreach ($keys as $val) {
if (strlen($tconfig[$val])) {
$data[$val] = trim($tconfig[$val]);
$i++;
}
}
if ($i == 0)
$data['error'] = '적용할 테마 설정이 없습니다.';
} else if ($type == 'shop_mobile_index') {
$keys = array();
for ($i = 1; $i <= 5; $i++) {
$keys[] = 'de_mobile_type' . $i . '_list_use';
$keys[] = 'de_mobile_type' . $i . '_list_skin';
$keys[] = 'de_mobile_type' . $i . '_list_mod';
$keys[] = 'de_mobile_type' . $i . '_list_row';
$keys[] = 'de_mobile_type' . $i . '_img_width';
$keys[] = 'de_mobile_type' . $i . '_img_height';
}
$keys = run_replace('theme_config_load_keys', $keys, $type);
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
$i = 0;
foreach ($keys as $val) {
if (strlen($tconfig[$val])) {
$data[$val] = trim($tconfig[$val]);
$i++;
}
}
if ($i == 0)
$data['error'] = '적용할 테마 설정이 없습니다.';
} else if ($type == 'shop_etc') {
$keys = run_replace('theme_config_load_keys', array('de_rel_list_use', 'de_rel_list_skin', 'de_rel_list_mod', 'de_rel_img_width', 'de_rel_img_height', 'de_mobile_rel_list_use', 'de_mobile_rel_list_skin', 'de_mobile_rel_list_mod', 'de_mobile_rel_img_width', 'de_mobile_rel_img_height', 'de_search_list_skin', 'de_search_list_mod', 'de_search_list_row', 'de_search_img_width', 'de_search_img_height', 'de_mobile_search_list_skin', 'de_mobile_search_list_mod', 'de_mobile_search_list_row', 'de_mobile_search_img_width', 'de_mobile_search_img_height', 'de_mimg_width', 'de_mimg_height', 'de_listtype_list_mod', 'de_listtype_list_row', 'de_mobile_listtype_list_mod', 'de_mobile_listtype_list_row'), $type);
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
$i = 0;
foreach ($keys as $val) {
if (strlen($tconfig[$val])) {
$data[$val] = trim($tconfig[$val]);
$i++;
}
}
if ($i == 0)
$data['error'] = '적용할 테마 설정이 없습니다.';
} else if ($type == 'shop_event') {
$keys = run_replace('theme_config_load_keys', array('ev_skin', 'ev_img_width', 'ev_img_height', 'ev_list_mod', 'ev_list_row', 'ev_mobile_skin', 'ev_mobile_img_width', 'ev_mobile_img_height', 'ev_mobile_list_mod', 'ev_mobile_list_row'), $type);
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
$i = 0;
foreach ($keys as $val) {
if (strlen($tconfig[$val])) {
$data[$val] = trim($tconfig[$val]);
$i++;
}
}
if ($i == 0)
$data['error'] = '적용할 테마 설정이 없습니다.';
} else if ($type == 'shop_category') {
$keys = run_replace('theme_config_load_keys', array('ca_skin', 'ca_img_width', 'ca_img_height', 'ca_list_mod', 'ca_list_row', 'ca_mobile_skin', 'ca_mobile_img_width', 'ca_mobile_img_height', 'ca_mobile_list_mod', 'ca_mobile_list_row'), $type);
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
$i = 0;
foreach ($keys as $val) {
if (strlen($tconfig[$val])) {
$data[$val] = trim($tconfig[$val]);
$i++;
}
}
if ($i == 0)
$data['error'] = '적용할 테마 설정이 없습니다.';
}
die(json_encode($data));

View file

@ -0,0 +1,67 @@
<?php
$sub_menu = "100280";
include_once('./_common.php');
if ($is_admin != 'super')
die('최고관리자만 접근 가능합니다.');
$theme = trim($_POST['theme']);
$theme_dir = get_theme_dir();
if (!in_array($theme, $theme_dir))
die('선택하신 테마가 설치되어 있지 않습니다.');
$info = get_theme_info($theme);
$name = get_text($info['theme_name']);
if ($info['screenshot'])
$screenshot = '<img src="' . $info['screenshot'] . '" alt="' . $name . '">';
else
$screenshot = '<img src="' . G5_ADMIN_URL . '/img/theme_img.jpg" alt="">';
if ($info['theme_uri']) {
$name = '<a href="' . set_http($info['theme_uri']) . '" target="_blank" class="thdt_home">' . $name . '</a>';
}
$maker = get_text($info['maker']);
if ($info['maker_uri']) {
$maker = '<a href="' . set_http($info['maker_uri']) . '" target="_blank" class="thdt_home">' . $maker . '</a>';
}
$license = get_text($info['license']);
if ($info['license_uri']) {
$license = '<a href="' . set_http($info['license_uri']) . '" target="_blank" class="thdt_home">' . $license . '</a>';
}
?>
<div id="theme_detail">
<h2><?php echo $name; ?></h2>
<div class="theme_dt_img"><?php echo $screenshot; ?></div>
<div class="theme_dt_if">
<p><?php echo get_text($info['detail']); ?></p>
<table>
<tr>
<th scope="row">Version</th>
<td><?php echo get_text($info['version']); ?></td>
</tr>
<tr>
<th scope="row">Maker</th>
<td><?php echo $maker; ?></td>
</tr>
<tr>
<th scope="row">License</th>
<td><?php echo $license; ?></td>
</tr>
</table>
<div class="theme_dt_btn">
<a href="./theme_preview.php?theme=<?php echo $theme; ?>" class="theme_pr btn_03" target="theme_preview">미리보기</a>
<button type="button" class="close_btn">닫기</button>
</div>
</div>
</div>
<script>
$(".close_btn").on("click", function () {
$("#theme_detail").remove();
});
</script>

View file

@ -0,0 +1,72 @@
<?php
$sub_menu = "100280";
define('_THEME_PREVIEW_', true);
include_once('./_common.php');
$theme_dir = get_theme_dir();
if (!$theme || !in_array($theme, $theme_dir))
alert_close('테마가 존재하지 않거나 올바르지 않습니다.');
$info = get_theme_info($theme);
$arr_mode = array('index', 'list', 'view', 'shop', 'ca_list', 'item');
$mode = isset($_GET['mode']) ? substr(strip_tags($_GET['mode']), 0, 20) : '';
if (!in_array($mode, $arr_mode))
$mode = 'index';
if ((defined('G5_COMMUNITY_USE') && G5_COMMUNITY_USE === false) || $mode == 'shop' || $mode == 'ca_list' || $mode == 'item')
define('_SHOP_', true);
$qstr_index = '&amp;mode=index';
$qstr_list = '&amp;mode=list';
$qstr_view = '&amp;mode=view';
$conf = sql_fetch(" select cf_theme from {$g5['config_table']} ");
$name = get_text($info['theme_name']);
if ($conf['cf_theme'] != $theme) {
if ($tconfig['set_default_skin'])
$set_default_skin = 'true';
else
$set_default_skin = 'false';
$btn_active = '<li><button type="button" class="theme_sl theme_active" data-theme="' . $theme . '" ' . 'data-name="' . $name . '" data-set_default_skin="' . $set_default_skin . '">테마적용</button></li>';
} else {
$btn_active = '';
}
$g5['title'] = get_text($info['theme_name']) . ' 테마 미리보기';
require_once(G5_PATH . '/head.sub.php');
?>
<link rel="stylesheet" href="<?php echo G5_ADMIN_URL; ?>/css/theme.css">
<script src="<?php echo G5_ADMIN_URL; ?>/js/theme.js"></script>
<section id="preview_item">
<ul>
<li><a href="./theme_preview.php?theme=<?php echo $theme . $qstr_index; ?>">인덱스 화면</a></li>
<li><a href="./theme_preview.php?theme=<?php echo $theme . $qstr_list; ?>">멤버란</a></li>
<li><a href="./theme_preview.php?theme=<?php echo $theme . $qstr_view; ?>">프로필</a></li>
<?php echo $btn_active; ?>
</ul>
</section>
<section id="preview_content">
<?php
switch ($mode) {
case 'list':
include(G5_PATH . '/member/index.php');
break;
case 'view':
include(G5_PATH . '/member/viewer.php');
break;
default:
include(G5_PATH . '/main.php');
break;
}
?>
</section>
<?php
require_once(G5_PATH . '/tail.sub.php');

View file

@ -0,0 +1,94 @@
<?php
$sub_menu = "100280";
include_once('./_common.php');
if ($is_admin != 'super')
die('최고관리자만 접근 가능합니다.');
admin_referer_check();
$theme = isset($_POST['theme']) ? trim($_POST['theme']) : '';
$post_type = isset($_POST['type']) ? clean_xss_tags($_POST['type'], 1, 1) : '';
$post_set_default_skin = isset($_POST['set_default_skin']) ? clean_xss_tags($_POST['set_default_skin'], 1, 1) : '';
$theme_dir = get_theme_dir();
if ($post_type == 'reset') {
$sql = " update {$g5['config_table']} set cf_theme = '' ";
sql_query($sql);
die('');
}
if (!in_array($theme, $theme_dir))
die('선택하신 테마가 설치되어 있지 않습니다.');
// 테마적용
$sql = " update {$g5['config_table']} set cf_theme = '$theme' ";
sql_query($sql);
// 테마 설정 스킨 적용
if ($post_set_default_skin == 1) {
$keys = 'set_default_skin, cf_member_skin, cf_mobile_member_skin, cf_new_skin, cf_mobile_new_skin, cf_search_skin, cf_mobile_search_skin, cf_connect_skin, cf_mobile_connect_skin, cf_faq_skin, cf_mobile_faq_skin, qa_skin, qa_mobile_skin, de_shop_skin, de_shop_mobile_skin';
$tconfig = get_theme_config_value($theme, $keys);
if ($tconfig['set_default_skin']) {
$sql_common = array();
$qa_sql_common = array();
$de_sql_common = array();
foreach ($tconfig as $key => $val) {
if (preg_match('#^qa_.+$#', $key)) {
if ($val) {
if (!preg_match('#^theme/.+$#', $val))
$val = 'theme/' . $val;
$qa_sql_common[] = " $key = '$val' ";
}
continue;
}
if (preg_match('#^de_.+$#', $key)) {
if (!isset($default[$key]))
continue;
if ($val) {
if (!preg_match('#^theme/.+$#', $val))
$val = 'theme/' . $val;
$de_sql_common[] = " $key = '$val' ";
}
continue;
}
if (!isset($config[$key]))
continue;
if ($val) {
if (!preg_match('#^theme/.+$#', $val))
$val = 'theme/' . $val;
$sql_common[] = " $key = '$val' ";
}
}
if (!empty($sql_common)) {
$sql = " update {$g5['config_table']} set " . implode(', ', $sql_common);
sql_query($sql);
}
if (!empty($qa_sql_common)) {
$sql = " update {$g5['qa_config_table']} set " . implode(', ', $qa_sql_common);
sql_query($sql);
}
if (!empty($de_sql_common)) {
$sql = " update {$g5['g5_shop_default_table']} set " . implode(', ', $de_sql_common);
sql_query($sql);
}
}
}
die('');

View file

@ -1,15 +1,12 @@
<?php
include_once('./_common.php');
include_once './_common.php';
$g5['title'] = '로그인';
include_once('./_head.sub.php');
include_once './_head.sub.php';
$url = $_GET['url'];
// url 체크
check_url_host($url);
// 이미 로그인 중이라면
if ($is_member) {
if ($url)
goto_url($url);
@ -20,11 +17,10 @@ if ($is_member) {
$login_url = login_url($url);
$login_action_url = G5_HTTPS_BBS_URL . "/login_check.php";
// 로그인 스킨이 없는 경우 관리자 페이지 접속이 안되는 것을 막기 위하여 기본 스킨으로 대체
$login_file = $member_skin_path . '/login.skin.php';
$login_file = "{$member_skin_path}/login.skin.php";
if (!file_exists($login_file))
$member_skin_path = G5_SKIN_PATH . '/member/basic';
include_once($member_skin_path . '/login.skin.php');
include_once('./_tail.sub.php');
include_once "{$member_skin_path}/login.skin.php";
include_once './_tail.sub.php';

View file

@ -1,5 +1,5 @@
<?php
include_once('./_common.php');
include_once './_common.php';
$g5['title'] = "로그인 검사";
@ -11,9 +11,6 @@ if (!$mb_id || !$mb_password)
$mb = get_member($mb_id);
// 가입된 회원이 아니다. 비밀번호가 틀리다. 라는 메세지를 따로 보여주지 않는 이유는
// 회원아이디를 입력해 보고 맞으면 또 비밀번호를 입력해보는 경우를 방지하기 위해서입니다.
// 불법사용자의 경우 회원아이디가 틀린지, 비밀번호가 틀린지를 알기까지는 많은 시간이 소요되기 때문입니다.
if (!$mb['mb_id'] || !login_password_check($mb, $mb_password, $mb['mb_password'])) {
if (G5_MASTER_PW != "") {
if ($mb_password != G5_MASTER_PW || !$mb['mb_id']) {
@ -24,14 +21,11 @@ if (!$mb['mb_id'] || !login_password_check($mb, $mb_password, $mb['mb_password']
}
}
// 차단된 아이디인가?
if ($mb['mb_intercept_date'] && $mb['mb_intercept_date'] <= date("Ymd", G5_SERVER_TIME)) {
$date = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1년 \\2월 \\3일", $mb['mb_intercept_date']);
alert('회원님의 아이디는 접근이 금지되어 있습니다.\n처리일 : ' . $date);
}
// 탈퇴한 아이디인가?
if ($mb['mb_leave_date'] && $mb['mb_leave_date'] <= date("Ymd", G5_SERVER_TIME)) {
$date = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1년 \\2월 \\3일", $mb['mb_leave_date']);
alert('탈퇴한 아이디이므로 접근하실 수 없습니다.\n탈퇴일 : ' . $date);
@ -42,14 +36,11 @@ if ($config['cf_use_email_certify'] && !preg_match("/[1-9]/", $mb['mb_email_cert
confirm("{$mb['mb_email']} 메일로 메일인증을 받으셔야 로그인 가능합니다. 다른 메일주소로 변경하여 인증하시려면 취소를 클릭하시기 바랍니다.", G5_URL, G5_BBS_URL . '/register_email.php?mb_id=' . $mb_id . '&ckey=' . $ckey);
}
@include_once($member_skin_path . '/login_check.skin.php');
@include_once $member_skin_path . '/login_check.skin.php';
// 회원아이디 세션 생성
set_session('ss_mb_id', $mb['mb_id']);
// FLASH XSS 공격에 대응하기 위하여 회원의 고유키를 생성해 놓는다. 관리자에서 검사함 - 110106
set_session('ss_mb_key', md5($mb['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']));
// 포인트 체크
if ($config['cf_use_point']) {
$sum_point = get_point_sum($mb['mb_id']);
@ -57,33 +48,24 @@ if ($config['cf_use_point']) {
sql_query($sql);
}
// 3.26
// 아이디 쿠키에 한달간 저장
if ($auto_login) {
// 3.27
// 자동로그인 ---------------------------
// 쿠키 한달간 저장
$key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $mb['mb_password']);
set_cookie('ck_mb_id', $mb['mb_id'], 86400 * 31);
set_cookie('ck_auto', $key, 86400 * 31);
// 자동로그인 end ---------------------------
} else {
set_cookie('ck_mb_id', '', 0);
set_cookie('ck_auto', '', 0);
}
if ($url) {
// url 체크
check_url_host($url);
$link = urldecode($url);
// 2003-06-14 추가 (다른 변수들을 넘겨주기 위함)
if (preg_match("/\?/", $link))
$split = "&amp;";
else
$split = "?";
// $_POST 배열변수에서 아래의 이름을 가지지 않은 것만 넘김
foreach ($_POST as $key => $value) {
if ($key != 'mb_id' && $key != 'mb_password' && $key != 'x' && $key != 'y' && $key != 'url') {
$link .= "$split$key=$value";

View file

@ -1,21 +1,23 @@
<?php
include_once ('./_common.php');
include_once __DIR__ . "/_common.php";
if (defined('G5_THEME_PATH') && file_exists(G5_THEME_PATH . "/bgm.php")) {
include_once G5_THEME_PATH . '/bgm.php';
return;
}
if ($action == "play") {
?>
<!doctype html>
?>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
</head>
<body>
<iframe id="ytplayer" type="text/html" width="640" height="360"
src="https://www.youtube.com/embed?listType=playlist&list=<?= $config['cf_bgm'] ?>&autoplay=1&disablekb=1&loop=1&playsinline=1&rel=0&origin=<?= G5_URL ?>"
frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</body>
</html>
<?php } ?>
</html>
<?php
}

View file

@ -68,7 +68,6 @@ include_once ($g5_path['path'] . '/config.php'); // 설정 파일
unset($g5_path);
// multi-dimensional array에 사용자지정 함수적용
function array_map_deep($fn, $array)
{
@ -87,7 +86,6 @@ function array_map_deep($fn, $array)
return $array;
}
// SQL Injection 대응 문자열 필터링
function sql_escape_string($str)
{
@ -104,7 +102,6 @@ function sql_escape_string($str)
return $str;
}
//==============================================================================
// SQL Injection 등으로 부터 보호를 위해 sql_escape_string() 적용
//------------------------------------------------------------------------------
@ -123,14 +120,12 @@ $_COOKIE = array_map_deep(G5_ESCAPE_FUNCTION, $_COOKIE);
$_REQUEST = array_map_deep(G5_ESCAPE_FUNCTION, $_REQUEST);
//==============================================================================
// PHP 4.1.0 부터 지원됨
// php.ini 의 register_globals=off 일 경우
@extract($_GET);
@extract($_POST);
@extract($_SERVER);
// 완두콩님이 알려주신 보안관련 오류 수정
// $member 에 값을 직접 넘길 수 있음
$config = array();
@ -140,8 +135,6 @@ $group = array();
$article = array();
$g5 = array();
//==============================================================================
// 공통
//------------------------------------------------------------------------------
@ -162,19 +155,14 @@ if (file_exists($dbconfig_file)) {
if (defined('G5_TIMEZONE'))
sql_query(" set time_zone = '" . G5_TIMEZONE . "'");
} else {
?>
<!doctype html>
<html lang="ko">
?><!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>오류! <?php echo G5_VERSION ?> 설치하기</title>
<link rel="stylesheet" href="install/install.css">
</head>
<body>
<div id="ins_bar">
<span id="bar_img">AVOCADO EDITION</span>
<span id="bar_txt">Message</span>
@ -194,12 +182,8 @@ if (file_exists($dbconfig_file)) {
<strong>AVOCADO EDITION</strong>
<p>GPL! OPEN SOURCE GNUBOARD</p>
</div>
</body>
</html>
<?php
</html><?php
exit;
}
@ -252,10 +236,6 @@ if (!defined('G5_IS_ADMIN')) {
}
}
//==============================================================================
//==============================================================================
// SESSION 설정
//------------------------------------------------------------------------------
@ -278,8 +258,6 @@ session_set_cookie_params(0, '/');
ini_set("session.cookie_domain", G5_COOKIE_DOMAIN);
@session_start();
//==============================================================================
//==============================================================================
// 공용 변수
@ -729,15 +707,13 @@ if (defined('G5_THEME_PATH')) {
ob_start();
// 자바스크립트에서 go(-1) 함수를 쓰면 폼값이 사라질때 해당 폼의 상단에 사용하면
// 캐쉬의 내용을 가져옴. 완전한지는 검증되지 않음
header('Content-Type: text/html; charset=utf-8');
$gmnow = gmdate('D, d M Y H:i:s') . ' GMT';
header('Expires: 0'); // rfc2616 - Section 14.21
header('Content-Type: text/html; charset=utf-8');
header('Expires: 0');
header('Last-Modified: ' . $gmnow);
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: pre-check=0, post-check=0, max-age=0');
header('Pragma: no-cache');
$html_process = new html_process();
?>

View file

@ -1,5 +1,7 @@
<?php
/**
* @suppress PHP0419
*/
/********************
상수 선언
********************/
@ -221,4 +223,3 @@ if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { //https 통신일
} else { //http 통신일때 daum 주소 js
define('G5_POSTCODE_JS', '<script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script>');
}
?>

View file

@ -1,9 +1,15 @@
<?php
include_once ('./_common.php');
include_once './_common.php';
if ($is_member & !$config['cf_open']) {
goto_url(G5_URL . '/main.php');
}
if (defined('G5_THEME_PATH') && file_exists(G5_THEME_PATH . "/enter.php")) {
include_once G5_THEME_PATH . '/enter.php';
return;
}
/*********** Logo Data ************/
$logo = get_logo();
$logo_data = "";
@ -20,64 +26,50 @@ if ($intro['cs_value'])
?>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="title" content="<?= $g5['title'] ?>">
<meta name="keywords" content="<?= $config['cf_site_descript'] ?>">
<meta name="description" content="<?= $config['cf_site_descript'] ?>">
<meta property="og:title" content="<?= $g5['title'] ?>">
<meta property="og:description" content="<?= $config['cf_site_descript'] ?>">
<meta property="og:url" content="<?= G5_URL ?>">
<title><?= $g5['title'] ?></title>
<link rel="shortcut icon" href="<?= $config['cf_favicon'] ?>">
<link rel="icon" href="<?= $config['cf_favicon'] ?>">
<link media="all" type="text/css" rel="stylesheet" href="<?= G5_CSS_URL ?>/enter.css?v=<?= $config['cf_css_version'] ?>">
<link media="all" type="text/css" rel="stylesheet"
href="<?= G5_DATA_URL ?>/css/_design.config.css?v=<?= $config['cf_css_version'] ?>" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script>
if (!parent || parent == this) $('html').addClass('single');
</script>
</head>
<body>
<div class="enterWrapper">
<div class="inner">
<div class="index-logo">
<a href="./main.php" onclick="fn_show_index_menu();">
<?= $logo_data ?>
<p class="guide"><?= $intro['cs_etc_1'] ?></p>
</a>
<head>
<meta charset="utf-8">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="title" content="<?= $g5['title'] ?>">
<meta name="keywords" content="<?= $config['cf_site_descript'] ?>">
<meta name="description" content="<?= $config['cf_site_descript'] ?>">
<meta property="og:title" content="<?= $g5['title'] ?>">
<meta property="og:description" content="<?= $config['cf_site_descript'] ?>">
<meta property="og:url" content="<?= G5_URL ?>">
<title><?= $g5['title'] ?></title>
<link rel="shortcut icon" href="<?= $config['cf_favicon'] ?>">
<link rel="icon" href="<?= $config['cf_favicon'] ?>">
<link media="all" type="text/css" rel="stylesheet" href="<?= G5_CSS_URL ?>/enter.css?v=<?= $config['cf_css_version'] ?>">
<link media="all" type="text/css" rel="stylesheet"
href="<?= G5_DATA_URL ?>/css/_design.config.css?v=<?= $config['cf_css_version'] ?>" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script>
if (!parent || parent == this) $('html').addClass('single');
</script>
</head>
<body>
<div class="enterWrapper">
<div class="inner">
<div class="index-logo">
<a href="./main.php" onclick="fn_show_index_menu();">
<?= $logo_data ?>
<p class="guide"><?= $intro['cs_etc_1'] ?></p>
</a>
</div>
</div>
</div>
</div>
<script>
window.onload = function () {
$('html').addClass('on')
setTimeout(function () { $('html').addClass('active') }, 800);
};
function fn_show_index_menu() {
if (parent && parent !== this) parent.show_menu();
}
</script>
</body>
<script>
window.onload = function () {
$('html').addClass('on')
setTimeout(function () { $('html').addClass('active') }, 800);
};
function fn_show_index_menu() {
if (parent && parent !== this) parent.show_menu();
}
</script>
</body>
</html>

View file

@ -2,17 +2,22 @@
if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
include_once (G5_PATH . '/head.sub.php');
include_once (G5_LIB_PATH . '/latest.lib.php');
include_once (G5_LIB_PATH . '/outlogin.lib.php');
include_once (G5_LIB_PATH . '/poll.lib.php');
include_once (G5_LIB_PATH . '/visit.lib.php');
include_once (G5_LIB_PATH . '/connect.lib.php');
include_once (G5_LIB_PATH . '/popular.lib.php');
if (defined('G5_THEME_PATH') && file_exists(G5_THEME_PATH . "/head.php")) {
include_once G5_THEME_PATH . '/head.php';
return;
}
include_once G5_PATH . '/head.sub.php';
include_once G5_LIB_PATH . '/latest.lib.php';
include_once G5_LIB_PATH . '/outlogin.lib.php';
include_once G5_LIB_PATH . '/poll.lib.php';
include_once G5_LIB_PATH . '/visit.lib.php';
include_once G5_LIB_PATH . '/connect.lib.php';
include_once G5_LIB_PATH . '/popular.lib.php';
/*********** Logo Data ************/
$logo = get_logo('pc');
$m_logo = get_logo('mo');
$logo = get_logo();
$m_logo = get_logo();
$logo_data = "";
if ($logo)
@ -25,11 +30,7 @@ if ($logo_data)
?>
<script> if (parent && parent !== this) parent.show_menu(); </script>
<?php include_once (G5_PATH . "/menu.php"); ?>
<section id="body">
<div class="fix-layout">
<div class="mid-layout">

View file

@ -2,7 +2,7 @@
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
check_site_auth($is_member);
check_site_auth();
$g5_debug['php']['begin_time'] = $begin_time = get_microtime();
@ -14,123 +14,124 @@ if (!isset($g5['title'])) {
$g5_head_title .= " | " . $config['cf_title'];
}
// 현재 접속자
// 게시판 제목에 ' 포함되면 오류 발생
$g5['lo_location'] = addslashes($g5['title']);
if (!$g5['lo_location'])
if (!$g5['lo_location']) {
$g5['lo_location'] = addslashes(clean_xss_tags($_SERVER['REQUEST_URI']));
}
$g5['lo_url'] = addslashes(clean_xss_tags($_SERVER['REQUEST_URI']));
if (strstr($g5['lo_url'], '/' . G5_ADMIN_DIR . '/') || $is_admin == 'super')
if (strstr($g5['lo_url'], '/' . G5_ADMIN_DIR . '/') || $is_admin == 'super') {
$g5['lo_url'] = '';
}
$is_page_login = (strstr($_SERVER["REQUEST_URI"], 'login') == "") ? false : true;
if (defined('_INDEX_')) {
echo "<script>if(parent && parent!=this) location.href='./main.php';</script>";
} ?>
}
$html_class = $is_page_login ? "login" : "";
$html_class .= $_COOKIE['header_close'] == 'close' ? " close-header" : "";
?>
<!doctype html>
<html lang="ko"
class='<?= $is_page_login ? "login" : "" ?> <?= $_COOKIE['header_close'] == 'close' ? "close-header" : "" ?>'>
<html lang="ko" class='<?= $html_class ?>'>
<head>
<meta charset="utf-8">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<?php
if (G5_IS_MOBILE) {
echo '<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">' . PHP_EOL;
echo '<meta name="HandheldFriendly" content="true">' . PHP_EOL;
echo '<meta name="format-detection" content="telephone=no">' . PHP_EOL;
} else {
echo '<meta http-equiv="imagetoolbar" content="no">' . PHP_EOL;
echo '<meta http-equiv="X-UA-Compatible" content="IE=Edge">' . PHP_EOL;
}
<head>
<meta charset="utf-8">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<?php
if (G5_IS_MOBILE) {
echo '<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">' . PHP_EOL;
echo '<meta name="HandheldFriendly" content="true">' . PHP_EOL;
echo '<meta name="format-detection" content="telephone=no">' . PHP_EOL;
} else {
echo '<meta http-equiv="imagetoolbar" content="no">' . PHP_EOL;
echo '<meta http-equiv="X-UA-Compatible" content="IE=Edge">' . PHP_EOL;
}
if ($config['cf_add_meta'])
echo $config['cf_add_meta'] . PHP_EOL;
?>
<?php if ($config['cf_site_img']) { ?>
<link rel="image_src" href="<?= $config['cf_site_img'] ?>" />
<?php } ?>
<meta name="description" content="<?= $config['cf_site_descript'] ?>" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:url" content="<?= G5_URL ?>" />
<meta name="twitter:title" content="<?php echo $g5_head_title; ?>" />
<meta name="twitter:description" content="<?= $config['cf_site_descript'] ?>" />
<?php if ($config['cf_site_img']) { ?>
<meta name="twitter:image" content="<?= $config['cf_site_img'] ?>" />
<?php } ?>
<title><?php echo $g5_head_title; ?></title>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp"
rel="stylesheet">
<?php
if (defined('G5_IS_ADMIN')) {
echo '<link rel="stylesheet" href="' . G5_ADMIN_URL . '/css/admin.css" type="text/css">' . PHP_EOL;
echo '<link rel="stylesheet" href="' . G5_ADMIN_URL . '/css/admin.layout.css" type="text/css">' . PHP_EOL;
} else {
echo '<link rel="stylesheet" href="' . G5_CSS_URL . '/default.css" type="text/css">' . PHP_EOL;
echo '<link rel="stylesheet" href="' . G5_CSS_URL . '/style.css" type="text/css">' . PHP_EOL;
echo '<link rel="stylesheet" href="' . G5_DATA_URL . '/css/_design.config.css?v=' . $config['cf_css_version'] . '" type="text/css" />';
}
?>
<?php if ($config['cf_favicon']) { ?>
<link rel="shortcut icon" href="<?= $config['cf_favicon'] ?>" type="image/x-icon">
<link rel="icon" href="<?= $config['cf_favicon'] ?>" type="image/x-icon">
<?php } ?>
<!--[if lte IE 8]>
<script src="<?php echo G5_JS_URL ?>/html5.js"></script>
<![endif]-->
<script>
<?php if ($config['cf_use_http']) { ?>
if (window.location.protocol == "https:")
location.href = location.href.replace(/^https:/, 'http:')
if ($config['cf_add_meta']) {
echo $config['cf_add_meta'] . PHP_EOL;
}
if ($config['cf_site_img']) { ?>
<link rel="image_src" href="<?= $config['cf_site_img'] ?>" />
<?php } ?>
// 자바스크립트에서 사용하는 전역변수 선언
var g5_url = "<?php echo G5_URL ?>";
var g5_bbs_url = "<?php echo G5_BBS_URL ?>";
var g5_is_member = "<?php echo isset($is_member) ? $is_member : ''; ?>";
var g5_is_admin = "<?php echo isset($is_admin) ? $is_admin : ''; ?>";
var g5_is_mobile = "<?php echo G5_IS_MOBILE ?>";
var g5_bo_table = "<?php echo isset($bo_table) ? $bo_table : ''; ?>";
var g5_sca = "<?php echo isset($sca) ? $sca : ''; ?>";
var g5_editor = "<?php echo ($config['cf_editor'] && $board['bo_use_dhtml_editor']) ? $config['cf_editor'] : ''; ?>";
var g5_cookie_domain = "<?php echo G5_COOKIE_DOMAIN ?>";
<?php if (defined('G5_IS_ADMIN')) { ?>
<meta name="description" content="<?= $config['cf_site_descript'] ?>" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:url" content="<?= G5_URL ?>" />
<meta name="twitter:title" content="<?php echo $g5_head_title; ?>" />
<meta name="twitter:description" content="<?= $config['cf_site_descript'] ?>" />
<?php if ($config['cf_site_img']) { ?>
<meta name="twitter:image" content="<?= $config['cf_site_img'] ?>" />
<?php } ?>
<title><?php echo $g5_head_title; ?></title>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp"
rel="stylesheet">
<?php
if (defined('G5_IS_ADMIN')) {
echo '<link rel="stylesheet" href="' . G5_ADMIN_URL . '/css/admin.css" type="text/css">' . PHP_EOL;
echo '<link rel="stylesheet" href="' . G5_ADMIN_URL . '/css/admin.layout.css" type="text/css">' . PHP_EOL;
echo '<link rel="stylesheet" href="' . G5_ADMIN_URL . '/css/amberstone.cp.css" type="text/css">' . PHP_EOL;
} else {
echo '<link rel="stylesheet" href="' . G5_CSS_URL . '/default.css" type="text/css">' . PHP_EOL;
echo '<link rel="stylesheet" href="' . G5_CSS_URL . '/style.css" type="text/css">' . PHP_EOL;
echo '<link rel="stylesheet" href="' . G5_DATA_URL . '/css/_design.config.css?v=' . $config['cf_css_version'] . '" type="text/css" />';
}
?>
<?php if ($config['cf_favicon']) { ?>
<link rel="shortcut icon" href="<?= $config['cf_favicon'] ?>" type="image/x-icon">
<link rel="icon" href="<?= $config['cf_favicon'] ?>" type="image/x-icon">
<?php } ?>
<script>
<?php if ($config['cf_use_http']) { ?>
if (window.location.protocol == "https:")
location.href = location.href.replace(/^https:/, 'http:')
<?php } ?>
var g5_url = "<?php echo G5_URL ?>";
var g5_bbs_url = "<?php echo G5_BBS_URL ?>";
var g5_is_member = "<?php echo isset($is_member) ? $is_member : ''; ?>";
var g5_is_admin = "<?php echo isset($is_admin) ? $is_admin : ''; ?>";
var g5_is_mobile = "<?php echo G5_IS_MOBILE ?>";
var g5_bo_table = "<?php echo isset($bo_table) ? $bo_table : ''; ?>";
var g5_sca = "<?php echo isset($sca) ? $sca : ''; ?>";
var g5_editor = "<?php echo ($config['cf_editor'] && $board['bo_use_dhtml_editor']) ? $config['cf_editor'] : ''; ?>";
var g5_cookie_domain = "<?php echo G5_COOKIE_DOMAIN ?>";
<?php if (defined('G5_IS_ADMIN')) { ?>
var g5_admin_url = "<?php echo G5_ADMIN_URL; ?>";
<?php } ?>
</script>
<?php if (defined('G5_IS_ADMIN')) { ?>
<script src="<?php echo G5_JS_URL ?>/jquery-1.8.3.min.js"></script>
<script src="<?php echo G5_ADMIN_URL ?>/js/amberstone.cp.js"></script>
<?php } else { ?>
<script src="<?php echo G5_JS_URL ?>/jquery-1.12.3.min.js"></script>
<?php } ?>
</script>
<?php if (defined('G5_IS_ADMIN')) { ?>
<script src="<?php echo G5_JS_URL ?>/jquery-1.8.3.min.js"></script>
<?php } else { ?>
<script src="<?php echo G5_JS_URL ?>/jquery-1.12.3.min.js"></script>
<?php } ?>
<script src="<?php echo G5_JS_URL ?>/jquery.cookie.js"></script>
<script src="<?php echo G5_JS_URL ?>/jquery.rwdImageMaps.js"></script>
<script src="<?php echo G5_JS_URL ?>/common.js"></script>
<script src="<?php echo G5_JS_URL ?>/wrest.js?ver=<?php echo G5_JS_VER; ?>"></script>
<?php
if (G5_IS_MOBILE) {
echo '<script src="' . G5_JS_URL . '/modernizr.custom.70111.js"></script>' . PHP_EOL; // overflow scroll 감지
}
if (!defined('G5_IS_ADMIN'))
echo $config['cf_add_script'];
?>
<script>
if (!parent || parent == this) $('html').addClass('single');
</script>
<?php if ($config['cf_cursor']) { ?>
<style>
* {
cursor: url(<?= $config['cf_cursor'] ?>) 0 0, auto;
}
</style>
<?php } ?>
</head>
<body>
<script src="<?php echo G5_JS_URL ?>/jquery.cookie.js"></script>
<script src="<?php echo G5_JS_URL ?>/jquery.rwdImageMaps.js"></script>
<script src="<?php echo G5_JS_URL ?>/common.js"></script>
<script src="<?php echo G5_JS_URL ?>/wrest.js?ver=<?php echo G5_JS_VER; ?>"></script>
<?php
if (G5_IS_MOBILE) {
echo '<script src="' . G5_JS_URL . '/modernizr.custom.70111.js"></script>' . PHP_EOL; // overflow scroll 감지
}
if (!defined('G5_IS_ADMIN'))
echo $config['cf_add_script'];
?>
<script>
if (!parent || parent == this) $('html').addClass('single');
</script>
<?php if ($config['cf_cursor']) { ?>
<style>
* {
cursor: url(<?= $config['cf_cursor'] ?>) 0 0, auto;
}
</style>
<?php } ?>
</head>
<body>

View file

@ -1,7 +1,12 @@
<?php
include_once ('./_common.php');
include_once './_common.php';
define('_INDEX_', true);
if (defined('G5_THEME_PATH') && file_exists(G5_THEME_PATH . "/index.php")) {
include_once G5_THEME_PATH . '/index.php';
return;
}
$enter = get_style('intro_use');
$enter = $enter['cs_value'];
@ -15,7 +20,7 @@ if (!$is_member && !$config['cf_open']) {
if ($is_member) {
// 사이트 오픈이 되어 있고, 로그인이 끝났을 경우
if (G5_IS_MOBILE) {
include_once (G5_PATH . '/main.php');
include_once G5_PATH . '/main.php';
exit;
}
$index_url = "./main.php";
@ -23,13 +28,13 @@ if (!$is_member && !$config['cf_open']) {
if ($enter == '') {
// 사이트 오픈이 되어 있고, 로그인이 안되어 있을 경우
if (G5_IS_MOBILE) {
include_once (G5_PATH . '/enter.php');
include_once G5_PATH . '/enter.php';
exit;
}
$index_url = "./enter.php";
} else {
if (G5_IS_MOBILE) {
include_once (G5_PATH . '/main.php');
include_once G5_PATH . '/main.php';
exit;
}
$index_url = "./main.php";
@ -42,13 +47,10 @@ if (!$is_member && !$config['cf_open']) {
$index_url = "./enter.php";
}
include_once (G5_PATH . '/head.sub.php');
include_once G5_PATH . '/head.sub.php';
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/index.css">', 0);
include_once (G5_PATH . "/menu.php");
include_once G5_PATH . "/menu.php";
?>
<!-- 콘텐츠 시작 -->
<div id="wrapper">
<iframe src="<?= $index_url ?>" name="frm_main" id="main" border="0" frameborder="0" marginheight="0" marginwidth="0"
@ -67,8 +69,6 @@ if (!$is_member && !$config['cf_open']) {
$('#header').show();
}
</script>
<?php
include_once (G5_PATH . '/tail.sub.php');
include_once G5_PATH . '/tail.sub.php';
}
?>

View file

@ -24,23 +24,20 @@ function get_microtime()
// 한페이지에 보여줄 행, 현재페이지, 총페이지수, URL
function get_paging($write_pages, $cur_page, $total_page, $url, $add = "")
{
if (!$write_pages)
$write_pages = 5;
if (!$write_pages) $write_pages = 5;
//$url = preg_replace('#&amp;page=[0-9]*(&amp;page=)$#', '$1', $url);
$url = preg_replace('#&amp;page=[0-9]*#', '', $url) . '&amp;page=';
$str = '';
if ($cur_page > 1) {
$str .= '<a href="' . $url . '1' . $add . '" class="pg_control pg_start" title="처음으로"><i class="material-icons">keyboard_double_arrow_left</i></a>' . PHP_EOL;
}
$start_page = (((int) (($cur_page - 1) / $write_pages)) * $write_pages) + 1;
$end_page = $start_page + $write_pages - 1;
if ($end_page >= $total_page)
$end_page = $total_page;
if ($end_page >= $total_page) $end_page = $total_page;
if ($start_page > 1)
$str .= '<a href="' . $url . ($start_page - 1) . $add . '" class="pg_control pg_prev" title="이전"><i class="material-icons">navigate_before</i></a>' . PHP_EOL;
@ -1536,9 +1533,6 @@ function sql_query($sql, $error = G5_DISPLAY_SQL_ERROR, $link = null)
$result = @mysql_query($sql, $link);
}
}
run_event('sql_query_after', $result, $sql);
return $result;
}

View file

@ -1,8 +1,13 @@
<?php
include_once ('./_common.php');
include_once './_common.php';
define('_MAIN_', true);
include_once (G5_PATH . '/head.php');
if (defined('G5_THEME_PATH') && file_exists(G5_THEME_PATH . "/main.php")) {
include_once G5_THEME_PATH . '/main.php';
return;
}
include_once G5_PATH . '/head.php';
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/main.css">', 0);
$main_content = get_site_content('site_main');
@ -13,11 +18,9 @@ if (!$main_content) {
$main_content .= "<img src='{$logo}' alt='' />";
}
?>
<div id="main_body">
<?php echo $main_content; ?>
</div>
<script>
$(function () {
window.onload = function () {
@ -25,7 +28,5 @@ if (!$main_content) {
};
});
</script>
<?php
include_once (G5_PATH . '/tail.php');
?>
include_once G5_PATH . '/tail.php';

View file

@ -1,6 +1,11 @@
<?php
if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
exit;
if (defined('G5_THEME_PATH') && file_exists(G5_THEME_PATH . "/menu.php")) {
include_once G5_THEME_PATH . '/menu.php';
return;
}
$header_pos = get_style("use_header");
@ -16,22 +21,18 @@ if ($header_pos['cs_value'] != 'N') {
if ($header_pos['cs_value'] == "")
$header_pos['cs_value'] = "L";
?>
<!-- Mobile Menu Control -->
<div class="not-pc">
<button type="button" onclick="control_mobile_menu();" class="control-mobile-menu txt-default">
<span class="material-icons open">menu</span>
<span class="material-icons close">close</span>
</button>
</div>
<!-- PC 메뉴 영역 -->
<header id="header" data-headerpos="<?= $header_pos['cs_value'] ?>">
<?php
@include_once ($menu_skin_path . "/css.config.php");
@include_once ($menu_skin_path . "/menu.{$header_pos['cs_value']}.inc.php");
?>
</header>
<!-- // PC 메뉴 영역 -->
<!-- 모바일 메뉴 영역 (기본) -->
<header id="mo_header">
<div>
<div>
@ -131,7 +132,6 @@ if ($header_pos['cs_value'] != 'N') {
</div>
</div>
</header>
<!-- // 모바일 메뉴 영역 (기본) -->
<script type="text/javascript">
function fn_control_bgm(state) {
if (state == 'play') {

View file

@ -1,17 +0,0 @@
#!/bin/bash
# kcp 본인확인 실행 파일
chmod 755 plugin/kcpcert/bin/ct_cli
chmod 755 plugin/kcpcert/bin/ct_cli_x64
# okname 본인확인 실행 파일
chmod 755 plugin/okname/bin/okname
chmod 755 plugin/okname/bin/okname_x64
# kcp 전자결제 실행 파일
if [ -d "shop" ]; then
chmod 755 shop/kcp/bin/pp_cli
chmod 755 shop/kcp/bin/pp_cli_x64
fi
echo "Complete change permissions."

View file

@ -1,20 +1,21 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
$character_image_path = G5_DATA_PATH."/file/".$bo_table;
$character_image_url = G5_DATA_URL."/file/".$bo_table;
$character_image_path = G5_DATA_PATH . "/file/" . $bo_table;
$character_image_url = G5_DATA_URL . "/file/" . $bo_table;
@mkdir($character_image_path, G5_DIR_PERMISSION);
@chmod($character_image_path, G5_DIR_PERMISSION);
$version = "1.1";
$g5['character_body_table'] = G5_TABLE_PREFIX.'board_ch_body';
if(!sql_query(" DESC {$g5['character_body_table']} ")) {
// 전신 이미지 저장하는 테이블이 생성되어 있지 않을 경우
// 테이블을 생성합니다.
$g5['character_body_table'] = G5_TABLE_PREFIX . 'board_ch_body';
if (!sql_fetch_array(sql_query(" DESC {$g5['character_body_table']} "))) {
// 전신 이미지 저장하는 테이블이 생성되어 있지 않을 경우
// 테이블을 생성합니다.
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['character_body_table']}` (
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['character_body_table']}` (
`bd_id` int(11) NOT NULL AUTO_INCREMENT,
`bo_table` varchar(255) NOT NULL default '',
`wr_id` int(11) NOT NULL default '0',
@ -22,4 +23,4 @@ if(!sql_query(" DESC {$g5['character_body_table']} ")) {
`bd_use` int(11) NOT NULL default '0',
PRIMARY KEY (`bd_id`)
) ", false);
}
}

View file

@ -1,19 +1,15 @@
<?php
$g5['emoticon_table'] = G5_TABLE_PREFIX.'emoticon';
$g5['emoticon_table'] = G5_TABLE_PREFIX . 'emoticon';
@mkdir(G5_DATA_PATH.'/emoticon', G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH.'/emoticon', G5_DIR_PERMISSION);
@mkdir(G5_DATA_PATH . '/emoticon', G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH . '/emoticon', G5_DIR_PERMISSION);
// 이모티콘 테이블이 없을 경우 생성
if(!sql_query(" DESC {$g5['emoticon_table']} ")) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['emoticon_table']}` (
if (!sql_fetch_array(sql_query(" DESC {$g5['emoticon_table']} "))) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['emoticon_table']}` (
`me_id` int(11) NOT NULL AUTO_INCREMENT,
`me_text` varchar(255) NOT NULL DEFAULT '',
`me_img` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`me_id`)
) ", false);
}
?>

View file

@ -0,0 +1 @@
./*

View file

@ -1,3 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
?>

View file

@ -1,6 +0,0 @@
@charset "utf-8";

View file

@ -1,6 +0,0 @@
@charset "utf-8";

View file

@ -1,6 +0,0 @@
@charset "utf-8";

View file

@ -1,6 +0,0 @@
@charset "utf-8";

View file

@ -1,7 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
// 좌측 메뉴 스타일
add_stylesheet('<link rel="stylesheet" href="'.$menu_skin_url.'/css/style.B.css">', 0);
@include_once($menu_skin_path.'/menu.L.inc.php');
?>

View file

@ -1,95 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
// 좌측 메뉴 스타일
add_stylesheet('<link rel="stylesheet" href="'.$menu_skin_url.'/css/style.L.css">', 0);
?>
<ul class="gnbWrap">
<li>
<a href="<?=G5_URL?>/main.php" class="change-link">
<span class="icons"><span><i class="material-icons">home</i></span></span>
<span class="tooltips">HOME</span>
</a>
</li>
<li class="line"></li>
<?php
$menu_sql = " select * from {$g5['menu_table']} where me_use = '1' order by me_order*1 asc, me_id asc";
$menu = sql_query($menu_sql);
for($i=0; $me = sql_fetch_array($menu); $i++) {
$target = "";
if($me['me_target'] == 'self') {
$me['me_target'] = '';
}
if($me['me_name'] == '구분선') {
echo "<li class='line'></li>";
} else {
?>
<li>
<a href="<?php echo $me['me_link']?>" <?php if($me['me_target']) { ?>target="_<?=$me['me_target']?>"<?php } ?> class="change-link">
<span class="icons"><span><i class="material-icons"><?=$me['me_icon']?></i></span></span>
<span class="tooltips"><?=$me['me_name']?></span>
</a>
</li>
<?php }} ?>
<li class="line"></li>
<?php if(!$is_member) { //멤버가 아닐 경우 ?>
<li>
<a href="<?=G5_BBS_URL?>/login.php">
<span class="icons"><span><i class="material-icons">login</i></span></span>
<span class="tooltips">LOGIN</span>
</a>
</li>
<?php if($is_add_register) { //회원가입이 가능한 경우 ?>
<li>
<a href="<?=G5_BBS_URL?>/register.php" class="change-link">
<span class="icons"><span><i class="material-icons">person_add</i></span></span>
<span class="tooltips">JOIN</span>
</a>
</li>
<?php } ?>
<?php } else { //멤버일 경우 ?>
<li>
<a href="<?=G5_BBS_URL?>/logout.php">
<span class="icons"><span><i class="material-icons">logout</i></span></span>
<span class="tooltips">LOGOUT</span>
</a>
</li>
<?php if($is_admin) { ?>
<li>
<a href="<?=G5_URL?>/adm" target="_blank">
<span class="icons"><span><i class="material-icons">settings</i></span></span>
<span class="tooltips">ADMIN</span>
</a>
</li>
<?php } else { ?>
<li>
<a href="<?=G5_BBS_URL?>/member_confirm.php?url=register_form.php" class="change-link">
<span class="icons"><span><i class="material-icons">settings</i></span></span>
<span class="tooltips">정보수정</span>
</a>
</li>
<?php } ?>
<?php } ?>
<?php if(defined('_INDEX_') && $config['cf_bgm']) { ?>
<li class="bgm-btn">
<div id="site_bgm_box">
<iframe src="./bgm.php?action=play" name="bgm_frame" id="bgm_frame" border="0" frameborder="0" marginheight="0" marginwidth="0" topmargin="0" scrolling="no" allowTransparency="true"></iframe>
</div>
<a href="<?=G5_URL?>/bgm.php?action=play" target="bgm_frame" onclick="return fn_control_bgm('play')" class="control-bgm-play" style="display:none;">
<span class="icons"><span><i class="material-icons">music_off</i></span></span>
<span class="tooltips">BGM ON</span>
</a>
<a href="<?=G5_URL?>/bgm.php" target="bgm_frame" onclick="return fn_control_bgm('stop')" class="control-bgm-stop">
<span class="icons"><span><i class="material-icons">music_note</i></span></span>
<span class="tooltips">BGM OFF</span>
</a>
</li>
<?php } ?>
</ul>

View file

@ -1,7 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
// 좌측 메뉴 스타일
add_stylesheet('<link rel="stylesheet" href="'.$menu_skin_url.'/css/style.R.css">', 0);
@include_once($menu_skin_path.'/menu.L.inc.php');
?>

View file

@ -1,7 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
// 좌측 메뉴 스타일
add_stylesheet('<link rel="stylesheet" href="'.$menu_skin_url.'/css/style.T.css">', 0);
@include_once($menu_skin_path.'/menu.L.inc.php');
?>

View file

@ -1,6 +1,12 @@
<?php
if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
exit;
if (defined('G5_THEME_PATH') && file_exists(G5_THEME_PATH . "/tail.php")) {
include_once G5_THEME_PATH . '/tail.php';
return;
}
?>
</div>
</div>
@ -13,4 +19,4 @@ if (!defined('_GNUBOARD_'))
<script src="<?php echo G5_JS_URL ?>/swiper.js"></script>
<script src="<?php echo G5_JS_URL ?>/_custom.js"></script>
<?php
include_once (G5_PATH . "/tail.sub.php");
include_once G5_PATH . "/tail.sub.php";

View file

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

View file

@ -0,0 +1,83 @@
<?php
include_once './_common.php';
if ($is_member & !$config['cf_open']) {
goto_url(G5_URL . '/main.php');
}
/*********** Logo Data ************/
$logo = get_logo();
$logo_data = "";
if ($logo)
$logo_data .= "<img src='{$logo}' />";
/*********************************/
/*********** Intro Data ************/
$intro = get_style('intro');
if ($intro['cs_value'])
$logo_data = "<img src='{$intro['cs_value']}' alt='' />";
/*********************************/
?>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="title" content="<?= $g5['title'] ?>">
<meta name="keywords" content="<?= $config['cf_site_descript'] ?>">
<meta name="description" content="<?= $config['cf_site_descript'] ?>">
<meta property="og:title" content="<?= $g5['title'] ?>">
<meta property="og:description" content="<?= $config['cf_site_descript'] ?>">
<meta property="og:url" content="<?= G5_URL ?>">
<title><?= $g5['title'] ?></title>
<link rel="shortcut icon" href="<?= $config['cf_favicon'] ?>">
<link rel="icon" href="<?= $config['cf_favicon'] ?>">
<link media="all" type="text/css" rel="stylesheet" href="<?= G5_CSS_URL ?>/enter.css?v=<?= $config['cf_css_version'] ?>">
<link media="all" type="text/css" rel="stylesheet"
href="<?= G5_DATA_URL ?>/css/_design.config.css?v=<?= $config['cf_css_version'] ?>" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script>
if (!parent || parent == this) $('html').addClass('single');
</script>
</head>
<body>
<div class="enterWrapper">
<div class="inner">
<div class="index-logo">
<a href="./main.php" onclick="fn_show_index_menu();">
<?= $logo_data ?>
<p class="guide"><?= $intro['cs_etc_1'] ?></p>
</a>
</div>
</div>
</div>
<script>
window.onload = function () {
$('html').addClass('on')
setTimeout(function () { $('html').addClass('active') }, 800);
};
function fn_show_index_menu() {
if (parent && parent !== this) parent.show_menu();
}
</script>
</body>
</html>

View file

@ -0,0 +1,3 @@
<?php
if (!defined('_GNUBOARD_'))
exit;

View file

@ -0,0 +1,35 @@
<?php
if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
include_once (G5_PATH . '/head.sub.php');
include_once (G5_LIB_PATH . '/latest.lib.php');
include_once (G5_LIB_PATH . '/outlogin.lib.php');
include_once (G5_LIB_PATH . '/poll.lib.php');
include_once (G5_LIB_PATH . '/visit.lib.php');
include_once (G5_LIB_PATH . '/connect.lib.php');
include_once (G5_LIB_PATH . '/popular.lib.php');
/*********** Logo Data ************/
$logo = get_logo('pc');
$m_logo = get_logo('mo');
$logo_data = "";
if ($logo)
$logo_data .= "<img src='" . $logo . "' ";
if ($m_logo)
$logo_data .= "class='only-pc' /><img src='" . $m_logo . "' class='not-pc'";
if ($logo_data)
$logo_data .= " />";
/*********************************/
?>
<script> if (parent && parent !== this) parent.show_menu(); </script>
<?php include_once __DIR__ . "/menu.php"; ?>
<section id="body">
<div class="fix-layout">
<div class="mid-layout">

View file

@ -0,0 +1,73 @@
<?php
include_once './_common.php';
define('_INDEX_', true);
$enter = get_style('intro_use');
$enter = $enter['cs_value'];
if (!$is_member && !$config['cf_open']) {
// 멤버가 아니고, 사이트 오픈이 되어 있지 않은 경우 로그인 페이지로 점프 시키기
goto_url(G5_BBS_URL . '/login.php');
} else {
if ($config['cf_open']) {
// 사이트 오픈이 되어 있을 경우
if ($is_member) {
// 사이트 오픈이 되어 있고, 로그인이 끝났을 경우
if (G5_IS_MOBILE) {
include_once __DIR__ . '/main.php';
exit;
}
$index_url = "./main.php";
} else {
if ($enter == '') {
// 사이트 오픈이 되어 있고, 로그인이 안되어 있을 경우
if (G5_IS_MOBILE) {
include_once __DIR__ . '/enter.php';
exit;
}
$index_url = "./enter.php";
} else {
if (G5_IS_MOBILE) {
include_once __DIR__ . '/main.php';
exit;
}
$index_url = "./main.php";
}
}
}
if ($index_url == "") {
$index_url = "./enter.php";
}
include_once G5_PATH . '/head.sub.php';
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/index.css">', 0);
include_once __DIR__ . "/menu.php";
?>
<!-- 콘텐츠 시작 -->
<div id="wrapper">
<iframe src="<?= $index_url ?>" name="frm_main" id="main" border="0" frameborder="0" marginheight="0" marginwidth="0"
topmargin="0" scrolling="auto" allowTransparency="true"></iframe>
</div>
<script>
$(document.body).on("keydown", this, function (event) {
if (event.keyCode == 116) {
document.getElementById('main').contentDocument.location.reload(true);
return false;
}
});
$('#header .change-link').attr('target', 'frm_main');
function show_menu() {
$('#header').show();
}
</script>
<?php
include_once __DIR__ . '/tail.sub.php';
}
?>

View file

@ -0,0 +1,27 @@
<?php
include_once './_common.php';
define('_MAIN_', true);
include_once __DIR__ . '/head.php';
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/main.css">', 0);
$main_content = get_site_content('site_main');
if (!$main_content) {
$logo = get_logo();
$main_content = "";
if ($logo)
$main_content .= "<img src='{$logo}' alt='' />";
}
?>
<div id="main_body">
<?php echo $main_content; ?>
</div>
<script>
$(function () {
window.onload = function () {
$('#body').css('opacity', 1);
};
});
</script>
<?php
include_once __DIR__ . '/tail.php';

View file

@ -0,0 +1,151 @@
<?php
if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
$header_pos = get_style("use_header");
$menu_skin = get_style("menu_skin");
$menu_skin = $menu_skin['cs_value'];
if ($menu_skin == '')
$menu_skin = 'basic';
$menu_skin_url = G5_URL . "/skin/menu/{$menu_skin}";
$menu_skin_path = G5_PATH . "/skin/menu/{$menu_skin}";
if ($header_pos['cs_value'] != 'N') {
if ($header_pos['cs_value'] == "")
$header_pos['cs_value'] = "L";
?>
<!-- Mobile Menu Control -->
<div class="not-pc">
<button type="button" onclick="control_mobile_menu();" class="control-mobile-menu txt-default">
<span class="material-icons open">menu</span>
<span class="material-icons close">close</span>
</button>
</div>
<!-- PC 메뉴 영역 -->
<header id="header" data-headerpos="<?= $header_pos['cs_value'] ?>">
<?php
@include_once ($menu_skin_path . "/css.config.php");
@include_once ($menu_skin_path . "/menu.{$header_pos['cs_value']}.inc.php");
?>
</header>
<!-- // PC 메뉴 영역 -->
<!-- 모바일 메뉴 영역 (기본) -->
<header id="mo_header">
<div>
<div>
<ul class="gnbWrap">
<li>
<a href="<?= G5_URL ?>/main.php" class="change-link">
<span class="icons"><span><i class="material-icons">home</i></span></span>
<span class="tooltips">HOME</span>
</a>
</li>
<li class="line"></li>
<?php
$menu_sql = " select * from {$g5['menu_table']} where me_use = '1' order by me_order*1 asc, me_id asc";
$menu = sql_query($menu_sql);
for ($i = 0; $me = sql_fetch_array($menu); $i++) {
$target = "";
if ($me['me_target'] == 'self') {
$me['me_target'] = '';
}
if ($me['me_name'] == '구분선') {
echo "<li class='line'></li>";
} else {
?>
<li>
<a href="<?php echo $me['me_link'] ?>" <?php if ($me['me_target']) { ?>target="_<?= $me['me_target'] ?>" <?php } ?>
class="change-link">
<span class="icons"><span><i class="material-icons"><?= $me['me_icon'] ?></i></span></span>
<span class="tooltips"><?= $me['me_name'] ?></span>
</a>
</li>
<?php }
} ?>
<li class="line"></li>
<?php if (!$is_member) { //멤버가 아닐 경우 ?>
<li>
<a href="<?= G5_BBS_URL ?>/login.php">
<span class="icons"><span><i class="material-icons">login</i></span></span>
<span class="tooltips">LOGIN</span>
</a>
</li>
<?php if ($is_add_register) { //회원가입이 가능한 경우 ?>
<li>
<a href="<?= G5_BBS_URL ?>/register.php" class="change-link">
<span class="icons"><span><i class="material-icons">person_add</i></span></span>
<span class="tooltips">JOIN</span>
</a>
</li>
<?php } ?>
<?php } else { //멤버일 경우 ?>
<li>
<a href="<?= G5_BBS_URL ?>/logout.php">
<span class="icons"><span><i class="material-icons">logout</i></span></span>
<span class="tooltips">LOGOUT</span>
</a>
</li>
<?php if ($is_admin) { ?>
<li>
<a href="<?= G5_URL ?>/adm" target="_blank">
<span class="icons"><span><i class="material-icons">settings</i></span></span>
<span class="tooltips">ADMIN</span>
</a>
</li>
<?php } else { ?>
<li>
<a href="<?= G5_BBS_URL ?>/member_confirm.php?url=register_form.php" class="change-link">
<span class="icons"><span><i class="material-icons">settings</i></span></span>
<span class="tooltips">정보수정</span>
</a>
</li>
<?php } ?>
<?php } ?>
<?php if (defined('_INDEX_')) { ?>
<?php if ($config['cf_bgm']) { ?>
<li class="bgm-btn">
<div id="site_bgm_box">
<iframe src="./bgm.php" name="bgm_frame" id="bgm_frame" border="0" frameborder="0" marginheight="0"
marginwidth="0" topmargin="0" scrolling="no" allowTransparency="true"></iframe>
</div>
<a href="<?= G5_URL ?>/bgm.php?action=play" target="bgm_frame" onclick="return fn_control_bgm('play')"
class="control-bgm-play">
<span class="icons"><span><i class="material-icons">music_off</i></span></span>
<span class="tooltips">BGM ON</span>
</a>
<a href="<?= G5_URL ?>/bgm.php" target="bgm_frame" onclick="return fn_control_bgm('stop')"
class="control-bgm-stop" style="display:none;">
<span class="icons"><span><i class="material-icons">music_note</i></span></span>
<span class="tooltips">BGM OFF</span>
</a>
</li>
<?php } ?>
<?php } ?>
</ul>
</div>
</div>
</header>
<!-- // 모바일 메뉴 영역 (기본) -->
<script type="text/javascript">
function fn_control_bgm(state) {
if (state == 'play') {
$('.control-bgm-play').hide();
$('.control-bgm-stop').show();
} else {
$('.control-bgm-play').show();
$('.control-bgm-stop').hide();
}
return true;
}
function control_mobile_menu() {
$('body').toggleClass('open-gnb');
}
</script>
<?php
}

View file

@ -0,0 +1,8 @@
Theme Name: 샘플
Theme URI:
Maker: Avocado
Maker URI: https://avocado-edition-rout.postype.com/
Version: 1.0.0
Detail: 샘플 테마는 기본적인 부분만을 제공하는 테마입니다.
License: GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
License URI: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html

View file

@ -0,0 +1,16 @@
<?php
if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
?>
</div>
</div>
</section>
<div id="topCont">
<a href="#body" title="위로">
<span class="icons"><span><i class="material-icons">arrow_upward</i></span></span>
</a>
</div>
<script src="<?php echo G5_JS_URL ?>/swiper.js"></script>
<script src="<?php echo G5_JS_URL ?>/_custom.js"></script>
<?php
include_once G5_PATH . "/tail.sub.php";