diff --git a/AvocadoEdition_Light/adm/img/logo.png b/AvocadoEdition_Light/adm/img/logo.png
index 4e7a587..cf11466 100644
Binary files a/AvocadoEdition_Light/adm/img/logo.png and b/AvocadoEdition_Light/adm/img/logo.png differ
diff --git a/AvocadoEdition_Light/common.php b/AvocadoEdition_Light/common.php
index 2dc1a49..8c0040b 100644
--- a/AvocadoEdition_Light/common.php
+++ b/AvocadoEdition_Light/common.php
@@ -241,7 +241,7 @@ if (!defined('G5_IS_ADMIN')) {
-
AVOCADO EDITION : LIGHT
+
AVOCADO EDITION : AMBER
GPL! OPEN SOURCE GNUBOARD
diff --git a/AvocadoEdition_Light/config.php b/AvocadoEdition_Light/config.php
index 71d1276..350c184 100644
--- a/AvocadoEdition_Light/config.php
+++ b/AvocadoEdition_Light/config.php
@@ -4,8 +4,8 @@
상수 선언
********************/
-define('G5_VERSION', '아보카도 에디션 : Light');
-define('G5_GNUBOARD_VER', '2.2.2');
+define('G5_VERSION', '아보카도 에디션 : Amber');
+define('G5_GNUBOARD_VER', '2.2.3');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);
diff --git a/AvocadoEdition_Light/install/AVOCADO.LICENSE.txt b/AvocadoEdition_Light/install/AVOCADO.LICENSE.txt
index a8c723d..43841f3 100644
--- a/AvocadoEdition_Light/install/AVOCADO.LICENSE.txt
+++ b/AvocadoEdition_Light/install/AVOCADO.LICENSE.txt
@@ -1,4 +1,8 @@
-프로그램 명칭 : 아보카도 에디션 : Light (Avocado Edition Light)
+프로그램 명칭 : 아보카도 에디션 : Amber (Avocado Edition Amber)
+
+코드 수정 및 보안패치, 확장 : Arcturus https://info.drk.st/
+
+---------------------------------------------------
저작자 : Avocado https://avocado-edition-rout.postype.com/
diff --git a/AvocadoEdition_Light/js/_custom.js b/AvocadoEdition_Light/js/_custom.js
index f94e57d..706e787 100644
--- a/AvocadoEdition_Light/js/_custom.js
+++ b/AvocadoEdition_Light/js/_custom.js
@@ -1,115 +1,115 @@
-$(function() {
- $('img').attr('title', '');
- $('img[usemap]').rwdImageMaps();
+$(function () {
+ $('img').attr('title', '');
+ $('img[usemap]').rwdImageMaps();
- $('#header_control_box').on('click', function() {
- $('html').toggleClass('close-header');
+ $('#header_control_box').on('click', function () {
+ $('html').toggleClass('close-header');
- if($('html').hasClass('close-header')) {
- // 닫힘상태
- // - 쿠키 설정
- set_cookie('header_close', 'close', 365, g5_cookie_domain);
- } else {
- // 열림상태
- // - 쿠키 제거
- delete_cookie('header_close');
- }
- });
+ if ($('html').hasClass('close-header')) {
+ // 닫힘상태
+ // - 쿠키 설정
+ set_cookie('header_close', 'close', 365, g5_cookie_domain);
+ } else {
+ // 열림상태
+ // - 쿠키 제거
+ delete_cookie('header_close');
+ }
+ });
});
-window.onscroll = function() {
- var position = $(window).scrollTop();
- if (position > 50) {
- $('.uparrow').fadeIn();
- } else {
- $('.uparrow').fadeOut();
- }
- $('.scroll-fix').css('transform', "translatey(" + position + "px)");
+window.onscroll = function () {
+ var position = $(window).scrollTop();
+ if (position > 50) {
+ $('.uparrow').fadeIn();
+ } else {
+ $('.uparrow').fadeOut();
+ }
+ $('.scroll-fix').css('transform', "translatey(" + position + "px)");
}
-$(document).on("keydown", "textarea", function(e) {
- if ((e.keyCode == 10 || e.keyCode == 13) && e.ctrlKey) {
- $(this).parents('form').submit();
- }
+$(document).on("keydown", "textarea", function (e) {
+ if ((e.keyCode == 10 || e.keyCode == 13) && e.ctrlKey) {
+ $(this).parents('form').submit();
+ }
});
if (document.all) {
- document.onkeydown = trapRefreshIE;
+ document.onkeydown = trapRefreshIE;
} else {
- document.captureEvents(Event.KEYDOWN)
- document.onkeydown = trapRefreshNS;
+ document.captureEvents(Event.KEYDOWN)
+ document.onkeydown = trapRefreshNS;
}
-function trapRefreshNS(e){
- if (e.keyCode == 116){
- e.cancelBubble = true;
- e.returnValue = false;
- document.location.reload();
- }
+function trapRefreshNS(e) {
+ if (e.keyCode == 116) {
+ e.cancelBubble = true;
+ e.returnValue = false;
+ document.location.reload();
+ }
}
-function trapRefreshIE(){
- if (event.keyCode == 116){
- event.keyCode = 0;
- event.cancelBubble = true;
- event.returnValue = false;
- document.location.reload();
- }
+function trapRefreshIE() {
+ if (event.keyCode == 116) {
+ event.keyCode = 0;
+ event.cancelBubble = true;
+ event.returnValue = false;
+ document.location.reload();
+ }
}
function ajax_link_url(url, obj_id) {
- var h_link = url;
-
- if(typeof(history.pushState) != "undefined") {
- $.ajax({
- async: true
- , url: h_link
- , beforeSend: function() {}
- , success: function(data) {
- // Toss
- var response = data;
- var temp_content = $(response).find(obj_id).clone();
+ var h_link = url;
- $(obj_id).fadeOut(300, function(){$(this).empty().append(temp_content.html());}).fadeIn(300, function() {
-
- $(obj_id).find('img').attr('title', '');
- $(obj_id).find('img[usemap]').rwdImageMaps();
+ if (typeof (history.pushState) != "undefined") {
+ $.ajax({
+ async: true
+ , url: h_link
+ , beforeSend: function () { }
+ , success: function (data) {
+ // Toss
+ var response = data;
+ var temp_content = $(response).find(obj_id).clone();
- var link = url;
- var link_obj = { Title: '', Url: link};
- history.pushState(link_obj, link_obj.Title, link_obj.Url);
- });
- }
- , error: function(data, status, err) {
- $(obj_id).fadeOut(300, function(){$(this).empty(); });
- }
- , complete: function() {
- // Complete
- }
- });
- } else {
- location.href=url;
- }
+ $(obj_id).fadeOut(300, function () { $(this).empty().append(temp_content.html()); }).fadeIn(300, function () {
+
+ $(obj_id).find('img').attr('title', '');
+ $(obj_id).find('img[usemap]').rwdImageMaps();
+
+ var link = url;
+ var link_obj = { Title: '', Url: link };
+ history.pushState(link_obj, link_obj.Title, link_obj.Url);
+ });
+ }
+ , error: function (data, status, err) {
+ $(obj_id).fadeOut(300, function () { $(this).empty(); });
+ }
+ , complete: function () {
+ // Complete
+ }
+ });
+ } else {
+ location.href = url;
+ }
}
function fn_save_title(val, ch_id) {
- var formData = new FormData();
- var ch_id = ch_id;
- var ti_id = val;
- formData.append("ch_id", ch_id);
- formData.append("ti_id", ti_id);
+ var formData = new FormData();
+ var ch_id = ch_id;
+ var ti_id = val;
+ formData.append("ch_id", ch_id);
+ formData.append("ti_id", ti_id);
- $.ajax({
- url:g5_url+'/mypage/character/title_update.php'
- , data: formData
- , processData: false
- , contentType: false
- , type: 'POST'
- , success: function(data){
-
- }
- });
+ $.ajax({
+ url: g5_url + '/mypage/character/title_update.php'
+ , data: formData
+ , processData: false
+ , contentType: false
+ , type: 'POST'
+ , success: function (data) {
+
+ }
+ });
}
diff --git a/AvocadoEdition_Light/js/amberstone.js b/AvocadoEdition_Light/js/amberstone.js
new file mode 100644
index 0000000..550b880
--- /dev/null
+++ b/AvocadoEdition_Light/js/amberstone.js
@@ -0,0 +1,114 @@
+/**
+ * amberstone
+ * @author arcturus (contact@sharlayan.net / https://info.drk.st/about)
+ * @version 1.1.3
+ */
+
+function pad(num, len = 2) {
+ return num.toFixed(0).padStart(len, '0');
+}
+
+function serializeForm(form) {
+ var formData = new FormData(form);
+ var params = new URLSearchParams();
+
+ formData.forEach(function (value, key) {
+ params.append(key, value);
+ });
+
+ return params.toString();
+}
+
+function createHtmlFromJson(jsonData) {
+ function createElementRecursive(data) {
+ if (typeof data !== 'object' || data === null) {
+ return document.createTextNode(String(data));
+ }
+
+ const element = createElement(data.type || 'div', data);
+
+ if (data.children) {
+ if (Array.isArray(data.children)) {
+ data.children.forEach(child => {
+ element.appendChild(createElementRecursive(child));
+ });
+ } else {
+ element.appendChild(createElementRecursive(data.children));
+ }
+ }
+
+ return element;
+ }
+
+ return createElementRecursive(jsonData);
+}
+
+function createElement(type, data) {
+ const elem = document.createElement(type);
+ if (typeof data === 'object') {
+ if (data.hasOwnProperty('classList')) {
+ if (Array.isArray(data.classList)) {
+ for (const cl of data.classList) {
+ elem.classList.add(cl);
+ }
+ } else if (typeof data.classList === 'string') {
+ elem.classList.add(data.classList);
+ }
+ }
+
+ if (data.hasOwnProperty('css')) {
+ if (typeof data.css === 'object') {
+ for (const css in data.css) {
+ elem.style.setProperty(css, data.css[css]);
+ }
+ }
+ }
+
+ if (data.hasOwnProperty('textContent')) {
+ elem.textContent = data.textContent;
+ }
+
+ if (data.hasOwnProperty('innerHTML')) {
+ elem.innerHTML = data.innerHTML;
+ }
+
+ if (data.hasOwnProperty('attributes')) {
+ if (typeof data.attributes === 'object') {
+ for (const attr in data.attributes) {
+ elem.setAttribute(attr, data.attributes[attr]);
+ }
+ }
+ }
+ } else if (Array.isArray(data) && data.length > 0) {
+ for (const cl of data) {
+ elem.classList.add(cl);
+ }
+ } else if (typeof data === 'string') {
+ elem.classList.add(data);
+ }
+ return elem;
+}
+
+function sendRequest(url, data, type, callback, useUrlEncoded = true) {
+ var xhr = new XMLHttpRequest();
+ xhr.open(type, url, true);
+
+ if (useUrlEncoded) {
+ xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+ data = new URLSearchParams(data).toString();
+ } else {
+ xhr.setRequestHeader('Content-Type', 'application/json');
+ data = JSON.stringify(data);
+ }
+
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ if (xhr.status >= 200 && xhr.status < 300) {
+ callback(null, xhr.responseText);
+ } else {
+ callback(xhr.statusText, null);
+ }
+ }
+ };
+ xhr.send(type === 'POST' ? data : null);
+}
diff --git a/AvocadoEdition_Light/js/autosave.js b/AvocadoEdition_Light/js/autosave.js
index ac083b5..2b504be 100644
--- a/AvocadoEdition_Light/js/autosave.js
+++ b/AvocadoEdition_Light/js/autosave.js
@@ -6,112 +6,112 @@ var save_wr_subject = null;
var save_wr_content = null;
function autosave() {
- $("form#fwrite").each(function() {
- if(g5_editor != "") {
- if (g5_editor.indexOf("ckeditor4") != -1 && typeof(CKEDITOR.instances.wr_content)!="undefined") {
- this.wr_content.value = CKEDITOR.instances.wr_content.getData();
- } else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") {
- this.wr_content.value = ed_wr_content.outputBodyHTML();
- } else {
- if(typeof get_editor_wr_content == "function") {
- this.wr_content.value = get_editor_wr_content();
- }
- }
+ $("form#fwrite").each(function () {
+ if (g5_editor != "") {
+ if (g5_editor.indexOf("ckeditor4") != -1 && typeof (CKEDITOR.instances.wr_content) != "undefined") {
+ this.wr_content.value = CKEDITOR.instances.wr_content.getData();
+ } else if (g5_editor.indexOf("cheditor5") != -1 && typeof (ed_wr_content) != "undefined") {
+ this.wr_content.value = ed_wr_content.outputBodyHTML();
+ } else {
+ if (typeof get_editor_wr_content == "function") {
+ this.wr_content.value = get_editor_wr_content();
}
-
- // 변수에 저장해 놓은 값과 다를 경우에만 임시 저장함
- if (save_wr_subject != this.wr_subject.value || save_wr_content != this.wr_content.value) {
- $.ajax({
- url: g5_bbs_url+"/ajax.autosave.php",
- data: {
- "uid" : this.uid.value,
- "subject": this.wr_subject.value,
- "content": this.wr_content.value
- },
- type: "POST",
- success: function(data){
- if (data) {
- $("#autosave_count").html(data);
- }
- }
- });
- save_wr_subject = this.wr_subject.value;
- save_wr_content = this.wr_content.value;
- }
- });
-}
-
-$(function(){
-
- if (g5_is_member) {
- setInterval(autosave, AUTOSAVE_INTERVAL * 1000);
+ }
}
- // 임시저장된 글목록을 가져옴
- $("#btn_autosave").click(function(){
- if ($("#autosave_pop").is(":hidden")) {
- $.get(g5_bbs_url+"/ajax.autosavelist.php", function(data){
- //alert(data);
- //console.log( "Data: " + data);
- $("#autosave_pop ul").empty();
- if ($(data).find("list").find("item").length > 0) {
- $(data).find("list").find("item").each(function(i) {
- var id = $(this).find("id").text();
- var uid = $(this).find("uid").text();
- var subject = $(this).find("subject").text();
- var datetime = $(this).find("datetime").text();
- $("#autosave_pop ul")
- .append(''+subject+''+datetime+' ')
- .find("li:eq("+i+")")
- .data({ as_id: id, uid: uid });
- });
- }
- }, "xml");
- $("#autosave_pop").show();
- } else {
- $("#autosave_pop").hide();
+ // 변수에 저장해 놓은 값과 다를 경우에만 임시 저장함
+ if (save_wr_subject != this.wr_subject.value || save_wr_content != this.wr_content.value) {
+ $.ajax({
+ url: g5_bbs_url + "/ajax.autosave.php",
+ data: {
+ "uid": this.uid.value,
+ "subject": this.wr_subject.value,
+ "content": this.wr_content.value
+ },
+ type: "POST",
+ success: function (data) {
+ if (data) {
+ $("#autosave_count").html(data);
+ }
}
- });
+ });
+ save_wr_subject = this.wr_subject.value;
+ save_wr_content = this.wr_content.value;
+ }
+ });
+}
- // 임시저장된 글 제목과 내용을 가져와서 제목과 내용 입력박스에 노출해 줌
- $(document).on( "click", ".autosave_load", function(){
- var $li = $(this).parents("li");
- var as_id = $li.data("as_id");
- var as_uid = $li.data("uid");
- $("#fwrite input[name='uid']").val(as_uid);
- $.get(g5_bbs_url+"/ajax.autosaveload.php", {"as_id":as_id}, function(data){
- var subject = $(data).find("item").find("subject").text();
- var content = $(data).find("item").find("content").text();
- $("#wr_subject").val(subject);
- if(g5_editor != "") {
- if (g5_editor.indexOf("ckeditor4") != -1 && typeof(CKEDITOR.instances.wr_content)!="undefined") {
- CKEDITOR.instances.wr_content.setData(content);
- } else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") {
- ed_wr_content.putContents(content);
- } else {
- if(typeof put_editor_wr_content == "function") {
- put_editor_wr_content(content);
- }
- }
- } else {
- $("#fwrite #wr_content").val(content);
- }
- }, "xml");
- $("#autosave_pop").hide();
- });
+$(function () {
- $(document).on( "click", ".autosave_del", function(){
- var $li = $(this).parents("li");
- var as_id = $li.data("as_id");
- $.get(g5_bbs_url+"/ajax.autosavedel.php", {"as_id":as_id}, function(data){
- if (data == -1) {
- alert("임시 저장된글을 삭제중에 오류가 발생하였습니다.");
- } else {
- $("#autosave_count").html(data);
- $li.remove();
- }
- });
- });
+ if (g5_is_member) {
+ setInterval(autosave, AUTOSAVE_INTERVAL * 1000);
+ }
- $(".autosave_close").click(function(){ $("#autosave_pop").hide(); });
+ // 임시저장된 글목록을 가져옴
+ $("#btn_autosave").click(function () {
+ if ($("#autosave_pop").is(":hidden")) {
+ $.get(g5_bbs_url + "/ajax.autosavelist.php", function (data) {
+ //alert(data);
+ //console.log( "Data: " + data);
+ $("#autosave_pop ul").empty();
+ if ($(data).find("list").find("item").length > 0) {
+ $(data).find("list").find("item").each(function (i) {
+ var id = $(this).find("id").text();
+ var uid = $(this).find("uid").text();
+ var subject = $(this).find("subject").text();
+ var datetime = $(this).find("datetime").text();
+ $("#autosave_pop ul")
+ .append('' + subject + '' + datetime + ' ')
+ .find("li:eq(" + i + ")")
+ .data({ as_id: id, uid: uid });
+ });
+ }
+ }, "xml");
+ $("#autosave_pop").show();
+ } else {
+ $("#autosave_pop").hide();
+ }
+ });
+
+ // 임시저장된 글 제목과 내용을 가져와서 제목과 내용 입력박스에 노출해 줌
+ $(document).on("click", ".autosave_load", function () {
+ var $li = $(this).parents("li");
+ var as_id = $li.data("as_id");
+ var as_uid = $li.data("uid");
+ $("#fwrite input[name='uid']").val(as_uid);
+ $.get(g5_bbs_url + "/ajax.autosaveload.php", { "as_id": as_id }, function (data) {
+ var subject = $(data).find("item").find("subject").text();
+ var content = $(data).find("item").find("content").text();
+ $("#wr_subject").val(subject);
+ if (g5_editor != "") {
+ if (g5_editor.indexOf("ckeditor4") != -1 && typeof (CKEDITOR.instances.wr_content) != "undefined") {
+ CKEDITOR.instances.wr_content.setData(content);
+ } else if (g5_editor.indexOf("cheditor5") != -1 && typeof (ed_wr_content) != "undefined") {
+ ed_wr_content.putContents(content);
+ } else {
+ if (typeof put_editor_wr_content == "function") {
+ put_editor_wr_content(content);
+ }
+ }
+ } else {
+ $("#fwrite #wr_content").val(content);
+ }
+ }, "xml");
+ $("#autosave_pop").hide();
+ });
+
+ $(document).on("click", ".autosave_del", function () {
+ var $li = $(this).parents("li");
+ var as_id = $li.data("as_id");
+ $.get(g5_bbs_url + "/ajax.autosavedel.php", { "as_id": as_id }, function (data) {
+ if (data == -1) {
+ alert("임시 저장된글을 삭제중에 오류가 발생하였습니다.");
+ } else {
+ $("#autosave_count").html(data);
+ $li.remove();
+ }
+ });
+ });
+
+ $(".autosave_close").click(function () { $("#autosave_pop").hide(); });
});
diff --git a/AvocadoEdition_Light/js/certify.js b/AvocadoEdition_Light/js/certify.js
index 616760c..5f36a5c 100644
--- a/AvocadoEdition_Light/js/certify.js
+++ b/AvocadoEdition_Light/js/certify.js
@@ -1,80 +1,72 @@
// 본인확인 인증창 호출
-function certify_win_open(type, url)
-{
- if(type == 'kcb-ipin')
- {
- var popupWindow = window.open( url, "kcbPop", "left=200, top=100, status=0, width=450, height=550" );
- popupWindow.focus();
+function certify_win_open(type, url) {
+ if (type == 'kcb-ipin') {
+ var popupWindow = window.open(url, "kcbPop", "left=200, top=100, status=0, width=450, height=550");
+ popupWindow.focus();
+ }
+ else if (type == 'kcb-hp') {
+ var popupWindow = window.open(url, "auth_popup", "left=200, top=100, width=430, height=590, scrollbar=yes");
+ popupWindow.focus();
+ }
+ else if (type == 'kcp-hp') {
+ if ($("input[name=veri_up_hash]").size() < 1)
+ $("input[name=cert_no]").after('');
+
+ if (navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1) {
+ var $frm = $(event.target.form);
+ if ($("#kcp_cert").size() < 1) {
+ $frm.wrap('');
+
+ $("#cert_info").append('