From 4ea6e90600aba519a803ed8e4cc5414ff73a53c6 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 22 Jul 2018 03:37:14 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=B0=EA=B0=90=EC=97=90=20serverID=EA=B0=80?= =?UTF-8?q?=20=EC=9E=98=EB=AA=BB=EB=90=9C=20=EA=B2=BD=EC=9A=B0=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/a_history.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hwe/a_history.php b/hwe/a_history.php index 78d20a84..7f8d7a0a 100644 --- a/hwe/a_history.php +++ b/hwe/a_history.php @@ -15,7 +15,6 @@ $userID = Session::getUserID(); $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); -$connect=$db->get(); if(!$serverID){ $serverID = UniqueConst::$serverID; @@ -27,9 +26,7 @@ if($serverID === UniqueConst::$serverID){ $admin = $gameStor->getValues(['startyear','year','month','map_theme']); -$query = "select con,turntime from general where owner='{$userID}'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); -$me = MYDB_fetch_array($result); +$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner = %i', $userID); $con = checkLimit($me['con']); if ($con >= 2) { @@ -42,6 +39,11 @@ if ($con >= 2) { [$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; +if($s_year === null){ + echo '인자 μ—λŸ¬'; + exit(); +} + [$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;