? 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/file.js

var LinkrFile={landing:function(){Linkr.delayIdleDiv('layout',this.display.bind(this))},display:function(){Linkr.setReturnPage(['LinkrFile','display']);var html=[];if($type(this.msg)=='string'){var msg=Linkr.UTF8.Decode(this.msg);var md=new Element('div');Linkr.insertMsgDiv(msg,md);this.msg=false;html.include(md)}var ls=[];ls.include(['',this._('GET_LINK'),[this,'insert']]);ls.include(['',this._('CANCEL'),[this,'closeConfig']]);var tb=Linkr.htmlTBLinks(ls);var cfg=new Element('div',{id:'settings'});new Element('div',{id:'config'}).injectInside(cfg);tb.injectTop(cfg);html.include(cfg);var fs=new Element('div',{id:'filedirlist'});html.include(Linkr.idleDiv(fs,true));var res=new Element('div',{id:'fileresize'});new Element('img',{src:Linkr.siteRoot+'components/com_linkr/assets/img/arrow.down.png',alt:'(drag to resize)'}).inject(res);new Element('img',{src:Linkr.siteRoot+'components/com_linkr/assets/img/arrow.up.png',alt:'(drag up)'}).inject(res);html.include(res);var dirs=new Element('fieldset',{id:'dirlist'});html.include(Linkr.idleDiv(dirs,false));if(this.uploadURL){var frm=new Element(document.createElement('form'),{id:'uploadForm',name:'uploadForm',method:'post',enctype:'multipart/form-data',action:this.uploadURL,events:{submit:this.uli.bind(this)}});html.include(Linkr.idleDiv(frm,false))}Linkr.htmlLayout(this._('LINK_FILES'),html);this.fileConfig=new Fx.Slide('settings',{duration:300}).hide();this.setDirectoryList();if(this.uploadURL){this.loadUploadForm()}},setDirectoryList:function(i){if(i){if($type(i)!='object')return $('dirlist').setHTML('An error occured');if(Linkr.isError(i))return $('dirlist').setHTML('Error: '+i.msg);if($type(i.folders)!='array')return $('dirlist').setHTML('An error occured');this.directoryList=i.folders;this.baseDirectory=i.info['base.64'];this.currentPath=i.info['path.64']}else if($type(this.directoryList)===false){var u=Linkr.createRequest('dirs');this.setImageDefaults();return Linkr.json(u,this.setDirectoryList.bind(this))}var div=new Element('div',{styles:{'float':'left'}}).injectInside($('dirlist').setHTML(''));new Element('span').setHTML(this._('DIRECTORY')+' ').injectInside(div);var li=new Element('select',{id:'folder',events:{change:function(e){new Event(e).stop();LinkrFile.uFiles(this.getValue())}}}).injectInside(div);this.directoryList.each(function(f,i){new Element('option',{id:f.value,value:f.value}).setHTML(unescape(f.text)).injectInside(li)});this.uFiles()},setImageDefaults:function(){var html=Linkr.getSelectedText(true);if(!html.contains('<img')||!html.contains('/>'))return;this.img={};var w=html.match(/width="(\d+?)"/i);if(w)this.img.width=w[1].toInt();var h=html.match(/height="(\d+?)"/i);if(h)this.img.height=h[1].toInt();var l=html.match(/align="([a-z]+)"/i);if(l)this.img.align=l[1];var t=html.match(/title="([^"]+)"/i);if(t)this.img.title=t[1];var a=html.match(/alt="([^"]+)"/i);if(a)this.img.alt=a[1];var c=html.match(/class="([^"]+)"/i);if(c)this.img.className=c[1]},loadUploadForm:function(){var frm=$('uploadForm');if($type(frm)!='element'||!this.uploadURL.contains(Linkr.siteRoot))return this.setMsg('Upload form error...');frm.empty();var fs=new Element('fieldset',{styles:{'padding-left':10}}).injectInside(frm);new Element('legend').setHTML(this._('UPLOAD')).injectInside(fs);new Element(document.createElement('input'),{id:'file-upload',type:'file',name:'Filedata'}).injectInside(fs);new Element(document.createElement('input'),{id:'file-upload-submit',type:'submit',value:this._('UPLOAD'),styles:{margin:'0 2px'}}).injectInside(fs)},uli:function(e){Linkr.idleDiv('filedirlist',true);$('folder').setProperty('disabled',true);$('dirlist').setStyle('background-color','#ddd')},uFiles:function(d){Linkr.delayIdleDiv('filedirlist',true,70);this._ufsc.delay(100,this,d)},_ufsc:function(d){var u=Linkr.createRequest('files')+'&f='+(d||this.currentPath);Linkr.json(u,this._files.bind(this))},_files:function(i){var div=$('filedirlist');if($type(i)!='object')return div.setHTML('An error occured').setStyle('opacity',1.0);if(Linkr.isError(i))return div.setHTML('Error: '+i.msg).setStyle('opacity',1.0);switch(i.mode){case'simple':var func='_simpleFileList';break;default:var func='_normalFileList'}Linkr.delayDisplay(div,70,[this,func],[div,i]);$(i.current).selected=true;this.currentPath=i.current;$('filedirlist').makeResizable({handle:'fileresize',modifiers:{x:false,y:'height'},limit:{y:[50,250]}})},_simpleFileList:function(div,i){div.setHTML('');new Element('div',{styles:{clear:'both'}}).injectInside(div);var _d=new Element('div',{'class':'s-item'});var _i=new Element('img',{width:12,height:12});var _n=new Element('span',{styles:{margin:'1px 5px'}});if(i.parent){var item=_d.clone().injectInside(div);var icon=_i.clone().injectInside(item);var name=_n.clone().setHTML(this._('UP')).injectInside(item);item.set({events:{click:function(e){new Event(e).stop();LinkrFile.uFiles(i.parent)}}});icon.setProperty('src',Linkr.siteRoot+'administrator/components/com_media/images/folderup_16.png')}if(i.folders.length>0){i.folders.each(function(f){var item=_d.clone().injectInside(div);var icon=_i.clone().injectInside(item);var name=_n.clone().setHTML(f.name).injectInside(item);item.set({title:f.name,events:{click:function(e){new Event(e).stop();LinkrFile.uFiles(f['path.64'])}}});icon.setProperty('src',Linkr.siteRoot+'administrator/components/com_media/images/folder_sm.png')})}if(i.files.length>0){var _l=new Element('a',{href:'javascript:void(0);'});var ix=['bmp','gif','jpg','jpeg','odg','png','xcf'];var ig={width:12,height:12,'class':'link'};var igi={alt:'i',title:this._('GET_IMAGE_LINK'),src:Linkr.siteRoot+'components/com_linkr/assets/img/files.link.img.png'};i.files.each(function(f){var li=false;var src=f.src.replace(Linkr.siteRoot,'');var ext=f.name.substr(f.name.lastIndexOf('.')+1).toLowerCase();var item=_d.clone().injectInside(div);var icon=_i.clone().setProperty('src').injectInside(item);var name=_n.clone().setHTML(f.name).injectInside(item);if(ix.contains(ext)){li=_l.clone().setHTML('('+this._('GET_IMAGE_LINK')+')').injectInside(item)}icon.setProperty('src',Linkr.siteRoot+this.getIcon(ext,true));name.set({title:this._('GET_LINK'),events:{click:function(e){new Event(e).stop();LinkrFile.link('text',src,ext)}}});if(li!==false){li.set({events:{click:function(e){new Event(e).stop();LinkrFile.link('image',src)}}})}},this)}},_normalFileList:function(div,i){div.setHTML('');new Element('div',{styles:{clear:'both'}}).injectInside(div);var _a=new Element('div',{'class':'item'});var _b=new Element('div',{'class':'icon linkr-tip'});var _c=new Element('div',{'class':'border'});var _d=new Element('a',{href:'javascript:void(0);'});var _e=new Element('img',{width:32,height:32});var _f=new Element('div',{'class':'name'});if(i.parent){var item=_a.clone().addClass('up').injectInside(div);var icon=_b.clone().injectInside(item);var border=_c.clone().injectInside(icon);var link=_d.clone().injectInside(border);var img=_e.clone().injectInside(link);var name=_f.clone().setHTML(this._('UP')).injectInside(item);icon.set({title:this._('UP'),events:{click:function(e){new Event(e).stop();LinkrFile.uFiles(i.parent)}}});img.setProperty('src',Linkr.siteRoot+'administrator/components/com_media/images/folderup_32.png')}if(i.folders.length>0){var folder=_a.clone().addClass('folder');var fimg=_e.clone().setProperty('src',Linkr.siteRoot+'administrator/components/com_media/images/folder.png');i.folders.each(function(f){var item=folder.clone().injectInside(div);var icon=_b.clone().injectInside(item);var border=_c.clone().injectInside(icon);var link=_d.clone().injectInside(border);var name=f.name.length>9?f.name.substr(0,9)+'...':f.name;fimg.clone().injectInside(link);_f.clone().setHTML(name).injectInside(item);icon.set({title:f.name,events:{click:function(e){new Event(e).stop();LinkrFile.uFiles(f['path.64'])}}})})}if(i.files.length>0){var file=_a.clone().addClass('file');var ig={width:16,height:16,'class':'link'};var igt={alt:'t',title:this._('GET_LINK'),src:Linkr.siteRoot+'components/com_linkr/assets/img/files.link.png'};var igi={alt:'i',title:this._('GET_IMAGE_LINK'),src:Linkr.siteRoot+'components/com_linkr/assets/img/files.link.img.png'};i.files.each(function(f){var src=f.src.replace(Linkr.siteRoot,'');var item=file.clone().injectInside(div);var icon=_b.clone().injectInside(item);var border=_c.clone().injectInside(icon);var img=_e.clone().injectInside(border);var name=_f.clone().injectInside(item);var ltxt=_d.clone().injectInside(name);new Element('img',ig).setProperties(igt).injectInside(ltxt);if(f.type=='Image'){var limg=_d.clone().injectInside(name);new Element('img',ig).setProperties(igi).injectInside(limg)}icon.setProperty('title',f.name+' ('+f.size+')');img.setProperties({width:f.width,height:f.height,src:f.icon});ltxt.set({events:{click:function(e){new Event(e).stop();LinkrFile.link('text',src,f.type)}}});if(f.type=='Image'){limg.set({events:{click:function(e){new Event(e).stop();LinkrFile.link('image',src)}}})}})}var icon=_b.clone().setProperty('title','test');Linkr.htmlToolTips($$('#linkr .icon'))},_:function(t,a){return Linkr.getL18N(t,a)},link:function(t,src,ft){switch(t){case'image':var cfg=this._loadImageConfig(src);break;default:var cfg=this._loadTextConfig(src,ft)}this.fileConfig.slideIn()},_loadTextConfig:function(src,ft){var cfg=$('config').empty();this._getTitle(this._('LC_ATTRIBUTES')).injectInside(cfg);this._getLabel('linkText',this._('LC_TEXT')).injectInside(cfg);this._getInput('linkText',Linkr.getDefaultText(src)).injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('target',this._('LC_TARGET')).injectInside(cfg);Linkr.htmlSelectCustom([['_self',this._('LC_TARGET_SELF'),'selected'],['_blank',this._('LC_TARGET_BLANK')]],{id:'target'}).injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('imgIcon',this._('ADD_TYPE_ICON')).injectInside(cfg);Linkr.htmlSelectCustom([['no',this._('NO'),'selected'],['left',this._('TEXT_LEFT')],['right',this._('TEXT_RIGHT')]],{id:'imgIcon'}).injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('linkTitle',this._('LC_TITLE')).injectInside(cfg);this._getInput('linkTitle','').injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('linkClass',this._('LC_CLASS')).injectInside(cfg);this._getInput('linkClass','').injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('linkRelation',this._('LC_RELATION')).injectInside(cfg);this._getInput('linkRelation','').injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getInput('source',src,true).injectInside(cfg);this._getInput('filetype',ft.toLowerCase(),true).injectInside(cfg);this._getInput('type','text',true).injectInside(cfg)},_loadImageConfig:function(src){var cfg=$('config').empty();this._getTitle(this._('IMAGE')).injectInside(cfg);this._getLabel('imgAlign',this._('ALIGN')).injectInside(cfg);Linkr.htmlSelectCustom([['none',this._('NONE'),'selected'],['top',this._('TOP')],['bottom',this._('BOTTOM')],['middle',this._('MIDDLE')],['left',this._('LEFT')],['right',this._('RIGHT')]],{id:'imgAlign'}).injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);var sp={margin:'0 10px 0 0',width:70};this._getLabel('imgSizeW',this._('LC_IMG_SIZE')).injectInside(cfg);this._getInput('imgSizeW','').setStyles(sp).injectInside(cfg);this._getInput('imgSizeH','').setStyles(sp).injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('imgTitle',this._('LC_TITLE')).injectInside(cfg);this._getInput('imgTitle','').injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('imgDesc',this._('DESCRIPTION')).injectInside(cfg);this._getInput('imgDesc','').injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('imgClass',this._('LC_CLASS')).injectInside(cfg);this._getInput('imgClass','').injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);if($type(this.img)=='object'){if($type(this.img.align)=='string'&&$type($(this.img.align))=='element')$(this.img.align).selected=true;if($type(this.img.width)=='number'&&this.img.width>0)$('imgSizeW').value=this.img.width;if($type(this.img.height)=='number'&&this.img.height>0)$('imgSizeH').value=this.img.height;if($type(this.img.title)=='string')$('imgTitle').value=this.img.title;if($type(this.img.alt)=='string')$('imgDesc').value=this.img.alt;if($type(this.img.className)=='string')$('imgClass').value=this.img.className}this._getTitle(this._('LC_ATTRIBUTES')).injectInside(cfg);this._getLabel('linkText',this._('LC_TEXT')).injectInside(cfg);this._getInput('linkText',Linkr.imgAnchor).setProperty('disabled',true).injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('target',this._('LC_TARGET')).injectInside(cfg);Linkr.htmlSelectCustom([['_self',this._('LC_TARGET_SELF'),'selected'],['_blank',this._('LC_TARGET_BLANK')]],{id:'target'}).injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('linkTitle',this._('LC_TITLE')).injectInside(cfg);this._getInput('linkTitle','').injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('linkClass',this._('LC_CLASS')).injectInside(cfg);this._getInput('linkClass','').injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getLabel('linkRelation',this._('LC_RELATION')).injectInside(cfg);this._getInput('linkRelation','').injectInside(cfg);new Element('div',{styles:{clear:'both'}}).injectInside(cfg);this._getInput('source',src,true).injectInside(cfg);this._getInput('type','image',true).injectInside(cfg)},_getLabel:function(id,t){return new Element('label',{'for':id}).setHTML(t)},_getInput:function(a,b,c){return new Element(document.createElement('input'),{id:a,name:a,value:b,'class':'inputbox value',type:(c?'hidden':'text')})},_getTitle:function(t){return new Element('div',{styles:{margin:'5px 0','text-align':'center','font-weight':'bold'}}).setHTML(t)},insert:function(){if($('type').value=='image')this._insertImage();else this._insertText()},_insertText:function(){var txt=$('linkText').getValue();if(txt.trim().length==0){alert(Linkr.missingText)}else{var ui=$('imgIcon').getValue();if(ui=='left'||ui=='right'){var i=this.getIcon($('filetype').value);if(ui=='left'){txt=i+' '+txt}else{txt+=' '+i}}Linkr.link($('source').value,txt)}},_insertImage:function(){var img='<img src="'+$('source').value+'" border="0"';var d=$('imgDesc').value;if(d.length>0)img+=' alt="'+d+'"';var t=$('imgTitle').value;if(t.length>0)img+=' title="'+t+'"';var l=$('imgAlign').getValue();if(l!='none')img+=' align="'+l+'"';var c=$('imgClass').value;if(c.length>0)img+=' class="'+c+'"';var w=$('imgSizeW').value.toInt();if(w>0)img+=' width="'+w+'"';var h=$('imgSizeH').value.toInt();if(h>0)img+=' height="'+h+'"';Linkr.link($('source').value,img+=' />')},getIcon:function(ty,src){switch(ty){case'doc':case'docx':case'odt':case'rtf':case'txt':case'wps':case'wpt':case'txt':i='components/com_linkr/assets/img/files.icon.doc.png';break;case'pdf':i='images/M_images/pdf_button.png';break;case'csv':case'ods':case'odb':case'wks':case'xlr':case'xls':case'xlsx':case'xlt':case'xltx':i='components/com_linkr/assets/img/files.icon.table.png';break;case'aiff':case'asf':case'avi':case'm3u':case'mid':case'mov':case'mp3':case'mp4':case'mpg':case'mpeg':case'odg':case'odp':case'ogg':case'ppt':case'qt':case'rm':case'vqa':case'wav':i='components/com_linkr/assets/img/files.icon.media.png';break;case'bmp':case'gif':case'jpg':case'jpeg':case'odg':case'png':case'xcf':case'image':i='components/com_linkr/assets/img/files.icon.image.png';break;case'swf':i='components/com_linkr/assets/img/files.icon.swf.png';break;case'jar':case'rar':case'tar':case'zip':case'gz':case'bz2':i='components/com_linkr/assets/img/files.icon.archive.png';break;case'css':case'js':case'xml':i='components/com_linkr/assets/img/files.icon.script.png';break;default:i='components/com_linkr/assets/img/files.icon.png'}return src?i:'<img src="'+i+'" border="0" />'},closeConfig:function(){this.fileConfig.slideOut()},dump:function(a){var dump=Linkr.dump(a,false,true);dump=dump.replace(/\n/g,'<br/>');dump=dump.replace(/\s/g,'&nbsp;');var debug=new Element('div').setHTML(dump);Linkr.htmlLayout(this._('FILES'),debug);return false}};

T1KUS90T
  root-grov@210.1.60.28:~$