diff --git a/hwe/b_dipcenter.php b/hwe/b_dipcenter.php
index 8a53b62b..4c21bd6d 100644
--- a/hwe/b_dipcenter.php
+++ b/hwe/b_dipcenter.php
@@ -13,13 +13,9 @@ $connect=$db->get();
increaseRefresh("내무부", 1);
-$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
-$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
-$me = MYDB_fetch_array($result);
+$me = $db->queryFirstRow('SELECT no, nation, level, con, turntime, belong FROM general WHERE owner=%i', $userID);
-$query = "select secretlimit from nation where nation='{$me['nation']}'";
-$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
-$nation = MYDB_fetch_array($result);
+$nation = $db->queryFirstRow('SELECT secretlimit, msg, scoutmsg FROM nation WHERE nation = %i', $me['nation']);
$con = checkLimit($me['con']);
if ($con >= 2) {
@@ -50,6 +46,8 @@ if ($me['level'] >= 5) {
=UniqueConst::$serverName?>: 내무부
=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
@@ -198,7 +196,7 @@ echo "
";
-$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,scoutmsg,secretlimit from nation where nation='{$me['nation']}'";
+$query = "select nation,name,color,type,gold,rice,bill,rate,scout,war,secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
@@ -243,7 +241,7 @@ if ($budgetricediff > 0) {
-
+
@@ -256,7 +254,7 @@ if ($budgetricediff > 0) {
870px x 200px를 넘어서는 내용은 표시되지 않습니다.
-
+
diff --git a/hwe/js/dipcenter.js b/hwe/js/dipcenter.js
index e5796b16..bcb49282 100644
--- a/hwe/js/dipcenter.js
+++ b/hwe/js/dipcenter.js
@@ -7,6 +7,7 @@ jQuery(function($){
function guiEditorInit($obj, editable){
var $submitBtn = $obj.find('.submit');
var $noticeInput = $obj.find('.input_form');
+ var globalVariableName = $noticeInput.data('global');
var $editForm = $obj.find('.edit_form');
var $cancelEdit = $obj.find('.cancel_edit');
@@ -16,7 +17,7 @@ jQuery(function($){
editMode = true;
$cancelEdit.show();
- var inputText = $noticeInput.val();
+ var inputText = window[globalVariableName];
if(!inputText || inputText == ''){
inputText = '
';
}
@@ -96,12 +97,12 @@ jQuery(function($){
editMode = false;
$editForm.summernote('destroy');
$cancelEdit.hide();
- $editForm.html($noticeInput.val()).addClass('viewer');
+ $editForm.html(window[globalVariableName]).addClass('viewer');
activeFlip($editForm);
}
$cancelEdit.hide();
- $editForm.html($noticeInput.val());
+ $editForm.html(window[globalVariableName]);
activeFlip($editForm);
if(editable){
$submitBtn.prop('disabled', false);
@@ -116,7 +117,9 @@ jQuery(function($){
enableEditor();
return false;
}
- $noticeInput.val($editForm.summernote('code'));
+ var text = $editForm.summernote('code');
+ window[globalVariableName] = text;
+ $noticeInput.val(text);
});
$cancelEdit.click(function(e){
|