PageSourceSearch

https://www.shangyou.gov.cn/syxxxgk/xhtml/js/page.js

js shangyou.gov.cn collected 2026-10-02 17:03:16 UTC 6,709 bytes, 65 lines download raw bytes

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.