/** * JS初始化库 * @作者 qinggan * @网站 http://www.phpok.com * @版本 4.x * @授权 MIT License * @日期 2017年12月01日 **/ /** * 常规基础变量,也是系统用到的变量 */ var basefile = "index.php"; var ctrl_id = "c"; var func_id = "f"; var webroot = "/"; var apifile = "api.php"; var wwwfile = "index.php"; var phpok_site_id = "1"; var site_id = "1"; var lang_code = "cn"; var user_id = 0; var client_token = 'bWQ1OjExNjRjZmJkYTA1ZTI3NDFjODFkMTUxMjhjNjNmYmY1MTcxNDEwNDk0MA=='; //是否启用电调 var biz_status = '0'; /** * 常规基础变量结束 */ /** * 加载语言包 */ var lang = new Array(); /** * 结束语言包 */ /** * 开始加载Jquery,注意,系统会尝式智能检测加载的jquery版本 */ ;/*! jQuery v3.6.4 | (c) OpenJS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.4",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.cssHas=ce(function(){try{return C.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),d.cssHas||y.push(":has"),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 * @主页 http://www.phpok.com * @版本 4.x * @授权 MIT License * @时间 2017年03月22日 **/ function phpok_form_password(id,len) { var list = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"); if(!len || len == "undefined") len = 8; var rand = ""; for(var i = 0;i', "lock":true }); } } } //清空 function phpok_btn_clear(btn,id) { $("#"+id).val(""); } function _phpok_form_opt(val,id,eid,etype) { if(!val || val == "undefined"){ $("#"+id).html("").hide(); return false; } var url = get_url("form","config") + "&id="+$.str.encode(val); if(eid && eid != "undefined"){ url += "&eid="+eid; } if(etype && etype != "undefined"){ url += "&etype="+etype; } $.phpok.ajax(url,function(rs){ if(rs && rs != 'exit'){ $("#"+id).html(rs).show(); layui.form.render(); } }); } function phpok_btn_editor_picture(id) { var url = get_url("edit","picture") + "&input="+id; $.dialog.open(url,{ "title" : "图片库", "width" : "760px", "height" : "80%", "resize" : false, "lock" : true }); } function phpok_btn_editor_file(id) { var url = get_url("edit","file") + "&input="+id+"&nopic=1"; $.dialog.open(url,{ "title" : "附件资源", "width" : "760px", "height" : "80%", "resize" : false, "lock" : true }); } function phpok_btn_editor_video(id) { var url = get_url("edit","video") + "&input="+id+"&nopic=1"; $.dialog.open(url,{ "title" : "添加影音", "width" : "760px", "height" : "80%", "resize" : false, "lock" : true }); } function phpok_btn_filename(input,type) { var url = get_url("fields","filemanage") + "&input="+input; if(type && type != 'undefined'){ url += "&type="+type; } var old = $("#"+input).val(); if(old){ var tmp = old.split('/'); tmp = tmp.slice(0,-1); var folder = tmp.join('/'); url += "&folder="+$.str.encode(folder+'/'); } $.dialog.open(url,{ "title" : "选择文件", "width" : "760px", "height" : "80%", "resize" : false, "lock" : true }); } //删除单个主题关联 function phpok_title_delete_single(id) { $("#"+id).val(""); $("#title_"+id).hide(); $("#layui-btn-"+id+"-delete").hide(); } //删除多个主题关联 function phpok_title_delete(id,val) { if(val && val != "undefined") { //移除DIV值 $("#"+id+"_div_"+val).remove(); //移除值 var c = $("#"+id).val(); if(c == "" || c == "undefined") { $("#"+id+"_div").hide(); $("#"+id+"_button_checkbox").hide(); $("#"+id).val(""); return true; } var clist = c.split(","); var n_list = new Array(); var m = 0; for(var i=0;i"+val+""); obj.find("option[value="+data.info+"]").attr("selected",true); }else{ $.dialog.alert(data.info); return false; } }); },''); }, //图片预览 upload_preview:function(id) { $.dialog.open(get_url('upload','preview','id='+id),{ 'title':p_lang('预览附件信息'), 'width':'700px', 'height':'400px', 'lock':true, 'button': [{ 'name': p_lang('下载原文件'), 'callback': function () { $.phpok.open(get_url('res','download','id='+id)); return false; } }], 'okVal':p_lang('关闭'), 'ok':true }); }, upload_update:function(id) { $.dialog.open(get_url('upload','editopen','id='+id),{ 'title':p_lang('编辑附件信息'), 'width':'700px', 'height':'400px', 'lock':true, 'okVal':p_lang('提交'), 'ok':function(){ var iframe = this.iframe.contentWindow; if (!iframe.document.body) { alert(p_lang('iframe还没加载完毕呢')); return false; }; iframe.save(); return false; }, 'cancelVal':p_lang('取消修改'), 'cancel':function(){} }); }, upload_delete:function(identifier,id) { var fid = identifier; if(fid.substr(0,1) != '#' && fid.substr(0,1) != '.'){ fid = '#'+fid; } var content = $(fid).val(); if(!content || content == "undefined"){ $(fid+"_sort").hide(); return true; } //删除单个附件 if(content == id){ $(fid).val(""); $(fid+"_list").fadeOut().html(''); $(fid+"_sort").hide(); this.upload_remote_delete(identifier,id); return true; } var list = content.split(","); var newlist = new Array(); var new_i = 0; for(var i=0;i'; if(multiple){ html += '
'; } html += '
'; html += '
'; html += ' '; html += ' '; html += '
'; html += '
'; html += ''; return html; }, upload_remote_delete:function(identifier,id) { var tmp = $.phpok.data('upload-'+identifier) if(!tmp || tmp == 'undefined'){ return true; } var delete_status = false; if(tmp != id){ var list = tmp.split(','); var newlist = new Array(); var new_i = 0; for(var i=0;i parseInt(b['id']) ? 1 : -1 }); var list = new Array(); for(var i in t){ list[i] = t[i]['data']; } var val = list.join(","); $("#"+identifier).val(val); this.upload_showhtml(identifier,true); }, param_type_setting:function(val,id){ var old = $("#"+id).val(); if(old){ val = old+","+val; } $("#"+id).val(val); }, param_type_set:function(v){ if(v == 1){ $("#p_val_type_html").show(); }else{ $("#p_val_type_html").hide(); } }, /** * 文本框旁边的日期按钮控件 **/ laydate_button:function(id,type) { layui.use('laydate',function(){ var laydate = layui.laydate; laydate.render({ elem:'#'+id, type:type, show: true, trigger: 'click', closeStop: '#btn_'+id+'_'+type }); }); }, /** * 格式化日期 **/ laydate_format:function(id,type) { var info = $("#"+id).val(); if(!info){ return false; } info = info.replace("年",'-'); info = info.replace("月",'-'); info = info.replace("日",''); info = info.replace("时",'-'); info = info.replace("分",'-'); info = info.replace("秒",''); if(type == 'date'){ var tmp = info.replace('/','-'); if(tmp != info){ var list = info.split('/'); if((list[0]).length != 4){ info = list[2]+'-'+list[0]+'-'+list[1]; } } } if(type == 'datetime'){ info = info.replace('/','-'); } $("#"+id).val(info); return true; }, /** * 清空文本框内容 **/ clear:function(id){ if(id.substr(0,1) != '.' && id.substr(0,1) != '#'){ id = '#'+id; } return $(id).val(''); }, radio_extadd:function(id) { var t = $("input[name="+id+"]:checked").val(); if(t == '_'){ $('#'+id+"_extadd").removeAttr("disabled"); }else{ $('#'+id+"_extadd").attr("disabled",true); } }, /** * 文件选择器 **/ text_button_file_select:function(id) { $.dialog.open(get_url("open","input","id="+id),{ title: p_lang('附件管理器'), lock : true, width: "90%", height: "80%", resize: false }); }, /** * 文件下载 **/ text_button_file_download:function(id) { if(id.substr(0,1) != '.' && id.substr(0,1) != '#'){ id = '#'+id; } var file = $(id).val(); if(!file){ $.dialog.alert(p_lang('没有可下载的附件')); return false; } var url = get_url("res_action","download",'file='+$.str.encode(file)); window.open(url); }, /** * 图片选择器 **/ text_button_image_select:function(id) { $.dialog.open(get_url("open","input","id="+id+"&type=image"),{ title: p_lang('图片管理器'), lock : true, width: "90%", height: "80%", resize: false }); }, /** * 图片预览 **/ text_button_image_preview:function(id) { if(id.substr(0,1) != '.' && id.substr(0,1) != '#'){ id = '#'+id; } var file = $(id).val(); if(!file){ $.dialog.alert(p_lang('没有指定图片')); return false; } var url = get_url("res_action","view",'file='+$.str.encode(file)); $.dialog.open(url,{ title: p_lang('预览图片'), lock: true, width: '90%', height: '80%', resize: false, ok: true }); }, /** * 主题选择器 **/ text_button_title:function(id) { var url = get_url('open','title','id='+id); $.dialog.open(url,{ title: p_lang('选择器'), lock : true, width: "90%", height: "80%", resize: false }); }, /** * 视频选择器 **/ text_button_video_select:function(id) { var url = get_url("open","input","id="+id+"&type=video"); $.dialog.open(url,{ title: p_lang('视频管理器'), lock : true, width: "90%", height: "80%" }); }, /** * 视频预览 **/ text_button_video_preview:function(id) { if(id.substr(0,1) != '.' && id.substr(0,1) != '#'){ id = '#'+id; } var file = $(id).val(); if(!file){ $.dialog.alert(p_lang('没有指定视频')); return false; } var url = get_url("res_action","video","file="+$.str.encode(file)); $.dialog.open(url,{ title: p_lang('视频预览'), lock: true, width: '90%', height: '80%', ok:true }); }, /** * 网址选择器 **/ text_button_url_select:function(id) { var url = get_url("open","url","id="+id); $.dialog.open(url,{ title: p_lang('网址管理器'), lock : true, width: "90%", height: "80%" }); }, /** * 网址预览 **/ text_button_url_open:function(id) { if(id.substr(0,1) != '.' && id.substr(0,1) != '#'){ id = '#'+id; } var url = $(id).val(); if(!url || url == "http://" || url == "https://"){ $.dialog.alert(p_lang('未指定网址')); return false; } window.open(url); }, /** * 用户选择库 **/ text_button_user_select:function(id) { var url = get_url("open","user2","id="+id); $.dialog.open(url,{ title: p_lang('用户列表'), lock : true, width: "90%", height: "80%", resize: false }); }, /** * 快速插入文本 **/ text_button_quickwords:function(id,val,type) { if(id.substr(0,1) != '.' && id.substr(0,1) != '#'){ id = '#'+id; } if(type && type == 'none'){ $(id).val(val); return true; } var tmp = $(id).val(); tmp = (tmp && tmp != 'undefined') ? (tmp+''+type+''+val) : val; $(id).val(tmp); return true; }, title_select:function(project_id,is_multi,title,input) { var url = get_url("inp","title","project_id="+$.str.encode(project_id)); if(is_multi && is_multi != 'undefined'){ url += "&multi=1"; url += "&identifier="+$.str.encode(input); $.dialog.open(url,{ "title" : title, "width" : "760px", "height" : "80%", "resize" : false, "lock" : true, "ok": function(){ $.phpokform.title_show_multi(input); return true; } }); }else{ url += "&identifier="+$.str.encode(input); $.dialog.open(url,{ "title" : title, "width" : "760px", "height" : "80%", "resize" : false, "lock" : true }); } }, title_show_multi:function(identifier) { var tmp_id = $("#"+identifier).val(); if(!tmp_id || tmp_id == '0' || tmp_id == 'undefined'){ return true; } var url = get_url("inp","","type=title&content="+$.str.encode(tmp_id)); var tid = $("#id").val(); if(tid && tid != '0'){ url += "&extprice="+tid+"&field="+identifier; } $.phpok.json(url,function(rs){ if(rs.status){ var lst = rs.info; template.defaults.imports.dateFormat = $.phpok.date; var html = template("art-tpl", {'rslist':rs.info}); $("#"+identifier+"_div").html(html).show(); $("#"+identifier+"_button_checkbox").show(); } }); }, title_show_single:function(identifier) { var tmp_id = $("#"+identifier).val(); if(!tmp_id || tmp_id == '0' || tmp_id == 'undefined'){ $("#layui-btn-"+identifier+"-delete").hide(); $("#title_"+identifier).html('').hide(); return true; } var url = get_url("inp","",'type=title&content='+$.str.encode(tmp_id)); var tid = $("#id").val(); if(tid && tid != '0'){ url += "&extprice="+tid+"&field="+identifier; } $.phpok.json(url,function(rs){ if(rs.status){ var lst = rs.info; for(var i in lst){ $("#title_"+identifier).html(lst[i]['title']).show(); $("#layui-btn-"+identifier+"-delete").show(); } } }); }, title_sortup:function(obj,identifier) { var $tr = $(obj).parents("tr"); if ($tr.index() != 0) { $tr.fadeOut().fadeIn(); $tr.prev().before($tr); } var list = new Array(); $("#"+identifier+"_preview tbody tr").each(function(i){ list[i] = $(this).attr("data-id"); }); var str = list.join(","); $("#"+identifier).val(str); }, title_sortdown:function(obj,identifier) { var len = $("#"+identifier+"_preview tbody tr").length; var $tr = $(obj).parents("tr"); if ($tr.index() != len - 1) { $tr.fadeOut().fadeIn(); $tr.next().after($tr); } var list = new Array(); $("#"+identifier+"_preview tbody tr").each(function(i){ list[i] = $(this).attr("data-id"); }); var str = list.join(","); $("#"+identifier).val(str); }, /** * 快速添加主题 * @参数 fid 字段ID * @参数 input_id 表单字段名 * @参数 maxcount 最大数量,默认为1 **/ extitle_quickadd:function(fid,input_id,maxcount) { if(!maxcount || maxcount == 'undefined'){ maxcount = 1; } var str = $("input[name="+input_id+"]").val(); if(str && str != 'undefined'){ var list = str.split(","); var total = list.length; if(total >= maxcount){ $.dialog.alert(p_lang('超出系统限制添加的数量')); return false; } } var url = get_url('form','quickadd','id='+fid); $.dialog.open(url,{ 'title':p_lang('添加'), 'width':'90%', 'height':'80%', 'ok':function(){ var iframe = this.iframe.contentWindow; if (!iframe.document.body) { alert('iframe还没加载完毕呢'); return false; }; iframe.save(); return false; }, 'lock':true, 'okVal':p_lang('保存'), 'cancel':true }); }, /** * 快速编辑 **/ extitle_quickedit:function(id,fid) { var url = get_url('form','quickadd','id='+fid+"&tid="+id); $.dialog.open(url,{ 'title':p_lang('编辑 #'+id), 'width':'80%', 'height':'70%', 'ok':function(){ var iframe = this.iframe.contentWindow; if (!iframe.document.body) { alert('iframe还没加载完毕呢'); return false; }; iframe.save(); return false; }, 'lock':true, 'okVal':p_lang('保存'), 'cancel':true }); }, extitle_list:function(fid,input_id,maxcount,ext) { if(!maxcount || maxcount == 'undefined'){ maxcount = 1; } var str = $("input[name="+input_id+"]").val(); if(str && str != 'undefined'){ var list = str.split(","); var total = list.length; if(total >= maxcount){ $.dialog.alert(p_lang('超出系统限制添加的数量')); return false; } } var url = get_url('form','quicklist','id='+fid+"&maxcount="+maxcount); if(ext && ext != 'undefined'){ var list = ext.split(','); var is_ok = true; for(var i in list){ var val = $("#"+list[i]).val(); if(val == ''){ is_ok = false; var title = $("#form_html_"+list[i]+" .title").html(); title = title.replace(/.+<\/span>/g,''); title = title.replace(":",''); $.dialog.alert('请先选择:'+title); break; } url += "&ext["+list[i]+"]="+$.str.encode(val); } if(!is_ok){ return false; } } $.dialog.open(url,{ 'title':p_lang('选择'), 'width':'90%', 'height':'80%', 'ok':true, 'lock':true, 'okVal':p_lang('关闭') }); }, /** * 重载扩展字段 * @参数 id 模块字段ID * @参数 identifier 标识 **/ extitle_reload:function(id,identifier) { var url = get_url('form','redata','id='+id); var content = $("#"+identifier).val(); if(content){ url += "&content="+$.str.encode(content); } $.phpok.json(url,function(data){ if(data.status){ if(data.info){ $("#"+identifier+"_edit_preview").html(data.info); } return true; } return true; }) }, /** * 删除已存在的主题,防止重复筛选 **/ extitle_remove_selected:function(identifier) { var opener = $.dialog.opener; var content = opener.$("#"+identifier).val(); if(content){ var list = content.split(","); for(var i in list){ $("#title_"+list[i]).remove(); } } }, /** * 选中已存在主题 * @参数 id 主题ID * @参数 pid 项目ID * @参数 identifier 要更新的标识内容 **/ extitle_select_action:function(id,pid,identifier,maxcount) { if(!maxcount || maxcount == 'undefined'){ maxcount = 9999; } maxcount = parseInt(maxcount); var opener = $.dialog.opener; var content = opener.$("#"+identifier).val(); if(content){ var tmp = content.split(","); if(tmp.length >= maxcount){ $.dialog.alert(p_lang('超出系统限制添加的数量')); return false; } content = content+","+id; var list = content.split(","); var rs = $.unique(list); content = rs.join(","); opener.$("#"+identifier).val(content); }else{ opener.$("#"+identifier).val(id); } $("#title_"+id).remove(); opener.$.phpokform.extitle_reload(pid,identifier); return true; }, /** * 向前移一位 **/ extitle_sortup:function(obj,id,identifier) { this.title_sortup(obj,identifier); }, /** * 向后移一位 **/ extitle_sortdown:function(obj,id,identifier) { this.title_sortdown(obj,identifier); }, /** * 删除操作 **/ extitle_delete:function(val,id,identifier) { var content = $("#"+identifier).val(); if(!content || !val || val == '0' || content == '0' || val == 'undefined' || content == 'undefined'){ return true; } if(content == val){ $("#"+identifier).val(''); this.extitle_reload(id,identifier); return true; } $("#tr_"+identifier+"_"+val).remove(); var list = new Array(); $("#"+identifier+"_preview tbody tr").each(function(i){ list[i] = $(this).attr("data-id"); }); var str = list.join(","); $("#"+identifier).val(str); } }; })(jQuery); /*! * artDialog 4.1.7 * Date: 2013-03-03 08:04 * http://code.google.com/p/artdialog/ * (c) 2009-2012 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ ;(function(t,e,i){t.noop=t.noop||function(){};var n,o,s,l,a=0,r=t(e),c=t(document),f=t("html"),u=document.documentElement,d=e.VBArray&&!e.XMLHttpRequest,h="createTouch"in document&&!("onmousemove"in u)||/(iPhone|iPad|iPod)/i.test(navigator.userAgent),p="artDialog"+ +new Date;var m=function(e,o,s){e=e||{};if(typeof e==="string"||e.nodeType===1){e={content:e,fixed:!h}}var l,r=m.defaults,c=e.follow=this.nodeType===1&&this||e.follow;for(var f in r){if(e[f]===i)e[f]=r[f]}t.each({ok:"yesFn",cancel:"noFn",close:"closeFn",init:"initFn",okVal:"yesText",cancelVal:"noText"},function(t,n){e[t]=e[t]!==i?e[t]:e[n]});if(typeof c==="string")c=t(c)[0];e.id=c&&c[p+"follow"]||e.id||p+a;l=m.list[e.id];if(c&&l)return l.follow(c).zIndex().focus();if(l)return l.zIndex().focus();if(h)e.fixed=false;if(!t.isArray(e.button)){e.button=e.button?[e.button]:[]}if(o!==i)e.ok=o;if(s!==i)e.cancel=s;e.ok&&e.button.push({name:e.okVal,callback:e.ok,focus:true});e.cancel&&e.button.push({name:e.cancelVal,callback:e.cancel});m.defaults.zIndex=e.zIndex;a++;return m.list[e.id]=n?n._init(e):new m.fn._init(e)};m.fn=m.prototype={version:"4.1.7",closed:true,_init:function(t){var i=this,o,s=t.icon,l=s&&(d?{png:"icons/"+s+".png"}:{backgroundImage:"url('"+t.path+"/images/skins/icons/"+s+".png')"});i.closed=false;i.config=t;i.DOM=o=i.DOM||i._getDOM();o.wrap.addClass(t.skin);o.close[t.cancel===false?"hide":"show"]();o.icon[0].style.display=s?"":"none";o.iconBg.css(l||{background:"none"});o.se.css("cursor",t.resize?"se-resize":"auto");o.title.css("cursor",t.drag?"move":"auto");o.content.css("padding",t.padding);i[t.show?"show":"hide"](true);i.button(t.button).title(t.title).content(t.content,true).size(t.width,t.height).time(t.time);t.follow?i.follow(t.follow):i.position(t.left,t.top);i.zIndex().focus();t.lock&&i.lock();i._addEvent();i._ie6PngFix();n=null;t.init&&t.init.call(i,e);return i},content:function(t){var e,n,o,s,l=this,a=l.DOM,r=a.wrap[0],c=r.offsetWidth,f=r.offsetHeight,u=parseInt(r.style.left),d=parseInt(r.style.top),h=r.style.width,p=a.content,m=p[0];l._elemBack&&l._elemBack();r.style.width="auto";if(t===i)return m;if(typeof t==="string"){p.html(t)}else if(t&&t.nodeType===1){s=t.style.display;e=t.previousSibling;n=t.nextSibling;o=t.parentNode;l._elemBack=function(){if(e&&e.parentNode){e.parentNode.insertBefore(t,e.nextSibling)}else if(n&&n.parentNode){n.parentNode.insertBefore(t,n)}else if(o){o.appendChild(t)}t.style.display=s;l._elemBack=null};p.html("");m.appendChild(t);t.style.display="block"}if(!arguments[1]){if(l.config.follow){l.follow(l.config.follow)}else{c=r.offsetWidth-c;f=r.offsetHeight-f;u=u-c/2;d=d-f/2;r.style.left=Math.max(u,0)+"px";r.style.top=Math.max(d,0)+"px"}if(h&&h!=="auto"){r.style.width=r.offsetWidth+"px"}l._autoPositionType()}l._ie6SelectFix();l._runScript(m);return l},title:function(t){var e=this.DOM,n=e.wrap,o=e.title,s="aui_state_noTitle";if(t===i)return o[0];if(t===false){o.hide().html("");n.addClass(s)}else{o.show().html(t||"");n.removeClass(s)}return this},position:function(t,e){var n=this,o=n.config,s=n.DOM.wrap[0],l=d?false:o.fixed,a=d&&n.config.fixed,f=c.scrollLeft(),u=c.scrollTop(),h=l?0:f,p=l?0:u,m=r.width(),g=r.height(),_=s.offsetWidth,v=s.offsetHeight,y=s.style;if(t||t===0){n._left=t.toString().indexOf("%")!==-1?t:null;t=n._toNumber(t,m-_);if(typeof t==="number"){t=a?t+=f:t+h;y.left=Math.max(t,h)+"px"}else if(typeof t==="string"){y.left=t}}if(e||e===0){n._top=e.toString().indexOf("%")!==-1?e:null;e=n._toNumber(e,g-v);if(typeof e==="number"){e=a?e+=u:e+p;y.top=Math.max(e,p)+"px"}else if(typeof e==="string"){y.top=e}}if(t!==i&&e!==i){n._follow=null;n._autoPositionType()}return n},size:function(t,e){var i,n,o,s,l=this,a=l.config,c=l.DOM,f=c.wrap,u=c.main,d=f[0].style,h=u[0].style;if(t){l._width=t.toString().indexOf("%")!==-1?t:null;i=r.width()-f[0].offsetWidth+u[0].offsetWidth;o=l._toNumber(t,i);t=o;if(typeof t==="number"){d.width="auto";h.width=Math.max(l.config.minWidth,t)+"px";d.width=f[0].offsetWidth+"px"}else if(typeof t==="string"){h.width=t;t==="auto"&&f.css("width","auto")}}if(e){l._height=e.toString().indexOf("%")!==-1?e:null;n=r.height()-f[0].offsetHeight+u[0].offsetHeight;s=l._toNumber(e,n);e=s;if(typeof e==="number"){h.height=Math.max(l.config.minHeight,e)+"px"}else if(typeof e==="string"){h.height=e}}l._ie6SelectFix();return l},follow:function(e){var i,n=this,o=n.config;if(typeof e==="string"||e&&e.nodeType===1){i=t(e);e=i[0]}if(!e||!e.offsetWidth&&!e.offsetHeight){return n.position(n._left,n._top)}var s=p+"follow",l=r.width(),a=r.height(),f=c.scrollLeft(),u=c.scrollTop(),h=i.offset(),m=e.offsetWidth,g=e.offsetHeight,_=d?false:o.fixed,v=_?h.left-f:h.left,y=_?h.top-u:h.top,x=n.DOM.wrap[0],b=x.style,w=x.offsetWidth,k=x.offsetHeight,M=v-(w-m)/2,D=y+g,T=_?0:f,O=_?0:u;M=Ml&&v-w>T?v-w+m:M;D=D+k>a+O&&y-k>O?y-k:D;b.left=M+"px";b.top=D+"px";n._follow&&n._follow.removeAttribute(s);n._follow=e;e[s]=o.id;n._autoPositionType();return n},button:function(){var e=this,n=arguments,o=e.DOM,s=o.buttons,l=s[0],a="aui_state_highlight",r=e._listeners=e._listeners||{},c=t.isArray(n[0])?n[0]:[].slice.call(n);if(n[0]===i)return l;t.each(c,function(i,n){var o=n.name,s=!r[o],c=!s?r[o].elem:document.createElement("button");if(!r[o])r[o]={};if(n.callback)r[o].callback=n.callback;if(n.className)c.className=n.className;if(n.focus){e._focus&&e._focus.removeClass(a);e._focus=t(c).addClass(a);e.focus()}c.setAttribute("type","button");c[p+"callback"]=o;c.disabled=!!n.disabled;if(s){c.innerHTML=o;r[o].elem=c;l.appendChild(c)}});s[0].style.display=c.length?"":"none";e._ie6SelectFix();return e},show:function(){this.DOM.wrap.show();!arguments[0]&&this._lockMaskWrap&&this._lockMaskWrap.show();return this},hide:function(){this.DOM.wrap.hide();!arguments[0]&&this._lockMaskWrap&&this._lockMaskWrap.hide();return this},close:function(){if(this.closed)return this;var t=this,i=t.DOM,o=i.wrap,s=m.list,l=t.config.close,a=t.config.follow;t.time();if(typeof l==="function"&&l.call(t,e)===false){return t}t.unlock();t._elemBack&&t._elemBack();o[0].className=o[0].style.cssText="";i.title.html("");i.content.html("");i.buttons.html("");if(m.focus===t)m.focus=null;if(a)a.removeAttribute(p+"follow");delete s[t.config.id];t._removeEvent();t.hide(true)._setAbsolute();for(var r in t){if(t.hasOwnProperty(r)&&r!=="DOM")delete t[r]}n?o.remove():n=t;return t},time:function(t){var e=this,i=e.config.cancelVal,n=e._timer;n&&clearTimeout(n);if(t){e._timer=setTimeout(function(){e._click(i)},1e3*t)}return e},focus:function(){try{if(this.config.focus){var t=this._focus&&this._focus[0]||this.DOM.close[0];t&&t.focus()}}catch(t){}return this},zIndex:function(){var t=this,e=t.DOM,i=e.wrap,n=m.focus,o=m.defaults.zIndex++;i.css("zIndex",o);t._lockMask&&t._lockMask.css("zIndex",o-1);n&&n.DOM.wrap.removeClass("aui_state_focus");m.focus=t;i.addClass("aui_state_focus");return t},setting:function(t,e){var i=this;if(t&&typeof t==="object"){for(var n in t){i.config[n]=t[n]}}if(t&&typeof t=="string"&&e&&typeof e!="undefined"){i.config[t]=e}return i},param:function(t,e){var i=this;if(t&&typeof t=="string"&&e&&typeof e!="undefined"){i.config[t]=e}return i},lock:function(){if(this._lock)return this;var e=this,i=m.defaults.zIndex-1,n=e.DOM.wrap,o=e.config,s=c.width(),l=c.height(),a=e._lockMaskWrap||t(document.body.appendChild(document.createElement("div"))),r=e._lockMask||t(a[0].appendChild(document.createElement("div"))),f="(document).documentElement",u=h?"width:"+s+"px;height:"+l+"px":"width:100%;height:100%",p=d?"position:absolute;left:expression("+f+".scrollLeft);top:expression("+f+".scrollTop);width:expression("+f+".clientWidth);height:expression("+f+".clientHeight)":"";e.zIndex();n.addClass("aui_state_lock");a[0].style.cssText=u+";position:fixed;z-index:"+i+";top:0;left:0;overflow:hidden;"+p;r[0].style.cssText="height:100%;background:"+o.background+";filter:alpha(opacity=0);opacity:0";if(d)r.html('');r.stop();r.bind("click",function(){e._reset()}).bind("dblclick",function(){e._click(e.config.cancelVal)});if(o.duration===0){r.css({opacity:o.opacity})}else{r.animate({opacity:o.opacity},o.duration)}e._lockMaskWrap=a;e._lockMask=r;e._lock=true;return e},unlock:function(){var t=this,e=t._lockMaskWrap,i=t._lockMask;if(!t._lock)return t;var o=e[0].style;var s=function(){if(d){o.removeExpression("width");o.removeExpression("height");o.removeExpression("left");o.removeExpression("top")}o.cssText="display:none";n&&e.remove()};i.stop().unbind();t.DOM.wrap.removeClass("aui_state_lock");if(!t.config.duration){s()}else{i.animate({opacity:0},t.config.duration,s)}t._lock=false;return t},_getDOM:function(){var e=document.createElement("div"),i=document.body;e.style.cssText="position:absolute;left:0;top:0";e.innerHTML=m._templates;i.insertBefore(e,i.firstChild);var n,o=0,s={wrap:t(e)},l=e.getElementsByTagName("*"),a=l.length;for(;o'+''+""+""+''+''+''+""+""+''+'"+''+""+""+''+''+''+""+""+"
'+'
'+''+""+""+'"+""+""+'"+'"+""+""+'"+""+""+"
'+'
'+'
'+''+"×"+""+"
"+"
'+'
'+"
'+'
'+"
"+"
"+"
"+"";m.defaults={content:'
loading..
',title:"消息",button:null,ok:null,cancel:null,init:null,close:null,okVal:"确定",cancelVal:"取消",width:"auto",height:"auto",minWidth:96,minHeight:32,padding:"20px 25px",skin:"",icon:null,time:null,esc:true,focus:true,show:true,follow:null,path:l,lock:false,background:"#000",opacity:.7,duration:300,fixed:false,left:"50%",top:"38.2%",zIndex:1987,resize:true,drag:true};e.artDialog=t.dialog=t.artDialog=m})(this.art||this.jQuery&&(this.art=jQuery),this);(function(t){var e,i,n=t(window),o=t(document),s=document.documentElement,l=!("minWidth"in s.style),a="onlosecapture"in s,r="setCapture"in s;artDialog.dragEvent=function(){var t=this,e=function(e){var i=t[e];t[e]=function(){return i.apply(t,arguments)}};e("start");e("move");e("end")};artDialog.dragEvent.prototype={onstart:t.noop,start:function(t){o.bind("mousemove",this.move).bind("mouseup",this.end);this._sClientX=t.clientX;this._sClientY=t.clientY;this.onstart(t.clientX,t.clientY);return false},onmove:t.noop,move:function(t){this._mClientX=t.clientX;this._mClientY=t.clientY;this.onmove(t.clientX-this._sClientX,t.clientY-this._sClientY);return false},onend:t.noop,end:function(t){o.unbind("mousemove",this.move).unbind("mouseup",this.end);this.onend(t.clientX,t.clientY);return false}};i=function(t){var i,s,c,f,u,d,h=artDialog.focus,p=h.DOM,m=p.wrap,g=p.title,_=p.main;var v="getSelection"in window?function(){window.getSelection().removeAllRanges()}:function(){try{document.selection.empty()}catch(t){}};e.onstart=function(t,i){if(d){s=_[0].offsetWidth;c=_[0].offsetHeight}else{f=m[0].offsetLeft;u=m[0].offsetTop}o.bind("dblclick",e.end);!l&&a?g.bind("losecapture",e.end):n.bind("blur",e.end);r&&g[0].setCapture();m.addClass("aui_state_drag");h.focus()};e.onmove=function(t,e){if(d){var n=m[0].style,o=_[0].style,l=t+s,a=e+c;n.width="auto";o.width=Math.max(0,l)+"px";n.width=m[0].offsetWidth+"px";o.height=Math.max(0,a)+"px"}else{var o=m[0].style,r=Math.max(i.minX,Math.min(i.maxX,t+f)),p=Math.max(i.minY,Math.min(i.maxY,e+u));o.left=r+"px";o.top=p+"px"}v();h._ie6SelectFix()};e.onend=function(t,i){o.unbind("dblclick",e.end);!l&&a?g.unbind("losecapture",e.end):n.unbind("blur",e.end);r&&g[0].releaseCapture();l&&!h.closed&&h._autoPositionType();m.removeClass("aui_state_drag")};d=t.target===p.se[0]?true:false;i=function(){var t,e,i=h.DOM.wrap[0],s=i.style.position==="fixed",l=i.offsetWidth,a=i.offsetHeight,r=n.width(),c=n.height(),f=s?0:o.scrollLeft(),u=s?0:o.scrollTop(),t=r-l+f;e=c-a+u;return{minX:f,minY:u,maxX:t,maxY:e}}();e.start(t)};o.bind("mousedown",function(t){var n=artDialog.focus;if(!n)return;var o=t.target,s=n.config,l=n.DOM;if(s.drag!==false&&o===l.title[0]||s.resize!==false&&o===l.se[0]){e=e||new artDialog.dragEvent;i(t);return false}})})(this.art||this.jQuery&&(this.art=jQuery)); /*! * artDialog iframeTools * Date: 2011-11-25 13:54 * http://code.google.com/p/artdialog/ * (c) 2009-2011 TangBin, http://www.planeArt.cn * * This is licensed under the GNU LGPL, version 2.1 or later. * For details, see: http://creativecommons.org/licenses/LGPL/2.1/ */ (function(x,D,k,w){var n,O,M,o="@ARTDIALOG.DATA",F="@ARTDIALOG.OPEN",I="@ARTDIALOG.OPENER",e=D.name=D.name||"@ARTDIALOG.WINNAME"+ +new Date,T=D.VBArray&&!D.XMLHttpRequest;x(function(){!D.jQuery&&document.compatMode==="BackCompat"&&alert('artDialog Error: document.compatMode === "BackCompat"')});var i=k.top=function(){var t=D,n=function(t){try{var n=D[t].document;n.getElementsByTagName}catch(t){return false}return D[t].artDialog&&n.getElementsByTagName("frameset").length===0};if(n("top")){t=D.top}else if(n("parent")){t=D.parent}return t}();k.parent=i;n=i.artDialog;M=function(){return n.defaults.zIndex};k.data=function(t,n){var e=k.top,i=e[o]||{};e[o]=i;if(n!==w){i[t]=n}else{return i[t]}return i};k.removeData=function(t){var n=k.top[o];if(n&&n[t])delete n[t]};k.through=O=function(){var t=n.apply(this,arguments);if(i!==D)k.list[t.config.id]=t;return t};i!==D&&x(D).bind("unload",function(){var t=k.list,n;for(var e in t){if(t[e]){n=t[e].config;if(n)n.duration=0;t[e].close()}}});k.open=function(t,o,n){o=o||{};var a,c,r,e,s,i,l,u,f,d=k.top,p="position:absolute;left:-9999em;top:-9999em;border:none 0;background:transparent",h="width:100%;height:100%;border:none 0";if(n===false){var m=+new Date,g=t.replace(/([?&])_=[^&]*/,"$1_="+m);t=g+(g===t?(/\?/.test(t)?"&":"?")+"_="+m:"")}var v=function(){var t,n,e=c.content.find(".aui_loading"),i=a.config;r.addClass("aui_state_full");e&&e.hide();try{u=s.contentWindow;l=x(u.document);f=u.document.body}catch(t){s.style.cssText=h;i.follow?a.follow(i.follow):a.position(i.left,i.top);o.init&&o.init.call(a,u,d);o.init=null;return}t=i.width==="auto"?l.width()+(T?0:parseInt(x(f).css("marginLeft"))):i.width;n=i.height==="auto"?l.height():i.height;setTimeout(function(){s.style.cssText=h},0);a.size(t,n);i.follow?a.follow(i.follow):a.position(i.left,i.top);o.init&&o.init.call(a,u,d);o.init=null};var y={zIndex:M(),init:function(){a=this;c=a.DOM;e=c.main;r=c.content;s=a.iframe=d.document.createElement("iframe");s.src=t;s.name="Open"+a.config.id;s.style.cssText=p;s.setAttribute("frameborder",0,0);s.setAttribute("allowTransparency",true);i=x(s);a.content().appendChild(s);u=s.contentWindow;try{u.name=s.name;k.data(s.name+F,a);k.data(s.name+I,D)}catch(t){}i.bind("load",v)},close:function(){i.css("display","none").unbind("load",v);if(o.close&&o.close.call(this,s.contentWindow,d)===false){return false}r.removeClass("aui_state_full");i[0].src="about:blank";i.remove();try{k.removeData(s.name+F);k.removeData(s.name+I)}catch(t){}}};if(typeof o.ok==="function")y.ok=function(){return o.ok.call(a,s.contentWindow,d)};if(typeof o.cancel==="function")y.cancel=function(){return o.cancel.call(a,s.contentWindow,d)};delete o.content;for(var b in o){if(y[b]===w)y[b]=o[b]}return O(y)};k.open.api=k.data(e+F);k.opener=k.data(e+I)||D;k.open.origin=k.opener;k.close=function(){var t=k.data(e+F);t&&t.close();return false};i!=D&&x(document).bind("mousedown",function(){var t=k.open.api;t&&t.zIndex()});k.load=function(i,t,o){o=o||false;var a=t||{};var n={zIndex:M(),init:function(n){var e=this,t=e.config;x.ajax({url:i,success:function(t){e.content(t);a.init&&a.init.call(e,n)},cache:o})}};delete t.content;for(var e in a){if(n[e]===w)n[e]=a[e]}return O(n)};k.alert=function(t,n,e){if(typeof n==="string"){e=n;n=true}e=e||"warning";return O({id:"Alert",zIndex:M(),icon:e,fixed:true,lock:true,init:function(){this.DOM.content.css({background:"none",color:"#000"});this.DOM.main.css("background","#FFF")},content:t,ok:true,close:n})};k.confirm=function(t,n,e){return O({id:"Confirm",zIndex:M(),icon:"question",fixed:true,lock:true,opacity:.1,init:function(){this.DOM.content.css({background:"none",color:"#000"});this.DOM.main.css("background","#FFF")},content:t,ok:function(t){return n.call(this,t)},cancel:function(t){return e&&e.call(this,t)}})};k.prompt=function(t,n,e){e=e||"";var i;return O({id:"Prompt",zIndex:M(),icon:"question",fixed:true,lock:true,opacity:.1,content:['
',t,"
","
",'',"
"].join(""),init:function(){this.DOM.content.css({background:"none",color:"#000"});this.DOM.main.css("background","#FFF");i=this.DOM.content.find("input")[0];i.select();i.focus()},ok:function(t){return n&&n.call(this,i.value,t)},cancel:true})};k.tips=function(t,n,e){if(typeof n==="function"){e=n;n=1.5}return O({id:"Tips",zIndex:M(),title:false,cancel:false,fixed:true,lock:false,init:function(t){this.DOM.content.css({background:"#000",padding:"10px",color:"#fff"});this.DOM.main.css("background","#000")},close:function(){this.DOM.content.css({background:"none",padding:"20px 25px",color:"#000"});this.DOM.main.css("background","#FFF");return e&&e.call(this,e)}}).content('
'+t+"
").time(n||1.5)};k.notice=function(t){var n=t||{},e,i,o,a,c,r=800;var s={id:"Notice",left:"100%",top:"100%",fixed:true,drag:false,resize:false,follow:null,lock:false,init:function(t){this.DOM.content.css({background:"none",color:"#000"});this.DOM.main.css("background","#FFF");e=this;i=e.config;a=e.DOM.wrap;c=parseInt(a[0].style.top);o=c+a[0].offsetHeight;a.css("top",o+"px").animate({top:c+"px"},r,function(){n.init&&n.init.call(e,t)})},close:function(t){a.animate({top:o+"px"},r,function(){n.close&&n.close.call(this,t);i.close=x.noop;e.close()});return false}};for(var l in n){if(s[l]===w)s[l]=n[l]}return k(s)};x(function(){var t=k.dragEvent;if(!t)return;var i=x(D),o=x(document),a=T?"absolute":"fixed",c=t.prototype,n=document.createElement("div"),r=n.style;r.cssText="display:none;position:"+a+";left:0;top:0;width:100%;height:100%;"+"cursor:move;filter:alpha(opacity=0);opacity:0;background:#FFF";document.body.appendChild(n);c._start=c.start;c._end=c.end;c.start=function(){var t=k.focus.DOM,n=t.main[0],e=t.content[0].getElementsByTagName("iframe")[0];c._start.apply(this,arguments);r.display="block";r.zIndex=k.defaults.zIndex+3;if(a==="absolute"){r.width=i.width()+"px";r.height=i.height()+"px";r.left=o.scrollLeft()+"px";r.top=o.scrollTop()+"px"}if(e&&n.offsetWidth*n.offsetHeight>307200){n.style.visibility="hidden"}};c.end=function(){var t=k.focus;c._end.apply(this,arguments);r.display="none";if(t)t.DOM.main[0].style.visibility="visible"}})})(this.art||this.jQuery,this,this.artDialog); (function (config) { config["title"] = "消息"; config["okVal"] = "确定"; config["cancelVal"] = "取消"; })(art.dialog.defaults); (function($){ var rotateLeft = function(lValue, iShiftBits) { return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)); } var addUnsigned = function(lX, lY) { var lX4, lY4, lX8, lY8, lResult; lX8 = (lX & 0x80000000); lY8 = (lY & 0x80000000); lX4 = (lX & 0x40000000); lY4 = (lY & 0x40000000); lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF); if (lX4 & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8); if (lX4 | lY4) { if (lResult & 0x40000000) return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); else return (lResult ^ 0x40000000 ^ lX8 ^ lY8); } else { return (lResult ^ lX8 ^ lY8); } } var F = function(x, y, z) { return (x & y) | ((~ x) & z); } var G = function(x, y, z) { return (x & z) | (y & (~ z)); } var H = function(x, y, z) { return (x ^ y ^ z); } var I = function(x, y, z) { return (y ^ (x | (~ z))); } var FF = function(a, b, c, d, x, s, ac) { a = addUnsigned(a, addUnsigned(addUnsigned(F(b, c, d), x), ac)); return addUnsigned(rotateLeft(a, s), b); }; var GG = function(a, b, c, d, x, s, ac) { a = addUnsigned(a, addUnsigned(addUnsigned(G(b, c, d), x), ac)); return addUnsigned(rotateLeft(a, s), b); }; var HH = function(a, b, c, d, x, s, ac) { a = addUnsigned(a, addUnsigned(addUnsigned(H(b, c, d), x), ac)); return addUnsigned(rotateLeft(a, s), b); }; var II = function(a, b, c, d, x, s, ac) { a = addUnsigned(a, addUnsigned(addUnsigned(I(b, c, d), x), ac)); return addUnsigned(rotateLeft(a, s), b); }; var convertToWordArray = function(string) { var lWordCount; var lMessageLength = string.length; var lNumberOfWordsTempOne = lMessageLength + 8; var lNumberOfWordsTempTwo = (lNumberOfWordsTempOne - (lNumberOfWordsTempOne % 64)) / 64; var lNumberOfWords = (lNumberOfWordsTempTwo + 1) * 16; var lWordArray = Array(lNumberOfWords - 1); var lBytePosition = 0; var lByteCount = 0; while (lByteCount < lMessageLength) { lWordCount = (lByteCount - (lByteCount % 4)) / 4; lBytePosition = (lByteCount % 4) * 8; lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition)); lByteCount++; } lWordCount = (lByteCount - (lByteCount % 4)) / 4; lBytePosition = (lByteCount % 4) * 8; lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition); lWordArray[lNumberOfWords - 2] = lMessageLength << 3; lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29; return lWordArray; }; var wordToHex = function(lValue) { var WordToHexValue = "", WordToHexValueTemp = "", lByte, lCount; for (lCount = 0; lCount <= 3; lCount++) { lByte = (lValue >>> (lCount * 8)) & 255; WordToHexValueTemp = "0" + lByte.toString(16); WordToHexValue = WordToHexValue + WordToHexValueTemp.substr(WordToHexValueTemp.length - 2, 2); } return WordToHexValue; }; var uTF8Encode = function(string) { string = string.replace(/\x0d\x0a/g, "\x0a"); var output = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { output += String.fromCharCode(c); } else if ((c > 127) && (c < 2048)) { output += String.fromCharCode((c >> 6) | 192); output += String.fromCharCode((c & 63) | 128); } else { output += String.fromCharCode((c >> 12) | 224); output += String.fromCharCode(((c >> 6) & 63) | 128); output += String.fromCharCode((c & 63) | 128); } } return output; }; $.extend({ md5: function(string) { var x = Array(); var k, AA, BB, CC, DD, a, b, c, d; var S11=7, S12=12, S13=17, S14=22; var S21=5, S22=9 , S23=14, S24=20; var S31=4, S32=11, S33=16, S34=23; var S41=6, S42=10, S43=15, S44=21; string = uTF8Encode(string); x = convertToWordArray(string); a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476; for (k = 0; k < x.length; k += 16) { AA = a; BB = b; CC = c; DD = d; a = FF(a, b, c, d, x[k+0], S11, 0xD76AA478); d = FF(d, a, b, c, x[k+1], S12, 0xE8C7B756); c = FF(c, d, a, b, x[k+2], S13, 0x242070DB); b = FF(b, c, d, a, x[k+3], S14, 0xC1BDCEEE); a = FF(a, b, c, d, x[k+4], S11, 0xF57C0FAF); d = FF(d, a, b, c, x[k+5], S12, 0x4787C62A); c = FF(c, d, a, b, x[k+6], S13, 0xA8304613); b = FF(b, c, d, a, x[k+7], S14, 0xFD469501); a = FF(a, b, c, d, x[k+8], S11, 0x698098D8); d = FF(d, a, b, c, x[k+9], S12, 0x8B44F7AF); c = FF(c, d, a, b, x[k+10], S13, 0xFFFF5BB1); b = FF(b, c, d, a, x[k+11], S14, 0x895CD7BE); a = FF(a, b, c, d, x[k+12], S11, 0x6B901122); d = FF(d, a, b, c, x[k+13], S12, 0xFD987193); c = FF(c, d, a, b, x[k+14], S13, 0xA679438E); b = FF(b, c, d, a, x[k+15], S14, 0x49B40821); a = GG(a, b, c, d, x[k+1], S21, 0xF61E2562); d = GG(d, a, b, c, x[k+6], S22, 0xC040B340); c = GG(c, d, a, b, x[k+11], S23, 0x265E5A51); b = GG(b, c, d, a, x[k+0], S24, 0xE9B6C7AA); a = GG(a, b, c, d, x[k+5], S21, 0xD62F105D); d = GG(d, a, b, c, x[k+10], S22, 0x2441453); c = GG(c, d, a, b, x[k+15], S23, 0xD8A1E681); b = GG(b, c, d, a, x[k+4], S24, 0xE7D3FBC8); a = GG(a, b, c, d, x[k+9], S21, 0x21E1CDE6); d = GG(d, a, b, c, x[k+14], S22, 0xC33707D6); c = GG(c, d, a, b, x[k+3], S23, 0xF4D50D87); b = GG(b, c, d, a, x[k+8], S24, 0x455A14ED); a = GG(a, b, c, d, x[k+13], S21, 0xA9E3E905); d = GG(d, a, b, c, x[k+2], S22, 0xFCEFA3F8); c = GG(c, d, a, b, x[k+7], S23, 0x676F02D9); b = GG(b, c, d, a, x[k+12], S24, 0x8D2A4C8A); a = HH(a, b, c, d, x[k+5], S31, 0xFFFA3942); d = HH(d, a, b, c, x[k+8], S32, 0x8771F681); c = HH(c, d, a, b, x[k+11], S33, 0x6D9D6122); b = HH(b, c, d, a, x[k+14], S34, 0xFDE5380C); a = HH(a, b, c, d, x[k+1], S31, 0xA4BEEA44); d = HH(d, a, b, c, x[k+4], S32, 0x4BDECFA9); c = HH(c, d, a, b, x[k+7], S33, 0xF6BB4B60); b = HH(b, c, d, a, x[k+10], S34, 0xBEBFBC70); a = HH(a, b, c, d, x[k+13], S31, 0x289B7EC6); d = HH(d, a, b, c, x[k+0], S32, 0xEAA127FA); c = HH(c, d, a, b, x[k+3], S33, 0xD4EF3085); b = HH(b, c, d, a, x[k+6], S34, 0x4881D05); a = HH(a, b, c, d, x[k+9], S31, 0xD9D4D039); d = HH(d, a, b, c, x[k+12], S32, 0xE6DB99E5); c = HH(c, d, a, b, x[k+15], S33, 0x1FA27CF8); b = HH(b, c, d, a, x[k+2], S34, 0xC4AC5665); a = II(a, b, c, d, x[k+0], S41, 0xF4292244); d = II(d, a, b, c, x[k+7], S42, 0x432AFF97); c = II(c, d, a, b, x[k+14], S43, 0xAB9423A7); b = II(b, c, d, a, x[k+5], S44, 0xFC93A039); a = II(a, b, c, d, x[k+12], S41, 0x655B59C3); d = II(d, a, b, c, x[k+3], S42, 0x8F0CCC92); c = II(c, d, a, b, x[k+10], S43, 0xFFEFF47D); b = II(b, c, d, a, x[k+1], S44, 0x85845DD1); a = II(a, b, c, d, x[k+8], S41, 0x6FA87E4F); d = II(d, a, b, c, x[k+15], S42, 0xFE2CE6E0); c = II(c, d, a, b, x[k+6], S43, 0xA3014314); b = II(b, c, d, a, x[k+13], S44, 0x4E0811A1); a = II(a, b, c, d, x[k+4], S41, 0xF7537E82); d = II(d, a, b, c, x[k+11], S42, 0xBD3AF235); c = II(c, d, a, b, x[k+2], S43, 0x2AD7D2BB); b = II(b, c, d, a, x[k+9], S44, 0xEB86D391); a = addUnsigned(a, AA); b = addUnsigned(b, BB); c = addUnsigned(c, CC); d = addUnsigned(d, DD); } var tempValue = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d); return tempValue.toLowerCase(); } }); })(jQuery); /** * PHPOK程序中常用到的JS,封装在此 * @作者 qinggan * @版权 深圳市锟铻科技有限公司 * @网站 http://www.phpok.com * @版本 4.x * @授权 MIT License * @日期 2017年04月18日 **/ ;(function($){ $.phpok = { /** * 刷新当前页面,使用方法:$.phpok.refresh(); **/ refresh: function() { window.location.reload(true); }, /** * 刷新页面别名,使用方法:$.phpok.reload(); **/ reload:function() { this.refresh(); }, /** * 跳转到目标网址 * @参数 url 要跳转到的网址 * @参数 nocache 是否禁止缓存,设置且为true时,程序会在网址后面补增_noCache参数 **/ go: function(url,nocache) { if(!url){ return false; } if(nocache || nocache == 'undefined'){ url = this.nocache(url); } window.location.href = url; }, /** * 弹出窗口 * @参数 url 要弹出窗口的网址 * @参数 nocache 是否禁止缓存,设置且为true时,程序会在网址后面补增_noCache参数 **/ open:function(url,nocache) { if(!url){ return false; } if(nocache || nocache == 'undefined'){ url = this.nocache(url); } window.open(url); }, /** * 读取Ajax的内容,读出来的内容为html * @参数 url 目标网址 * @参数 obj 执行方法,为空或未设置,则返回HTML代码,此时为同步请求 **/ ajax:function(url,obj,postData) { if(!url){ return false; } var cls = {'url':url,'cache':false,'dataType':'html'}; if(postData && postData != 'undefined'){ cls.data = postData; cls.type = 'post'; } cls.beforeSend = function(request){ request.setRequestHeader("request_type","ajax"); request.setRequestHeader("phpok_ajax",1); if(client_token && client_token != 'undefined'){ request.setRequestHeader('AUTHORIZATION',client_token); } }; if(!obj || obj == 'undefined'){ cls.async = false; return $.ajax(cls).responseText; } cls.success = function(rs){(obj)(rs)}; $.ajax(cls); }, /** * 读取 Ajax 内容,返回JSON数据 * @参数 url 目标网址 * @参数 obj 执行方法,为空或未设置,则返回JSON对象,此时为同步请求 **/ json:function(url,obj,postData) { if(!url){ return false; } var self = this; var cls = {'url':url,'cache':false,'dataType':'json'}; if(postData && postData != 'undefined'){ cls.data = postData; cls.type = 'post'; } cls.beforeSend = function(request){ request.setRequestHeader("request_type","ajax"); request.setRequestHeader("phpok_ajax",1); if(!postData || postData == 'undefined'){ request.setRequestHeader("content-type","application/json"); } if(client_token && client_token != 'undefined'){ request.setRequestHeader('AUTHORIZATION',client_token); } }; if(!obj || obj == 'undefined'){ cls.async = false; var info = $.ajax(cls).responseText; return self.json_decode(info); } if(typeof obj == 'boolean'){ cls.success = function(rs){ return rs; } }else{ cls.success = function(rs){ (obj)(rs); }; } $.ajax(cls); }, submit:function(obj,url,success,error){ var header_options = { 'request_type':'ajax', 'phpok_ajax':1 } if(client_token && client_token != 'undefined'){ header_options['AUTHORIZATION'] = client_token; } var options = { 'url':url, 'type':'post', 'dataType':'json', 'headers':header_options, 'success':function(rs){ if(success && typeof success == 'function'){ (success)(rs); } return false; }, 'error':function(e) { if(error && typeof error == 'function'){ (error)(e); } } } $(obj).ajaxSubmit(options); return false; }, /** * 格式化网址,增加_noCache尾巴,以保证不从缓存中读取数据 * @参数 url 要格式化的网址 **/ nocache: function(url) { url = url.replace(/&/g,'&'); if(url.indexOf('_noCache') != -1){ url = url.replace(/\_noCache=[0-9\.]+/,'_noCache='+Math.random()); }else{ url += url.indexOf('?') != -1 ? '&' : '?'; url += '_noCache='+Math.random(); } return url; }, json_encode:function(obj) { if(!obj || obj == 'undefined'){ return false; } return JSON.stringify(obj); }, json_decode:function(str) { if(!str || str == 'undefined'){ return false; } return $.parseJSON(str); }, /** * 生成随机数 * @参数 len 长度,留空使用长度10 * @参数 type 类型,支持 letter,num,fixed,all,其中 fixed 表示字母数字混合,all 表示字母,数字,及特殊符号,letter 表示字母,num 表示数字 **/ rand:function(len,type) { len = len || 10; if(!type || type == 'undefined'){ type = 'letter'; } var types = {'letter':'abcdefhijkmnprstwxyz','num':'0123456789','fixed':'abcdefhijkmnprstwxyz0123456789','all':'abcdefhijkmnprstwxyz0123456789-,.*!@#$%=~'} if(type != 'letter' && type != 'num' && type != 'all' && type != 'fixed'){ type = 'letter'; } var string = types[type]; var length = string.length; var val = ''; for (i = 0; i < len; i++) { val += string.charAt(Math.floor(Math.random() * length)); } return val; }, /** * 向顶层发送消息 * @参数 info 要发送的文本消息,注意,仅限文本 **/ message:function(info,url) { try{ if(url && url != 'undefined'){ $("iframe").each(function(i){ var src = $(this).attr('src'); if(typeof url == 'boolean'){ var obj = $(this)[0].contentWindow; obj.postMessage(info,window.location.origin); }else{ if(url.indexOf(src) != -1){ var obj = $(this)[0].contentWindow; obj.postMessage(info,url) } } }); }else{ window.top.postMessage(info,top.window.location.origin); } } catch (error) { console.log(error); return false; } }, data:function(id,val) { if(val && val != 'undefined'){ localStorage.setItem(id,val); return true; } var info = localStorage.getItem(id); if(!info || info == 'undefined'){ return false; } return info; }, undata:function(id) { localStorage.removeItem(id); }, date:function(timestamp, formats){ formats = formats || 'Y-m-d'; var zero = function (value) { if (value < 10) { return '0' + value; } return value; }; if(timestamp && timestamp.length == 10){ timestamp = timestamp * 1000; } var myDate = timestamp ? new Date(timestamp): new Date(); var year = myDate.getFullYear(); var month = zero(myDate.getMonth() + 1); var day = zero(myDate.getDate()); var hour = zero(myDate.getHours()); var minite = zero(myDate.getMinutes()); var second = zero(myDate.getSeconds()); return formats.replace(/Y|m|d|H|i|s/ig, function (matches) { return ({ Y: year, m: month, d: day, H: hour, i: minite, s: second })[matches]; }); } }; /** * JSON字串与对象转换操作 **/ $.json = { /** * 字符串转对象 * @参数 str 要转化的字符串 **/ decode:function(str) { if(!str || str == 'undefined'){ return false; } return JSON.parse(str); }, /** * 对象转成字符串 * @参数 obj 要转化的对象 **/ encode:function(obj) { if(!obj || obj == 'undefined'){ return false; } return JSON.stringify(obj); } }; $.checkbox = { _obj:function(id) { if(id && id != 'undefined' && typeof id == 'string'){ if(id.match(/^[a-zA-Z0-9\-\_]{1,}$/)){ if($("#"+id).is('input')){ return $("#"+id); } return $("#"+id+" input[type=checkbox]"); } if($(id).is('input')){ return $(id); } return $(id+" input[type=checkbox]"); } return $("input[type=checkbox]"); }, /** * 全选 * @参数 id 要操作的ID **/ all:function(id) { var obj = this._obj(id); obj.prop('checked',true); if(typeof layui != 'undefined'){ window.setTimeout("layui.form.render('checkbox')",100); } return true; }, /** * 返先 * @参数 id 要操作的ID **/ none:function(id) { var obj = this._obj(id); obj.removeAttr('checked'); if(typeof layui != 'undefined'){ window.setTimeout("layui.form.render('checkbox')",100); } return true; }, /** * 更多选择,默认只选5个(count默认值为5) $.checkbox.more(id,5); * @参数 id 要操作的ID * @参数 count 每次次最多选几个 **/ more: function(id,count){ var obj = this._obj(id); var num = 0; if(!count || count == 'undefined' || parseInt(count)<5){ count = 5; } obj.each(function(){ if(!$(this).is(":checked") && num * @版权 深圳市锟铻科技有限公司 * @网站 http://www.phpok.com * @版本 4.x * @授权 MIT License * @日期 2017年03月22日 **/ //异步加载js function load_js(url) { if(!url || url == "undefined") return false; var lst = url.split(","); var lst_count = lst.length; var elist = new Array(); var tm = 0; $("script").each(function(t){ var src = $(this).attr("src"); if(src && src != 'undefined'){ elist[tm] = src; tm++; } }); var html = ''; for(var i=0;i'; } } $("head").append(html); } // 同步加载Ajax,返回字符串 function get_ajax(turl) { return $.phpok.ajax(turl); } // 同步加载Ajax,返回JSON数组 function json_ajax(turl) { return $.phpok.json(turl); } /** * JS语法中涉及到的语言包替换 * @参数 str 要替换的语言包,支持使用{}包起来的变量 * @参数 info 支持字符串,对数数据,要替换的变量,为空表示没有变量信息 * @返回 替换后的数据 * @更新时间 **/ function p_lang(str,info) { if(!str || str == 'undefined'){ return false; } if(lang && lang[str]){ if(!info || info == 'undefined' || typeof info == 'boolean'){ return lang[str]; } str = lang[str]; if(typeof info == 'string' || typeof info == 'number'){ return str.replace(/(\{|\[)\w+?(\}|\])/,info); } for(var i in info){ str = str.replace('{'+i+'}',info[i]); str = str.replace('['+i+']',info[i]); } return str; } if(!info || info == 'undefined' || typeof info == 'boolean'){ return str; } if(typeof info == 'string' || typeof info == 'number'){ return str.replace(/(\{|\[)\w+?(\}|\])/,info); //return str.replace(/\{\w+\}/,info); } for(var i in info){ str = str.replace('{'+i+'}',info[i]); str = str.replace('['+i+']',info[i]); } return str; } // 异步加载Ajax,执行函数 function ajax_async(turl,func,type) { if(!turl || turl == "undefined") { return false; } if(!func || func == "undefined") { return false; } if(!type || type == "undefined") { type = "json"; } if(type != "html" && type != "json" && type != "text" && type != "xml") { type = "json"; } turl = $.phpok.nocache(turl); $.ajax({ 'url': turl, 'cache': false, 'async': true, 'dataType': type, 'success': function(rs){ (func)(rs); } }); } // 跳转页面 function direct(url) { if(!url || url == "undefined") url = window.location.href; $.phpok.go(url); } //自动刷新 function auto_refresh(rs) { $.phpok.reload(); } function autosave_callback(rs) { return true; } /* 计算字符数长度,中文等同于三个字符,英文为一个字符 */ function strlen(str) { var len = str.length; var reLen = 0; for (var i = 0; i < len; i++) { if (str.charCodeAt(i) < 27 || str.charCodeAt(i) > 126) { reLen += 3; } else { reLen++; } } if(reLen > 1024 && reLen < (1024 * 1024)) { var reLen = (parseFloat(reLen / 1024).toFixed(3)).toString() + "KB"; } else if(reLen > (1024 * 1024) && reLen < (1024 * 1024 * 1024)) { var reLen = (parseFloat(reLen / (1024 * 1024)).toFixed(3)).toString() + "MB"; } if(!reLen) reLen = "0"; return reLen; } //友情提示 function tips(content,time,id) { if(!time || time == "undefined") time = 1.5; if(!id || id == "undefind") { $.dialog.tips(content,time); } else { return $.dialog({ id: 'Tips', title: false, cancel: false, fixed: true, lock: false, focus: id, resize: false }).content(content).time(time || 1.5); } } /* 计算数组或对像中的个数 */ function count(id) { var t = typeof id; if(t == 'string'){ return id.length; } if(t == 'object'){ var n = 0; for(var i in id){ n++; } return n; } return false; } /*! * jQuery Form Plugin * version: 4.2.2 * Requires jQuery v1.7.2 or later * Project repository: https://github.com/jquery-form/form * Copyright 2017 Kevin Morris * Copyright 2006 M. Alsup * Dual licensed under the LGPL-2.1+ or MIT licenses * https://github.com/jquery-form/form#license * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,r){return void 0===r&&(r="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(r),r}:e(jQuery)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).closest("form").ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=r.form;if(i.clk=r,"image"===r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n=/\r?\n/g,i={};i.fileapi=void 0!==e('').get(0).files,i.formdata=void 0!==window.FormData;var o=!!e.fn.prop;e.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t,r,n,s){function u(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;a',k).val(f.extraData[c].value).appendTo(w)[0]):u.push(e('',k).val(f.extraData[c]).appendTo(w)[0]));f.iframeTarget||h.appendTo(D),v.attachEvent?v.attachEvent("onload",s):v.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(e){document.createElement("form").submit.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",o),r?w.setAttribute("target",r):p.removeAttr("target"),e(u).remove()}}function s(t){if(!x.aborted&&!X){if((O=n(v))||(a("cannot access response document"),t=L),t===A&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t===L&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(O&&O.location.href!==f.iframeSrc||T){v.detachEvent?v.detachEvent("onload",s):v.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"===f.dataType||O.XMLDocument||e.isXMLDoc(O);if(a("isXml="+o),!o&&window.opera&&(null===O.body||!O.body.innerHTML)&&--C)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=O.body?O.body:O.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=O.XMLDocument?O.XMLDocument:O,o&&(f.dataType="xml"),x.getResponseHeader=function(e){return{"content-type":f.dataType}[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(f.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||f.textarea){var p=O.getElementsByTagName("textarea")[0];if(p)x.responseText=p.value,x.status=Number(p.getAttribute("status"))||x.status,x.statusText=p.getAttribute("statusText")||x.statusText;else if(l){var m=O.getElementsByTagName("pre")[0],g=O.getElementsByTagName("body")[0];m?x.responseText=m.textContent?m.textContent:m.innerText:g&&(x.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"===c&&!x.responseXML&&x.responseText&&(x.responseXML=q(x.responseText));try{M=N(x,c,f)}catch(e){i="parsererror",x.error=r=e||i}}catch(e){a("error caught: ",e),i="error",x.error=r=e||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(f.success&&f.success.call(f.context,M,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,f])):i&&(void 0===r&&(r=x.statusText),f.error&&f.error.call(f.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,f,r])),d&&e.event.trigger("ajaxComplete",[x,f]),d&&!--e.active&&e.event.trigger("ajaxStop"),f.complete&&f.complete.call(f.context,x,i),X=!0,f.timeout&&clearTimeout(j),setTimeout(function(){f.iframeTarget?h.attr("src",f.iframeSrc):h.remove(),x.responseXML=null},100)}}}var u,c,f,d,m,h,v,x,y,b,T,j,w=p[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(c=0;c',k)).css({position:"absolute",top:"-1000px",left:"-1000px"}),v=h[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(e){}h.attr("src",f.iframeSrc),x.error=r,f.error&&f.error.call(f.context,x,r,t),d&&e.event.trigger("ajaxError",[x,f,r]),f.complete&&f.complete.call(f.context,x,r)}},(d=f.global)&&0==e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,f]),f.beforeSend&&!1===f.beforeSend.call(f.context,x,f))return f.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;(y=w.clk)&&(b=y.name)&&!y.disabled&&(f.extraData=f.extraData||{},f.extraData[b]=y.value,"image"===y.type&&(f.extraData[b+".x"]=w.clk_x,f.extraData[b+".y"]=w.clk_y));var A=1,L=2,F=e("meta[name=csrf-token]").attr("content"),E=e("meta[name=csrf-param]").attr("content");E&&F&&(f.extraData=f.extraData||{},f.extraData[E]=F),f.forceSync?i():setTimeout(i,10);var M,O,X,C=50,q=e.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},_=e.parseJSON||function(e){return window.eval("("+e+")")},N=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i=("xml"===r||!r)&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&(("json"===r||!r)&&n.indexOf("json")>=0?o=_(o):("script"===r||!r)&&n.indexOf("javascript")>=0&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var l,f,d,p=this;"function"==typeof t?t={success:t}:"string"==typeof t||!1===t&&arguments.length>0?(t={url:t,data:r,dataType:n},"function"==typeof s&&(t.success=s)):void 0===t&&(t={}),l=t.method||t.type||this.attr2("method"),(d=(d="string"==typeof(f=t.url||this.attr2("action"))?e.trim(f):"")||window.location.href||"")&&(d=(d.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:d,success:e.ajaxSettings.success,type:l||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var h=t.traditional;void 0===h&&(h=e.ajaxSettings.traditional);var v,g=[],x=this.formToArray(t.semantic,g,t.filtering);if(t.data){var y=e.isFunction(t.data)?t.data(x):t.data;t.extraData=y,v=e.param(y,h)}if(t.beforeSubmit&&!1===t.beforeSubmit(x,this,t))return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[x,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var b=e.param(x,h);v&&(b=b?b+"&"+v:v),"GET"===t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+b,t.data=null):t.data=b;var T=[];if(t.resetForm&&T.push(function(){p.resetForm()}),t.clearForm&&T.push(function(){p.clearForm(t.includeHidden)}),!t.dataType&&t.target){var j=t.success||function(){};T.push(function(r,a,n){var i=arguments,o=t.replaceTarget?"replaceWith":"html";e(t.target)[o](r).each(function(){j.apply(this,i)})})}else t.success&&(e.isArray(t.success)?e.merge(T,t.success):T.push(t.success));if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=T.length;i0,D="multipart/form-data",A=p.attr("enctype")===D||p.attr("encoding")===D,L=i.fileapi&&i.formdata;a("fileAPI :"+L);var F,E=(k||A)&&!L;!1!==t.iframe&&(t.iframe||E)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){F=c(x)}):F=c(x):F=(k||A)&&L?function(r){for(var a=new FormData,n=0;n0)&&(n={url:n,data:i,dataType:o},"function"==typeof s&&(n.success=s)),n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var u={s:this.selector,c:this.context};return!e.isReady&&u.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(u.s,u.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().on("submit.form-plugin",n,t).on("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r,a){var n=[];if(0===this.length)return n;var o,s=this[0],u=this.attr("id"),c=t||void 0===s.elements?s.getElementsByTagName("*"):s.elements;if(c&&(c=e.makeArray(c)),u&&(t||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=e(':input[form="'+u+'"]').get()).length&&(c=(c||[]).concat(o)),!c||!c.length)return n;e.isFunction(a)&&(c=e.map(c,a));var l,f,d,p,m,h,v;for(l=0,h=c.length;l Update : 2013年9月12日 ***********************************************************/ //前台通用弹出窗口 function phpok_open(id,title) { if(id == "login" || id == "register") { var url = get_url("ajax","exit","filename="+id); } else { var url = id; } if(!title || title == "undefined") title = '弹出窗'; $.dialog.open(url,{ "title":title ,"resize":true ,"lock":true ,"id":"phpok_open_frame" ,"fixed":true ,"drag":false }); } //前台常用JS函数封装 ;(function($){ //定义验证码 $.fn.phpok_vcode = function(ext){ var url = api_url('vcode'); if(ext && ext != 'undefined') { url += "&id="+ext; } $(this).attr('src',$.phpok.nocache(url)); } $.phpok_www = { comment:function(id,tid,callback){ if(!tid || tid == 'undefined') { $.dialog.alert(lang.commentNotId); return false; } //直接通过JS判断是否恶意灌水 var spam = $("#"+id+"_spam").val(); if(!spam) { $.dialog.alert(lang.commentSpamEmpty); return false; } var content = $("#"+id).val(); if(!content) { $.dialog.alert(lang.commentEmpty); return false; } var url = api_url('comment','save','id='+tid); url += "&content="+$.str.encode(content); url += "&_spam="+spam; //提交评论 var rs = json_ajax(url); if(rs.status == 'ok') { if(callback && callback != 'undefined') { eval("callback()"); } else { $.dialog.alert(lang.commentSuccess,function(){ $.phpok.reload(); },'succeed'); } } else { $.dialog.alert(rs.content,'','error'); return false; } } }; })(jQuery); /** * 购物车中涉及到的JS操作,此处使用jQuery封装 * @作者 qinggan * @版权 2015-2016 深圳市锟铻科技有限公司 * @网站 http://www.phpok.com * @版本 4.x * @授权 http://www.phpok.com/lgpl.html PHPOK开源授权协议:GNU Lesser General Public License * @日期 2016年09月01日 **/ ;(function($){ $.cart = { //添加到购物车中 //id为产品ID add: function(id,qty){ if(qty <1){ $.dialog.alert(p_lang('产品数量不能为空')); } var self = this; var url = this._addurl(id,qty); if(!url){ return false; } $.phpok.json(url,function(rs){ if(rs.status){ $.dialog.tips(p_lang('成功加入购物车')).lock().time(1); self.total(); return true; } $.dialog.alert(rs.info); return false; }); return false; }, /** * 自定义产品加入购物车 * @参数 title 产品名称 * @参数 price 价格 * @参数 qty 数量 * @参数 thumb 缩略图 **/ add2: function(title,price,qty,thumb){ if(qty <1){ $.dialog.alert(p_lang('产品数量不能为空')); } var url = this._addurl2(title,price,qty,thumb); if(!url){ return false; } var self = this; $.phpok.json(url,function(rs){ if(rs.status){ $.dialog.tips(p_lang('成功加入购物车')).lock().time(1); self.total(); return true; } $.dialog.alert(rs.info); return false; }); return false; }, /** * 自定义产品立即订购 * @参数 title 产品名称 * @参数 price 价格 * @参数 qty 数量 * @参数 thumb 缩略图 **/ onebuy2: function(title,price,qty,thumb){ var url = this._addurl2(title,price,qty,thumb); if(!url){ return false; } $.phpok.json(url+"&_clear=1",function(data){ if(data.status){ $.phpok.go(get_url('cart','checkout','id[]='+data.info)); return true; } $.dialog.alert(data.info); return false; }); return false; }, /** * 系统产品立即订购 * @参数 id 产品ID * @参数 qty 数量 **/ onebuy: function(id,qty){ var url = this._addurl(id,qty); if(!url){ return false; } $.phpok.json(url+"&_clear=1",function(data){ if(data.status){ $.phpok.go(get_url('cart','checkout','id[]='+data.info)); return true; } $.dialog.alert(data.info); return false; }); return false; }, _addurl2: function(title,price,qty,thumb){ if(!title || title == 'undefined'){ $.dialog.alert(p_lang('名称不能为空')); return false; } if(!price || price == 'undefined'){ $.dialog.alert(p_lang('价格不能为空')); return false; } if(!qty || qty == 'undefined'){ qty = 1; } qty = parseInt(qty,10); if(qty < 1){ qty = 1; } var url = api_url('cart','add','title='+$.str.encode(title)+"&price="+$.str.encode(price)+"&qty="+qty); if(thumb && thumb != 'undefined'){ url += "&thumb="+$.str.encode(thumb); } return url; }, _addurl:function(id,qty){ var url = api_url('cart','add','id='+id); if(qty && qty != 'undefined'){ url += "&qty="+qty; } //判断属性 if($("input[name=attr]").length>0){ var attr = new Array(); var showalert = false; $("input[name=attr]").each(function(i){ var val = $(this).val(); if(!val){ showalert = true; } attr.push(val); }); if(!attr || attr.length<1 || showalert){ $.dialog.alert(p_lang('请选择商品属性')); return false; } attr.sort(); url += "&ext="+attr.join(','); } //增加优惠方案 if($("select[data-name=apps]").length>0){ $("select[data-name=apps]").each(function(i){ var val = $(this).val(); var name = $(this).attr("data-id"); if(val && val != 'undefined' && name){ url += "&"+name+"_id="+val; } }); } return url; }, //取得选中的产品价格 price:function() { var ids = $.checkbox.join(); if(!ids){ $.dialog.alert(p_lang('请选择要进入结算的产品'),function(){ $("#total_price").text('--.--'); }); return true; } var url = api_url('cart','price','id='+$.str.encode(ids)); $.phpok.json(url,function(data){ if(data.status){ $("#total_price").html(data.info.price); return true; } $("#total_price").text('--.--'); $.dialog.alert(data.info); return false; }); }, //更新产品数量 //id为购物车自动生成的ID号(不是产品ID号,请注意) update: function(id,showtip) { var qty = $("#qty_"+id).val(); if(!qty || parseInt(qty) < 1){ $.dialog.alert("购物车产品数量不能为空"); return false; } var url = api_url('cart','qty')+"&id="+id+"&qty="+qty; if(showtip && showtip != 'undefined'){ var tip = $.dialog.tips(showtip); } $.phpok.json(url,function(rs){ if(showtip && showtip != 'undefined'){ tip.close(); } if(rs.status){ $.phpok.reload(); }else{ if(!rs.info) rs.info = '更新失败'; $.dialog.alert(rs.info); return false; } }); }, //计算购物车数量 //这里使用异步Ajax处理 total:function(func){ $.phpok.json(api_url('cart','total'),function(rs){ if(rs.status){ if(rs.info){ $(".head_cart_num").html(rs.info).show(); }else{ $(".head_cart_num").html('0').hide(); } if(func && func != 'undefined'){ (func)(rs); } } }); return false; }, //产品增加操作 //id为购物车里的ID,不是产品ID //qty,是要增加的数值, plus:function(id,num){ var qty = $("#qty_"+id).val(); if(!qty){ qty = 1; } if(!num || num == 'undefined'){ num = 1; } qty = parseInt(qty) + parseInt(num); $("#qty_"+id).val(qty); this.update(id); }, minus:function(id,num){ var qty = $("#qty_"+id).val(); if(!qty){ qty = 1; } if(qty<2){ $.dialog.alert('产品数量不能少于1'); return false; } if(!num || num == 'undefined'){ num = 1; } qty = parseInt(qty) - parseInt(num); $("#qty_"+id).val(qty); this.update(id); }, //删除产品信息 //id为购物车自动生成的ID号(不是产品ID号,请注意) del: function(id){ if(!id || id == 'undefined'){ var id = $.checkbox.join(); if(!id){ $.dialog.alert(p_lang('请选择要删除的产品')); return false; } var tmplist = id.split(','); var title = []; for(var i in tmplist){ var t = $("#title_"+tmplist[i]).text(); if(t){ title.push(t); } } var tip = p_lang('确定要删除产品
{title}
删除后不能恢复',title.join("
")); }else{ title = $("#title_"+id).text(); var tip = p_lang('确定要删除产品
{title}
删除后不能恢复',title); } $.dialog.confirm(tip,function(){ var url = api_url('cart','delete','id='+$.str.encode(id)); $.phpok.json(url,function(data){ if(data.status){ $.phpok.reload(); return true; } if(!data.info){ data.info = p_lang('删除失败'); } $.dialog.alert(data.info); return false; }); }); }, address:function(id) { if(!id || id == 'undefined' || id == '0'){ var title = p_lang('添加新地址'); var url = get_url('cart','address'); }else{ var title = p_lang('编辑地址')+"_#"+id; var url = get_url('cart','address','id='+id); } $.dialog.open(url,{ 'title':title, 'lock':true, 'width':'500px', 'height':'550px', 'ok':function(){ var iframe = this.iframe.contentWindow; if (!iframe.document.body) { alert('iframe还没加载完毕呢'); return false; }; iframe.save(); return false; }, 'okVal':'提交保存', 'cancel':true }) } }; })(jQuery); ;(function($) { $.browser = {}; $.browser.mozilla = false; $.browser.webkit = false; $.browser.opera = false; $.browser.msie = false; var nAgt = navigator.userAgent; $.browser.name = navigator.appName; $.browser.fullVersion = '' + parseFloat(navigator.appVersion); $.browser.majorVersion = parseInt(navigator.appVersion, 10); var nameOffset, verOffset, ix; // In Opera, the true version is after "Opera" or after "Version" if ((verOffset = nAgt.indexOf("Opera")) != -1) { $.browser.opera = true; $.browser.name = "Opera"; $.browser.fullVersion = nAgt.substring(verOffset + 6); if ((verOffset = nAgt.indexOf("Version")) != -1) $.browser.fullVersion = nAgt.substring(verOffset + 8); } // In MSIE, the true version is after "MSIE" in userAgent else if ((verOffset = nAgt.indexOf("MSIE")) != -1) { $.browser.msie = true; $.browser.name = "Microsoft Internet Explorer"; $.browser.fullVersion = nAgt.substring(verOffset + 5); } // In Chrome, the true version is after "Chrome" else if ((verOffset = nAgt.indexOf("Chrome")) != -1) { $.browser.webkit = true; $.browser.name = "Chrome"; $.browser.fullVersion = nAgt.substring(verOffset + 7); } // In Safari, the true version is after "Safari" or after "Version" else if ((verOffset = nAgt.indexOf("Safari")) != -1) { $.browser.webkit = true; $.browser.name = "Safari"; $.browser.fullVersion = nAgt.substring(verOffset + 7); if ((verOffset = nAgt.indexOf("Version")) != -1) $.browser.fullVersion = nAgt.substring(verOffset + 8); } // In Firefox, the true version is after "Firefox" else if ((verOffset = nAgt.indexOf("Firefox")) != -1) { $.browser.mozilla = true; $.browser.name = "Firefox"; $.browser.fullVersion = nAgt.substring(verOffset + 8); } // In most other browsers, "name/version" is at the end of userAgent else if ((nameOffset = nAgt.lastIndexOf(' ') + 1) < (verOffset = nAgt.lastIndexOf('/'))) { $.browser.name = nAgt.substring(nameOffset, verOffset); $.browser.fullVersion = nAgt.substring(verOffset + 1); if ($.browser.name.toLowerCase() == $.browser.name.toUpperCase()) { $.browser.name = navigator.appName; } } // trim the fullVersion string at semicolon/space if present if ((ix = $.browser.fullVersion.indexOf(";")) != -1) $.browser.fullVersion = $.browser.fullVersion.substring(0, ix); if ((ix = $.browser.fullVersion.indexOf(" ")) != -1) $.browser.fullVersion = $.browser.fullVersion.substring(0, ix); $.browser.majorVersion = parseInt('' + $.browser.fullVersion, 10); if (isNaN($.browser.majorVersion)) { $.browser.fullVersion = '' + parseFloat(navigator.appVersion); $.browser.majorVersion = parseInt(navigator.appVersion, 10); } $.browser.version = $.browser.majorVersion; })(jQuery); /** * 前台页面脚本_用于过滤敏感的,粗爆的字词,一行一个,用户提交表单数据时直接报错 * @作者 锟铻科技 * @版权 深圳市锟铻科技有限公司 * @主页 http://www.phpok.com * @版本 5.x * @许可 http://www.phpok.com/lgpl.html PHPOK开源授权协议:GNU Lesser General Public License * @时间 2019年09月04日 15时50分 **/ ;(function($){ $.phpok_app_dirtywords = { // } })(jQuery); /** * 前台页面脚本_管理全球国家及州/省信息 * @作者 phpok.com * @版权 深圳市锟铻科技有限公司 * @主页 http://www.phpok.com * @版本 5.x * @许可 http://www.phpok.com/lgpl.html PHPOK开源授权协议:GNU Lesser General Public License * @时间 2019年05月27日 19时51分 **/ ;(function($){ $.phpok_app_worlds = { // } })(jQuery);