PageSourceSearch

https://www.muslim-markt-forum.de/script27208.js

js muslim-markt-forum.de collected 2026-09-26 14:21:58 UTC 84,854 bytes, 2,061 lines download raw bytes

vendor: 3,481 bytes, lines 1-108
1/*
2* Date Format 1.2.3
3* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
4* MIT license
5*
6* Includes enhancements by Scott Trenda <scott.trenda.net>
7* and Kris Kowal <cixar.com/~kris.kowal/>
8*
9* Accepts a date, a mask, or a date and a mask.
10* Returns a formatted version of the given date.
11* The date defaults to the current date/time.
12* The mask defaults to dateFormat.masks.default.
13*/
14var dateFormat = function () {
15var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
16timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
17timezoneClip = /[^-+\dA-Z]/g,
18pad = function (val, len) {
19val = String(val);
20len = len || 2;
21while (val.length < len) val = "0" + val;
22return val;
23};
24// Regexes and supporting functions are cached through closure
25return function (date, mask, utc) {
26var dF = dateFormat;
27// You can't provide utc if you skip other args (use the "UTC:" mask prefix)
28if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) {
29mask = date;
30date = undefined;
31}
32// Passing date through Date applies Date.parse, if necessary
33date = date ? new Date(date) : new Date;
34if (isNaN(date)) throw SyntaxError("invalid date");
35mask = String(dF.masks[mask] || mask || dF.masks["default"]);
36// Allow setting the utc argument via the mask
37if (mask.slice(0, 4) == "UTC:") {
38mask = mask.slice(4);
39utc = true;
40}
41var _ = utc ? "getUTC" : "get",
42d = date[_ + "Date"](),
43D = date[_ + "Day"](),
44m = date[_ + "Month"](),
45y = date[_ + "FullYear"](),
46H = date[_ + "Hours"](),
47M = date[_ + "Minutes"](),
48s = date[_ + "Seconds"](),
49L = date[_ + "Milliseconds"](),
50o = utc ? 0 : date.getTimezoneOffset(),
51flags = {
52d: d,
53dd: pad(d),
54ddd: dF.i18n.dayNames[D],
55dddd: dF.i18n.dayNames[D + 7],
56m: m + 1,
57mm: pad(m + 1),
58mmm: dF.i18n.monthNames[m],
59mmmm: dF.i18n.monthNames[m + 12],
60yy: String(y).slice(2),
61yyyy: y,
62h: H % 12 || 12,
63hh: pad(H % 12 || 12),
64H: H,
65HH: pad(H),
66M: M,
67MM: pad(M),
68s: s,
69ss: pad(s),
70l: pad(L, 3),
71L: pad(L > 99 ? Math.round(L / 10) : L),
72t: H < 12 ? "a" : "p",
73tt: H < 12 ? "am" : "pm",
74T: H < 12 ? "A" : "P",
75TT: H < 12 ? "AM" : "PM",
76Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
77o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
78S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
79};
80return mask.replace(token, function ($0) {
81return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
82});
83};
84}();
85// Some common format strings
86dateFormat.masks = {
87"default": "ddd mmm dd yyyy HH:MM:ss",
88shortDate: "m/d/yy",
89mediumDate: "mmm d, yyyy",
90longDate: "mmmm d, yyyy",
91fullDate: "dddd, mmmm d, yyyy",
92shortTime: "h:MM TT",
93mediumTime: "h:MM:ss TT",
94longTime: "h:MM:ss TT Z",
95isoDate: "yyyy-mm-dd",
96isoTime: "HH:MM:ss",
97isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
98isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
99};
100// Internationalization strings
101dateFormat.i18n = {
102dayNames: [
103"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
104"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
105],
106monthNames: [
107"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
108"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
vendor: 4,756 bytes, lines 108-136
108November", "December"
109]
110};
111// For convenience...
112Date.prototype.format = function (mask, utc) {
113return dateFormat(this, mask, utc);
114};
115//add Xobor scpecific Masks
116dateFormat.masks.now1 = 'vor einer Minute';
117dateFormat.masks.now = 'vor %minutes Minuten';
118dateFormat.masks.today = '"Heute" HH:MM';
119dateFormat.masks.yesterday = '"Gestern" HH:MM';
120dateFormat.masks.norm = 'dd.mm.yyyy HH:MM';
121dateFormat.masks.never = '-';
122/*
123CryptoJS v3.1.2
124code.google.com/p/crypto-js
125(c) 2009-2013 by Jeff Mott. All rights reserved.
126code.google.com/p/crypto-js/wiki/License
127*/
128var CryptoJS=CryptoJS||function(a,m){var r={},f=r.lib={},g=function(){},l=f.Base={extend:function(a){g.prototype=this;var b=new g;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},
129p=f.WordArray=l.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=m?b:4*a.length},toString:function(a){return(a||q).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var j=0;j<a;j++)b[c+j>>>2]|=(d[j>>>2]>>>24-8*(j%4)&255)<<24-8*((c+j)%4);else if(65535<d.length)for(j=0;j<a;j+=4)b[c+j>>>2]=d[j>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var n=this.words,b=this.sigBytes;n[b>>>2]&=4294967295<<
13032-8*(b%4);n.length=a.ceil(b/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(n){for(var b=[],d=0;d<n;d+=4)b.push(4294967296*a.random()|0);return new p.init(b,n)}}),y=r.enc={},q=y.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c<a;c++){var j=b[c>>>2]>>>24-8*(c%4)&255;d.push((j>>>4).toString(16));d.push((j&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c<b;c+=2)d[c>>>3]|=parseInt(a.substr(c,
1312),16)<<24-4*(c%8);return new p.init(d,b/2)}},G=y.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c<a;c++)d.push(String.fromCharCode(b[c>>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c<b;c++)d[c>>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new p.init(d,b)}},fa=y.Utf8={stringify:function(a){try{return decodeURIComponent(escape(G.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return G.parse(unescape(encodeURIComponent(a)))}},
132h=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=fa.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(n){var b=this._data,d=b.words,c=b.sigBytes,j=this.blockSize,l=c/(4*j),l=n?a.ceil(l):a.max((l|0)-this._minBufferSize,0);n=l*j;c=a.min(4*n,c);if(n){for(var h=0;h<n;h+=j)this._doProcessBlock(d,h);h=d.splice(0,n);b.sigBytes-=c}return new p.init(h,c)},clone:function(){var a=l.clone.call(this);
133a._data=this._data.clone();return a},_minBufferSize:0});f.Hasher=h.extend({cfg:l.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){h.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,d){return(new a.init(d)).finalize(b)}},_createHmacHelper:function(a){return function(b,d){return(new ga.HMAC.init(a,
134d)).finalize(b)}}});var ga=r.algo={};return r}(Math);
135(function(a){var m=CryptoJS,r=m.lib,f=r.Base,g=r.WordArray,m=m.x64={};m.Word=f.extend({init:function(a,p){this.high=a;this.low=p}});m.WordArray=f.extend({init:function(l,p){l=this.words=l||[];this.sigBytes=p!=a?p:8*l.length},toX32:function(){for(var a=this.words,p=a.length,f=[],q=0;q<p;q++){var G=a[q];f.push(G.high);f.push(G.low)}return g.create(f,this.sigBytes)},clone:function(){for(var a=f.clone.call(this),p=a.words=this.words.slice(0),g=p.length,q=0;q<g;q++)p[q]=p[q].clone();return a}})})();
136(function(){function a(){return g.create.apply(g,arguments)}for(var m=CryptoJS,r=m.lib.Hasher,f=m.x64,g=f.Word,l=f.WordArray,f=m.algo,p=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),
vendor: 4,309 bytes, lines 137-151
137a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,
1382643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),
139a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,
1403409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],y=[],q=0;80>q;q++)y[q]=a();f=f.SHA512=r.extend({_doReset:function(){this._hash=new l.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,f){for(var h=this._hash.words,
141g=h[0],n=h[1],b=h[2],d=h[3],c=h[4],j=h[5],l=h[6],h=h[7],q=g.high,m=g.low,r=n.high,N=n.low,Z=b.high,O=b.low,$=d.high,P=d.low,aa=c.high,Q=c.low,ba=j.high,R=j.low,ca=l.high,S=l.low,da=h.high,T=h.low,v=q,s=m,H=r,E=N,I=Z,F=O,W=$,J=P,w=aa,t=Q,U=ba,K=R,V=ca,L=S,X=da,M=T,x=0;80>x;x++){var B=y[x];if(16>x)var u=B.high=a[f+2*x]|0,e=B.low=a[f+2*x+1]|0;else{var u=y[x-15],e=u.high,z=u.low,u=(e>>>1|z<<31)^(e>>>8|z<<24)^e>>>7,z=(z>>>1|e<<31)^(z>>>8|e<<24)^(z>>>7|e<<25),D=y[x-2],e=D.high,k=D.low,D=(e>>>19|k<<13)^
142(e<<3|k>>>29)^e>>>6,k=(k>>>19|e<<13)^(k<<3|e>>>29)^(k>>>6|e<<26),e=y[x-7],Y=e.high,C=y[x-16],A=C.high,C=C.low,e=z+e.low,u=u+Y+(e>>>0<z>>>0?1:0),e=e+k,u=u+D+(e>>>0<k>>>0?1:0),e=e+C,u=u+A+(e>>>0<C>>>0?1:0);B.high=u;B.low=e}var Y=w&U^~w&V,C=t&K^~t&L,B=v&H^v&I^H&I,ha=s&E^s&F^E&F,z=(v>>>28|s<<4)^(v<<30|s>>>2)^(v<<25|s>>>7),D=(s>>>28|v<<4)^(s<<30|v>>>2)^(s<<25|v>>>7),k=p[x],ia=k.high,ea=k.low,k=M+((t>>>14|w<<18)^(t>>>18|w<<14)^(t<<23|w>>>9)),A=X+((w>>>14|t<<18)^(w>>>18|t<<14)^(w<<23|t>>>9))+(k>>>0<M>>>
1430?1:0),k=k+C,A=A+Y+(k>>>0<C>>>0?1:0),k=k+ea,A=A+ia+(k>>>0<ea>>>0?1:0),k=k+e,A=A+u+(k>>>0<e>>>0?1:0),e=D+ha,B=z+B+(e>>>0<D>>>0?1:0),X=V,M=L,V=U,L=K,U=w,K=t,t=J+k|0,w=W+A+(t>>>0<J>>>0?1:0)|0,W=I,J=F,I=H,F=E,H=v,E=s,s=k+e|0,v=A+B+(s>>>0<k>>>0?1:0)|0}m=g.low=m+s;g.high=q+v+(m>>>0<s>>>0?1:0);N=n.low=N+E;n.high=r+H+(N>>>0<E>>>0?1:0);O=b.low=O+F;b.high=Z+I+(O>>>0<F>>>0?1:0);P=d.low=P+J;d.high=$+W+(P>>>0<J>>>0?1:0);Q=c.low=Q+t;c.high=aa+w+(Q>>>0<t>>>0?1:0);R=j.low=R+K;j.high=ba+U+(R>>>0<K>>>0?1:0);S=l.low=
144S+L;l.high=ca+V+(S>>>0<L>>>0?1:0);T=h.low=T+M;h.high=da+X+(T>>>0<M>>>0?1:0)},_doFinalize:function(){var a=this._data,f=a.words,h=8*this._nDataBytes,g=8*a.sigBytes;f[g>>>5]|=128<<24-g%32;f[(g+128>>>10<<5)+30]=Math.floor(h/4294967296);f[(g+128>>>10<<5)+31]=h;a.sigBytes=4*f.length;this._process();return this._hash.toX32()},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});m.SHA512=r._createHelper(f);m.HmacSHA512=r._createHmacHelper(f)})();
145/*
146CryptoJS v3.1.2
147code.google.com/p/crypto-js
148(c) 2009-2013 by Jeff Mott. All rights reserved.
149code.google.com/p/crypto-js/wiki/License
150*/
151var CryptoJS=CryptoJS||function(s,p){var m={},l=m.lib={},n=function(){},r=l.Base={extend:function(b){n.prototype=this;var h=new n;b&&h.mixIn(b);
151h.hasOwnProperty("init")||(h.init=function(){h.$super.init.apply(this,arguments)});h.init.prototype=h;h.$super=this;return h},create:function(){var b=this.extend();b.init.apply(b,arguments);return b},init:function(){},mixIn:function(b){for(var h in b)b.hasOwnProperty(h)&&(this[h]=b[h]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}},
152q=l.WordArray=r.extend({init:function(b,h){b=this.words=b||[];this.sigBytes=h!=p?h:4*b.length},toString:function(b){return(b||t).stringify(this)},concat:function(b){var h=this.words,a=b.words,j=this.sigBytes;b=b.sigBytes;this.clamp();if(j%4)for(var g=0;g<b;g++)h[j+g>>>2]|=(a[g>>>2]>>>24-8*(g%4)&255)<<24-8*((j+g)%4);else if(65535<a.length)for(g=0;g<b;g+=4)h[j+g>>>2]=a[g>>>2];else h.push.apply(h,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,h=this.sigBytes;b[h>>>2]&=4294967295<<
15332-8*(h%4);b.length=s.ceil(h/4)},clone:function(){var b=r.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var h=[],a=0;a<b;a+=4)h.push(4294967296*s.random()|0);return new q.init(h,b)}}),v=m.enc={},t=v.Hex={stringify:function(b){var a=b.words;b=b.sigBytes;for(var g=[],j=0;j<b;j++){var k=a[j>>>2]>>>24-8*(j%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j<a;j+=2)g[j>>>3]|=parseInt(b.substr(j,
1542),16)<<24-4*(j%8);return new q.init(g,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var g=[],j=0;j<b;j++)g.push(String.fromCharCode(a[j>>>2]>>>24-8*(j%4)&255));return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j<a;j++)g[j>>>2]|=(b.charCodeAt(j)&255)<<24-8*(j%4);return new q.init(g,a)}},u=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(g){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}},
155g=l.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=u.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,g=a.words,j=a.sigBytes,k=this.blockSize,m=j/(4*k),m=b?s.ceil(m):s.max((m|0)-this._minBufferSize,0);b=m*k;j=s.min(4*b,j);if(b){for(var l=0;l<b;l+=k)this._doProcessBlock(g,l);l=g.splice(0,b);a.sigBytes-=j}return new q.init(l,j)},clone:function(){var b=r.clone.call(this);
156b._data=this._data.clone();return b},_minBufferSize:0});l.Hasher=g.extend({cfg:r.extend(),init:function(b){this.cfg=this.cfg.extend(b);this.reset()},reset:function(){g.reset.call(this);this._doReset()},update:function(b){this._append(b);this._process();return this},finalize:function(b){b&&this._append(b);return this._doFinalize()},blockSize:16,_createHelper:function(b){return function(a,g){return(new b.init(g)).finalize(a)}},_createHmacHelper:function(b){return function(a,g){return(new k.HMAC.init(b,
157g)).finalize(a)}}});var k=m.algo={};return m}(Math);
158(function(s){function p(a,k,b,h,l,j,m){a=a+(k&b|~k&h)+l+m;return(a<<j|a>>>32-j)+k}function m(a,k,b,h,l,j,m){a=a+(k&h|b&~h)+l+m;return(a<<j|a>>>32-j)+k}function l(a,k,b,h,l,j,m){a=a+(k^b^h)+l+m;return(a<<j|a>>>32-j)+k}function n(a,k,b,h,l,j,m){a=a+(b^(k|~h))+l+m;return(a<<j|a>>>32-j)+k}for(var r=CryptoJS,q=r.lib,v=q.WordArray,t=q.Hasher,q=r.algo,a=[],u=0;64>u;u++)a[u]=4294967296*s.abs(s.sin(u+1))|0;q=q.MD5=t.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])},
159_doProcessBlock:function(g,k){for(var b=0;16>b;b++){var h=k+b,w=g[h];g[h]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var b=this._hash.words,h=g[k+0],w=g[k+1],j=g[k+2],q=g[k+3],r=g[k+4],s=g[k+5],t=g[k+6],u=g[k+7],v=g[k+8],x=g[k+9],y=g[k+10],z=g[k+11],A=g[k+12],B=g[k+13],C=g[k+14],D=g[k+15],c=b[0],d=b[1],e=b[2],f=b[3],c=p(c,d,e,f,h,7,a[0]),f=p(f,c,d,e,w,12,a[1]),e=p(e,f,c,d,j,17,a[2]),d=p(d,e,f,c,q,22,a[3]),c=p(c,d,e,f,r,7,a[4]),f=p(f,c,d,e,s,12,a[5]),e=p(e,f,c,d,t,17,a[6]),d=p(d,e,f,c,u,22,a[7]),
160c=p(c,d,e,f,v,7,a[8]),f=p(f,c,d,e,x,12,a[9]),e=p(e,f,c,d,y,17,a[10]),d=p(d,e,f,c,z,22,a[11]),c=p(c,d,e,f,A,7,a[12]),f=p(f,c,d,e,B,12,a[13]),e=p(e,f,c,d,C,17,a[14]),d=p(d,e,f,c,D,22,a[15]),c=m(c,d,e,f,w,5,a[16]),f=m(f,c,d,e,t,9,a[17]),e=m(e,f,c,d,z,14,a[18]),d=m(d,e,f,c,h,20,a[19]),c=m(c,d,e,f,s,5,a[20]),f=m(f,c,d,e,y,9,a[21]),e=m(e,f,c,d,D,14,a[22]),d=m(d,e,f,c,r,20,a[23]),c=m(c,d,e,f,x,5,a[24]),f=m(f,c,d,e,C,9,a[25]),e=m(e,f,c,d,q,14,a[26]),d=m(d,e,f,c,v,20,a[27]),c=m(c,d,e,f,B,5,a[28]),f=m(f,c,
161d,e,j,9,a[29]),e=m(e,f,c,d,u,14,a[30]),d=m(d,e,f,c,A,20,a[31]),c=l(c,d,e,f,s,4,a[32]),f=l(f,c,d,e,v,11,a[33]),e=l(e,f,c,d,z,16,a[34]),d=l(d,e,f,c,C,23,a[35]),c=l(c,d,e,f,w,4,a[36]),f=l(f,c,d,e,r,11,a[37]),e=l(e,f,c,d,u,16,a[38]),d=l(d,e,f,c,y,23,a[39]),c=l(c,d,e,f,B,4,a[40]),f=l(f,c,d,e,h,11,a[41]),e=l(e,f,c,d,q,16,a[42]),d=l(d,e,f,c,t,23,a[43]),c=l(c,d,e,f,x,4,a[44]),f=l(f,c,d,e,A,11,a[45]),e=l(e,f,c,d,D,16,a[46]),d=l(d,e,f,c,j,23,a[47]),c=n(c,d,e,f,h,6,a[48]),f=n(f,c,d,e,u,10,a[49]),e=n(e,f,c,d,
162C,15,a[50]),d=n(d,e,f,c,s,21,a[51]),c=n(c,d,e,f,A,6,a[52]),f=n(f,c,d,e,q,10,a[53]),e=n(e,f,c,d,y,15,a[54]),d=n(d,e,f,c,w,21,a[55]),c=n(c,d,e,f,v,6,a[56]
162),f=n(f,c,d,e,D,10,a[57]),e=n(e,f,c,d,t,15,a[58]),d=n(d,e,f,c,B,21,a[59]),c=n(c,d,e,f,r,6,a[60]),f=n(f,c,d,e,z,10,a[61]),e=n(e,f,c,d,j,15,a[62]),d=n(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,k=a.words,b=8*this._nDataBytes,h=8*a.sigBytes;k[h>>>5]|=128<<24-h%32;var l=s.floor(b/
1634294967296);k[(h+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;k[(h+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(k.length+1);this._process();a=this._hash;k=a.words;for(b=0;4>b;b++)h=k[b],k[b]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;return a},clone:function(){var a=t.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=t._createHelper(q);r.HmacMD5=t._createHmacHelper(q)})(Math);
164/*
165CryptoJS v3.1.2
166code.google.com/p/crypto-js
167(c) 2009-2013 by Jeff Mott. All rights reserved.
168code.google.com/p/crypto-js/wiki/License
169*/
170(function(){var h=CryptoJS,j=h.lib.WordArray;h.enc.Base64={stringify:function(b){var e=b.words,f=b.sigBytes,c=this._map;b.clamp();b=[];for(var a=0;a<f;a+=3)for(var d=(e[a>>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g<f;g++)b.push(c.charAt(d>>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d<
171e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
172var md5 = function(string) {
173var hash = CryptoJS.MD5(string);
174return hash.toString(CryptoJS.enc.Hex);
175}
176var SHA512 = function(string) {
177var hash = CryptoJS.SHA512(string);
178return hash.toString(CryptoJS.enc.Hex);
179}
180function exec_body_scripts(body_el) {
181// Finds and executes scripts in a newly added element's body.
182// Needed since innerHTML does not run scripts.
183//
184// Argument body_el is an element in the dom.
185function nodeName(elem, name) {
186return elem.nodeName && elem.nodeName.toUpperCase() ===
187name.toUpperCase();
188};
189function evalScript(elem) {
190var data = (elem.text || elem.textContent || elem.innerHTML || "" ),
191head = document.getElementsByTagName("head")[0] ||
192document.documentElement,
193script = document.createElement("script");
194script.type = "text/javascript";
195try {
196// doesn't work on ie...
197script.appendChild(document.createTextNode(data));
198} catch(e) {
199// IE has funky script nodes
200script.text = data;
201}
202head.insertBefore(script, head.firstChild);
203head.removeChild(script);
204};
205// main section of function
206var scripts = [],
207script,
208children_nodes = body_el.childNodes,
209child,
210i;
211for (i = 0; children_nodes[i]; i++) {
212child = children_nodes[i];
213if (nodeName(child, "script" ) &&
214(!child.type || child.type.toLowerCase() === "text/javascript")) {
215scripts.push(child);
216}
217}
218for (i = 0; scripts[i]; i++) {
219script = scripts[i];
220if (script.parentNode) {script.parentNode.removeChild(script);}
221evalScript(scripts[i]);
222}
223};
224/**
225*
226* Base64 encode / decode
227* http://www.webtoolkit.info/
228*
229**/
230var Base64 = {
231// private property
232_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
233// public method for encoding
234encode : function (input) {
235var output = "";
236var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
237var i = 0;
238input = Base64._utf8_encode(input);
239while (i < input.length) {
240chr1 = input.charCodeAt(i++);
241chr2 = input.charCodeAt(i++);
242chr3 = input.charCodeAt(i++);
243enc1 = chr1 >> 2;
244enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
245enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
246enc4 = chr3 & 63;
247if (isNaN(chr2)) {
248enc3 = enc4 = 64;
249} else if (isNaN(chr3)) {
250enc4 = 64;
251}
252output = output +
253this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
254this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
255}
256return output;
257},
258// public method for decoding
259decode : function (input) {
260var output = "";
261var chr1, chr2, chr3;
262var enc1, enc2, enc3, enc4;
263var i = 0;
264input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
265while (i < input.length) {
266enc1 = this._keyStr.indexOf(input.charAt(i++));
267enc2 = this._keyStr.indexOf(input.charAt(i++));
268enc3 = this._keyStr.indexOf(input.charAt(i++));
269enc4 = this._keyStr.indexOf(input.charAt(i++));
270chr1 = (enc1 << 2) | (enc2 >> 4);
271chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
272chr3 = ((enc3 & 3) << 6) | enc4;
273output = output + String.fromCharCode(chr1);
274if (enc3 != 64) {
275output = output + String.fromCharCode(chr2);
276}
277if (enc4 != 64) {
278output = output + String.fromCharCode(chr3);
279}
280}
281output = Base64._utf8_decode(output);
282return output;
283},
284// private method for UTF-8 encoding
285_utf8_encode : function (string) {
286string = string.replace(/\r\n/g,"\n");
287var utftext = "";
288for (var n = 0; n < string.length; n++) {
289var c = string.charCodeAt(n);
290if (c < 128) {
291utftext += String.fromCharCode(c);
292} else if((c > 127) && (c < 2048)) {
293utftext += String.fromCharCode((c >> 6) | 192);
294utftext += String.fromCharCode((c & 63) | 128);
295} else {
296utftext += String.fromCharCode((c >> 12) | 224);
297utftext += String.fromCharCode(((c >> 6) & 63) | 128);
298utftext += String.fromCharCode((c & 63) | 128);
299}
300}
301return utftext;
302},
303// private method for UTF-8 decoding
304_utf8_decode : function (utftext) {
305var string = "";
306var i = 0;
307var c = c1 = c2 = 0;
308while ( i < utftext.length ) {
309c = utftext.charCodeAt(i);
310if (c < 128) {
311string += String.fromCharCode(c);
312i++;
313} else if((c > 191) && (c < 224)) {
314c2 = utftext.charCodeAt(i+1);
315string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
316i += 2;
317} else {
318c2 = utftext.charCodeAt(i+1);
319c3 = utftext.charCodeAt(i+2);
320string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
321i += 3;
322}
323}
324return string;
325}
326}
327var reputation = new function() {
328var self = this;
329self.errorstrings = {
330guestsnotallowed : "Diese Funktion steht nur angemeldeten Besuchern zur Verfügung.",
331owncontent : "Eigene Inhalte können nicht bewertet werden" ,
332norights : "Sie haben nicht die nötigen Rechte für diese Aktion",
333alreadyvoted : "Sie haben diese Antwort bereits bewertet",
334generic : "Beim Bewerten der Antwort ist ein Fehler aufgetreten",
335},
336self.showerror = function(str){
337if(self.errorstrings[str]){
338alert(self.errorstrings[str]);
339}else{
340alert(str);
341}
342},
343self.increase = function(pid, tid) {
344if(!tid){alert('Fehler, keine topic id');}
345$.ajax({
346url: '/ajax/handler.php?method=reputation&action=increase',
347type: 'POST',
348data: {
349pid: pid,
350tid: tid
351},
352success: function(data) {
353if(data.done){
354window.location = window.location.pathname + "#msg"+pid;
355window.location.reload();
356}else{
357self.showerror(data.error);
358}
359}
360});
361};
362self.decrease = function(pid, tid) {
363if(!tid){alert('Fehler, keine topic id');}
364$.ajax({
365url: '/ajax/handler.php?method=reputation&action=decrease',
366type: 'POST',
367data: {
368pid: pid,
369tid: tid
370},
371success: function(data) {
372if(data.done){
373window.location = window.location.pathname + "#msg"+pid;
374window.location.reload();
375}else{
376self.showerror(data.error);
377}
378}
379});
380};
381self.markasanswer = function(pid, tid) {
382if(!tid){alert('Fehler, keine topic id');}
383$.ajax({
384url: '/ajax/handler.php?method=reputation&action=markanswer',
385type: 'POST',
386data: {
387pid: pid,
388tid: tid
389},
390success: function(data) {
391if(data.done){
392window.location = window.location.pathname + "#msg"+pid;
393window.location.reload();
394}else{
395self.showerror(data.error);
396}
397}
398});
399};
400self.remove = function(pid, tid) {
401if(!tid){alert('Fehler, keine topic id');}
402$.ajax({
403url: '/ajax/handler.php?method=reputation&action=removerating',
404type: 'POST',
405data: {
406pid: pid,
407tid: tid
408},
409success: function(data) {
410window.location = window.location.pathname + "#msg"+pid;
411window.location.reload();
412}
413});
414};
415self.unmarkanswer = function(pid, tid) {
416if(!tid){alert('Fehler, keine topic id');}
417$.ajax({
418url: '/ajax/handler.php?method=reputation&action=unmarkanswer',
419type: 'POST',
420data: {
421pid: pid,
422tid: tid
423},
424success: function(data) {
425if(data.done){
426window.location = window.location.pathname + "#msg"+pid;
427window.location.reload();
428}else{
429self.showerror(data.error);
430}
431}
432});
433};
434};
435if (!xobor) {
436var xobor = new function() {
437main = this;
438//self = this;
439};
440xobor['helper'] = {};
441xobor['log'] = null;
442}
443//Beispiel: xobor.log(1,"Pluginname","logstring"); param 1 = loglevel
444try {
445xobor.log = new function() {
446var self = this;
447var logStore = [];
448var showLive = (window.location.host.indexOf('miranus.eu') > -1 ? true : false);
449var css = {
450date: 'background-color: white; color: black; padding:3px;',
451fname: 'background-color: #3B3B3B; color: #00FF40; padding:3px;'
452};
453this.alertLevel = 0;
454this.currentargs = null;
455this.currentype = null;
456// Param 1 = LogLevel
457// - 0 = info
458// - 1 = warning
459// - 2 = danger
460// - 3 = critical
461// - 4 = dev only
462// Param 2 = function name
463// Param &#8734; = what you want :D
464this.add = function() {
465var cDate = new Date();
466if(this.currentype == null){
467var args = Array.prototype.slice.call(arguments, 0);
468var type = args.shift();
469var fname = args.shift();
470}else{
471var args = Array.prototype.slice.call(this.currentargs, 0);
472var type = this.currentype;
473var fname = args.shift();
474}
475logStore.push({
476time: cDate,
477type: type,
478fname: fname,
479args: args
480});
481var alertString = '';
482if ((self.alertLevel === 1 && args[0] === 3) || (self.alertLevel === 2 && args[0] === 3 || args[0] === 1)) {
483for (var i = 0; i < args.length; i++) {
484alertString += ' '+args[i];
485}
486}
487if (alertString !== '') {
488// try{alert(alertString);}catch(e){}
489}
490if (showLive) {
491var logtype = self.mapLogLevel(type);
492var cfname = "%c "+ fname
493console.log(logtype['text']+'%c '+self.logDateFormat(cDate)+ ' %c '+fname+' ', logtype['css'], css['date'], css['fname'], args);
494}
495this.currentargs = null;
496this.currentype = null;
497};
498this.info = function(){
499this.currentargs = arguments;
500this.currentype = 0;
501return this.add();},
502this.warning = function(){
503this.currentargs = arguments;
504this.currentype = 1;
505return this.add();},
506this.danger = function(){
507this.currentargs = arguments;
508this.currentype = 2;
509return this.add();},
510this.error= function(){
511this.currentargs = arguments;
512this.currentype = 2;
513return this.add();},
514this.critical = function(){
515this.currentargs = arguments;
516this.currentype = 3;
517return this.add();},
518this.dev = function(){
519this.currentargs = arguments;
520this.currentype = 4;
521return this.add();},
522this.mapLogLevel = function(loglevel) {
523var ret = [];
524switch(loglevel) {
525case 0:
526ret = {
527text:"%c[INFO]",
528css: "background-color:#00BFFF; color:black; padding:3px;"
529};
530break;
531case 1:
532ret = {
533text:"%c[WARNING]",
534css: "background-color:orange; color:black; padding:3px;"
535};
536break;
537case 2:
538ret = {
539text:"%c[DANGER]",
540css: "background-color:#FF8800; color:black; padding:3px;"
541};
542break;
543case 3:
544ret = {
545text:"%c[CRITICAL]",
546css: "background-color:red; color:white; padding:3px;"
547};
548break;
549case 4:
550ret = {
551text:"%c[DEVINFO]",
552css: "background-color:red; color:black; padding:3px;"
553};
554break;
555default:
556ret = {
557text:"%c[CRITICAL]",
558css: "background-color:#00BFFF; color:white; padding:3px;"
559};
560break;
561}
562return ret;
563};
564this.logDateFormat = function(date) {
565var day = date.getDate();
566var month = date.getMonth() + 1;
567var year = date.getFullYear();
568var hours = date.getHours();
569var minutes = date.getMinutes();
570var seconds = date.getSeconds();
571return day+'-'+month+'-'+year+' '+hours+':'+minutes+':'+seconds;
572};
573this.show = function() {
574showLive = true;
575for(var i = 0; i < logStore.length; i++) {
576var logtype = self.mapLogLevel(logStore[i]['type']);
577console.log(logtype['text']+'%c '+self.logDateFormat(logStore[i]['time'])+ ' %c '+logStore[i]['fname']+' ', logtype['css'], css['date'], css['fname'], logStore[i]['args']);
578}
579}
580};
581xobor.helper = $.extend(xobor.helper, {
582addSlashes: function(str){
583return (str + '')
584.replace(/[\\"']/g, '\\$&')
585.replace(/\u0000/g, '\\0');},
586ajax: function(options) {
587var critError = false;
588if (!(options instanceof Object)) {
589main.log.add(3, 'xobor.helper.ajax', 'options must be an object!', options);
590return false;
591}
592// simple checks
593if (typeof options['url'] === 'undefined') {
594critError = true;
595main.log.add(3, 'xobor.helper.ajax', 'url param was not defined!', options);
596}
597if (typeof options['method'] === 'undefined') {
598critError = true;
599main.log.add(3, 'xobor.helper.ajax', 'method param was not defined!', options);
600}
601if (critError) {
602return false;
603}
604$.ajax(options);
605},
606decodeHTML: function(html) {
607var temptxt = document.createElement("textarea");
608temptxt .innerHTML = html;
609return temptxt .value;
610},
611niceInfoTitle: new function() {
612var self = this;
613var log = [];
614this.showTimer = {};
615this.delay = 1000;
616this.rawMatches = null;
617this.logger = {
618add: function(text) {
619log.push([new Date(), text]);
620},
621get: function() {
622for (var i = 0; i < log.length; i++) {
623console.log(log[i][0], log[i][1]);
624}
625}
626};
627this.generateUniqueId = function(){
628return 'nt'+Math.round((Math.random() * (Math.random()*1000)) * (Math.random() * (Math.random()*1000)));
629};
630this.createNiceTitleBox = function(elem, content) {
631if (!elem.attr('data-niceTitleUid')) {
632elem.attr('data-niceTitleUid', self.generateUniqueId());
633if (content && content !== '' && elem) {
634// create a new divElem
635var divContainer = document.createElement('div');
636divContainer.className = 'niceTitleBox';
637divContainer.style.visibility = 'hidden';
638divContainer.style.position = 'absolute';
639divContainer.style.bottom = '100%';
640divContainer.style.left = '0px';
641divContainer.innerHTML = content;
642elem.prepend(divContainer);
643elem.mouseover(function(){
644var iuid = $(this).attr('data-niceTitleUid');
645if (typeof self.showTimer[iuid] === 'undefined') {
646self.showTimer[iuid] = setTimeout(function(){
647$(divContainer).css('visibility','visible');
648$(divContainer).css('opacity', '1');
649delete self.showTimer[iuid];
650}, self.delay);
651}
652});
653elem.mouseleave(function(){
654var iuid = $(this).attr('data-niceTitleUid');
655if (typeof self.showTimer[iuid] !== 'undefined') {
656clearTimeout(self.showTimer[iuid]);
657delete self.showTimer[iuid];
658}
659$(divContainer).css('visibility','hidden');
660$(divContainer).css('opacity', '0');
661});
662}
663}
664};
665this.run = function() {
666// scan for special tags "data-niceTitle" and loop through them
667self.rawMatches = $('*[data-niceTitle]').each(function(key, val){
668var dataAttr = $(this).attr('data-niceTitle');
669var content = null;
670// check first char
671switch(dataAttr.substr(0,1)) {
672case'.':
673case'#':
674// type: id or class
675if ($(dataAttr) && $(dataAttr).html() !== '') {
676main.log.add(0,'xobor.helper.niceInfoTitle.run','id or class '+dataAttr+' exists');
677content = $(dataAttr).html();
678} else {
679main.log.add(2, 'xobor.helper.niceInfoTitle.run', 'id or class "'+dataAttr+'" can not be found!');
680}
681break;
682default:
683// the rest
684content = dataAttr;
685break;
686}
687if (content) {
688self.logger.add('[INFO] content exists ... create titleBox');
689$(this).css('position', 'relative');
690self.createNiceTitleBox($(this), content);
691} else {
692main.log.add(1, 'xobor.helper.niceInfoTitle.run', 'no content exists ... do nothing!');
693}
694});
695};
696},
697autorun: function() {
698var self = this;
699$(document).ready(function(){
700main.helper.niceInfoTitle.run();
701});
702}
703});
704xobor.helper.autorun();
705var xoborUploadHelperAddon = {
706uploadv2: {
707config: {
708maxFileSize: 2097152,
709maxVideoSize: 150000000,
710allowedExtensions: ['.jpeg','.jpg','.gif','.png','.apk','.sxw','.pdf','.txt','.doc','.docx','.pptx','.ppsx','.pps','.xlsx','.odt','.sxc','.xls','.zip','.rar','.mp3','.vsd','.ppt','.xml','.mp4','.mov']
711},
712queue: [],
713doneQueue: [],
714returnResult: [],
715uploadUrl: location.href,
716progressCallback: function() {},
717successCallback: function() {},
718errorCallback: function() {},
719/**
720* @param {FileObject} file
721* @param {Object} postData - (example: {name: 'foo', val: 'bar'})
722*/
723addFile: function(file, postData) {
724main.helper.uploadv2.queue.push({
725file: file,
726postData: (typeof postData === 'undefined' ? null: postData)
727});
728},
729// ########### legacy-hack | start ##########
730'APC_UPLOAD_PROGRESS': null,
731'X-Progress-ID': null,
732existingUploads: null,
733updateProgressIds: function(textString) {
734if (typeof textString === 'undefined' || !textString || textString.trim() == '') {console.log('empty input'); return false;}
735var regex = /APC_UPLOAD_PROGRESS".*?value="([0-9a-z]+)"/gi;
736var result = regex.exec(textString);
737// something wen't wrong!
738if (typeof result === 'undefined' || !result || result.length !== 2) {
739try {
740main.helper.uploadv2.errorCallback(666,main.helper.uploadv2.doneQueue[main.helper.uploadv2.doneQueue.length - 1]['file']);
741} catch(e) {}
742return false;
743}
744var uploadProgress = result[1];
745main.helper.uploadv2['APC_UPLOAD_PROGRESS'] = uploadProgress;
746// var regexExistingFiles = new RegExp('<input\\stype="hidden"\\sname="\(t\.\*\?\)"\\svalue="\(\.\*\?\)"\\s\\/>', 'g');
747// var regexExistingFiles = new RegExp('<input\\stype="hidden"\\sname="\(t\.\*\?\)"\\svalue="\(\.\*\?\)"\(\(\\s\\/\)\|\(\)\)>', 'g');
748var regexExistingFiles = /<input.*?\sname="(((tempfiles)|(tempsize_x)|(tempsize_y))\[([0-9a-z\-\.]+)\])"\s((type="hidden"\s)|())value="(.*?)".*?>/gi
749var existingFilesResult = true;
750main.helper.uploadv2.existingUploads = {};
751while(existingFilesResult) {
752existingFilesResult = regexExistingFiles.exec(textString);
753if (existingFilesResult && existingFilesResult instanceof Array && existingFilesResult.length > 6) {
754var type = existingFilesResult[2];
755var tempFileName = existingFilesResult[6];
756var tempVal = existingFilesResult[10];
757if (typeof main.helper.uploadv2.existingUploads[tempFileName] === 'undefined') {
758main.helper.uploadv2.existingUploads[tempFileName] = {
759name: '',
760x: 0,
761y: 0
762};
763}
764switch(type) {
765case'tempfiles':
766main.helper.uploadv2.existingUploads[tempFileName]['name'] = tempVal;
767break;
768case'tempsize_x':
769main.helper.uploadv2.existingUploads[tempFileName]['x'] = tempVal;
770break;
771case'tempsize_y':
772main.helper.uploadv2.existingUploads[tempFileName]['y'] = tempVal;
773break;
774}
775}
776/*
777if (existingFilesResult instanceof Array && existingFilesResult.length > 2 && existingFilesResult[1].match(/tempfiles/i)) {
778main.helper.uploadv2.existingUploads.push({
779name: existingFilesResult[1],
780val: existingFilesResult[2]
781});
782}
783*/
784}
785var uuid = '';
786for (i = 0; i < 32; i++) { uuid += Math.floor(Math.random() * 16).toString(16); }
787main.helper.uploadv2['X-Progress-ID'] = uuid;
788main.helper.uploadv2.uploadUrl = main.helper.uploadv2.uploadUrl.replace(/X-Progress-ID=[0-9a-z]+/g, 'X-Progress-ID='+main.helper.uploadv2['X-Progress-ID']);
789},
790// ########### legacy-hack | end ############
791sendfile: function(file, postData) {
792var xhr = new XMLHttpRequest();
793var fd = new FormData();
794fd.append('uploadfile[]',file);
795if (typeof postData !== 'undefined' && postData instanceof Array && postData.length > 0) {
796for (var i = 0; i < postData.length; i++) {
797if (
798typeof postData[i]['name'] !== 'undefined' &&
799typeof postData[i]['val'] !== 'undefined'
800) {
801fd.append(postData[i]['name'],postData[i]['val']);
802}
803}
804}
805// ########### legacy-hack | start ##########
806if (main.helper.uploadv2.APC_UPLOAD_PROGRESS) {
807fd.append('APC_UPLOAD_PROGRESS',main.helper.uploadv2.APC_UPLOAD_PROGRESS);
808}
809if (main.helper.uploadv2['X-Progress-ID']) {
810fd.append('X-Progress-ID',main.helper.uploadv2['X-Progress-ID']);
811}
812if (main.helper.uploadv2['existingUploads'] instanceof Object) {
813var existingUploads = main.helper.uploadv2['existingUploads'];
814for (var key in existingUploads) {
815if (existingUploads.hasOwnProperty(key)) {
816fd.append('tempfiles['+key+']',existingUploads[key]['name']);
817fd.append('tempsize_x['+key+']',existingUploads[key]['x']);
818fd.append('tempsize_y['+key+']',existingUploads[key]['y']);
819}
820}
821}
822/*
823if (main.helper.uploadv2['existingUploads'] && main.helper.uploadv2['existingUploads'] instanceof Array) {
824for(var i = 0; i < main.helper.uploadv2['existingUploads'].length; i++) {
825var item = main.helper.uploadv2['existingUploads'][i];
826if (typeof item.name !== 'undefined' && typeof item.val !== 'undefined') {
827fd.append(item.name,item.val);
828}
829}
830}
831*/
832// ########### legacy-hack | end ############
833xhr.upload.addEventListener("progress", function(e) {
834var pc = parseInt(e.loaded / e.total * 100);
835if (typeof main.helper.uploadv2.progressCallback === 'function') {
836main.helper.uploadv2.progressCallback(pc,file);
837}
838}, false);
839xhr.onreadystatechange = function(a) {
840if (xhr.readyState == 4) {
841if (xhr.status == 200) {
842var response = null;
843try {response = JSON.parse(a.target.response);} catch(e) {response = a.target.response}
844main.helper.uploadv2.updateProgressIds(response) // legacy-Hack
845if (typeof main.helper.uploadv2.successCallback === 'function') {
846if (main.helper.uploadv2.queue.length === 0) {
847main.helper.uploadv2.returnResult.push(response);
848main.helper.uploadv2.successCallback(main.helper.uploadv2.returnResult);
849main.helper.uploadv2.returnResult = [];
850} else {
851main.helper.uploadv2.returnResult.push(response);
852main.helper.uploadv2.startUpload();
853}
854}
855} else {
856// http error
857main.helper.uploadv2.errorCallback(xhr.status,main.helper.uploadv2.doneQueue[main.helper.uploadv2.doneQueue.length - 1]['file']);
858}
859}
860};
861xhr.withCredentials = true;
862xhr.open("POST", main.helper.uploadv2.uploadUrl, true);
863xhr.send(fd);
864},
865startUpload: function() {
866if (main.helper.uploadv2.queue.length > 0) {
867var file = main.helper.uploadv2.queue.shift();
868var currFileExtension = '.'+file.file.name.split('.')[file.file.name.split('.').length - 1].toLowerCase();
869main.helper.uploadv2.doneQueue.push(file);
870var filesizeErr = false;
871var fileExtensionErr = true;
872// check file size
873var currentFileMax = main.helper.uploadv2.config.maxFileSize;
874if(currFileExtension == ".mp4" || currFileExtension == ".mov"){
875currentFileMax = main.helper.uploadv2.config.maxVideoSize;
876}
877if (typeof file.file.size === 'undefined' || file.file.size > currentFileMax ) {
878filesizeErr = true;
879}
880// check file extensions
881var allowedExtensions = main.helper.uploadv2.config.allowedExtensions;
882for (var i = 0; i < allowedExtensions.length; i++) {
883if (allowedExtensions[i].trim() === currFileExtension) {
884fileExtensionErr = false;
885break;
886}
887}
888if (!filesizeErr && !fileExtensionErr) {
889// everything is fine ... send file!
890main.helper.uploadv2.sendfile(file.file, file.postData);
891} else {
892if (filesizeErr) {
893// call errorCallback with code 100 (filesize per file)
894if (typeof main.helper.uploadv2.errorCallback === 'function') {
895main.helper.uploadv2.errorCallback(100,file.file);
896}
897} else if (fileExtensionErr) {
898// call errorCallback with code 150 (bad filetype)
899if (typeof main.helper.uploadv2.errorCallback === 'function') {
900main.helper.uploadv2.errorCallback(150,file.file);
901}
902}
903}
904if (main.helper.uploadv2.queue.length === 0 && typeof main.helper.uploadv2.successCallback === 'function') {
905main.helper.uploadv2.successCallback(main.helper.uploadv2.returnResult);
906}
907}
908}
909}
910}
911// add new uploadfunction to xobor-object
912for (var attrname in xoborUploadHelperAddon) { xobor.helper[attrname] = xoborUploadHelperAddon[attrname]; }
913} catch(e) {console.log('ERROR ', e);}
914var window_tabActive = true;
915window.onfocus = function() {window_tabActive = true;}
916window.onblur = function() {window_tabActive = false;}
917var desktopNotification = {
918config: {
919ttl: 60000,
920iconCover: 'https://img.homepagemodules.de/ds/static/iconset/basic/128/basic2-225_audio_news_megaphone.png',
921onlyOnBlur: true,
922linkNewWindow: false
923},
924activeNotifications: [],
925// nur bei "onclick" events!!!!!
926requestPermission: function(callbackfn) {
927if (typeof Notification !== 'undefined') {
928if (Notification.permission == 'default') {
929Notification.requestPermission(function(a){
930if (typeof callbackfn === 'function') {
931callbackfn(a);
932}
933return Notification.permission;
934});
935} else {
936return Notification.permission;
937}
938} else {
939return 'notificationUndefined';
940}
941},
942createNew: function(title, text, link) {
943var access = false;
944if (desktopNotification.config.onlyOnBlur) {
945if (!window_tabActive) {
946access = true;
947}
948} else {
949access = true;
950}
951if (access) {
952if (typeof Notification !== 'undefined') {
953if (Notification.permission == 'granted') {
954desktopNotification.activeNotifications.push(new Notification(title, {
955dir: "auto",
956lang: "",
957body: text,
958icon: desktopNotification.config.iconCover
959}));
960if (typeof link !== 'undefined') {
961desktopNotification.activeNotifications[desktopNotification.activeNotifications.length - 1].addEventListener('click', function() {
962if (desktopNotification.config.linkNewWindow) {
963window.open(link);
964} else {
965window.location = link;
966}
967});
968}
969// autoclose
970window.setTimeout(function(){
971if (typeof desktopNotification.activeNotifications[0] !== 'undefined') {
972desktopNotification.activeNotifications[0].close();
973desktopNotification.activeNotifications.splice(0,1);
974}
975},desktopNotification.config.ttl);
976} else {
977// notifications not granted!
978return 'noPermission';
979}
980} else {
981// ie su....
982return 'notificationUndefined';
983}
984}
985}
986};
987
988var _x = {
989getVars: {},
990strGET: document.location.search.substr(1,document.location.search.length),
991fillGetArray: function() {
992if(this.strGET!='' && Object.keys(this.getVars).length == 0){
993var gArr = this.strGET.split('&');
994for(i=0;i<gArr.length;++i){
995var v = '';
996var vArr = gArr[i].split('=');
997if(vArr.length>1){
998v=vArr[1];
999}
1000this.getVars[unescape(vArr[0])]=unescape(v);
1001}
1002}
1003},
1004GET: function(key) {
1005this.fillGetArray();
1006if(!this.getVars[key]){
1007return false;
1008} else {
1009return this.getVars[key];
1010}
1011}
1012};;
1013/* multiple onload events */
1014window.addOnloadEvent = function(addToOnload) {var oldOnload;if (window.onload) {oldOnload = window.onload;window.onload = function(){oldOnload();addToOnload();};} else {window.onload = addToOnload;}}
1015function hpm_toggle_ban_form(){
1016subject = document.getElementById('ban_subject');
1017mail = document.getElementById('ban_reason');
1018div = document.getElementById('ban_email_div');
1019check = document.getElementById('notifyUser');
1020if(mail.disabled == true){mail.disabled = false;subject.disabled = false;div.style.opacity='1';check.checked=true;}
1021else{mail.disabled = true;subject.disabled = true;div.style.opacity='0.5';check.checked=false;}
1022}
1023function hpm_spoiler(obj) {
1024/* Sicherstellen, dass wir die richtige Div öffnen... */
1025var testclass = ' ' + obj.className + ' ';
1026if(testclass.indexOf(' ' + "hpm_spoiler"+ ' ')==-1){
1027try{obj = $(obj).closest('.hpm_spoiler')[0];}catch(e){/*no jquery*/}}
1028var st = obj.getElementsByTagName('div')[2].style;
1029st.display = (st.display == 'none' || st.display == '') ? 'block' : 'none';
1030/*var stb = obj.getElementsByTagName('div')[0].style;
1031stb.borderWidth = (stb.borderWidth == '1px 1px 1px 1px' || stb.borderWidth == '') ? '1px 1px 0px 1px' : '1px 1px 1px 1px';*/
1032var sti = obj.getElementsByTagName('input')[0].getAttribute("class");
1033if(sti==null){
1034/*this means we are using the IE which doesn't know getAttribute("class")*/
1035sti = obj.getElementsByTagName('input')[0].getAttribute("className");
1036if(sti == 'hpm_spoiler_headinput hpm_spoiler_open') {obj.getElementsByTagName('input')[0].setAttribute("className", "hpm_spoiler_headinput hpm_spoiler_closed");};
1037if(sti == 'hpm_spoiler_headinput hpm_spoiler_closed') {obj.getElementsByTagName('input')[0].setAttribute("className", "hpm_spoiler_headinput hpm_spoiler_open");};
1038}
1039else{
1040if(sti == 'hpm_spoiler_headinput hpm_spoiler_open') {obj.getElementsByTagName('input')[0].setAttribute("class", "hpm_spoiler_headinput hpm_spoiler_closed");};
1041if(sti == 'hpm_spoiler_headinput hpm_spoiler_closed') {obj.getElementsByTagName('input')[0].setAttribute("class", "hpm_spoiler_headinput hpm_spoiler_open");};
1042}
1043}
1044var miranus_iconbar_textarea = new Array();
1045function miranus_add_iconbar_textarea(textid) {
1046miranus_iconbar_textarea.push(textid);
1047}
1048function togSub(element,link) {
1049try {
1050var timer;
1051var pagewidth = document.getElementById('pagewidth').offsetWidth;
1052var navheight = document.getElementById(element).offsetHeight;
1053var listleft = document.getElementById(element).offsetLeft;
1054var allEl = document.getElementById(element).getElementsByTagName("ul");
1055var el = document.getElementById(element);
1056if (allEl.length > 0)
1057{
1058var actEl = allEl[0];
1059if(actEl.className=='nav_open')
1060{ actEl.className='nav_close'; el.onclick = "window.location='"+link+"'; return false;"; }
1061else
1062{ actEl.className='nav_open';
1063el.onclick = "";
1064var actElWidth = actEl.offsetWidth;
1065var topstring = parseInt(navheight)+'px';
1066actEl.style.top = topstring;
1067actEl.style.zIndex = '99999';
1068if (listleft + actElWidth >= pagewidth)
1069{ actEl.style.right = '-1px'; }
1070else
1071{ actEl.style.left = '-1px';}
1072}
1073}
1074}
1075catch(err) {}
1076}
1077function insertVideoTag(){
1078let prompttext = `Geben Sie die Url für das Video an. z.B`;
1079vid = prompt(prompttext + '\nMyVideo:\n\"http://www.myvideo.de/watch/6446450/Ball_Platzer_lol\" \n oder Youtube\n\"https://www.youtube.com/watch?v=-3hWIplHVeE\"', "http://www.");
1080return returnTag('[Video]'+vid+'[/Video]');}
1081function miranus_current_iconbar_textarea() {
1082for(var i=0; i < miranus_iconbar_textarea.length; i++) {
1083if(document.getElementById(miranus_iconbar_textarea[i])) {
1084return document.getElementById(miranus_iconbar_textarea[i]);
1085}
1086}
1087return false;
1088}
1089function returnTag(inTag) {
1090insert(inTag,'');
1091}
1092function insert(aTag, eTag) {
1093var input = miranus_current_iconbar_textarea();
1094if(input==false) {
1095alert('No Textarea defined. Use this Javascript: miranus_add_iconbar_textarea(\'textarea_id\'); ');
1096return false;
1097}
1098var scrollTop = input.scrollTop;
1099var scrollLeft = input.scrollLeft;
1100input.focus();
1101if(typeof document.selection != 'undefined') {
1102var range = document.selection.createRange();
1103var insText = range.text;
1104range.text = aTag + insText + eTag;
1105range = document.selection.createRange();
1106if (insText.length == 0) {
1107range.move('character', -eTag.length);
1108} else {
1109range.moveStart('character', aTag.length + insText.length + eTag.length);
1110}
1111range.select();
1112} else if(typeof input.selectionStart != 'undefined') {
1113var start = input.selectionStart;
1114var end = input.selectionEnd;
1115var insText = input.value.substring(start, end);
1116input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end);
1117var pos;
1118if (insText.length == 0) {
1119pos = start + aTag.length;
1120} else {
1121pos = start + aTag.length + insText.length + eTag.length;
1122}
1123input.selectionStart = pos;
1124input.selectionEnd = pos;
1125} else {
1126input.value = input.value + aTag + eTag;
1127input.focus();
1128}
1129input.scrollTop = scrollTop;
1130input.scrollLeft = scrollLeft;
1131}
1132var hpm_loaded_js = new Array();
1133function miranus_load_js(jsuri, infooter) { /* Dynamisch weitere Javascript-Dateien zur Laufzeit nachladen */
1134if(!hpm_loaded_js[jsuri]) {
1135if(infooter) {
1136var appendto = document.getElementsByTagName("body")[0];
1137} else {
1138var appendto = document.getElementsByTagName("head")[0];
1139}
1140script = document.createElement('script');
1141script.type = 'text/javascript';
1142script.src = jsuri;
1143appendto.appendChild(script);
1144//alert(jsuri + ' wird jetzt geladen');
1145}
1146hpm_loaded_js[jsuri] = true;
1147return true;
1148}
1149function miranus_add_js(node,m_name) { /* Dynamisch Javascript zu einem Node hinzufügen */
1150var nodeid = node.getAttribute('id');
1151if( typeof nodeid != "string" || nodeid=="" ) {
1152nodeid = parseInt(Math.random()*10000);
1153node.setAttribute('id',nodeid);
1154}
1155//alert('node: ' + nodeid + ' mit funktion ' + m_name);
1156if(m_name=='search_username') {
1157if(miranus_load_js('/script_user.js')) {
1158setTimeout('miranus_add_js_search_username(\'' + nodeid + '\')', 100)
1159}
1160}
1161else return false;
1162}
1163function hpm_newDialog(url,width,height, formName){
1164if(width.indexOf('px')==-1 && width.indexOf('%')==-1){width= width+'px';}
1165hpm_dialogwidth = width;
1166return hpm_openDialog(url, formName);
1167}
1168function hpm_handleResponse() { /** Ajax Dialog anzeigen **/
1169if(hpm_request.readyState == 4){
1170/** disable page scrolling **/
1171if(document.documentElement && document.documentElement.scrollTop){
1172var oTop = document.documentElement.scrollTop;
1173document.documentElement.scroll = "no";
1174document.documentElement.style.overflow = "hidden";
1175document.documentElement.scrollTop = oTop;
1176}
1177else if(document.body){
1178var oTop = document.body.scrollTop;
1179document.body.scroll = "no";
1180document.body.style.overflow = "hidden";
1181document.body.scrollTop = oTop;
1182}
1183/** Get & Show Response **/
1184var response = hpm_request.responseText;
1185var hpm_dialogDiv = document.createElement("div");
1186hpm_dialogDiv.setAttribute('id','hpm_dialog_div');
1187document.body.appendChild(hpm_dialogDiv);
1188window.scrollTo(0, 0)
1189hpm_dialogDiv.innerHTML = response;
1190if((""+hpm_dialogwidth).indexOf('%') != -1){if(parseInt(hpm_dialogwidth) > 60){hpm_dialogwidth='60%';}}
1191document.getElementById('hpm_pagebody').style.width= hpm_dialogwidth;
1192if (navigator.appName != 'Microsoft Internet Explorer' && navigator.appName != 'Netscape') {
1193document.getElementById('hpm_pagebody').style.maxHeight= getHeightMargin()+"px";
1194} else{
1195document.getElementById('hpm_pagebody').style.height= "auto";
1196}
1197document.getElementById('hpm_pagebody').style.overflow= "auto";
1198exec_body_scripts(document.getElementById('hpm_pagebody'));
1199/* If Trigger some javascript - no active javascript in ajax-dialog */
1200if(document.getElementById('miranus_loadGMapScript')) {
1201setTimeout("miranus_loadGMapScript(document.getElementById('miranus_loadGMapScript').value, document.getElementById('miranus_loadGMapScript_api').value, document.getElementById('miranus_loadGMapScript_startX').value, document.getElementById('miranus_loadGMapScript_startY').value, parseInt(document.getElementById('miranus_loadGMapScript_startZoom').value) )",100);
1202}
1203}
1204}
1205function hpm_openDialog(url, formName) { /* Laden von url innerhalb eines Ajax Dialogs */
1206var params = '';
1207if(formName && document.forms[formName].elements) {
1208var formdata = miranus_getFormFields(formName);
1209params = '&' + miranus_js2post(formdata);
1210}
1211var params = 'openDialogRequest=true&last_location= ' + encodeURIComponent(location.href) + '&next_location=' + encodeURIComponent(url) + params;
1212hpm_closeDialog();
1213hpm_request.open('POST', url);
1214hpm_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
1215hpm_request.setRequestHeader("Content-length", params.length);
1216hpm_request.setRequestHeader("Connection", "close");
1217hpm_request.onreadystatechange = hpm_handleResponse;
1218hpm_request.send(params);
1219if(navigator.appName == "Microsoft Internet Explorer"){
1220event.returnValue = false
1221}
1222return false;
1223}
1224function hpm_closeDialog() {
1225if(document.getElementById('hpm_dialog_div')) {
1226document.body.removeChild(document.getElementById('hpm_dialog_div'));
1227}
1228/** Enable scrolling **/
1229if(document.documentElement) { /* && document.documentElement.scrollTop){ */
1230document.documentElement.scroll = "";
1231document.documentElement.style.overflow = "";
1232}
1233if(document.body){
1234document.body.scroll = "";
1235document.body.style.overflow = "";
1236}
1237}
1238//new progress function
1239function checkNginxProgress(uuid){
1240var bar = $('#progressbar');
1241var percent = $('#upload_percent');
1242url = "/progress" + "?X-Progress-ID=" + uuid;
1243success = function(upload) {
1244upload = eval(upload);
1245switch(upload.state){
1246case "starting":
1247setTimeout("checkNginxProgress('"+uuid+"')",600); break;
1248case "done":
1249break;
1250case "error":
1251break;
1252case "uploading":
1253upload.percents = Math.floor((upload.received / upload.size)*1000)/10;
1254bar.css({width: upload.percents+'%'});
1255if(percent){percent.html("("+upload.percents+"%)");}
1256setTimeout("checkNginxProgress('"+uuid+"')",600);
1257break;
1258default: setTimeout("checkNginxProgress('"+uuid+"')",1000);
1259}
1260}
1261$.get(url,success);
1262}
1263var callback_flag = false;
1264var callback_function = '';
1265var hpm_upload_progress_link = '';
1266var hpm_upload_progress_show_elem = '';
1267var hpm_upload_http;
1268function hpm_upload_start_progress(progress_link, show_elem,callback) {
1269/* alert('init progress'); */
1270try{if(show_gallery){gallery_flag = true;}}catch(e){}
1271try{if(callback){callback_flag = true;callback_function=callback;}}catch(e){}
1272hpm_upload_progress_link = progress_link;
1273hpm_upload_progress_show_elem = show_elem;
1274hpm_upload_refresh_progress();
1275}
1276function hpm_upload_refresh_progress() {
1277/* gpm_request = null; */
1278/* hpm_request = hpm_createHttpRequestObject(); */
1279hpm_request.open('get', hpm_upload_progress_link);
1280hpm_request.onreadystatechange = hpm_upload_handle_progress_response;
1281hpm_request.send(null);
1282/* alert('request send: ' + hpm_upload_progress_link); */
1283}
1284function hpm_upload_handle_progress_response() {
1285if(hpm_request==null) {
1286alert('hpm_request = null');
1287return;
1288}
1289if(hpm_request.readyState == 4) {
1290var response = hpm_request.responseText;
1291if(response.length>0) {
1292upload = eval(response);
1293switch(upload.state){
1294case "starting":
1295window.setTimeout("hpm_upload_refresh_progress()",600);
1296case "done":
1297break;
1298case "error":
1299break;
1300case "uploading":
1301var bar = document.getElementById('progressbar');
1302var percent = document.getElementById('upload_percent');
1303upload.percents = Math.floor((upload.received / upload.size)*1000)/10;
1304bar.style.width = upload.percents+'%';
1305if(percent){percent.innerHTML = "("+upload.percents+"%)";}
1306window.setTimeout("hpm_upload_refresh_progress()",600);
1307break;
1308default: break;
1309}
1310/*
1311if(response.length>0) {
1312var resp = eval('(' + response + ')');
1313var current = parseInt(resp['current']/1024) ;
1314var total = parseInt(resp['total']/1024);
1315var cur_percent = 100 * current / total;
1316if(total>0 && current>0) {
1317if(callback_flag){eval(callback_function+'('+cur_percent+');');}
1318else{document.getElementById(hpm_upload_progress_show_elem).innerHTML = '<img src="http://www.homepagemodules.de/img/blackline.gif" height=10 width="' + cur_percent + '" style="border:1px solid;padding-right:' + (100 - cur_percent) + 'px"><br>Status: ' + current + ' von ' + total + ' KByte hochgeladen';}
1319}
1320if(total>20480){ document.getElementById(hpm_upload_progress_show_elem).innerHTML = document.getElementById(hpm_upload_progress_show_elem).innerHTML + '<br><br><br><b>Achtung:</b> Sie haben zu viele oder zu große Bilder ausgewählt.<br>Dies wird dazu führen, dass der Upload-Vorgang nicht ordnungsgemäß abgeschlossen werden kann.
1320<br><br><a onClick="history.back()" href="javascript:void(0)">Upload neu starten</a>';}
1321}
1322window.setTimeout("hpm_upload_refresh_progress()",600);*/
1323}else{window.setTimeout("hpm_upload_refresh_progress()",600);}
1324}
1325}
1326function getHeightMargin(){
1327if(window.innerHeight){
1328h = window.innerHeight;
1329b = (h - (h*0.2))
1330}
1331else if(document.body || navigator.appName == 'Microsoft Internet Explorer'){
1332h = document.body.clientHeight
1333b = (h -(h*0.3))
1334}
1335else {
1336h = document.documentElement.clientHeight;
1337b = (h - (h*0.2))
1338}
1339return parseInt(b);
1340}
1341function miranus_getFormFields(formName) {
1342/* Alle Formularfelder im Formular formName in ein Javascript Array holen */
1343var val = new Array();
1344var el = document.forms[formName].elements;
1345for(i=0;i<el.length;i++){
1346//checkbox,radiobox
1347if(el[i].type=="checkbox" || el[i].type=="radio"){
1348if(el[i].checked) val.push(new Array(el[i].name, el[i].value));
1349} else if(el[i].type=="text" && el[i].value!=""){
1350val.push(new Array(el[i].name, el[i].value));
1351} else if(el[i].type=="hidden" && el[i].value!=""){
1352val.push(new Array(el[i].name, el[i].value));
1353}//Sollte es weitere input typen geben, weiter mit else if
1354else {
1355// alert(el[i].name + "-Typ:" + el[i].type + " @ " + el[i].value + "\r\n");
1356}
1357}
1358return val;
1359}
1360function miranus_js2post(obj) {
1361var post_str = [];
1362if (typeof(obj) == 'array' || typeof(obj) == 'object') {
1363for (var n in obj) {
1364if(typeof(n) == 'array' || typeof(obj) == 'object') {
1365post_str.push(obj[n][0] + '=' + encodeURI(obj[n][1]));
1366// alert('new ' + obj[n][0] + ' equal ' + obj[n][1]);
1367}
1368}
1369}
1370return post_str.join('&');
1371}
1372/* OLD & bad
1373function miranus_js2post(obj,path,new_path) {
1374if (typeof(path) == 'undefined') var path=[];
1375if (typeof(new_path) != 'undefined') path.push(new_path);
1376var post_str = [];
1377if (typeof(obj) == 'array' || typeof(obj) == 'object') {
1378for (var n in obj) {
1379post_str.push(miranus_js2post(obj[n],path,n));
1380}
1381}
1382else if (typeof(obj) != 'function') {
1383var base = path.shift();
1384post_str.push(base + (path.length > 0 ? '[' + path.join('][') + ']' : '') + '=' + encodeURI(obj));
1385path.unshift(base);
1386}
1387path.pop();
1388return post_str.join('&');
1389}
1390*/
1391function hpm_createHttpRequestObject() {
1392var ro;
1393var browser = navigator.appName;
1394if(browser == "Microsoft Internet Explorer"){
1395ro = new ActiveXObject("Microsoft.XMLHTTP");
1396}else{
1397ro = new XMLHttpRequest();
1398}
1399return ro;
1400}
1401var hpm_request = hpm_createHttpRequestObject();
1402var hpm_dialogwidth = 800;
1403//var hpm_dialogheight = getHeightMargin();
1404function miranus_delete_integration(i_id,target_id,confirmed){
1405miranus_load_js('/js/jquery.js');
1406var jq_loaded = false;
1407if(!confirmed){ var ich_will = window.confirm("Wollen Sie diese Verlinkung wirklich loeschen?");}
1408try{$('test'); jq_loaded=true;}catch(e){setTimeout("miranus_delete_integration('"+i_id+"','"+target_id+"',true)",200)}
1409if((ich_will || confirmed) && jq_loaded) {
1410if(i_id > 0){
1411if(typeof(target_id) == 'undefined') {
1412var target_id = false;
1413}
1414$.ajax({
1415type: "POST",
1416url: '../integration_select.php',
1417data: {del:true,target_id:target_id,i_id:i_id},
1418success: function(result){
1419window.location.reload();
1420}
1421});
1422}
1423else {
1424alert('Cannot delete the Element with '+i_id);
1425}
1426}
1427}
1428function miranus_confirm_tag(name,redirect){
1429var c = window.confirm(name+" an dieser Stelle verlinken ?");
1430if(c){
1431document.UserForm.submit();
1432}
1433else {
1434document.UserForm.onsubmit() = false;
1435}
1436}
1437function chkName(name){
1438if(name==""){
1439$("#UserError").html("Bitte Name eingeben");
1440return false;
1441}
1442else {
1443$.ajax({
1444type:"POST",
1445url: "../listUser.php",
1446data: {chkUser:true,uname:name},
1447success: function(resp){
1448var user = eval('(' + resp + ')');
1449if(user['userid']>0){
1450return true;
1451erg = true;
1452//window.location.reload();
1453}
1454else {
1455$("#UserError").html("Name "+name+" nicht gefunden");
1456return false;
1457}
1458}
1459});
1460}
1461}
1462function showDivById(id){
1463document.getElementById(id).style.display='block';
1464}
1465function hideDivById(id){
1466document.getElementById(id).style.display='none';
1467}
1468function ValideEmail(email){
1469var re = /\S+@\S+\.\S+/;
1470return re.test(email);
1471}
1472function conf_ban(){
1473var ok = window.confirm("Dieses Mitglied wirklich sperren?");
1474return ok;
1475}
1476function FitToContent(id, maxHeight)
1477{
1478var text = id && id.style ? id : document.getElementById(id);
1479if ( !text )
1480return;
1481var adjustedHeight = text.clientHeight;
1482if ( !maxHeight || maxHeight > adjustedHeight )
1483{
1484adjustedHeight = Math.max(text.scrollHeight, adjustedHeight);
1485if ( maxHeight )
1486adjustedHeight = Math.min(maxHeight, adjustedHeight);
1487if ( adjustedHeight > text.clientHeight )
1488text.style.height = adjustedHeight + "px";
1489}
1490}
1491function xSetCookie(name,val,days){
1492var mydate = new Date();
1493d = days ? days : 3;
1494mydate.setTime(mydate.getTime()+(d*24*60*60*1000));
1495var expires = "; expires="+mydate.toGMTString();
1496document.cookie = name+"="+val+expires+"; path=/";
1497}
1498function xGetCookie(name) {
1499var nameEQ = name + "=";
1500var ca = document.cookie.split(';');
1501for(var i=0;i < ca.length;i++) {
1502var c = ca[i];
1503while (c.charAt(0)==' ') c = c.substring(1,c.length);
1504if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
1505}
1506return null;
1507}
1508var rating_request,activity_request,warning_request;
1509/*Rating Functions*/
1510var ratingHandler = "/ajax/ratings_api.php";
1511var already_rated = "Sie haben diesen Inhalt bereits bewertet";
1512var current_xrating_id = 0;
1513function xRatingAction(id,what){
1514var r_type, c_type,c_id,re,xor_id;
1515var action = what ? what : 'giveRating';
1516r_type = document.getElementById(id+'_rtype').innerHTML;
1517c_type = document.getElementById(id+'_ctype').innerHTML;
1518c_id = document.getElementById(id+'_cid').innerHTML;
1519i_id = document.getElementById(id+'_iid').innerHTML;
1520current_xrating_id = id;
1521$('#'+current_xrating_id + "_div").closest('.xratings').css('opacity','0.6');
1522re = 1;
1523try{xor_id = document.getElementById(id+'_xor_id').innerHTML;}catch(e){/*no xor*/ xor_id = 0;}
1524var param_string = "action="+action+"&r_type="+r_type+"&c_type="+c_type+"&c_id="+c_id+"&re="+re+"&i_id="+i_id+"&xor_id="+xor_id;
1525rating_request = hpm_createHttpRequestObject();
1526rating_request.open("POST",ratingHandler,true);
1527rating_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
1528rating_request.setRequestHeader("Content-length", param_string.length);
1529rating_request.setRequestHeader("Connection", "close");
1530rating_request.onreadystatechange=ratingdone;
1531rating_request.send(param_string);
1532}
1533function ratingdone(){
1534if(rating_request.readyState == 4){
1535$('#'+current_xrating_id + "_div").closest('.xratings').css('opacity','1');
1536try{rdata=JSON.parse(rating_request.responseText);}
1537catch(e){try{console.log("Error: "+ e + " Response was:"+ rating_request.responseText)}catch(e){}}
1538if(rdata.success){if(rdata.html) { $('#'+current_xrating_id + "_div").closest('.xratings').html(decodeHtml(rdata.html)); } else{location.reload();}}
1539else{if(rdata.errormsg){if(rdata.errormsg == 'own content'){alert('Sie können ihre eigenen Inhalte nicht bewerten')} else{ alert(rdata.errormsg)}}}
1540}
1541}
1542function xGetActivities(aid){
1543try{document.getElementById('xActivityFeed').getAttribute('id');}catch(e){/*Feed not active*/ return true;}
1544var method = 'getActivities';
1545var last_id = aid ? aid : document.getElementById('xActivityFeed').children[0].getAttribute('id');
1546if(last_id===null || last_id==='feedaddonli'){last_id = document.getElementById('xActivityFeed').children[1].getAttribute('id');}
1547var param_string = "method="+method+"&last_id="+last_id;
1548activity_request = hpm_createHttpRequestObject();
1549activity_request.open("POST","ajax/handler.php",true);
1550activity_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
1551activity_request.setRequestHeader("Content-length", param_string.length);
1552activity_request.setRequestHeader("Connection", "close");
1553activity_request.onreadystatechange=activityHandler;
1554activity_request.send(param_string);
1555}
1556var ban_request;
1557function xUnbanUser(id){xBanUser(id,true);}
1558function xBanUser(id,unban){
1559var method = unban ? 'unbanUser' : 'banUser';
1560var param_string = "method="+method+"&userid="+id;
1561ban_request = hpm_createHttpRequestObject();
1562ban_request.open("POST","./ajax/handler.php",true);
1563ban_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
1564ban_request.setRequestHeader("Content-length", param_string.length);
1565ban_request.setRequestHeader("Connection", "close");
1566ban_request.onreadystatechange=banHandler;
1567ban_request.send(param_string);
1568}
1569function banHandler(){
1570if(ban_request.readyState == 4){
1571try{
1572rdata=JSON.parse(ban_request.responseText);
1573if(rdata.done){location.reload();}
1574else{
1575if(rdata.error=="nomodadmin"){alert("Moderatoren und Administratoren können nicht geblockt werden.");}
1576else if(rdata.error=="reggedonly"){alert("{[error_noregged]}");}
1577else if(rdata.error=="notfound"){alert("Benutzer nicht gefunden");}
1578else if(rdata.error){alert(rdata.error);}
1579else{alert("{[error_ban_generic]}")}
1580}
1581}catch(e){}}
1582}
1583function activityHandler(){
1584if(activity_request.readyState == 4){
1585try{rdata=JSON.parse(activity_request.responseText);
1586new_actions = rdata.actions ? rdata.actions : "";
1587feed = document.getElementById('xActivityFeed');
1588feed.innerHTML = new_actions + feed.innerHTML;}
1589catch(e){try{console.log("Error: "+ e + " Response was:"+ activity_request.responseText)}catch(e){}}
1590}
1591}
1592function updateFeedTime(cancel){
1593try{
1594feed = document.getElementById('xActivityFeed');
1595spans = feed.getElementsByTagName('span');
1596maxcount = (spans.length > 40) ? 40 : spans.length;
1597for(var i =0; i< maxcount;i++){
1598curspan = spans[i];
1599if(curspan.getAttribute('class') == 'cur_ts'){
1600curtime = curspan.innerHTML;
1601new_time = xDateFormat(curtime);
1602curspan.previousSibling.innerHTML = new_time;
1603}
1604}
1605if(!cancel){setTimeout("updateFeedTime()",60*1000);}
1606}
1607catch(e){}
1608}
1609function xDateFormat(t){
1610cur = t ? t : 0;
1611if((cur+"").length<13){cur = cur * 1000};
1612off = timezone_user_offset ? timezone_user_offset : 0;
1613now = new Date();
1614if (typeof time_diff_to_server === 'undefined') {
1615var time_diff_to_server = false;
1616}
1617if(time_diff_to_server){curts = Date.parse(now); now.setTime (curts + time_diff_to_server);}
1618now_s = now.getFullYear() + ' ' + (now.getMonth()+1) + ' ' + now.getDate();
1619today_start = Date.parse(now_s);
1620yesterday_start = today_start - 24*60*60*1000;
1621diff = (Date.parse(now) - cur) / 1000;
1622if(diff < (60)){return 'vor einer Minute'} //diff kleiner als 1 minute?
1623else if(diff < (60*30)){mins = Math.ceil(diff/60); res = 'vor %minutes Minuten'.replace("%minutes", mins); } //diff kleiner als 30 minuten?
1624else if(cur > today_start){cur = cur + off; res = dateFormat(cur,"today");} //cur größer als today_start
1625else if(cur > yesterday_start){cur = cur + off; res = dateFormat(cur,"yesterday");} //cur größer als yesterday_start
1626else {cur = cur + off; res = dateFormat(cur,"norm");} //standard-formatierung:
1627return res;
1628}
1629var xscriptsloaded = [];
1630function xLoadScript(script,sname) {
1631if (typeof(sname) == 'undefined'){
1632var doit = 0;
1633switch(script){
1634case 'jquery' : load_url = jq_source; doit = jq_added ? 0 : 1; jq_added = 1; break;
1635case 'titletags' : load_url = title_source; doit = title_added ? 0 : 1; title_added = 1; break;
1636case 'jqueryui' : load_url = jqui_source; doit = jqui_added ? 0 : 1; jqui_added = 1; break;
1637case 'contextmenu' : load_url = context_source; doit = context_added ? 0 : 1; context_added = 1; break;
1638}
1639if(doit){
1640var e = document.createElement('script');
1641e.src = load_url;
1642e.async = false;
1643document.documentElement.getElementsByTagName("HEAD")[0].appendChild(e);
1644}
1645}else{
1646title = sname.toLowerCase();
1647source = script;
1648if(title=="jquery"){
1649try{$('<div>'); return true;}catch(e){}
1650}
1651load_url = source;
1652if(xscriptsloaded.indexOf(title) < 0){
1653xscriptsloaded.push(title);
1654var e = document.createElement('script');
1655e.src = load_url;
1656e.async = false;
1657docstate = document.readyState;
1658document.documentElement.getElementsByTagName("HEAD")[0].appendChild(e);
1659}
1660}
1661}
1662function xmouseX(evt) {
1663if(!evt){evt = window.event;}
1664if (evt.pageX) return evt.pageX;
1665else if (evt.clientX)
1666return evt.clientX + (document.documentElement.scrollLeft ?
1667document.documentElement.scrollLeft :
1668document.body.scrollLeft);
1669else return null;
1670}
1671function xmouseY(evt) {
1672if(!evt){evt = window.event;}
1673if (evt.pageY) return evt.pageY;
1674else if (evt.clientY)
1675return evt.clientY + (document.documentElement.scrollTop ?
1676document.documentElement.scrollTop :
1677document.body.scrollTop);
1678else return null;
1679}
1680function to_UTF8(string){
1681try {
1682result = decodeURIComponent(string);
1683}
1684catch (e) {
1685result = unescape(string);
1686}
1687return encodeURIComponent(result);
1688}
1689function to_latin(string){
1690try {
1691result = encodeURIComponent(string);
1692}
1693catch (e) {
1694result = escape(string);
1695}
1696return decodeURIComponent(result);
1697}
1698function xconvert2entity(utf8_string) {
1699/* Das Forum läuft jetztt auf UTF8. Keine Konvertierun nötig */
1700return utf8_string;
1701}
1702function clearAutosave(forum,thread){
1703var f = forum ? forum : '';
1704var t = thread ? thread: '';
1705try{$('<div>');}catch(e){/*nojqery*/ return true;}
1706if (typeof updateurl === 'undefined') { updateurl = './ajax/checkncacheNewMessage.php';}
1707$('#messagetext').val('');
1708$('.autosaveinfo,#autosaveinfo,#autosave_info,.autosave_info').remove();
1709data = {"clear":1,"thread":t,"forum":f};
1710$.ajax({url : updateurl ,processData: true,contentType: "application/x-www-form-urlencoded; charset:utf-8",data: data,dataType:'json',type : "POST",
1711success: function(res){if(res.cleared){/*done*/}}
1712});
1713$('#messagetext').focus();
1714}
1715function clearPNAutosave(){
1716try{$('<div>');}catch(e){/*nojqery*/ return true;}
1717if (typeof updateurl === 'undefined') { updateurl = './ajax/checkncacheNewMessage.php';}
1718$('#messagetext').val('');
1719$('.autosaveinfo,#autosaveinfo,#autosave_info,.autosave_info').remove();
1720var recs = [];
1721var temprecs =$(document.forms.sendmail).find('input[name="name[]"]');
1722$.each(temprecs,function(){
1723var curval = $(this).val();
1724if(curval && curval.length){recs.push(curval)}
1725});
1726if(!recs.length){recs=0;}
1727data = {"clear":1,"thread":recs,"forum":"pn"};
1728$.ajax({url : updateurl ,processData: true,contentType: "application/x-www-form-urlencoded; charset:utf-8",data: data,dataType:'json',type : "POST",
1729success: function(res){if(res.cleared){/*done*/}}
1730});
1731$('#messagetext').focus();
1732}
1733var WindowWidth = 0;
1734var WindowHeight = 0;
1735var OffsetX = 0;
1736var OffsetY = 0;
1737var dimSet = 0;
1738var modalContParent = 0;
1739var modalContElement = 0;
1740var scrollTopOffset = 0;
1741function doForumModal(id,header,mwidth){
1742if(!dimSet) setForumDimensions();
1743mwidth = mwidth ? mwidth : (WindowWidth/2);
1744mwidth = parseInt(mwidth);
1745modalDiv = document.createElement('div');
1746modalDiv.className = 'modalDivContainer content panel box';
1747modalDiv.id = 'modalDivContainer';
1748modalDiv.style.position = 'absolute';
1749modalDiv.style.top = 0;
1750modalDiv.style.left = 0;
1751modalDiv.style.width = (WindowWidth + OffsetX)+"px";
1752modalDiv.style.height = (WindowHeight + OffsetY)+"px";
1753modalDiv.style.filter = 'Alpha(opacity=50)';
1754modalDiv.style.opacity = 0.5;
1755modalDiv.style.zIndex = 55555;
1756modalDiv.style.background = '#000000';
1757modalDiv.onclick = function() {closeForumModal()};
1758contentdiv = document.createElement('div');
1759contentdiv.className = 'modalDivContainer content panel box';
1760contentdiv.id = 'modalDivContent';
1761contentdiv.style.position='absolute';
1762//contentdiv.style.top = parseInt(OffsetY + (WindowHeight / 2.8))+"px";
1763contentdiv.style.top = "100px";
1764contentdiv.style.left = parseInt((WindowWidth/2) - (mwidth/2))+"px";
1765contentdiv.style.width = mwidth ? mwidth + 'px' : "500px";
1766contentdiv.style.height = 'auto';
1767contentdiv.style.background = '#ffffff';
1768contentdiv.style.border = '3px solid #3579A1';
1769contentdiv.style.zIndex = 55556;
1770contentdiv.style.margin = "0px";
1771contentdiv.style.padding = "0px";
1772if(header){
1773contentheaderdiv = document.createElement('div');
1774contentheaderdiv .className = 'modalDivHeader boxheader';
1775contentheaderdiv.innerHTML = '<span id="sheader" style="float:left"><i>'+header+'</i></span><span style="float:right"><a style="color:white" class="unloader" href="javascript:void(0)" onclick="closeForumModal()">X</a></span><div style="clear:both"></div>';
1776}
1777contentcontentdiv= document.createElement('div');
1778contentcontentdiv.className = 'modalDivContent boxcontent c_r_content2 panel tms1';
1779contentcontentdiv.style.marginBottom = "0px";
1780var innercontent = document.getElementById(id);
1781modalContParent = innercontent.parentNode;
1782modalContElement = innercontent;
1783innercontent .style.display = 'block';
1784contentcontentdiv.appendChild(innercontent );
1785if(header){contentdiv.appendChild(contentheaderdiv);}
1786contentdiv.appendChild(contentcontentdiv);
1787xaddClass(document.body,"stop_scrolling");
1788document.body.appendChild(modalDiv);
1789document.body.appendChild(contentdiv);
1790}
1791function closeForumModal(){
1792xremoveClass(document.body,"stop_scrolling");
1793try{if(scrollTopOffset > 0){window.scrollBy(0,scrollTopOffset );}}catch(e){}
1794modalContElement.style.display = 'none';
1795modalContParent.appendChild(modalContElement)
1796document.getElementById('modalDivContent').parentNode.removeChild(document.getElementById('modalDivContent'));
1797document.getElementById('modalDivContainer').parentNode.removeChild(document.getElementById('modalDivContainer'));
1798}
1799function setForumDimensions(){
1800if(typeof(window.innerWidth) == 'number'){
1801//Non-IE
1802WindowWidth = window.innerWidth ;
1803WindowHeight = window.innerHeight;
1804OffsetX = window.pageXOffset;
1805OffsetY = window.pageYOffset;
1806}
1807else if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight )){
1808//IE 6+ in standard compliant mode
1809WindowWidth = document.documentElement.clientWidth;
1810WindowHeight = document.documentElement.clientHeight;
1811OffetX = document.body.scrollLeft ;
1812OffsetY = document.body.scrollTop;
1813}
1814else if(document.body && ( document.body.clientWidth || document.body.clientHeight )){
1815//IE 4 compatible
1816WindowWidth = document.body.clientWidth;
1817WindowHeight = document.body.clientHeight;
1818OffetX = document.body.scrollLeft ;
1819OffsetY = document.body.scrollTop;
1820}
1821scrollTopOffset = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
1822dimSet = 1;
1823}
1824function xhasClass(ele,cls) {
1825return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
1826}
1827function xaddClass(ele,cls) {
1828if (!this.xhasClass(ele,cls)) ele.className += " "+cls;
1829}
1830function xremoveClass(ele,cls) {
1831if (xhasClass(ele,cls)) {
1832var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
1833ele.className=ele.className.replace(reg,' ');
1834}
1835}
1836if (!Array.prototype.indexOf) {
1837Array.prototype.indexOf = function(obj, start) {
1838for (var i = (start || 0), j = this.length; i < j; i++) {
1839if (this[i] === obj) { return i; }
1840}
1841return -1;
1842}
1843}
1844function warningModal(targetid,targettype){
1845document.getElementById("hidden_targetid").value = targetid;
1846document.getElementById("hidden_targettype").value = targettype;
1847doForumModal("warnmodal","");
1848//prüfen, ob treshold erreicht wird:
1849try{
1850document.getElementById("warnmodal").className = "";
1851if(document.getElementById("warn_treshold_"+targetid)){
1852document.getElementById("warnmodal").className = "treshold";
1853}
1854}
1855catch(e){console.log(e);}
1856}
1857function undoWarning(targetid,ttype,iid){
1858if(!unwarnurl){var unwarnurl = "/ajax/handler.php?method=unwarn";}
1859var param_string = "target_id="+targetid+"&target_type="+ttype+'&integration_id='+iid;
1860warning_request = hpm_createHttpRequestObject();
1861warning_request.open("POST",unwarnurl,true);
1862warning_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
1863warning_request.setRequestHeader("Content-length", param_string.length);
1864warning_request.setRequestHeader("Connection", "close");
1865warning_request.onreadystatechange=warningdone;
1866warning_request.send(param_string);
1867}
1868function undoWarningById(id){
1869if(!unwarnurl){var unwarnurl = "/ajax/handler.php?method=unwarn";}
1870var param_string = "id="+id;
1871warning_request = hpm_createHttpRequestObject();
1872warning_request.open("POST",unwarnurl,true);
1873warning_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
1874warning_request.setRequestHeader("Content-length", param_string.length);
1875warning_request.setRequestHeader("Connection", "close");
1876warning_request.onreadystatechange=warningdone;
1877warning_request.send(param_string);
1878}
1879var warningactive = false;
1880function doWarning(){
1881if(warningactive) return false;
1882warningactive = true;
1883var targetid = document.getElementById("hidden_targetid").value;
1884var ttype = document.getElementById("hidden_targettype").value;
1885var selVal = document.getElementById("warntype_select").selectedIndex;
1886var warntype = document.getElementById("warntype_select").options[selVal].value;
1887var doPn = document.getElementById("dopn").value;
1888var custPn = document.getElementById("custpn").value;
1889if(!warnurl){var warnurl = "/ajax/handler.php?method=warning";}
1890var param_string = "target_id="+targetid+"&target_type="+ttype+"&warning_type="+warntype+"&dopn="+doPn ;
1891var custwarning = false;
1892if(warntype== "custom"){
1893custwarning = document.getElementById("custwarning").value;
1894if(custwarning == ""){try{document.getElementById("custwarning_error").style.display='block'; return true;}catch(e){}}
1895custwarning = escape(xconvert2entity(custwarning ));
1896param_string = param_string + "&warning_string=" + custwarning;
1897}
1898var pnText = "";
1899var skipescape = 0;
1900if(custPn){pnText = document.getElementById("custpntext").innerHTML;}
1901else{
1902if(custwarning){pnText = custwarning; skipescape = 1;}
1903else{pnText = document.getElementById("warnoptdesc_"+warntype).innerHTML; }
1904}
1905if(!skipescape){pnText = escape(xconvert2entity(pnText));}
1906param_string = param_string + "&pn_string=" + pnText;
1907warning_request = hpm_createHttpRequestObject();
1908warning_request.open("POST",warnurl,true);
1909warning_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
1910warning_request.setRequestHeader("Content-length", param_string.length);
1911warning_request.setRequestHeader("Connection", "close");
1912warning_request.onreadystatechange=warningdone;
1913warning_request.send(param_string);
1914}
1915function warningdone(){
1916if(warning_request.readyState == 4){
1917try{rdata=JSON.parse(warning_request.responseText);}
1918catch(e){try{console.log("Error: "+ e + " Response was:"+ warning_request.responseText)}catch(e){}}
1919if(rdata.done){location.reload();}
1920else{
1921warningactive = false;
1922if(rdata.errormsg){
1923if(rdata.errormsg == "notactive"){alert("{[notactive]}")}
1924if(rdata.errormsg == "norights"){alert("{[norights]}")}
1925if(rdata.errormsg == "notfound"){alert("{[notfound]}")}
1926// alert(rdata.errormsg);
1927}}
1928}
1929}
1930var trackingurl = '/ajax/handler.php?method=hitcounter';
1931function xtrack(track_what,tracking_id){
1932var cururl = trackingurl + "&what=" + track_what + "&whatid=" + tracking_id;
1933var param_string = "";
1934warning_request = hpm_createHttpRequestObject();
1935warning_request.open("GET",cururl ,true);
1936warning_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
1937warning_request.setRequestHeader("Content-length", param_string.length);
1938warning_request.setRequestHeader("Connection", "close");
1939warning_request.send();
1940return true;
1941}
1942function makeFeedEntry(){
1943var formstring = "<div id='newfeedentry' style='display:none'><h2>Neuen Eintrag erstellen</h2><textarea id='thenewentry'></textarea><input type='button' onclick='addFeedEntry($(\"#thenewentry\").val());' value='Speichern' /><input type='button' onclick='closeForumModal()' value='Abbrechen' /></div>";
1944$entryform = $(formstring);
1945$entryform.appendTo('body');
1946doForumModal('newfeedentry');
1947}
1948function addFeedEntry(entry){
1949$.ajax({
1950type: "POST",
1951url: '/ajax/handler.php?method=addFeedEntry',
1952data: {'entry':entry},
1953success: function(result){
1954location.reload();
1955}
1956});
1957}
1958function removeFeedEntry(actionid,entryid){
1959if(!confirm("{[confirm_delete_generic]}")){return false;}
1960var querystring = "&actionid="+actionid;
1961$('#'+actionid).remove();
1962if(typeof document.selection != 'undefined'){querystring += "&entryid=" + entryid;}
1963$.ajax({
1964type: "GET",
1965url: '/ajax/contentHandler.php?action=del&ctype=70' + querystring,
1966success: function(result){
1967}
1968});
1969}
1970function isInt(value) {
1971return !isNaN(parseInt(value,10)) && (parseFloat(value,10) == parseInt(value,10));
1972}
1973function createForumActionInfoBox(){
1974var $skel = $('<div id="forumActionInfo" style="display:none">');
1975$('<span class="delspan" onclick="$(\'#forumActionInfo\').fadeTo(\'fast\', 0, function(){$(\'#forumActionInfo\').hide();});"><img alt="Fenster schließen" title="Fenster schließen" src="https://files.homepagemodules.de/b2001010/a_1245_7c2fe117.gif"></span><div id="forumActionInfoCont"></div>').appendTo($skel);
1976$skel.appendTo("body");
1977return $skel;
1978}
1979var generalNotifierTimer;
1980function xGeneralNotifier(text,header,hideafter){
1981try{clearTimeout(generalNotifierTimer);}catch(e){/*No timer*/}
1982if(!$('#forumActionInfo').length){$noteBox = createForumActionInfoBox();}
1983else{$noteBox = $('#forumActionInfo');}
1984if(header){text = header+"<br/>"+text;}
1985$noteBox.find('#forumActionInfoCont').html(text);
1986var boxwidth = (478+80);
1987var boxleft = (parseInt($(window).width()) - boxwidth) /2;
1988$noteBox.css('left',boxleft+"px");
1989$('#forumActionInfo').fadeTo('slow', 1);
1990if(hideafter){
1991generalNotifierTimer= setTimeout("$('#forumActionInfo').fadeTo('slow', 0, function(){$('#forumActionInfo').hide();});",(hideafter*1000));
1992}
1993}
1994function xaddslashes(str) {
1995return (str + '')
1996.replace(/[\\"']/g, '\\$&')
1997.replace(/\u0000/g, '\\0');
1998}
1999/*add the indexOf-Method for IE */
2000if(!Array.indexOf){
2001Array.prototype.indexOf = function(obj){
2002for(var i=0; i<this.length; i++){
2003if(this[i]==obj){
2004return i;
2005}
2006}
2007return -1;
2008}
2009}
2010function sslFormSubmit(form) {
2011var actionLink = (typeof form.action !== '' && form.action !== '' ? form.action : location.href);
2012form.action = actionLink.replace(/^http:/, 'https:');
2013}
2014function closePayPal(){
2015$('#PPDGFrame').remove();
2016}
2017function doDonation(sum){window.open("/payedabo_forum.php?donate=1&sum="+sum);}
2018function decodeHtml(html) {
2019var txt = document.createElement("textarea");
2020txt.innerHTML = html;
2021return txt.value;
2022}
2023function showPremiumOnlyNotification(el){
2024var infotitle= $(el).data('preminfotitle');
2025var inforate= $(el).data('preminforate');
2026var infotext= $(el).data('preminfotext') ? $(el).data('preminfotext') : 'Für diese Funktion wird mindestens der '+inforate+' benötigt.';
2027rid = 2;
2028if(inforate == 'Profi Tarif'){rid = 3;}
2029if(inforate == 'Business Tarif'){rid = 4;}
2030var infodiv = '<div class="premiumonly content"><div class="content_title">'+infotitle+'</div>'+
2031'<div class="content_content">'+
2032'<div class="prem_only"><span class="head">Xobor Premium Funktion</span><span class="expl">'+infotext+'</span><a href="/admin/?page=premium&amp;mark='+encodeURIComponent(infotitle)+'&amp;markr='+rid+'">Jetzt Premium-Tarif aktivieren</a></div><div style="text-align: center;border-top: 1px solid #ededed; padding: 3px;">Dieser Hinweis wird nur für Administratoren angezeigt</div></div></div>';
2033$(infodiv).insertBefore($(el)); $(el).remove();
2034}
2035function makePwVisibleHelper($input){
2036$input.on('keypress',function(){
2037if($(this).val() == ""){
2038$('#passwordunhider').remove();
2039$(this).prop('type', 'password');
2040}else if(! $('#passwordunhider').length){
2041let unhider = $('<div id="input-group-cont"><div id="passwordunhider" class="input-group-append"><span class="input-group-text"><a href=""><i class="fa fa-eye-slash" aria-hidden="true"></i></a></span></div></div>');
2042unhider.insertAfter($(this));
2043$(this).insertBefore('#passwordunhider');
2044$(this).focus();
2045$("#passwordunhider a").on('click', function(event) {
2046let curpwinput = $(this).closest('#input-group-cont').find('input');
2047let curpwinputicon = $(this).closest('#input-group-cont').find('i.fa');
2048event.preventDefault();
2049if(curpwinput.prop("type") == "text"){
2050curpwinput.prop('type', 'password');
2051curpwinputicon.addClass( "fa-eye-slash" );
2052curpwinputicon.removeClass( "fa-eye" );
2053}else if(curpwinput.prop("type") == "password"){
2054curpwinput.prop('type', 'text');
2055curpwinputicon.removeClass( "fa-eye-slash" );
2056curpwinputicon.addClass( "fa-eye" );
2057}
2058});
2059}
2060});
2061}

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.