유머 게시판

세기의 대결

전 정섭 2011. 2. 25. 23:21

//

//&reloadTemplate=T var isRecom = false; var isOwner = false ; var isLogin = false ; //로그인페이지 이동 function chkLogin(type){ if(type == 1){ url="loginAgreeArticle?bbsId=K160&commentId=0&type=R&articleId=55927&bbsId=K160&searchKey=&searchValue=&sortKey=depth&objCate1=&searchName=&limitDate=0&agree=F"; }else{ url="loginDisagreeArticle?bbsId=K160&commentId=0&type=R&articleId=55927&bbsId=K160&searchKey=&searchValue=&sortKey=depth&objCate1=&searchName=&limitDate=0&agree=F"; } top.location.href=url; } function goLoginPage() { if(confirm("먼저 로그인 하셔야 합니다.\n로그인 페이지로 이동 하시겠습니까?")){ url = "http://login.daum.net/accounts/loginform.do?daumauth=1&url=" + encodeURIComponent(location.href); top.location.href = url; } } function readRecom1(type){ //로그인체크 if(!isLogin){chkLogin(type);return;} //본인여부체크 if(isOwner){ alert("자신의 글에는 투표하실 수 없습니다"); return false; } if(isRecom){ alert("이미 참여하셨습니다"); return; } var url = (type==1) ? 'agreeArticle':'disagreeArticle'; var ftype = (type==1) ? 'A':'D'; //로딩이미지 보여주기 UI.$('bt_rcmd').style.display = "none"; UI.$('bt_oppo').style.display = "none"; UI.$('ld_image').style.display = ""; document.getElementById('ld_image').innerHTML = ""; new UI.Ajax( { url:url, param:'bbsId=K160&feedback.bbsId=K160&feedback.articleId=55927&feedback.commentId=0&feedback.type='+ftype+'&articleId=55927', onComplete:readRecom2 } ); } function readRecom2(req) { var result = eval('(' + req.responseText + ')'); //alert(result.status) UI.$('ld_image').style.display = "none"; UI.$('bt_rcmd').style.display = ""; UI.$('bt_oppo').style.display = ""; //로딩이미지 삭제 if (result.status == '500'){ alert("이미 참여하셨습니다"); isRecom = true; return false; }else if(result.status == '600'){ alert("이미 참여하셨습니다"); isRecom = true; return false; }else if (result.status == '700'){ alert("이미 참여하셨습니다"); isRecom = true; return false; }else if (result.status == '300'){ alert("잘못된 오류입니다. 다시한번 시도해 주세요."); return false; }else if (result.status == '200'){ UI.$('bt_rcmd').innerHTML = ""+result.agreeCount+""; UI.$('bt_oppo').innerHTML = ""+result.disagreeCount+""; //UI.$('bt_result').innerHTML = result.agreeRate +"%"; //setSwfScore(result.agreeRate); //alert("투표가 성공적으로 되었습니다"); isRecom = true; }else return false; //alert(req.responseText) //status 체크 /* status 200 : 성공 500 : 중복 선택한 경우 600:찬성 700:반대 300 : 실패 {status:"500", bbsId:"K152", articleId:"58367", agreeCount:"3", disagreeCount:"0", agreeRate:"100"} */ }

'유머 게시판' 카테고리의 다른 글

너무 놀란 강아지   (0) 2011.03.12
메뉴판에 돈 붙인 식당(before 5years)  (0) 2011.03.05
새해 운입니다...  (0) 2011.02.18
짱구와 을동이....  (0) 2011.02.12
일탈  (0) 2011.02.02