diff --git a/f_install/j_create_admin.php b/f_install/j_create_admin.php index 95810503..32e3cc25 100644 --- a/f_install/j_create_admin.php +++ b/f_install/j_create_admin.php @@ -56,7 +56,7 @@ $rootDB->insert('member', [ 'token_valid_until' => '2999-01-01 00:00:00', 'pw' => $finalPassword, 'salt' => $userSalt, - 'grade' => 6, + 'grade' => 7, 'name' => $nickname, 'reg_date' => $nowDate ]); diff --git a/hwe/_admin1.php b/hwe/_admin1.php index 4a3af3d2..069a5ab9 100644 --- a/hwe/_admin1.php +++ b/hwe/_admin1.php @@ -6,7 +6,7 @@ include "func.php"; //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); -if($session->userGrade < 5) { +if($session->userGrade < 6) { die(requireAdminPermissionHTML()); } diff --git a/hwe/_admin1_submit.php b/hwe/_admin1_submit.php index 38d27ad4..48e66e6a 100644 --- a/hwe/_admin1_submit.php +++ b/hwe/_admin1_submit.php @@ -6,7 +6,7 @@ include "func.php"; //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); -if ($session->userGrade < 5) { +if ($session->userGrade < 6) { header('location:_admin1.php'); die(); } diff --git a/hwe/_admin2.php b/hwe/_admin2.php index 210eefb5..98050b1d 100644 --- a/hwe/_admin2.php +++ b/hwe/_admin2.php @@ -7,7 +7,7 @@ include "func.php"; //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); -if ($session->userGrade < 5) { +if ($session->userGrade < 6) { die(requireAdminPermissionHTML()); } diff --git a/hwe/_admin2_submit.php b/hwe/_admin2_submit.php index 1f946345..54d63b35 100644 --- a/hwe/_admin2_submit.php +++ b/hwe/_admin2_submit.php @@ -15,7 +15,7 @@ $msg = Util::getPost('msg', 'string'); //로그인 검사 $session = Session::requireLogin()->loginGame()->setReadOnly(); -if ($session->userGrade < 5) { +if ($session->userGrade < 6) { header('location:_admin2.php'); } diff --git a/hwe/_admin5.php b/hwe/_admin5.php index 7fcf7c5f..94d1b801 100644 --- a/hwe/_admin5.php +++ b/hwe/_admin5.php @@ -20,7 +20,7 @@ if ($type2 < 0 || $type2 > 6) { //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); -if ($session->userGrade < 5) { +if ($session->userGrade < 6) { die(requireAdminPermissionHTML()); } diff --git a/hwe/_admin5_submit.php b/hwe/_admin5_submit.php index 976e8359..d32c8493 100644 --- a/hwe/_admin5_submit.php +++ b/hwe/_admin5_submit.php @@ -12,7 +12,7 @@ $nation = Util::getPost('nation', 'int'); $session = Session::requireGameLogin()->setReadOnly(); $userID = Session::getUserID(); -if ($session->userGrade < 5) { +if ($session->userGrade < 6) { header('location:_admin5.php'); die(); } diff --git a/hwe/_admin7.php b/hwe/_admin7.php index f62cad85..e44f1ec7 100644 --- a/hwe/_admin7.php +++ b/hwe/_admin7.php @@ -37,7 +37,7 @@ if ($reqQueryType === null || !key_exists($reqQueryType, $queryMap)) { //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); -if ($session->userGrade < 5) { +if ($session->userGrade < 6) { die(requireAdminPermissionHTML()); } diff --git a/hwe/_admin8.php b/hwe/_admin8.php index e198ea11..a70018b4 100644 --- a/hwe/_admin8.php +++ b/hwe/_admin8.php @@ -12,7 +12,7 @@ $type = 0; //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); -if ($session->userGrade < 5) { +if ($session->userGrade < 6) { die(requireAdminPermissionHTML()); } diff --git a/hwe/_admin_force_rehall.php b/hwe/_admin_force_rehall.php index 3f64f3ac..d3d24756 100644 --- a/hwe/_admin_force_rehall.php +++ b/hwe/_admin_force_rehall.php @@ -7,7 +7,7 @@ include "func.php"; //로그인 검사 $session = Session::requireGameLogin()->setReadOnly(); -if ($session->userGrade < 5) { +if ($session->userGrade < 6) { die('권한 부족'); } diff --git a/hwe/b_currentCity.php b/hwe/b_currentCity.php index 4762892c..8df28d80 100644 --- a/hwe/b_currentCity.php +++ b/hwe/b_currentCity.php @@ -177,7 +177,7 @@ $templates = new \League\Plates\Engine('templates'); $valid = 1; } - if ($userGrade >= 5) { + if ($userGrade >= 6) { $valid = true; $showDetailedInfo = true; } @@ -275,7 +275,7 @@ $templates = new \League\Plates\Engine('templates'); $ourGeneral = false; } - if ($userGrade == 6) { + if ($userGrade == 7) { $ourGeneral = true; } diff --git a/hwe/func.php b/hwe/func.php index c8830a5b..e7ea5903 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -112,7 +112,7 @@ function GetImageURL($imgsvr, $filepath = '') function checkLimit($refreshScore = null) { $session = Session::getInstance(); - if ($session->userGrade >= 4) { + if ($session->userGrade >= 6) { return 0; } @@ -1009,7 +1009,7 @@ function increaseRefresh($type = "", $cnt = 1) $isunited = $gameStor->isunited; $opentime = $gameStor->opentime; - if ($userGrade == 6) { + if ($userGrade >= 6) { return; } if ($isunited == 2) { diff --git a/hwe/install_db.php b/hwe/install_db.php index 11600615..4c70e053 100644 --- a/hwe/install_db.php +++ b/hwe/install_db.php @@ -7,10 +7,10 @@ include "func.php"; $session = Session::requireLogin(); -if ($session->userGrade < 5) { +if ($session->userGrade < 6) { die('관리자 아님'); } -if ($session->userGrade == 5) { +if ($session->userGrade == 6) { die('DB 리셋 권한을 가지고 있지 않습니다.'); } diff --git a/hwe/j_get_city_list.php b/hwe/j_get_city_list.php index fe3d9777..992f8672 100644 --- a/hwe/j_get_city_list.php +++ b/hwe/j_get_city_list.php @@ -18,7 +18,7 @@ else{ $availableNextCall = $session->availableNextCallGetCityList??'2000-01-01 00:00:00'; $now = new \DateTimeImmutable(); - if($now <= new \DateTimeImmutable($availableNextCall) && $session->userGrade < 5){ + if($now <= new \DateTimeImmutable($availableNextCall) && $session->userGrade < 6){ Json::die([ 'result'=>false, 'reason'=>"도시 목록은 10초에 한번 갱신 가능합니다.\n다음 시간 : ".$availableNextCall diff --git a/hwe/j_raise_event.php b/hwe/j_raise_event.php index cfa22499..e6502b19 100644 --- a/hwe/j_raise_event.php +++ b/hwe/j_raise_event.php @@ -8,7 +8,7 @@ include('func.php'); $session = Session::requireLogin([])->setReadOnly(); -if(Session::getInstance()->userGrade < 5){ +if(Session::getInstance()->userGrade < 6){ Json::die([ 'reason'=>'권한이 부족합니다.' ]); diff --git a/hwe/old_index.php b/hwe/old_index.php deleted file mode 100644 index ff91e1aa..00000000 --- a/hwe/old_index.php +++ /dev/null @@ -1,430 +0,0 @@ -loginGame()->setReadOnly(); -$userID = Session::getUserID(); - -increaseRefresh("메인", 1); - -$db = DB::db(); -$gameStor = KVStorage::getStorage($db, 'game_env'); - -if (!$userID) { - header('Location:..'); - die(); -} - -//턴 실행. -TurnExecutionHelper::executeAllCommand(); - -if (!$session->isGameLoggedIn()) { - header('Location:..'); - die(); -} - -$me = $db->queryFirstRow( - 'SELECT no,refresh_score,turntime,newmsg,newvote,`officer_level` FROM `general` - LEFT JOIN general_access_log AS l ON `general`.no = l.general_id WHERE owner = %i', - $userID -); - -//그새 사망이면 -if ($me === null) { - $session->logoutGame(); - header('Location: ../'); - die(); -} - -$gameStor->cacheAll(true); - -if ($me['newmsg'] == 1 || $me['newvote'] == 1) { - $db->update('general', [ - 'newmsg' => 0, - 'newvote' => 0 - ], 'owner=%i', $userID); -} - -$plock = boolval($db->queryFirstField('SELECT plock FROM plock WHERE `type`="GAME" LIMIT 1')); - -$limitState = checkLimit($me['refresh_score']); -if ($limitState >= 2) { - printLimitMsg($me['turntime']); - exit(); -} - -$generalObj = General::createObjFromDB($me['no'], null, GeneralQueryMode::FullWithAccessLog); -$generalObj->setRawCity($db->queryFirstRow('SELECT * FROM city WHERE city = %i', $generalObj->getCityID())); -$scenario = $gameStor->scenario_text; - -$nationID = $generalObj->getNationID(); -if ($nationID) { - $nationStor = KVStorage::getStorage($db, $nationID, 'nation_env'); - $nationStor->cacheAll(); -} - -if ($gameStor->extended_general == 0) { - $extend = "표준"; -} else { - $extend = "확장"; -} -if ($gameStor->fiction == 0) { - $fiction = "사실"; -} else { - $fiction = "가상"; -} -if ($gameStor->npcmode == 0) { - $npcmode = "불가능"; -} else if ($gameStor->npcmode == 1) { - $npcmode = "가능"; -} else { - $npcmode = "선택 생성"; -} -$color = "cyan"; -$serverName = UniqueConst::$serverName; -$serverCnt = $gameStor->server_cnt; - -$auctionCount = $db->queryFirstField('SELECT count(*) FROM ng_auction WHERE finished = 0'); -$isTournamentActive = $gameStor->tournament > 0; -$isTournamentApplicationOpen = $gameStor->tournament == 1; -$isBettingActive = $gameStor->tournament == 6; - -$myNationStatic = getNationStaticInfo($generalObj->getNationID()); -$nationColorType = substr($myNationStatic['color'] ?? '#000000', 1); - -$autorunUser = ($gameStor->autorun_user) ?? []; -$otherTextInfo = []; - -if ($gameStor->join_mode == 'onlyRandom') { - $otherTextInfo[] = '랜덤 임관 전용'; -} -if ($autorunUser['limit_minutes'] ?? false) { - $otherTextInfo[] = getAutorunInfo($autorunUser); -} - -if (!$otherTextInfo) { - $otherTextInfo = '표준'; -} else { - $otherTextInfo = join(', ', $otherTextInfo); -} - -$lastVoteID = $gameStor->lastVote; -$lastVote = null; -if ($lastVoteID) { - $voteStor = KVStorage::getStorage($db, 'vote'); - $lastVote = VoteInfo::fromArray($voteStor->getValue("vote_{$lastVoteID}")); - if ($lastVote->endDate && $lastVote->endDate < TimeUtil::now()) { - $lastVote = null; - } -} -?> - - - -
-