? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/promice/components/com_linkr/assets/js/
File Upload :
Current File : /home/admin/public_html/old/promice/components/com_linkr/assets/js/helper.js

var LinkrAPI=new Class({initialize:function(l,i,n,k,r){this.majorVersion=l[0];this.minorVersion=l[1];this.buildVersion=l[2];this._errMsg=[];this._events={onload:[],oninsert:[],onclose:[]};this._debug=l[3];this.mode=r[0];this.editor=n;this.siteRoot=k;this.sslSiteRoot=this.siteRoot.replace('http:','https:');this.requestURL=i;this.language=r[1];this.userAccessLevel=r[5];this.imgPattern=/<([\s+]?)img([^>]*)\/?([\s+]?)>/i;this.iconsFolder=r[4];this.loadingIcon=r[4]+'loading.gif';this.loading='%3Cimg src="'+this.loadingIcon+'"alt="..."style="margin:3px;border:none;"/%3E';this.wideLoading='%3Ccenter style="padding:20px;"%3E'+this.loading+'%3C/center%3E';this.loading=unescape(this.loading);this.wideLoading=unescape(this.wideLoading);this.missingText=this.UTF8.Decode(r[2]);this.imgAnchor=this.UTF8.Decode(r[3]);var _pw=this.mode=='popup'?window.opener:window.parent;if($type(_pw.tinyMCE)=='object'){if($type(_pw.JContentEditor)=='object'){this.editorPlugin='JCE'}else{this.editorPlugin='TinyMCE'}this.editorPlugin+=_pw.tinyMCE.majorVersion}else if($type(_pw.FCKeditorAPI)=='object'){this.editorPlugin='FCK'+_pw.FCKeditorAPI.Version.toFloat()}else if($type(_pw.editortext)=='object'){this.editorPlugin='TME'+_pw.editortext.config.version.replace(/[^0-9\.]/ig,'')}else if($type(_pw.xs_text)=='object'){this.editorPlugin='XHTMLSuite'+_pw.xs_text.config.version.toFloat()}else if($type(_pw.document.getElementById('xstandard'))=='element'){this.editorPlugin='XStandard'}else if($type(_pw.Xinha)=='function'){this.editorPlugin='Xinha'}else if($type(_pw.CKEDITOR)=='object'){this.editorPlugin='CKEditor'+_pw.CKEDITOR.version.substr(0,3)}else{this.editorPlugin='?'}this.HTMLText='';this.selectedText='';switch(this.editorPlugin){case'TinyMCE2':if(_pw.tinyMCE.selectedInstance.selection)this.HTMLText=_pw.tinyMCE.selectedInstance.selection.getSelectedHTML();break;case'JCE':case'JCE3':case'TinyMCE3':if(_pw.tinyMCE.activeEditor.selection)this.HTMLText=_pw.tinyMCE.activeEditor.selection.getContent();break;case'FCK2.5':case'FCK2.6':var _i=_pw.FCKeditorAPI.GetInstance(this.editor);switch(_i.Selection.GetType().toLowerCase()){case'text':if(window.getSelection&&_i.EditorWindow)this.HTMLText=_i.EditorWindow.getSelection().toString();else if(document.selection&&_i.EditorDocument.selection)this.HTMLText=_i.EditorDocument.selection.createRange().text;else this.HTMLText='';break;case'control':var s=_i.Selection.GetSelectedElement();if(s.nodeName.toLowerCase()=='img'){this.HTMLText='<img src="'+s.src.replace(this.siteRoot,'')+'"';if(s.alt)this.HTMLText+='alt="'+s.alt+'"';if(s.name)this.HTMLText+='name="'+s.name+'"';if(s.border)this.HTMLText+='border="'+s.border+'"';if(s.height)this.HTMLText+='height="'+s.height+'"';if(s.width)this.HTMLText+='width="'+s.width+'"';if(s.align)this.HTMLText+='align="'+s.align+'"';this.HTMLText+='/>'}else{this.HTMLText=''}break}break;case'CKEditor3.0':case'CKEditor3.1':case'CKEditor3.2':case'CKEditor3.3':case'CKEditor3.4':case'CKEditor3.5':case'CKEditor3.6':case'CKEditor3.7':case'CKEditor3.8':case'CKEditor3.9':var _i=_pw.CKEDITOR.instances[this.editor];if(!_i.getSelection())break;switch(_i.getSelection().getType()){case _pw.CKEDITOR.SELECTION_TEXT:if(document.selection)this.HTMLText=_i.getSelection().getNative().createRange().text;else if(window.getSelection)this.HTMLText=_i.getSelection().getNative().toString();break;case _pw.CKEDITOR.SELECTION_ELEMENT:var _e=_i.getSelection().getSelectedElement();if(_e&&_e.getName()=='img')this.HTMLText=_e.getOuterHtml();break}break;case'TME1.1':case'TME1.2':if(_pw.editortext)this.HTMLText=_pw.editortext.getSelectedHTML();break;case'XStandard':if(_pw.document)this.HTMLText=_pw.document.getElementById('xstandard').SelectedXML;break;case'XHTMLSuite1':case'XHTMLSuite2':if(_pw.xs_text)this.HTMLText=_pw.xs_text.getSelectedHTML();break;case'Xinha':this.HTMLText=_pw.xinha_editors[this.editor].getSelectedHTML();break}this.HTMLText=$type(this.HTMLText)=='string'?this.HTMLText:'';this.selectedText=this.imgPattern.test(this.HTMLText)?this.imgAnchor:this.HTMLText.replace(/(<([^>]+)>)/ig,'');this.linkrAnchor=false;if(this.HTMLText.contains('{linkr:')){if(this.HTMLText.contains('{linkr:bookmarks;')){this.linkrAnchor=true;this.selectedText='[linkr]';this.setReturnPage(['LinkrBookmarks','home'],[this.HTMLText])}if(this.HTMLText.contains('{linkr:related;')){this.linkrAnchor=true;this.selectedText='[linkr]';this.setReturnPage(['LinkrRelated','home'],[this.HTMLText])}}this.addEvent('onLoad',function(){var a=Linkr._events.onload;if(a.length>0)a.each(function(f){Linkr.__af(f)})});this.addEvent('onInsert',function(h){var a=Linkr._events.oninsert;if(a.length>0)a.each(function(f){Linkr.__af(f,[h])})});this.addEvent('onClose',function(){var a=Linkr._events.onclose;if(a.length>0)a.each(function(f){Linkr.__af(f)})});this.txt={};this.addEventListener('onLoad',function(){this.txt={linkAttributes:this.getL18N('LC_ATTRIBUTES'),linkText:this.getL18N('LC_TEXT'),linkTarget:this.getL18N('LC_TARGET'),linkTargetSelf:this.getL18N('LC_TARGET_SELF'),linkTargetBlank:this.getL18N('LC_TARGET_BLANK'),linkTitle:this.getL18N('LC_TITLE'),linkClass:this.getL18N('LC_CLASS'),linkRelation:this.getL18N('LC_RELATION'),linkConfigure:this.getL18N('CONFIGURE_LINK'),linkGet:this.getL18N('GET_LINK'),pick:this.getL18N('PICK'),noResultsFound:this.getL18N('NORESULTS')}}.bind(this));this.addEventListener('onLoad',function(){this._tips=new Tips({},{maxTitleChars:50})}.bind(this))},__af:function(fn,a){var ft=$type(fn);a=Linkr.__ca(a);if(ft=='function'){fn.attempt(a)}else if(ft=='array'&&$type(fn[0])=='object'){var o=fn[0];if($type(fn[1])=='string'&&fn[1].length>0){var m=fn[1];o[m].attempt(a,o)}}},__ca:function(a,m){if(typeof(a)=='undefined'||a==null)return $type(m)=='array'?m:null;if($type(a)!='array')return $type(m)=='array'?m.merge([a]):[a];return $type(m)=='array'?m.merge(a):a},test:function(msg){alert($pick(msg,'Editor plugin is "'+Linkr.editorPlugin+'"'))},setError:function(m,r){this._errMsg[this._errMsg.length]=m;if(this._debug)alert(m);return r?r:false},getError:function(c){var e=this._errMsg.length?this._errMsg[this._errMsg.length-1]:'';if(c!==false)this._errMsg=[];return e},getAllErrors:function(c){var e=this._errMsg;if(c!==false)this._errMsg=[];return e},insertMsgDiv:function(msg,el,id){if($type(msg)=='string')msg=[msg];if($type(msg)!='array'||msg.length<1||$type(el)!='element')return false;id=$pick(id,$time()+$random(0,999));var div=new Element('div',{id:id,'class':'linkr-notice',styles:{position:'relative',margin:'15px 0'}}).setHTML(msg.join('<br />')).injectInside(el);var a=new Element('a',{href:'javascript:void(0);',styles:{position:'absolute',top:3,right:4},events:{click:div.remove.bind(div)}}).injectInside(div);new Element('img',{alt:'[x]',src:this.siteRoot+'administrator/images/publish_x.png'}).injectInside(a);return id},addEventListener:function(t,f){if($type(f)!='function'&&$type(f)!='array')return this.setError('Linkr.addEventListener - Invalid function',false);if($type(t)!='string'||t.length<1)return this.setError('Linkr.addEventListener - Invalid event',false);var et=t.toLowerCase();if(!$defined(this._events[et]))return this.setError('Linkr.addEventListener - Event "'+t+'"not supported',false);this._events[et].include(f);return true},UTF8:{isEncoded:function(s){var n=true;try{this.decodeString(s)}catch(e){n=false}return n},Encode:function(s){return this.isEncoded(s)?s:this.encodeString(s)},Decode:function(s){return this.isEncoded(s)?this.decodeString(s):s},encodeString:function(s){return(encodeURIComponent)?unescape(encodeURIComponent(s)):escape(s)},decodeString:function(s){return(decodeURIComponent)?decodeURIComponent(escape(s)):unescape(s)}},Base64:{_k:'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',Encode:function(s,a){if($type(s)!='string'||s.length<1)return'';s=Linkr.UTF8.Encode(s);var o='';var c1,c2,c3,e1,e2,e3,e4;var i=0;while(i<s.length){c1=s.charCodeAt(i++);c2=s.charCodeAt(i++);c3=s.charCodeAt(i++);e1=c1>>2;e2=((c1&3)<<4)|(c2>>4);e3=((c2&15)<<2)|(c3>>6);e4=c3&63;if(isNaN(c2))e3=e4=64;else if(isNaN(c3))e4=64;o+=Linkr.Base64._k.charAt(e1);o+=Linkr.Base64._k.charAt(e2);o+=Linkr.Base64._k.charAt(e3);o+=Linkr.Base64._k.charAt(e4)}return a?o.replace(/[+]/g,','):o},Decode:function(s){if($type(s)!='string')return'';s=s.replace(/[^A-Z0-9\+\/\=]/gi,'');if(s.length<1)return'';var o='';var c1,c2,c3,e1,e2,e3,e4;var i=0;while(i<s.length){e1=Linkr.Base64._k.indexOf(s.charAt(i++));e2=Linkr.Base64._k.indexOf(s.charAt(i++));e3=Linkr.Base64._k.indexOf(s.charAt(i++));e4=Linkr.Base64._k.indexOf(s.charAt(i++));c1=(e1<<2)|(e2>>4);c2=((e2&15)<<4)|(e3>>2);c3=((e3&3)<<6)|e4;o+=String.fromCharCode(c1);if(e3!=64)o+=String.fromCharCode(c2);if(e4!=64)o+=String.fromCharCode(c3)}return Linkr.UTF8.Decode(o)}},urlencode:function(s){if($type(s)!='string')return'';s=(encodeURIComponent)?encodeURIComponent(s):escape(s);s=s.replace(/'/g,'%27');s=s.replace(/\(/g,'%28');s=s.replace(/\)/g,'%29');s=s.replace(/\*/g,'%2A');s=s.replace(/~/g,'%7E');s=s.replace(/\!/g,'%21');s=s.replace(/%20/g,'+');return s.replace(/(\%([a-z0-9]{2}))/g,function(a,b,c){return'%'+c.toUpperCase()})},urldecode:function(s){if($type(s)!='string')return'';s=s.replace(/%27/g,'\'');s=s.replace(/%28/g,'(');s=s.replace(/%29/g,')');s=s.replace(/%2A/g,'*');s=s.replace(/%7E/g,'~');s=s.replace(/%21/g,'!');s=s.replace(/\+/g,'%20');return(decodeURIComponent)?decodeURIComponent(s):unescape(s)},L18N:{},setL18N:function(k,v){if($type(k)=='array')return k.each(function(p){this.L18N[p[0]]=this.UTF8.Encode(p[1])}.bind(this));this.L18N[k]=this.UTF8.Encode(v)},getL18N:function(k,a){var s=$type(this.L18N[k])=='string'?this.L18N[k]:k;if($type(a)=='array'){a=[this.UTF8.Decode(s)].merge(a);return sprintfWrapper.init.attempt(a)}return this.UTF8.Decode(s)},getCookie:function(n,o,rc){if(n.length<1)return{};return MooTools.version==1.11?this._gc11(n,o,rc):this._gc12(n,o,rc)},setCookie:function(n,v,o){if(n.length<1)return false;return MooTools.version==1.11?this._sc11(n,v,o):this._sc12(n,v,o)},disposeCookie:function(n){return MooTools.version==1.11?this._gc11(n,null,true).empty():Cookie.dispose(n)},_gc11:function(n,o,rc){o=$pick(o,{autoSave:false});var c=new Hash.Cookie(n,o);return rc?c:c.obj},_gc12:function(n,o,rc){var c=Cookie.read(n);if(!c){Cookie.write(n,'',o);c='{}'}return rc?c:JSON.decode(c)},_sc11:function(n,v,o){var old=this._gc11(n,o,true).extend(v);var e='Could not save cookie "'+n+'"';return old.save()?true:Linkr.setError(e,false)},_sc12:function(n,v,o){var old=Cookie.read(n);old=old?$extend(JSON.decode(old),v):v;Cookie.write(n,JSON.encode(old),o);return true},setReturnPage:function(a,b){var s=false;var n='linkrpage';var o={duration:30};if($type(a)=='string'&&a.length>0){this.disposeCookie(n);s=this.setCookie(n,{'f':a,'a':this.__ca(b)},o)}else if($type(a)=='array'&&a[0].length>0&&a[1].length>0){this.disposeCookie(n);s=this.setCookie(n,{'o':a[0],'m':a[1],'a':this.__ca(b)},o)}else{this.setError('Linkr.setReturnPage: Invalid callback function');return false}return s},createRequest:function(r){return this.requestURL+'&request='+r+'&__linkr='+$time()},createListRequest:function(l,id,k){return this.requestURL+'&request='+l+'&'+$pick(k,'id')+'='+id+'&__linkr='+$time()},json:function(u,fn,e){new Json.Remote(u,{onComplete:fn,onFailure:($type(e)=='function'?e:this.onJsonFailure.bind(this))}).send()},link:function(u,te){var lt=$('linkTitle');var lc=$('linkClass');var lr=$('linkRelation');if(!lt||!lc||!lr)return this.setError('LinkrHelper.link - Missing link title, class, or relation',false);if((te==this.imgAnchor)||(te==this.getSelectedText(0)))var t=this.getSelectedText(1);else var t=te;if($('target'))var lx=$('target').value;else var lx='';var l='<a href="'+u+'"';if(lx!='_self')l+=' target="'+lx+'"';if(lt.value.length>0)l+=' title="'+lt.value+'"';if(lc.value.length>0)l+=' class="'+lc.value+'"';if(lr.value.length>0)l+=' rel="'+lr.value+'"';l+='>'+t+'</a>';if(this.mode=='popup'){window.opener.LinkrInsert('object',{url:u,text:t,target:lx,title:lt.value,'class':lc.value,relation:lr.value,html:l},this.editor);return self.close()}this.insert(l)},createToggleLink:function(a,b,c,d,f){if($type(b)=='number'){var dur=b||400;var el=c}else{var el=b;var dur=c||400}var slide=new Fx.Slide($(a),{duration:dur});slide.hide();$(el).addEvent('click',function(e){new Event(e).stop();slide.toggle();if($type(d)=='function'||$type(d)=='array'){var w=slide.wrapper;var args=[(w.offsetHeight==0||w.offsetWidth==0)];if($type(f)=='array')f=args.merge(f);else if($type(f)!=false)args.include(f);Linkr.__af(d,args)}})},getSelectedText:function(h){return(h)?this.HTMLText:this.selectedText},getDefaultText:function(d){return this.selectedText.length>0?this.selectedText:d},insertAtEnd:function(a){this.fireEvent('onInsert',a);var pw=this.mode=='popup'?window.opener:window.parent;switch(this.editorPlugin){case'FCK2.5':case'FCK2.6':var i=pw.FCKeditorAPI.GetInstance(this.editor),n=i.GetData()+a;i.SetData(n);break;case'CKEditor3.0':case'CKEditor3.1':case'CKEditor3.2':case'CKEditor3.3':case'CKEditor3.4':case'CKEditor3.5':case'CKEditor3.6':case'CKEditor3.7':case'CKEditor3.8':case'CKEditor3.9':var i=pw.CKEDITOR.instances[this.editor],n=i.getData()+a;i.setData(n);break;case'TinyMCE2':var i=pw.tinyMCE.selectedInstance,n=i.getHTML()+a;i.setHTML(n);break;case'JCE':case'JCE3':case'TinyMCE3':var i=pw.tinyMCE.activeEditor,n=i.getContent()+a;i.setContent(n);break;case'TME1.1':case'TME1.2':var i=pw.editortext,n=i.getInnerHTML()+a;i.setHTML(n);break;case'XStandard':var i=pw.document.getElementById('xstandard'),n=i.value+a;i.value=n;break;case'XHTMLSuite1':case'XHTMLSuite2':var i=pw.xs_text,n=i.getHTML()+a;i.setHTML(n);break;case'Xinha':var i=pw.xinha_editors[this.editor],n=i.getHTML()+a;i.setHTML(n);break;default:pw.jInsertEditorText(a,this.editor)}(this.mode=='popup')?self.close():window.parent.document.getElementById('sbox-window').close()},insert:function(a){this.fireEvent('onInsert',a);if(this.mode=='popup'){window.opener.LinkrInsert('string',a,this.editor);return self.close()}window.parent.jInsertEditorText(a,this.editor);window.parent.document.getElementById('sbox-window').close()},getVersion:function(){return this.majorVersion+'.'+this.minorVersion+'.'+this.buildVersion},idleDiv:function(div,wide){var el=$(div);if($type(el)=='element')el.setHTML(wide?this.wideLoading:this.loading);return el},delayIdleDiv:function(el,wide,dur){el=$(el);if(!el)return this.setError('Linkr.delayIdleDiv: Invalid element');dur=$pick(dur,70);var fx=new Fx.Style(el,'opacity',{duration:dur}).start(1.0,0);if($type(wide)=='element'){wide.injectInside.delay((dur+20),wide,el)}else if($type(wide)=='string'){div=new Element('div').setHTML(wide);div.injectInside.delay((dur+20),div,el)}else if($type(wide)=='function'){wide.delay((dur+20))}else{this.idleDiv.delay((dur+20),this,[el,wide])}fx.start.delay((dur+40),fx,[0,1.0])},delayDisplay:function(el,dur,func,args){el=$(el);if(!el)return this.setError('Linkr.delayDisplay: Invalid element');dur=$pick(dur,70);var fx=new Fx.Style(el,'opacity',{duration:dur}).start(1.0,0);if($type(func)=='function'||$type(func)=='array')this.__af.delay((dur+10),this,[func,args]);fx.start.delay((dur+30),fx,[0,1.0])},htmlLayout:function(t,h){var c=[new Element('div',{styles:{margin:'10px 0 10px 80px','font-weight':'bold','font-size':14}}).setHTML(t)];if($type(h)=='array')c.merge(h);else if($type(h)=='string')c.include(new Element('div').setHTML(h));else c.include(h);this.htmlContent('layout',c)},htmlContent:function(div,c,clear){div=$(div);if($type(div)!='element')return;if(clear!==false)div.empty();if($type(c)=='string')new Element('div').setHTML(c).injectInside(div);if($type(c)=='element')c.injectInside(div);if($type(c)=='array'){var i=new Element('div').injectInside(div);c.each(function(el){Linkr.htmlContent(i,el,false)})}},htmlInput:function(n,v,o){if($type(o)!='object')o={};if($type(v)!='string'&&$type(v)!='number')v='';o.id=n;o.name=n;o.value=v;return new Element(document.createElement('input'),o)},htmlSelect:function(li,n,chg,s){if($type(s)!='object')s={};if($type(chg)!='function')chg=Class.empty;var o={id:n,name:n,styles:s,events:{change:chg}};return this.htmlSelectCustom(li,o)},htmlSelectCustom:function(li,opt,test){if($type(opt)!='object')opt={};var sel=new Element(document.createElement('select'),opt);if($type(li)=='array'){li.each(function(o){if($type(o)=='string'){var t=o;var v=o;var i=''}else{var v=o[0];var t=o[1]||v;var i=o[2]||''}new Element('option',{id:v,value:v,selected:i.contains('selected'),disabled:i.contains('disabled')}).setHTML(t).injectInside(sel)})}return sel},htmlConfigLink:function(u,t,x){if($type(t)!='string'||t.trim()=='')t=this.getL18N('LC_ATTRIBUTES');var s=[['linkText',this.getL18N('LC_TEXT'),this.getSelectedText()],['target',this.getL18N('LC_TARGET'),[['_self',this.getL18N('LC_TARGET_SELF'),'selected'],['_blank',this.getL18N('LC_TARGET_BLANK')]]],['linkTitle',this.getL18N('LC_TITLE')],['linkClass',this.getL18N('LC_CLASS')],['linkRelation',this.getL18N('LC_RELATION')]];if($type(x)=='array')s.merge(x);return this.htmlConfig(u,s,t)},htmlConfig:function(u,s,t){if($type(u)!='string'||u.trim()=='')u='index.php';if($type(t)!='string'||t.trim()=='')t=this.getL18N('LC_ATTRIBUTES');if($type(s)!='array')s=[];var cfg=new Element('div',{id:'settings'});new Element('div',{styles:{margin:'5px 0','text-align':'center','font-weight':'bold'}}).setHTML(t).injectInside(cfg);var ui=false;s.each(function(el){var id=el[0]||$time()+$random(1,999);var lbl=new Element('label',{'for':id}).setHTML(el[1]||'');if($type(el[2])=='array')var i=this.htmlSelectCustom(el[2],{id:id});else if($type(el[2])=='element')var i=el[2];else var i=this.htmlInput(id,el[2],{'class':'inputbox value'});lbl.injectInside(cfg);i.injectAfter(lbl);new Element('div',{styles:{clear:'both'}}).injectAfter(i);if(id=='linkURL')ui=true}.bind(this));if(!ui)this.htmlInput('linkURL',u,{type:'hidden'}).injectInside(cfg);return cfg},htmlTBLinks:function(lks,opt){var tb=new Element('div',$pick(opt,{styles:{margin:'5px 0','text-align':'center','font-weight':'bold'}}));if($type(lks)!='array'||lks.length<1)return tb;lks.each(function(el){var o={};o.href='javascript:void(0);';o.styles={'font-weight':'bold'};o.id=el[0]||$time()+$random(1,999);if($type(el[2])=='function'){var r=el[2];var c=el[2]}else if($type(el[2])=='string'){var r=Class.empty;var c=Class.empty;Linkr.setError('Linkr.htmlTBLinks: Function supplied as string')}else if($type(el[2])=='array'){var fo=el[2][0];var fm=el[2][1];if($type(fo)=='object'&&$type(fm)=='string'&&fm.length>1){var r=fo;var c=fo[fm]}else{var r=Class.empty;var c=Class.empty}}else{var r=Class.empty;var c=Class.empty}var fa=Linkr.__ca(el[3]);o.events={click:function(e){new Event(e).stop();return c.attempt(fa,r)}};if($type(el[1])=='string'&&el[1].length>0)var txt=el[1];else var txt='';new Element('a',o).setHTML(txt).injectInside(tb);new Element('span').setHTML('&nbsp;&nbsp;&bull;&nbsp;&nbsp;').injectInside(tb)});tb.getLast().remove();return tb},htmlToolTips:function(a){a.each(this._tips.build,this._tips)},htmlToolTip:function(el){this._tips.build.attempt(el,this._tips)},getItemids:function(q,o,func,args){if($type(func)!='function'&&$type(func)!='array')return this.setError('Linkr.getItemids: Invalid callback function');if($type(func)=='array'&&($type(func[0])!='object'||$type(func[1])!='string'))return this.setError('Linkr.getItemids: Invalid callback method');var cols=$pick(o.columns,['id','name','link']);var w=[];if($type(q)=='array'&&q.length>0)w.include(this._iqv(q));if($type(q)=='object'){var qm=[];for(qn in q){if($type(q[qn])=='array'&&q[qn].length>0)qm.include(this._iqv(q[qn]))}w.include('('+qm.join(' OR ')+')')}if($defined(o.componentid))w.include('componentid='+o.componentid.toInt());if($defined(o.menutype))w.include('menutype='+Linkr.dbQuote(o.menutype));if($defined(o.type))w.include('type='+Linkr.dbQuote(o.type));if($defined(o.parent))w.include('parent='+o.parent.toInt());w.include('published=1');var sql=' SELECT '+cols.join(',')+' FROM '+Linkr.dbNameQuote('#__menu')+' WHERE '+w.join(' AND ')+' ORDER BY ordering,id';return Linkr.dbList(sql,0,0,func,args)},_iqv:function(q){var s=[];q.each(function(e){var a=Linkr.dbQuote('%'+e);var b=Linkr.dbQuote('%'+e+'&%');s.include('(link LIKE '+a+' OR link LIKE '+b+')')});return'('+s.join(' AND ')+')'},dbList:function(q,s,l,fn,args){if($type(q)!='string'||q.length<1)return this.setError('Linkr.dbList: Empty query string');if($type(fn)!='function'&&$type(fn)!='array')return this.setError('Linkr.dbList: Invalid callback function');if($type(fn)=='array'&&($type(fn[0])!='object'||$type(fn[1])!='string'))return this.setError('Linkr.dbList: Invalid callback method');var u=this.createRequest('dblist'+this.dbQuery(q));u+='&s='+$pick(s,0)+'&l='+$pick(l,0);var callback=function(dbResult){return Linkr.__af(fn,Linkr.__ca(args,[dbResult]))};this.json(u,callback)},dbObject:function(q,fn,args){if($type(q)!='string'||q.length<1)return this.setError('Linkr.dbObject: Empty query string');if($type(fn)!='function'&&$type(fn)!='array')return this.setError('Linkr.dbObject: Invalid callback function');if($type(fn)=='array'&&($type(fn[0])!='object'||$type(fn[1])!='string'))return this.setError('Linkr.dbObject: Invalid callback method');var u=this.createRequest('dbobject'+this.dbQuery(q));var callback=function(dbResult){return Linkr.__af(fn,Linkr.__ca(args,[dbResult]))};this.json(u,callback)},dbEscape:function(str,extra){if($type(str)!='string'||str.length<1)return'';str=str.replace(/\x00/g,'\\0');str=str.replace(/\n/g,'\\n');str=str.replace(/\r/g,'\\r');str=str.replace(/['"]/g,"\\$&");str=str.replace(/\x1a/g,'\\Z');if(extra===true)str=str.replace(/[%_]/g,"\\$&");return str},dbQuote:function(str,esc){if($type(str)!='string'||str.length<1)return'';str=esc?this.dbEscape(str):str;if(str.contains('%'))str=str.replace(/%/g,'_WC_');return'_Q_'+str+'_Q_'},dbNameQuote:function(n){return'_NQ_'+n+'_NQ_'},dbQuery:function(q){if($type(q)!='string'||q.length<1)return'';q=this.Base64.Encode(q,true);var u='';if(q.length>60){while(q.length>60){u+='&q[]='+q.substr(0,60);q=q.substr(60)}u+='&q[]='+q}else{u+='&q[]='+q}return u},isError:function(o){return(this.isDBRO(o)&&o.status=='error')},isDBRO:function(o){return($type(o)=='object'&&$type(o.status)=='string')},listFiles:function(f,x,fn,args){if($type(f)!='string'||f.length<1)return this.setError('Linkr.listFiles: No folder specified');if($type(x)=='string')x=[x];if($type(x)!='array'||x.length<1)x=['all'];f=this.Base64.Encode(f);var u=this.createListRequest('paths',f,'f')+'&e='+x.join('-');var callback=function(fileList){return Linkr.__af(fn,Linkr.__ca(args,[fileList]))};this.json(u,callback)},onJsonFailure:function(r){var d=new Element('div',{styles:{padding:10,'background-color':'#dddddd'}});new Element('span').setHTML('Linkr says:').injectInside(d);new Element('a',{href:'http://wikipedia.org/wiki/Error_'+r.status,target:'_blank',styles:{margin:'0 0 0 3px'}}).setHTML('error '+r.status).injectInside(d);if(r.responseText.length>0){new Element('div',{styles:{padding:5,'font-style':'italic'}}).setHTML(r.responseText).injectInside(d)}new Element('div',{styles:{margin:5}}).injectInside(d);new Element('a',{href:'http://j.l33p.com/forums/forum?id=1',target:'_blank',styles:{margin:'0 3px 0 0'}}).setHTML('Click here').injectInside(d);new Element('span').setHTML('to go to the Linkr Support page.').injectInside(d);Linkr.htmlLayout('JSON Error!',d)},dump:function(obj,deep,inArray,level){var dump='';var pad='';if(!level)level=0;for(var j=0;j<level+1;j++){pad+='   '}var type=$type(obj);pad+='['+type.capitalize()+'] ';if(type=='object'||type=='array'||type=='class'||type=='regexp'){for(var i in obj){var v=obj[i];if(typeof v!='function'||deep){var t=$type(v);if(t=='object'||t=='array'||t=='class'||t=='regexp'){dump+=pad+i+':\n';dump+=this.dump(v,deep,true,level+1)}else{dump+=pad+i+': "'+v+'"\n'}}}}else if(type=='element'||type=='textnode'||type=='whitespace'){dump='['+obj.nodeName.capitalize()+']'}else{dump='['+type.capitalize()+'] '+obj}if(!inArray)alert(dump);else return dump}});LinkrAPI.implement(new Events,new Options);sprintfWrapper={init:function(){if($type(arguments)!='arguments')return'';if(arguments.length<1)return'';if($type(arguments[0])!='string')return'';if($type(RegExp)==false)return'';var string=arguments[0];var exp=new RegExp(/(%([%]|(\-)?(\+|\x20)?(0)?(\d+)?(\.(\d)?)?([bcdfosxX])))/g);var matches=new Array();var strings=new Array();var convCount=0;var stringPosStart=0;var stringPosEnd=0;var matchPosEnd=0;var newString='';var match=null;while(match=exp.exec(string)){if(match[9])convCount+=1;stringPosStart=matchPosEnd;stringPosEnd=exp.lastIndex-match[0].length;strings[strings.length]=string.substring(stringPosStart,stringPosEnd);matchPosEnd=exp.lastIndex;matches[matches.length]={match:match[0],left:match[3]?true:false,sign:match[4]||'',pad:match[5]||' ',min:match[6]||0,precision:match[8],code:match[9]||'%',negative:parseInt(arguments[convCount])<0?true:false,argument:String(arguments[convCount])}}strings[strings.length]=string.substring(matchPosEnd);if(matches.length==0)return string;if((arguments.length-1)<convCount)return'';var code=null;var match=null;var i=null;for(i=0;i<matches.length;i++){if(matches[i].code=='%'){substitution='%'}else if(matches[i].code=='b'){matches[i].argument=String(Math.abs(parseInt(matches[i].argument)).toString(2));substitution=sprintfWrapper.convert(matches[i],true)}else if(matches[i].code=='c'){matches[i].argument=String(String.fromCharCode(parseInt(Math.abs(parseInt(matches[i].argument)))));substitution=sprintfWrapper.convert(matches[i],true)}else if(matches[i].code=='d'){matches[i].argument=String(Math.abs(parseInt(matches[i].argument)));substitution=sprintfWrapper.convert(matches[i])}else if(matches[i].code=='f'){matches[i].argument=String(Math.abs(parseFloat(matches[i].argument)).toFixed(matches[i].precision?matches[i].precision:6));substitution=sprintfWrapper.convert(matches[i])}else if(matches[i].code=='o'){matches[i].argument=String(Math.abs(parseInt(matches[i].argument)).toString(8));substitution=sprintfWrapper.convert(matches[i])}else if(matches[i].code=='s'){matches[i].argument=matches[i].argument.substring(0,matches[i].precision?matches[i].precision:matches[i].argument.length);substitution=sprintfWrapper.convert(matches[i],true)}else if(matches[i].code=='x'){matches[i].argument=String(Math.abs(parseInt(matches[i].argument)).toString(16));substitution=sprintfWrapper.convert(matches[i])}else if(matches[i].code=='X'){matches[i].argument=String(Math.abs(parseInt(matches[i].argument)).toString(16));substitution=sprintfWrapper.convert(matches[i]).toUpperCase()}else{substitution=matches[i].match}newString+=strings[i];newString+=substitution}newString+=strings[i];return newString},convert:function(match,nosign){if(nosign)match.sign='';else match.sign=match.negative?'-':match.sign;var l=match.min-match.argument.length+1-match.sign.length;var pad=new Array(l<0?0:l).join(match.pad);if(!match.left){if(match.pad=='0'||nosign)return match.sign+pad+match.argument;return pad+match.sign+match.argument}else{if(match.pad=='0'||nosign)return match.sign+match.argument+pad.replace(/0/g,' ');return match.sign+match.argument+pad}}};window.addEvent('domready',function(){Linkr.addEventListener('onLoad',function(){if($type(Linkr.__fr)=='function')return Linkr.__fr.attempt();var c=Linkr.getCookie('linkrpage');var a=$pick(c.a,[]);if($defined(c.f))return Linkr.__af(window[c.f],a);if($defined(c.o)&&$defined(c.m))return Linkr.__af([window[c.o],c.m],a)});if(window.parent.SqueezeBox)window.parent.SqueezeBox.addEvent('onClose',function(){Linkr.fireEvent('onClose')});else self.onunload=function(){Linkr.fireEvent('onClose')}});

T1KUS90T
  root-grov@210.1.60.28:~$