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(){