1// JavaScript Document 2var ucap_page_interval; 3// id å页å ç´ idï¼totalPage æ»é¡µæ°ï¼currIndex å½å页ç ï¼pagePrefix æä»¶åç¼ï¼pageSuffix æä»¶åç¼ï¼totalCount æ»è®°å½æ° 4function createPageHTML(id, totalPage, currIndex, pagePrefix, pageSuffix, totalCount) { 5 if (totalCount == 0) { 6 return; 7 } 8 var homePageText = '', prevPageText = '', pageIndexText = '', nextPageText = '', endPageText = '', totalPageText = '', totalCountText = '', pageJumpText = '', param; 9 homePageText = '<li class="home_page arrow"><a href="' + pagePrefix + '.' + pageSuffix + '">é¦é¡µ</a></li>'; 10 param = totalPage == 1 ? '' : '_' + totalPage; 11 endPageText = '<li class="end_page arrow"><a href="' + pagePrefix + param + '.' + pageSuffix + '">æ«é¡µ</a></li>'; 12 var firstPage = 1, lastPage = totalPage; 13 if (totalPage > 5) { 14 if (currIndex <= 2) { 15 lastPage = 5; 16 } else if ((totalPage - currIndex) <= 2) { 17 firstPage = totalPage - 4; 18 } else { 19 firstPage = currIndex - 2; 20 lastPage = currIndex + 2; 21 } 22 } 23 for (var i = firstPage; i <= lastPage; i++) { 24 param = i == 1 ? '' : '_' + i; 25 var currrent = i == currIndex ? ' class="current"' : ''; 26 pageIndexText += '<li class="page_index arrow"><a href="' + pagePrefix + param + '.' + pageSuffix + '"' + currrent + '">' + i + '</a></li>'; 27 } 28 param = (currIndex - 1) == 1 ? '' : '_' + (currIndex - 1); 29 prevPageText = '<li class="prev_page arrow"><a href="' + pagePrefix + param + '.' + pageSuffix + '">ä¸ä¸é¡µ</a></li>'; 30 nextPageText = '<li class="prev_page arrow"><a href="' + pagePrefix + '_' + (currIndex + 1) + '.' + pageSuffix + '">ä¸ä¸é¡µ</a></li>'; 31 if (totalPage == 1) { 32 prevPageText = '<li class="prev_page arrow"><span>ä¸ä¸é¡µ</span></li>'; 33 nextPageText = '<li class="prev_page arrow"><span>ä¸ä¸é¡µ</span></li>'; 34 } else if (currIndex == 1) { 35 prevPageText = '<li class="prev_page arrow"><span>ä¸ä¸é¡µ</span></li>'; 36 } else if (currIndex == totalPage) { 37 nextPageText = '<li class="prev_page arrow"><span>ä¸ä¸é¡µ</span></li>'; 38 } 39 totalCountText = '<li class="total_count"><span>å ±' + totalCount + 'æ¡è®°å½</span></li>'; 40 var pageJumpFun = "pageJump('" + pagePrefix + "','" + pageSuffix + "'," + totalPage + ")"; 41 pageJumpText = '<li class="page_jump"><input id="page_input" type="text" onkeypress="if (event.keyCode == 13){' + pageJumpFun + '}"><a href="javascript:;" onclick="' + pageJumpFun + '">ç¡®å®</a></li>'; 42 //document.getElementById(id).innerHTML = totalPageText + totalCountText + homePageText + prevPageText + pageIndexText + nextPageText + endPageText + pageJumpText; 43 // å建Base64对象 44 var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9+/=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/rn/g,"n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r)}else if(r>127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n<e.length){r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r);n++}else if(r>191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}}; 45 var pagestr = totalPageText + totalCountText + homePageText + prevPageText + pageIndexText + nextPageText + endPageText + pageJumpText; 46 pagestr = Base64.encode(pagestr); // base64å å¯
47 ucap_printPageStr(id, pagestr); 48} 49 50function ucap_printPageStr(id, pagestr){ 51 var ele = document.getElementById(id); 52 if(ele == null){ 53 setTimeout("ucap_printPageStr('"+id+"','"+pagestr+"')",100); 54 }else{ 55 var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9+/=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/rn/g,"n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r)}else if(r>127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n<e.length){r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r);n++}else if(r>191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}}; 56 ele.innerHTML = Base64.decode(pagestr); 57 } 58} 59function pageJump(pagePrefix, pageSuffix, totalPage) { 60 var pageIndex = document.getElementById('page_input').value.replace(" ", ''); 61 if (parseInt(pageIndex) > 0 && parseInt(pageIndex) <= totalPage) { 62 var param = pageIndex == 1 ? '' : '_' + pageIndex; 63 window.location.href = pagePrefix + param + '.' + pageSuffix; 64 } 65}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.