Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 18.223.239.65
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/softaculous/sitepad/editor/site-data/plugins/pagelayer-pro/js/react/src/components/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/softaculous/sitepad/editor/site-data/plugins/pagelayer-pro/js/react/src/components/padding.js
import { useState, useRef } from '@wordpress/element';
import { LabelControl } from './label';

export const PaddingControl = (props) =>{
		
	const { prop, label, value, setAttributes} = props;
	const { name } = prop['c'];
	
	var values = !pagelayer_empty(value) ? value : ['', '', '', ''];
	
	if(pagelayer_is_string(values)){
		values = values.split(',');
	}

	const [isLinked, setIsLinked] = useState(true);
	const paddingRef = useRef(null);
	
	const handleInputChange = (index, e) => {
		
		const newValue = parseFloat(e.target.value);
		
		let newValues = [...values];
		if (isLinked) {
			newValues = newValues.map(() => newValue);
		} else {
			newValues[index] = newValue;
		}
		
		if(prop?.units){
			newValues = setUnit(newValues);
		}
		
		setAttributes({[name]: newValues});
		
	};
	
	const setUnit = (val) => {
		var unit = paddingRef.current.querySelectorAll('.pagelayer-elp-units .selected')[0].innerHTML;
		
		if(Array.isArray(val)){
			for(var i in val){
				if(val[i].length < 1){
					continue;
				}
				val[i] = parseFloat(val[i])+unit;
			}
		}else{
			val = parseFloat(val)+unit;
		}
		
		return val;
	}

	return (
		<div className="components-base-control pagelayer-base-control" ref={paddingRef}>
			<LabelControl {...props}/>
			<div className="pagelayer-elp-padding-div">
				<input
					type="number"
					className="pagelayer-elp-padding"
					value={parseFloat(values[0])}
					onChange={(e) => handleInputChange(0, e)}
				/>
				<input
					type="number"
					className="pagelayer-elp-padding"
					value={parseFloat(values[1])}
					onChange={(e) => handleInputChange(1, e)}
				/>
				<input
					type="number"
					className="pagelayer-elp-padding"
					value={parseFloat(values[2])}
					onChange={(e) => handleInputChange(2, e)}
				/>
				<input
					type="number"
					className="pagelayer-elp-padding"
					value={parseFloat(values[3])}
					onChange={(e) => handleInputChange(3, e)}
				/>
				<i
				className={`pli pli-link${isLinked ? ' pagelayer-elp-padding-linked' : ''}`}
				onClick={ () => setIsLinked(!isLinked) }
				></i>
			</div>
		</div>
	);
}

Youez - 2016 - github.com/yon3zu
LinuXploit