From 9eb20840ce9bf3796dd9fe38bd795f1bb2309830 Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 9 Apr 2013 13:06:17 +0900 Subject: [PATCH] =?UTF-8?q?=ED=9C=B4=EB=8C=80=ED=8F=B0=EC=9D=B8=EC=A6=9D?= =?UTF-8?q?=20=ED=9B=84=20=ED=8F=B0=EB=84=98=EB=B2=84=20=ED=8F=AC=EB=A7=B7?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD=20=ED=9B=84=20=EC=A0=80=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/kcp/kcpcert_result.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bbs/kcp/kcpcert_result.php b/bbs/kcp/kcpcert_result.php index f32f6598b..8fbe2143b 100644 --- a/bbs/kcp/kcpcert_result.php +++ b/bbs/kcp/kcpcert_result.php @@ -153,6 +153,15 @@ else if( $cert_enc_use != "Y" ) } $ct_cert->mf_clear(); + +// 휴대폰번호 포맷변경 +$phone_no = preg_replace("/[^0-9]/", "", $phone_no); +$hp_len = strlen($phone_no); + +if($hp_len == 10) + $phone_no = preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "\\1-\\2-\\3", $phone_no); +else if($hp_len == 11) + $phone_no = preg_replace("/([0-9]{3})([0-9]{4})([0-9]{4})/", "\\1-\\2-\\3", $phone_no); ?>