Software: Apache/2.2.3 (CentOS). PHP/5.1.6 uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/libexec/webmin/file/xinha/modules/Gecko/ drwxr-xr-x |
Viewing file: paraHandlerBest.js (7.21 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | /* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ /* This file is part of version 0.96beta2 released Fri, 20 Mar 2009 11:01:14 +0100 */ EnterParagraphs._pluginInfo={name:"EnterParagraphs",version:"1.0",developer:"Adam Wright",developer_url:"http://www.hipikat.org/",sponsor:"The University of Western Australia",sponsor_url:"http://www.uwa.edu.au/",license:"htmlArea"};EnterParagraphs.prototype._whiteSpace=/^\s*$/;EnterParagraphs.prototype._pExclusions=/^(address|blockquote|body|dd|div|dl|dt|fieldset|form|h1|h2|h3|h4|h5|h6|hr|li|noscript|ol|p|pre|table|ul)$/i;EnterParagraphs.prototype._pContainers=/^(body|del|div|fieldset|form|ins|map|noscript|object|td|th)$/i;EnterParagraphs.prototype._pBreak=/^(address|pre|blockquote)$/i;EnterParagraphs.prototype._permEmpty=/^(area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param)$/i;EnterParagraphs.prototype._elemSolid=/^(applet|br|button|hr|img|input|table)$/i;EnterParagraphs.prototype._pifySibling=/^(address|blockquote|del|div|dl|fieldset|form|h1|h2|h3|h4|h5|h6|hr|ins|map|noscript|object|ol|p|pre|table|ul|)$/i;EnterParagraphs.prototype._pifyForced=/^(ul|ol|dl|table)$/i;EnterParagraphs.prototype._pifyParent=/^(dd|dt|li|td|th|tr)$/i;function EnterParagraphs(a){this.editor=a;if(Xinha.is_gecko){this.onKeyPress=this.__onKeyPress}}EnterParagraphs.prototype.name="EnterParagraphs";EnterParagraphs.prototype.insertAdjacentElement=function(b,c,a){if(c=="BeforeBegin"){b.parentNode.insertBefore(a,b)}else{if(c=="AfterEnd"){b.nextSibling?b.parentNode.insertBefore(a,b.nextSibling):b.parentNode.appendChild(a)}else{if(c=="AfterBegin"&&b.firstChild){b.insertBefore(a,b.firstChild)}else{if(c=="BeforeEnd"||c=="AfterBegin"){b.appendChild(a)}}}}};EnterParagraphs.prototype.forEachNodeUnder=function(b,e,c,d){var f,a;if(b.nodeType==11&&b.firstChild){f=b.firstChild;a=b.lastChild}else{f=a=b}while(a.lastChild){a=a.lastChild}return this.forEachNode(f,a,e,c,d)};EnterParagraphs.prototype.forEachNode=function(e,j,f,h,l){var i=function(m,n){return(n=="ltr"?m.nextSibling:m.previousSibling)};var g=function(m,n){return(n=="ltr"?m.firstChild:m.lastChild)};var k,b,d;var a=l;var c=false;while(k!=h=="ltr"?j:e){if(!k){k=h=="ltr"?e:j}else{if(g(k,h)){k=g(k,h)}else{if(i(k,h)){k=i(k,h)}else{b=k;while(!i(b,h)&&b!=(h=="ltr"?j:e)){b=b.parentNode}k=(i(b,h)?i(b,h):b)}}}c=(k==(h=="ltr"?j:e));switch(f){case"cullids":d=this._fenCullIds(k,a);break;case"find_fill":d=this._fenEmptySet(k,a,f,c);break;case"find_cursorpoint":d=this._fenEmptySet(k,a,f,c);break}if(d[0]){return d[1]}if(c){break}if(d[1]){a=d[1]}}return false};EnterParagraphs.prototype._fenEmptySet=function(c,b,d,a){if(!b&&!c.firstChild){b=c}if((c.nodeType==1&&this._elemSolid.test(c.nodeName))||(c.nodeType==3&&!this._whiteSpace.test(c.nodeValue))||(c.nodeType!=1&&c.nodeType!=3)){switch(d){case"find_fill":return new Array(true,false);break;case"find_cursorpoint":return new Array(true,c);break}}if(a){return new Array(true,b)}return new Array(false,b)};EnterParagraphs.prototype._fenCullIds=function(c,a,b){if(a.id){b[a.id]?a.id="":b[a.id]=true}return new Array(false,b)};EnterParagraphs.prototype.processSide=function(a,c){var d=function(i,h){return(h=="left"?i.previousSibling:i.nextSibling)};var e=c=="left"?a.startContainer:a.endContainer;var f=c=="left"?a.startOffset:a.endOffset;var b,g=e;while(g.nodeType==1&&!this._permEmpty.test(g.nodeName)){g=(f?g.lastChild:g.firstChild)}while(b=b?(d(b,c)?d(b,c):b.parentNode):g){if(d(b,c)){if(this._pExclusions.test(d(b,c).nodeName)){return this.processRng(a,c,b,d(b,c),(c=="left"?"AfterEnd":"BeforeBegin"),true,false)}}else{if(this._pContainers.test(b.parentNode.nodeName)){return this.processRng(a,c,b,b.parentNode,(c=="left"?"AfterBegin":"BeforeEnd"),true,false)}else{if(this._pExclusions.test(b.parentNode.nodeName)){if(this._pBreak.test(b.parentNode.nodeName)){return this.processRng(a,c,b,b.parentNode,(c=="left"?"AfterBegin":"BeforeEnd"),false,(c=="left"?true:false))}else{return this.processRng(a,c,(b=b.parentNode),(d(b,c)?d(b,c):b.parentNode),(d(b,c)?(c=="left"?"AfterEnd":"BeforeBegin"):(c=="left"?"AfterBegin":"BeforeEnd")),false,false)}}}}}};EnterParagraphs.prototype.processRng=function(a,g,m,o,c,k,i){var d=g=="left"?a.startContainer:a.endContainer;var f=g=="left"?a.startOffset:a.endOffset;var h=this.editor;var p=h._doc.createRange();p.selectNode(m);if(g=="left"){p.setEnd(d,f);a.setStart(p.startContainer,p.startOffset)}else{if(g=="right"){p.setStart(d,f);a.setEnd(p.endContainer,p.endOffset)}}var b=p.cloneContents();this.forEachNodeUnder(b,"cullids","ltr",this.takenIds,false,false);var l,e,n;l=g=="left"?(p.endContainer.nodeType==3?true:false):(p.startContainer.nodeType==3?false:true);e=l?p.startOffset:p.endOffset;l=l?p.startContainer:p.endContainer;if(this._pifyParent.test(l.nodeName)&&l.parentNode.childNodes.item(0)==l){while(!this._pifySibling.test(l.nodeName)){l=l.parentNode}}if(b.nodeType==11&&!b.firstChild){if(l.nodeName!="BODY"||(l.nodeName=="BODY"&&e!=0)){b.appendChild(h._doc.createElement(l.nodeName))}}n=this.forEachNodeUnder(b,"find_fill","ltr",false);if(n&&this._pifySibling.test(l.nodeName)&&((e==0)||(e==1&&this._pifyForced.test(l.nodeName)))){m=h._doc.createElement("p");m.innerHTML=" ";if((g=="left")&&l.previousSibling){return new Array(l.previousSibling,"AfterEnd",m)}else{if((g=="right")&&l.nextSibling){return new Array(l.nextSibling,"BeforeBegin",m)}else{return new Array(l.parentNode,(g=="left"?"AfterBegin":"BeforeEnd"),m)}}}if(n){if(n.nodeType==3){n=h._doc.createDocumentFragment()}if((n.nodeType==1&&!this._elemSolid.test())||n.nodeType==11){var j=h._doc.createElement("p");j.innerHTML=" ";n.appendChild(j)}else{var j=h._doc.createElement("p");j.innerHTML=" ";n.parentNode.insertBefore(parentNode,n)}}if(n){m=n}else{m=(k||(b.nodeType==11&&!b.firstChild))?h._doc.createElement("p"):h._doc.createDocumentFragment();m.appendChild(b)}if(i){m.appendChild(h._doc.createElement("br"))}return new Array(o,c,m)};EnterParagraphs.prototype.isNormalListItem=function(a){var c,b;c=a.startContainer;if((typeof c.nodeName!="undefined")&&(c.nodeName.toLowerCase()=="li")){b=c}else{if((typeof c.parentNode!="undefined")&&(typeof c.parentNode.nodeName!="undefined")&&(c.parentNode.nodeName.toLowerCase()=="li")){b=c.parentNode}else{return false}}if(!b.previousSibling){if(a.startOffset==0){return false}}return true};EnterParagraphs.prototype.__onKeyPress=function(a){if(a.keyCode==13&&!a.shiftKey&&this.editor._iframe.contentWindow.getSelection){return this.handleEnter(a)}};EnterParagraphs.prototype.handleEnter=function(j){var b;var c=this.editor.getSelection();var a=this.editor.createRange(c);if(this.isNormalListItem(a)){return true}this.takenIds=new Object();var f=this.processSide(a,"left");var d=this.processSide(a,"right");b=d[2];c.removeAllRanges();a.deleteContents();var g=this.forEachNodeUnder(b,"find_cursorpoint","ltr",false,true);if(!g){alert("INTERNAL ERROR - could not find place to put cursor after ENTER")}if(f){this.insertAdjacentElement(f[0],f[1],f[2])}if(d&&d.nodeType!=1){this.insertAdjacentElement(d[0],d[1],d[2])}if((g)&&(this._permEmpty.test(g.nodeName))){var i=0;while(g.parentNode.childNodes.item(i)!=g){i++}c.collapse(g.parentNode,i)}else{try{c.collapse(g,0);if(g.nodeType==3){g=g.parentNode}this.editor.scrollToElement(g)}catch(h){}}this.editor.updateToolbar();Xinha._stopEvent(j);return true}; |
:: Command execute :: | |
:: Shadow's tricks :D :: | |
Useful Commands
|
:: Preddy's tricks :D :: | |
Php Safe-Mode Bypass (Read Files)
|
--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0162 ]-- |