"> ', description: '✨<소리지음 뮤지컬 극단> 2기 단원 모집✨청소년이 직접 창작하고 공연하는 뮤지컬 무대에서 꿈과 열정을 펼쳐나갈 단원을 공개 모집합니다.음악과 노래를 사랑하고 연기와 춤에 관심 있는 청소년들의 많은 지원 바랍니다.', imageWidth: 751, imageHeight: 441, imageUrl: 'http://thecontest.co.kr/common/download.php?ftype=mbanner&fid=13672&fno=1', link: { mobileWebUrl: 'http://m.thecontest.co.kr/contest/contest_view.php?cnst_id=13672', webUrl: 'http://thecontest.co.kr/contest/contest_view.php?cnst_id=13672' }, }, social: { viewCount: 3875, }, }); } '; }); //window.open('', '', 'left='+(screen.availWidth-660)/2+',top='+(screen.availHeight-430)/2+', width=660px,height=430px'); $(window).load(function() { addList(); $("#work-word").keypress(function(e) { if(e.keyCode === 13) setKeyword(); }); if($("#board-order-opt" + work_sort).length == 1) { $("#board-order-opt" + work_sort).css("font-weight","bold"); } }); $(window).scroll(function() { //console.log($(window).scrollTop(), $(document).height() - $(window).height() - 200); if ($(window).scrollTop() > $(document).height() - $(window).height() - 200) addList(); }); function metaShow(){ if($('.meta_description').is(':visible')){ $('.meta_description').slideUp("slow"); $('#meta_rotate').rotate({ duration:1000, angle: 0, animateTo:-720 }); }else{ $('.meta_description').slideDown("slow"); $('#meta_rotate').rotate({ duration:1000, angle: 0, animateTo:810 }); } /* if( $('.meta_description').is(':visible') ){ $('.meta_description').show(); }else{ $('.meta_description').hide(); } */ /* if(visible){ $('#meta_rotate').rotate({ duration:1000, angle: 0, animateTo:3690 }); }else{ $('#meta_rotate').rotate({ duration:1000, angle: 0, animateTo:36 }); } */ } function getInternetExplorer(){ var agt = navigator.userAgent.toLowerCase(); if (agt.indexOf("chrome") != -1) return 'Chrome'; if (agt.indexOf("opera") != -1) return 'Opera'; if (agt.indexOf("staroffice") != -1) return 'Star Office'; if (agt.indexOf("webtv") != -1) return 'WebTV'; if (agt.indexOf("beonex") != -1) return 'Beonex'; if (agt.indexOf("chimera") != -1) return 'Chimera'; if (agt.indexOf("netpositive") != -1) return 'NetPositive'; if (agt.indexOf("phoenix") != -1) return 'Phoenix'; if (agt.indexOf("firefox") != -1) return 'Firefox'; if (agt.indexOf("safari") != -1) return 'Safari'; if (agt.indexOf("skipstone") != -1) return 'SkipStone'; if (agt.indexOf("msie") != -1) return 'Internet Explorer'; if (agt.indexOf("netscape") != -1) return 'Netscape'; if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla'; } function getInternetExplorerVersion() { var rv = -1; // Return value assumes failure. if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) rv = parseFloat(RegExp.$1); } return rv; } function modifyContest(num){ msg = "수정이 불가능한 공모전 입니다."; msg = "수정 가능시간이 초과되었습니다."; $('#ccont_id').val(num); document.cnst_param_modify.submit(); } function deleteContest(num){ msg = "삭제가 불가능한 공모전 입니다."; msg = "수정 가능시간이 초과되었습니다."; msg = "삭제 가능시간이 초과되었습니다."; if(confirm("작품을 삭제하시겠습니까?")){ $.post("contest_ajax_request.php", {id:num, flag:"rmCon", cnst_id:13672 }, function(rs) { switch(rs){ case "ok" : location.href='/contest/contest_view.php?cnst_id=13672'; break; case "nosess" : alert('다시 로그인해 주세요.'); location.href = "/account/login.php"; break; case "timeover" : alert(msg); break; } }); } } // 참여작 검색 function setKeyword() { if($("#work-word").val().length == 1) { alert('검색어는 2글자 이상 입력하세요'); return; } if(board_type == "002"){ location.href = '/contest/contest_view.php?cnst_id=13672&work_cate=' + $('#work-cate').val() + '&work_word=' + $('#work-word').val(); } board_page = 0; paging.page = 1; isComplete = false; if(!$("#work-word").val()) { work_cate = ""; work_word = ""; } else { work_cate = $("#work-cate").val(); work_word = $("#work-word").val(); } $("#gallery_list").html(''); addList(); } // 참여작 검색 (종료된 공모전) function setKeyword2() { if($("#sub-str").val().length == 1) { alert('검색어는 2글자 이상 입력하세요'); return; } if(!$("#sub-str").val()) { work.work_cate = ""; work.work_word = ""; } else { work.work_cate = $("#column-type").val(); work.work_word = $("#sub-str").val(); } work_list(1); } function setOrder(seq) { if(board_type == "005") paging.sort = seq; else work_sort = seq; $(".board_order span").css("font-weight","normal"); $("#board-order-opt" + seq).css("font-weight","bold"); board_page = 0; isComplete = false; $("#gallery_list").html(''); addList(); } $(document).ready(function(){ $(window).scroll(function (){ $('.vote_scroll').bind("click",function(e){ e.preventDefault(); scrollTop = $(document).scrollTop() - $('#gallery_list').offset().top; // console.log(scrollTop); location.href = $(this).attr('href') + "&scroll=" + scrollTop; }); }); }); var rowCount = 0; var load_image = new Array(); function addList() { load_image[rowCount] = new Array(); var image_load =0; var param = {}; param.cnst_id = 13672; param.sort = work_sort; param.work_cate = work_cate; param.work_word = work_word; param.start_no = board_page * per_page; param.qty = per_page; if(board_type == 002){ param.qty = 9999; } param.stat = '4'; param.vote = 0; if(param.stat == 2) param.vote = 1; switch(board_type) { case "010": //서포터즈 case "000": //비공개 if(!isComplete && !isLoading) { isLoading = true; $.post("contest_ajax_request.php", {data:param, flag:"cboard"}, function(json) { json = $.parseJSON(json); var count = 0, list = ""; $.each(json, function(k, v) { list += "
  • "; list += "\"secret\""; if(v.grade != "" && v.grade != "015001") { list += "" } else { list += "" } list += mb_strimwidth(v.title, 0, 37, '..')+""; list += ""; list += "" + view_date(v.reg_date,'-') + " | vote " + v.vote_cnt + ""; list += "by "+v.reg_name+"
  • "; count++; }); $("#gallery_list").append(list); $('#footerzone').hide(); $('#footerzone').show(); if(count < per_page - 1) isComplete = true; board_page++; isLoading = false; //console.log(board_page, count); }); } break; case "001": //텍스트 case "004": //자유형식 if(!isComplete && !isLoading) { work_cate = $('#work-cate').val(); work_word = $('#work-word').val(); isLoading = true; $.post("contest_ajax_request.php", {data:param, flag:"cboard"}, function(json){ json = $.parseJSON(json); var count = 0, list = ""; $.each(json, function(k, v) { var bgcolor = ["#f8acb0", "#7baeda", "#7cc576", "#736357", "#f1ce55", "#c6895b", "#64bed1", "#fdc689", "#dd7060", "#8393ca", "#7accc8", "#a186be", "#fbaf5d", "#f67c7c", "#5e8096"]; bgcolor = bgcolor[Math.floor(Math.random() * 15)]; if(isSecret && v.reg_uid != userid) { list += "
  • "; if(v.win_yn == "Y") { list += ""; } list += "\"secret\""; if(v.grade != "" && v.grade != "015001") { list += ""; } else { list += ""; } list += mb_strimwidth(v.title, 0, 37, '..'); if(v.cmtcnt != 0 ){ list += "["+ v.cmtcnt +"]"; } list += ""; list += ""; list += "" + view_date(v.reg_date,'-') + " | vote " + v.vote_cnt + ""; list += "by "+v.reg_name+"
  • "; } else { list += "
  • "; if(v.vote_yn){ list += ""; } if(v.win_yn == "Y") { list += ""; } if(work.cnst_id == 2514 && !isLogin || work.cnst_id == 2525 && !isLogin || work.cnst_id == 2526 && !isLogin || work.cnst_id == 2527 && !isLogin){ a_link_start = ""; }else{ a_link_start = ""; } a_link_start_not_class = ""; a_link_end = ""; if(v.img){ load_image[rowCount][image_load] = v.img; list += "
    "; if(getInternetExplorerVersion() > 8 || getInternetExplorer() != "Internet Explorer"){ list += "
    "; } list += "
    "+a_link_start+strip_tags(v.content)+a_link_end+"
    "; //alert(image_load); }else{ list += "
    "+a_link_start+strip_tags(v.content)+a_link_end+"
    "; } list +=""; list += "
  • "; } count++; image_load++; }); $("#gallery_list").append(list); $('#footerzone').hide(); $('#footerzone').show(); if(count < per_page - 1) isComplete = true; board_page++; isLoading = false; //console.log(board_type); //console.log(board_page, count); }).complete(function(){ for(var key in load_image[rowCount]) { $('.row_'+rowCount+'loaded_'+key).css({"background":"url("+load_image[rowCount][key]+")", 'background-repeat' : 'no-repeat', 'background-position':'center center', 'background-size':'cover'}); $('.row_'+rowCount+'loaded_'+key).css('filter',"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+load_image[rowCount][key]+"', sizingMethod='scale')"); // console.log(rowCount+"."+key); } rowCount++; }); } break; case "002": //사진업로드 if(!isComplete && !isLoading) { isLoading = true; $.post("contest_ajax_request.php", {data:param, flag:"cboard"}, function(json) { json = $.parseJSON(json); var count = 0, list = ""; $.each(json, function(k, v) { if(isSecret && v.reg_uid != userid) { //비공개 list += "
  • "; if(v.vote){ list += ""; } list += "\"secret\""; /* if(v.grade != "" && v.grade != "015001") { list += "" } else { list += "" } if(!v.title){ v.title = " "; } list += mb_strimwidth(v.title, 0, 37, '..'); if(v.cmtcnt != 0 ){ list += "["+ v.cmtcnt +"]"; } list += ""; list += ""; */ list += "" + view_date(v.reg_date,'-') + " | vote " + v.vote_cnt + ""; list += "by "+v.reg_name+"
  • "; } else { list += "
  • "; if(v.vote_yn){ list += ""; } if(v.win_yn == "Y") { list += ""; } list += ""; if( work_cate3 == "014024" ){ list += "\"스크린샷\""; }else{ list += "\"스크린샷\""; } if(v.grade != "015001" ) { //list += "" list += "" list += ""; } else { list += "" } if(!v.title){ v.title = " "; } list += mb_strimwidth(v.title, 0, 37, '..'); if(v.cmtcnt != 0 ){ list += "["+ v.cmtcnt +"]"; } list += ""; list += ""; list += "" + view_date(v.reg_date,'-') + " | vote " + v.vote_cnt + ""; list += "by "+v.reg_name+""; list += "
  • "; } count++; }); $("#gallery_list").append(list); $('#footerzone').hide(); $('#footerzone').show(); if(count < per_page - 1) isComplete = true; $('img').on("load", function() { $grid = $('#gallery_list').masonry({ itemSelector: '.grid-item', columnWidth: 0, percentPosition: false }); $grid.masonry('layout'); }); board_page++; isLoading = true; //console.log(board_page, count); }); } break; case "003": //동영상 링크 if(!isComplete && !isLoading) { isLoading = true; $.post("contest_ajax_request.php", {data:param, flag:"cboard"}, function(json) { json = $.parseJSON(json); var count = 0, list = ""; $.each(json, function(k, v) { if(isSecret && v.reg_uid != userid) { list = "
  • "; list += "\"secret\""; if(v.grade != "" && v.grade != "015001") { list += "" } else { list += "" } list += mb_strimwidth(v.title, 0, 37, '..'); if(v.cmtcnt != 0 ){ list += "["+ v.cmtcnt +"]"; } list += ""; list += ""; list += "" + view_date(v.reg_date,'-') + " | vote " + v.vote_cnt + ""; list += "by "+v.reg_name+"
  • "; $("#gallery_list").append(list); } else { list = "
  • "; if(v.vote_yn){ list += ""; } if(v.win_yn == "Y") { list += ""; } list += ""; list += "
    "; if(v.grade != "" && v.grade != "015001") { list += "" } else { list += "" } list += mb_strimwidth(v.title, 0, 37, '..'); if(v.cmtcnt != 0 ){ list += "["+ v.cmtcnt +"]"; } list += ""; list += "
    "; list += "" + view_date(v.reg_date,'-') + " | vote " + v.vote_cnt + ""; list += "by "+v.reg_name+"
  • "; $("#gallery_list").append(list); var video; //소스코드로 등록 if(v.movie_type == "1") { //소크코드로 등록했지만 유튜브임 ㅡㅡ^ if(v.movie_link.indexOf("youtube") > -1){ video = ""; console.log(video); //유튜브 제외 소스코드 }else{ if($(v.movie_link).length > 1) { $.each($(v.movie_link), function(i, ele) { if(typeof ele.tagName == "string" && ele.tagName.toLowerCase() == "iframe") { video = ele; return false; // ==break; } }); } else { //video 미리보기 video = $(v.movie_link).get(0); //video = ""; //alert(video); } //video 미리보기 if(video){ video.setAttribute("width", "294"); video.setAttribute("height", "150"); } } } else if(v.movie_type == "2") { // video = "