From a3dc2506980faa0209f9d28e8a26a44b4403a3c9 Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 29 Oct 2018 02:39:23 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B8=80=EC=9E=90=20=EB=84=88=EB=B9=84?= =?UTF-8?q?=EB=A5=BC=20=EB=B0=98=EA=B0=81=2018=EC=9E=90=EA=B9=8C=EC=A7=80?= =?UTF-8?q?=20=ED=99=95=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/b_troop.php | 2 +- hwe/c_troop.php | 5 +++ hwe/j_set_general_command.php | 4 +- hwe/join.php | 2 +- hwe/join_post.php | 6 +-- hwe/js/common.js | 54 ++++++++++++++++++++++++++ hwe/js/join.js | 17 ++++++++ hwe/processing.php | 4 +- hwe/sammo/Command/General/che_건국.php | 20 +++++++++- js/common.js | 53 +++++++++++++++++++++++++ js/install.js | 9 ++++- js/join.js | 8 +++- oauth_kakao/lib.join.php | 4 +- 13 files changed, 174 insertions(+), 14 deletions(-) diff --git a/hwe/b_troop.php b/hwe/b_troop.php index 095a90c4..b3040501 100644 --- a/hwe/b_troop.php +++ b/hwe/b_troop.php @@ -196,7 +196,7 @@ foreach ($troops as $troopNo=>$troop) { - + diff --git a/hwe/c_troop.php b/hwe/c_troop.php index 1cb77c25..8efeb362 100644 --- a/hwe/c_troop.php +++ b/hwe/c_troop.php @@ -19,6 +19,11 @@ $db = DB::db(); $me = $db->queryFirstRow('SELECT `no`, nation, troop FROM general WHERE `owner`=%i', $userID); + +if($name && mb_strwidth($name) > 18){ + $name = mb_strimwidth($name, 0, 18); +} + $name = trim($name); if($btn == "부 대 창 설" && $name != "" && $me['troop'] == 0) { $db->insert('troop',[ diff --git a/hwe/j_set_general_command.php b/hwe/j_set_general_command.php index 52dbcc90..8758b8cb 100644 --- a/hwe/j_set_general_command.php +++ b/hwe/j_set_general_command.php @@ -38,8 +38,8 @@ $defaultCheck = [ 'integerArray'=>[ 'destNationIDList', 'destGeneralIDList' ], - 'lengthBetween'=>[ - ['nationName', 1, 9] + 'stringWidthBetween'=>[ + ['nationName', 1, 18] ] ]; diff --git a/hwe/join.php b/hwe/join.php index e74a09b9..68e2c861 100644 --- a/hwe/join.php +++ b/hwe/join.php @@ -92,7 +92,7 @@ echo getInvitationList($nationList); rule('lengthBetween', 'name', 1, 9) +->rule('stringWidthBetween', 'name', 1, 18) ->rule('min', [ 'leader', 'power', @@ -98,14 +98,14 @@ if ($gameStor->maxgeneral <= $gencount) { "); exit; } -if (mb_strlen($name) < 1) { +if ($name == '') { echo(""); exit; } -if (mb_strlen($name) > 9) { +if (mb_strwidth($name) > 18) { echo("
부 대 명
장수명 - >(9글자 이내) + (전각 9글자, 반각 18글자 이내)