From 1b814abf0b189cc31933ff13c9e6014b0f46cd3f Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 26 Jun 2018 23:01:43 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=9C=ED=86=B5=20=EC=8B=9C=20=EC=99=95?= =?UTF-8?q?=EC=A1=B0=20=EC=9D=BC=EB=9E=8C=EC=9A=A9=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=EC=97=90=20server=5Fid=20=EA=B8=B0=EB=A1=9D.=20?= =?UTF-8?q?=EC=97=B0=EA=B0=90=EC=97=90=20server=5Fid=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EC=A0=84=20=EC=97=B0=EA=B0=90=20=EC=A1=B0=ED=9A=8C=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/a_history.php | 15 ++++++++++----- hwe/func_gamerule.php | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hwe/a_history.php b/hwe/a_history.php index 72e127ba..f9416cc3 100644 --- a/hwe/a_history.php +++ b/hwe/a_history.php @@ -5,6 +5,7 @@ include "lib.php"; include "func.php"; $btn = Util::getReq('btn'); $yearmonth = Util::getReq('yearmonth', 'int'); +$serverID = Util::getReq('server_id', 'string', null); extractMissingPostToGlobals(); @@ -30,10 +31,14 @@ if ($con >= 2) { exit(); } -[$s_year, $s_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', UniqueConst::$serverID); +if(!$serverID){ + $serverID = UniqueConst::$serverID; +} + +[$s_year, $s_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', $serverID); $s = $s_year * 12 + $s_month; -[$e_year, $e_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', UniqueConst::$serverID); +[$e_year, $e_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', $serverID); $e = $e_year * 12 + $e_month; //FIXME: $yearmonth가 올바르지 않을 경우에 처리가 필요. @@ -94,7 +99,7 @@ if ($month <= 0) { @@ -144,7 +149,7 @@ $history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM hist