From 67fef4b73d9cefbe14665ec04dbac1fb0390a1cd Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 14 Apr 2018 00:15:54 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=84=EC=BD=98=20=EC=A0=81=EC=9A=A9=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95=20=EA=B0=B1=EC=8B=A0?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=A0=9C=EB=8C=80=EB=A1=9C=20=EC=95=88?= =?UTF-8?q?=EB=B3=B4=EC=9D=B4=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EB=B6=84=EC=9F=81=20=EC=A0=95=EB=B3=B4=20=EC=A0=9C?= =?UTF-8?q?=EB=8C=80=EB=A1=9C=20=EC=95=88=EB=B3=B4=EC=9D=B4=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/a_traffic.php | 11 ++++++----- hwe/b_diplomacy.php | 2 +- i_entrance/j_icon_change.php | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hwe/a_traffic.php b/hwe/a_traffic.php index 9c6ae8b0..5cee826b 100644 --- a/hwe/a_traffic.php +++ b/hwe/a_traffic.php @@ -13,7 +13,7 @@ $query = "select year,month,refresh,maxrefresh,maxonline from game limit 1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $game = MYDB_fetch_array($result); -$log = []; +$log = getRawFileLogRecent(__dir__.'/logs/_traffic.txt', 11, 100); $date = []; $year = []; @@ -22,8 +22,9 @@ $refresh = []; $online = []; $curonline = getOnlineNum(); -for ($i=0; $i < 11; $i++) { - $parse = explode("|", $log[count($log)-12+$i]); +$visibleLogs = min(11, count($log)); +for ($i=0; $i < $visibleLogs; $i++) { + $parse = explode("|", $log[count($log)-$visibleLogs+$i]); $date[$i] = trim($parse[0]); $year[$i] = trim($parse[1]); $month[$i] = trim($parse[2]); @@ -62,7 +63,7 @@ if ($game['maxonline'] < $curonline) { = 100) { $w -= 0.1; @@ -132,7 +133,7 @@ $dt = date('H:i');
접 속 량
= 100) { $w -= 0.1; diff --git a/hwe/b_diplomacy.php b/hwe/b_diplomacy.php index 0b166c34..00d53b2d 100644 --- a/hwe/b_diplomacy.php +++ b/hwe/b_diplomacy.php @@ -56,7 +56,7 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl $rawConflict )) { - $conflict = Json::decode($city['conflict']); + $conflict = Json::decode($rawConflict); if (count($conflict)<2) { continue; } diff --git a/i_entrance/j_icon_change.php b/i_entrance/j_icon_change.php index ddb34941..29b7303b 100644 --- a/i_entrance/j_icon_change.php +++ b/i_entrance/j_icon_change.php @@ -65,7 +65,7 @@ if(!is_uploaded_file($image['tmp_name'])) { while(true){ $newPicName = dechex(rand(0x000000f,0xfffffff)).$newExt; - $dest = AppConf::getUserIconPathFS().$newPicName; + $dest = AppConf::getUserIconPathFS().'/'.$newPicName; if(file_exists($dest)){ continue; }
접 속 자