From c398b55f3cb35ca9cc4217341921a5a4884ab43f Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 31 May 2018 00:46:40 +0900 Subject: [PATCH] =?UTF-8?q?=ED=84=B4=20=EB=B0=80=EB=A6=BC=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 3 +++ hwe/index.php | 11 +++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index 3fb372b4..abf0f04e 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1441,6 +1441,9 @@ function checkDelay() { $newTurntime = $turntime->add(new \DateInterval("PT{$minute}M")); $newNextTurntime = $turntime->add(new \DateInterval("PT{$term}M")); $gameStor->turntime = $newTurntime->format('Y-m-d H:i:s'); + $gameStor->starttime = (new \DateTimeImmutable($gameStor->starttime)) + ->add(new \DateInterval("PT{$minute}M")) + ->format('Y-m-d H:i:s'); $db->update('general', [ 'turntime'=> $db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute) diff --git a/hwe/index.php b/hwe/index.php index 919feaed..0e271f14 100644 --- a/hwe/index.php +++ b/hwe/index.php @@ -11,7 +11,6 @@ increaseRefresh("메인", 1); $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); -$connect=$db->get(); if (!$userID) { header('Location:..'); @@ -42,9 +41,7 @@ if ($me['newmsg'] == 1 || $me['newvote'] == 1) { $admin = $gameStor->getValues(['develcost','online','conlimit','tournament','tnmt_type','turnterm','scenario','scenario_text','extended_general','fiction','npcmode','vote']); -$query = "select plock from plock limit 1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); -$plock = MYDB_fetch_array($result); +$plock = $db->queryFirstField('SELECT plock FROM plock LIMIT 1'); $con = checkLimit($me['con']); if ($con >= 2) { @@ -136,7 +133,7 @@ $(function(){ 서버 가동중"; } else { echo "서버 동결중"; @@ -166,9 +163,7 @@ echo " "; -$query = "select no from auction"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); -$auctionCount = MYDB_num_rows($result); +$auctionCount = $db->queryFirstField('SELECT count(`no`) FROM auction'); if ($auctionCount > 0) { echo "{$auctionCount}건 거래 진행중"; } else {