국방,임관권유문을 KVStorage로 분리
This commit is contained in:
+8
-4
@@ -9,14 +9,14 @@ $userID = Session::getUserID();
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
$nationStor = KVStorage::getStorage($db, 'nation_env');
|
||||
|
||||
increaseRefresh("내무부", 1);
|
||||
|
||||
$me = $db->queryFirstRow('SELECT no, nation, officer_level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID);
|
||||
|
||||
$nationID = $me['nation'];
|
||||
$nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,rate,scout,war,secretlimit,msg,scoutmsg,capital FROM nation WHERE nation = %i', $nationID);
|
||||
$nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,rate,scout,war,secretlimit,capital FROM nation WHERE nation = %i', $nationID);
|
||||
|
||||
$con = checkLimit($me['con']);
|
||||
if ($con >= 2) {
|
||||
@@ -42,6 +42,10 @@ if ($me['officer_level'] >= 5) {
|
||||
$read = "readonly";
|
||||
}
|
||||
|
||||
$noticeKey = "nation_notice_{$nationID}";
|
||||
$scoutKey = "nation_scout_msg_{$nationID}";
|
||||
$nationStor->cacheValues([$noticeKey, $scoutKey]);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -52,8 +56,8 @@ if ($me['officer_level'] >= 5) {
|
||||
<title><?=UniqueConst::$serverName?>: 내무부</title>
|
||||
<script>
|
||||
var editable = <?=(($me['officer_level']>=5||$permission==4)?'true':'false')?>;
|
||||
var nationMsg = <?=Json::encode($nation['msg']??'')?>;
|
||||
var scoutmsg = <?=Json::encode($nation['scoutmsg']??'')?>;
|
||||
var nationMsg = <?=Json::encode($nationStor->{$noticeKey}??'')?>;
|
||||
var scoutmsg = <?=Json::encode($nationStor->{$scoutKey}??'')?>;
|
||||
</script>
|
||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||
|
||||
Reference in New Issue
Block a user