AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 13.58.3.32
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/js/scale/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/js/scale/actionsparamstypes.min.js
(function(e){if(BX.Scale.ActionsParamsTypes)return;BX.Scale.ActionsParamsTypes={};BX.Scale.ActionsParamsTypes.Proto={init:function(e,t){this.id=e;this.domNodeId="action_user_param_"+e;this.domNode=null;this.name=t.NAME;this.defaultValue=t.DEFAULT_VALUE;this.required=t.REQUIRED;this.type=t.TYPE;this.title=t.TITLE?t.TITLE:"";this.pattern=t.PATTERN?t.PATTERN:""},createDomNode:function(){},getDomNode:function(){return this.domNode},getValue:function(){var e=false;if(this.domNode&&this.domNode.value!==undefined)e=this.domNode.value;return e}};BX.Scale.ActionsParamsTypes.String=function(e,t){this.init(e,t);this.createDomNode=function(){var e=this.type=="PASSWORD"?"password":"text",t=this;this.domNode=BX.create("INPUT",{props:{id:this.domNodeId,name:this.domNodeId,type:e}});if(this.title)this.domNode.title=this.title;if(this.pattern){var i=new RegExp(this.pattern);BX.bind(this.domNode,"keypress",function(e){var t=e.which||e.keyCode;if(!i.test(String.fromCharCode(t))){if(e.preventDefault)e.preventDefault();else e.returnValue=false}})}if(this.defaultValue!==undefined)this.domNode.value=this.defaultValue;if(this.required!==undefined&&this.required=="Y"){this.domNode.onkeyup=this.domNode.oninput=this.domNode.onpaste=this.domNode.oncut=this.domNode.onblur=function(e){var i=t.isEmpty();BX.onCustomEvent("BXScaleActionParamKeyUp",[{paramId:t.id,empty:i}])}}};this.isEmpty=function(){return this.domNode.value.length<=0};this.createDomNode()};BX.Scale.ActionsParamsTypes.String.prototype=BX.Scale.ActionsParamsTypes.Proto;BX.Scale.ActionsParamsTypes.Checkbox=function(e,t){this.init(e,t);this.checked=t.CHECKED=="Y"||this.defaultValue=="Y";this.string=t.STRING||"";this.createDomNode=function(){this.domNode=BX.create("INPUT",{props:{id:this.domNodeId,name:this.domNodeId,type:"checkbox",checked:this.checked}})};this.getValue=function(){var e=BX(this.domNodeId),t=false;if(e&&e.checked!==undefined)t=e.checked?this.string:"";return t};this.createDomNode()};BX.Scale.ActionsParamsTypes.Checkbox.prototype=BX.Scale.ActionsParamsTypes.Proto;BX.Scale.ActionsParamsTypes.Dropdown=function(e,t){this.init(e,t);this.values=t.VALUES;this.createDomNode=function(){this.domNode=BX.create("SELECT",{props:{id:this.domNodeId,name:this.domNodeId}});for(var e in this.values){var t=BX.create("OPTION");t.appendChild(document.createTextNode(this.values[e]));t.setAttribute("value",e);if(this.defaultValue){t.defaultSelected=true;t.selected=true}this.domNode.appendChild(t)}};this.getValue=function(){var e=false;if(this.domNode.selectedIndex!=-1)e=this.domNode.options[this.domNode.selectedIndex].value;return e};this.createDomNode()};BX.Scale.ActionsParamsTypes.Dropdown.prototype=BX.Scale.ActionsParamsTypes.Proto;BX.Scale.ActionsParamsTypes.Text=function(e,t){this.init(e,t);this.createDomNode=function(){this.domNode=BX.create("DIV");this.textNode=BX.create("SPAN",{html:this.defaultValue});this.inputNode=BX.create("INPUT",{props:{id:this.domNodeId,name:this.domNodeId,type:"hidden"}});if(this.defaultValue!==undefined)this.inputNode.value=this.defaultValue;this.domNode.appendChild(this.inputNode);this.domNode.appendChild(this.textNode)};this.getValue=function(){var e=false;if(this.inputNode&&this.inputNode.value!==undefined)e=this.inputNode.value;return e};this.createDomNode()};BX.Scale.ActionsParamsTypes.Text.prototype=BX.Scale.ActionsParamsTypes.Proto;BX.Scale.ActionsParamsTypes.File=function(e,t){this.remotePaths=[];this.init(e,t);this.createDomNode=function(){this.domNode=BX.create("INPUT",{props:{id:this.domNodeId,name:this.domNodeId,type:"file"}});var e=this;BX.bind(this.domNode,"change",function(){var t=e.domNode.files,i=new FormData;for(var o=0;o<t.length;o++)i.append(e.name,t[o],t[o].name);i.append("params[operation]","upload_files");i.append("sessid",BX.bitrix_sessid());var s=new XMLHttpRequest;s.open("POST","/bitrix/admin/scale_ajax.php",true);s.onload=function(){if(s.status===200){if(s.response){var t=JSON.parse(s.response);if(t){if(t.RESULT&&t.RESULT=="OK"){e.remotePaths=[];if(t.FILES&&t.FILES.length){for(var i=0,o=t.FILES.length;i<o;i++)e.remotePaths.push(t.FILES[i]);BX.onCustomEvent(e.domNode,"BXScaleActionFileGetRemotePaths",[{id:e.id,remotePaths:e.remotePaths}])}}else if(t.ERROR){BX.Scale.AdminFrame.alert(t.ERROR,"File uploading error")}}else{BX.Scale.AdminFrame.alert("Can't parse server answer to json: "+s.response,"Json parsing error")}}}else{BX.Scale.AdminFrame.alert("Can't upload file(s). Status = "+s.status+" ("+s.statusText+")")}};s.send(i)})};this.isEmpty=function(){return this.domNode.value.length<=0};this.getValue=function(){return this.remotePaths};this.createDomNode()};BX.Scale.ActionsParamsTypes.File.prototype=BX.Scale.ActionsParamsTypes.Proto;BX.Scale.ActionsParamsTypes.RemoteAndLocalPath=function(e,t){this.init(e,t);this.createDomNode=function(){this.remotePath=new BX.Scale.ActionsParamsTypes.String(e,t);this.localFile=new BX.Scale.ActionsParamsTypes.File(e+"_lf",t);BX.addCustomEvent(this.localFile.domNode,"BXScaleActionFileGetRemotePaths",BX.proxy(function(e){if(e.remotePaths&&e.remotePaths.length){this.remotePath.domNode.value=e.remotePaths.pop()}},this));this.domNode=BX.create("SPAN",{props:{id:e}});this.domNode.appendChild(this.remotePath.domNode);this.domNode.appendChild(BX.create("SPAN",{html:"&nbsp;"}));this.domNode.appendChild(this.modifyFileInput(this.localFile.domNode));if(this.defaultValue!==undefined)this.remotePath.value=this.defaultValue};this.modifyFileInput=function(e){var t=BX.adminFormTools.modifyFile(e);t.firstChild.innerHTML=BX.message("SCALE_PANEL_JS_LOAD_FILE");t.style.marginLeft="10px";return t};this.getValue=function(){return this.remotePath.getValue()};this.createDomNode()};BX.Scale.ActionsParamsTypes.RemoteAndLocalPath.prototype=BX.Scale.ActionsParamsTypes.Proto})(window);

Anon7 - 2022
AnonSec Team