From 13d2e919141552f7c6ca7a497151fd9640607cb3 Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 13 Nov 2018 19:55:40 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=AD=EB=B0=A9=20=ED=91=9C=EA=B8=B0=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/b_dipcenter.php | 16 +++++++--------- hwe/js/dipcenter.js | 11 +++++++---- 2 files changed, 14 insertions(+), 13 deletions(-) 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?>: 내무부 @@ -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){