1$(document).ready(function(){ 2 3 $('#div_load_image').hide(); //ë¡ë©ë°ë¥¼ ì¨ê²¨ì¤ë¤. 4 5 // set csrf 6 $.ajaxPrefilter(function (options, originalOptions, jqXHR) { 7 if (!options.processData && !options.contentType) { 8 options.data.append('dt_csrf_token', getCookie('dt_csrf_cookie')) 9 } else if (options.type.toLowerCase() === 'post') { 10 options.data = $.param($.extend({}, originalOptions.data, { 11 dt_csrf_token: getCookie('dt_csrf_cookie') 12 })) 13 } 14 }); 15 16 // set ajax error 17 $(document).on('ajaxError', function (jqXHR, textStatus, errorThrown) { 18 if (jqXHR.status === 401 || jqXHR.status === 403) { 19 alert('ì´ì ì ê·¼ì´ ê°ì§ëì´ íì´ì§ë¥¼ ì¬ì ì í©ëë¤.'); 20 window.location.reload(); 21 } 22 23 //console.log(jqXHR) 24 //console.log(textStatus) 25 //console.log(errorThrown) 26 }); 27 28 /* 29 $(".datepicker input").datepicker({ 30 dateFormat:"yy-mm-dd" 31 }).datepicker("setDate", "today"); 32 */ 33 $.datepicker.setDefaults($.datepicker.regional['ko']); 34 $( "#sch_sdate" ).datepicker({ 35 //changeMonth: true, 36 //changeYear: true, 37 stepMonths: 4, //next,prev ë²í¼ í´ë¦ì íë²ì ì´ëíë ê°ìì 38 nextText: 'ë¤ì ë¬', 39 prevText: 'ì´ì ë¬', 40 dayNames: ['ì¼ìì¼', 'ììì¼', 'íìì¼', 'ììì¼', '목ìì¼', 'ê¸ìì¼', 'í ìì¼'], 41 dayNamesMin: ['ì¼', 'ì', 'í', 'ì', '목', 'ê¸', 'í '], 42 monthNamesShort: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 43 monthNames: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 44 numberOfMonths: [2,2], // íë²ì ì¼ë§ë ë§ì ìì íìí ê²ì¸ê°. [2,3] ì¼ ê²½ì°, 2(í) x 3(ì´) = 6ê°ì ìì íìíë¤. 45 dateFormat: "yy-mm-dd", 46 maxDate: 0, // ì íí ììë ìµìë ì§, ( 0 : ì¤ë ì´í ë ì§ ì í ë¶ê°) 47 onClose: function( selectedDate ) { //ììì¼(startDate) datepickerê° ë«íë //ì¢ ë£ì¼(endDate)ì ì íí ììë ìµì ë ì§(minDate)를 ì íí ììì¼ë¡ ì§ì 48 $("#sch_edate").datepicker( "option", "minDate", selectedDate ); 49 } 50 }); 51 $( "#sch_edate" ).datepicker({ 52 //changeMonth: true, 53 //changeYear: true, 54 stepMonths: 4, //next,prev ë²í¼ í´ë¦ì íë²ì ì´ëíë ê°ìì 55 nextText: 'ë¤ì ë¬', 56 prevText: 'ì´ì ë¬', 57 dayNames: ['ì¼ìì¼', 'ììì¼', 'íìì¼', 'ììì¼', '목ìì¼', 'ê¸ìì¼', 'í ìì¼'], 58 dayNamesMin: ['ì¼', 'ì', 'í', 'ì', '목', 'ê¸', 'í '], 59 monthNamesShort: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 60 monthNames: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 61 numberOfMonths: [2,2], // íë²ì ì¼ë§ë ë§ì ìì íìí ê²ì¸ê°. [2,3] ì¼ ê²½ì°, 2(í) x 3(ì´) = 6ê°ì ìì íìíë¤. 62 dateFormat: "yy-mm-dd", 63 maxDate: 0, // ì íí ììë ìµëë ì§, ( 0 : ì¤ë ì´í ë ì§ ì í ë¶ê°) 64 onClose: function( selectedDate ) { //ììì¼(startDate) datepickerê° ë«íë //ì¢ ë£ì¼(endDate)ì ì íí ììë ìµì ë ì§(minDate)를 ì íí ììì¼ë¡ ì§ì 65 $("#sch_sdate").datepicker( "option", "maxDate", selectedDate ); 66 } 67 }); 68 69 $.datepicker.setDefaults($.datepicker.regional['ko']); 70 $( "#sdate" ).datepicker({ 71 //changeMonth: true, 72 //changeYear: true, 73 nextText: 'ë¤ì ë¬', 74 prevText: 'ì´ì ë¬', 75 dayNames: ['ì¼ìì¼', 'ììì¼', 'íìì¼', 'ììì¼', '목ìì¼', 'ê¸ìì¼', 'í ìì¼'], 76 dayNamesMin: ['ì¼', 'ì', 'í', 'ì', '목', 'ê¸', 'í '], 77 monthNamesShort: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 78 monthNames: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 79 numberOfMonths: [1,1], // íë²ì ì¼ë§ë ë§ì ìì íìí ê²ì¸ê°. [2,3] ì¼ ê²½ì°, 2(í) x 3(ì´) = 6ê°ì ìì íìíë¤. 80 dateFormat: "yy-mm-dd", 81 //maxDate: 0, // ì íí ììë ìµìë ì§, ( 0 : ì¤ë ì´í ë ì§ ì í ë¶ê°) 82 onClose: function( selectedDate ) { //ììì¼(startDate) datepickerê° ë«íë //ì¢ ë£ì¼(endDate)ì ì íí ììë ìµì ë ì§(minDate)를 ì íí ììì¼ë¡ ì§ì 83 $("#edate").datepicker( "option", "minDate", selectedDate ); 84 } 85 }); 86 $( "#edate" ).datepicker({ 87 //changeMonth: true, 88 //changeYear: true, 89 nextText: 'ë¤ì ë¬', 90 prevText: 'ì´ì ë¬', 91 dayNames: ['ì¼ìì¼', 'ììì¼', 'íìì¼', 'ììì¼', '목ìì¼', 'ê¸ìì¼', 'í ìì¼'], 92 dayNamesMin: ['ì¼', 'ì', 'í', 'ì', '목', 'ê¸', 'í '], 93 monthNamesShort: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 94 monthNames: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 95 numberOfMonths: [1,1], // íë²ì ì¼ë§ë ë§ì ìì íìí ê²ì¸ê°. [2,3] ì¼ ê²½ì°, 2(í) x 3(ì´) = 6ê°ì ìì íìíë¤. 96 dateFormat: "yy-mm-dd", 97 //maxDate: 0, // ì íí ììë ìµëë ì§, ( 0 : ì¤ë ì´í ë ì§ ì í ë¶ê°) 98 onClose: function( selectedDate ) { //ììì¼(startDate) datepickerê° ë«íë //ì¢ ë£ì¼(endDate)ì ì íí ììë ìµì ë ì§(minDate)를 ì íí ììì¼ë¡ ì§ì 99 $("#sdate").datepicker( "option", "maxDate", selectedDate ); 100 } 101 }); 102 103 $( "#rdate" ).datepicker({ 104 //changeMonth: true, 105 //changeYear: true, 106 nextText: 'ë¤ì ë¬', 107 prevText: 'ì´ì ë¬', 108 dayNames: ['ì¼ìì¼', 'ììì¼', 'íìì¼', 'ììì¼', '목ìì¼', 'ê¸ìì¼', 'í ìì¼'], 109 dayNamesMin: ['ì¼', 'ì', 'í', 'ì', '목', 'ê¸', 'í '], 110 monthNamesShort: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 111 monthNames: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 112 numberOfMonths: [1,1], // íë²ì ì¼ë§ë ë§ì ìì íìí ê²ì¸ê°. [2,3] ì¼ ê²½ì°, 2(í) x 3(ì´) = 6ê°ì ìì íìíë¤. 113 dateFormat: "yy-mm-dd", 114 //maxDate: 0, // ì íí ììë ìµìë ì§, ( 0 : ì¤ë ì´í ë ì§ ì í ë¶ê°) 115 }); 116 117}) 118.ajaxStart(function(){ 119 $('#div_load_image').center(); 120 $('#div_load_image').show(); //ajaxì¤íì ë¡ë©ë°ë¥¼ ë³´ì¬ì¤ë¤. 121}) 122.ajaxStop(function(){ 123 $('#div_load_image').hide(); //ajaxì¢ ë£ì ë¡ë©ë°ë¥¼ ì¨ê²¨ì¤ë¤. 124}); 125 126$.fn.center = function() { 127 this.css({ 128 'position': 'fixed', 129 'left': '50%', 130 'top': '50%' 131 }); 132 this.css({ 133 'margin-left': -this.outerWidth() / 2 + 'px', 134 'margin-top': -this.outerHeight() / 2 + 'px' 135 }); 136 137 return this; 138} 139 140/** 141 * AJAXí¸ì¶ì ê³µíµí¨ìë¡ ì²ë¦¬ 142 * callback_id : íì²ë¦¬ 구ë¶ê° 143 * url : í¸ì¶ì£¼ì 144 * type : POST or GET 145 * data : ì ë¬ ë°ì´í° 146 * async : true(ë¹ë기) or false 147 * form_use : í¼ì ì¡ ì¬ì©ì true 148 * temp : ìì 149 * response.result : 999(ì¸ì ë§ë£),888(ê¶íìì),400(ì²ë¦¬ì¤ë¥) 150*/ 151var isAjaxCall = false;
152function common_ajax_call(callbackId,url,type,data,async,formUse,temp) { 153 if(isAjaxCall == true) { return; } 154 155 if(formUse){ 156 processData = false; 157 contentType = false; 158 }else{ 159 processData = true; 160 contentType = "application/x-www-form-urlencoded; charset=UTF-8"; 161 } 162 isAjaxCall = true; 163 $.ajax({ 164 url: url, 165 type: type, 166 data: data, 167 dataType: "json", 168 cache: false, 169 contentType: contentType, 170 processData: processData, 171 async: async, 172 success: function(response) { 173 if(response.result == '999'){//ì¸ì ë§ë£ ì²ë¦¬ 174 modalAlert(response.desc,function(){ 175 location.href = siteUrl+'member/login'; 176 }); 177 }else if(response.result == '888' || response.result == '400'){ 178 modalAlert(response.desc); 179 }else{ 180 ajax_callBack(callbackId,response,temp); 181 } 182 isAjaxCall = false; 183 }, 184 error: function(request,status,error) { 185 if(request.status === 401 || request.status === 403) { 186 alert('ì¼ìì ì¸ ì¤ë¥ ì ëë¤. ë¤ì ìëí´ ì£¼ì¸ì.'); 187 }else{ 188 alert("ERROR : ìë² ì¤ë¥ ê´ë¦¬ììê² ë¬¸ìíì¸ì."); 189 } 190 //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error); 191 isAjaxCall = false; 192 }, 193 complete: function (response) { 194 195 } 196 }); 197} 198 199function getCookie(cname) { 200 var name = cname + '=' 201 var decodedCookie = decodeURIComponent(document.cookie) 202 var ca = decodedCookie.split(';') 203 for(var i = 0; i <ca.length; i++) { 204 var c = ca[i] 205 while (c.charAt(0) == ' ') { 206 c = c.substring(1) 207 } 208 if (c.indexOf(name) == 0) { 209 return c.substring(name.length, c.length) 210 } 211 } 212 return '' 213} 214 215/** 216 * ë³ìì§ì ì½ëë¡ ìë£ê³¼ 리ì¤í¸ ë°í 217 * @param {string} val1 í¤ 218 * @param {string} val2 ìë£ê³¼ ì ë í¸ë°ì¤ ID 219 * @param {string} sel ì íë ê° 220 */ 221function go_doctor_center_list(val1,val2,sel){ 222 var data = {}; 223 data['code_key'] = val1; 224 $.ajax({ 225 url: siteUrl+'api/get_doctor_center_list_ajax', 226 type: 'POST', 227 data: data, 228 dataType: "json", 229 success: function(response) { 230 if(response.result == '100'){ 231 232 $("#"+val2).empty(); 233 var rstHtml = '<option value="">ì í</option>'; 234 if (response.list.length > 0) { //리ì¤í¸ ë°ì´í°ê° ììë 235 236 $.each(response.list, function(k, v) { 237 selected = (sel == v.code_no) ? 'selected' : ''; 238 rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+'</option>'; 239 }); 240 } 241 242 $("#"+val2).append(rstHtml); 243 $('select').niceSelect('update'); 244 245 }else{ 246 modalAlert(response.desc); 247 } 248 }, 249 error: function(request,status,error) { 250 if(request.status === 401 || request.status === 403) { 251 alert('ì¼ìì ì¸ ì¤ë¥ ì ëë¤. ë¤ì ìëí´ ì£¼ì¸ì.'); 252 }else{ 253 alert("ERROR : ìë² ì¤ë¥ ê´ë¦¬ììê² ë¬¸ìíì¸ì."); 254 } 255 //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error); 256 }, 257 complete: function (response) { 258 259 } 260 }); 261} 262 263/** 264 * ë³ìì§ì ì½ëë¡ ìê³¼ì¼í° 리ì¤í¸ ë°í 265 * @param {string} val1 í¤ 266 * @param {string} val2 ìê³¼ì¼í° ì ë í¸ë°ì¤ ID 267 * @param {string} sel ì íë ê° 268 */ 269 function go_counsel_center_list(val1,val2,sel){ 270 var data = {}; 271 data['code_key'] = val1; 272 $.ajax({ 273 url: siteUrl+'api/get_counsel_center_list_ajax', 274 type: 'POST', 275 data: data, 276 dataType: "json", 277 success: function(response) { 278 if(response.result == '100'){ 279 280 $("#"+val2).empty(); 281 var rstHtml = '<option value="">ì í</option>'; 282 if (response.list.length > 0) { //리ì¤í¸ ë°ì´í°ê° ììë 283 284 $.each(response.list, function(k, v) { 285 selected = (sel == v.code_no) ? 'selected' : ''; 286 rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+'</option>'; 287 }); 288 } 289 290 $("#"+val2).append(rstHtml); 291 $('select').niceSelect('update'); 292 293 }else{ 294 modalAlert(response.desc); 295 } 296 }, 297 error: function(request,status,error) { 298 if(request.status === 401 || request.status === 403) { 299 alert('ì¼ìì ì¸ ì¤ë¥ ì ëë¤. ë¤ì ìëí´ ì£¼ì¸ì.'); 300 }else{
301 alert("ERROR : ìë² ì¤ë¥ ê´ë¦¬ììê² ë¬¸ìíì¸ì."); 302 } 303 //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error); 304 }, 305 complete: function (response) { 306 307 } 308 }); 309} 310 311/** 312 * ë³ìì§ì ì½ëë¡ ìë´ì§ë£ê³¼ëª© ë°í 313 * @param {string} val1 í¤ 314 * @param {string} val2 ìë´ì§ë£ê³¼ëª© ì ë í¸ë°ì¤ ID 315 * @param {string} sel ì íë ê° 316 * @param {string} gu ì¨ë¼ì¸ìë´(online), ì§ë£ìì½(reserve) êµ¬ë¶ 317 */ 318 function go_counsel_medical_department_list(val1,val2,sel,gu){ 319 var data = {}; 320 data['code_key'] = val1; 321 $.ajax({ 322 url: siteUrl+'api/get_counsel_medical_department_list_ajax', 323 type: 'POST', 324 data: data, 325 dataType: "json", 326 success: function(response) { 327 if(response.result == '100'){ 328 329 $("#"+val2).empty(); 330 var rstHtml = '<option value="">ì í</option>'; 331 if (response.list.length > 0) { //리ì¤í¸ ë°ì´í°ê° ììë 332 333 $.each(response.list, function(k, v) { 334 selected = (sel == v.code_no) ? 'selected' : ''; 335 if ((gu == 'online' || gu == 'reserve') && v.code_value == 'ì¬ì·ìììê³¼'){ 336 rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+' (â»ë림ë ì¦ ê´ë ¨ ìì½ì ì íìë´ë§ ê°ë¥)</option>'; 337 }else if ((gu == 'online' || gu == 'reserve') && v.code_value == 'ìë ¥êµì '){ 338 rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+' (â»ìë ¥êµì ìì ì ê²ì¬ ê´ë ¨ 문ìë ì íìë´ë§ ê°ë¥)</option>'; 339 }else if ((gu == 'online' || gu == 'reserve') && v.code_value == 'ê°ë§'){ 340 rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+' (â»ë ì¦ ê´ë ¨ ìì½ì ì í ìë´ë§ ê°ë¥)</option>'; 341 }else{ 342 rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+'</option>'; 343 } 344 }); 345 } 346 347 $("#"+val2).append(rstHtml); 348 $('select').niceSelect('update'); 349 350 }else{ 351 modalAlert(response.desc); 352 } 353 }, 354 error: function(request,status,error) { 355 if(request.status === 401 || request.status === 403) { 356 alert('ì¼ìì ì¸ ì¤ë¥ ì ëë¤. ë¤ì ìëí´ ì£¼ì¸ì.'); 357 }else{ 358 alert("ERROR : ìë² ì¤ë¥ ê´ë¦¬ììê² ë¬¸ìíì¸ì."); 359 } 360 //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error); 361 }, 362 complete: function (response) { 363 364 } 365 }); 366} 367 368/** 369 * ë³ìì§ì ì½ëì ìê³¼ì¼í°ì½ëë¡ ìë£ì§ 리ì¤í¸ ë°í 370 * @param {string} val1 ë³ìì§ì í¤ 371 * @param {string} val2 ìë£ì§ ì ë í¸ë°ì¤ ID 372 * @param {string} val3 ìê³¼ì¼í° í¤ 373 * @param {string} sel ì íë ê° 374 */ 375 function go_doctor_list(val1,val2,val3,sel){ 376 var data = {}; 377 data['branch_code_key'] = val1; 378 data['center_code_no'] = val3; 379 $.ajax({ 380 url: siteUrl+'api/get_doctor_list_ajax', 381 type: 'POST', 382 data: data, 383 dataType: "json", 384 success: function(response) { 385 if(response.result == '100'){ 386 387 $("#"+val2).empty(); 388 var rstHtml = '<option value="">ì í</option>'; 389 if (response.list.length > 0) { //리ì¤í¸ ë°ì´í°ê° ììë 390 391 $.each(response.list, function(k, v) { 392 selected = (sel == v.doctor_no) ? 'selected' : ''; 393 rstHtml += '<option value="'+v.doctor_no+'" '+selected+'>'+v.doctor_name+'</option>'; 394 }); 395 } 396 397 $("#"+val2).append(rstHtml); 398 $('select').niceSelect('update'); 399 400 }else{ 401 modalAlert(response.desc); 402 } 403 }, 404 error: function(request,status,error) { 405 alert("ERROR : ìë² ì¤ë¥ ê´ë¦¬ììê² ë¬¸ìíì¸ì."); 406 //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error); 407 }, 408 complete: function (response) { 409 410 } 411 }); 412} 413 414/** 415 * ë³ìì§ì ì½ëì ìë´ì§ë£ê³¼ëª©ì½ëë¡ ìë£ì§ 리ì¤í¸ ë°í 416 * @param {string} val1 ë³ìì§ì í¤ 417 * @param {string} val2 ìë£ì§ ì ë í¸ë°ì¤ ID 418 * @param {string} val3 ìë´ì§ë£ê³¼ëª©ì½ë í¤ 419 * @param {string} sel ì íë ê° 420 */ 421 function go_medical_doctor_list(val1,val2,val3,sel){ 422 var data = {}; 423 data['branch_code_key'] = val1; 424 data['medical_department'] = val3; 425 $.ajax({ 426 url: siteUrl+'api/get_medical_doctor_list_ajax', 427 type: 'POST', 428 data: data, 429 dataType: "json", 430 success: function(response) { 431 if(response.result == '100'){ 432 433 $("#"+val2).empty(); 434 var rstHtml = '<option value="">ì í</option>'; 435 if (response.list.length > 0) { //리ì¤í¸ ë°ì´í°ê° ììë 436 437 $.each(response.list, function(k, v) { 438 selected = (sel == v.doctor_no) ? 'selected' : ''; 439 rstHtml += '<option value="'+v.doctor_no+'" '+selected+'>'+v.doctor_name+'</option>'; 440 }); 441 } 442 443 $("#"+val2).append(rstHtml); 444 $('select').niceSelect('update'); 445 446 }else{ 447 modalAlert(response.desc); 448 } 449 }, 450 error: function(request,status,error) {
451 alert("ERROR : ìë² ì¤ë¥ ê´ë¦¬ììê² ë¬¸ìíì¸ì."); 452 //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error); 453 }, 454 complete: function (response) { 455 456 } 457 }); 458} 459 460/** 461 * PC ë° ëª¨ë°ì¼ ìë£ì§ ê²ì 462 */ 463function go_doctor_search(){ 464 var schBranchCodeKey = $('#sch_branch_code_key').val(); 465 466 if(schBranchCodeKey){ 467 var schCenterCodeNo = $('#sch_center_code_no').val(); 468 var schDoctorNo = ($("#sch_doctor_no").val()) ? $("#sch_doctor_no option:checked").text() : ''; 469 470 location.href = siteUrl+'about/doctor_list?sch_branch_code_key='+schBranchCodeKey+'&sch_center_code_no='+schCenterCodeNo+'&sch_text='+schDoctorNo; 471 }else{ 472 var schDoctorName = $('#sch_doctor_name').val(); 473 location.href = siteUrl+'about/doctor_list?sch_branch_code_key=1&sch_text='+schDoctorName; 474 } 475} 476 477/** 478 * íì¼ë¤ì´ë¡ë 479 */ 480function file_download(val1,val2,val3){ 481 //location.href = siteUrl+`api/file_download?url=${val1}&ori=${val2}&save=${val3}`; 482 location.href = siteUrl+'api/file_download?url='+val1+'&ori='+val2+'&save='+val3; 483} 484 485/** 486 * ë¬ë ¥ì´ë 487 */ 488 function move_calendar(val1,yyyy,mm){ 489 var date = new Date(yyyy,mm-1,1); 490 var yyyy1 = ''; 491 var mm1 = ''; 492 493 switch(val1){ 494 case 'y1' : //ì´ì ì°ë 495 date.setFullYear(date.getFullYear()-1); 496 yyyy1 = date.getFullYear(); 497 mm1 = date.getMonth()+1; 498 break; 499 500 case 'y2' : //ë¤ìì°ë 501 date.setFullYear(date.getFullYear()+1); 502 yyyy1 = date.getFullYear(); 503 mm1 = date.getMonth()+1; 504 break; 505 506 case 'm1' : //ì´ì ë¬ 507 date.setMonth(date.getMonth()-1); 508 yyyy1 = date.getFullYear(); 509 mm1 = date.getMonth()+1; 510 break; 511 512 case 'm2' : //ë¤ìë¬ 513 date.setMonth(date.getMonth()+1); 514 yyyy1 = date.getFullYear(); 515 mm1 = date.getMonth()+1; 516 break; 517 default: 518 } 519 520 var returnArray = new Array(yyyy1,mm1); 521 522 return returnArray; 523 524} 525 526 527function FN_CheckId(id){ 528 529 var num = id.search(/[0-9]/g); 530 var eng = id.search(/[a-zA-Z]/ig); 531 var spe = id.search(/[`~!@#$%^&*()\-_=+\[\]{}|\\\'\";:\/?,,<>]/gi); 532 533 var msg = ''; 534 535 if(id.search(/\s/) != -1){ 536 msg = "ìì´ëë 공백ìì´ 4ì ì´ì ì문/ì«ì ì¡°í©ë§ ê°ë¥í©ëë¤."; 537 }else if(id.length < 4){ 538 msg = "ìì´ëë 공백ìì´ 4ì ì´ì ì문/ì«ì ì¡°í©ë§ ê°ë¥í©ëë¤."; 539 }else if(spe >= 0){ 540 msg = "ìì´ëë 공백ìì´ 4ì ì´ì ì문/ì«ì ì¡°í©ë§ ê°ë¥í©ëë¤."; 541 }else { 542 543 } 544 return msg; 545} 546 547function FN_CheckPw(pw){ 548 549 var num = pw.search(/[0-9]/g); 550 var eng = pw.search(/[a-zA-Z]/ig); 551 var spe = pw.search(/[`~!@#$%^&*()\-_=+\[\]{}|\\\'\";:\/?,,<>]/gi); 552 553 var msg = ''; 554 var chkmin = 0; 555 if(num < 0) chkmin++; 556 if(eng < 0) chkmin++; 557 if(spe < 0) chkmin++; 558 559 if(pw.length < 8 || pw.length > 12){ 560 msg = "8~12ìë¡ ì문,ì«ì,í¹ì문ì ì¤ 2ê°ì§ ì´ì ì¡°í©ì¼ë¡ ì ë ¥í´ ì£¼ì¸ì."; 561 }else if(pw.search(/\s/) != -1){ 562 msg = "8~12ìë¡ ì문,ì«ì,í¹ì문ì ì¤ 2ê°ì§ ì´ì ì¡°í©ì¼ë¡ ì ë ¥í´ ì£¼ì¸ì."; 563 }else if(chkmin>=2){ 564 msg = "8~12ìë¡ ì문,ì«ì,í¹ì문ì ì¤ 2ê°ì§ ì´ì ì¡°í©ì¼ë¡ ì ë ¥í´ ì£¼ì¸ì."; 565 }else { 566 567 } 568 return msg; 569} 570 571function FN_CheckEmail(email){ 572 var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; 573 574 if (filter.test(email) == false) 575 { 576 return false; 577 }else{ 578 return true; 579 } 580} 581 582function FN_CheckHp(num) { 583 var regExp = /^(01[016789]{1}|02|0[3-9]{1}[0-9]{1})-?[0-9]{3,4}-?[0-9]{4}$/; 584 585 if(!regExp.test(num)) { 586 return false; 587 }else{ 588 return true; 589 } 590} 591 592$(document).on("keyup", ".onlynumber", function() { 593 $(this).val( $(this).val().replace(/[^0-9]/g,'') ); //ì«ì 594}); 595$(document).on("keyup", ".onlyengnum", function() { 596 $(this).val( $(this).val().replace(/[^0-9a-zA-Z]/g,'') ); //ì«ì+ì문 597}); 598 599 600function go_valid_text(id,msg,gubun){ 601 if(gubun == 'add'){ 602 $('#'+id).addClass('error'); 603 $('#'+id+'_desc').addClass('error-alert'); 604 $('#'+id+'_desc').text(msg); 605 }else if(gubun == 'remove'){ 606 $('#'+id).removeClass('error'); 607 $('#'+id+'_desc').removeClass('error-alert'); 608 $('#'+id+'_desc').text(msg); 609 } 610} 611 612var validChkResult = {}; //í¼ì²´í¬ ì ìë³ì 613/** 614 * í¼ì²´í¬ í¨ì 615 * @param {*} inputGubun : input type êµ¬ë¶ 616 * @param {*} id : input íê·¸ ID 617 * @param {*} errorMsg : ìë¬ ë©ìì§ 618 * @param {*} defaultMsg : ëí´í¸ ë©ìì§ 619 * @param {*} alertYn : ê²½ê³ ì°½ì¬ë¶ 620 */ 621function FN_required_valid_chk(inputGubun,id,errorMsg,defaultMsg,alertYn){ 622 var inputText = ''; 623 if(inputGubun == 'input' || inputGubun == 'select' || inputGubun == 'niceselect'){ 624 inputText = $.trim($('#'+id).val()); 625 }else if(inputGubun == 'agreecheck'){ 626 inputText = ($('input:checkbox[id="'+id+'"]').is(":checked") == true) ? 'Y' : ''; 627 } 628 if(!inputText){ 629 $('#'+id).addClass('error'); 630 $('#'+id+'_desc').addClass('error-alert'); 631 $('#'+id+'_desc').text(errorMsg).show(); 632 if(inputGubun == 'niceselect'){ 633 $('#'+id).niceSelect('update');//nice select ì¼ë ê°±ì 634 } 635 if(validChkResult.result){ //ì ì¼ ì²ìì ì²´í¬ë ìì를 ì½ì 636 if(inputGubun == 'niceselect'){ 637 $('#'+id+'_desc').focus();//nice select ì¬ì©ì¼ë¡ selectì í¬ì»¤ì¤ê° ìë¼ì, desc ììì tabindex="-1" ì¶ê°í´ì¼í¨ 638 }else{ 639 $('#'+id).focus(); 640 } 641 if(alertYn == 'alertY'){//íì ë ëì°ê¸° ìíë¤ë©´ 642 validChkResult.alertMsg = errorMsg; 643 if(inputGubun == 'niceselect'){
644 validChkResult.focusId = id+'_desc'; 645 }else{ 646 validChkResult.focusId = id; 647 } 648 } 649 } 650 validChkResult.result = false; 651 }else{ 652 $('#'+id).removeClass('error'); 653 $('#'+id+'_desc').removeClass('error-alert'); 654 $('#'+id+'_desc').text(defaultMsg); 655 if(inputGubun == 'niceselect'){ 656 $('#'+id).niceSelect('update');//nice select ì¼ë ê°±ì 657 } 658 } 659} 660 661 662function FN_required_valid_checkbox_chk(inputGubun, id){ 663 664 if(inputGubun == "agreecheck"){ 665 inputText = ($('input:checkbox[id="'+id+'"]').is(":checked") == true) ? 'Y' : ''; 666 } 667 if(!inputText){ 668 $('#'+id).next('label').addClass('error-color'); 669 validChkResult.result = false; 670 } 671 else{ 672 $('#'+id).next('label').removeClass('error-color'); 673 } 674 675} 676 677function go_login_page(){ 678 location.href = siteUrl+'member/login?url='+encodeURIComponent(fullUrl); 679} 680 681//ì¹´ì¹´ì¤ ì§ë í¸ì¶ì ìí´ìë keyê° í¬í¨ë ì¤í¬ë¦½í¸ë¥¼ 먼ì í¸ì¶ íì 682/** 683 * 684 * @param {ì§ë element} element 685 * @param {ì¤ì 주ì} address 686 * @param {ì¸í¬ì°½ ì¬ì© ì 무 / default true} isInfo 687 * @returns 688 */ 689function load_kakao_map(element,address,isInfo){ 690 var mapContainer = document.getElementById(element), // ì§ë를 íìí div 691 692 mapOption = { 693 center: new daum.maps.LatLng(0, 0),// ì§ëì ì¤ì¬ì¢í 694 level: 3// ì§ëì íë ë 벨 695 }; 696 697 //ì§ë ìì± 698 var map = new daum.maps.Map(mapContainer, mapOption); 699 700 // 주ì-ì¢í ë³í ê°ì²´ë¥¼ ìì±í©ëë¤ 701 var geocoder = new daum.maps.services.Geocoder(); 702 703 // 주ìë¡ ì¢í를 ê²ìí©ëë¤ 704 geocoder.addressSearch(address, function(result, status) { 705 706 // ì ìì ì¼ë¡ ê²ìì´ ìë£ëì¼ë©´ 707 if (status === daum.maps.services.Status.OK) { 708 709 var coords = new daum.maps.LatLng(result[0].y, result[0].x); 710 711 // ê²°ê³¼ê°ì¼ë¡ ë°ì ìì¹ë¥¼ ë§ì»¤ë¡ íì 712 var marker = new daum.maps.Marker({ 713 map: map, 714 position: coords 715 }); 716 717 718 if(isInfo){ 719 // 커ì¤í ì¤ë²ë ì´ ìì± 720 var content = '<div style="width:150px;padding:5px 0;background-color:#ffffff;text-align:center;"><img src="/assets/img/logoB.svg" style="width:80%; vertical-align:top; pointer-events:none;"></div>'; 721 var customOverlay = new kakao.maps.CustomOverlay({ 722 map: map, 723 position: coords, 724 content: content, 725 yAnchor:2.3 726 }); 727 728 /* 729 // ì¸í¬ìëì°ë¡ ì¥ìì ëí ì¤ëª ì íì 730 var infowindow = new daum.maps.InfoWindow({ 731 content: '<img src="/assets/img/guide/logo.gif" style="width:80%;margin:0px 10%">' 732 }); 733 infowindow.open(map, marker); 734 */ 735 } 736 737 // ì§ëì ì¤ì¬ì ê²°ê³¼ê°ì¼ë¡ ë°ì ìì¹ë¡ ì´ë 738 map.setCenter(coords); 739 map.coords = coords; 740 } 741 }); 742 return map; 743} 744 745function go_online_menu(){ 746 if(!isLogin){ 747 modalOpen("#onlineLoginConfirm"); 748 }else{ 749 if(accessGubun == 'mypage'){ 750 location.href = siteUrl+'mypage/online_write'; 751 }else{ 752 location.href = siteUrl+'counsel/online_write'; 753 } 754 } 755} 756 757function go_reserve_menu(){ 758 location.href = siteUrl+'counsel/reserve_write'; 759} 760 761function go_review_menu(val){ 762 if(!isLogin){ 763 modalConfirm('ìë£ë²ì ë°ë¼ ë¡ê·¸ì¸ í ì´ì© ê°ë¥í©ëë¤.<br/>ë¡ê·¸ì¸ í ìì¸í ë´ì©ì íì¸íì¸ì.', function() { 764 go_login_page(); 765 }); 766 }else{ 767 if(!val){ 768 val = 'list'; 769 } 770 location.href = siteUrl+'customer/review_'+val; 771 } 772}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.