::: :::
       

작성일 : 08-08-06 13:04
[공지] 동영상이 안나올경우 조치법입니다
 글쓴이 :
조회 : 32,543  
<scRIPT language=javascript> /**************************************************************************************** * ./lib/js/bbs.js /****************************************************************************************/ /* * KimsBoard Main script */ //요청된 Url(쿼리스트링 제외) function getThisFile() { //var QuerySplit = location.href.split('?'); //return QuerySplit[0]; return './bbs.php'; } //요청된 파라미터의 Value function getUriString(param) { return eval("document.DataForm." + param).value; } //공통 URL (제어파라미터 query,uid,p 제외 ; 파라미터값은 getUriString('파리미터') ) function getThisUrl() { var d = document.DataForm; var table = d.table.value; var query = d.query.value; var p = d.p.value; var uid = d.uid.value; var where = d.where.value; var keyword = d.keyword.value; var search_step = d.search_step.value; var search_type = d.search_type.value; var category = d.category.value; var sort = d.sort.value; var orderby = d.orderby.value; var grecnum = d.grecnum.value; var cqurl = getThisFile(); cqurl += table ? '?table=' + table : ''; cqurl += where ? '&where=' + where : ''; cqurl += keyword ? '&keyword=' + keyword : ''; cqurl += search_step? '&search_step=' + search_step : ''; cqurl += search_type? '&search_type=' + search_type : ''; cqurl += category ? '&category=' + category : ''; cqurl += sort ? '&sort=' + sort : ''; cqurl += orderby ? '&orderby=' + orderby : ''; cqurl += grecnum ? '&grecnum=' + grecnum : ''; if (where && keyword) { cqurl += '&search_sql=' + getSearchSql(where , keyword); } return cqurl; } //정렬Url (필드명 ASC,DESC지정) function getSort(field) { var d = document.DataForm; if (d.sort.value == field) { if (d.orderby.value == "DESC") { d.orderby.value = ""; } else { d.orderby.value = "DESC"; } } else { d.sort.value = field; d.orderby.value = "DESC"; } location.href = getThisUrl() + '&p=' + getUriString('p'); } //마지막페이지수 function LastPage(p) { return document.getElementById('LastPage').value; } //글보기 function ViewArticle(uid,secret,dbid,tbl,win,e) { var url = getThisUrl(); var table = tbl != '' ? tbl : getUriString('table'); if(secret != '') { var CookieSecret = document.getElementById('CookieSecret').value; var isRoot = document.getElementById('isRoot').value; var isAdmin = document.getElementById('isAdmin').value; var mbid = document.getElementById('mbid').value; if(CookieSecret.indexOf(table + '_' + uid + '_' ) == -1) { if (mbid == '' || (mbid != '' && mbid != dbid)) { if (isRoot == '0' && isAdmin == '0') { if (tbl != '') document.DataForm.table.value = tbl; getPassLayer('secret',isRoot,isAdmin,mbid,dbid,uid,0,e); return false; } } } } if (win != '_win') { location.href = url + '&query=view&uid=' + uid + '&p=' + getUriString('p'); } else { var win = './bbs.php?table='+table+'&action=newwin&uid=' + uid; window.open(win , 'output_win','width=650,height=600,scrollbars=yes'); } } //목록으로 function getListPage() { location.href = getThisUrl() + '&p=' + getUriString('p'); } //일반글쓰기 function getWritePage() { location.href = getThisUrl() + '&query=write'; } //답변쓰기 function getReplyPage(uid) { location.href = getThisUrl() + '&query=write&write_type=reply&uid=' + uid + '&p=' + getUriString('p'); } //패스워드체크 레이어, 수정/삭제 function getPassLayer(que,isRoot,isAdmin,mbid,dbid,uid,ruid,e) { if (isRoot != '0' || isAdmin != '0' || (mbid != '' && mbid == dbid)) { if (que == 'modify') { location.href = getThisUrl() + '&query=write&write_type=modify&uid=' + uid + '&p=' + getUriString('p'); } if (que == 'delete') { if(confirm('정말로 삭제하시겠습니까? ')) { location.href = getThisUrl() + '&action=delete&uid=' + uid + '&p=' + getUriString('p'); } } return false; } if(!x) var x = e.pageX ? e.pageX : document.body.scrollLeft+event.clientX; if(!y) var y = e.pageY ? e.pageY : document.body.scrollTop+event.clientY; var l = document.getElementById('PassCheckLayer'); var f = document.pass_check_form; var t = document.getElementById('PwLayTitle'); l.style.display = 'block'; l.style.left = x - 80; l.style.top = y + 20; f.table.value = getUriString('table'); f.action.value = que; f.uid.value = uid; f.ruid.value = ruid; f.p.value = getUriString('p'); if (que == 'delete') { t.innerHTML = "게시물을 삭제합니다.."; f.Nparam.value = getThisUrl() + '&p=' + getUriString('p'); } if (que == 'modify') { t.innerHTML = "게시물을 수정합니다.."; f.Nparam.value = getThisUrl() + '&query=write&write_type=modify&p=' + getUriString('p') + '&uid=' + uid; } if (que == 'secret') { t.innerHTML = "비공개 게시물입니다.."; f.Nparam.value = getThisUrl() + '&query=view&p=' + getUriString('p') + '&uid=' + uid; } if (que == 'cdelete') { t.innerHTML = "코멘트를 삭제합니다.."; f.Nparam.value = getThisUrl() + '&query=view&p=' + getUriString('p') + '&uid=' + uid; } f.COMP_PASS.focus(); } //검색SQL function getSearchSql(where , keyword) { var i; var SQL = ""; var search_type = document.DataForm.search_type.value; search_type = search_type == 'and' ? 'AND' : 'OR'; if (keyword.indexOf(' ') == -1 && keyword.indexOf(',') == -1) { if (where == "ALL") return "BB_NAME LIKE '%"+keyword+"%' "+search_type+" BB_SUBJECT LIKE '%"+keyword+"%' "+search_type+" BB_CONTENT LIKE '%"+keyword+"%'"; else return where + " LIKE '%"+keyword+"%'"; } else { keyword = keyword.replace(',' , ' ') var key_exp = keyword.split(' '); if (where == "ALL") { for(i = 0; i < key_exp.length - 1; i++) { SQL += "(BB_NAME LIKE '%"+key_exp[i]+"%' "+search_type+" BB_SUBJECT LIKE '%"+key_exp[i]+"%' "+search_type+" BB_CONTENT LIKE '%"+key_exp[i]+"%') "+search_type+" "; } SQL += "(BB_NAME LIKE '%"+key_exp[i]+"%' "+search_type+" BB_SUBJECT LIKE '%"+key_exp[i]+"%' "+search_type+" BB_CONTENT LIKE '%"+key_exp[i]+"%')"; } else { for(i = 0; i < key_exp.length - 1; i++) { SQL += where + " LIKE '%"+key_exp[i]+"%' "+search_type+" "; } SQL += where + " LIKE '%"+key_exp[i]+"%'"; } return SQL; } } //검색어체크 function getSearchStart() { if(getUriString('where') && getUriString('keyword')) { getKeywordHighLight(); } } //검색결과 하이라이트 function getKeywordHighLight() { var where = getUriString('where'); var keyword = getUriString('keyword'); var r,i,s=document.selection.createRange().text; if(!where || !keyword) { return false; } keyword = keyword.replace(',' , ' '); var keyexp = keyword.split(' '); for ( var j = 0; j < keyexp.length; j++) { r = document.body.createTextRange(); for(i = 0; r.findText(keyexp[j]); i++) { r.execCommand('ForeColor','','#FF0000'); r.execCommand('BackColor','','#FFFF00'); r.collapse(false); } } } //카테고리셀렉트 function getCategoryForm(use , sbj , opt , cat , event) { if (use) { var select = ""; var option = opt.split(','); select += ""; select += ""; document.write(select); } else { document.write(""); } } //카테고리이벤트 function getCategoryEvent(obj) { location.href = getThisUrl().replace('category=' + getUriString('category') + '&' , '') + '&category=' + obj.value; } //비공개체크박스 function getSecretCheck(use , que) { if(use == 'checked') { document.write("관리자에게만 공개합니다"); } else { document.write(""); } } //답변메일발송체크박스 function getRemailCheck(use,email,type) { if (use && email && type == 'reply') { document.write(""); document.write("이메일로 답변발송"); } } //등록인선택셀렉트 function getIsRootSelect(isRoot,v_LogId) { if (isRoot != '0' && v_LogId != '') { document.write(""); if(navigator.userAgent.indexOf('Opera') == -1 && navigator.userAgent.indexOf('MSIE') != -1) { getSelectToLayer(document.getElementById('writer_select'),150,''); } } } //비밀번호 입력폼(글쓰기) function getPasswdInput(wType,secret,pass,name) { var passinput = ""; if (wType) { if (wType == 'reply') { //답변 if (secret == 'checked') { passinput = ""; } else { passinput = ""; } } else { //수정 passinput = ""; } } else { //일반글 passinput = ""; } document.write(passinput); } //이름,패스워드 입력폼(코멘트) function getNameInputCmt(mbid,isroot) { var f = document.CommentForm; var wperm = f.write_perm.value; var yNull = ""; var nNull = ""; if (mbid != '' || isroot != '0') { if (wperm != '0') { document.write(nNull); } else { document.write(yNull); } } else { if (wperm != '0') { document.write(" "); document.write(" "); } else { document.write(yNull); } } } //코멘트갯수 function getCommentNum(num) { if (num) { document.write("("+num+"개)"); } } //코멘트삭제 권한 function getCommentDeletePerm(isRoot,isAdmin,v_LogId,skin,uid,rp_id,ruid) { var pass = (isRoot != '0' || isAdmin != '0' || (v_LogId != '' && v_LogId == rp_id)) ? 1 : 0; document.write(""); } //코멘트삭제 function doCommentDelete(uid,ruid,pass,e) { if (pass == 1) { if (!confirm('\n정말로 삭제하시겠습니까? \n')) { return false; } var f = document.pass_check_form; f.table.value = getUriString('table'); f.action.value = 'cdelete'; f.uid.value = uid; f.ruid.value = ruid; f.p.value = getUriString('p'); f.Nparam.value = getThisUrl() + '&query=view&p=' + getUriString('p') + '&uid=' + uid; f.submit(); } else { getPassLayer('cdelete',0,0,'','',uid,ruid,e); return false; } } //이모션아이콘 function getEmotionIcon(color) { var icon = ""; icon += ""; icon += ""; for(var i = 1; i < 19; i++) { icon += ""; } icon += ""; icon += "
"; document.write(icon); } //이모션선택 function getSelectEm(g,color) { for(var i = 1; i < 19; i++) { if(i == g) { document.getElementById('emotion_td_' + i).style.border = '1 solid gray'; document.getElementById('emotion_td_' + i).style.background = '#ffffff'; document.getElementById('emotion_img_' + i).style.filter = 'none'; document.CommentForm.RP_EMOTION.value = i; } else { document.getElementById('emotion_td_' + i).style.border = '1 solid '+color; document.getElementById('emotion_td_' + i).style.background = color; document.getElementById('emotion_img_' + i).style.filter = 'gray()'; } } } //코멘트필드 리사이즈 function CommentLayResize(que) { var area = document.getElementById('CommentTextAreaLay'); var heit = parseInt(area.style.height.replace('px','')); if (que == '-') { if (heit - 100 >= 60) area.style.height = heit - 100; } else if (que == '+') { if (heit + 100 <= 600) area.style.height = heit + 100; } else { area.style.height = 60; } } //첨부파일 function LayerUpfile(enable,files,table,uid,where,colnum,type) { if(enable) { var Layer_Tag = ""; var Tmp_FileNum = files.split(';'); if (Tmp_FileNum.length > 1) { Layer_Tag += "<IFRAME NAME='TmpFrameForDownload' WIDTH=0 HEIGHT=0 FRAMEBORDER=0 SCROLLING=0></IFRAME>"; Layer_Tag += "
"; Layer_Tag += ""; Layer_Tag += ""; for (var i = 0; i < Tmp_FileNum.length; i++) { if (Tmp_FileNum[i] == "") continue; var fname_arr = getFileName(Tmp_FileNum[i]).split('='); if(fname_arr[1]) { Layer_Tag += ""; } else { Layer_Tag += ""; } if (((i+1)%colnum) == 0) { Layer_Tag += ""; } } Layer_Tag += ""; Layer_Tag += "
"; Layer_Tag += " "; Layer_Tag += "" + fname_arr[0]; Layer_Tag += " (" + getFileSize(fname_arr[1],'K') + ")"; Layer_Tag += ""; Layer_Tag += " "; Layer_Tag += "" + fname_arr[0]; Layer_Tag += " (Link)"; Layer_Tag += "
"; Layer_Tag += "
"; } if (type == 'write') { document.write(Layer_Tag); } else { return Layer_Tag; } } } //링크파일 function LayerLinkfile(enable,files,table,uid,where,colnum,type) { if(enable) { var fname; var Layer_Tag = ""; var Tmp_FileNum = files.split(';'); if (Tmp_FileNum.length > 1) { Layer_Tag += "<IFRAME NAME='TmpFrameForDownload' WIDTH=0 HEIGHT=0 FRAMEBORDER=0 SCROLLING=0></IFRAME>"; Layer_Tag += "
"; Layer_Tag += ""; Layer_Tag += ""; for (var i = 0; i < Tmp_FileNum.length; i++) { if (Tmp_FileNum[i] == "") continue; fname = Tmp_FileNum[i]; Layer_Tag += ""; if (((i+1)%colnum) == 0) { Layer_Tag += ""; } } Layer_Tag += ""; Layer_Tag += "
"; Layer_Tag += " "; Layer_Tag += "" + getFileName(fname); Layer_Tag += " (링크)"; Layer_Tag += "
"; Layer_Tag += "
"; } if (type == 'write') { document.write(Layer_Tag); } else { return Layer_Tag; } } } //---------------------------------------------------------------------------------------------- // 파일처리 관련 //---------------------------------------------------------------------------------------------- //파일명 function getFileName(name) { var FileFullStr = name.split('?'); var FileUrliArr = FileFullStr[0].split('/'); return FileUrliArr[FileUrliArr.length - 1]; } //파일확장자->아이콘 function getFileExt(name) { var ExtSet = "gif,jpg,jpeg,bmp,png,swf,fla,pds,ai,tif,pcx,ppj,"; //이미지,플래쉬 ExtSet += "mid,wav,mp3,"; //사운드 ExtSet += "asf,asx,avi,mpg,mpeg,wmv,wma,ra,ram,mov,"; //동영상 ExtSet += "doc,xls,ppt,hwp,hlp,eml,"; //오피스 ExtSet += "zip,tar,trz,gz,rar,alz,"; //압축 ExtSet += "exe,dll,reg,ini,"; //실행 ExtSet += "php,php3,class,java,htm,html,txt,cgi,pl,jsp,asp,xml,";//web 총53개 var FileNameArr = name.split('.'); var ext = FileNameArr[FileNameArr.length - 1].toLowerCase() if (ExtSet.indexOf(ext) != -1) { return ext; } else { return "unknown"; } } //파일사이즈 function getFileSize(bt , type) { if (type == "M") { var btn = parseInt(bt)/(1024*1024); var bt_split = btn.toString().split('.'); var subnum = bt_split[1] ? '.' + bt_split[1].substring(0,2) : ''; var bt_num = commaSplit(bt_split[0]) + '.' + subnum; return bt_num + "M"; } if (type == "K") { var btn = parseInt(bt)/1024; var bt_split = btn.toString().split('.'); var subnum = bt_split[1] ? '.' + bt_split[1].substring(0,2) : ''; var bt_num = commaSplit(bt_split[0]) + subnum; return bt_num + "K"; } if (type == "B") { return commaSplit(bt) + "B"; } } //스크랩 function Scrab(table,uid,id) { if (id == '') { alert('\n회원으로 로그인해야 이용하실 수 있습니다. \n'); return false; } alert('스크랩하였습니다. '); frames.logiframe.location.href = './bbs.php?table=' + table + '&action=scrab&uid='+uid; } //메일 function SendMail(table,uid) { window.open('./bbs.php?action=mailwin&table='+table+'&uid='+uid , 'mwin' , 'left=0,top=0,width=500,height=500'); }/**************************************************************************************** * bbs/skin/listopia_new_default/lib/skin.js /****************************************************************************************/ /** * 스킨전용 자바스크립트 파일명은 반드시 skin.js 이어야 합니다. */ /********************************************************************************************************** 리스트 */ //카테고리출력 function getPrintCategory(cat) { if(cat) document.write("[" + cat + "]"); } //번호출력 function getPrintNumber(total,i,recnum,p) { document.write(total - (i + (recnum*(p - 1)))); } //비공개체크 function getPrintSecretCheck(secret , skin) { if (secret) document.write(""); } //리플라이체크 function getPrintReplyCheck(re,skin) { if (re) document.write(""); } /********************************************************************************************************** 내용조회 */ //폰트확대 function FontPlus(uid) { var l = document.getElementById('ContentsLayer'+uid); var nSize = l.style.fontSize ? l.style.fontSize : '9pt'; var iSize = parseInt(nSize.replace('pt','')); if (iSize < 20) { l.style.fontSize = (iSize + 1) + 'pt'; l.style.lineHeight = '140%'; } } //폰트축소 function FontMinus(uid) { var l = document.getElementById('ContentsLayer'+uid); var nSize = l.style.fontSize ? l.style.fontSize : '9pt'; var iSize = parseInt(nSize.replace('pt','')); if (iSize > 6) { l.style.fontSize = (iSize - 1) + 'pt'; l.style.lineHeight = '140%'; } } //문서인쇄 function PagePrint(sbj,uid) { var img = document.getElementById('func_img'+uid); img.style.position= 'relative'; img.style.left = 0; img.style.top = 0; window.open('./bbs/lib/module/print/print.htm?sbj='+escape(sbj)+'&uid='+uid,'printwin','width=650,height=600,scrollbars=yes'); } //기능이미지 function getFuncImg(e,img) { var x = (e.pageX) ? e.pageX : document.body.scrollLeft+event.clientX; var y = (e.pageY) ? e.pageY : document.body.scrollTop+event.clientY; var img = document.getElementById(img); if (img.style.position != 'absolute') { img.style.position= 'absolute'; img.style.left = x; img.style.top = y; } else { img.style.position= 'relative'; img.style.left = 0; img.style.top = 0; } } /********************************************************************************************************** 글쓰기 */ //데이터등록체크 function WriteCheck() { var f = document.WriteForm; if (f.isRoot.value == "0" && f.mbid.value == "" && f.BB_NAME.value == "") { alert('\n이름을 입력해 주세요. \n'); f.BB_NAME.focus(); return false; } if (f.BB_EMAIL.value) { if ( f.BB_EMAIL.value.length <= 6 || f.BB_EMAIL.value.indexOf ('@', 0) == -1 || f.BB_EMAIL.value.indexOf ('.', 0) == -1) { alert('이메일주소가 올바르지 않습니다. \n'); f.BB_EMAIL.value = ""; f.BB_EMAIL.focus(); return false; } } if (f.BB_SUBJECT.value == "") { alert('\n제목을 입력해 주세요. \n'); f.BB_SUBJECT.focus(); return false; } if (f.is_category.value) { if (!f.BB_CATEGORY.value) { alert('\n' + f.BB_CATEGORY.options[0].text + '을(를) 선택해 주세요. \n'); f.BB_CATEGORY.focus(); //일반셀렉트사용시 return false; } } var chk,i; if(getEditCheck(f)) return false; //에디터본문체크 if (CheckWords(f.BB_SUBJECT.value) != '' || CheckWords(f.BB_CONTENT.value) != '') { alert('\n관리자에 의해 제한된 단어가 사용되었습니다. \n'); return false; } if (f.BB_SECRET.checked == true) { if (f.BB_PASS.value == "") { alert('\n비공개글로 등록할 경우에는 반드시 비밀번호를 입력해 주셔야 합니다. \n'); f.BB_PASS.focus(); return false; } } if (f.useup.value != '0') { f.BB_FILE.value = getUploadFiles(); //업로드체크 } if (f.uselk.value != '0') { f.BB_LINK.value = getLinkFiles(); //링크체크 } f.Nparam.value = NparamSetting(); } //옵션출력체크 function OptionCheck() { var home = document.getElementById('Option_Url'); var prev = document.getElementById('Option_Preview'); var img = document.getElementById('Option_Img'); var f = document.WriteForm; if(!f.mbid.value) { if (home.style.display == 'none') { home.style.display = 'block'; } else { home.style.display = 'none'; } } if (prev.style.display == 'none') { prev.style.display = 'block'; } else { prev.style.display = 'none'; } if (img.src.indexOf('dot_option.gif') != -1) { img.src = img.src.replace('dot_option.gif','dot_option1.gif'); } else { img.src = img.src.replace('dot_option1.gif','dot_option.gif'); } } //이동경로체크 function NparamSetting() { var pam = getThisUrl(); pam += '&query=' + getUriString('query'); pam += '&write_type=' + getUriString('write_type'); pam += '&uid=' + getUriString('uid'); pam += '&p=' + getUriString('p'); return pam; } /********************************************************************************************************** 멀티체크 */ var Multi_Check_Uid = ''; function Multi_Check(obj,e,skindir,isRoot,isAdmin) { var ml = document.getElementById('MultiCheckLayer'); var tg = ''; var x = (e.pageX) ? e.pageX : document.body.scrollLeft+event.clientX; var y = (e.pageY) ? e.pageY : document.body.scrollTop+event.clientY; x += 10; y -= 20; if (obj.checked == true) Multi_Check_Uid += obj.value + ';'; else Multi_Check_Uid = Multi_Check_Uid.replace(obj.value + ';' , ''); if (Multi_Check_Uid) { var multiarr = Multi_Check_Uid.split(';'); tg += ""; tg += ""; tg += ""; tg += "
"; tg += " "; tg += " "; tg += " "; tg += "
"; tg += " "; if(isRoot != 0 || isAdmin != 0) { tg += " "; if (isRoot != 0) { tg += " "; tg += ""; } } if(isRoot == 0 && isAdmin == 0) { tg += "(선택된 자료 : "+(multiarr.length-1)+") "; } tg += "
"; ml.innerHTML = tg; } else { ml.innerHTML = ''; } } function Multi_Check_Que(n) { var i; var l = document.getElementsByName('At[]'); switch (n) { case 1 : Multi_Check_Uid = ''; for ( i = 0; i < l.length; i++) { l[i].checked = true; Multi_Check_Uid += l[i].value + ';'; } break; case 2 : Multi_Check_Uid = ''; for ( i = 0; i < l.length; i++) { l[i].checked = false; Multi_Check_Uid = Multi_Check_Uid.replace(l[i].value + ';' , ''); } break; case 3 : Multi_Check_Uid = ''; for ( i = 0; i < l.length; i++) { if(l[i].checked == true) { l[i].checked = false; Multi_Check_Uid = Multi_Check_Uid.replace(l[i].value + ';' , ''); } else { l[i].checked = true; Multi_Check_Uid += l[i].value + ';'; } } break; case 4 : if (!Multi_Check_Uid) return false; location.href = getThisUrl() + '&query=multi&p=' + getUriString('p') + '&MultiUid=' + Multi_Check_Uid; break; case 5 : if (!Multi_Check_Uid) return false; if (!confirm('삭제된 데이터는 복구가 불가능합니다. \n\n정말로 삭제하시겠습니까?')) return false; location.href = getThisUrl() + '&action=multi_delete&p=' + getUriString('p') + '&MultiUid=' + Multi_Check_Uid; break; case 6 : if (!Multi_Check_Uid) return false; window.open('./bbs/lib/module/mvcopy/mvcopy.php?table='+getUriString('table')+'&type=move&MultiUid='+Multi_Check_Uid,'mvcopywin','left=0,top=0,width=300,height=450'); break; case 7 : if (!Multi_Check_Uid) return false; window.open('./bbs/lib/module/mvcopy/mvcopy.php?table='+getUriString('table')+'&type=copy&MultiUid='+Multi_Check_Uid,'mvcopywin','left=0,top=0,width=300,height=450'); break; } } /********************************************************************************************************** 코멘트 */ //코멘트등록 체크 function CommentCheck(f) { if (f.write_perm.value == '0') { alert('죄송합니다. 의견등록 권한이 없습니다. '); f.RP_CONTENT.disabled = true; f.RP_CONTENT.style.background = '#EFEFEF'; return false; } if (f.RP_CONTENT.value == "") { alert('의견이 입력되지 않았습니다. '); f.RP_CONTENT.focus(); return false; } if (CheckWords(f.RP_CONTENT.value) != '') { alert('\n관리자에 의해 제한된 단어가 사용되었습니다. \n'); return false; } if (!f.RP_NAME.value || f.RP_NAME.value == '이름' ) { alert('이름이 입력되지 않았습니다. '); f.RP_NAME.focus(); return false; } if (!f.isPass.value) { if (!f.RP_PASS.value || f.RP_PASS.value == '비밀번호') { if (!confirm('\n비밀번호를 입력하지 않으시면 삭제가 불가능합니다. \n\n비밀번호 입력없이 등록하시겠습니까?\n')) { f.RP_PASS.focus(); return false; } } } if (!confirm('\n입력하신 코멘트를 등록하시겠습니까? \n')) { return false; } if (f.useup.value != '0') { f.RP_FILE.value = getUploadFiles(); } if (f.uselink.value != '0') { f.RP_LINK.value = getLinkFiles(); } f.Nparam.value = getThisUrl() + '&query=view&uid=' + getUriString('uid') + '&p=' + getUriString('p'); } //코멘트점수선택 출력 function getCommentVote(use) { if (use) { var tag = ""; tag += ""; document.write(tag); if(navigator.userAgent.indexOf('Opera') == -1 && navigator.userAgent.indexOf('Netscape') == -1) { getSelectToLayer(document.getElementById('RP_VOTE'),100,''); } } } //코멘트비저블 function getCommentVisible(obj) { var l = document.getElementById('Comment_Layer'); if(obj.src.indexOf('_show.gif') != -1) { obj.src = obj.src.replace('_show.gif', '_hide.gif'); l.style.display = 'block'; } else { obj.src = obj.src.replace('_hide.gif', '_show.gif'); l.style.display = 'none'; } } //코멘트등록권한 체크-비권한-> display : none function CommentWritePermCheck() { var f = document.CommentForm; var l = document.getElementById('CommentTable'); if (f.write_perm.value == '0') { l.style.display = 'none'; } else{ l.style.display = 'block'; } } function getCWriteVisible(id) { if (id == '') { alert('로그인해 주세요. '); return false; } var l = document.getElementById('CommentWriteTbl'); if(l.style.display == 'none') { l.style.display = 'block'; } else { l.style.display = 'none'; } } //코멘트 웹에디터링크출력체크 function getCommentEditLink(op,skinimg) { if (op) { document.write(""); document.write("[에디터]"); } } /********************************************************************************************************** 첨부,링크 파일 */ //파일첨부체크 function getUpfileNumIcon(enable , files , num , down , table, uid, skin , link , where , cols) { if (num > 0) { var string = ""; string += ""; string += " 첨부파일 " + num + "개"; string += "(다운로드 "+commaSplit(down)+"건)"; string += "
"; document.write(string); } } //파일레이어 show function showLayerUpfile(enable , files , table , uid , where , cols , num , link , skin , down , e) { if (!enable) { alert('죄송합니다. 다운로드 권한이 없습니다. '); return false; } var x = (e.pageX) ? e.pageX : document.body.scrollLeft+event.clientX; var y = (e.pageY) ? e.pageY : document.body.scrollTop+event.clientY; var to = ""; var tl = document.getElementById('tmp_Upfile_Show_Layer'); var ly = LayerUpfile(enable , files + link , table, uid , where , cols , 'return'); var wt = parseInt(num/cols) > 0 ? cols * 220 : (num%cols) * 220; wt = num == 1 ? 270 : wt; tl.style.position = 'absolute'; tl.style.left = x; tl.style.top = y; to += ""; to += ""; to += ""; to += ""; to += ""; to += ""; to += "
"; to += "   첨부파일 " + num + "개"; to += "(다운로드 "+commaSplit(down)+"건)"; to += "닫기  "; to += "
" + ly + "
"; tl.innerHTML = to; document.getElementById('upFile_Tmp_Layer').style.background = '#F5F3F5'; document.getElementById('upFile_Tmp_Layer').style.width = '100%'; } //파일레이어 제거 function hideLayerUpfile() { document.getElementById('tmp_Upfile_Show_Layer').innerHTML = ""; } //추천 function putReq(table,uid) { if (!confirm('정말로 추천하시겠습니까? ')) { return false; } frames.requestframe.location.href = './bbs.php?table=' + table + '&action=request&uid='+uid; }</scRIPT> <scRIPT language=javascript> /**************************************************************************************** * ./lib/js/init.js /****************************************************************************************/ //스트링 끊기 function getCutString(str,num,ss) { return str.substring(0,num) + ss; } //타입비교 (비교문자 , 비교형식 ; ex: getTypeCheck(string , "1234567890") ) function getTypeCheck (s, spc) { var i; for(i=0; i< s.length; i++) { if (spc.indexOf(s.substring(i, i+1)) < 0) { return false; } } return true; } //콤마삽입 (number_format) function commaSplit(srcNumber) { var txtNumber = '' + srcNumber; var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])'); var arrNumber = txtNumber.split('.'); arrNumber[0] += '.'; do { arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2'); } while (rxSplit.test(arrNumber[0])); if (arrNumber.length > 1) { return arrNumber.join(''); } else { return arrNumber[0].split('.')[0]; } } //콤마제거 function filterNum(str) { re = /^\$|,/g; return str.replace(re, ""); } //날짜format - getDateFormat('20040605121212' , 'xxxx-xx-xx [xx:xx:xx]'); function getDateFormat(date , type) { var ck; var rtstr = ""; var j = 0; for(var i = 0; i < type.length; i++) { if(type.substring(i,i+1) == 'x') { rtstr += date.substring(j,j+1); } else { j--; rtstr += type.substring(i,i+1); } j++; } document.write(rtstr); } //단어 필터링 function CheckWords(words) { if(words.length < 1) return ''; var BadWordSet = frames.WordFilterFrame.document.body.innerHTML; var BadWordArr = BadWordSet.split(','); var BadWordNum = BadWordArr.length; for (var i = 0; i < BadWordNum; i++) { if(words.indexOf(BadWordArr[i]) != -1) return BadWordArr[i]; } return ''; } //페이징처리 function getPageLink1(lnum,p,tpage,imgpath) { var g_p1 = ""; var g_p2 = ""; var g_n1 = ""; var g_n2 = ""; var g_cn = ""; var g_q = ""; if(p < lnum+1) { g_q += g_p1; } else{ var pp = parseInt((p-1)/lnum)*lnum; g_q += ""+g_p2+"";} g_q += g_cn; var st1 = parseInt((p-1)/lnum)*lnum + 1; var st2 = st1 + lnum; for(var jn = st1; jn < st2; jn++) if ( jn <= tpage) (jn == p)? g_q += ""+jn+""+g_cn : g_q += ""+jn+""+g_cn; if(tpage < lnum || tpage < jn) { g_q += g_n1; } else{var np = jn; g_q += ""+g_n2+""; } document.write(g_q); } //페이지클릭 function getPageGo1(n) { var p = getUriString1('p'); var que = location.href.replace('&p='+p,''); que = que.indexOf('?') != -1 ? que : que + '?'; location.href= que + '&p=' + n; } //파라미터값 function getUriString1(param) { var QuerySplit = location.href.split('?'); var ResultQuer = QuerySplit[1] ? QuerySplit[1].split('&') : ''; for (var i = 0; i < ResultQuer.length; i++) { var keyval = ResultQuer[i].split('='); if (param == keyval[0]) return keyval[1]; } return ""; } function outCheck() { if (!confirm('정말로 탈퇴하시겠습니까?\n\n[확인]을 클릭하면 재확인 없이 탈퇴처리됩니다. ')) { return false; } } function showGoodsPic(uid) { window.open('./lib/module/picview/view.php?uid=' + uid,'picwin','left=0,top=0,width=720,height=555,scrollbars=no'); } function showGroupPic(uid) { window.open('./lib/module/picview/gview.php?uid=' + uid,'picwin','left=0,top=0,width=720,height=555,scrollbars=no'); } function showAuctionPic(uid) { window.open('./lib/module/picview/aview.php?uid=' + uid,'picwin','left=0,top=0,width=720,height=555,scrollbars=no'); } function wishCheck(id) { if(id == '') { alert('회원으로 로그인해 주세요. '); return false; } if (!confirm('정말로 위시리스트에 담으시겠습니까? ')) { return false; } } function showSearchWin(skin) { window.open('./template/search/'+skin+'/search.php','searchwin','left=0,top=0,width=457,height=360,scrollbars=no'); } function GoodsExplorer() { window.open('./lib/module/explorer/explorer.php','explorer','left=0,top=0,width=800,height=680,status=yes,scrollbars=no'); } function getBlink(str,lay) { var c = document.getElementById(lay); if(c.innerHTML == '') c.innerHTML = str; if(c.style.visibility == 'visible') { c.style.visibility = 'hidden'; } else { c.style.visibility = 'visible'; } setTimeout("getBlink('"+str+"','"+lay+"');" , 500); } /**************************************************************************************** * ./lib/js/user.js /****************************************************************************************/ var klayer_flag=0; var KimsUserName; var KimsUserUrl; var KimsUserId; var KimsMyId; //루트 레이어생성 function getRootLayer(table,e) { var imgpath = "./image/idl"; var T = ""; var L = document.getElementById('UserIdLayer'); var x = (e.pageX) ? e.pageX : document.body.scrollLeft+event.clientX; var y = (e.pageY) ? e.pageY : document.body.scrollTop+event.clientY; klayer_flag = 1; KimsUserName = '관리자'; KimsUserId = 'root'; T += "
"; T += ""; T += ""; T += ""; if (table ) T += ""; T += "
메일 보내기
쪽지 보내기
등록글 검색
"; T += ""; L.innerHTML = T; L.style.top = y; L.style.left = x + 10; L.style.display = 'block'; document.getElementById('UserTableFocusField').focus(); } //Writer 레이어생성 function getUserIdLayer(user_name,user_id,home_url,friend_type,table,myid,e) { var imgpath = "./image/idl"; var T = ""; var L = document.getElementById('UserIdLayer'); var x = (e.pageX) ? e.pageX : document.body.scrollLeft+event.clientX; var y = (e.pageY) ? e.pageY : document.body.scrollTop+event.clientY; klayer_flag = 1; KimsUserName = user_name KimsUserUrl = home_url; KimsUserId = user_id; KimsMyId = myid; T += "<iframe name='kimsidlayerframe' width=0 height=0 frameborder=0 scrolling=0></iframe>"; T += "
"; T += ""; T += ""; T += ""; T += ""; if (home_url != '') T += ""; if (friend_type != 'me') { if(friend_type == '') T += ""; if(friend_type == 'friend') T += ""; if(friend_type == '') T += ""; if(friend_type == 'black') T += ""; } if(table ) T += ""; T += "
사용자 정보
메일 보내기
쪽지 보내기
홈페이지 방문
친구로 등록
친구에서 제외
블랙맨 등록
블팩맨에서 제외
등록글 검색
"; T += ""; L.innerHTML = T; L.style.top = y; L.style.left = x + 10; L.style.display = 'block'; document.getElementById('UserTableFocusField').focus(); } function getRootQue(que) { switch (que) { case 'mail' : getUserPaperWin('','mail'); break; case 'msg' : getUserPaperWin('','send'); break; case 'search' : break; } } //요청 function getIdQueToMember(que) { switch (que) { case 'info' : getUserInfoWin(KimsUserId,'main'); break; case 'mail' : getUserPaperWin(KimsUserId,'mail'); break; case 'msg' : getUserPaperWin(KimsUserId,'send'); break; case 'home' : if(KimsUserUrl != '') window.open(KimsUserUrl); else alert('홈페이지가 등록되어 있지 않습니다. '); break; case 'friend_Y' : if (!confirm('정말로 친구로 등록하시겠습니까? ')) { return false; } getUserAction(KimsUserId,'friend_in','friend'); break; case 'black_Y' : if (!confirm('정말로 블랙리스트에 등록하시겠습니까? ')) { return false; } getUserAction(KimsUserId,'friend_in','black'); break; case 'friend_N' : if (!confirm('정말로 친구에서 제외하시겠습니까? ')) { return false; } getUserAction(KimsUserId,'friend_out','friend'); break; case 'black_N' : if (!confirm('정말로 블랙리스트에서 제외하시겠습니까? ')) { return false; } getUserAction(KimsUserId,'friend_out','black'); break; case 'search' : if (KimsUserId != '') { document.DataForm.where.value = 'BB_MB_ID'; document.DataForm.keyword.value = KimsUserId; } else { document.DataForm.where.value = 'BB_NAME'; document.DataForm.keyword.value = KimsUserName; } location.href = getThisUrl(); break; } } //마우스오버 function getIdTrOver(obj) { obj.style.background = '#225588'; obj.style.color = '#EFEFEF'; } //마우스아웃 function getIdTrOut(obj) { obj.style.background = '#EFEFEF'; obj.style.color = '#000000'; } //BlurAct function getUserIdLayerBlur() { klayer_flag = 0; setTimeout("getUserIdLayerBlurQ(document.getElementById('UserIdTable'))" , 150); } //BlurQue function getUserIdLayerBlurQ(obj) { if (klayer_flag) return false; document.getElementById('UserIdLayer').innerHTML = ""; klayer_flag = 0; KimsUserName = '' KimsUserUrl = ''; KimsUserId = ''; KimsMyId = ''; obj.style.left = 0; obj.style.top = 0; obj.style.display = 'none'; } function getUserInfoWin(hisid,query) { window.open('./lib/module/member/member.php?query='+query+'&id='+hisid , 'userwin' , 'left=0,top=0,width=480,height=455'); } function getUserPaperWin(hisid,query) { window.open('./lib/module/paper/paper.php?query='+query+'&id='+hisid,'msgwin','left=0,top=0,width=435,height=310'); } function getUserAction(hisid,action,type) { frames.kimsidlayerframe.location.href = './lib/module/member/member.php?action='+action+'&id='+hisid+'&type='+type+'&stop=1'; setTimeout("location.reload();" , 100); }/**************************************************************************************** * ./lib/js/select.js /****************************************************************************************/ //SELECT -> LAYER변환 function getSelectToLayer(obj,lwidth,href) { if(navigator.userAgent.indexOf('Opera') != -1 || navigator.userAgent.indexOf('MSIE') == -1) { return false; } obj.style.display = 'none'; var newsb = obj.id + "_sbj"; var newid = obj.id + "_tmp"; var newim = obj.id + "_img"; var LayerTag = ""; LayerTag += ""; LayerTag += "
"; LayerTag += ""; LayerTag += ""; LayerTag += ""; LayerTag += ""; LayerTag += "
 " + obj.options[obj.selectedIndex].text + "
