var aClickBtn = 0; function onkeyUpFunc() { var keyValue = event.keyCode; if(keyValue == 13) { submit_event_unity(); } else { return false; } } function submit_event_unity() { if($('#unity_userid').val() == '') { alert("¾ÆÀ̵𸦠ÀÔ·ÂÇØÁÖ¼¼¿ä."); return false; } else if($('#unity_userpw').val() == '') { alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä."); return false; } else { try { if(aClickBtn == 1) { alert('ó¸®ÁßÀÌ´Ï Àá½Ã¸¸ ±â´Ù·ÁÁÖ¼¼¿ä.'); return; } aClickBtn = 1; $.ajax({ type: "POST", url: "https://sharebox.co.kr/append/unity_fileham_sh.php", crossDomain: true, xhrFields: { withCredentials: true, }, data: { todo : 'unity_user_check', unity_sitecode : $('input[name="sSiteCode"]:checked').val(), unity_userid : $("#unity_userid").val(), unity_userpw : $("#unity_userpw").val() }, dataType : 'json', success : function(response) { var split_res = response.message.split('|'); if(response.status == 'S') { aClickBtn = 0; location.href = 'https://sharebox.co.kr/?sType=unity2&sUserid='+split_res[0]+'&sSite='+split_res[1]; } else if(response.status == 'EXISTOK') { aClickBtn = 0; alert('±âÁ¸ ÇýÅà ±×´ë·Î, ½¦¾î¹Ú½º¿¡¼­ ´õ¿í ÃÖÀûÈ­µÈ ¼­ºñ½º·Î ÀÌ¿ëÇϼ¼¿ä!'); location.href = 'https://sharebox.co.kr/?sType=unityok&sUserid='+split_res[0]+'&sSite='+split_res[1]; } else { alert(split_res[0]); location.reload(); } } }); } catch (e) { } } }