From 0325be49f3517c6895a41e1d4e44c36de75c11a5 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Mon, 18 Apr 2022 03:15:56 +0900 Subject: [PATCH] =?UTF-8?q?feat(wip):=20=EC=83=88=20=EC=97=B0=EA=B0=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/ts/PageHistory.vue | 121 ++++++++++++++++++++++++++++++++++++++ hwe/ts/build_exports.json | 1 + hwe/ts/v_history.ts | 16 +++++ hwe/v_history.php | 55 +++++++++++++++++ 4 files changed, 193 insertions(+) create mode 100644 hwe/ts/PageHistory.vue create mode 100644 hwe/ts/v_history.ts create mode 100644 hwe/v_history.php diff --git a/hwe/ts/PageHistory.vue b/hwe/ts/PageHistory.vue new file mode 100644 index 00000000..49ac6300 --- /dev/null +++ b/hwe/ts/PageHistory.vue @@ -0,0 +1,121 @@ + + + + diff --git a/hwe/ts/build_exports.json b/hwe/ts/build_exports.json index 20a1c1ce..a2200c25 100644 --- a/hwe/ts/build_exports.json +++ b/hwe/ts/build_exports.json @@ -28,6 +28,7 @@ "v_NPCControl": "v_NPCControl.ts", "v_join": "v_join.ts", "v_main": "v_main.ts", + "v_history": "v_history.ts", "v_nationStratFinan": "v_nationStratFinan.ts", "v_processing": "v_processing.ts", "v_nationBetting": "v_nationBetting.ts", diff --git a/hwe/ts/v_history.ts b/hwe/ts/v_history.ts new file mode 100644 index 00000000..938f1a28 --- /dev/null +++ b/hwe/ts/v_history.ts @@ -0,0 +1,16 @@ +import "@scss/board.scss"; +import { createApp } from 'vue' +import PageHistory from '@/PageHistory.vue'; +import BootstrapVue3 from 'bootstrap-vue-3' +import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest'; +import { auto500px } from "./util/auto500px"; +import { htmlReady } from "./util/htmlReady"; +import { insertCustomCSS } from "./util/customCSS"; + +setAxiosXMLHttpRequest(); +auto500px(); + +htmlReady(() => { + insertCustomCSS(); +}); +createApp(PageHistory).use(BootstrapVue3).mount('#app'); \ No newline at end of file diff --git a/hwe/v_history.php b/hwe/v_history.php new file mode 100644 index 00000000..5c937d5f --- /dev/null +++ b/hwe/v_history.php @@ -0,0 +1,55 @@ +setReadOnly(); +$userID = Session::getUserID(); + +$db = DB::db(); +$gameStor = KVStorage::getStorage($db, 'game_env'); + +$serverID = Util::getReq('serverID', 'string', null); +if (!$serverID) { + $serverID = UniqueConst::$serverID; +} + +[$f_year, $f_month] = $db->queryFirstList('SELECT year, month FROM ng_history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', $serverID); +[$l_year, $l_month] = $db->queryFirstList('SELECT year, month FROM ng_history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', $serverID); +[$currentYear, $currentMonth] = $gameStor->getValuesAsArray(['year', 'month']); + +$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner = %i', $userID); + +?> + + + + + <?= UniqueConst::$serverName ?>:연감 + + + + + [ + 'fisrtYearMonth' => Util::joinYearMonth($f_year, $f_month), + 'lastYearMonth' => Util::joinYearMonth($l_year, $l_month), + 'currentYearMonth' => Util::joinYearMonth($currentYear, $currentMonth), + 'serverNick' => DB::prefix(), + 'serverID' => UniqueConst::$serverID, + ], + 'query' => [ + 'serverID' => $serverID, + 'yearMonth' => Util::getReq('yearMonth', 'int'), + ], + ]) ?> + + + + +
+ + + \ No newline at end of file