/** * ÆÐÅ°Áö ÅÛÇø´ ÆǸÅÇü¿¡ ÇÊ¿äÇÑ ÇÔ¼ö ¸ðÀ½ * @author * @date 2006-03-10 ¿ÀÀü 9:38 */ var _P = document.location['pathname']; var _A = document.location['href'].replace(/#/, ''); function g(v) { return document.getElementById(v); } // Popup Windows C function popWinC(url,name,WinWidth,WinHeight,option) { var x = screen.width / 2 - WinWidth / 2; var y = screen.height / 2 - WinHeight / 2; option = option + ',width=' + WinWidth + ',height=' + WinHeight + ',left=' + x + ',top=' + y; newwindow = window.open(url,name,option); newwindow.focus(); } // °ü¸®ÀÚÁ¤º¸¸¦ ȸ¿øÁ¤º¸¿Í µ¿ÀÏÇÏ°Ô Çϱâ function sameAdminInfo() { if(document.f.admin_info_same.checked) { document.f.admin_name.value = document.f.u_h_name.value; document.f.admin_email.value = document.f.email.value; document.f.admin_phone1.value = document.f.phone1.value; document.f.admin_phone2.value = document.f.phone2.value; document.f.admin_phone3.value = document.f.phone3.value; document.f.admin_hphone1.value = document.f.hphone1.value; document.f.admin_hphone2.value = document.f.hphone2.value; document.f.admin_hphone3.value = document.f.hphone3.value; } else { document.f.admin_name.value = ""; document.f.admin_email.value = ""; document.f.admin_phone1.value = ""; document.f.admin_phone2.value = ""; document.f.admin_phone3.value = ""; document.f.admin_hphone1.value = ""; document.f.admin_hphone2.value = ""; document.f.admin_hphone3.value = ""; } } // »õ·Î¿î ¾ÆÀ̵ð üũ function check_Info(v) { if(v == 1) { if(!document.com_member.m_id.value) { alert('¾ÆÀ̵ð °Ë»öÀ» ÇØÁÖ¼¼¿ä!'); return false; } if(!document.com_member.passwd.value) { alert('ºñ¹Ð¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä!'); document.com_member.passwd.focus(); return false; } if(!document.com_member.passwd_confirm.value) { alert('ºñ¹Ð¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä!'); document.com_member.passwd_confirm.focus(); return false; } if(document.com_member.passwd.value != document.com_member.passwd_confirm.value) { alert('ºñ¹Ð¹øÈ£°¡ ´Ù¸¨´Ï´Ù!'); document.com_member.passwd.focus(); return false; } document.f.b_m_id.value = document.com_member.m_id.value; document.f.u_id.value = document.f.prefix.value + document.com_member.m_id.value; document.f.u_passwd.value = document.com_member.passwd.value; } if(v == 2) { if(!document.fm.member_id.value) { alert('¾ÆÀ̵ð °Ë»öÀ» ÇØÁÖ¼¼¿ä!'); return false; } } } /** * udb * */ function joinUdb(f, flag) { var CF = new CheckForm; CF.fm = f; CF.target = ""; CF.except = "joinUdb"; CF.action = _A; CF.field_list = [ ["u_h_name", "À̸§(ÇѱÛ)"], // ["u_e_name", "À̸§(¿µ¹®)"], ["u_ssn1", "ÁֹιøÈ£"], ["u_ssn2", "ÁֹιøÈ£"], ["zip1", "¿ìÆí¹øÈ£"], ["zip2", "¿ìÆí¹øÈ£"], ["h_addr1", "ÁÖ¼Ò(ÇѱÛ)"], ["h_addr2", "ÁÖ¼Ò(ÇѱÛ)"], ["e_addr", "ÁÖ¼Ò(¿µ¹®)"], ["email", "E-mail"], ["phone1", "ÀüÈ­¹øÈ£"], ["phone2", "ÀüÈ­¹øÈ£"], ["phone3", "ÀüÈ­¹øÈ£"], ["hphone1", "ÇÚµåÆù¹øÈ£"], ["hphone2", "ÇÚµåÆù¹øÈ£"], ["hphone3", "ÇÚµåÆù¹øÈ£"], ["admin_name", "°ü¸®ÀÚÀ̸§"], ["u_passwd", "ºñ¹Ð¹øÈ£"], ["admin_email", "°ü¸®ÀÚ E-mail"], ["admin_phone1", "°ü¸®ÀÚ ÀüÈ­¹øÈ£"], ["admin_phone2", "°ü¸®ÀÚ ÀüÈ­¹øÈ£"], ["admin_phone3", "°ü¸®ÀÚ ÀüÈ­¹øÈ£"], ["admin_hphone1", "°ü¸®ÀÚ ÇÚµåÆù¹øÈ£"], ["admin_hphone2", "°ü¸®ÀÚ ÇÚµåÆù¹øÈ£"], ["admin_hphone3", "°ü¸®ÀÚ ÇÚµåÆù¹øÈ£"], ["mssqldbUserId", "DB Á¢¼Ó ¾ÆÀ̵ð"], ["mssqldbPasswd", "DB ºñ¹Ð¹øÈ£"], ["mssqldbPasswd2", "DB ºñ¹Ð¹øÈ£ È®ÀÎ"] ]; if(flag) { if(check_Info(flag) == false) return false; } var passwordResult=getPasswordCheckResult(f.u_passwd.value); var passwordLevel=Number(passwordResult[0]); if(f.u_passwd.value == "") { alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϼ¼¿ä.'); f.u_passwd.focus(); return false; } if(passwordLevel <= 0){ var msg=""; switch(passwordLevel) { case 0: case -1: msg="ºñ¹Ð¹øÈ£´Â ¿µ¹®ÀÚ·Î ½ÃÀÛµÇ¸ç ¿µ¹®/¼ýÀÚ/Ư¼ö¹®ÀÚ Á¶ÇÕÀÇ 8~16ÀÚ¸®·Î ÀÔ·ÂÇØÁÖ¼¼¿ä."; break; case -2: msg="ºñ¹Ð¹øÈ£´Â 4ÀÚÀÌ»ó ¿¬¼ÓµÈ ¹®ÀÚ¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù."; break; case -3: msg="µ¿ÀϹ®ÀÚ¸¦ 3ÀÚÀÌ»ó ¹Ýº¹À¸·Î »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù."; break; default: msg="ºñºô¹øÈ£ Çü½ÄÀÌ À߸øµÇ¾ú½À´Ï´Ù."; break; } alert(msg); f.u_passwd.focus(); return false; } if(f.mssqldbUserId) { if(f.mssqldbUserId.value == "") { alert("DB Á¢¼Ó ¾ÆÀ̵𸦠ÀÔ·ÂÇϼ¼¿ä."); f.mssqldbUserId.focus(); return false; } var isChecker = /^[a-z]{1}[a-z0-9]{2,6}$/; if(!isChecker.test(f.mssqldbUserId.value)) { alert("DB Á¢¼Ó ¾ÆÀ̵ð´Â 2~6ÀÚÀÇ ¿µ¹® ¼Ò¹®ÀÚ·Î ½ÃÀÛÇؾßÇÏ¸ç ¿µ¾î ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù."); return false; } if(f.mssqldbPasswd.value == "") { alert('DB ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϼ¼¿ä.'); f.mssqldbPasswd.focus(); return false; } if(f.mssqldbPasswd2.value == "") { alert('DB ºñ¹Ð¹øÈ£ È®Àθ¦ ÀÔ·ÂÇϼ¼¿ä.'); f.mssqldbPasswd2.focus(); return false; } if(f.mssqldbPasswd.value != f.mssqldbPasswd2.value) { alert('DB ºñ¹Ð¹øÈ£°¡ Ʋ¸³´Ï´Ù.'); f.mssqldbPasswd.focus(); return false; } var passwordResult2=getPasswordCheckResult(f.mssqldbPasswd.value, "Y"); var passwordLevel2=Number(passwordResult2[0]); if(passwordLevel2 < 1){ var msg=""; switch(passwordLevel2) { case 0: case -1: msg="DB ºñ¹Ð¹øÈ£´Â ¿µ¹®ÀÚ·Î ½ÃÀÛµÇ¸ç ¿µ¹®/¼ýÀÚ/Ư¼ö¹®ÀÚ Á¶ÇÕÀÇ 8~16ÀÚ¸®·Î ÀÔ·ÂÇØÁÖ¼¼¿ä."; break; case -2: msg="DB ºñ¹Ð¹øÈ£´Â 4ÀÚÀÌ»ó ¿¬¼ÓµÈ ¹®ÀÚ¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù."; break; case -3: msg="µ¿ÀϹ®ÀÚ¸¦ 3ÀÚÀÌ»ó ¹Ýº¹À¸·Î »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù."; break; default: msg="DB ºñ¹Ð¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù. \n\n¿µ¹®/¼ýÀÚ/Ư¼ö¹®ÀÚ Á¶ÇÕÀ¸·Î 8~16ÀÚ¸®. , # & )´Â »ç¿ë ºÒ°¡"; break; } alert(msg); f.mssqldbPasswd.focus(); return false; } } CF.checkSubmit(); } // ºñ¹ø °øÅë - 20110511 function getPasswordCheckResult(newPasswd, windowFlag){ if(newPasswd == null) return; var url='/chtml/myservice/member_passwd_check.php'; var queryString = "newPasswd=" + newPasswd; if(windowFlag == "Y") { queryString += "&windowFlag=" + windowFlag; } var returnData = ''; $.ajax({ url:url, type:'post', data:queryString, dataType:'text', async:false, error:function(error, textStatus, setting){ alert('½ÇÆÐ : ' + textStatus + error.status); //alert(error.status); }, success:function(obj) { result = strTrim(obj); var resultA = obj.split('@^@'); returnData = resultA } }); return returnData; } function passwordSafetyCheck(newPasswd){ try{ if(newPasswd.length < 8 || newPasswd.length > 16){ return false; } var result = getPasswordCheckResult(newPasswd); if(result[0] > 0){ return true; }else{ return false; } }catch(e){ alert(e); return false; } } function strTrim(str) { if(typeof(str)!='String'){ return str; } var str = str.replace(/(\s+$)/g, ""); return str.replace(/(^\s*)/g, ""); } var xmlHTTPCount = 0; function getXMLHTTPHosting(){ var urls, params, methods; if( getXMLHTTPHosting.arguments.length>0 ) urls =getXMLHTTPHosting.arguments[0]; if( getXMLHTTPHosting.arguments.length>1 ) params =getXMLHTTPHosting.arguments[1]; if( getXMLHTTPHosting.arguments.length>2 ) methods =getXMLHTTPHosting.arguments[2]; if( methods==null || methods=="" ) methods="POST"; try { var objXmlHttp=null; if( window.ActiveXObject ){ objXmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }else if( window.XMLHttpRequest ){ objXmlHttp = new XMLHttpRequest(); } objXmlHttp.open(methods, urls,false); objXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); //objXmlHttp.setRequestHeader("Content-Encoding:", "utf-8"); //objXmlHttp.setRequestHeader("Cache-Control:", "no-cache"); //objXmlHttp.setRequestHeader("Connection", "close"); //objXmlHttp.setRequestHeader("Pragma:", "no-cache"); if( params!=null && params!="" ) objXmlHttp.send(params); else objXmlHttp.send(); var result=objXmlHttp.responseText; while(true){ result = result.replace("\n", ""); if(result.indexOf("\n")<0) break; } while(true){ result = result.replace("\r", ""); if(result.indexOf("\r")<0) break; } xmlHTTPCount = 0; } catch(e) { xmlHTTPCount = xmlHTTPCount + 1; if(xmlHTTPCount <= 5) { result = getXMLHTTPHosting(urls, params, methods); } else { result = false; } } return result; } /** * ½Ç¸íÀÎÁõ üũ * */ function validateRealname() { if( g("realNameResult") != null && g("realNameResult").value == 0 ) { alert("½Ç¸íÀÎÁõÀ» ÇÏ¼Å¾ß ÇÕ´Ï´Ù."); checkRealName(); return false; } return true; } function zipcodePop(v_zip1, v_zip2, v_addr1, v_addr2) { p = window.open('/chtml/hosting.php?prc=3&v_zip1='+v_zip1+'&v_zip2='+v_zip2+'&v_addr1='+v_addr1+'&v_addr2='+v_addr2,'new','width=448,height=390,status=yes,scrollbars=yes,menubar=no,resizable=1'); p.focus(); } function zipcodePop2(v_zip1,v_zip2,v_addr1,v_addr2,v_eaddr,v_form)//¿µ¹®ÁÖ¼ÒÆ÷ÇÔ { p = window.open('/chtml/hosting.php?prc=4&v_zip1='+v_zip1+'&v_zip2='+v_zip2+'&v_addr1='+v_addr1+'&v_addr2='+v_addr2+'&v_eaddr='+v_eaddr+'&v_form='+v_form,'new2','width=448,height=390,status=yes,scrollbars=yes,menubar=no,resizable=1'); p.focus(); } function zipcodePopNew(inputBoxInfo, engDisplayFlag) { p = window.open('/chtml/hosting/zipcode/zipcode_search.php?inputBoxInfo='+inputBoxInfo+'&engDisplayFlag='+engDisplayFlag,'new2','width=650,height=750,status=yes,scrollbars=yes,menubar=no,resizable=1'); p.focus(); } function zipcodePopNew2(inputBoxInfo, engDisplayFlag) { p = window.open('/chtml/hosting/zipcode/zipcode_search_new.php?inputBoxInfo='+inputBoxInfo+'&engDisplayFlag='+engDisplayFlag,'new2','width=650,height=620,status=no,scrollbars=yes,menubar=no,resizable=1'); p.focus(); } // ½Ç¸íÀÎÁõ function checkRealName() { var name = document.getElementById("u_h_name").value; var jumin1 = document.getElementById("u_ssn1").value; var jumin2 = document.getElementById("u_ssn2").value; var W = 440; var H = 257; var X = screen.width / 2 - W / 2; var Y = screen.height / 2 - H / 2; p = window.open( "/chtml/hosting.php?mode=requestCheck&name=" + name + "&jumin1=" + jumin1 + "&jumin2=" + jumin2 + "&prc=1", "jumincheck", "status=yes, scrollbars=1, menubar=no, resizable=1,width=" + W + ", height=" + H + ", top=" + Y + ", left=" + X + ""); p.focus(); } /** * ½Ç¸íÀÎÁõ üũ * Æ˾÷â¿¡¼­ ¼­ºê¹ÔÇÒ ½Ã »ç¿ëµÇ´Â ÇÔ¼ö * */ function form_check_r(theForm) { var alert_msg = ''; var jumin = theForm.jumin1.value+theForm.jumin2.value; var who = document.getElementById('who').value; if (theForm.name.value.length<1) { if (who == 'parent') { alert_msg = 'º¸È£ÀÚÀÇ '; } theForm.name.focus(); alert_msg = alert_msg + 'À̸§À» ÀÔ·ÂÇϼ¼¿ä.'; } else if ((!isNum(theForm.jumin1.value) || jumin<13)) { if (who == 'parent') { alert_msg = 'º¸È£ÀÚÀÇ '; } theForm.jumin1.focus(); alert_msg = alert_msg + 'ÁֹιøÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.'; } else if (!isJumin(theForm.jumin1.value, theForm.jumin2.value)) { if (who == 'parent') { alert_msg = 'º¸È£ÀÚÀÇ '; } theForm.jumin1.focus(); alert_msg = 'À߸øµÈ ' + alert_msg + 'ÁֹιøÈ£ Çü½ÄÀÔ´Ï´Ù.'; } if (alert_msg != '') { alert(alert_msg); return false; } return true; } // ¿µ¹®Ã¼Å© function isMixedNumStr(str) { theValue=false; for(i=0; i= "A") && (cha <= "Z")) theValue=true; else if ( (cha >= "a") && (cha <= "z")) theValue=true; else return theValue; } return theValue; } // ¼ýÀÚüũ function chkNum(obj) { if( obj.value.match(/^[0-9]/) == true ) { return true; } } // ±âŸüũ function chkExceptString(obj) { var filter = /^_|#|[_-]/; if( filter.test(obj.value) == true ) { return true; } } // ´ë¹®ÀÚ Ã¼Å© function chkDaemunja(obj) { for(var i = 0; i < obj.value.length; i++) { var a = obj.value.charCodeAt(i); if(a >= 65 && a <= 90) { return true; } } return false; } // ÁֹιøÈ£ üũ function isJumin(jumin1, jumin2) { var rn; rn=jumin1+jumin2; var sum=0; for(i=0;i<8;i++) { sum+=rn.substring(i,i+1)*(i+2); } for(i=8;i<12;i++) { sum+=rn.substring(i,i+1)*(i-6); } sum=11-(sum%11); if (sum>=10) { sum-=10; } if (rn.substring(12,13) != sum || (rn.substring(6,7) !=1 && rn.substring(6,7) != 2 && rn.substring(6,7) != 3 && rn.substring(6,7) != 4)) { return false; } return true; } // À̸ÞÀÏ Ã¼Å© function isValidEmail(email) { invalidChars = " /:,;"; if(email == "") { return false; } for(i=0;i -1) { return false; } } atPos = email.indexOf("@",1); if(atPos == -1) { return false; } if(email.indexOf("@",atPos+1) > -1) { return false; } periodPos = email.indexOf(".",atPos) if(periodPos == -1) { return false; } if(periodPos + 3 > email.length) { return false; } return true; } function isValidPassword(str) { theValue=false; for(i=0; i= "0" ) theValue=true; else if ( (cha >= "A") && (cha <= "Z")) theValue=true; else if ( (cha >= "a") && (cha <= "z")) theValue=true; else return false; } return theValue; } function isNum(str) { if(str == "") { return false; } for(i=0; i "9") { return false; } } return true; } function moveYuji(f) { f.action = _A + "&prc=1"; f.submit(); } function movehc(f,prc) { /* if(prc == '4'){ if(f.charged_person.value == ""){ alert("ÀÔ±ÝÀÚ¸íÀ» ÀÔ·ÂÇϽʽÿÀ."); f.charged_person.focus(); } } */ //f.action = _A + "&prc="+prc; f.action = _A; f.submit(); } function chkAuto(f) { var form = document.getElementById("serviceCheck"); if( f.crt_id.value == "" ) { alert("¾ÆÀ̵𸦠ÀÔ·ÂÇϽʽÿÀ."); f.crt_id.focus(); return; } if( f.crt_id.value.length < 4 || f.crt_id.value.length > form.maxIdlen.value ) { alert("¾ÆÀ̵ð´Â 4ÀÚÀÌ»ó " + form.maxIdlen.value + "ÀÚ ÀÌÇÏÀÔ´Ï´Ù."); f.crt_id.value = ''; f.crt_id.focus(); return; } if( chkDaemunja(f.crt_id) == true ) { alert("´ë¹®ÀÚ°¡ Æ÷ÇԵǾîÁ® ÀÖ½À´Ï´Ù."); f.crt_id.value = ""; f.crt_id.focus(); return; } if( chkNum(f.crt_id) == true ) { alert("¼ýÀÚ·Î ½ÃÀÛÇÒ ¼ö ¾ø½À´Ï´Ù."); f.crt_id.value = ""; f.crt_id.focus(); return; } if( chkExceptString(f.crt_id) == true ) { alert("Çã¿ëÇÏÁö ¾ÊÀº Ư¼ö¹®ÀÚ°¡ Á¸ÀçÇÕ´Ï´Ù."); f.crt_id.value = ""; f.crt_id.focus(); return; } if( f.cur_passwd.value == "" ) { alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϽʽÿÀ."); f.cur_passwd.focus(); return; } f.action = _A + "&prc=1"; // ssl SSL.send({ 'formName' : f.name, 'elementName' : ['crt_id', 'cur_passwd'], 'postName' : 'sslEncode' }); return false; //f.submit(); } /** * ȸ¿ø ·Î±×ÀÎ ¼­ºê¹Ô * */ function memberLogin(f) { if( f.com_member_login_id.value == "" ) { alert("¾ÆÀ̵𸦠ÀÔ·ÂÇϽʽÿÀ."); f.com_member_login_id.focus(); return; } if( f.com_member_login_pw.value == "" ) { alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϽʽÿÀ."); f.com_member_login_pw.focus(); return; } f.submit(); } // ¹®ÀÚ¿­ ½ÇÁ¦ ±æÀÌ function get_msg_byte(mystr) { var r_len = 0; for(i=0; i?,./&"; return checkstr(pstr, valid, 0); } /* 7. ·Î±×ÀÎ */ function emailidstr(pstr) { var valid = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-@."; return checkstr(pstr, valid, 0); } /* 8. ´Ð³×ÀÓ(º°¸í) ½ºÆ®¸µ üũ */ function nickstr(pstr) { var valid = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-.^/* "; return checkstr(pstr, valid, 1); } /* 9. »óÈ£ ½ºÆ®¸µ üũ */ function corpstr(pstr) { var valid = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~!@#$%^*()_+`-={}|[]\\:\";'<>?,./& "; return checkstr(pstr, valid, 1); } /* 10. ÇØ¿Ü°ÅÁÖ °¡ÀÔÀÚ À̸§ üũ */ function fuserstr(pstr) { var valid = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz., "; return checkstr(pstr, valid, 1); } function checkstr(pstr, pvalid, han) { var valid = pvalid; var tmp; var flag = true; for (var i = 0; i < pstr.length; i++) { flag = true; tmp = "" + pstr.substring(i, i+1); if (han != 1) { if (valid.indexOf(tmp) == "-1") { return false; } } else { ch = escape(pstr.charAt(i)); //ISO-Latin-1 ¹®ÀÚ¼ÂÀ¸·Î º¯°æ if (valid.indexOf(tmp) == "-1" && strCharByte(ch) != 2) { return false; } } } return true;; } function validEmail(emailStr) { /* The following variable tells the rest of the function whether or not to verify that the address ends in a two-letter country or well-known TLD. 1 means check it, 0 means don't. */ var checkTLD = 1; /* The following is the list of known TLDs that an e-mail address must end with. */ var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/; /* The following pattern is used to check if the entered e-mail address fits the user@domain format. It also is used to separate the username from the domain. */ var emailPat = /^(.+)@(.+)$/; /* The following string represents the pattern for matching all special characters. We don't want to allow special characters in the address. These characters include ( ) < > @ , ; : \ " . [ ] */ var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]"; /* The following string represents the range of characters allowed in a username or domainname. It really states which chars aren't allowed.*/ var validChars="\[^\\s" + specialChars + "\]"; /* The following pattern applies if the "user" is a quoted string (in which case, there are no rules about which characters are allowed and which aren't; anything goes). E.g. "jiminy cricket"@disney.com is a legal e-mail address. */ var quotedUser="(\"[^\"]*\")"; /* The following pattern applies for domains that are IP addresses, rather than symbolic names. E.g. joe@[123.124.233.4] is a legal e-mail address. NOTE: The square brackets are required. */ var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/; /* The following string represents an atom (basically a series of non-special characters.) */ var atom = validChars + '+'; /* The following string represents one word in the typical username. For example, in john.doe@somewhere.com, john and doe are words. Basically, a word is either an atom or quoted string. */ var word="(" + atom + "|" + quotedUser + ")"; // The following pattern describes the structure of the user var userPat=new RegExp("^" + word + "(\\." + word + ")*$"); /* The following pattern describes the structure of a normal symbolic domain, as opposed to ipDomainPat, shown above. */ var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$"); /* Finally, let's start trying to figure out if the supplied address is valid. */ /* Begin with the coarse pattern to simply break up user@domain into different pieces that are easy to analyze. */ var matchArray=emailStr.match(emailPat); if (matchArray == null) { /* Too many/few @'s or something; basically, this address doesn't even fit the general mould of a valid e-mail address. */ // alert("Email address seems incorrect (check @ and .'s)"); return false; } var user=matchArray[1]; var domain=matchArray[2]; // Start by checking that only basic ASCII characters are in the strings (0-127). for (i=0; i127) { // alert("Ths username contains invalid characters."); return false; } } for (i=0; i127) { // alert("Ths domain name contains invalid characters."); return false; } } // See if "user" is valid if (user.match(userPat) == null) { // user is not valid // alert("The username doesn't seem to be valid."); return false; } /* if the e-mail address is at an IP address (as opposed to a symbolic host name) make sure the IP address is valid. */ var IPArray = domain.match(ipDomainPat); if (IPArray != null) { // this is an IP address for (var i = 1; i <= 4; i++) { if (IPArray[i] > 255) { // alert("Destination IP address is invalid!"); return false; } } return true; } // Domain is symbolic name. Check if it's valid. var atomPat = new RegExp("^" + atom + "$"); var domArr = domain.split("."); var len = domArr.length; for (i = 0; i < len; i++) { if (domArr[i].search(atomPat)==-1) { // alert("The domain name does not seem to be valid."); return false; } } /* domain name seems valid, but now make sure that it ends in a known top-level domain (like com, edu, gov) or a two-letter word, representing country (uk, nl), and that there's a hostname preceding the domain or country. */ if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1) { // alert("The address must end in a well-known domain or two letter " + "country."); return false; } // Make sure there's a host name preceding the domain. if (len<2) { // alert("This address is missing a hostname!"); return false; } // If we've gotten this far, everything's valid! return true; } /** * ÅÛÇø´ ÆǸÅÇü °áÁ¦°ü·Ã * @author * @date 2006-03-13 ¿ÀÈÄ 1:16 */ // ¹«ÅëÀå °áÁ¦¿¡ °üÇÑ ¼­ºê¹Ô function payMu(f) { if( g("bank_pay_div").style.display == "none" ) { g("bank_pay_div").style.display = "block"; g("payer").focus(); return; } else { if( g("payer").value == "" ) { alert("ÀÔ±ÝÀÚ¸íÀ» ÀÔ·ÂÇϼ¼¿ä"); g("payer").focus(); return; } } var action_url = _A.replace(/com_package_step=([0-9])/, "com_package_step=5_1"); var action_url = action_url.replace(/#/, ""); f.action = action_url + "&prc=1"; f.submit(); } // ¹«ÅëÀå °áÁ¦Á¤º¸ Ãâ·Â function payMu_display(f) { if( g("bank_pay_div").style.display == "none" ) { g("bank_pay_div").style.display = "block"; g("payer").focus(); return; } } // È£½ºÆà ½Åû ¹«ÅëÀå function payMu2(frm) { if( g("bank_pay_div").style.display == "none" ) { g("bank_pay_div").style.display = "block"; g("payer").focus(); return; } else { if(frm.repeatChk == null) { // Áߺ¹ Ŭ¸¯À» ¸·±â À§ÇØ var inputObj = document.createElement('input'); inputObj.type = 'hidden'; inputObj.id = 'repeatChk'; inputObj.name = 'repeatChk'; inputObj.value = '0'; frm.appendChild(inputObj); } if(frm.repeatChk.value == 1) { alert('ó¸®ÁßÀÔ´Ï´Ù.'); return; }else{ if( g("payer").value == "" ) { alert("ÀÔ±ÝÀÚ¸íÀ» ÀÔ·ÂÇϼ¼¿ä"); g("payer").focus(); return; } if(g("payAgree").checked == false) { alert("±¸¸ÅÁøÇà µ¿ÀÇ¿¡ üũÇØ ÁÖ¼¼¿ä."); return; } frm.repeatChk.value = 1; frm.action = '/chtml/pg/reseller/reseller_hosting_payment_exe.php'; frm.target = "hiddenPaymentFrame"; frm.submit(); } } } // Ä«µå°áÁ¦ ÆûÀ» ÄÁÆ®·ÑÇÑ´Ù. function payCardTP(frm) { if(frm.repeatChk == null) { // Áߺ¹ Ŭ¸¯À» ¸·±â À§ÇØ var inputObj = document.createElement('input'); inputObj.type = 'hidden'; inputObj.id = 'repeatChk'; inputObj.name = 'repeatChk'; inputObj.value = '0'; frm.appendChild(inputObj); } if(frm.repeatChk.value == 1) { alert('ó¸®ÁßÀÔ´Ï´Ù.'); return; }else{ if(document.getElementById('builderPgName')) { switch(document.getElementById('builderPgName').value) { case 'kcp': /* if( document.Payplus.object == null ) { alert("\ °í°´´ÔÀÇ ¾ÈÀüÇÑ °áÁ¦¸¦ À§ÇØ °áÁ¦ Á¤º¸¸¦ ¾ÏȣȭÇÏ´Â ÇÁ·Î±×·¥ÀÌ ÇÊ¿äÇÕ´Ï´Ù. \n\n´Ù½Ã ¼³Ä¡ÇϽ÷Á¸é Ctrl + F5Å°¸¦ ´©¸£½Ã°Å³ª ¸Þ´ºÀÇ [º¸±â/»õ·Î°íħ]À» ¼±ÅÃÇÏ¿© ÁֽʽÿÀ."); return false; } */ break; case 'inicis': if(document.INIpay == null || document.INIpay.object == null) { alert("\nÀÌ´ÏÆäÀÌ Ç÷¯±×ÀÎ ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù. \n\n¾ÈÀüÇÑ °áÁ¦¸¦ À§ÇÏ¿© ÀÌ´ÏÆäÀÌ Ç÷¯±×ÀÎÀÇ ¼³Ä¡°¡ ÇÊ¿äÇÕ´Ï´Ù. \n\n´Ù½Ã ¼³Ä¡ÇϽ÷Á¸é Ctrl + F5Å°¸¦ ´©¸£½Ã°Å³ª ¸Þ´ºÀÇ [º¸±â/»õ·Î°íħ]À» ¼±ÅÃÇÏ¿© ÁֽʽÿÀ."); return false; } break; } } frm.repeatChk.value = 1; frm.action = '/chtml/pg/reseller/reseller_hosting_payment_exe.php'; //frm.target = "hiddenPaymentFrame"; //frm.submit(); var pop_title = "pg"; window.open("", pop_title, "width=850, height=650, scrollbars=yes"); frm.target = pop_title; frm.submit(); } } /* °áÁ¦°ü·Ã - end */ //È£½ºÆà ½Åû function selType() { document.all.ac1.style.display = 'none'; document.all.ac2.style.display = 'none'; document.all.ac3.style.display = 'none'; document.all.ac4.style.display = 'none'; document.all.ac5.style.display = 'none'; if(document.form.account[0].checked == true) { document.all.ac2.style.display = ''; } else if(document.form.account[1].checked == true) { document.all.ac3.style.display = ''; } else if(document.form.account[2].checked == true) { document.all.ac4.style.display = ''; } else if(document.form.account[3].checked == true) { document.all.ac5.style.display = ''; } } function checkCharset() { var form = document.form; if(form.service_cset_64autoban.value != "utf8") { if(form.service_wplset.length == undefined) { form.autoInstallAppName.disabled = true; form.autoInstallAppPath.disabled = true; alert("ÇÁ·Î±×·¥ ÀÚµ¿¼³Ä¡´Â UTF-8ȯ°æ¿¡¼­ Á¦°øµË´Ï´Ù."); } else { form.service_wplset[0].checked = true; form.autoInstallAppName.disabled = false; form.autoInstallAppPath.disabled = false; form.service_cset_64autoban.value = "utf8"; alert("ÇÁ·Î±×·¥ ÀÚµ¿¼³Ä¡´Â UTF-8ȯ°æ¿¡¼­ Á¦°øµË´Ï´Ù.\n¼­¹ö ȯ°æÀÌ PHP5 / MYSQL 5.x UTF-8·Î º¯°æµË´Ï´Ù."); } } else { var phpValue = ''; for(var i=0; form.service_wplset.length; i++) { if(form.service_wplset[i].checked == true) { phpValue = form.service_wplset[i].value; break; } } if(phpValue == 'php5.2' && form.autoInstallAppName.value == 'zbxe') { alert("XpressEngine Core ver. 1.8 ÀÌ»óºÎÅÍ´Â PHP 5.3À» ÀÌ¿ëÇÏ¼Å¾ß ÇÕ´Ï´Ù."); form.autoInstallAppName.value = ''; return; } if(form.autoInstallFlag.checked == true) { form.autoInstallAppName.disabled = false; form.autoInstallAppPath.disabled = false; } else { form.autoInstallAppName.disabled = true; form.autoInstallAppPath.disabled = true; } return; } } function setCharset() { var form = document.form; getAutoInstallProgram(); var phpValue = ''; for(var i=0; form.service_wplset.length; i++) { if(form.service_wplset[i].checked == true) { phpValue = form.service_wplset[i].value; break; } } if(form.service_cset_64autoban.value.indexOf("utf8")>=0) { if(phpValue == 'php5.2' && form.autoInstallAppName.value == 'zbxe') { alert("XpressEngine Core ver. 1.8 ÀÌ»óºÎÅÍ´Â PHP 5.3À» ÀÌ¿ëÇÏ¼Å¾ß ÇÕ´Ï´Ù."); form.autoInstallAppName.value = ''; return; } if(form.autoInstallFlag.checked == true) { form.autoInstallAppName.disabled = false; form.autoInstallAppPath.disabled = false; } else { form.autoInstallAppName.disabled = true; form.autoInstallAppPath.disabled = true; } } else { form.autoInstallFlag.checked = false; form.autoInstallAppName.disabled = true; form.autoInstallAppPath.disabled = true; } } function changeAutoInstallApp() { var form = document.form; var phpValue = ''; for(var i=0; form.service_wplset.length; i++) { if(form.service_wplset[i].checked == true) { phpValue = form.service_wplset[i].value; break; } } if(phpValue == 'php5.2' && form.autoInstallAppName.value == 'zbxe') { alert("XpressEngine Core ver. 1.8 ÀÌ»óºÎÅÍ´Â PHP 5.3À» ÀÌ¿ëÇÏ¼Å¾ß ÇÕ´Ï´Ù."); form.autoInstallAppName.value = ''; return; } clearSelectBox(form.autoInstallAppPath); newelem = document.createElement('option'); newelem.text = '¼³Ä¡°æ·Î¸¦ ¼±ÅÃÇϼ¼¿ä'; newelem.value = ''; form.autoInstallAppPath.options.add(newelem); if(form.autoInstallAppName.value != "") { newelem = document.createElement('option'); newelem.text = 'www'; newelem.value = '@default_www@'; form.autoInstallAppPath.options.add(newelem); newelem = document.createElement('option'); newelem.text = 'www/' + appNamesPath[form.autoInstallAppName.value]; newelem.value = appNamesPath[form.autoInstallAppName.value]; form.autoInstallAppPath.options.add(newelem); document.getElementById("autoInstallPathText2").innerText = appNamesAdminIntro[form.autoInstallAppName.value]; } else { document.getElementById("autoInstallPathText2").innerText = ""; } document.getElementById("autoInstallPathText").innerText = ""; } function changeAutoInstallPath(val) { if(val == "") { alert("¼³Ä¡ °æ·Î¸¦ ¼±ÅÃÇϼ¼¿ä."); return; } var pathText = "¿¹) mynameis.com"; if(val == '@default_www@') { document.getElementById("autoInstallPathText").innerText = pathText; } else { document.getElementById("autoInstallPathText").innerText = pathText + "/" + val; } } function clearSelectBox(obj) { if(obj.length > 0) { for(var i=obj.length; i>0; i--) { obj.remove(obj.options[i-1]); } } } function getServerEnvData(serviceInfoIdx) { var serverEnvDiv = document.getElementById("divSpcOptContEnv"); var charsetDiv = document.getElementById('divSpcOptContNor'); var baseApplicationTr = document.getElementById("baseApplicationTr"); if(baseApplicationTr) { var param = "service_info_idx=" + serviceInfoIdx; Ajaxs.init("/chtml/hosting/product/product_server_env_xmlhttp.php", { method: "post" , asynchronous: true , parameters: param , onCreate: function(){alert("create");} , onComplete: function(xhrObj) { var data = eval('('+xhrObj.responseText+')'); var baseApplicationSelect = document.getElementById("baseApplication"); clearSelectBox(baseApplicationSelect); if(data.result == true) { newelem = document.createElement("option"); newelem.text = '-- ¼±ÅÃÇϼ¼¿ä. --'; newelem.value = ''; baseApplicationSelect.options.add(newelem); for(var i=0; i < data.resultData.baseApplicationData.length; i++) { var row = data.resultData.baseApplicationData[i]; newelem = document.createElement("option"); newelem.text = row.envText; newelem.value = row.idx; baseApplicationSelect.options.add(newelem); } } else { return; } } }); } if(serverEnvDiv || charsetDiv) { var param = "service_info_idx=" + serviceInfoIdx; Ajaxs.init("/chtml/hosting/product/product_server_env_xmlhttp.php", { method: "post" , asynchronous: true , parameters: param , onCreate: function(){alert("create");} , onComplete: function(xhrObj) { var data = eval('('+xhrObj.responseText+')'); if(data.result == true) { var serverEnvDiv = document.getElementById("divSpcOptContEnv"); if(serverEnvDiv && serverEnvDiv.style.display == "block" && data.resultData.languageCharsetData.length > 0) { var serverEnvDivHtml = ""; var defaultCheck = ""; for(var i=0; i < data.resultData.languageCharsetData.length; i++) { var row = data.resultData.languageCharsetData[i]; var checked = ""; if(i == 0) { checked = "checked"; defaultCheck = row.envContent.charset; } serverEnvDivHtml += "" + row.envText + "
"; } serverEnvDivHtml += ""; serverEnvDiv.innerHTML = serverEnvDivHtml; setCharsetInput(defaultCheck); } if(charsetDiv && charsetDiv.style.display == "block" && data.resultData.charsetData.length > 0) { var charsetDivHtml = ""; for(var i=0; i < data.resultData.charsetData.length; i++) { var row = data.resultData.charsetData[i]; var checked = ""; if(i == (data.resultData.charsetData.length -1)) { checked = "checked"; } charsetDivHtml += "" + row.envText + " "; } //charsetDivHtml += "
"; //charsetDivHtml += "(´Ù±¹¾î »çÀÌÆ®¸¦ ¿î¿µÇϽðųª Á¦·Îº¸µåXE µîÀÇ UTF-8 Áö¿ø ÇÁ·Î±×·¥À» »ç¿ëÇÏ½Ç °í°´´ÔÀº UTF-8¸¦ ¼±ÅÃÇϼ¼¿ä. Á¦·Îº¸µå4 - EUC-KR ¼±ÅÃ)"; charsetDiv.innerHTML = charsetDivHtml; } if($("input[name=autoInstallFlag]")) { AutoInstallProgram(data.resultData.autoInstallProgramData); } } else { return; } } }); } } function setCharsetInput(val) { var obj = document.getElementById("service_cset_64autoban"); obj.value = val } function changeBaseApplicationText() { var radioObj = document.getElementsByName("ostype"); var ostype=''; for(k=0;kÇÁ·Î±×·¥À» ¼±ÅÃÇØÁÖ¼¼¿ä."); $("select[name=autoInstallAppName]").attr("disabled", true); $("select[name=autoInstallAppPath]").empty().data('options'); $("select[name=autoInstallAppPath]").append(""); $("select[name=autoInstallAppPath]").attr("disabled", true); var url = "/chtml/hosting/product/product_auto_install_program_xmlhttp.php"; $.ajax({ url:url, type:'post', data:queryString, dataType:'json', error:function(error, textStatus, setting){ alert('½ÇÆÐ : ' + textStatus + error.status); //alert(error.status); }, success:function(obj) { if (obj.result == true) { AutoInstallProgram(obj.resultData); /* for(var i=0; i < obj.resultData.length; i++) { var row = obj.resultData[i]; $("select[name=autoInstallAppName]").append(""); appNamesAdminIntro[row.envContent.programEngName] = row.envContent.programAminIntro; appNamesPath[row.envContent.programEngName] = row.envContent.installPath; } */ } else { alert(obj.resultMsg); } } }); } function AutoInstallProgram(data) { var checked = true; //if($("input[name=autoInstallFlag]").prop("checked") == true) { // var checked = false; //} $("input[name=autoInstallFlag]").prop("checked", false); $("#autoInstallPathText").html(""); $("#autoInstallPathText2").text(""); $("select[name=autoInstallAppName]").empty().data('options'); $("select[name=autoInstallAppName]").append(""); $("select[name=autoInstallAppName]").attr("disabled", checked); $("select[name=autoInstallAppPath]").empty().data('options'); $("select[name=autoInstallAppPath]").append(""); $("select[name=autoInstallAppPath]").attr("disabled", checked); for(var i=0; i < data.length; i++) { var row = data[i]; $("select[name=autoInstallAppName]").append(""); appNamesAdminIntro[row.envContent.programEngName] = row.envContent.programAminIntro; appNamesPath[row.envContent.programEngName] = row.envContent.installPath; } }