Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux pod-100823:apache2_74:v0.5.7 5.4.0-1138-gcp #147~18.04.1-Ubuntu SMP Mon Oct 7 21:46:26 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33.7
Disable Function : apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,disk_free_space,disk_total_space,diskfreespace,dl,exec,fastcgi_finish_request,link,opcache_compile_file,opcache_get_configuration,opcache_invalidate,opcache_is_script_cached,opcache_reset,passthru,pclose,pcntl_exec,popen,posix_getpid,posix_getppid,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,realpath_cache_get,shell_exec,show_source,symlink,system
Directory :  /nas/content/live/attorneyexperi/wp-content/plugins/redirection/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /nas/content/live/attorneyexperi/wp-content/plugins/redirection/models/module.php
<?php

require_once dirname( dirname( __FILE__ ) ) . '/modules/wordpress.php';
require_once dirname( dirname( __FILE__ ) ) . '/modules/apache.php';
require_once dirname( dirname( __FILE__ ) ) . '/modules/nginx.php';

/**
 * Base class for redirect module.
 */
abstract class Red_Module {
	/**
	 * Constructor. Loads options
	 *
	 * @param array $options Any module options.
	 */
	public function __construct( $options = [] ) {
		if ( ! empty( $options ) ) {
			$this->load( $options );
		}
	}

	/**
	 * Get a module based on the supplied ID, and loads it with appropriate options.
	 *
	 * @param integer $id Module ID.
	 * @return Red_Module|false
	 */
	public static function get( $id ) {
		$id = intval( $id, 10 );
		$options = red_get_options();

		if ( $id === Apache_Module::MODULE_ID ) {
			return new Apache_Module( isset( $options['modules'][ Apache_Module::MODULE_ID ] ) ? $options['modules'][ Apache_Module::MODULE_ID ] : array() );
		}

		if ( $id === WordPress_Module::MODULE_ID ) {
			return new WordPress_Module( isset( $options['modules'][ WordPress_Module::MODULE_ID ] ) ? $options['modules'][ WordPress_Module::MODULE_ID ] : array() );
		}

		if ( $id === Nginx_Module::MODULE_ID ) {
			return new Nginx_Module( isset( $options['modules'][ Nginx_Module::MODULE_ID ] ) ? $options['modules'][ Nginx_Module::MODULE_ID ] : array() );
		}

		return false;
	}

	/**
	 * Check that an ID is valid.
	 *
	 * @param integer $id Module ID.
	 * @return boolean
	 */
	public static function is_valid_id( $id ) {
		if ( $id === Apache_Module::MODULE_ID || $id === WordPress_Module::MODULE_ID || $id === Nginx_Module::MODULE_ID ) {
			return true;
		}

		return false;
	}

	/**
	 * Return a module ID given the module name
	 *
	 * @param string $name Module name.
	 * @return integer|false
	 */
	public static function get_id_for_name( $name ) {
		$names = array(
			'wordpress' => WordPress_Module::MODULE_ID,
			'apache'    => Apache_Module::MODULE_ID,
			'nginx'     => Nginx_Module::MODULE_ID,
		);

		if ( isset( $names[ $name ] ) ) {
			return $names[ $name ];
		}

		return false;
	}

	/**
	 * Flush the module that a group belongs to
	 *
	 * @param integer $group_id Module group ID.
	 * @return void
	 */
	public static function flush( $group_id ) {
		$group = Red_Group::get( $group_id );

		if ( is_object( $group ) ) {
			$module = self::get( $group->get_module_id() );

			if ( $module ) {
				$module->flush_module();
			}
		}
	}

	/**
	 * Flush the module
	 *
	 * @param integer $module_id Module ID.
	 * @return void
	 */
	public static function flush_by_module( $module_id ) {
		$module = self::get( $module_id );

		if ( $module ) {
			$module->flush_module();
		}
	}

	/**
	 * Get the module ID
	 *
	 * @return integer
	 */
	abstract public function get_id();

	/**
	 * Update
	 *
	 * @param array $data Data.
	 * @return false
	 */
	public function update( array $data ) {
		return false;
	}

	/**
	 * Load
	 *
	 * @param array $options Options.
	 * @return void
	 */
	protected function load( $options ) {
	}

	/**
	 * Flush
	 *
	 * @return void
	 */
	protected function flush_module() {
	}
}

Spamworldpro Mini