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;
}