// 등록 function USER_productSubmit(){ oForm = document.USER_productForm; if( oForm.writer_id.value == "" ) { alert("회원만 쓰실 수 있습니다.\n\n로그인후 사용해 주세요."); location.href = "http://tv.co.kr/member/login/memberLogin.html?loginReturnUrl=http%3A%2F%2Fdrama.tv.co.kr%2Fdrama%2Freview%2FdramaReview.html%3Fdrama_idx%3D5355%26channel%3Ddrama%26subPageType%3Dproduct"; return; } valueStr = oForm.memberSubinfo.value; if( valueStr.length < 2 ) { alert("두자 이상의 글 내용을 입력하세요."); oForm.memberSubinfo.focus(); return false; } else if( !NMK_blankCheck(valueStr) ){ alert("공백만 입력할 수 없습니다."); oForm.memberSubinfo.focus(); return false; } else if( checkingStr(_deny_strings, valueStr) ) { alert("금지단어가 발견되었습니다.\n\n금지단어 : " + checkingStr(_deny_strings, valueStr)); oForm.memberSubinfo.focus(); oForm.memberSubinfo.select(); return false; } else if( checkingStr(_deny_html, valueStr) ){ alert("사용할 수 없는 HTML이 발견되었습니다.\n\n금지HTML : " + checkingStr(_deny_html, valueStr)); oForm.memberSubinfo.focus(); oForm.memberSubinfo.select(); return false; } /*else if( NMK_CheckLen(oForm.memberSubinfo.value) > 1000 ) { alert("입력 가능한 글자수를 초과하였습니다.\n\n작품소개는 1000자까지 입력 가능합니다."); oForm.memberSubinfo.focus(); oForm.memberSubinfo.select(); return false; }*/ oForm.sub_type.value = "product"; oForm.submit(); return; } // 수정 function USER_productUpdate(s_idx){ if( !s_idx ) return; oForm = document.USER_productForm; if( oForm.writer_id.value == "" ) { alert("회원만 쓰실 수 있습니다.\n\n로그인후 사용해 주세요."); location.href = "http://tv.co.kr/member/login/memberLogin.html?loginReturnUrl=http%3A%2F%2Fdrama.tv.co.kr%2Fdrama%2Freview%2FdramaReview.html%3Fdrama_idx%3D5355%26channel%3Ddrama%26subPageType%3Dproduct"; return; } url = "http://tv.co.kr/member/update/sub_info_update.html?relation_table=drama_info&relation_idx=5355&sub_type=product&s_idx=" + s_idx + "&sFocus=product"; /*window.open*/(url,"USER_productWin","width=480,height=240"); } // 삭제 function USER_productDelete(s_idx){ if( !s_idx ) return; if( confirm("정말 삭제하시겠습니까?") == false ) return; oForm = document.USER_productForm; oForm.sub_type.value = "delete_sub_info"; oForm.del_s_idx.value = s_idx; oForm.focus.value; oForm.submit(); } // 신고하기 function USER_report(s_idx){ formHTML = "" + "" + "" + "" + "" + ""; document.all.NMK_hiddenDiv.innerHTML = formHTML; reportWin = /*window.open*/("","reportWin","width=360,height=310"); document.reportForm.submit(); } function divView(t,no){ if( t == "synopsis" ){ if(document.all.synopsisFrmDiv.style.display == 'none'){ // 등록폼이 오픈이면 if( no < 1 ){ document.all.member_synopsis.style.display='none'; // memberSynopDiv document.all.synopsisMore.style.display='none'; // more / 닫기 div } else{ document.all.member_synopsis.style.display='block'; document.all.synopsisMore.style.display='block'; } document.all.tv_synopsis.style.display='none'; document.all.synopsisFrmDiv.style.display='block'; document.all.memberSynopsisPartDiv.innerHTML='TV설명'; } else { synopCntStr = ""; if( no > 0 ) synopCntStr = "(" + no + ")"; document.all.tv_synopsis.style.display='block'; document.all.synopsisFrmDiv.style.display='none'; document.all.member_synopsis.style.display='none'; document.all.memberSynopsisPartDiv.innerHTML = "회원참여" + synopCntStr; document.all.synopsisMore.style.display='none'; if( no > 5 ) { document.all.member_synopsis_more.style.display='none'; document.all.synopsisMore.innerHTML="...more (총 " + no +"개)"; } } } else if( t == "product" ){ if(document.all.productFrmDiv.style.display == 'none'){ // 등록폼이 오픈이면 if( no < 1 ){ document.all.member_product.style.display='none'; // memberSynopDiv document.all.productMore.style.display='none'; // more / 닫기 div } else{ document.all.member_product.style.display='block'; document.all.productMore.style.display='block'; } document.all.tv_product.style.display='none'; document.all.productFrmDiv.style.display='block'; document.all.memberProductPartDiv.innerHTML='TV설명'; } else { synopCntStr = ""; if( no > 0 ) synopCntStr = "(" + no + ")"; document.all.tv_product.style.display='block'; document.all.productFrmDiv.style.display='none'; document.all.member_product.style.display='none'; document.all.memberProductPartDiv.innerHTML = "회원참여" + synopCntStr; document.all.productMore.style.display='none'; if( no > 5 ) { document.all.member_product_more.style.display='none'; document.all.productMore.innerHTML="...more (총 " + no +"개)"; } } } } function moreDivView(no){ if( document.all.member_product_more.style.display=='none' ){ document.all.member_product_more.style.display='block'; document.all.productMore.innerHTML = "닫기"; } else { document.all.member_product_more.style.display='none'; document.all.productMore.innerHTML = "...more (총 " + no +"개)"; } }
|