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