99 lines
2.9 KiB
JavaScript
99 lines
2.9 KiB
JavaScript
// FG URL 선언
|
|
var fg_manager_url = "/firstgarden/manager";
|
|
|
|
// AJAX 요청을 보내서 중복 여부를 확인하는 등의 작업을 수행합니다.
|
|
function checkDupAnnuNo(value) {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: fg_manager_url + "/lib/ajax.check_duplicate.php",
|
|
data: "mode=annuno&value="+value,
|
|
success: function(req){
|
|
if (req != 0) {
|
|
var msg = "<font color='red'>사용중인 회원번호입니다.</font>";
|
|
$('#add_submit').prop("disabled", true);
|
|
} else {
|
|
var msg = "사용가능한 번호입니다.";
|
|
$('#add_submit').prop("disabled", false);
|
|
}
|
|
$("#duplicate-no-warning").hide().html(msg).fadeIn(100);
|
|
}});
|
|
}
|
|
function checkDupAnnuTel(value) {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: fg_manager_url + "/lib/ajax.check_duplicate.php",
|
|
data: "mode=annutel&value="+value,
|
|
success: function(req){
|
|
if (req != 0) {
|
|
var msg = "<font color='red'>동일한 연락처가 이미 있습니다.</font>";
|
|
$('#add_submit').prop("disabled", true);
|
|
} else {
|
|
var msg = "사용가능한 번호입니다.";
|
|
$('#add_submit').prop("disabled", false);
|
|
}
|
|
$("#duplicate-tel-warning").hide().html(msg).fadeIn(100);
|
|
}});
|
|
}
|
|
function checkDupTel(value,mode) {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: fg_manager_url + "/lib/ajax.check_duplicate.php",
|
|
data: "mode=vip_tel&value="+value,
|
|
success: function(req){
|
|
if (req != 0) {
|
|
var msg = "<font color='red'>동일한 연락처가 이미 있습니다.</font>";
|
|
$('#add_submit').prop("disabled", true);
|
|
} else {
|
|
var msg = "사용가능한 번호입니다.";
|
|
$('#add_submit').prop("disabled", false);
|
|
}
|
|
$("#duplicate-tel-warning").hide().html(msg).fadeIn(100);
|
|
}});
|
|
}
|
|
function checkDupNo(value) {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: fg_manager_url + "/lib/ajax.check_duplicate.php",
|
|
data: "mode=vip_card_no&value="+value,
|
|
success: function(req){
|
|
if (req != 0) {
|
|
var msg = "<font color='red'>사용중인 카드번호입니다.</font>";
|
|
$('#add_submit').prop("disabled", true);
|
|
} else {
|
|
var msg = "사용가능한 카드입니다.";
|
|
$('#add_submit').prop("disabled", false);
|
|
}
|
|
$("#duplicate-no-warning").hide().html(msg).fadeIn(100);
|
|
}});
|
|
}
|
|
function checkDupRc(value) {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: fg_manager_url + "/lib/ajax.check_duplicate.php",
|
|
data: "mode=rc_no&value="+value,
|
|
success: function(req){
|
|
if (req != 0) {
|
|
var msg = "<font color='red'>사용중인 카드번호입니다.</font>";
|
|
$('#renew_submit').prop("disabled", true);
|
|
} else {
|
|
var msg = "사용가능한 카드입니다.";
|
|
$('#renew_submit').prop("disabled", false);
|
|
}
|
|
$("#duplicate-rc-warning").hide().html(msg).fadeIn(100);
|
|
}});
|
|
}
|
|
function checkDupID(value) {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: fg_manager_url + "/lib/ajax.check_duplicate.php",
|
|
data: "mode=idchk&value="+value,
|
|
success: function(req){
|
|
if (req != 0) {
|
|
var msg = "<font color='red'>동일한 ID가 이미 있습니다.</font>";
|
|
} else {
|
|
var msg = "사용가능한 ID입니다.";
|
|
}
|
|
$("#duplicate-id-warning").hide().html(msg).fadeIn(100);
|
|
}});
|
|
}
|