상품코드에 _ 추가

This commit is contained in:
chicpro
2013-05-14 09:32:48 +09:00
parent ea58637d61
commit 17ac326656
4 changed files with 8 additions and 8 deletions

View File

@ -34,9 +34,9 @@ include_once(G4_PATH.'/head.sub.php');
function _copy(link) function _copy(link)
{ {
var new_it_id = document.getElementById('new_it_id').value; var new_it_id = document.getElementById('new_it_id').value;
var t_it_id = new_it_id.replace(/[A-Za-z0-9\-]/g, ""); var t_it_id = new_it_id.replace(/[A-Za-z0-9\-_]/g, "");
if(t_it_id.length > 0) { if(t_it_id.length > 0) {
alert("상품코드는 영문자, 숫자, - 만 사용할 수 있습니다."); alert("상품코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.");
return false; return false;
} }
opener.parent.location.href = encodeURI(link+'&new_it_id='+new_it_id); opener.parent.location.href = encodeURI(link+'&new_it_id='+new_it_id);

View File

@ -10,9 +10,9 @@ if ($is_admin != "super")
if (!trim($it_id)) if (!trim($it_id))
alert("복사할 상품코드가 없습니다."); alert("복사할 상품코드가 없습니다.");
$t_it_id = preg_replace("/[A-Za-z0-9\-]/", "", $new_it_id); $t_it_id = preg_replace("/[A-Za-z0-9\-_]/", "", $new_it_id);
if($t_it_id) if($t_it_id)
alert("상품코드는 영문자, 숫자, - 만 사용할 수 있습니다."); alert("상품코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.");
$row = sql_fetch(" select count(*) as cnt from {$g4['shop_item_table']} where it_id = '$new_it_id' "); $row = sql_fetch(" select count(*) as cnt from {$g4['shop_item_table']} where it_id = '$new_it_id' ");
if ($row['cnt']) if ($row['cnt'])

View File

@ -986,9 +986,9 @@ function codedupcheck(id)
return; return;
} }
var it_id = id.replace(/[A-Za-z0-9\-]/g, ""); var it_id = id.replace(/[A-Za-z0-9\-_]/g, "");
if(it_id.length > 0) { if(it_id.length > 0) {
alert("상품코드는 영문자, 숫자, - 만 사용할 수 있습니다."); alert("상품코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.");
return false; return false;
} }

View File

@ -289,9 +289,9 @@ if ($w == "")
alert('상품 코드가 없으므로 상품을 추가하실 수 없습니다.'); alert('상품 코드가 없으므로 상품을 추가하실 수 없습니다.');
} }
$t_it_id = preg_replace("/[A-Za-z0-9\-]/", "", $it_id); $t_it_id = preg_replace("/[A-Za-z0-9\-_]/", "", $it_id);
if($t_it_id) if($t_it_id)
alert('상품 코드는 영문자, 숫자, - 만 사용할 수 있습니다.'); alert('상품 코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.');
$sql = " insert {$g4['shop_item_table']} $sql = " insert {$g4['shop_item_table']}
set it_id = '$it_id', set it_id = '$it_id',