!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/var/softaculous/sitepad/editor/site-data/plugins/pagelayer/js/react/src/blocks/   drwxr-xr-x
Free 293.44 GB of 429.69 GB (68.29%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     sitemap_item.js (2.33 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import { __ } from '@wordpress/i18n';
import { useState, useMemo, useEffect } from '@wordpress/element';

export const RenderSitemapItem = (props) => {
	const { _props, pl_props, data } = props;
	const { attributes } = _props;
	const { atts } = data;
	const [allData, setAllData] = useState({});
	const [memoizationCache, setMemoizationCache] = useState({});

	useEffect(() => {

		const ajaxUrl = `${pagelayer_ajax_url}&action=${atts.sitemap_type == 'post_type' ? 'pagelayer_get_pages_list' : 'pagelayer_get_taxonomy_list'}`;
		
		// Skip for title attribute
		const cacheKey = JSON.stringify({
			...attributes,
			title: ''
		});
		
		if(memoizationCache[cacheKey]) {
			setAllData(memoizationCache[cacheKey]);
			return;
		}
		
		var data_type = "",
			post_order = "",
			order = "",
			hier = "",
			depth = "",
			empty = "";

		if (atts['sitemap_type'] == 'post_type') {
			data_type = atts['source_post'];
			post_order = atts['order_post'];
			order = atts['order'];
			hier = atts['hierarchical'];
			depth = atts['depth'];
		} else {
			data_type = atts['source_taxonomy'];
			post_order = atts['order_taxonomy'];
			order = atts['order'];
			hier = atts['hierarchical'];
			depth = atts['depth'];
			empty = atts['hide_empty'];
		}
		
		jQuery.ajax({
			type: 'POST',
			url: ajaxUrl,
			data: {
				type: data_type,
				post_order: post_order,
				order: order,
				hier: hier,
				depth: depth,
				empty: empty,
				pagelayer_nonce: pagelayer_ajax_nonce,
			},
			success: function (ajaxResponse) {
				setAllData(ajaxResponse);
				var newMemoizationCache = { ...memoizationCache };
				
				newMemoizationCache[cacheKey] = ajaxResponse;
				setMemoizationCache(newMemoizationCache);
			},
			error: function (error) {
				console.error("Error fetching data:-->", error);
			},
		});

		jQuery('.pagelayer-sitemap-div-holder[data-nofollow] .pagelayer-sitemap-list-item a').attr('rel', 'nofollow');
		
	}, [attributes]);

	return (
		<div className="pagelayer-sitemap-section">
			{allData.length > 0 && (
				<>
					<span>
					{ attributes['title'] ? (
						attributes.title
					) : (
						attributes.sitemap_type === 'post_type' ? __('Pages') : __('Categories')
					)}
					</span>
					<div dangerouslySetInnerHTML={{ __html: allData }} />
				</>
			)}
		</div >
	);
};

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0038 ]--