From 28953ae1d9dc59b0ab1770eca8babb405180ffc2 Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 18 Feb 2022 10:55:25 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=86=A0=EB=84=88=EB=A8=BC=ED=8A=B8=20?= =?UTF-8?q?=EC=B0=B8=EA=B0=80=20=EC=8B=9C=EC=A0=90=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=83=9D=EC=A1=B4=EC=97=AC=EB=B6=80=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/c_tournament.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hwe/c_tournament.php b/hwe/c_tournament.php index dcd79538..44d1410d 100644 --- a/hwe/c_tournament.php +++ b/hwe/c_tournament.php @@ -15,7 +15,7 @@ $sel = Util::getPost('sel', 'int'); $trig = Util::getPost('trig', 'int'); //로그인 검사 -$session = Session::requireGameLogin()->setReadOnly(); +$session = Session::requireGameLogin(); $userID = Session::getUserID(); $db = DB::db(); @@ -24,7 +24,11 @@ $gameStor = KVStorage::getStorage($db, 'game_env'); $admin = $gameStor->getValues(['tournament','phase','tnmt_type','develcost']); $me = $db->queryFirstRow('SELECT no,name,tournament from general where owner=%i',$userID); - +if(!$me){ + $session->logoutGame(); + header('location:b_tournament.php'); + exit(1); +} switch($admin['tnmt_type']) { case 0: $tp = "total"; $tp2 = "전력전"; $tp3 = "leadership+strength+intel"; break; case 1: $tp = "leadership"; $tp2 = "통솔전"; $tp3 = "leadership"; break; @@ -40,6 +44,10 @@ if($btn == '참가') { } $general = $db->queryFirstRow('SELECT no,name,npc,leadership,strength,intel,explevel,gold,horse,weapon,book FROM general WHERE `no`=%i', $me['no']); + if(!$general){ + header('location:b_tournament.php'); + exit(1); + } //{$admin['develcost']}원 참가비 if($general['gold'] < $admin['develcost']) {