Compare commits
No commits in common. "dbe8e28e740e2b626e93858d2f6b2be549298703" and "5c07ddae07452e448b562dc6a61b5c5008e5910e" have entirely different histories.
dbe8e28e74
...
5c07ddae07
12 changed files with 38 additions and 117 deletions
|
|
@ -107,25 +107,21 @@ if (empty($fr_date))
|
|||
<th scope="row">상점 분류</th>
|
||||
<td colspan="2">
|
||||
<select name="ca_name">
|
||||
<option value="no_category">미분류</option>
|
||||
<?php
|
||||
for ($i = 0; $i < count($category); $i++) {
|
||||
<option value="">카테고리 선택</option>
|
||||
<?php for ($i = 0; $i < count($category); $i++) {
|
||||
if (!$category[$i])
|
||||
continue;
|
||||
|
||||
echo "<option value=\"{$category[$i]}\"";
|
||||
if ($shop['ca_name'] == $category[$i]) {
|
||||
echo " selected";
|
||||
}
|
||||
echo ">{$category[$i]}</option>";
|
||||
} ?>
|
||||
?>
|
||||
<option value="<?= $category[$i] ?>" <?= $shop['ca_name'] == $category[$i] ? "selected" : "" ?>>
|
||||
<?= $category[$i] ?></option>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">진열 아이템</th>
|
||||
<td colspan="2">
|
||||
<input type="hidden" name="it_id" id="it_id" value="<?= $shop['it_id'] ?>" />
|
||||
<input type="text" name="it_name" value="<?= Item::getName($shop['it_id']) ?>" id="it_name"
|
||||
<input type="text" name="it_name" value="<?= get_item_name($shop['it_id']) ?>" id="it_name"
|
||||
onkeyup="get_ajax_item(this, 'item_list', 'it_id');" />
|
||||
<div id="item_list" class="ajax-list-box">
|
||||
<div class="list"></div>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ include_once './_common.php';
|
|||
|
||||
if ($w == 'u')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
check_token();
|
||||
|
||||
|
|
@ -53,13 +52,11 @@ if (isset($sh_side) && is_array($sh_side) && count($sh_side)) {
|
|||
$sh_side = implode("||", $sh_side);
|
||||
$sh_side = "||" . $sh_side . "||";
|
||||
}
|
||||
|
||||
// 종족 제한 설정 저장
|
||||
if (isset($sh_class) && is_array($sh_class) && count($sh_class)) {
|
||||
$sh_class = implode("||", $sh_class);
|
||||
$sh_class = "||" . $sh_class . "||";
|
||||
}
|
||||
|
||||
// 랭킹 제한 설정 저장
|
||||
if (isset($sh_rank) && is_array($sh_rank) && count($sh_rank)) {
|
||||
$sh_rank = implode("||", $sh_rank);
|
||||
|
|
@ -83,11 +80,11 @@ if (!$sh_has_item && $sh_has_item_name) {
|
|||
alert("교환 아이템으로 등록되는 아이템의 정보가 없습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
if (!$sh_has_item_name) {
|
||||
$sh_has_item = 0;
|
||||
}
|
||||
|
||||
|
||||
// 교환 타이틀 유효성 여부 체크
|
||||
if (!$sh_has_title && $sh_has_title_name) {
|
||||
$has_title = sql_fetch("select ti_id from {$g5['item_table']} where ti_title = '{$sh_has_title_name}'");
|
||||
|
|
@ -96,15 +93,10 @@ if (!$sh_has_title && $sh_has_title_name) {
|
|||
alert("교환 타이틀로 등록되는 타이틀의 정보가 없습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
if (!$sh_has_title_name) {
|
||||
$sh_has_title = 0;
|
||||
}
|
||||
|
||||
if ($ca_name == "no_category") {
|
||||
$ca_name = "";
|
||||
}
|
||||
|
||||
$sql_common = "
|
||||
it_id = '{$it_id}',
|
||||
ca_name = '{$ca_name}',
|
||||
|
|
|
|||
|
|
@ -148,9 +148,8 @@ $colspan = 19;
|
|||
</td>
|
||||
<td style="width:100px;">
|
||||
<select name="ca_name[<?php echo $i ?>]" style="width:100%;">
|
||||
<option value="no_category">미분류</option>
|
||||
<?php
|
||||
for ($k = 0; $k < count($category); $k++) {
|
||||
<option value="">카테고리</option>
|
||||
<?php for ($k = 0; $k < count($category); $k++) {
|
||||
if (!$category[$k])
|
||||
continue;
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -12,14 +12,9 @@ if ($_POST['act_button'] == "선택수정") {
|
|||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$cate_name = $_POST['ca_name'][$k];
|
||||
|
||||
if ($cate_name == "no_category") {
|
||||
$cate_name = "";
|
||||
}
|
||||
|
||||
$sql = "UPDATE {$g5['shop_table']} SET
|
||||
ca_name = '{$cate_name}',
|
||||
ca_name = '{$_POST['ca_name'][$k]}',
|
||||
sh_money = '{$_POST['sh_money'][$k]}',
|
||||
sh_use_money = '{$_POST['sh_use_money'][$k]}',
|
||||
sh_exp = '{$_POST['sh_exp'][$k]}',
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class Item extends Module
|
|||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
return [];
|
||||
}
|
||||
|
||||
public static function getInventoryItem($inventory_id)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
********************/
|
||||
|
||||
define('G5_VERSION', '아보카도 에디션 : Amber');
|
||||
define('G5_GNUBOARD_VER', '2.3.3');
|
||||
define('G5_GNUBOARD_VER', '2.3.1');
|
||||
define('G5_AMBER', true);
|
||||
define('_GNUBOARD_', true);
|
||||
|
||||
|
|
|
|||
|
|
@ -109,9 +109,7 @@ function print_r2($var)
|
|||
// header("location:URL") 을 대체
|
||||
function goto_url($url)
|
||||
{
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("gnuboard.goto_url", $url);
|
||||
}
|
||||
EventHandler::triggerEvent("gnuboard.goto_url", $url);
|
||||
|
||||
$url = str_replace("&", "&", $url);
|
||||
//echo "<script> location.replace('$url'); </script>";
|
||||
|
|
@ -180,9 +178,7 @@ function alert($msg = '', $url = '', $error = true, $post = false)
|
|||
{
|
||||
global $g5, $config, $member, $is_admin;
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("gnuboard.alert", $msg, $url, $error, $post);
|
||||
}
|
||||
EventHandler::triggerEvent("gnuboard.alert", $msg, $url, $error, $post);
|
||||
|
||||
if (!$msg)
|
||||
$msg = '올바른 방법으로 이용해 주십시오.';
|
||||
|
|
@ -201,9 +197,7 @@ function alert_close($msg, $error = true)
|
|||
{
|
||||
global $g5;
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("gnuboard.alert_close", $msg, $error);
|
||||
}
|
||||
EventHandler::triggerEvent("gnuboard.alert_close", $msg, $error);
|
||||
|
||||
$header = '';
|
||||
if (isset($g5['title'])) {
|
||||
|
|
@ -621,13 +615,11 @@ function html_purifier($html)
|
|||
* HTMLPurifier 설정을 변경할 수 있는 Event hook
|
||||
* 리스너에서는 첫번째 인자($config)로 `HTMLPurifier_Config` 객체를 받을 수 있다
|
||||
*/
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("gnuboard.html_purifier_config", $config, [
|
||||
'html' => $html,
|
||||
'write' => $write,
|
||||
'is_admin' => $is_admin
|
||||
]);
|
||||
}
|
||||
EventHandler::triggerEvent("gnuboard.html_purifier_config", $config, [
|
||||
'html' => $html,
|
||||
'write' => $write,
|
||||
'is_admin' => $is_admin
|
||||
]);
|
||||
|
||||
$purifier = new HTMLPurifier($config);
|
||||
|
||||
|
|
@ -1607,9 +1599,7 @@ function sql_query($sql, $error = G5_DISPLAY_SQL_ERROR, $link = null)
|
|||
return null;
|
||||
}
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("gnuboard.sql_query_after", $result, $sql, $error);
|
||||
}
|
||||
EventHandler::triggerEvent("gnuboard.sql_query_after", $result, $sql, $error);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
|
@ -2318,9 +2308,7 @@ function delete_cache_latest($bo_table)
|
|||
unlink($filename);
|
||||
}
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("gnuboard.delete_cache_latest", $bo_table);
|
||||
}
|
||||
EventHandler::triggerEvent("gnuboard.delete_cache_latest", $bo_table);
|
||||
}
|
||||
|
||||
// 게시판 첨부파일 썸네일 삭제
|
||||
|
|
@ -2359,9 +2347,7 @@ function delete_editor_thumbnail($contents)
|
|||
if (!$contents)
|
||||
return;
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("gnuboard.delete_editor_thumbnail_before", $contents);
|
||||
}
|
||||
EventHandler::triggerEvent("gnuboard.delete_editor_thumbnail_before", $contents);
|
||||
|
||||
// $contents 중 img 태그 추출
|
||||
$matchs = get_editor_image($contents);
|
||||
|
|
@ -2383,9 +2369,7 @@ function delete_editor_thumbnail($contents)
|
|||
}
|
||||
}
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("gnuboard.delete_editor_thumbnail_after", $contents, $matchs);
|
||||
}
|
||||
EventHandler::triggerEvent("gnuboard.delete_editor_thumbnail_after", $contents, $matchs);
|
||||
}
|
||||
|
||||
// 1:1문의 첨부파일 썸네일 삭제
|
||||
|
|
@ -3040,9 +3024,7 @@ function member_delete($mb_id)
|
|||
// 아이콘 삭제
|
||||
@unlink(G5_DATA_PATH . '/member/' . substr($mb_id, 0, 2) . '/' . $mb_id . '.gif');
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("gnuboard.member_delete_after", $mb_id);
|
||||
}
|
||||
EventHandler::triggerEvent("gnuboard.member_delete_after", $mb_id);
|
||||
}
|
||||
|
||||
// 이메일 주소 추출
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ if (!defined('_GNUBOARD_'))
|
|||
@ini_set('memory_limit', '-1');
|
||||
|
||||
// 게시글리스트 썸네일 생성
|
||||
function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create = false, $is_crop = false, $crop_mode = 'center', $is_sharpen = false, $um_value = '80/0.5/3', $distance = '0')
|
||||
function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create = false, $is_crop = false, $crop_mode = 'center', $is_sharpen = false, $um_value = '80/0.5/3')
|
||||
{
|
||||
global $g5, $config;
|
||||
$filename = $alt = $data_path = '';
|
||||
|
|
@ -66,7 +66,7 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
|
|||
return $thumbnail_info;
|
||||
}
|
||||
|
||||
$tname = thumbnail($filename, $filepath, $filepath, $thumb_width, $thumb_height, $is_create, $is_crop, $crop_mode, $is_sharpen, $um_value, $distance);
|
||||
$tname = thumbnail($filename, $filepath, $filepath, $thumb_width, $thumb_height, $is_create, $is_crop, $crop_mode, $is_sharpen, $um_value);
|
||||
|
||||
if ($tname) {
|
||||
if ($edt) {
|
||||
|
|
@ -229,7 +229,7 @@ function get_view_thumbnail($contents, $thumb_width = 0)
|
|||
return run_replace('get_view_thumbnail', $contents);
|
||||
}
|
||||
|
||||
function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_height, $is_create, $is_crop = false, $crop_mode = 'center', $is_sharpen = false, $um_value = '80/0.5/3', $distance = '0')
|
||||
function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_height, $is_create, $is_crop = false, $crop_mode = 'center', $is_sharpen = false, $um_value = '80/0.5/3')
|
||||
{
|
||||
global $g5;
|
||||
|
||||
|
|
@ -384,14 +384,6 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
|
|||
$src_x = round(($size[0] - $src_w) / 2);
|
||||
}
|
||||
break;
|
||||
case 'custom':
|
||||
if ($size[1] / $size[0] >= $ratio) {
|
||||
$src_h = round($src_w * $ratio);
|
||||
$src_y = $distance;
|
||||
} else {
|
||||
$src_w = round($size[1] / $ratio);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if ($size[1] / $size[0] >= $ratio) {
|
||||
$src_h = round($src_w * $ratio);
|
||||
|
|
|
|||
|
|
@ -3,11 +3,8 @@
|
|||
* @var string|int $sh_id
|
||||
*/
|
||||
include_once "./_common.php";
|
||||
$item = sql_fetch("SELECT * FROM {$g5['shop_table']} shop, {$g5['item_table']} item WHERE shop.it_id = item.it_id AND shop.sh_id = '{$sh_id}'");
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("amber.shop_ajax.before", $sh_id);
|
||||
}
|
||||
$item = sql_fetch("select * from {$g5['shop_table']} shop, {$g5['item_table']} item where shop.it_id = item.it_id and shop.sh_id = '{$sh_id}'");
|
||||
|
||||
if ($item['sh_id']) {
|
||||
|
||||
|
|
@ -35,10 +32,6 @@ if ($item['sh_id']) {
|
|||
}
|
||||
}
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("amber.shop_ajax.after", $item);
|
||||
}
|
||||
|
||||
if (defined('G5_THEME_PATH') && is_file(G5_THEME_PATH . "/shop/shop.item.skin.php")) {
|
||||
include G5_THEME_PATH . "/shop/shop.item.skin.php";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -4,13 +4,9 @@
|
|||
*/
|
||||
include_once "./_common.php";
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("amber.shop_ajax_update.before");
|
||||
}
|
||||
|
||||
if ($character['ch_id'] && $character['ch_state'] == '승인') {
|
||||
$msg = "";
|
||||
$item = sql_fetch("SELECT * FROM {$g5['shop_table']} shop, {$g5['item_table']} item WHERE shop.it_id = item.it_id AND shop.sh_id = '{$sh_id}'");
|
||||
$item = sql_fetch("select * from {$g5['shop_table']} shop, {$g5['item_table']} item where shop.it_id = item.it_id and shop.sh_id = '{$sh_id}'");
|
||||
|
||||
if ($item['sh_id']) {
|
||||
// 구매 가능한 아이템인지 체크한다.
|
||||
|
|
@ -61,7 +57,7 @@ if ($character['ch_id'] && $character['ch_state'] == '승인') {
|
|||
|
||||
if ($in['cnt'] < $item['sh_has_item_count']) {
|
||||
// 필요 아이템 미소유
|
||||
$has_item_name = Item::getName($item['sh_has_item']);
|
||||
$has_item_name = get_item_name($item['sh_has_item']);
|
||||
$msg .= $has_item_name . j($has_item_name, '이') . " " . $item['sh_has_item_count'] . "개 있어야 살 수 있습니다.<br />";
|
||||
$is_able_buy = false;
|
||||
} else if ($item['sh_use_has_item']) {
|
||||
|
|
@ -125,11 +121,6 @@ if ($character['ch_id'] && $character['ch_state'] == '승인') {
|
|||
}
|
||||
|
||||
if ($is_able_buy) {
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("amber.shop_ajax_update.buyitem_before");
|
||||
}
|
||||
|
||||
Item::giveItem($character['ch_id'], $item['it_id'], $item, 1, "구매", true);
|
||||
|
||||
if ($use_point) {
|
||||
|
|
@ -160,10 +151,6 @@ if ($character['ch_id'] && $character['ch_state'] == '승인') {
|
|||
sql_query("delete from {$g5['title_has_table']} where hi_id = '{$use_has_title}'");
|
||||
}
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("amber.shop_ajax_update.buyitem_after", $use_point, $use_exp_point, $use_inventory_item, $use_inventory_item_count);
|
||||
}
|
||||
|
||||
$msg = "《 " . $item['it_name'] . " 》 구매 되었습니다.";
|
||||
}
|
||||
}
|
||||
|
|
@ -176,7 +163,3 @@ if (defined('G5_THEME_PATH') && is_file(G5_THEME_PATH . "/shop/shop.result.skin.
|
|||
} else {
|
||||
include G5_PATH . "/shop/skin/shop.result.skin.php";
|
||||
}
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("amber.shop_ajax_update.after");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,24 +3,14 @@ include_once './_common.php';
|
|||
$g5['title'] = "상점";
|
||||
include_once './_head.php';
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("amber.shop.before");
|
||||
}
|
||||
|
||||
$shop_cate = explode("||", $config['cf_shop_category']);
|
||||
|
||||
if (isset($shop_cate)) {
|
||||
$shop_cate = array_merge(["전체"], $shop_cate);
|
||||
} else {
|
||||
$shop_cate = [];
|
||||
}
|
||||
|
||||
if (!$cate) {
|
||||
$cate = $shop_cate[0];
|
||||
}
|
||||
|
||||
$sql_common = " from {$g5['shop_table']} ";
|
||||
$sql_search = " where sh_use = '1'" . ($cate !== "전체" ? " and ca_name = '{$cate}'" : "");
|
||||
$sql_search = " where sh_use = '1' and ca_name = '{$cate}' ";
|
||||
$sql_order = " order by sh_order asc ";
|
||||
$sql_limit = "";
|
||||
|
||||
|
|
@ -152,6 +142,3 @@ function ajax_shop_link_url(url, obj_id) {
|
|||
<?php
|
||||
include_once './_tail.php';
|
||||
|
||||
if (class_exists('EventHandler') && method_exists('EventHandler', 'triggerEvent')) {
|
||||
EventHandler::triggerEvent("amber.shop.after");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ AvocadoEdition Light 의 구조를 바탕으로 GNUBoard 기능과 함께 재수
|
|||
-----------------------------
|
||||
|
||||
## 오류 제보
|
||||
|
||||
- [여기](../../../issues)에 직접 이슈를 남길 수 있습니다.
|
||||
- [crepe](https://crepe.cm/@sharlayan)
|
||||
- [mastodon](https://drk.st/@notice)
|
||||
|
|
@ -28,16 +29,17 @@ AvocadoEdition Light 의 구조를 바탕으로 GNUBoard 기능과 함께 재수
|
|||
-----------------------------
|
||||
|
||||
## Migration Guide
|
||||
|
||||
기존에 개조된 코드가 있다면 git을 이용해 병합하는 것을 추천합니다.
|
||||
|
||||
버전 변경에 대한 의뢰도 가능합니다.
|
||||
|
||||
## 기타
|
||||
|
||||
- 커뮤니티 기능 사용 시 [멤버 활동 및 신청서 합격 관리 추가 기능](https://github.com/tateck-develop/AvocadoEdition_CharacterManager) 이 포함되어 있습니다.
|
||||
- 커뮤니티 기능을 끄고 켤 수 있습니다. 커뮤니티 용도로 사용하지 않는 경우
|
||||
옵션을 사용하지 않음으로 설정하여 관리 페이지에서 기능을 숨길 수 있습니다.
|
||||
|
||||
## 설치
|
||||
- [여기](../../../releases/latest)에서 압축 파일 (tar.gz) 을 받습니다.
|
||||
- 압축을 풀어 호스팅의 `public` 또는 `www`, `public_html` 폴더에 업로드합니다.
|
||||
(또는 ssh 로 접속하여 직접 업로드하고 압축을 해제해도 됩니다.)
|
||||
`AvocadoAmber` 경로 아래의 파일들을 호스팅의 `public` 또는 `www`, `public_html` 폴더에 업로드합니다.
|
||||
이후 호스팅 주소로 접속하여 설치 프로그램을 실행합니다.
|
||||
|
|
|
|||
Loading…
Reference in a new issue