function loginCheck() { var id = $("#userid").val(); var passwd = $("#passwd").val(); if(id=="" ) { $("#alertMsg").html("아이디를 입력해 주세요"); $('#myModal').modal('show'); return; } if(passwd=="") { $("#alertMsg").html("비밀번호를 입력해 주세요"); $('#myModal').modal('show'); return; } var ajaxdata = "type=login&id="+id+"&passwd="+passwd; $.ajax({ type: "POST", url: "/mobile/module/loginproc.php", data: ajaxdata, dataType: "xml", cache: true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); if(result=="SUCCESS") { $(location).attr("href", "/mobile"); } else { $("#alertMsg").html(msg); $('#myModal').modal('show'); return; } }, error: function(e) { $("#alertMsg").html("로그인이 실패하였습니다. 잠시후 다시 시도해 주세요."); $('#myModal').modal('show'); return; } }); } function memberLogout() { var ajaxdata = "type=logout"; $.ajax({ type: "POST", url: "/mobile/module/loginproc.php", data: ajaxdata, dataType: "xml", cache: true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); if(result=="SUCCESS") { $(location).attr("href", "/mobile"); } else { $("#alertMsg").html(msg); $('#myModal').modal('show'); return; } }, error: function(e) { $("#alertMsg").html("로그아웃이 실패하였습니다. 잠시후 다시 시도해 주세요."); $('#myModal').modal('show'); return; } }); } function adminLoginCheck() { var id = $("#userid").val(); var passwd = $("#passwd").val(); if(id=="" ) { $("#alertMsg").html("아이디를 입력해 주세요"); $('#myModal').modal('show'); return; } if(passwd=="") { $("#alertMsg").html("비밀번호를 입력해 주세요"); $('#myModal').modal('show'); return; } var ajaxdata = "type=login&mem_id="+id+"&mem_pw="+passwd; $.ajax({ type: "POST", url: "/mobile/module/admin_loginproc.php", data: ajaxdata, dataType: "xml", cache: true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); if(result=="SUCCESS") { $(location).attr("href", "/mobile/admin.php"); } else { $("#alertMsg").html(msg); $('#myModal').modal('show'); return; } }, error: function(e) { $("#alertMsg").html("로그인이 실패하였습니다. 잠시후 다시 시도해 주세요."); $('#myModal').modal('show'); return; } }); } function managerLogout() { var ajaxdata = "type=logout"; $.ajax({ type: "POST", url: "/mobile/module/admin_logout.php", data: ajaxdata, dataType: "xml", cache: true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); if(result=="SUCCESS") { $(location).attr("href", "/mobile/admin_login.php"); } else { $("#alertMsg").html(msg); $('#myModal').modal('show'); return; } }, error: function(e) { $("#alertMsg").html("로그아웃이 실패하였습니다. 잠시후 다시 시도해 주세요."); $('#myModal').modal('show'); return; } }); } function productNewMore() { var gotopage = parseInt($("#productNewItemPage").val()); var ajaxdata = "gotopage="+gotopage; var listtype = getCookie("listtype"); $.ajax({ type:"POST", url:"/mobile/module/productlist_main.php", data:ajaxdata, dataType:"xml", cache:true, success: function(xml) { var xmldata = $(xml).find("data"); // 상품 리스트 출력 var list_cnt = xmldata.find("item").length; var total = xmldata.find("total").text(); var count = xmldata.find("count").text(); if(list_cnt > 0) { var x = 0; xmldata.find("item").each(function() { var productcode = $.URLDecode($(this).find("productcode").text()); var productname = $.URLDecode($(this).find("productname").text()); var minimage = $.URLDecode($(this).find("minimage").text()); var consumerprice = $(this).find("consumerprice").text(); var sellprice = $(this).find("sellprice").text(); var html = ""; if(listtype=="list") { html+= "
\r\n"; html+= "
\r\n"; html+= "
"; html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; } else { html+= "
\r\n"; html+= "
\r\n"; html+= "
"; html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; } $("#kika-main-product-new").append(html); x++; }); $("#prodlist_"+gotopage+"_"+(x-1)).load(function() { var img_h = $("#prodlist_"+gotopage+"_0").height(); if(img_h>100) { for(k=0; k 0) { var x = 0; xmldata.find("item").each(function() { var productcode = $.URLDecode($(this).find("productcode").text()); var productname = $.URLDecode($(this).find("productname").text()); var minimage = $.URLDecode($(this).find("minimage").text()); var prodimg_layer = $.URLDecode($(this).find("prodimg_layer").text()); var consumerprice = $(this).find("consumerprice").text(); var sellprice = $(this).find("sellprice").text(); var html = ""; if(listtype=="list") { html+= "
\r\n"; html+= "
\r\n"; html+= "
"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; } else { html+= "
\r\n"; html+= "
\r\n"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= "
"; html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; } $("#kika-main-product-new").append(html); x++; }); $("#prodlist_"+gotopage+"_"+(x-1)).load(function() { var img_h = $("#prodlist_"+gotopage+"_0").height(); if(img_h>100) { for(k=0; k 0) { $("#kika-product-list").html(""); var x = 0; xmldata.find("item").each(function() { var productcode = $.URLDecode($(this).find("productcode").text()); var productname = $.URLDecode($(this).find("productname").text()); var minimage = $.URLDecode($(this).find("minimage").text()); var prodimg_layer = $.URLDecode($(this).find("prodimg_layer").text()); var consumerprice = $(this).find("consumerprice").text(); var sellprice = $(this).find("sellprice").text(); var html = ""; if(listtype=="list") { html+= "
\r\n"; html+= "
\r\n"; html+= "
"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; } else { html+= "
\r\n"; html+= "
\r\n"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= "
"; html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; } $("#kika-product-list").append(html); x++; }); $("#prodlist_"+gotopage+"_"+(x-1)).load(function() { var img_h = $("#prodlist_"+gotopage+"_0").height(); for(k=0; k 0) { $("#kika-product-list").html(""); var x = 0; xmldata.find("item").each(function() { var productcode = $.URLDecode($(this).find("productcode").text()); var productname = $.URLDecode($(this).find("productname").text()); var minimage = $.URLDecode($(this).find("minimage").text()); var prodimg_layer = $.URLDecode($(this).find("prodimg_layer").text()); var consumerprice = $(this).find("consumerprice").text(); var sellprice = $(this).find("sellprice").text(); var html = ""; if(listtype=="list") { html+= "
\r\n"; html+= "
\r\n"; html+= "
"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; } else { html+= "
\r\n"; html+= "
\r\n"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= "
"; html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; } $("#kika-product-list").append(html); x++; }); $("#prodlist_"+gotopage+"_"+(x-1)).load(function() { var img_h = $("#prodlist_"+gotopage+"_0").height(); for(k=0; k 0) { $("#kika-product-list").html(""); var x = 0; xmldata.find("item").each(function() { var productcode = $.URLDecode($(this).find("productcode").text()); var productname = $.URLDecode($(this).find("productname").text()); var minimage = $.URLDecode($(this).find("minimage").text()); var prodimg_layer = $.URLDecode($(this).find("prodimg_layer").text()); var consumerprice = $(this).find("consumerprice").text(); var sellprice = $(this).find("sellprice").text(); var html = ""; if(listtype=="list") { html+= "
\r\n"; html+= "
\r\n"; html+= "
"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; } else { html+= "
\r\n"; html+= "
\r\n"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= "
"; html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; } $("#kika-product-list").append(html); x++; }); $("#prodlist_"+gotopage+"_"+(x-1)).load(function() { var img_h = $("#prodlist_"+gotopage+"_0").height(); for(k=0; k 0) { $("#kika-product-list").html(""); var x = 0; xmldata.find("item").each(function() { var productcode = $.URLDecode($(this).find("productcode").text()); var productname = $.URLDecode($(this).find("productname").text()); var minimage = $.URLDecode($(this).find("minimage").text()); var prodimg_layer = $.URLDecode($(this).find("prodimg_layer").text()); var consumerprice = $(this).find("consumerprice").text(); var sellprice = $(this).find("sellprice").text(); var html = ""; if(listtype=="list") { html+= "
\r\n"; html+= "
\r\n"; html+= "
"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; } else { html+= "
\r\n"; html+= "
\r\n"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= "
"; html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; } $("#kika-product-list").append(html); x++; }); $("#prodlist_"+gotopage+"_"+(x-1)).load(function() { var img_h = $("#prodlist_"+gotopage+"_0").height(); for(k=0; k 0) { var x = 0; xmldata.find("item").each(function() { var productcode = $.URLDecode($(this).find("productcode").text()); var productname = $.URLDecode($(this).find("productname").text()); var minimage = $.URLDecode($(this).find("minimage").text()); var prodimg_layer = $.URLDecode($(this).find("prodimg_layer").text()); var consumerprice = $(this).find("consumerprice").text(); var sellprice = $(this).find("sellprice").text(); var html = ""; if(listtype=="list") { html+= "
\r\n"; html+= "
\r\n"; html+= "
"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; } else { html+= "
\r\n"; html+= "
\r\n"; if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } html+= "
"; html+= " \r\n"; html+= "
"; html+= "
\r\n"; html+= "
"+productname+"
\r\n"; html+= "

\r\n"; if(sellprice!="") { html+= " "+sellprice+"
\r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
\r\n"; } html+= "

\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; } $("#kika-product-list").append(html); x++; }); $("#prodlist_"+gotopage+"_"+(x-1)).load(function() { var img_h = $("#prodlist_"+gotopage+"_0").height(); for(k=0; k parseInt(kika_quantity[i])) { chkQty = false; } chkInputCnt += parseInt($(this).val()); } basket_kika_qty += parseInt($(this).val())+"|"; i++; }); if(!chkQty) { $("#alertMsg").html("주문수량이 재고수량보다 많습니다.
주문수량은 재고수량보다 적게 선택해 주세요."); $("#myModal").modal("show"); return; } if(chkInputCnt<1) { $("#alertMsg").html("주문수량을 입력하세요."); $("#myModal").modal("show"); return; } } if(gbn=="ordernow") { $("#basket_ordertype").val(gbn); } $("#basket_kika_code").val(basket_kika_code); $("#basket_kika_spec").val(basket_kika_spec); $("#basket_kika_qty").val(basket_kika_qty); if(gbn=="wishlist") { $.ajax({ type:"POST", url:"/mobile/module/wishlist.php", data:$("#wishform").serialize(), dataType:"xml", cache:true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); $("#alertMsg").html(""); if(result=="SUCCESS") { $("#goWishlistModalMsg").html("Wishlist에 저장하였습니다.
Wishlist로 이동하시겠습니까?"); $('#goWishlistModal').modal('show'); } else { $("#alertMsg").html(msg); $('#myModal').modal('show'); } }, error: function(e) { $("#alertMsg").html("Wishlist에 담지 못하였습니다."); $('#myModal').modal('show'); } }); } else { $.ajax({ type:"POST", url:"/mobile/module/basket.php", data:$("#form_basket").serialize(), dataType:"xml", cache:true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); $("#alertMsg").html(""); if(result=="SUCCESS") { if(gbn!="ordernow") { $("#goBasketModalMsg").html("장바구니에 저장하였습니다.
장바구니로 이동하시겠습니까?"); $('#goBasketModal').modal('show'); } else { $(location).attr("href", "/mobile/order.php"); return; } } else { $("#alertMsg").html(msg); $('#myModal').modal('show'); } }, error: function(e) { $("#alertMsg").html("장바구니에 담지 못하였습니다."); $('#myModal').modal('show'); } }); } } function basketInit(gbn) { var ajaxdata = ""; goTop(); $("#kika-loading-bar").css("display", "block"); $.ajax({ type:"POST", url:"/mobile/module/basket.php", data:ajaxdata, dataType:"xml", cache:true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); $("#alertMsg").html(""); if(result=="SUCCESS") { // 상품 리스트 출력 var product_cnt = xmldata.find("item").length; var total = xmldata.find("total").text(); var total_qty = xmldata.find("product_total_qty").text(); var basket_totprice = xmldata.find("basket_totprice").text(); $("#basket_cnt").html(total+"개"); $("#product_total_qty").html(total_qty+"개"); $("#basket_totprice").html(basket_totprice+"원"); $("#kika-basket-product").html(""); /*** 1203547 002003005000000192 %EC%B9%B4%EC%82%AC%EB%84%A4%20%ED%8F%B4%EB%A1%9C%28AK0931%29 6860 0020030050000001922.jpg 68600 34300 3430 2 0 0 0 0 0 120354701R90 WHITE 95 %20%2F%20WHITE%2095%20 %3Cbr%3E%28120354701R90%29 -1203547 1203547 3%2C430 59 576610 34,300 68,600 ***/ if(product_cnt > 0) { var x = 0; var y = 0; var html = ""; xmldata.find("item_group").each(function() { var productcode = $(this).find("productcode").text(); var productname = $.URLDecode($(this).find("productname").text()); var image = $.URLDecode($(this).find("image").text()); var basket_sellprice = $(this).find("basket_sellprice").text(); var production = $.URLDecode($(this).find("production").text()); var madein = $.URLDecode($(this).find("madein").text()); html+= "
\r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; $(this).find("item").each(function() { var item_code = $(this).find("item_code").text(); var orgquantity = $(this).find("orgquantity").text(); var spec = $(this).find("spec").text(); var basket_spec = $.URLDecode($(this).find("basket_spec").text()); var basketidx = $(this).find("basketidx").text(); var basket_item_code = $(this).find("basket_item_code").text(); var basket_stock = $(this).find("basket_stock").text(); var basket_price = $(this).find("basket_price").text(); html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; y++; }); x++; html+= "
\r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= "
\r\n"; html+= " "+productname+"
\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= " 판매가 : "+basket_sellprice+"원
\r\n"; html+= " 제조사 : "+production+"\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= " \r\n"; html+= "
\r\n"; html+= " \r\n"; html+= "
\r\n"; html+= " \r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
재고 : "+basket_stock+"
\r\n"; html+= "
"+basket_spec+"
\r\n"; html+= "
\r\n"; html+= "
\r\n"; }); $("#kika-basket-product").append(html); for(i=0; i 0) { $("#kika-product-list").html(""); var x = 0; var y = 0; xmldata.find("item").each(function() { var productcode = $.URLDecode($(this).find("productcode").text()); var productname = $.URLDecode($(this).find("productname").text()); var image = $.URLDecode($(this).find("minimage").text()); var madein = $.URLDecode($(this).find("madein").text()); var production = $.URLDecode($(this).find("production").text()); var consumerprice = $(this).find("consumerprice").text(); var sellprice = $(this).find("sellprice").text(); var quantity = $(this).find("quantity").text(); var item_group_code = $(this).find("item_group_code").text(); var html = ""; /***/ html+= "
\r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= "
\r\n"; html+= " \r\n"; html+= " \r\n"; html+= "
\r\n"; html+= " 제품명 : "+productname+"\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= " 제조사 : "+production+"\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= " 판매가 : "+sellprice+"원\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; var specdata = xmldata.find("spec_"+item_group_code); specdata.find("spec_item").each(function() { var spec_name = $.URLDecode($(this).find("spec_name").text()); var spec_viewqty = $(this).find("spec_viewqty").text(); var spec_itemcode = $(this).find("spec_itemcode").text(); var spec_quantity = $(this).find("spec_quantity").text(); if(spec_quantity>0) { html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; y++; } }); html+= "
스펙주문수량재고
"+spec_name+""+spec_viewqty+"
\r\n"; html+= "
\r\n"; html+= "
\r\n"; /***/ $("#kika-product-list").append(html); x++; }); $("#kika-loading-bar").css("display", "none"); $("#kika-product-cnt").html(total+"개"); } else { $("#kika-loading-bar").css("display", "none"); $("#alertMsg").html("검색된 상품이 없습니다."); $('#myModal').modal('show'); } } else { $("#kika-loading-bar").css("display", "none"); $("#alertMsg").html(msg); $('#myModal').modal('show'); } }, error: function(e) { $("#kika-loading-bar").css("display", "none"); $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function getSimpleBasket() { var chkQty = true; var chkInputCnt = 0; var i = 0; var kika_quantity = new Array(); var ord_code = new Array(); var ord_spec = new Array(); var ord_qty = new Array(); var ord_productcode = new Array(); var basket_kika_productcode = ""; var basket_kika_code = ""; var basket_kika_spec = ""; var basket_kika_qty = ""; /***/ $("input[name='kika_quantity']").each(function() { kika_quantity[i] = parseInt($(this).val()); i++; }); i = 0; $("input[name='ord_productcode']").each(function() { //basket_kika_productcode += $(this).val()+"|"; ord_productcode[i] = $(this).val(); i++; }); i = 0; $("input[name='ord_code']").each(function() { //basket_kika_code += $(this).val()+"|"; ord_code[i] = $(this).val(); i++; }); i = 0; $("input[name='ord_spec']").each(function() { //basket_kika_spec += $(this).val()+"|"; ord_spec[i] = $(this).val(); i++; }); /***/ i=0; $("input[name='ord_qty']").each(function() { if($(this).val() != "") { if(!IsNumeric($(this).val())) { $("#alertMsg").html("주문수량은 숫자만 입력하세요."); $("myModal").modal("show"); return; } if(parseInt($(this).val()) > parseInt(kika_quantity[i])) { chkQty = false; } chkInputCnt += parseInt($(this).val()); if(parseInt($(this).val()) > 0) { basket_kika_productcode += ord_productcode[i]+"|"; basket_kika_code += ord_code[i]+"|"; basket_kika_spec += ord_spec[i]+"|"; basket_kika_qty += parseInt($(this).val())+"|"; } } i++; }); if(!chkQty) { $("#alertMsg").html("주문수량이 재고수량보다 많습니다.
주문수량은 재고수량보다 적게 선택해 주세요."); $("#myModal").modal("show"); return; } if(chkInputCnt<1) { $("#alertMsg").html("주문수량을 입력하세요."); $("#myModal").modal("show"); return; } $("#basket_kika_productcode").val(basket_kika_productcode); $("#basket_kika_code").val(basket_kika_code); $("#basket_kika_spec").val(basket_kika_spec); $("#basket_kika_qty").val(basket_kika_qty); $.ajax({ type:"POST", url:"/mobile/module/simple_basket.php", data:$("#form_basket").serialize(), dataType:"xml", cache:true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); $("#alertMsg").html(""); if(result=="SUCCESS") { $("#goBasketModalMsg").html("장바구니에 저장하였습니다.
장바구니로 이동하시겠습니까?"); $('#goBasketModal').modal('show'); } else { $("#alertMsg").html(msg); $('#myModal').modal('show'); } }, error: function(e) { $("#alertMsg").html("장바구니에 담지 못하였습니다."); $('#myModal').modal('show'); } }); } function orderSend() { var receiver_name = $.URLEncode($("#InputName").val()); var receiver_tel1 = $.URLEncode($("#InputPhone").val()); var receiver_tel2 = $.URLEncode($("#InputMobile").val()); var receiver_addr = $.URLEncode($("#receiver_addr").val()); var rpost = $.URLEncode($("#InputZipcode").val()); var raddr1 = $.URLEncode($("#InputAddress").val()); var raddr2 = $.URLEncode($("#InputAddress2").val()); var deli_select = $("#deli_select").val(); var paymethod = $("#paymethod").val(); var pay_data1 = $.URLEncode($("#pay_data1").val()) var ajaxdata = "receiver_name="+receiver_name+"&receiver_tel1="+receiver_tel1+"&receiver_tel2="+receiver_tel2+"&receiver_addr="+receiver_addr+"&rpost="+rpost+"&raddr1="+raddr1+"&raddr2="+raddr2+"&paymethod="+paymethod+"&pay_data1="+pay_data1+"&deli_select="+deli_select; $("#kika-loading-bar").css("display", "block"); goTop(); $("#kika-loading-bar").css("display", "block"); $.ajax({ type:"POST", url:"/mobile/module/ordersend.php", data:ajaxdata, dataType:"xml", cache:true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); if(result=="SUCCESS") { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = xmldata.find("msg").text(); var ordercode = xmldata.find("ordercode").text(); goPage("/mobile/orderdetail.php?ordercode="+ordercode+"&ordertype=mobile_complete"); } else { $("#kika-loading-bar").css("display", "none"); $("#alertMsg").html(msg); $('#myModal').modal('show'); } }, error: function(e) { $("#kika-loading-bar").css("display", "none"); $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function wishlistInit(mode, block, gotopage) { var ajaxdata = "mode="+mode+"&block="+block+"&gotopage="+gotopage; goTop(); $("#kika-loading-bar").css("display", "block"); $.ajax({ type:"POST", url:"/mobile/module/wishlist.php", data:ajaxdata, dataType:"xml", cache:true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); if(result=="SUCCESS") { var product_cnt = xmldata.find("item").length; var paging = $.URLDecode(xmldata.find("paging").text()); $("#kika-basket-product").html(""); if(product_cnt > 0) { var x = 0; xmldata.find("item").each(function() { var productcode = $(this).find("productcode").text(); var productname = $.URLDecode($(this).find("productname").text()); var wish_idx = $(this).find("idx").text(); var image = $.URLDecode($(this).find("image").text()); var prodimg_layer = $.URLDecode($(this).find("prodimg_layer").text()); var sellprice = $.URLDecode($(this).find("sellprice").text()); var marks = $(this).find("marks").text(); var memo = $.URLDecode($(this).find("memo").text()); if(memo==undefined) memo = ""; var star = "★"; var html = ""; html+= "
\r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= "
\r\n"; html+= " \r\n"; /* if(prodimg_layer!="" && prodimg_layer!=undefined) { html+= "
"; } */ html+= " \r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= " "+productname+"\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= " "+sellprice+"원\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= " \r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= " \r\n"; html+= " \r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= " \r\n"; html+= " \r\n"; html+= "
\r\n"; $("#kika-basket-product").append(html); x++; }); $("#kika-loading-bar").css("display", "none"); $("#wishlist_cnt").html(product_cnt+"개"); $("#kika-product-paging").html(paging); } else { $("#kika-loading-bar").css("display", "none"); $("#basket_cnt").html(total+"개"); $("#alertMsg").html("Wishlist에 등록된 상품이 없습니다."); $('#myModal').modal('show'); } } else { $("#kika-loading-bar").css("display", "none"); $("#alertMsg").html(msg); $('#myModal').modal('show'); } }, error: function(e) { $("#kika-loading-bar").css("display", "none"); $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function updateWishlist(x) { var wishidx = $("#wishidx"+x).val(); var memo = $("#memo"+x).val(); var marks = $("#marks"+x).val(); var ajaxdata = "mode=update&wishidx="+wishidx+"&marks="+marks+"&memo="+$.URLEncode(memo); $.ajax({ type:"POST", url:"/mobile/module/wishlist.php", data:ajaxdata, dataType:"xml", cache:true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); $("#alertMsg").html(msg); if(result=="SUCCESS") { $('#myModal').modal('show'); wishlistInit('list', '', ''); } else { $('#myModal').modal('show'); } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function deleteWishlist(mode) { if(mode=="multi_del") { var ajaxdata = "mode=multi_del"; var productcode = "" $("input[name='idx']").each(function() { if($(this).is(":checked") == true) { var n = $(this).val(); productcode+= $("#wishidx"+n).val() + "|"; } }); if(productcode=="") { $("#alertMsg").html("상품을 선택해 주세요.."); $('#myModal').modal('show'); return; } ajaxdata+= "&productcode="+$.URLEncode(productcode); } else { var ajaxdata = "mode=clear"; } $.ajax({ type:"POST", url:"/mobile/module/wishlist.php", data:ajaxdata, dataType:"xml", cache:true, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); $("#alertMsg").html(msg); if(result=="SUCCESS") { $('#myModal').modal('show'); wishlistInit('list', '', ''); } else { $('#myModal').modal('show'); } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function orderInit() { var ajaxdata = ""; goTop(); $("#kika-loading-bar").css("display", "block"); $.ajax({ type:"POST", url:"/mobile/module/order.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); if(result=="SUCCESS") { var userdata = xmldata.find("userinfo"); var username = $.URLDecode(userdata.find("name").text()); var home_post1 = userdata.find("home_post1").text(); var home_post2 = userdata.find("home_post2").text(); var home_addr1 = $.URLDecode(userdata.find("home_addr1").text()); var home_addr2 = $.URLDecode(userdata.find("home_addr2").text()); var office_post1 = userdata.find("office_post1").text(); var office_post2 = userdata.find("office_post2").text(); var office_addr1 = $.URLDecode(userdata.find("office_addr1").text()); var office_addr2 = $.URLDecode(userdata.find("office_addr2").text()); var email = $.URLDecode(userdata.find("email").text()); var mobile = userdata.find("mobile").text(); var office_tel = userdata.find("office_tel").text(); var home_tel = userdata.find("home_tel").text(); var sumprice = xmldata.find("sumprice").text(); var deli_price = xmldata.find("deli_price").text(); var total_price = xmldata.find("total_price").text(); $("#alertMsg").html(""); var productdata = xmldata.find("product"); var product_cnt = productdata.find("item").length; if(product_cnt > 0) { var x = 0; productdata.find("item").each(function() { var productcode = $(this).find("productcode").text(); var productname = $.URLDecode($(this).find("productname").text()); var quantity = getCurrency($(this).find("quantity").text()); var spec = $.URLDecode($(this).find("spec").text()); var image = $.URLDecode($(this).find("image").text()); var sellprice = getCurrency($(this).find("sellprice").text()); var price = getCurrency($(this).find("price").text()); var html = ""; html+= "
\r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= "
\r\n"; html+= " \r\n"; html+= " \r\n"; html+= "
\r\n"; html+= " "+productname+" / "+spec+"
\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= " "+sellprice+"원 | 주문수량 : "+quantity+"\r\n"; html+= "
\r\n"; html+= "
\r\n"; html+= "
\r\n"; $("#kika-order-product").append(html); x++; }); } $("#td_sumprice").html(getCurrency(sumprice)+"원"); $("#td_deliprice").html(getCurrency(deli_price)+"원"); $("#td_totalprice").html(getCurrency(total_price)+"원"); $("#deli_price").val(deli_price); $("#total_price").val(total_price); $("#sumprice").val(sumprice); $("#salemoney").val(salemoney); $("#InputName").val(username); $("#InputPhone").val(home_tel); $("#InputMobile").val(mobile); $("#InputAddress").val(office_addr1); $("#InputAddress2").val(office_addr2); $("#kika-loading-bar").css("display", "none"); if((office_post1.length + office_post2.length) > 5) { $("#alertMsg").html("우편번호를 신규도로명 우편번호로 업데이트 해주세요."); $('#myModal').modal('show'); } else { $("#InputZipcode").val(office_post1+""+office_post2) } goTop(); } else { $("#alertMsg").html(msg); $('#myModal').modal('show'); goPage(returnurl); } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); $("#kika-loading-bar").css("display", "none"); } }); } function mypageInit() { var ajaxdata = ""; $("#kika-loading-bar").css("display", "block"); goTop(); $.ajax({ type:"POST", url:"/mobile/module/mypage.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); if(result=="SUCCESS") { //회원 기본 정보 var userdata = xmldata.find("user"); var id = $.URLDecode(userdata.find("id").text()); var name = $.URLDecode(userdata.find("name").text()); var address = $.URLDecode(userdata.find("address1").text())+" " +$.URLDecode(userdata.find("address2").text()); var oaddress = $.URLDecode(userdata.find("oaddress1").text())+" "+$.URLDecode(userdata.find("oaddress2").text()); var email = $.URLDecode(userdata.find("email").text()); var tel = $.URLDecode(userdata.find("tel").text()); var mobile = $.URLDecode(userdata.find("mobile").text()); var html = ""; html+= "
  • 매장명(아이디)
  • \r\n"; html+= "
  • "+name+" ("+id+")"+"
  • \r\n"; html+= "
  • 매장주소
  • \r\n"; html+= "
  • "+address+"
  • \r\n"; html+= "
  • 회사주소
  • \r\n"; html+= "
  • "+oaddress+"
  • \r\n"; html+= "
  • 이메일
  • \r\n"; html+= "
  • "+email+"
  • \r\n"; html+= "
  • 매장전화
  • \r\n"; html+= "
  • "+tel+"
  • \r\n"; html+= "
  • 휴대전화
  • \r\n"; html+= "
  • "+mobile+"
  • \r\n"; $("#mypage-panel-user").html(html); //최근 주문내역 var orderdata = xmldata.find("order"); var ordercnt = orderdata.find("item").length; if(ordercnt>0) { var html = ""; var x=0; orderdata.find("item").each(function() { var ordercode = $(this).find("ordercode").text(); var orderdate = $.URLDecode($(this).find("orderdate").text()); var orderprice = $.URLDecode($(this).find("orderprice").text()); var orderstat = $.URLDecode($(this).find("orderstat").text()); var orderproduct = $(this).find("product"); var orderproduct_cnt = orderproduct.find("productinfo").length; var product_html = ""; orderproduct.find("productinfo").each(function() { var productcode = $(this).find("productcode").text(); var productname = $.URLDecode($(this).find("productname").text()); var image = $.URLDecode($(this).find("image").text()); var quantity = $(this).find("quantity").text(); var price = $(this).find("price").text(); product_html+= "
    \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= "
    \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= "
    \r\n"; product_html+= " "+productname+"
    \r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; product_html+= " "+price+"원 | 주문수량 : "+quantity+"\r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; }); html+= "
    \r\n" html+= "
    \r\n" html+= " "+orderdate+"\r\n" html+= "
    \r\n" html+= " "+orderstat+"\r\n" html+= " 주문정보\r\n" html+= "
    \r\n" html+= "
    \r\n" html+= "
    \r\n" html+= product_html; html+= "
    \r\n" html+= "
    \r\n" html+= " 주문금액\r\n" html+= " "+orderprice+"원\r\n" html+= "
    \r\n" html+= "
    \r\n" x++; }); $("#mypage-panel-orderlist").html(html); } else { $("#mypage-panel-orderlist").html("최근 주문내역이 없습니다."); } //Wishlist var wishdata = xmldata.find("wishlist"); var wish_cnt = wishdata.find("item").length; if(wish_cnt>0) { var x = 0; var html = ""; wishdata.find("item").each(function() { var productcode = $(this).find("productcode").text(); var productname = $.URLDecode($(this).find("productname").text()); var image = $(this).find("image").text(); var sellprice = getCurrency($(this).find("sellprice").text()); var consumerprice = getCurrency($(this).find("consumerprice").text()); html+= "
    \r\n"; html+= "
    \r\n"; html+= "
    "; html+= " \r\n"; html+= "
    "; html+= "
    \r\n"; html+= "
    "+productname+"
    \r\n"; html+= "

    \r\n"; if(sellprice!="") { html+= " "+sellprice+"
    \r\n"; html+= " "+consumerprice+"원\r\n"; } else { html+= " "+consumerprice+"
    \r\n"; } html+= "

    \r\n"; html+= "
    \r\n"; html+= "
    \r\n"; html+= "
    \r\n"; x++; }); $("#mypage-panel-wishlist").html(html); } else { $("#mypage-panel-wishlist").html("Wishlist에 등록된 상품이 없습니다."); } //1:1문의 var personaldata = xmldata.find("personal"); var personal_cnt = personaldata.find("item").length; if(personal_cnt>0) { var x = 0; var html = ""; personaldata.find("item").each(function() { var idx = $(this).find("idx").text(); var date = $.URLDecode($(this).find("personal_date").text()); var subject = $.URLDecode($(this).find("personal_subject").text()); var reply = $.URLDecode($(this).find("persional_reply").text()); if(reply=="") { var reply_icon = "답변대기"; } else { var reply_icon = "답변완료"; } if(x==0) { html+= "
    \r\n"; } else { html+= "
    \r\n"; } html+= "
    "+date+""+reply_icon+"
    \r\n"; html+= "
    "+subject+"
    \r\n"; html+= "
    \r\n"; }); $("#mypage-panel-personal").html(html); } else { $("#mypage-panel-personal").html("1:1문의내역이 없습니다."); } } else { if(returnurl=="") { $("#alertMsg").html(msg); $('#myModal').modal('show'); } else { goPage(returnurl); } } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); $("#kika-loading-bar").css("display", "none"); } function userModifyInit(mode) { if(mode=="") { var ajaxdata = ""; $.ajax({ type:"POST", url:"/mobile/module/usermodify.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); if(result=="SUCCESS") { var userdata = xmldata.find("user"); var id = $.URLDecode(userdata.find("id").text()); var name = $.URLDecode(userdata.find("name").text()); var email = $.URLDecode(userdata.find("email").text()); var home_tel = $.URLDecode(userdata.find("home_tel").text()); var home_post1 = $.URLDecode(userdata.find("home_post1").text()); var home_post2 = $.URLDecode(userdata.find("home_post2").text()); var home_address1 = $.URLDecode(userdata.find("home_addr1").text()); var home_address2 = $.URLDecode(userdata.find("home_addr2").text()); var mobile = $.URLDecode(userdata.find("mobile").text()); var office_post1 = $.URLDecode(userdata.find("office_post1").text()); var office_post2 = $.URLDecode(userdata.find("office_post2").text()); var office_address1 = $.URLDecode(userdata.find("office_addr1").text()); var office_address2 = $.URLDecode(userdata.find("office_addr2").text()); var news_mail_yn = userdata.find("news_mail_yn").text(); var news_sms_yn = userdata.find("news_sms_yn").text(); $("#InputUserid").val(id+" / "+name); $("#InputName").val(name); $("#InputEmail").val(email); $("#InputHomeTel").val(home_tel); $("#InputHomeAddress1").val(home_address1); $("#InputHomeAddress2").val(home_address2); $("#InputMobile").val(mobile); $("#InputOfficeAddress1").val(office_address1); $("#InputOfficeAddress2").val(office_address2); if((home_post1.length + home_post2.length) > 5 || (office_post1.length + office_post2.length) > 5) { $("#alertMsg").html("우편번호를 신규도로명 우편번호로 업데이트 해주세요."); $('#myModal').modal('show'); } if((home_post1.length + home_post2.length) == 5) { $("#InputHomeZipcode").val(home_post1+""+home_post2) } if((office_post1.length + office_post2.length) == 5) { $("#InputOfficeZipcode").val(office_post1+""+office_post2) } if(news_mail_yn=="Y") { $("#InputNews1").attr("checked", true); } else { $("#InputNews2").attr("checked", true); } if(news_sms_yn=="Y") { $("#InputSms1").attr("checked", true); } else { $("#InputSms2").attr("checked", true); } } else { if(returnurl=="") { $("#alertMsg").html(msg); $('#myModal').modal('show'); } else { goPage(returnurl); } } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } else { goTop(); $.ajax({ type:"POST", url:"/mobile/module/usermodify.php", data:$("#userinfo").serialize(), dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); if(result=="SUCCESS") { $("#alertMsg").html("회원정보가 수정되었습니다."); $('#myModal').modal('show'); } else { if(returnurl=="" || returnurl==undefined) { $("#alertMsg").html(msg); $('#myModal').modal('show'); } else { goPage(returnurl); } } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } } function orderlistInit(block, gotopage) { var ajaxdata = ""; var startdate = $("#startdate").val(); var enddate = $("#enddate").val(); ajaxdata += "startdate="+startdate+"&enddate="+enddate+"&blolc="+block+"&gotopage="+gotopage; $("#kika-loading-bar").css("display", "block"); goTop(); $.ajax({ type:"POST", url:"/mobile/module/orderlist.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); var paging = $.URLDecode(xmldata.find("paging").text()); if(result=="SUCCESS") { var ordercnt = xmldata.find("item").length; if(ordercnt>0) { var html = ""; var x=0; xmldata.find("item").each(function() { var ordercode = $(this).find("ordercode").text(); var orderdate = $.URLDecode($(this).find("orderdate").text()); var orderprice = $.URLDecode($(this).find("orderprice").text()); var orderstat = $.URLDecode($(this).find("orderstat").text()); var orderproduct = $(this).find("product"); var orderproduct_cnt = orderproduct.find("productinfo").length; var product_html = ""; orderproduct.find("productinfo").each(function() { var y=0; var productcode = $(this).find("productcode").text(); var productname = $.URLDecode($(this).find("productname").text()); var image = $.URLDecode($(this).find("image").text()); var quantity = $(this).find("quantity").text(); var price = $(this).find("price").text(); if(y==2) { //product_html+= "
    "; //break; } product_html+= "
    \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= "
    \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= "
    \r\n"; product_html+= " "+productname+"
    \r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; product_html+= " "+price+"원 | 주문수량 : "+quantity+"\r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; y++; }); html+= "
    \r\n" html+= "
    \r\n" html+= " "+orderdate+"\r\n" html+= "
    \r\n" html+= " "+orderstat+"\r\n" html+= " 주문정보\r\n" html+= "
    \r\n" html+= "
    \r\n" html+= "
    \r\n" html+= product_html; html+= "
    \r\n" html+= "
    \r\n" html+= " 주문금액\r\n" html+= " "+orderprice+"원\r\n" html+= "
    \r\n" html+= "
    \r\n" x++; }); $("#mypage-panel-orderlist").html(html); $("#kika-product-paging").html(paging); } else { $("#mypage-panel-orderlist").html("최근 주문내역이 없습니다."); } var today = $.URLDecode(xmldata.find("today").text()); var day15 = $.URLDecode(xmldata.find("day15").text()); var month1 = $.URLDecode(xmldata.find("month1").text()); var month6 = $.URLDecode(xmldata.find("month6").text()); $("#today").val(today); $("#day15").val(day15); $("#month1").val(month1); $("#month6").val(month6); } else { if(returnurl=="" || returnurl==undefined) { $("#alertMsg").html(msg); $('#myModal').modal('show'); } else { goPage(returnurl); } } $("#kika-loading-bar").css("display", "none"); }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); $("#kika-loading-bar").css("display", "none"); } }); } function orderlistAdminSubmit() { var search_type = $("#search_type option:selected").val(); var search_keyword = $("#search_keyword").val(); var search_start = $("#startdate").val(); var search_end = $("#enddate").val(); $("#s_check").val(search_type); $("#search").val(search_keyword); $("#search_start").val(search_start); $("#search_end").val(search_end); $('form[name="order_search"]').submit(); } function memberlistAdminSubmit() { var search_type = $("#search_type option:selected").val(); var search_keyword = $("#search_keyword").val(); var search_start = $("#startdate").val(); var search_end = $("#enddate").val(); $("#scheck").val(search_type); $("#search").val(search_keyword); $("#search_start").val(search_start); $("#search_end").val(search_end); $('form[name="idxform"]').submit(); } function orderlistAdminInit(block, gotopage) { var ajaxdata = ""; var startdate = $("#startdate").val(); var enddate = $("#enddate").val(); ajaxdata += "startdate="+startdate+"&enddate="+enddate+"&block="+block+"&gotopage="+gotopage; $("#kika-loading-bar").css("display", "block"); goTop(); $.ajax({ type:"POST", url:"/mobile/module/admin_orderlist.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); var paging = $.URLDecode(xmldata.find("paging").text()); if(result=="SUCCESS") { var ordercnt = xmldata.find("item").length; if(ordercnt>0) { var html = ""; var x=0; xmldata.find("item").each(function() { var ordercode = $(this).find("ordercode").text(); var orderdate = $.URLDecode($(this).find("orderdate").text()); var orderprice = $.URLDecode($(this).find("orderprice").text()); var orderstat = $.URLDecode($(this).find("orderstat").text()); var orderproduct = $(this).find("product"); var orderproduct_cnt = orderproduct.find("productinfo").length; var product_html = ""; orderproduct.find("productinfo").each(function() { var y=0; var productcode = $(this).find("productcode").text(); var productname = $.URLDecode($(this).find("productname").text()); var image = $.URLDecode($(this).find("image").text()); var quantity = $(this).find("quantity").text(); var price = $(this).find("price").text(); if(y==2) { //product_html+= "
    "; //break; } product_html+= "
    \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= "
    \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= "
    \r\n"; product_html+= " "+productname+"
    \r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; product_html+= " "+price+"원 | 주문수량 : "+quantity+"\r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; y++; }); html+= "
    \r\n" html+= "
    \r\n" html+= " "+orderdate+"\r\n" html+= "
    \r\n" html+= " "+orderstat+"\r\n" html+= " 주문정보\r\n" html+= "
    \r\n" html+= "
    \r\n" html+= "
    \r\n" html+= product_html; html+= "
    \r\n" html+= "
    \r\n" html+= " 주문금액\r\n" html+= " "+orderprice+"원\r\n" html+= "
    \r\n" html+= "
    \r\n" x++; }); $("#mypage-panel-orderlist").html(html); $("#kika-product-paging").html(paging); } else { $("#mypage-panel-orderlist").html("최근 주문내역이 없습니다."); } var today = $.URLDecode(xmldata.find("today").text()); var day15 = $.URLDecode(xmldata.find("day15").text()); var month1 = $.URLDecode(xmldata.find("month1").text()); var month6 = $.URLDecode(xmldata.find("month6").text()); $("#today").val(today); $("#day15").val(day15); $("#month1").val(month1); $("#month6").val(month6); } else { if(returnurl=="" || returnurl==undefined) { $("#alertMsg").html(msg); $('#myModal').modal('show'); } else { goPage(returnurl); } } $("#kika-loading-bar").css("display", "none"); }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); $("#kika-loading-bar").css("display", "none"); } }); } function memberOrderlistAdminInit(block, gotopage) { var ajaxdata = ""; var userid = $("#userid").val(); ajaxdata += "userid="+userid+"&block="+block+"&gotopage="+gotopage; $.ajax({ type:"POST", url:"/mobile/module/admin_memberorderlist.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); var paging = $.URLDecode(xmldata.find("paging").text()); if(result=="SUCCESS") { var count = $.URLDecode(xmldata.find("count").text()); var total = $.URLDecode(xmldata.find("total").text()); var ordercnt = xmldata.find("item").length; if(ordercnt>0) { var html = ""; var orderlist_html = ""; var x=0; xmldata.find("item").each(function() { var number = $.URLDecode($(this).find("number").text()); var ordercode = $.URLDecode($(this).find("ordercode").text()); var orderdate = $.URLDecode($(this).find("orderdate").text()); var orderprice = $.URLDecode($(this).find("orderprice").text()); orderlist_html+= "\r\n"; orderlist_html+= " "+number+"\r\n"; orderlist_html+= " "+orderdate+"\r\n"; orderlist_html+= " "+orderprice+"원\r\n"; orderlist_html+= "\r\n"; x++; }); html+= " "+count+"건\r\n"; html+= "
    "+total+"원
    \r\n"; html+= "\r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= " \r\n"; html+= orderlist_html; html+= " \r\n"; html+= "
    NO주문일시주문금액
    \r\n"; $("#orderlist-admin").html(html); $("#orderlist-paging").html(paging); } else { $("#orderlist-admin").html("최근 주문내역이 없습니다."); } } else { if(returnurl=="" || returnurl==undefined) { $("#alertMsg").html(msg); $('#myModal').modal('show'); } else { goPage(returnurl); } } }, error: function(e) { $("#alertMsg").html("주문정보를 조회가 실패되었습니다.
    잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function orderDetailInit(ordercode,gbn) { var ajaxdata = "ordercode="+ordercode+"&type="+gbn; if(gbn=="cancel") ajaxdata += "&tempkey=" + $("#tempkey").val(); $.ajax({ type:"POST", url:"/mobile/module/orderdetail.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); if(result=="SUCCESS") { var orderproduct_cnt = xmldata.find("product").length; var product_html = ""; xmldata.find("product").each(function() { var y=0; var productcode = $(this).find("productcode").text(); var productname = $.URLDecode($(this).find("productname").text()); var image = $.URLDecode($(this).find("image").text()); var quantity = $(this).find("quantity").text(); var price = $(this).find("price").text(); product_html+= "
    \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= "
    \r\n"; product_html+= " \r\n"; product_html+= " \r\n"; product_html+= "
    \r\n"; product_html+= " "+productname+"
    \r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; product_html+= " "+price+"원 | 주문수량 : "+quantity+"\r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; product_html+= "
    \r\n"; y++; }); $("#kika-order-product").html(product_html); var orderprice = $.URLDecode(xmldata.find("orderprice").text()); var productprice = $.URLDecode(xmldata.find("productprice").text()); var orderstat = $.URLDecode(xmldata.find("orderstat").text()); var paytype = $.URLDecode(xmldata.find("paytype").text()); var paydata = $.URLDecode(xmldata.find("paydata").text()); var deli_price = $.URLDecode(xmldata.find("deli_price").text()); var receiver_name = $.URLDecode(xmldata.find("receiver_name").text()); var receiver_tel1 = $.URLDecode(xmldata.find("receiver_tel1").text()); var receiver_tel2 = $.URLDecode(xmldata.find("receiver_tel2").text()); var receiver_addr = $.URLDecode(xmldata.find("receiver_addr").text()); var deli_comnum = xmldata.find("deli_comnum").text(); var deli_com = $.URLDecode(xmldata.find("deli_com").text()); var deli_num = $.URLDecode(xmldata.find("deli_num").text()); var deli_url = $.URLDecode(xmldata.find("deli_url").text()); var cancel_orderdate = $.URLDecode(xmldata.find("cancel_orderdate").text()); var cancel_date = $.URLDecode(xmldata.find("cancel_date").text()); var tempkey = $.URLDecode(xmldata.find("tempkey").text()); $("#orderstat").html(orderstat); if(deli_comnum=="99") { $("#deli_select2").attr("checked", true); } else if(deli_comnum=="98") { $("#deli_select3").attr("checked", true); } else { $("#deli_select1").attr("checked", true); } $("#td_sumprice").html(productprice+"원"); $("#td_deliprice").html(deli_price+"원"); $("#td_totalprice").html(orderprice+"원"); $("#paytype").html(paytype); $("#paydata").html(paydata); $("#deli_com").html(deli_com); if(deli_num!="" && deli_num!=undefined) $("#deli_num").html("송장번호 : "+deli_num+" "); $("#receiver_name").html(receiver_name); $("#receiver_tel1").html(receiver_tel1); $("#receiver_tel2").html(receiver_tel2); $("#receiver_addr").html(receiver_addr); $("#cancel_orderdate").val(cancel_orderdate); $("#cancel_date").val(cancel_date); $("#tempkey").val(tempkey); if(orderstat!="입금확인중" && orderstat!="결제확인중" && orderstat!="발송준비") { $("#order-cancel-btn").css("display", "none"); } if(gbn=="cancel") { $("#alertMsg").html(msg); $('#myModal').modal('show'); } } else { if(returnurl=="" || returnurl==undefined || msg!="") { $("#alertMsg").html(msg); $('#myModal').modal('show'); } /* 2025-03-13 else { goPage(returnurl); } */ } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function personalList(block, gotopage) { var ajaxdata = "block="+block+"&gotopage="+gotopage; $.ajax({ type:"POST", url:"/mobile/module/personal.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); if(result=="SUCCESS") { var board_cnt = xmldata.find("item").length; var board_html = ""; if(board_cnt>0) { xmldata.find("item").each(function() { var x = 0; var idx = $(this).find("boardidx").text(); var date = $.URLDecode($(this).find("date").text()); var title = $.URLDecode($(this).find("title").text()); var reply = $(this).find("reply").text(); var reply_stat = ""; if(reply=="") { reply_stat = "답변대기"; } else { reply_stat = "답변완료"; } if(title==undefined) title = ""; board_html+= "
    \r\n"; board_html+= "
    "+date+""+reply_stat+"
    \r\n"; board_html+= "
    "+title+"
    \r\n"; board_html+= "
    \r\n"; x++; }); $("#mypage-board-content").html(board_html); } else { $("#mypage-board-content").html("등록된 1:1문의가 없습니다."); } } else { if(returnurl=="" || returnurl==undefined) { $("#alertMsg").html(msg); $('#myModal').modal('show'); } else { goPage(returnurl); } } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function personalWrite() { var title = $("#InputTitle").val(); var email = $("#InputEmail").val(); var contents = $("#InputContents").val(); if(title=="") { $("#alertMsg").html("문의제목을 입력하세요."); $('#myModal').modal('show'); return; } if(email!="" && !IsMailCheck(email)) { $("#alertMsg").html("이메일 입력이 잘못되었습니다."); $('#myModal').modal('show'); return; } if(contents=="") { $("#alertMsg").html("문의내용을 입력하세요."); $('#myModal').modal('show'); return; } $.ajax({ type:"POST", url:"/mobile/module/personal.php", data:$("#form").serialize(), dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); $("#alertMsg").html(msg); if(result=="SUCCESS") { goPage(returnurl); } else { if(returnurl=="" || returnurl==undefined) { $('#myModal').modal('show'); } else { goPage(returnurl); } } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function personalViewInit(idx) { var ajaxdata = "mode=view&idx="+idx; $.ajax({ type:"POST", url:"/mobile/module/personal.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); $("#alertMsg").html(msg); $("#mypage-board-content").html(""); if(result=="SUCCESS") { var title = $.URLDecode(xmldata.find("title").text()); var contents = $.URLDecode(xmldata.find("contents").text()); var re_date = $.URLDecode(xmldata.find("re_date").text()); var re_contents = $.URLDecode(xmldata.find("re_contents").text()); var html = ""; if(re_date==undefined) re_date = ""; if(re_contents==undefined) re_contents = ""; if(re_date=="") { reply_stat = "답변대기"; } else { reply_stat = "답변완료"; } html+= "
    \r\n"; html+= "

    "+title+"

    \r\n"; html+= "
    "+contents+"
    \r\n"; html+= "
    \r\n"; html+= " "+reply_stat+"\r\n"; html+= " "+re_date+"\r\n"; if(re_contents!="") { html+= "
    "+re_contents+"
    \r\n"; } html+= "
    \r\n"; html+= "
    \r\n"; $("#mypage-board-content").html(html); } else { if(returnurl=="" || returnurl==undefined) { $('#myModal').modal('show'); } else { goPage(returnurl); } } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function boardList(block, gotopage) { var board = $("#board").val(); var pagetype = $("#pagetype").val(); var s_check = $("#s_check").val(); var search = $("#search").val(); var ajaxdata = "board="+board+"&pagetype="+pagetype+"&s_check="+s_check+"&search="+search+"&block="+block+"&gotopage="+gotopage; goTop(); $.ajax({ type:"POST", url:"/mobile/module/board.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); var board_title = $.URLDecode(xmldata.find("board_name").text()); var paging = $.URLDecode(xmldata.find("paging").text()); $("#board_title").html(board_title); if(result=="SUCCESS") { var board_cnt = xmldata.find("item").length; var board_html = ""; if(board_cnt>0) { xmldata.find("item").each(function() { var x = 0; var idx = $(this).find("idx").text(); var date = $.URLDecode($(this).find("date").text()); var title = $.URLDecode($(this).find("subject").text()); var writer = $.URLDecode($(this).find("writer").text()); if(title==undefined) title = ""; board_html+= "
    \r\n"; //board_html+= "
    \r\n"; board_html+= "
    "+date+""+writer+"
    \r\n"; board_html+= "
    "+title+"
    \r\n"; board_html+= "
    \r\n"; x++; }); $("#mypage-board-content").html(board_html); $("#kika-product-paging").html(paging); } else { $("#mypage-board-content").html("등록된 1:1문의가 없습니다."); } } else { if(returnurl=="" || returnurl==undefined) { $("#alertMsg").html(msg); $('#myModal').modal('show'); } else { goPage(returnurl); } } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function boardView() { var board = $("#board").val(); var num = $("#num").val(); var pagetype = $("#pagetype").val(); var block = $("#block").val(); var gotopage = $("#gotopage").val(); var s_check = $("#s_check").val(); var search = $("#search").val(); var ajaxdata = "pagetype="+pagetype+"&num="+num+"&board="+board+"&block="+block+"&gotopage="+gotopage+"&search="+search+"&s_check="+s_check; goTop(); $.ajax({ type:"POST", url:"/mobile/module/board.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); var returnurl = $.URLDecode(xmldata.find("returnurl").text()); var board_title = $.URLDecode(xmldata.find("board_name").text()); $("#board_title").html(board_title); var html = ""; if(result=="SUCCESS") { var title = $.URLDecode(xmldata.find("title").text()); var date = $.URLDecode(xmldata.find("date").text()); var contents = $.URLDecode(xmldata.find("contents").text()); var upload_file1 = $.URLDecode(xmldata.find("upload_file1").text()); var file_name1 = $.URLDecode(xmldata.find("file_name1").text()); html+= "
    \r\n"; html+= "

    "+title+"

    \r\n"; html+= "
    \r\n"; if(upload_file1!="") { html+= "
    "+upload_file1+"
    \r\n"; } html+= " "+contents+"\r\n"; html+= "
    \r\n"; html+= "
    \r\n"; html+= " "+date+"\r\n"; html+= "
    \r\n"; html+= "
    \r\n"; var prev_cnt = xmldata.find("prev_content").length; var next_cnt = xmldata.find("next_content").length; if(prev_cnt > 0) { var prevdata = xmldata.find("prev_content"); var prev_num = prevdata.find("prev_num").text(); var prev_title = $.URLDecode(prevdata.find("prev_title").text()); var prev_name = $.URLDecode(prevdata.find("prev_name").text()); html+= "
    \r\n"; html+= " \r\n"; html+= " "+prev_title+"\r\n"; html+= "
    \r\n"; } if(next_cnt > 0) { var nextdata = xmldata.find("next_content"); var next_num = nextdata.find("next_num").text(); var next_title = $.URLDecode(nextdata.find("next_title").text()); var next_name = $.URLDecode(nextdata.find("next_name").text()); html+= "
    \r\n"; html+= " \r\n"; html+= " "+next_title+"\r\n"; html+= "
    \r\n"; } $("#mypage-board-content").html(html); } else { if(returnurl=="" || returnurl==undefined) { $("#alertMsg").html(msg); $('#myModal').modal('show'); } else { goPage(returnurl); } } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); } function changeAdminCategory(n) { var codeA = $("#category_1 option:selected").val(); var codeB = $("#category_2 option:selected").val(); var codeC = $("#category_3 option:selected").val(); if(n==1) { var type = "A"; var ajaxdata = "type="+type+"&codeA="+codeA; $("#category_2 option").remove(); $("#category_3 option").remove(); $("#category_2").append(""); $("#category_3").append(""); if(codeA=="") { return; } } else if(n==2) { var type = "B"; var ajaxdata = "type="+type+"&codeA="+codeA+"&codeB="+codeB; $("#category_3 option").remove(); $("#category_3").append(""); if(codeB=="") { return; } } $.ajax({ type:"POST", url:"/mobile/module/codeinit.php", data:ajaxdata, dataType:"xml", cache:false, success: function(xml) { var xmldata = $(xml).find("data"); var result = xmldata.find("result").text(); var msg = $.URLDecode(xmldata.find("msg").text()); if(result=="SUCCESS") { var category_cnt = xmldata.find("item").length; if(category_cnt>0) { xmldata.find("item").each(function() { var codeA = $(this).find("codeA").text(); var codeB = $(this).find("codeB").text(); var codeC = $(this).find("codeC").text(); var codeD = $(this).find("codeD").text(); var code_name = $.URLDecode($(this).find("code_name").text()); if(n==1) { $("#category_2").append(""); } else if(n==2) { $("#category_3").append(""); } }); } else { $("#alertMsg").html("등록된 카테고리가 없습니다."); $('#myModal').modal('show'); } } else { $("#alertMsg").html(msg); $('#myModal').modal('show'); } }, error: function(e) { $("#alertMsg").html("잠시 후 다시 시도해 주시기 바랍니다."); $('#myModal').modal('show'); } }); }