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) /var/www/html/mis/js/textboxlist_proto/p/ drwxr-xr-x |
Viewing file: textboxlist.js (8.37 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | /* Proto!TextboxList 0.1 - Prototype version required: 6.0 Credits: - Idea: Facebook + Apple Mail - Caret position method: Diego Perini <http://javascript.nwbox.com/cursor_position/cursor.js> - Guillermo Rauch: Original MooTools script Changelog: - 0.1: translation of MooTools script */ /* Copyright: InteRiders <http://interiders.com/> - Distributed under MIT - Keep this message! */ var ResizableTextbox = Class.create({ options: $H({ min: 5, max: 500, step: 7 }), initialize: function(element, options) { var that = this; //this.setOptions(options); this.options.update(options); this.el = $(element); this.width = this.el.offsetWidth; this.el.observe('keydown', function() { this.cacheData('rt-value', $F(this).length); }); this.el.observe( 'keyup', function() { var newsize = that.options.get('step') * $F(this).length; if(newsize <= that.options.get('min')) newsize = that.width; if(! ($F(this).length == this.retrieveData('rt-value') || newsize <= that.options.min || newsize >= that.options.max)) this.setStyle({'width': newsize}); }); } }); var TextboxList = Class.create({ options: $H({/* onFocus: $empty, onBlur: $empty, onInputFocus: $empty, onInputBlur: $empty, onBoxFocus: $empty, onBoxBlur: $empty, onBoxDispose: $empty,*/ resizable: {}, className: 'bit', separator: '###', extrainputs: true, startinput: true, hideempty: true }), initialize: function(element, options) { this.options.update(options); this.element = $(element).setStyle({'display': 'none'}); this.bits = new Hash(); this.events = new Hash(); this.count = 0; this.current = false; this.maininput = this.createInput({'class': 'maininput'}); this.holder = new Element('ul', { 'class': 'holder' }).insert(this.maininput); this.element.insert({'before':this.holder}); this.holder.observe('click', function(event){ Event.stop(event); if(this.maininput != this.current) this.focus(this.maininput); }.bind(this)); this.makeResizable(this.maininput); this.setEvents(); }, setEvents: function() { document.observe(Prototype.Browser.IE ? 'keydown' : 'keypress', function(e) { if(! this.current) return; if(this.current.retrieveData('type') == 'box' && e.keyCode == Event.KEY_BACKSPACE) Event.stop(e); }.bind(this)); document.observe( 'keyup', function(e) { Event.stop(e); if(! this.current) return; switch(e.keyCode){ case Event.KEY_LEFT: return this.move('left'); case Event.KEY_RIGHT: return this.move('right'); case Event.KEY_BACKSPACE: return this.moveDispose(); } }.bind(this)); document.observe( 'click', function() { document.fire('blur'); }.bindAsEventListener(this) ); }, update: function() { this.element.value = this.bits.values().join(this.options.get('separator')); return this; }, add: function(text, html) { var id = this.options.get('className') + '-' + this.count++; var el = this.createBox($pick(html, text), {'id': id}); (this.current || this.maininput).insert({'before':el}); el.observe('click', function(e) { Event.stop(e); this.focus(el); }.bind(this)); this.bits.set(id, text); if(this.options.get('extrainputs') && (this.options.get('startinput') || el.previous())) this.addSmallInput(el,'before'); return el; }, addSmallInput: function(el, where) { var input = this.createInput({'class': 'smallinput'}); console.debug(where); el.insert({}[where] = input); input.cacheData('small', true); this.makeResizable(input); if(this.options.get('hideempty')) input.setStyle({'display': 'none'}); return input; }, dispose: function(el) { this.bits.unset(el.id); if(el.previous() && el.previous().retrieveData('small')) el.previous().remove(); if(this.current == el) this.focus(el.next()); if(el.retrieveData('type') == 'box') el.fire('onBoxDispose'); el.remove(); return this; }, focus: function(el, nofocus) { if(! this.current) el.fire('focus'); else if(this.current == el) return this; this.blur(); el.addClassName(this.options.get('className') + '-' + el.retrieveData('type') + '-focus'); if(el.retrieveData('small')) el.setStyle({'display': 'block'}); if(el.retrieveData('type') == 'input') { el.fire('onInputFocus'); if(! nofocus) this.callEvent(el.retrieveData('input'), 'focus'); } else el.fire('onBoxFocus'); this.current = el; return this; }, blur: function(noblur) { if(! this.current) return this; if(this.current.retrieveData('type') == 'input') { var input = this.current.retrieveData('input'); if(! noblur) this.callEvent(input, 'blur'); input.fire('onInputBlur'); } else this.current.fire('onBoxBlur'); if(this.current.retrieveData('small') && ! input.get('value') && this.options.get('hideempty')) this.current.setStyle({'display': 'none'}); this.current.removeClassName(this.options.get('className') + '-' + this.current.retrieveData('type') + '-focus'); this.current = false; return this; }, createBox: function(text, options) { return new Element('li', options).addClassName(this.options.get('className') + '-box').update(text).cacheData('type', 'box'); }, createInput: function(options) { var li = new Element('li', {'class': this.options.get('className') + '-input'}); var el = new Element('input', Object.extend(options,{'type': 'text'})); el.observe('click', function(e) { Event.stop(e); }); el.observe('focus', function(e) { if(! this.isSelfEvent('focus')) this.focus(li, true); }.bind(this)); el.observe('blur', function() { if(! this.isSelfEvent('blur')) this.blur(true); }.bind(this)); el.observe('keydown', function(e) { this.cacheData('lastvalue', this.value).cacheData('lastcaret', this.getCaretPosition()); }); var tmp = li.cacheData('type', 'input').cacheData('input', el).insert(el); return tmp; }, callEvent: function(el, type) { this.events.set(type, el); el[type](); }, isSelfEvent: function(type) { return (this.events.get(type)) ? !! this.events.unset(type) : false; }, makeResizable: function(li) { var el = li.retrieveData('input'); el.cacheData('resizable', new ResizableTextbox(el, Object.extend(this.options.get('resizable'),{min: el.offsetWidth, max: (this.element.getWidth()?this.element.getWidth():0)}))); return this; }, checkInput: function() { var input = this.current.retrieveData('input'); return (! input.retrieveData('lastvalue') || (input.getCaretPosition() === 0 && input.retrieveData('lastcaret') === 0)); }, move: function(direction) { var el = this.current[(direction == 'left' ? 'previous' : 'next')](); if(el && (! this.current.retrieveData('input') || ((this.checkInput() || direction == 'right')))) this.focus(el); return this; }, moveDispose: function() { if(this.current.retrieveData('type') == 'box') return this.dispose(this.current); if(this.checkInput() && this.bits.keys().length && this.current.previous()) return this.focus(this.current.previous()); } }); //helper functions Element.addMethods({ getCaretPosition: function() { if (this.createTextRange) { var r = document.selection.createRange().duplicate(); r.moveEnd('character', this.value.length); if (r.text === '') return this.value.length; return this.value.lastIndexOf(r.text); } else return this.selectionStart; }, cacheData: function(element, key, value) { if (Object.isUndefined(this[$(element).identify()]) || !Object.isHash(this[$(element).identify()])) this[$(element).identify()] = $H(); this[$(element).identify()].set(key,value); return element; }, retrieveData: function(element,key) { return this[$(element).identify()].get(key); } }); function $pick(){for(var B=0,A=arguments.length;B<A;B++){if(!Object.isUndefined(arguments[B])){return arguments[B];}}return null;} |
:: 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.0224 ]-- |