From f2283d75e16a311904c55193e86c0bc67d413413 Mon Sep 17 00:00:00 2001 From: Arcturus Date: Mon, 7 Oct 2024 11:52:53 +0900 Subject: [PATCH] fix itemlog display and logger --- .../adm/_gnb.000.site.menu.php | 4 +- .../adm/_gnb.004.community.menu.php | 2 +- AvocadoEdition_Light/adm/inventory_update.php | 7 +- AvocadoEdition_Light/adm/itemlog_list.php | 138 +++++++++++------- .../adm/itemlog_list_delete.php | 20 +++ .../classes/item/item.class.php | 70 +++++---- AvocadoEdition_Light/extend/banner.lib.php | 4 +- .../extend/community.config.php | 2 +- 8 files changed, 162 insertions(+), 85 deletions(-) create mode 100644 AvocadoEdition_Light/adm/itemlog_list_delete.php diff --git a/AvocadoEdition_Light/adm/_gnb.000.site.menu.php b/AvocadoEdition_Light/adm/_gnb.000.site.menu.php index dccea7a..c367225 100644 --- a/AvocadoEdition_Light/adm/_gnb.000.site.menu.php +++ b/AvocadoEdition_Light/adm/_gnb.000.site.menu.php @@ -52,10 +52,10 @@ $menu["config"]->addChildMenu("config", "홈페이지 상세관리", G5_ADMIN_UR $menu["config"]->getLastAddedMenu()->addSubFile("/config_form_update.php"); if (Community::isInitCommunity()) { - $menu["config"]->addChildMenu("config", "메인슬라이드 관리", G5_ADMIN_URL . "/banner_list.php", true, 700, "\F2CC", 0); + $menu["config"]->addChildMenu("config", "메인슬라이드 관리", G5_ADMIN_URL . "/banner_list.php", true, 700, "\F66D", 0); $menu["config"]->getLastAddedMenu()->addSubFile("/banner_form.php"); - $menu["config"]->addChildMenu("config", "인트로 관리", G5_ADMIN_URL . "/intro_list.php", true, 700, "\F289", 0); + $menu["config"]->addChildMenu("config", "인트로 관리", G5_ADMIN_URL . "/intro_list.php", true, 710, "\F7BF", 0); $menu["config"]->getLastAddedMenu()->addSubFile("/intro_form.php"); $menu["config"]->getLastAddedMenu()->addSubFile("/intro_form_update.php"); } diff --git a/AvocadoEdition_Light/adm/_gnb.004.community.menu.php b/AvocadoEdition_Light/adm/_gnb.004.community.menu.php index b499cb3..56cf682 100644 --- a/AvocadoEdition_Light/adm/_gnb.004.community.menu.php +++ b/AvocadoEdition_Light/adm/_gnb.004.community.menu.php @@ -52,8 +52,8 @@ if (Community::isInitCommunity()) { $menu["item"]->getLastAddedMenu()->addSubFile("/inventory_update.php"); $menu["item"]->addChildMenu("item", "레시피 관리", G5_ADMIN_URL . "/recipe_list.php", true, 0, "\F442", 0); + $menu["item"]->addChildMenu("item", "아이템 기록", G5_ADMIN_URL . "/itemlog_list.php", true, 0, "\F50F", 0); $menu["item"]->addChildMenu("item", "아이템 구매 기록", G5_ADMIN_URL . "/order_list.php", true, 0, "\F50F", 0); - $menu["item"]->addChildMenu("item", "아이템 사용 기록", G5_ADMIN_URL . "/itemlog_list.php", true, 0, "\F50F", 0); $menu["character"]->addChildMenu("character", "캐릭터 관리", G5_ADMIN_URL . "/character_list.php", true, 0, "\F379", 0); $menu["character"]->getLastAddedMenu()->addSubFile("/character_list_update.php"); diff --git a/AvocadoEdition_Light/adm/inventory_update.php b/AvocadoEdition_Light/adm/inventory_update.php index 117bc1b..1f0f949 100644 --- a/AvocadoEdition_Light/adm/inventory_update.php +++ b/AvocadoEdition_Light/adm/inventory_update.php @@ -32,7 +32,7 @@ if ($take_type == 'A') { $result = sql_query($sql); for ($i = 0; $ch = sql_fetch_array($result); $i++) { - insert_inventory($ch['ch_id'], $it_id, $it, $item_count); + Item::giveItem($ch['ch_id'], $it_id, $it, $item_count, "시스템 지급"); } } else { // 개별지급 @@ -43,10 +43,11 @@ if ($take_type == 'A') { $ch = sql_fetch("select ch_id, ch_name from {$g5['character_table']} where ch_id = '{$ch_id}'"); } - if (!$ch['ch_id']) + if (!$ch['ch_id']) { alert('존재하는 캐릭터가 아닙니다.'); + } - insert_inventory($ch['ch_id'], $it_id, $it, $item_count); + Item::giveItem($ch['ch_id'], $it_id, $it, $item_count, "시스템 지급"); } goto_url('./inventory_list.php?' . $qstr); diff --git a/AvocadoEdition_Light/adm/itemlog_list.php b/AvocadoEdition_Light/adm/itemlog_list.php index 3ab5b45..e731bd5 100644 --- a/AvocadoEdition_Light/adm/itemlog_list.php +++ b/AvocadoEdition_Light/adm/itemlog_list.php @@ -5,7 +5,7 @@ auth_check($auth[$sub_menu], 'r'); $token = get_token(); -$sql_common = " FROM {$g5['item_modifylog']} o "; +$sql_common = " FROM {$g5['item_modify_table']} o "; $sql_search = " WHERE (1) "; if ($stx) { @@ -19,16 +19,16 @@ if ($stx) { } if (!$sst) { - $sst = "o.srl"; + $sst = "o.im_id"; $sod = "DESC"; } $sql_order = " ORDER BY {$sst} {$sod} "; $sql = " SELECT count(*) AS cnt -{$sql_common} -{$sql_search} -{$sql_order} "; + {$sql_common} + {$sql_search} + {$sql_order} "; $row = sql_fetch($sql); @@ -42,10 +42,10 @@ if ($page < 1) $from_record = ($page - 1) * $rows; $sql = " SELECT * -{$sql_common} -{$sql_search} -{$sql_order} -LIMIT {$from_record}, {$rows} "; + {$sql_common} + {$sql_search} + {$sql_order} + LIMIT {$from_record}, {$rows} "; $result = sql_query($sql); $listall = '전체목록'; @@ -58,7 +58,7 @@ $g5['title'] = '아이템 기록'; include_once './admin.head.php'; -$colspan = 4; ?> +$colspan = 5; ?>
전체 건 @@ -79,47 +79,85 @@ $colspan = 4; ?> text-align: left; } -
- - - - - - - - - - - - - - - - - - + + + + + + +
+
목록
캐릭터명아이템구분일시
+ + + + + + + + + + + + + + + + + + + + + + + + + + '; ?> - - - - - - '; - ?> - -
목록
+ + + 캐릭터명아이템구분일시
+ + + + + +
자료가 없습니다.
- - -
자료가 없습니다.
-
+ + +
+
+ +
+ +