403Webshell
Server IP : 85.112.90.236  /  Your IP : 192.168.1.26
Web Server : Apache
System : Linux 85-112-90-236.cprapid.com 6.12.0-211.7.3.el10_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 12:46:58 EDT 2026 x86_64
User : ftechme ( 1002)
PHP Version : 8.2.32
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/ftechme/public_html/wp-content/mu-plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/ftechme/public_html/wp-content/mu-plugins/ftech-gallery-protection.php
<?php
/**
 * Plugin Name: Faisal Technology Protected Gallery
 * Description: Visual polish, WebP gallery layout, and casual download protection for ftech.me photography.
 * Version: 1.0.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

add_action(
	'wp_enqueue_scripts',
	function () {
		wp_register_style( 'ftech-gallery-protection', false, array(), '1.0.0' );
		wp_enqueue_style( 'ftech-gallery-protection' );
		wp_add_inline_style(
			'ftech-gallery-protection',
			<<<'CSS'
.ft-site h1,
.ftech-photo-story h1 {
	text-wrap: balance;
}

.ft-page-hero h1 {
	font-size: clamp(2.4rem, 5.2vw, 4.9rem);
	max-width: 1040px;
}

.ft-page-hero p {
	color: #405365;
}

.ftech-photo-story {
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto 90px;
	color: var(--ft-ink, #071B2C);
}

body.page-id-8 .entry-header,
body.page-id-52 .entry-header,
body.postid-42 .entry-header,
body.postid-43 .entry-header {
	display: none;
}

.ftech-photo-story__hero {
	padding: 88px 0 34px;
}

.ftech-photo-story__kicker {
	margin: 0 0 14px;
	color: var(--ft-forest, #176F64);
	font-size: 0.84rem;
	font-weight: 850;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}

.ftech-photo-story h1 {
	margin: 0;
	max-width: 980px;
	font-size: clamp(2.3rem, 5vw, 4.7rem);
	line-height: 1.05;
	letter-spacing: 0;
}

.ftech-photo-story__lead {
	max-width: 780px;
	margin: 22px 0 0;
	color: #4E6072;
	font-size: 1.14rem;
	line-height: 1.75;
}

.ftech-photo-meta {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin: 30px 0 44px;
}

.ftech-photo-meta div {
	padding: 18px 20px;
	border: 1px solid rgba(7, 27, 44, 0.1);
	border-radius: 8px;
	background: linear-gradient(135deg, #fff, #F2F7F5);
	box-shadow: 0 10px 28px rgba(7, 27, 44, 0.055);
}

.ftech-photo-meta span {
	display: block;
	margin-bottom: 5px;
	color: var(--ft-forest, #176F64);
	font-size: 0.78rem;
	font-weight: 850;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.ftech-photo-meta strong {
	color: var(--ft-ink, #071B2C);
	font-size: 1.05rem;
}

.ftech-photo-sections {
	display: grid;
	gap: 58px;
}

.ftech-photo-section {
	padding-top: 4px;
}

.ftech-photo-section__head {
	display: grid;
	grid-template-columns: minmax(0, 0.78fr) minmax(280px, 0.48fr);
	gap: 28px;
	align-items: end;
	margin: 0 0 18px;
	padding-bottom: 18px;
	border-bottom: 1px solid rgba(7, 27, 44, 0.12);
}

.ftech-photo-section__head h2 {
	margin: 0;
	color: var(--ft-ink, #071B2C);
	font-size: clamp(1.55rem, 2.8vw, 2.5rem);
	line-height: 1.1;
	letter-spacing: 0;
}

.ftech-photo-section__head p {
	margin: 0;
	color: #526477;
	font-size: 1rem;
	line-height: 1.65;
}

.ftech-protected-gallery {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	-webkit-user-select: none;
	user-select: none;
}

.ftech-protected-gallery figure {
	position: relative;
	grid-column: span 4;
	min-height: 390px;
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
	background: #071B2C;
	box-shadow: 0 18px 46px rgba(7, 27, 44, 0.18);
	cursor: zoom-in;
}

.ftech-protected-gallery figure:focus-visible {
	outline: 3px solid #35D6C4;
	outline-offset: 4px;
}

.ftech-protected-gallery--count-1 figure,
.ftech-protected-gallery--count-1 figure:nth-child(1) {
	grid-column: 1 / -1;
	min-height: 560px;
}

.ftech-protected-gallery--count-2 figure,
.ftech-protected-gallery--count-2 figure:nth-child(1) {
	grid-column: span 6;
	min-height: 480px;
}

.ftech-protected-gallery figure:nth-child(1),
.ftech-protected-gallery figure:nth-child(6) {
	grid-column: span 6;
	min-height: 520px;
}

.ftech-protected-gallery figure:nth-child(4),
.ftech-protected-gallery figure:nth-child(9) {
	grid-column: span 5;
}

.ftech-protected-gallery figure:nth-child(5),
.ftech-protected-gallery figure:nth-child(10) {
	grid-column: span 7;
}

.ftech-protected-photo,
.ftech-protected-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	background-position: center;
	background-size: cover;
	transform: scale(1.01);
	transition: transform 700ms ease, filter 700ms ease;
	pointer-events: none;
}

.ftech-protected-gallery figure:hover .ftech-protected-photo,
.ftech-protected-gallery figure:hover .ftech-protected-img {
	transform: scale(1.045);
	filter: saturate(1.06) contrast(1.02);
}

.ftech-protected-gallery figure::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(180deg, rgba(7, 27, 44, 0.03), rgba(7, 27, 44, 0.66)),
		radial-gradient(circle at 20% 12%, rgba(53, 214, 196, 0.16), transparent 28%);
	pointer-events: none;
}

.ftech-protected-gallery figure::after {
	content: "Faisal Technology";
	position: absolute;
	right: 16px;
	top: 16px;
	z-index: 2;
	padding: 7px 10px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	background: rgba(7, 27, 44, 0.42);
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	backdrop-filter: blur(10px);
}

.ftech-protected-gallery figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 54px 22px 20px;
	background: linear-gradient(180deg, transparent, rgba(7, 27, 44, 0.78));
	color: #fff;
	font-size: 0.96rem;
	font-weight: 650;
	line-height: 1.45;
	text-shadow: 0 1px 18px rgba(0, 0, 0, 0.3);
}

.ftech-gallery-note {
	max-width: 760px;
	margin: 26px 0 0;
	color: #526477;
	font-size: 0.98rem;
}

body.ftech-lightbox-open {
	overflow: hidden;
}

.ftech-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	gap: 14px;
	padding: 18px;
	background: rgba(5, 16, 26, 0.94);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 180ms ease, visibility 180ms ease;
}

.ftech-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.ftech-lightbox__top {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.ftech-lightbox__stage {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 0;
}

.ftech-lightbox__img {
	max-width: min(100%, 1800px);
	max-height: 100%;
	width: auto;
	height: auto;
	display: block;
	border-radius: 8px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
	-webkit-user-select: none;
	user-select: none;
}

.ftech-lightbox__caption {
	max-width: 980px;
	margin: 0 auto;
	color: rgba(255, 255, 255, 0.9);
	font-size: 1rem;
	line-height: 1.55;
	text-align: center;
}

.ftech-lightbox__caption strong {
	display: block;
	margin-bottom: 4px;
	color: #fff;
	font-size: 1.08rem;
}

.ftech-lightbox__button {
	width: 44px;
	height: 44px;
	display: inline-grid;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.26);
	border-radius: 999px;
	background: rgba(7, 27, 44, 0.72);
	color: #fff;
	font-size: 1.45rem;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.ftech-lightbox__button:hover,
.ftech-lightbox__button:focus-visible {
	border-color: rgba(53, 214, 196, 0.78);
	background: rgba(23, 111, 100, 0.92);
	transform: translateY(-1px);
	outline: none;
}

.ftech-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

.ftech-lightbox__nav--prev {
	left: 14px;
}

.ftech-lightbox__nav--next {
	right: 14px;
}

.ftech-ar .ftech-photo-story,
.ftech-ar .ftech-photo-section__head,
.ftech-ar .ftech-photo-story__lead,
.ftech-ar .ftech-gallery-note {
	direction: rtl;
	text-align: right;
}

.ftech-ar .ftech-protected-gallery figure::after {
	right: auto;
	left: 16px;
	content: "Faisal Technology";
}

@media (max-width: 900px) {
	.ftech-photo-story {
		width: min(100% - 32px, 760px);
		margin-bottom: 64px;
	}

	.ftech-photo-story__hero {
		padding-top: 58px;
	}

	.ftech-photo-meta {
		grid-template-columns: 1fr;
	}

	.ftech-photo-sections {
		gap: 46px;
	}

	.ftech-photo-section__head {
		grid-template-columns: 1fr;
		gap: 10px;
		margin-bottom: 14px;
	}

	.ftech-protected-gallery {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.ftech-protected-gallery figure,
	.ftech-protected-gallery figure:nth-child(1),
	.ftech-protected-gallery figure:nth-child(4),
	.ftech-protected-gallery figure:nth-child(5),
	.ftech-protected-gallery figure:nth-child(6),
	.ftech-protected-gallery figure:nth-child(9),
	.ftech-protected-gallery figure:nth-child(10) {
		grid-column: auto;
		min-height: 430px;
	}

	.ftech-protected-gallery--count-1 figure,
	.ftech-protected-gallery--count-1 figure:nth-child(1),
	.ftech-protected-gallery--count-2 figure,
	.ftech-protected-gallery--count-2 figure:nth-child(1) {
		grid-column: auto;
		min-height: 430px;
	}
}

@media (max-width: 560px) {
	.ft-page-hero h1,
	.ftech-photo-story h1 {
		font-size: clamp(2.05rem, 11vw, 3.05rem);
		line-height: 1.08;
	}

	.ftech-photo-story__lead {
		font-size: 1rem;
	}

	.ftech-photo-section__head h2 {
		font-size: clamp(1.42rem, 8vw, 2.05rem);
	}

	.ftech-protected-gallery figure,
	.ftech-protected-gallery figure:nth-child(1),
	.ftech-protected-gallery figure:nth-child(4),
	.ftech-protected-gallery figure:nth-child(5),
	.ftech-protected-gallery figure:nth-child(6),
	.ftech-protected-gallery figure:nth-child(9),
	.ftech-protected-gallery figure:nth-child(10) {
		min-height: 370px;
	}

	.ftech-protected-gallery figcaption {
		padding: 46px 18px 18px;
		font-size: 0.9rem;
	}

	.ftech-lightbox {
		padding: 12px;
	}

	.ftech-lightbox__caption {
		font-size: 0.92rem;
	}

	.ftech-lightbox__button {
		width: 40px;
		height: 40px;
		font-size: 1.25rem;
	}

	.ftech-lightbox__nav--prev {
		left: 8px;
	}

	.ftech-lightbox__nav--next {
		right: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ftech-lightbox,
	.ftech-lightbox__button,
	.ftech-protected-photo,
	.ftech-protected-img {
		transition: none;
	}
}
CSS
		);

		wp_register_script( 'ftech-gallery-protection', false, array(), '1.0.0', true );
		wp_enqueue_script( 'ftech-gallery-protection' );
		wp_add_inline_script(
			'ftech-gallery-protection',
			<<<'JS'
document.addEventListener('contextmenu', function (event) {
	if (event.target.closest('.ftech-protected-gallery, .ftech-lightbox')) {
		event.preventDefault();
	}
});

document.addEventListener('dragstart', function (event) {
	if (event.target.closest('.ftech-protected-gallery, .ftech-lightbox')) {
		event.preventDefault();
	}
});

document.addEventListener('keydown', function (event) {
	if (!event.target.closest('.ftech-protected-gallery')) {
		return;
	}
	var key = String(event.key || '').toLowerCase();
	if ((event.ctrlKey || event.metaKey) && (key === 's' || key === 'u' || key === 'p')) {
		event.preventDefault();
	}
});

(function () {
	var items = [];
	var currentIndex = -1;
	var lastFocus = null;
	var isArabic = document.documentElement.lang && document.documentElement.lang.toLowerCase().indexOf('ar') === 0;
	var labels = isArabic
		? { close: 'إغلاق', previous: 'السابق', next: 'التالي' }
		: { close: 'Close', previous: 'Previous', next: 'Next' };

	function createLightbox() {
		var existing = document.querySelector('.ftech-lightbox');
		if (existing) {
			return existing;
		}

		var box = document.createElement('div');
		box.className = 'ftech-lightbox';
		box.setAttribute('role', 'dialog');
		box.setAttribute('aria-modal', 'true');
		box.setAttribute('aria-label', isArabic ? 'عرض الصورة بحجم كبير' : 'Large photo viewer');
		box.innerHTML =
			'<div class="ftech-lightbox__top"><button class="ftech-lightbox__button ftech-lightbox__close" type="button" aria-label="' + labels.close + '">&times;</button></div>' +
			'<div class="ftech-lightbox__stage">' +
			'<button class="ftech-lightbox__button ftech-lightbox__nav ftech-lightbox__nav--prev" type="button" aria-label="' + labels.previous + '">&#8249;</button>' +
			'<img class="ftech-lightbox__img" alt="" draggable="false">' +
			'<button class="ftech-lightbox__button ftech-lightbox__nav ftech-lightbox__nav--next" type="button" aria-label="' + labels.next + '">&#8250;</button>' +
			'</div>' +
			'<p class="ftech-lightbox__caption" aria-live="polite"></p>';
		document.body.appendChild(box);
		return box;
	}

	function syncItems() {
		items = Array.prototype.slice.call(document.querySelectorAll('.ftech-protected-gallery figure[data-ftech-full]'));
	}

	function setImage(index) {
		if (!items.length) {
			return;
		}
		currentIndex = (index + items.length) % items.length;
		var item = items[currentIndex];
		var box = createLightbox();
		var img = box.querySelector('.ftech-lightbox__img');
		var caption = box.querySelector('.ftech-lightbox__caption');
		var title = item.getAttribute('data-ftech-title') || '';
		var text = item.getAttribute('data-ftech-caption') || title;

		img.src = item.getAttribute('data-ftech-full');
		img.alt = title || text;
		caption.innerHTML = '<strong>' + escapeHtml(title) + '</strong>' + escapeHtml(text);
	}

	function escapeHtml(value) {
		return String(value || '').replace(/[&<>"']/g, function (char) {
			return { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#039;' }[char];
		});
	}

	function openAt(index, trigger) {
		lastFocus = trigger || document.activeElement;
		setImage(index);
		var box = createLightbox();
		box.classList.add('is-open');
		document.body.classList.add('ftech-lightbox-open');
		box.querySelector('.ftech-lightbox__close').focus();
	}

	function closeLightbox() {
		var box = document.querySelector('.ftech-lightbox');
		if (!box || !box.classList.contains('is-open')) {
			return;
		}
		box.classList.remove('is-open');
		document.body.classList.remove('ftech-lightbox-open');
		box.querySelector('.ftech-lightbox__img').removeAttribute('src');
		if (lastFocus && typeof lastFocus.focus === 'function') {
			lastFocus.focus();
		}
	}

	document.addEventListener('click', function (event) {
		var figure = event.target.closest('.ftech-protected-gallery figure[data-ftech-full]');
		var box = event.target.closest('.ftech-lightbox');

		if (figure) {
			syncItems();
			openAt(items.indexOf(figure), figure);
			return;
		}

		if (!box) {
			return;
		}

		if (event.target.matches('.ftech-lightbox__close') || event.target === box) {
			closeLightbox();
		} else if (event.target.matches('.ftech-lightbox__nav--prev')) {
			setImage(currentIndex - 1);
		} else if (event.target.matches('.ftech-lightbox__nav--next')) {
			setImage(currentIndex + 1);
		}
	});

	document.addEventListener('keydown', function (event) {
		var key = event.key;
		var openBox = document.querySelector('.ftech-lightbox.is-open');
		var figure = event.target.closest('.ftech-protected-gallery figure[data-ftech-full]');

		if (figure && (key === 'Enter' || key === ' ')) {
			event.preventDefault();
			syncItems();
			openAt(items.indexOf(figure), figure);
			return;
		}

		if (!openBox) {
			return;
		}

		if (key === 'Escape') {
			event.preventDefault();
			closeLightbox();
		} else if (key === 'ArrowLeft') {
			event.preventDefault();
			setImage(currentIndex - 1);
		} else if (key === 'ArrowRight') {
			event.preventDefault();
			setImage(currentIndex + 1);
		}
	});
})();
JS
		);
	},
	35
);

Youez - 2016 - github.com/yon3zu
LinuXploit