From f8635eb4d6b33f56e4c89d4b26be6aecdc8ab88a Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 11 Mar 2013 14:40:51 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=B8=EB=93=9C=ED=8F=B0=EB=B2=88=ED=98=B8?= =?UTF-8?q?=EB=A5=BC=20=EC=9E=85=EB=A0=A5=ED=96=88=EC=9D=84=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=EC=A4=91=EB=B3=B5=EC=B2=B4=ED=81=AC=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/member_form_update.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/adm/member_form_update.php b/adm/member_form_update.php index 212e7ea82..1f33070ff 100644 --- a/adm/member_form_update.php +++ b/adm/member_form_update.php @@ -15,12 +15,35 @@ if ($member['mb_password'] != sql_password($_POST['admin_password'])) { $mb_id = mysql_real_escape_string(trim($_POST['mb_id'])); +// 핸드폰번호 체크 +$mb_hp = $_POST['mb_hp']; +if($mb_hp) { + $mb_hp = preg_replace("/[^0-9]/", "", $mb_hp); + $hp_len = strlen($mb_hp); + if($hp_len == 10) { + $mb_hp = preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "\\1-\\2-\\3", $mb_hp); + } else if($hp_len == 11) { + $mb_hp = preg_replace("/([0-9]{3})([0-9]{4})([0-9]{4})/", "\\1-\\2-\\3", $mb_hp); + } else { + alert('핸드폰번호를 올바르게 입력해 주십시오.'); + } + + // 중복체크 + $sql = " select count(*) as cnt from {$g4['member_table']} where mb_hp = '$mb_hp' "; + if($w == 'u') + $sql .= " and mb_id <> '$mb_id' "; + + $row = sql_fetch($sql); + if($row['cnt']) + alert('다른 회원이 사용 중인 핸드폰번호입니다.'); +} + $sql_common = " mb_name = '{$_POST['mb_name']}', mb_nick = '{$_POST['mb_nick']}', mb_email = '{$_POST['mb_email']}', mb_homepage = '{$_POST['mb_homepage']}', mb_tel = '{$_POST['mb_tel']}', - mb_hp = '{$_POST['mb_hp']}', + mb_hp = '$mb_hp', mb_zip1 = '{$_POST['mb_zip1']}', mb_zip2 = '{$_POST['mb_zip2']}', mb_addr1 = '{$_POST['mb_addr1']}',