1 2// í´ë¦½ë³´ë ë³µì¬(주ìë³µì¬) 3function set_ClipBoard(uri) 4{ 5 uri = uri.replace(/\</g,'<'); 6 uri = uri.replace(/\>/g,'>'); 7 8 uri.select(); 9 var clip=uri.createTextRange(); 10 clip.execCommand('copy'); 11 alert('í´ë¦½ë³´ëì ë³µì¬ëììµëë¤'); 12// window.clipboardData.setData('TEXT', uri); 13// alert('ë³µì¬ëììµëë¤.'); 14} 15 16 17// ì¦ê²¨ì°¾ê¸° ì¶ê° 18function set_BookMark(site_url, site_name) 19{ 20 window.external.AddFavorite(site_url, site_name); 21} 22 23 24// ììíì´ì§ 25function set_StartPage(site_url) 26{ 27 //<a href="javascript:;" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.dadembi.com');">ììíì´ì§ ì¤ì </a> 28} 29 30 31// ê°ê²©ì ìë¨ì ì»´ë§ë¥¼ ì°ëë¤. 32function set_WonComma(price) 33{ 34 35 if(price != null){ 36 var pricelen = price.length; 37 var ii = pricelen%3; 38 var wonprice = price.substring(0,ii); 39 for(;ii<pricelen;ii+=3){ 40 wonprice += "," + price.substring(ii,ii+3); 41 } 42 if((pricelen%3) == 0) 43 wonprice = wonprice.substring(1,wonprice.length); 44 return wonprice; 45 } 46 47} 48 49// ì¸íë´ ì½¤ë§ ì ê±° 50function removeComma(str) { 51 if(typeof(str) == 'string') str = str.replace(/,/g, ''); 52 return str; 53} 54 55// ì´ë©ì¼ ì²´í¬ 56function check_Email(email) 57{ 58 59 var email_1 = ""; 60 var email_2 = ""; 61 var check_point = 0; 62 63 if (email.indexOf("@") < 0 ) { 64 alert("e-mailì @ ê° ë¹ ì ¸ììµëë¤."); 65 return false; 66 } 67 if (email.indexOf(".") < 0 ) { 68 alert("ì´ë©ì¼íìì´ ì못ëììµëë¤."); 69 return false; 70 } 71 72 if (email.indexOf("'") >= 0 ) { 73 alert("e-mailì ' ë í¬í¨í ì ììµëë¤.."); 74 return false; 75 } 76 if (email.indexOf("|") >= 0 ) { 77 alert("e-mailì | ë í¬í¨í ì ììµëë¤.."); 78 return false; 79 } 80 if (email.indexOf(">") >= 0 ) { 81 alert("e-mailì > ë í¬í¨í ì ììµëë¤.."); 82 return false; 83 } 84 if (email.indexOf("<") >= 0 ) { 85 alert("e-mailì < ë í¬í¨í ì ììµëë¤.."); 86 return false; 87 } 88 if (email.indexOf(" ") >= 0 ) { 89 alert("e-mailì ì¤íì´ì¤ë í¬í¨í ì ììµëë¤.."); 90 return false; 91 } 92 93 for(var j = 0 ; j < email.length; j++) 94 { 95 if(email.substring(j, j + 1) != "@" && check_point == 0) 96 { 97 email_1 = email_1 + email.substring(j, j + 1) 98 } 99 else if(email.substring(j, j + 1) == "@" ) 100 { 101 check_point = check_point + 1; 102 } 103 else 104 { 105 email_2 = email_2 + email.substring(j, j + 1); 106 } 107 } 108 109 //if (email_1.length < 3 ) { 110 // alert("e-mailì @ ìì리ë 3ì리ì´ì ì ë ¥íì ì¼í©ëë¤."); 111 // form1.email.focus(); 112 // return false; 113 //} 114 115 //if (email_2.length < 2 ) { 116 // alert("e-mailì @ ë·ì리ë 2ì리ì´ì ì ë ¥íì ì¼í©ëë¤."); 117 // form1.email.focus(); 118 // return false; 119 //} 120 121 if (check_point > 1 ) { 122 alert("e-mailì @ ë 1ë²ì´ì ë¤ì´ê°ì ììµëë¤."); 123 return false; 124 } 125 126 if (email_2.indexOf("(") >= 0 ) { 127 alert("e-mailì ( ë í¬í¨í ì ììµëë¤.."); 128 return false; 129 } 130 if (email_2.indexOf("(") >= 0 ) { 131 alert("e-mailì ( ë í¬í¨í ì ììµëë¤.."); 132 return false; 133 } 134 if (email_2.indexOf(")") >= 0 ) { 135 alert("e-mailì ) ë í¬í¨í ì ììµëë¤.."); 136 return false; 137 } 138 if (email_2.indexOf(",") >= 0 ) { 139 alert("e-mailì , ë í¬í¨í ì ììµëë¤.."); 140 return false; 141 } 142 if (email_2.indexOf(";") >= 0 ) { 143 alert("e-mailì ; ë í¬í¨í ì ììµëë¤.."); 144 return false; 145 } 146 if (email_2.indexOf(":") >= 0 ) { 147 alert("e-mailì : ë í¬í¨í ì ììµëë¤.."); 148 return false; 149 } 150 if (email_2.indexOf("/") >= 0 ) { 151 alert("e-mailì / ë í¬í¨í ì ììµëë¤.."); 152 return false; 153 } 154 if (email_2.indexOf("[") >= 0 ) { 155 alert("e-mailì [ ë í¬í¨í ì ììµëë¤.."); 156 return false; 157 } 158 if (email_2.indexOf("]") >= 0 ) { 159 alert("e-mailì ] ë í¬í¨í ì ììµëë¤.."); 160 return false; 161 } 162 if (email_2.indexOf("{") >= 0 ) { 163 alert("e-mailì { ë í¬í¨í ì ììµëë¤.."); 164 return false; 165 } 166 if (email_2.indexOf("}") >= 0 ) { 167 alert("e-mailì } ë í¬í¨í ì ììµëë¤.."); 168 return false; 169 } 170 if (email_2.indexOf(" ") >= 0 ) { 171 alert("e-mailì ì¤íì´ì¤ë í¬í¨í ì ììµëë¤.."); 172 return false;
173 } 174 175 return true; 176 177} 178 179 180// ì«ì ì²´í¬ 181function check_Num(tocheck) 182{ 183 184 if (tocheck == null || tocheck == "") 185 { 186 return false; 187 } 188 189 for(var j = 0 ; j < tocheck.length; j++) 190 { 191 if ( tocheck.substring(j, j + 1) != "0" 192 && tocheck.substring(j, j + 1) != "1" 193 && tocheck.substring(j, j + 1) != "2" 194 && tocheck.substring(j, j + 1) != "3" 195 && tocheck.substring(j, j + 1) != "4" 196 && tocheck.substring(j, j + 1) != "5" 197 && tocheck.substring(j, j + 1) != "6" 198 && tocheck.substring(j, j + 1) != "7" 199 && tocheck.substring(j, j + 1) != "8" 200 && tocheck.substring(j, j + 1) != "9" ) 201 { 202 return false; 203 } 204 } 205 206 return true; 207 208} 209 210// 주민 ë±ë¡ ë²í¸ ì²´í¬ 211function check_ResidentNO(str_f_num, str_l_num) 212{ 213 214 var juminno = str_f_num + str_l_num; 215 216 if(juminno=="" || juminno==null || juminno.length!=13) { 217 alert("주민ë±ë¡ë²í¸ë¥¼ ì ì´ì£¼ì¸ì."); 218 return false; 219 } 220 var jumin1 = juminno.substr(0,6); 221 var jumin2 = juminno.substr(6,7); 222 var yy = jumin1.substr(0,2); // ë ë 223 var mm = jumin1.substr(2,2); // ì 224 var dd = jumin1.substr(4,2); // ì¼ 225 var genda = jumin2.substr(0,1); // ì±ë³ 226 var msg, ss, cc; 227 228 // ì«ìê° ìë ê²ì ì ë ¥í ê²½ì° 229 if (!isNumeric(jumin1)) { 230 alert("주민ë±ë¡ë²í¸ ìì리를 ì«ìë¡ ì ë ¥íì¸ì."); 231 return false; 232 } 233 // 길ì´ê° 6ì´ ìë ê²½ì° 234 if (jumin1.length != 6) { 235 alert("주민ë±ë¡ë²í¸ ìì리를 ë¤ì ì ë ¥íì¸ì."); 236 return false; 237 } 238 // 첫ë²ì§¸ ìë£ìì ì°ìì¼(YYMMDD) íì ì¤ ê¸°ë³¸ êµ¬ì± ê²ì¬ 239 if (yy < "00" || yy > "99" || 240 mm < "01" || mm > "12" || 241 dd < "01" || dd > "31") { 242 alert("주민ë±ë¡ë²í¸ ìì리를 ë¤ì ì ë ¥íì¸ì."); 243 return false; 244 } 245 // ì«ìê° ìë ê²ì ì ë ¥í ê²½ì° 246 if (!isNumeric(jumin2)) { 247 alert("주민ë±ë¡ë²í¸ ë·ì리를 ì«ìë¡ ì ë ¥íì¸ì."); 248 return false; 249 } 250 // 길ì´ê° 7ì´ ìë ê²½ì° 251 if (jumin2.length != 7) { 252 alert("주민ë±ë¡ë²í¸ ë·ì리를 ë¤ì ì ë ¥íì¸ì."); 253 return false; 254 } 255 // ì±ë³ë¶ë¶ì´ 1 ~ 4 ê° ìë ê²½ì° 256 if (genda < "1" || genda > "4") { 257 alert("주민ë±ë¡ë²í¸ ë·ì리를 ë¤ì ì ë ¥íì¸ì."); 258 return false; 259 } 260 // ì°ë ê³ì° - 1 ëë 2: 1900ë ë, 3 ëë 4: 2000ë ë 261 cc = (genda == "1" || genda == "2") ? "19" : "20"; 262 // 첫ë²ì§¸ ìë£ìì ì°ìì¼(YYMMDD) íì ì¤ ë ì§ íì ê²ì¬ 263 if (isYYYYMMDD(parseInt(cc+yy), parseInt(mm), parseInt(dd)) == false) { 264 alert("주민ë±ë¡ë²í¸ ìì리를 ë¤ì ì ë ¥íì¸ì."); 265 return false; 266 } 267 // Check Digit ê²ì¬ 268 if (!isSSN(jumin1, jumin2)) { 269 alert("ì ë ¥í 주민ë±ë¡ë²í¸ë¥¼ ê²í í í, ë¤ì ì ë ¥íì¸ì."); 270 return false; 271 } 272 273 return true; 274 275} 276 277function isYYYYMMDD(y, m, d) { 278 switch (m) { 279 case 2: // 2ìì ê²½ì° 280 if (d > 29) return false; 281 if (d == 29) { 282 // 2ì 29ì ê²½ì° ë¹í´ê° ì¤ë ì¸ì§ë¥¼ íì¸ 283 if ((y % 4 != 0) || (y % 100 == 0) && (y % 400 != 0)) 284 return false; 285 } 286 break; 287 case 4: // ìì ë¬ì ê²½ì° 288 case 6: 289 case 9: 290 case 11: 291 if (d == 31) return false; 292 } 293 294 // í° ë¬ì ê²½ì° 295 return true; 296} 297function isNumeric(s) { 298 for (i=0; i<s.length; i++) { 299 c = s.substr(i, 1); 300 if (c < "0" || c > "9") return false; 301 } 302 return true; 303} 304function isLeapYear(y) { 305 if (y < 100) 306 y = y + 1900; 307 if ( (y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0) ) { 308 return true; 309 } else { 310 return false; 311 } 312} 313function getNumberOfDate(yy, mm) { 314 month = new Array(29,31,28,31,30,31,30,31,31,30,31,30,31); 315 if (mm == 2 && isLeapYear(yy)) mm = 0; 316 return month[mm]; 317} 318function isSSN(s1, s2) { 319 n = 2; 320 sum = 0; 321 for (i=0; i<s1.length; i++) 322 sum += parseInt(s1.substr(i, 1)) * n++; 323 for (i=0; i<s2.length-1; i++) { 324 sum += parseInt(s2.substr(i, 1)) * n++; 325 if (n == 10) n = 2; 326 } 327 c = 11 - sum % 11; 328 if (c == 11) c = 1; 329 if (c == 10) c = 0; 330 if (c != parseInt(s2.substr(6, 1))) return false; 331 else return true; 332} 333 334// 주민 ë±ë¡ ë²í¸ ì²´í¬ 335function check_ResidentNO_old(str_f_num, str_l_num) 336{ 337 338 var i3=0 339 for (var i=0;i<str_f_num.length;i++) 340 { 341 var ch1 = str_f_num.substring(i,i+1); 342 if (ch1<'0' || ch1>'9') { i3=i3+1 } 343 } 344 if ((str_f_num == '') || ( i3 != 0 )) 345 { 346 return (false); 347 } 348 349 var i4=0 350 for (var i=0;i<str_l_num.length;i++) 351 { 352 var ch1 = str_l_num.substring(i,i+1); 353 if (ch1<'0' || ch1>'9') { i4=i4+1 } 354 } 355 if ((str_l_num == '') || ( i4 != 0 )) 356 { 357 return (false); 358 } 359 360 if(str_f_num.substring(0,1) < 0) 361 { 362 return (false); 363 } 364 365 if(str_l_num.substring(0,1) > 2) 366 { 367 return (false); 368 } 369 370 if((str_f_num.length > 7) || (str_l_num.length > 8)) 371 { 372 return (false); 373 } 374 375 if ((str_f_num == '72') || ( str_l_num == '18')) 376 { 377 return (false); 378 } 379 380 var f1=str_f_num.substring(0,1) 381 var f2=str_f_num.substring(1,2) 382 var f3=str_f_num.substring(2,3) 383 var f4=str_f_num.substring(3,4) 384 var f5=str_f_num.substring(4,5) 385 var f6=str_f_num.substring(5,6) 386 var hap=f1*2+f2*3+f3*4+f4*5+f5*6+f6*7 387 var l1=str_l_num.substring(0,1) 388 var l2=str_l_num.substring(1,2) 389 var l3=str_l_num.substring(2,3) 390 var l4=str_l_num.substring(3,4) 391 var l5=str_l_num.substring(4,5) 392 var l6=str_l_num.substring(5,6) 393 var l7=str_l_num.substring(6,7) 394 hap=hap+l1*8+l2*9+l3*2+l4*3+l5*4+l6*5 395 hap=hap%11 396 hap=11-hap 397 hap=hap%10
398 if (hap != l7) 399 { 400 return (false); 401 } 402 403 return true; 404 405} 406 407 408 409// í¹ì문ìê°ìëì§ ì²´í¬ 410function check_Char(id_text) 411{ 412 413 var alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 414 var numeric = '1234567890'; 415 var nonkorean = alpha+numeric+'_'; 416 417 var i ; 418 for ( i=0; i < id_text.length; i++ ) { 419 if( nonkorean.indexOf(id_text.substring(i,i+1)) < 0) { 420 break ; 421 } 422 } 423 424 if ( i != id_text.length ) { 425 return false ; 426 } 427 else{ 428 return true ; 429 } 430 431 return true; 432 433} 434 435// í¹ì문ì ì²´í¬ 436function check_nonChar(id_text) 437{ 438 var nonchar = '~`!@#$%^&*()-_=+\|<>?,./;:"'; 439 var numeric = '1234567890'; 440 var nonkorean = nonchar+numeric; 441 442 var i ; 443 for ( i=0; i < id_text.length; i++ ) { 444 if( nonkorean.indexOf(id_text.substring(i,i+1)) > 0) { 445 break ; 446 } 447 } 448 449 if ( i != id_text.length ) { 450 return false ; 451 } 452 else{ 453 return true ; 454 } 455 456 return false; 457} 458 459// ì´ë¯¸ì§ 롤ì¤ë² 460function WIZ_jumpMenu(targ,selObj,restore){ //v3.0 461 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); 462 if (restore) selObj.selectedIndex=0; 463} 464 465function WIZ_swapImgRestore() { //v3.0 466 var i,x,a=document.WIZ_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; 467} 468 469function WIZ_preloadImages() { //v3.0 470 var d=document; if(d.images){ if(!d.WIZ_p) d.WIZ_p=new Array(); 471 var i,j=d.WIZ_p.length,a=WIZ_preloadImages.arguments; for(i=0; i<a.length; i++) 472 if (a[i].indexOf("#")!=0){ d.WIZ_p[j]=new Image; d.WIZ_p[j++].src=a[i];}} 473} 474 475function WIZ_findObj(n, d) { //v4.01 476 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 477 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 478 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 479 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=WIZ_findObj(n,d.layers[i].document); 480 if(!x && d.getElementById) x=d.getElementById(n); return x; 481} 482 483function WIZ_swapImage() { //v3.0 484 var i,j=0,x,a=WIZ_swapImage.arguments; document.WIZ_sr=new Array; for(i=0;i<(a.length-2);i+=3) 485 if ((x=WIZ_findObj(a[i]))!=null){document.WIZ_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} 486} 487 488function WIZ_reloadPage(init) { //reloads the window if Nav4 resized 489 if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { 490 document.WIZ_pgW=innerWidth; document.WIZ_pgH=innerHeight; onresize=WIZ_reloadPage; }} 491 else if (innerWidth!=document.WIZ_pgW || innerHeight!=document.WIZ_pgH) location.reload(); 492} 493WIZ_reloadPage(true); 494 495/* ê²ìí ëª©ë¡ ì²´í¬ë°ì¤ */ 496 497// ì²´í¬ë°ì¤ ì ì²´ì í 498function selectAllBbs(){ 499 var i; 500 for(i=0;i<document.forms.length;i++){ 501 if(document.forms[i].idx != null){ 502 if(document.forms[i].select_checkbox){ 503 document.forms[i].select_checkbox.checked = true; 504 } 505 } 506 } 507 return; 508} 509 510// ì²´í¬ë°ì¤ ì íí´ì 511function selectCancelBbs(){ 512 var i; 513 for(i=0;i<document.forms.length;i++){ 514 if(document.forms[i].select_checkbox){ 515 if(document.forms[i].idx != null){ 516 document.forms[i].select_checkbox.checked = false; 517 } 518 } 519 } 520 return; 521} 522 523// ì²´í¬ë°ì¤ì í ë°ì 524function selectReverseBbs(form){ 525 if(form.select_tmp.checked){ 526 selectAllBbs(); 527 }else{ 528 selectCancelBbs(); 529 } 530} 531 532// ì²´í¬ë°ì¤ ì í리ì¤í¸ 533function selectValueBbs(){ 534 var i; 535 var selbbs = ""; 536 for(i=0;i<document.forms.length;i++){ 537 if(document.forms[i].idx != null){ 538 if(document.forms[i].select_checkbox){ 539 if(document.forms[i].select_checkbox.checked) 540 selbbs = selbbs + document.forms[i].idx.value + "|"; 541 } 542 } 543 } 544 return selbbs; 545} 546 547//ì íê²ì물 ìì 548function delBbs(purl, param){ 549 550 selbbs = selectValueBbs(); 551 552 if(selbbs == ""){ 553 alert("ìì í ê²ì물ì ì ííì¸ì."); 554 return false; 555 }else{ 556 if(confirm("ì íí ê²ì물ì ì ë§ ìì íìê² ìµëê¹?")){ 557 document.location = purl + "?ptype=save&mode=delbbs&selbbs=" + selbbs + "&" + param; 558 } 559 } 560} 561 562//ê²ì물ì´ë 563function moveBbs(code){ 564 selbbs = selectValueBbs(); 565 if(selbbs == ""){ 566 alert("ì´ëí ê²ì물ì ì ííì¸ì."); 567 return false; 568 }else{ 569 var uri = "/admin/bbs/move.php?code=" + code + "&selbbs=" + selbbs; 570 window.open(uri,"moveBbs","width=300,height=80"); 571 } 572} 573 574// ê²ìë¬¼ë³µì¬ 575function copyBbs(code){ 576 selbbs = selectValueBbs(); 577 if(selbbs == ""){ 578 alert("ë³µì¬í ê²ì물ì ì ííì¸ì."); 579 return false;
580 }else{ 581 var uri = "/admin/bbs/copy.php?code=" + code + "&selbbs=" + selbbs; 582 window.open(uri,"copyBbs","width=300,height=80"); 583 } 584} 585 586// ê²ì물 ììë³ê²½ 587function orderBbs(code) { 588 var uri = "/admin/bbs/order.php?code=" + code; 589 window.open(uri,"orderBbs","width=600,height=350,resizable=yes,scrollbars=yes"); 590} 591 592// ìí ì¹´í ê³ ë¦¬ ë ì´ì´ 593function disableLay(getno){ 594 595 if(document.all.displayer != null){ 596 if(document.all.displayer.length==null) document.all.displayer.style.display='none'; 597 else document.all.displayer[getno].style.display='none'; 598 } 599 600} 601 602function displayLay(getno){ 603 604 if(document.all.displayer != null){ 605 for(i=0; i<document.all.displayer.length; i++){ 606 document.all.displayer[i].style.display='none'; 607 } 608 if(document.all.displayer.length==null) document.all.displayer.style.display='block'; 609 else document.all.displayer[getno].style.display='block'; 610 } 611 612} 613 614// ê°ê²©ì ìë¨ì ì»´ë§ë¥¼ ì°ëë¤. 615function won_Comma(price){ 616 if(price != null){ 617 var pricelen = price.length; 618 var ii = pricelen%3; 619 var wonprice = price.substring(0,ii); 620 for(;ii<pricelen;ii+=3){ 621 wonprice += "," + price.substring(ii,ii+3); 622 } 623 if((pricelen%3) == 0) 624 wonprice = wonprice.substring(1,wonprice.length); 625 return wonprice; 626 } 627} 628 629//í¸ìí°ë¡ ì°ê²° 630function snsTwitter(msg,url){ 631 var href = "http://twitter.com/home?status=" + encodeURIComponent(msg) + " " + encodeURIComponent(url); 632 window.open(href, 'twitter', ''); 633} 634 635//íì´ì¤ë¶ì¼ë¡ ì°ê²° 636function snsFacebook(msg,url){ 637 var href = "http://www.facebook.com/sharer.php?u=" + encodeURIComponent(url) + "&t=" + encodeURIComponent(msg); 638 window.open(href, 'facebook', ''); 639} 640// 미í¬ë°ì´ 641function snsMe2day(msg,url,tag){ 642 var href = "http://me2day.net/posts/new?new_post[body]=\"" + encodeURIComponent(msg) + "\":"+encodeURIComponent(url) + "&new_post[tags]=" + encodeURIComponent(tag); 643 window.open(href, 'me2day', ''); 644} 645 646function check_all(f) 647{ 648 var chk = document.getElementsByName("checks[]"); 649 for (i=0; i<chk.length; i++) 650 chk[i].checked = f.chkall.checked; 651} 652 653function check_val(act) 654{ 655 var f = document.pgfrm; 656 var act_url = "/admin/manage/as/as_save.php"; 657 658 if (act == "update") // ì íìì 659 { 660 var sel=[]; 661 662 $('input:checkbox:checked').each(function(){ 663 sel.push($(this).val()); 664 }); 665 var check_id = sel.join('|'); 666 f.idx.value = check_id; 667 f.action = act_url; 668 str = "ìì "; 669 } 670 else if (act == "delete") // ì íìì 671 { 672 var sel=[]; 673 $('input:checkbox:checked').each(function(){ 674 sel.push($(this).val()); 675 }); 676 var check_id = sel.join('|'); 677 678 f.idx.value = check_id; 679 f.action = act_url; 680 str = "ìì "; 681 } 682 else if (act == "copy") // ì íë³µì¬ 683 { 684 var sel=[]; 685 686 $('input:checkbox:checked').each(function(){ 687 sel.push($(this).val()); 688 }); 689 var check_id = sel.join('|'); 690 f.idx.value = check_id; 691 f.action = act_url; 692 str = "ë³µì¬"; 693 } 694 else 695 return; 696 697 698 var chk = document.getElementsByName("checks[]"); 699 var bchk = false; 700 701 for (i=0; i<chk.length; i++) 702 { 703 if (chk[i].checked) 704 bchk = true; 705 } 706 707 if (!bchk) 708 { 709 alert(str + "í AS리ì¤í¸ë¥¼ ì ííì¸ì."); 710 return; 711 } 712 713 if (act == "delete") 714 { 715 if (!confirm("ì íí ìë£ë¥¼ ì ë§ ìì íìê² ìµëê¹?")) 716 return; 717 } 718 719 f.mode.value = act; 720 f.submit(); 721} 722 723function check_val2(num) 724{ 725 var chk = document.getElementsByName("checks[]"); 726 chk[num].checked = true; 727} 728 729function check_down(act) 730{ 731 var f = document.pgfrm; 732 var act_url = "/admin/manage/as/sel_download.php"; 733 var act_url2 = "/admin/manage/as/sel_print.php"; 734 735 if (act == "download") 736 { 737 var sel=[]; 738 $('input:checkbox:checked').each(function(){ 739 sel.push($(this).val()); 740 }); 741 var check_id = sel.join('|'); 742 743 f.idx.value = check_id; 744 f.action = act_url; 745 str = "ë¤ì´ë¡ë"; 746 } 747 else if (act == "print") 748 { 749 var sel=[]; 750 $('input:checkbox:checked').each(function(){ 751 sel.push($(this).val()); 752 }); 753 var check_id = sel.join('|'); 754 755 f.idx.value = check_id; 756 f.action = act_url2; 757 str = "ì¡ì¥ì¶ë ¥"; 758 } 759 else 760 return; 761 762 763 var chk = document.getElementsByName("checks[]"); 764 var bchk = false;
765 766 for (i=0; i<chk.length; i++) 767 { 768 if (chk[i].checked) 769 bchk = true; 770 } 771 772 if (!bchk) 773 { 774 alert(str + "í AS리ì¤í¸ë¥¼ ì ííì¸ì."); 775 return; 776 } 777 778 f.submit(); 779 780} 781 782function servicechg(idx,num) 783{ 784 var url = "as_service.php?idx="+idx+"&srv_idx="+num; 785 var win = "servicechg"; 786 787 window.open(url, win, "fullscreen=0,toolbar=0,scrollbars=0,location=0,status=0,menubar=0,resizable=0,width=400,height=300,top=0,left=0"); 788} 789 790function asUpdate(check_id) 791{ 792 var f = document.pgfrm; 793 var act_url = "/admin/manage/as/as_save.php"; 794 795 f.idx.value = check_id; 796 f.mode.value = "update"; 797 f.date_check.value = "date_check"; 798 f.action = act_url; 799 f.submit(); 800} 801 802function asDefer(check_id) 803{ 804 var f = document.pgfrm; 805 var act_url = "/admin/manage/as/as_save.php"; 806 807 f.idx.value = check_id; 808 f.mode.value = "update"; 809 f.date_check.value = "date_defer"; 810 f.action = act_url; 811 f.submit(); 812} 813 814function asDelete(check_id) 815{ 816 var f = document.pgfrm; 817 var act_url = "/admin/manage/as/as_save.php"; 818 819 f.idx.value = check_id; 820 f.mode.value = "delete"; 821 f.action = act_url; 822 823 q = confirm("ì íí ìë£ë¥¼ ì ë§ ìì íìê² ìµëê¹?") 824 if (q == true) 825 { 826 f.submit(); 827 } 828 else 829 { 830 f.mode.value = "no_delete"; 831 return false; 832 } 833 834} 835 836function btnchange(href) 837{ 838 if(confirm("ì²ë¦¬ê²°ê³¼ë¥¼ ë³ê²½íìê² ìµëê¹?")) 839 document.location.href = href; 840} 841 842function csv_submit() 843{ 844 var f = document.csvfrm; 845 f.action = "./as_file_update.php"; 846 f.submit(); 847} 848 849function csv_submit_out() 850{ 851 var f = document.csvfrm_out; 852 f.action = "./as_file_update_out.php"; 853 f.submit(); 854} 855 856function stats_submit(act) 857{ 858 var f = document.searchForm; 859 f.action = act; 860 f.submit(); 861} 862 863function sms_submit(href) 864{ 865 if(confirm("문ì를 ë°ì¡íìê² ìµëê¹?")) 866 document.location.href = href; 867} 868 869 870function sms_submit_t(href,date_idx,dilnum_idx) 871{ 872 873 //ì¶ê³ ì¡ì¥ ë¹ì´ìëì§ íì¸ 874 var dilnum = document.getElementById(dilnum_idx).value; 875 //alert(dilnum); 876 if(dilnum==""){ 877 alert("ì¶ê³ ì¡ì¥ì´ ë¹ì´ììµëë¤."); 878 return false; 879 } 880 881 882 var date = document.getElementById(date_idx).value; 883 884 885 //ì¶ê³ ì¼ ë ì§ íì 886 var outdate = date; 887 var outdate_split = outdate.split('-'); 888 889 var outdate_split_1=outdate_split[0]; 890 var outdate_split_2=outdate_split[1]; 891 var outdate_split_3=outdate_split[2]; 892 893 if(outdate.length=='10'){ 894 if(outdate_split_1.length=='4'){ 895 896 if(outdate_split_2.length=='2'){ 897 898 if(outdate_split_2<13 && outdate_split_2>0){ 899 900 if(outdate_split_3.length=='2'){ 901 if(outdate_split_3<32 && outdate_split_3>0){ 902 if(confirm("문ì를 ë°ì¡íìê² ìµëê¹?")) 903 document.location.href = href; 904 }else{ 905 alert("ì¶ê³ ì¼ì´ ì못 í기ëììµëë¤"); 906 return false; 907 } 908 }else{ 909 alert("ì¶ê³ ì¼ì´ ì못 í기ëììµëë¤"); 910 return false; 911 } 912 913 }else{ 914 alert("ì¶ê³ ì¼ì´ ì못 í기ëììµëë¤"); 915 return false; 916 } 917 918 }else{ 919 alert("ì¶ê³ ì¼ì´ ì못 í기ëììµëë¤"); 920 return false; 921 } 922 923 }else{ 924 alert("ì¶ê³ ì¼ì´ ì못 í기ëììµëë¤"); 925 return false; 926 } 927 }else if(outdate.length=='0'){ 928 alert("ì¶ê³ ì¼ì´ ë¹ì´ììµëë¤."); 929 return false; 930 }else{ 931 alert("ì¶ê³ ì¼ì´ ì못 í기ëììµëë¤"); 932 return false; 933 } 934} 935 936 937 938$(function() { 939 var fileTarget = $('.filebox .upload-hidden'); 940 941 fileTarget.on('change', function(){ // ê°ì´ ë³ê²½ëë©´ 942 if(window.FileReader){ // modern browser 943 var filename = $(this)[0].files[0].name; 944 } 945 else { // old IE 946 var filename = $(this).val().split('/').pop().split('\\').pop(); // íì¼ëª ë§ ì¶ì¶ 947 } 948 949 // ì¶ì¶í íì¼ëª ì½ì 950 $(this).siblings('.upload-name').val(filename); 951 }); 952}); 953 954$(function() { 955 var imgTarget = $('.preview-image .upload-hidden'); 956 957 imgTarget.on('change', function(){ 958 var parent = $(this).parent(); 959 parent.children('.upload-display').remove(); 960 961 if(window.FileReader){ 962 //image íì¼ë§ 963 if (!$(this)[0].files[0].type.match(/image\//)) return; 964 965 var reader = new FileReader(); 966 reader.onload = function(e){ 967 var src = e.target.result;
968 parent.prepend('<div class="upload-display"><div class="upload-thumb-wrap"><img src="'+src+'" class="upload-thumb"></div></div>'); 969 } 970 reader.readAsDataURL($(this)[0].files[0]); 971 } 972 else { 973 $(this)[0].select(); 974 $(this)[0].blur(); 975 var imgSrc = document.selection.createRange().text; 976 parent.prepend('<div class="upload-display"><div class="upload-thumb-wrap"><img class="upload-thumb"></div></div>'); 977 978 var img = $(this).siblings('.upload-display').find('img'); 979 img[0].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enable='true',sizingMethod='scale',src=\""+imgSrc+"\")"; 980 } 981 }); 982 983}); 984 985/** í¸ë¦¬êµ¬ì¡° **/ 986$(function(){ 987 var tree_menu = $('#tree_menu'); 988 var TREE_OPEN = '/admin/manage/image/ic_plus.gif'; 989 var TREE_CLOSE = '/admin/manage/image/ic_minus.gif'; 990 991 var FOLDER_OPEN = '<img src="/admin/manage/image/ic_folder_o.gif" style="vertical-align:middle">'; 992 var FOLDER_CLOSE = '<img src="/admin/manage/image/ic_folder_c.gif" style="vertical-align:middle">'; 993 994 tree_menu.find('li:has("ul")').prepend('<a href="#" class="controller"><img src="' + TREE_CLOSE + '" /></a> '); 995 tree_menu.find('li:last-child').addClass('end'); 996 997 $('.controller').click(function(){ 998 var temp_el = $(this).parent().find('>ul'); 999 var temp_el_vv = $(this).parent().find('span').attr('id'); 1000 1001 if (temp_el.css('display') == 'none'){ 1002 temp_el.slideDown(100); 1003 $(this).find('img').attr('src', TREE_CLOSE); 1004 $("span#"+temp_el_vv).html(FOLDER_OPEN); 1005 return false; 1006 } else { 1007 temp_el.slideUp(100); 1008 $(this).find('img').attr('src', TREE_OPEN); 1009 $("span#"+temp_el_vv).html(FOLDER_CLOSE); 1010 return false; 1011 } 1012 }); 1013 1014 function tree_init(status){ 1015 if (status == 'close'){ 1016 tree_menu.find('ul').hide(); 1017 $('a.controller').find('img').attr('src', TREE_OPEN); 1018 } else if (status == 'open'){ 1019 tree_menu.find('ul').show(); 1020 $('a.controller').find('img').attr('src', TREE_CLOSE); 1021 } 1022 } 1023 tree_init('open'); 1024 1025}); 1026 1027function moveCode(catcode,depthno,prior,menucode){ 1028/* $.ajax({ 1029 type:"post" 1030 , async: false 1031 , url: "/admin/manage/product/prd_category.php" 1032 , data : {"mode":"update","catcode":catcode,"depthno":depthno,"prior":prior} 1033 , success: function(data) { 1034 var href = "/admin/manage/product/prd_category.php?catcode="+catcode+"&depthno="+depthno+"&prior="+prior; 1035 //$("#detailcategoryList").load(href); 1036 document.location.href = data; 1037 } 1038 , error: function(){ 1039 } 1040 }); 1041*/ 1042 1043 $.get("/admin/manage/product/prd_category.php?&mode=update&catcode="+catcode+"&depthno="+depthno+"&prior="+prior+"&menucode="+menucode, function(data){ 1044 var href = "/admin/manage/product/prd_category.php?&mode=update&catcode="+catcode+"&depthno="+depthno+"&prior="+prior+"&menucode="+menucode; 1045 //$("#detailcategoryList").load(href); 1046 document.location.href = href; 1047 }); 1048} 1049 1050function moveCode2(catcode,menucode){ 1051 var href = "/admin/manage/product/prd_category.php?catcode="+catcode+"&menucode="+menucode; 1052 //$("#detailcategoryList").load(href); 1053 document.location.href = href; 1054 1055} 1056 1057function moveCategory(mode,posi,catcode,depthno,menucode){ 1058/* $.ajax({ 1059 type:"post" 1060 , url: "/admin/manage/product/category_save.php" 1061 , data : {"mode":mode,"posi":posi,"catcode":catcode,"depthno":depthno} 1062 , success: function(data) { 1063 var result = data.split("|"); 1064 if(result[0] == "ok"){ 1065 var href = "/admin/manage/product/prd_category.php?catcode="+catcode+"&depthno="+depthno+"&prior="+prior; 1066 $("#detailcategoryList").load(href); 1067 //document.location.href = "/admin/manage/product/prd_category.php?mode="+result[1]+"&catcode="+result[2]+"&depthno="+result[3]; 1068 } 1069 } 1070 , error: function(){ 1071 } 1072 })*/ 1073 $.get("/admin/manage/product/category_save.php?&mode="+mode+"&posi="+posi+"&catcode="+catcode+"&depthno="+depthno+"&menucode="+menucode, function(data){ 1074 if(data){ 1075 var result = data.split("|"); 1076 var href = "/admin/manage/product/prd_category.php?mode="+result[1]+"&catcode="+result[2]+"&depthno="+result[3]+"&menucode="+menucode; 1077 //$("#detailcategoryList").load(href); 1078 document.location.href = href; 1079 1080 } 1081 }); 1082 1083} 1084 1085function SmoveCode(catcode,depthno,prior,menucode){ 1086 $.get("/admin/manage/product2/prd_cat.php?&mode=update&catcode"+catcode+"&depthno="+depthno+"&prior="+prior+"&menucode="+menucode, function(data){
1087 var href = "/admin/manage/product2/prd_cat.php?catcode="+catcode+"&depthno="+depthno+"&prior="+prior+"&menucode="+menucode; 1088 //$("#detailcategoryList").load(href); 1089 document.location.href = href; 1090 1091 }); 1092} 1093 1094function SmoveCode2(catcode,menucode){ 1095 var href = "/admin/manage/product2/prd_cat.php?catcode="+catcode+"&menucode="+menucode; 1096 //$("#detailcategoryList").load(href); 1097 document.location.href = href; 1098} 1099 1100function SmoveCategory(mode,posi,catcode,depthno,menucode){ 1101 $.get("/admin/manage/product2/cat_save.php?mode="+mode+"&posi="+posi+"&catcode="+catcode+"&depthno="+depthno+"&menucode="+menucode, function(data){ 1102 if(data){ 1103 var result = data.split("|"); 1104 var href = "/admin/manage/product2/prd_cat.php?mode="+result[1]+"&catcode="+result[2]+"&depthno="+result[3]+"&menucode="+menucode 1105 //$("#detailcategoryList").load(href); 1106 document.location.href = href; 1107 } 1108 }); 1109 1110} 1111 1112function brandCode(idx,menucode){ 1113 $.get("/admin/manage/product/prd_brand.php?&mode=update&idx="+idx+"&menucode="+menucode, function(data){ 1114 var href = "/admin/manage/product/prd_brand.php?mode=update&idx="+idx+"&menucode="+menucode; 1115 //$("#detailcategoryList").load(href); 1116 document.location.href = href; 1117 }); 1118} 1119 1120function brandCode2(menucode){ 1121 var href = "/admin/manage/product/prd_brand.php?menucode="+menucode; 1122// $("#detailcategoryList").load(href); 1123 document.location.href = href; 1124 1125 1126} 1127 1128function BrandmoveCategory(mode,posi,idx,menucode){ 1129 $.get("/admin/manage/product/brand_save.php?&mode="+mode+"&posi="+posi+"&idx="+idx+"&menucode="+menucode, function(data){ 1130 if(data){ 1131 var result = data.split("|"); 1132 var href = "/admin/manage/product/prd_brand.php?mode="+result[1]+"&idx="+result[2]+"&menucode="+menucode; 1133 //$("#detailcategoryList").load(href); 1134 document.location.href = href; 1135 } 1136 }); 1137 1138} 1139 1140$(function(){ 1141 1142 $(document).on("keyup", "input:text[Onlynum]", function() { 1143 regExp = /[^0-9]/gi; 1144 v = $(this).val(); 1145 if(regExp.test(v)){ 1146 alert("ì«ìë§ ê°ë¥í©ëë¤."); 1147 $(this).val(v.replace(regExp,"") ); 1148 } 1149 }); 1150 1151}); 1152 1153/*$(function() { 1154 var calendar = { 1155 showButtonPanel: true, 1156 dateFormat: "yy-mm-dd", 1157 currentText: 'ì¤ë', 1158 closeText: 'ë«ê¸°', 1159 changeMonth: true, 1160 changeYear: true, 1161 dayNames: ['ì¼ìì¼','ììì¼', 'íìì¼', 'ììì¼', '목ìì¼', 'ê¸ìì¼', 'í ìì¼'], 1162 dayNamesMin: ['<font color=red>ì¼</font>', 'ì', 'í', 'ì', '목', 'ê¸', '<font color=#0071bf>í </font>'], 1163 monthNamesShort: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 1164 monthNames: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 1165 yearRange: 'c-10:c' 1166 }; 1167 1168 $("#srh_prev,#srh_next").datepicker(calendar); 1169 $("#sdate,#edate").datepicker(calendar); 1170 $("#wdate").datepicker(calendar); 1171 $("#coupon_sdate,#coupon_edate").datepicker(calendar); 1172 1173 1174});*/ 1175 1176/* ì¤ë¥¸ìª½ ë§ì°ì¤ ë§ê¸° */ 1177//$(document).bind("contextmenu", function(e){ 1178// return false; 1179//});
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.