"; LayerTag += ""; for (var i = 0 ; i < obj.length; i++) { LayerTag += ""; document.write(LayerTag); } //서브레이어보이기 function getSelectSubLayer(obj,sobj) { if(obj.style.display == 'none') { sobj.style.background = '#FFFFFF'; sobj.style.color = '#000000'; obj.style.display = 'block'; NowSelectedLayer = obj; obj.focus(); } else { sobj.style.background = '#225588'; sobj.style.color = '#FFFFFF'; obj.style.display = 'none'; } } //서브레이어체크 function getSelectSubLayer1(obj) { if(obj.style.display != 'none') { obj.style.display = 'none'; } } //타이틀레이어 MouseOver function getSelectLayerOver(obj,img,nobj) { if (nobj.style.display == 'none') { obj.style.border = '1 solid #225588'; img.style.filter = ''; } } //타이틀레이어 MouseOut function getSelectLayerOut(obj,img) { obj.style.border = '1 solid #C0C0C0'; img.style.filter = 'gray()'; } //서브레이어 MouseOver function getSelectMoveLayer(obj) { if (obj.style.color == '#000000') { obj.style.background = '#225588'; obj.style.color = '#FFFFFF'; } } //서브레이어 MouseOut function getSelectMoveLayer1(obj) { obj.style.background = '#FFFFFF'; obj.style.color = '#000000'; } //새레이어선택 function getSelectChangeLayer(obj,fobj,sobj,text,value,href) { if (href) { eval("document.DataForm." + href).value = value; location.href = getThisUrl(); return false; } else { fobj.style.display = 'none'; sobj.innerHTML = ' ' + text; sobj.style.background = '#225588'; sobj.style.color = '#FFFFFF'; sobj.focus(); obj.value = value; } /* if (href) { if (href.indexOf('submit()') != -1) { eval(href); } else { location.href = href + value; } return false; } */ } //타이틀레이어 blur function getSelectLayerBlur(obj) { obj.style.background = '#FFFFFF'; obj.style.color = '#000000'; } //서브레이어 닫기 function getSubLayerClose(obj) { if (obj.style.display != 'none') { setTimeout("document.getElementById('" + obj.id + "').style.display = 'none';" , 150); } } </scRIPT>
미디어플레이어에서 동영상이 안나올경우 조치법
<scRIPT>getUpfileNumIcon(0,'',1,0,'news_notice',12,'listopia_new_default','','dat',2);</scRIPT> 첨부파일 1개(다운로드 0건)
첨부파일 1개(다운로드 0건)
교회로닷컴 , 등록일 : <scRIPT>getDateFormat('20060529090605' , 'xxxx.xx.xx ');</scRIPT> 2006.05.29 <09:06> 2006.05.29 <09:06> , 조회 : 30