var display_strqry; var display_strqryR; var display_encYN; var display_strqry_tmp; var display_outmax; var display_code; var display_pg; var display_pt_code; var display_fileld; var display_tr; var display_rare; var display_total_count = ''; var display_again_check = 'N'; var display_hdYN;//2015-08 var display_noncpYN;//2015-08 var display_sortF;//2015-08 var display_sEg; var display_pmcc = $("#pmcc").val(); var embargoCate; // strqry=°Ë»ö¾î outmax=¸®½ºÆ®¼ö code=Ä«Å×°í¸® pg=ÇöÀçÆäÀÌÁö,s_field=°Ë»ö ÇÊÆ®¸í, view_tr=view_id, rF=·¹¾î, strqry=°á°ú³»°Ë»ö¾î , embargoCate = ±ÝÄ¢¾îÄ«Å×°í¸® // encYN ¸ð¹ÙÀÏ, hdYN °íÈ­ÁúHD, noncpYN ºñÁ¦ÈÞ, sortF Á¤·Ä, retry Àç°Ë»ö function file0uList(strqry, outmax, code, pg, s_field,view_tr, rF, strqryR, pt_code, embargoCate, encYN, hdYN, noncpYN, sortF, sEg) { //jQuery("#printTableView").html("·ÎµùÁßÀÔ´Ï´Ù.."); var param; display_strqry = strqry; display_strqryR = strqryR; display_encYN = encYN; display_hdYN = hdYN; //2015-08 display_noncpYN = noncpYN; //2015-08 display_sortF = sortF //2015-08 display_outmax = outmax; display_code = code; display_pt_code = pt_code; display_pg = pg; display_fileld = s_field; display_tr = view_tr; display_rare = rF; display_sEg = sEg; display_embargoCate = embargoCate; if(display_fileld=='') display_fileld = 'S_TITLE'; //if(display_strqry=='') display_strqry = '*'; var params = {}; params.s_field = display_fileld; params.searchWord = display_strqry; params.searchWordR = display_strqryR; params.encYN = display_encYN; params.potable = display_pt_code; params.cateGory = display_code; params.outmax = display_outmax; params.pg = pg; params.total_count = display_total_count; params.sEg = display_sEg; // ±ÝÄ¢¾î½Ã Á¦ÈÞÄÁÅÙÃ÷ Ãâ·Â params.pg6 = _userTag3; params.pg7 = _userTag3; //¼ºÀαÝÄ¢¾î½Ã Á¦ÈÞ¸¸ Ãâ·Â if(_userTag3 == '511' ){ //params.pg6 = 2; params.pg6 = 5; //12.10.02 ºñÁ¦ÈÞ Ãâ·Â } // ·¹¾îÄÁÅÙÃ÷ Ãâ·Â params.rF = display_rare; // ·£´ý ½ºÆ®¸µ Ãß°¡ params.rand = randomString(); //±ÝÄ¢¾î Ä«Å×°í¸® params.display_embargoCate = display_embargoCate; //2015-08 params.hdYN = display_hdYN; params.noncpYN = display_noncpYN; params.sortF = display_sortF; params.retry = display_again_check; params.from = _from; //jQuery("#printTableViewLoding").show(); if(_srchrenew_flag == 'Y') { //alert('step1: '+display_strqry); //alert(_userTag3); } params.pmcc = display_pmcc; jQuery.post("/content/ajax_db_exod.php",params,function(data){// displayList(data); }); } function randomString() { var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; var string_length = 12; var randomstring = ''; for (var i = 0; i < string_length; i++) { var rnum = Math.floor(Math.random() * chars.length); randomstring += chars.substring(rnum,rnum+1); } return randomstring; } function displayList(data) { jQuery("#printTableView").html(data); //jQuery("#printTableViewLoding").hide(); var total_count = parseInt(jQuery("#page_totalcount").val()); display_total_count = total_count; var page_html = ""; var maxcnt = parseInt(parseInt(display_outmax)); var pagenum = parseInt(display_pg); var page_html = ""; var maxpage = Math.floor((total_count+(maxcnt-1)) / maxcnt); var maxpagescale = 10; if(_srchrenew_flag == 'Y') //2015-09 ¸®´º¾ó { var cate_totcnt = parseInt(jQuery("#cate_totcount").val()); // alert('totcnt: '+cate_totcnt); // alert('step1 ' + display_again_check); if(display_again_check == 'N' && display_strqry != '' && _from != 'mania') { //alert('first search'); if(_userTag3 =='11') { // ¼ºÀÎÄÁÅÙÃ÷ ±ÝÄ¢¾î °Ë»öÀÏ °æ¿ì(Àüü,¼ºÀÎ °Ë»ö) if(pagenum == 1 || pagenum == '') { // alert('¼ºÀαÝÄ¢¾î, Àüü°Ë»ö'); document.all.div_userTag3_msg6.innerHTML = ""; view_srch_noresult(); open_div_userTag3(); setTimeout(close_div_userTag3,3000); } else { close_div_userTag3(); } } else if(_userTag3 =='511') { // ¼ºÀÎÄÁÅÙÃ÷ ±ÝÄ¢¾î °Ë»öÀÏ °æ¿ì(Àüü,¼ºÀÎ °Ë»ö) if(pagenum == 1 || pagenum == '') { // alert('¼ºÀαÝÄ¢¾î, Àüü°Ë»ö'); document.all.div_userTag3_msg6.innerHTML = ""; //view_srch_noresult(); //ÁÖ¼®.18.06.20 open_div_userTag3(); setTimeout(close_div_userTag3,3000); } else { close_div_userTag3(); } } else if(_userTag3 =='2') { // Á¦ÈÞÄÁÅÙÃ÷ ±ÝÄ¢¾î °Ë»öÀÏ °æ¿ì ÀÚ·á ÀÖÀ»¶§ if(pagenum == 1 || pagenum == '') { // alert('Á¦ÈÞ±ÝÄ¢¾î, ÀÚ·áÀÖÀ½'); document.all.div_userTag3_msg6.innerHTML = ""; close_srch_bar(); open_srch_option(); open_div_userTag3(); setTimeout(close_div_userTag3,3000); } else { close_div_userTag3(); } } else if(_userTag3 =='5') { // Á¦ÈÞÄÁÅÙÃ÷ ±ÝÄ¢¾î °Ë»öÀÏ °æ¿ì Àüü°á°ú »Ñ¸² exod->pg6 if(pagenum == 1 || pagenum == '') { //alert('Á¦ÈÞ±ÝÄ¢¾î, Àüü°á°ú'); document.all.div_userTag3_msg6.innerHTML = ""; if(cate_totcnt==0) view_srch_noresult(); open_div_userTag3(); setTimeout(close_div_userTag3,3000); } else { close_div_userTag3(); } } else if(_userTag3 =='3') { // Á¦ÈÞÄÁÅÙÃ÷ ±ÝÄ¢¾î °Ë»öÀÏ °æ¿ì ÀÚ·á ¾øÀ»¶§ if(pagenum == 1 || pagenum == '') { // alert('Á¦ÈÞ±ÝÄ¢¾î, ÀÚ·á¾øÀ½'); document.all.div_userTag3_msg6.innerHTML = ""; view_srch_noresult(); open_div_userTag3(); setTimeout(close_div_userTag3,3000); } else { close_div_userTag3(); } } else if(_userTag3 =='4') { // ÀϹÝÄÁÅÙÃ÷ ±ÝÄ¢¾î °Ë»öÀÏ °æ¿ì ÀÚ·á ¾øÀ»¶§ if(pagenum == 1 || pagenum == '') { // alert('ÀϹݱÝÄ¢¾î, ÀÚ·á¾øÀ½'); document.all.div_userTag3_msg6.innerHTML = ""; view_srch_noresult(); open_div_userTag3(); setTimeout(close_div_userTag3,3000); } else { close_div_userTag3(); } } else if(_userTag3 =='44') { /* // ÀϹÝÄÁÅÙÃ÷ ±ÝÄ¢¾î Á¦¿Ü °Ë»öÀÏ °æ¿ì ÀÚ·á ÀÖÀ»¶§ - ŸīÅ×°í¸® if(pagenum == 1 || pagenum == '') { // alert('ÀϹݱÝÄ¢¾î Á¦¿Ü, ÀÚ·áÀÖÀ½'); document.all.div_userTag3_msg6.innerHTML = ""; open_srch_option(); open_div_userTag3(); setTimeout(close_div_userTag3,3000); } else { close_div_userTag3(); } */ } /* else { open_srch_option(); } */ // Àç°Ë»ö if(_userTag3 =='2' && total_count == 0) { //alert('result1'); close_srch_bar(); //Á¦ÈÞÄÁÅÙÃ÷ ±ÝÄ¢¾î °Ë»öÀÏ °æ¿ì _userTag3 = '3'; display_again_check = 'Y'; close_srchopt_all(); file0uList('', display_outmax, display_code, display_pg, display_fileld,display_tr,rF,display_strqryR, display_pt_code , display_embargoCate, display_encYN, display_hdYN, display_noncpYN, display_sortF, display_sEg); return; } else if(_userTag3 =='10') { //alert('result2'); //ÀϹÝÄÁÅÙÃ÷ °Ë»öÀÏ °æ¿ì _userTag3 = '11'; display_strqry_tmp = display_strqry; display_again_check = 'Y'; close_srchopt_all(); file0uList('', display_outmax, display_code, display_pg, display_fileld,display_tr,rF,display_strqryR, display_pt_code, display_embargoCate, display_encYN, display_hdYN, display_noncpYN, display_sortF, display_sEg); return; } else if(total_count == 0) { //alert('result °á°ú¾øÀ½'); if(cate_totcnt == 0) { jQuery("#div_srch_noresult").show(); close_srch_bar(); } //ÀϹÝÄÁÅÙÃ÷ °Ë»öÀÏ °æ¿ì // if(_userTag3!='511') //12.10.02 ¼ºÀÎÀ϶§ Á¦¿Ü // _userTag3 = '4'; if(display_strqryR) display_strqry_tmp = display_strqry + ", " + display_strqryR; else display_strqry_tmp = display_strqry; display_again_check = 'Y'; close_srchopt_all(); file0uList('', display_outmax, display_code, display_pg, display_fileld,display_tr,rF,display_strqryR, display_pt_code, display_embargoCate, display_encYN, display_hdYN, display_noncpYN, display_sortF, display_sEg); return; } } display_again_check = 'N'; // ÆäÀÌ¡ page_html += ""; page_html += ""; for(i = 0, page = 0; i < maxpagescale; i++) { page = Math.floor((pagenum-1) / maxpagescale) * maxpagescale + i + 1; if(page <= maxpage) { if(i != 0) { //page_html += " "; page_html_1 = " "; } else { page_html_1 = ""; } if(page != pagenum) { if(i==0) { //page_html += " "; page_html_2 = " "; } else { //page_html += "   "; page_html_2 = ""; } //page_html += "  "; page_html += ""; } else { if(i==0) { //page_html += " "; page_html_2 = " "; } else { //page_html += "   "; page_html_2 = ""; } //page_html += " "+page+" "; page_html += ""; } } } page_html +="
 "; if(pagenum == 1) { page_html += ""; } else { if(pagenum <= 10) page_html += ""; else { pre_10 = Math.floor((pagenum-1) / maxpagescale) * maxpagescale + 1 - 10; page_html += ""; } } page_html +=""+page_html_2+"" + page_html_1 + "  "+page+"   "+page_html_2+""+page_html_1 + "  "+page+"  "; if(pagenum == maxpage) { page_html += "  "; } else { next_10 = Math.floor((pagenum-1) / maxpagescale) * maxpagescale + 1 + 10; if(next_10 > maxpage) page_html += ""; else page_html += "  "; } page_html +='
'; //alert(page_html ); //alert(_userTag3); // ÀÏ¹Ý ¸®½ºÆ® ÀÏ°æ¿ì ÆäÀÌ¡ó¸® jQuery("#printPageView").html(page_html); } }