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; - } -} -?> - - - - - <?= $serverName ?>: 메인 - - - - - - - - - - - $serverName, - 'serverCnt' => $serverCnt, - 'serverNick' => DB::prefix(), - 'serverID' => UniqueConst::$serverID, - 'maxTurn' => GameConst::$maxTurn, - 'maxPushTurn' => 12, - 'serverNow' => TimeUtil::now(false), - 'lastExecuted' => $gameStor->turntime, - 'isLocked' => $plock, - 'isTournamentActive' => $isTournamentActive, - 'isBettingActive' => $isBettingActive, - 'staticValues' => [ - 'serverName' => $serverName, - 'serverCnt' => $serverCnt, - 'serverNick' => DB::prefix(), - 'serverID' => UniqueConst::$serverID, - 'maxTurn' => GameConst::$maxTurn, - 'maxPushTurn' => 12, - 'serverNow' => TimeUtil::now(false), - 'lastExecuted' => $gameStor->turntime, - 'isLocked' => $plock, - 'isTournamentActive' => $isTournamentActive, - 'isBettingActive' => $isBettingActive, - 'mapName' => GameConst::$mapName, - 'unitSet' => GameConst::$unitSet, - ] - ]) ?> - - - - -
-
-
npcmode == 1) ?>
-
-
-
-

삼국지 모의전투 HiDCHe ()

-
- -
-
- -
-
- NPC 수, 상성 : , -
-
- NPC선택 : -
-
- 토너먼트 : turnterm) ?> -
-
- 기타 설정: -
- -
-
전체 접속자 수 : online_user_cnt ?> 명
-
턴당 갱신횟수 : refreshLimit ?>회
-
-
- - ↑tnmt_type] ?? '' ?> tournament) ?> ↑ - - 현재 토너먼트 경기 없음 - -
-
-
동작 시각: " . substr($gameStor->turntime, 5, 14) . "") : ("동작 시각: " . substr($gameStor->turntime, 5, 14) . "") ?>
-
-
- 0) : ?> - 거래 진행중 - - 진행중 거래 없음 - -
-
- - - 진행중 설문 없음 - - 설문 진행중 : title ?> - -
-
-
-
접속중인 국가: online_nation ?>
-
-
-
운영자 메세지 : msg ?>
-
-
-
-
【 국가방침 】
-
-
-
-
-
-
-
- 【 접속자 】 -
-
- userGrade >= 5) : ?> - - userGrade == 4) : ?> -
-
- -
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
장수 동향
-
-
-
-
개인 기록
-
-
-
-
중원 정세
-
-
-
-
-
npcmode == 1) ?>
- -
-
-
- -
-
- -
-
-
-
-
전체 메시지(최고99자)
-
-
-
-
-
-
국가 메시지(최고99자)
-
-
-
-
-
-
개인 메시지(최고99자)
-
-
-
-
-
-
외교 메시지(최고99자)
-
-
-
-
-
-
-
npcmode == 1) ?>
-
-
- develcost * 5; - MessageBox("설문조사에 참여하시면 금{$develcost}과 유니크템을 드립니다! (우측 상단 설문조사 메뉴)"); - } - ?> -
- - - - \ No newline at end of file diff --git a/hwe/sammo/API/Global/GeneralList.php b/hwe/sammo/API/Global/GeneralList.php index 897159fa..1b5ca061 100644 --- a/hwe/sammo/API/Global/GeneralList.php +++ b/hwe/sammo/API/Global/GeneralList.php @@ -54,7 +54,7 @@ class GeneralList extends \sammo\BaseAPI $availableNextCall = $session->availableNextCallGetGeneralList ?? '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) { return "장수 리스트는 10초에 한번 갱신 가능합니다.\n다음 시간 : " . $availableNextCall; } diff --git a/i_entrance/j_get_user_info.php b/i_entrance/j_get_user_info.php index 5a48dc77..24d3f3fe 100644 --- a/i_entrance/j_get_user_info.php +++ b/i_entrance/j_get_user_info.php @@ -32,10 +32,12 @@ else{ $tokenValidUntil = $member['token_valid_until']; -if($member['grade'] == 6) { - $grade = '운영자'; +if($member['grade'] == 7) { + $grade = '최고운영자'; +} elseif($member['grade'] == 6) { + $grade = '부운영자(시스템)'; } elseif($member['grade'] == 5) { - $grade = '부운영자'; + $grade = '부운영자(유저)'; } elseif($member['grade'] > 1) { $grade = '특별회원'; } elseif($member['grade'] == 1) { diff --git a/i_entrance/j_set_userlist.php b/i_entrance/j_set_userlist.php index a600d0e6..02060919 100644 --- a/i_entrance/j_set_userlist.php +++ b/i_entrance/j_set_userlist.php @@ -7,7 +7,7 @@ WebUtil::requireAJAX(); $session = Session::requireLogin([])->setReadOnly(); -if($session->userGrade < 5){ +if($session->userGrade < 6){ Json::die([ 'result'=>false, 'reason'=>'운영자 권한이 없습니다.' diff --git a/j_updateServer.php b/j_updateServer.php index 394128c6..3d0ad1c6 100644 --- a/j_updateServer.php +++ b/j_updateServer.php @@ -202,7 +202,7 @@ $target = Util::getPost('target'); $server = basename($request['server']); $settingBasePath = __DIR__ . "/{$server}/d_setting/"; $allowFullUpdate = in_array('fullUpdate', $session->acl[$server] ?? []); -$allowFullUpdate |= $session->userGrade >= 6; +$allowFullUpdate |= $session->userGrade >= 7; $allowUpdate = in_array('update', $session->acl[$server] ?? []); $allowUpdate |= $session->userGrade >= 5;