�PNG  IHDR22?�� pHYs  �� OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*! J�!��Q�EEȠ�����Q, � ��!���������{�kּ������>���� �H3Q5� �B�������.@� $p�d!s�#�~<<+"��x� �M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH���� � 0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4���������x����6��_-��"bb���ϫp@�t~��,/��;�m��%�h^ �u��f�@����W�p�~<�5�j>{�-�]c�K'Xt����o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A��,���� �`6�B$��BB d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(�� A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=� �C��7�F� �dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8, �c˱"� ���V����cϱw�E� 6wB aAHXLXN�H� $4� 7 �Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[ �b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w ��Ljg(�gw��L�Ӌ�T071���oUX*�*|�� �J�&�*/T����ު U�U�T��^S}�FU3S� Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k ��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN �(���~���)�)�4L�1e\k����X�H�Q�G�6������E�Y��A�J'\'Gg����S�Sݧ �M=:��.�k���Dw�n��^��Lo��y���}/�T�m���G X� $� �<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��= ���Z~s�r:V:ޚΜ�?}����/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z���������ۯ�6�i�ܟ�4�)�Y3s���C�Q��? ��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�������!h�쐭!��Α�i�P~���a�a��~ '���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl������� �{�/�]py�����.,:�@L�N8��A*��%�w%� y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y- �B��TZ(�*�geWf�͉�9���+��̳�ې7�����ᒶ��KW-X潬j9�������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n �ڴ �V����E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa��n��{��4���[���>ɾ�UUM�f�e�I���?�������m]�Nmq����#�׹���=TR��+�G�����w- 6 U����#pDy��� �� :�v�{���vg/jB��F�S��[b[�O�>����z�G��499�?r����C�d�&����ˮ/~�����јѡ�򗓿m|������������x31^�V���w�w��O�| (�h���SЧ��������c3-� cHRMz%������u0�`:�o�_�F5IDATx��ytUս�?�;���fN$$��@B�!�k��� -*�gE���j�O�kQ�ʠ`U�B_ �AÐ0%�Ȕ�@r3ޛ;߳��$�@��v����^�s����������$��ߢ !�W��5�̱'-٘������4�>�Rƫ$�G��0U�H}�_ _� #��k�MJ/=�9Du *ڲ�k�PQ;0��j|�*�$�^컂脛y���>�z×� B��� ��(�:$�ʔ_�6��C!B����MVx��a��ζyY����j��ƋY2�9�F�{r��r�딟F��Q��hY6��� x��[l��RC��������nt@��;P��3��� F�w��7��:�P���ɋ'���mj���Bƪ�$�Q�L��y��߷g��\���z����v5�p�v$�v櫻�`6~K �Y�X����,�:��"�o�e0II"(��,������l_�C���/4�+f�E�!q��:����u����c��樼.UE�@� �]K�W���$-�h]�JG���Dz)�`��.�A/ ���mᏣc�3jK� �!�>���$�Q�!�_�? \�C2(E �M$Z I{�U���s�ǣ���=��@Բe ޻��W�����@ �w����}�9v,)��.}*|"�s��di���,���G�]W�AC�������|<����[��ߕ������K�*�G nߴ!��‹��J�!��6(L�a)��Am��������;adf��:�xm��nh�;֦I��(���o�C~ډa?�=��s����h��E������xp����)���_���t��W�����´;8���`dz=(��@@�+,�;�`�fhl��XȌ�3,uI�~z(J����� �ZX�A����H'�À�㜦�82|��a�n�z2��I���� ���EY�h�ε<�0�q�{��C��v�˅��?"@��χ�x�WS+��N�~�KQ�J�8ل�� _.W��� !TU{�����,��"�� �;�������HI S� ��))�o�1�H�D� ���� (� ;����"Ҕ��,���� �F=���O��&�Ph>�`���y��߲ &S��P�<��'��1s�1cĂ�N����2)����@�u��tv��<�+�-&�����h��[!FSG���' � z z0��<����8d&�����E0�,��<��"!P�b4��� �{S�����X����.�囤���T��hEF��X�q0"-<����h���]�Py*����F⩍��@v�˂�Y08�� .q��a��s����(!<̫1�3�L�H��7sYW�`��qtu�\7��?�@�Y�� %Ka�x�GZ�*W�P��y�����N0r9��Z�c�%���q,��k�����!!,��>���IB��� �x1�Xu�Y���v-���ֺ��N������JP��a�2`�e5��w��u;�6�i���̃��(K���ťa��(l51��JL��O'%���]���ٖ뿉!��{*�p+f ���i8��D�ȑ���ܩ�M��V��ӟz��x�7Z�1i}�^͜���6e����x��)u�d�ˏ�V�eG�\�X1�����=n�U'�~Y����L�\,�(d!x ,�:�TW8� M`r���@��r+v�Q0��>^;˴�VbF��('����� �*O��i��j�Ӆ����^�S3&� ���{������.ی�� N;��NU%d0�Ce\r"�C�b��&t7N�7��� �ȪD�[%l�۪�$��'m?�A9tI�9>��NVL ��� 6v~M�����ъ�B���0����9$&=ώm��W�0���L���&��E���f�f��'+�9��hv��7,���M��6�D�&�^� �����8 D֮�����o��k^z��O��hP�8q�5d*��YVq3�{��������#LX4�?��jP=3�~�؅c�ݰ�̱�ұ��8̲��2�G�����j��έ�9��w7���U�X�w�85C��?!I&���o&����L���I#�^�eV�,�^t5�k� �xs˛\��U�8��."���{���ǵ�l4��ݼ�;��r"���G�/~���gJV�N糦��ZZ^k+NN�D��I$�=OE�z����|*�*{��%k���G��>�`9��b;�s���8,�qs��c��.b��q�%�>r��n�R�Ƨ�%�,�A��le#�8���}; 21�0�b�&�QX�f���q�00����$>�h�N�'�a3��A���/�r ��L5�8�GԲ'�����w;��c#�q1���h$*��V^�k��QĽ�b:i������� ����H F#�_���,��]g����Ը����`RUU���� ��"�qD���>-��ϤI�~��3�̴�����NZ[[555�eeek7�m����YF#[��Đ��R��i��L�H�r ��@��J-�Pŝ��_|�-��6y��ks�V�U~��6���w.����(��0A� 4��f��� /���C�xŊ�ٳ����z=6�����rg���mKo��o�/����a�g���?'9%9��P��斓��~���L{�� �H��{AW��B��$����v�1b�&Mb�ر��ر#�0`�`xMBp! )Z�Nmo�mZ�g�}�eذaWTVV ���'99��C5��&�&+5�bT>|8��PUUETT����&���t��~TE%��'������b�tEGG;RSS�S�N�v��ѯ��t����u1@�ޚ"f��͈���r'L�Ph��m��ƌ�74o��`�x�q�P���NRSS�X,�����l&&&��MFFA!-��`��ҷ�n��Yuu�����x<I�LB%����KԒ50�!�3�bz�����ʸKL���;---�l6[��`��������Ȏ;�����egg4��!D�T��jWujyZ��������K����%����p�^���X,6��sV=�ܖ����6�3�X ���4ҿ��A2�&����_k�;d�� �VfOIEND�B`� 0x0x
PHP 8.1.34
Preview: AdminPage.php Size: 11.02 KB
/home2/astrociv/public_html/avitours.in/wp-content/plugins/imunify-security/inc/App/Views/AdminPage.php
<?php
/**
 * Copyright (с) Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2025 All Rights Reserved
 *
 * Licensed under CLOUD LINUX LICENSE AGREEMENT
 * https://www.cloudlinux.com/legal/
 */

namespace CloudLinux\Imunify\App\Views;

use CloudLinux\Imunify\App\AccessManager;
use CloudLinux\Imunify\App\Api\AjaxHandler;
use CloudLinux\Imunify\App\View;
use CloudLinux\Imunify\App\DataStore;

/**
 * Admin page view for Imunify Security.
 */
class AdminPage extends View {

	/**
	 * Page slug for the admin menu.
	 */
	const PAGE_SLUG = 'imunify-security';

	/**
	 * Action name for rendering the iframe.
	 */
	const IFRAME_ACTION = 'render_imunify_iframe';

	/**
	 * Fragment of the embedded SPA route that opens the upgrade page.
	 */
	const UPGRADE_URI_FRAGMENT = '/AV/client/upgrade';

	/**
	 * Data store instance.
	 *
	 * @var DataStore
	 */
	private $dataStore;

	/**
	 * Access manager instance.
	 *
	 * @var AccessManager
	 */
	private $accessManager;

	/**
	 * Constructor.
	 *
	 * @param AccessManager $accessManager Access manager instance.
	 * @param DataStore     $dataStore     Data store instance.
	 */
	public function __construct( AccessManager $accessManager, DataStore $dataStore ) {
		$this->dataStore     = $dataStore;
		$this->accessManager = $accessManager;

		add_action( 'admin_menu', array( $this, 'addAdminMenu' ) );
		add_action( 'admin_post_' . self::IFRAME_ACTION, array( $this, 'renderIframeTemplate' ) );
	}

	/**
	 * Absolute URL of the plugin's admin page. Shared by every view that
	 * links into the embedded Imunify UI (widget upgrade CTA, malware / WAF
	 * deep links, bot-protection upsell) so the base URL lives in one place.
	 *
	 * @since 4.1.0
	 *
	 * @return string
	 */
	public static function pageUrl() {
		return add_query_arg(
			'page',
			self::PAGE_SLUG,
			admin_url( 'admin.php' )
		);
	}

	/**
	 * Deep link into the embedded UI's upgrade page. Shared upsell CTA
	 * target for the widget and the bot-protection monitoring tooltip.
	 *
	 * @since 4.1.0
	 *
	 * @return string
	 */
	public static function upgradeUrl() {
		return self::pageUrl() . '#' . self::UPGRADE_URI_FRAGMENT;
	}

	/**
	 * Add admin menu item for Imunify Security.
	 *
	 * @return void
	 */
	public function addAdminMenu() {
		if ( ! $this->dataStore->isDataAvailable() ) {
			return;
		}

		add_menu_page(
			esc_html__( 'Imunify Security', 'imunify-security' ),
			esc_html__( 'Imunify Security', 'imunify-security' ),
			'manage_options',
			self::PAGE_SLUG,
			array( $this, 'renderPage' ),
			'dashicons-shield-alt',
			80 // Position after "Settings".
		);

		// WordPress auto-adds a first submenu item that duplicates the top-level
		// title; a same-slug add_submenu_page relabels it to "Dashboard".
		add_submenu_page(
			self::PAGE_SLUG,
			esc_html__( 'Imunify Security', 'imunify-security' ),
			esc_html__( 'Dashboard', 'imunify-security' ),
			'manage_options',
			self::PAGE_SLUG,
			array( $this, 'renderPage' )
		);
	}

	/**
	 * Render the admin page.
	 *
	 * @return void
	 */
	public function renderPage() {

		echo '<style type="text/css">';
		echo '#wpcontent { padding-top: 0; padding-left: 0; }';
		echo '#footer-upgrade { display: none; }';
		echo '</style>';

		$iframe_url = admin_url( 'admin-post.php?action=' . self::IFRAME_ACTION );
		echo '<iframe 
			id="imunify-angular-iframe"
			style="width: 100%; border: none; min-height: 450px;"
			src="' . esc_url( $iframe_url ) . '"
			allowtransparency="true">
		</iframe>';

		echo '<script>
				window.addEventListener("message", function(event) {
					if (event?.data?.type === "iframe-resize") {
						const wpFooterHeight = document.getElementById("wpfooter")?.scrollHeight || 0;
						document.getElementById("wpbody-content").style.paddingBottom = wpFooterHeight + "px";

						const wpAdminBarHeight = document.getElementById("wpadminbar")?.scrollHeight || 0;
						const availableHeight = window.innerHeight - wpAdminBarHeight - wpFooterHeight - 5;
						const newHeight = Math.max(450, availableHeight, event.data.height) + "px";
						const iframe = document.getElementById("imunify-angular-iframe");

						if (iframe && iframe.style.height !== newHeight) {
							iframe.style.height = newHeight;
						}
					} else if (event?.data?.type === "imunify-url-hash-changed") {
						if (window.location.hash !== event.data.hash) {
							window.location.hash = event.data.hash;
						}
					} else if (event?.data?.type === "imunify-session-expired") {
						// Reload only the iframe to avoid navigating the parent to site homepage
						if (window.__i360IframeReloadTs && Date.now() - window.__i360IframeReloadTs < 5000) {
							return;
						}
						window.__i360IframeReloadTs = Date.now();
						const iframe = document.getElementById("imunify-angular-iframe");
						if (iframe) {
							var baseSrc = iframe.src.split("#")[0];
							iframe.src = window.location.hash ? (baseSrc + window.location.hash) : baseSrc;
						} else {
							// Fallback: reload the whole page if iframe not found
							window.location.reload();
						}
					}
				});
				document.addEventListener("DOMContentLoaded", function() {
					const iframe = document.getElementById("imunify-angular-iframe");
					if (window.location.hash) {
						iframe.src = iframe.src + window.location.hash;
					}
				});
		</script>';
	}

	/**
	 * Render the iframe template.
	 *
	 * @since 2.0.0
	 *
     * @phpcs:disable WordPress.WhiteSpace.PrecisionAlignment.Found
     * @phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
	 * @phpcs:disable WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet
	 * @phpcs:disable WordPress.WP.EnqueuedResources.NonEnqueuedScript
	 */
	public function renderIframeTemplate() {
		$pluginUrl       = plugin_dir_url( IMUNIFY_SECURITY_FILE_PATH );
		$uiAppAssetsPath = $pluginUrl . 'assets/ui-app/assets/';

		$endpointUrl = add_query_arg(
			array(
				'action'      => AjaxHandler::AJAX_ACTION,
				'_ajax_nonce' => wp_create_nonce( AjaxHandler::AJAX_NONCE_NAME ),
			),
			admin_url( 'admin-ajax.php' )
		);

		$scanData  = $this->dataStore->getScanData();
		$license   = is_null( $scanData ) ? array() : $scanData->getLicense();
		$licenseId = self::extractLicenseId( $license );

		$locale      = get_user_locale();
		$localeShort = substr( $locale, 0, 2 );

		$canUserUpgrade        = $this->accessManager->canUserUpgrade( $this->dataStore );
		$canUserUpgradeJsValue = $canUserUpgrade ? 'true' : 'false';

		header( 'Content-Type: text/html; charset=UTF-8' );
		?>
			<!DOCTYPE html>
			<html lang="en">
				<head>
					<meta charset="utf-8">
					<base href="/">
					<title><?php esc_html_e( 'Imunify Security', 'imunify-security' ); ?></title>

					<link href="<?php echo $uiAppAssetsPath; ?>static/container.css" rel="stylesheet">
					<link href="<?php echo $uiAppAssetsPath; ?>static/fonts/fonts.css?v=<?php echo esc_attr( self::assetToken( IMUNIFY_SECURITY_PATH . '/assets/ui-app/assets/static/fonts/fonts.css' ) ); ?>" rel="stylesheet">
	
					<script type="text/javascript">
						window.IS_WORDPRESS_PLUGIN = true;
						window.I360_PATH_TO_STATIC = "<?php echo esc_url( $uiAppAssetsPath ); ?>";
						window.clientAction = "<?php echo $endpointUrl; ?>";
						window.adminAction = "<?php echo $endpointUrl; ?>";
						window.i360userName = "<?php echo esc_js( $this->dataStore->getUsername() ); ?>";
						window.IMUNIFY_PACKAGE = "<?php echo esc_js( $licenseId ); ?>";
						window.MYIMUNIFY_DISABLED = true;
						window.I360_SHOW_UPGRADE_BUTTON_FOR_END_USER = <?php echo $canUserUpgradeJsValue; ?>;
						window.I360_SHOW_IMUNIFY_SECURITY_UPGRADE_PAGE = <?php echo $canUserUpgradeJsValue; ?>;
						localStorage.setItem('lang', "<?php echo esc_js( $localeShort ); ?>");

						document.addEventListener('DOMContentLoaded', function () {
							const sendHeight = () => {
								const height = document.body.scrollHeight;
								window.parent.postMessage({ type: 'iframe-resize', height: height }, '*');
							};

							const resizeObserver = new ResizeObserver(() => {
								sendHeight();
							});

							resizeObserver.observe(document.body);
							window.addEventListener('load', sendHeight);

							setTimeout(sendHeight, 200);
						});
					</script>
	
					<script src="<?php echo $uiAppAssetsPath; ?>static/shared-dependencies/system.min.js"></script>
					<script src="<?php echo $uiAppAssetsPath; ?>static/shared-dependencies/amd.min.js"></script>
					<script src="<?php echo $uiAppAssetsPath; ?>static/shared-dependencies/named-exports.min.js"></script>
					<script src="<?php echo $uiAppAssetsPath; ?>static/shared-dependencies/named-register.min.js"></script>
					<script src="<?php echo $uiAppAssetsPath; ?>static/shared-dependencies/zone.min.js"></script>
					<script src="<?php echo $uiAppAssetsPath; ?>static/load-scripts-after-zone.js?v=<?php echo esc_attr( self::assetToken( IMUNIFY_SECURITY_PATH . '/assets/ui-app/assets/static/load-scripts-after-zone.js' ) ); ?>"></script>
					<style>
						body, html {
							margin: 0;
							padding: 0;
						}
						.i360-app__container {
							margin-top: 20px;
							margin-left: 20px;
							margin-right: 20px;
						}

						.i360-app__loader {
							position: absolute;
							top: 0;
							left: 0;
							right: 0;
							bottom: 0;
						}
					</style>
				</head>

				<body>
					<div id="spa_wrapper" class="display-flex-column"></div>
					<template id="single-spa-layout">
						<single-spa-router mode="hash" containerEl="#spa_wrapper">
							<div class="i360-app i360-app-outer i360-app__container">
								<application name="@imunify/nav-root"></application>
								<div class="main-content">
									<route default>
										<application name="@imunify/other-root" loader="loader"></application>
									</route>
								</div>
							</div>
							<div class="i360-app__loader">
								<div class="i360-app__loader-icon"></div>
							</div>
						</single-spa-router>
					</template>
				</body>
			</html>
			<?php
			exit();
	}

	/**
	 * Checks if the admin page should be rendered.
	 *
	 * @param string $hook The current admin page hook.
	 * @return bool
	 */
	public function willBeRendered( $hook ) {
		return 'toplevel_page_' . self::PAGE_SLUG === $hook && $this->dataStore->isDataAvailable();
	}

	/**
	 * Extract license ID from license data.
	 *
	 * @since 2.0.2
	 *
	 * @param array|null $license License data array.
	 * @return string License ID ('360' if contains '360', 'AV' otherwise, defaults to '360' if not found).
	 */
	public static function extractLicenseId( $license ) {
		if ( ! is_array( $license ) || ! isset( $license['license_type'] ) ) {
			return '360';
		}

		$processed = strtoupper( str_ireplace( 'imunify', '', $license['license_type'] ) );
		if ( strpos( $processed, '360' ) !== false ) {
			return '360';
		}

		return 'AV';
	}

	/**
	 * Cache token for a bundled UI file: the first 8 hex digits of its SHA-256, as the panels use.
	 *
	 * @since 4.1.4
	 *
	 * @param string $path Path to the file.
	 * @return string Content token, or the plugin version when the file cannot be read.
	 */
	public static function assetToken( $path ) {
		$hash = is_readable( $path ) ? hash_file( 'sha256', $path ) : false;

		return false === $hash ? IMUNIFY_SECURITY_VERSION : substr( $hash, 0, 8 );
	}
}

Directory Contents

Dirs: 1 × Files: 5
Name Size Perms Modified Actions
Display DIR
- drwxr-xr-x 2026-11-03 01:06:25
Edit Download
11.02 KB lrwxr-xr-x 2026-11-03 01:06:25
Edit Download
46.32 KB lrwxr-xr-x 2026-11-03 01:06:25
Edit Download
45.53 KB lrwxr-xr-x 2026-11-03 01:06:25
Edit Download
52.39 KB lrwxr-xr-x 2026-11-03 01:06:25
Edit Download
12.48 KB lrwxr-xr-x 2026-11-03 01:06:25
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 0xNothings — Secure File Manager. All rights reserved. Built with ❤️ & Tailwind x Dark UI