Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux pod-100823:apache2_74:v0.5.9 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.9
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/mu-plugins/wpengine-common/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /nas/content/live/attorneyexperi/wp-content/mu-plugins/wpengine-common/network.php
<?php
/**
 * Functions for network sites
 *  Package: 
 *  Owner: 
 *	Notes: 
 */


/*
 * Domain Mapping Integration
 */

//first check if domain mapping is on 
if( defined('SUNRISE') && !is_wpe_snapshot() ) {

	// if domain mapping is on let's add the appropriate actions
	add_action('admin_init','wpe_api_domain_manage');

	/*
 	* Domain Mapping Integration
 	*/
	function wpe_api_domain_manage($domain) {


        // Ensure we have some default values, in case they aren't set (Prevents PHP Notices)
        $page    = isset( $_GET['page'] )       ? sanitize_text_field( wp_unslash( $_GET['page'] ) )      : '';
        $action  = isset( $_POST['action'] )    ? sanitize_text_field(  wp_unslash( $_POST['action']  ) )  : '';
        $request = isset( $_REQUEST['action'] ) ? sanitize_text_field(  wp_unslash( $_REQUEST['action'] ) ): '';

		//make sure we're on a domain mapping plugin
		if( $page == 'dm_domains_admin' OR $page == 'domainmapping') {

			//don't do anything if we're editing		
			if($action == 'edit') {
				
				//maybe oneday we'll do something
			
			//save or add the domain	
			} elseif(!empty($_POST) AND ( $action == 'save' OR $action == 'add') ) {

				//validate the referrer
				check_admin_referer('domain_mapping');

				//load the api class
				include_once(WPE_PLUGIN_DIR.'/class-wpeapi.php');
				$api = new WPE_API();

				$domain = isset( $_POST['domain'] ) ? sanitize_text_field(  wp_unslash( $_POST['domain'] ) ) : '';
				if ( preg_match('/(\;|\,|\?)/',$domain) || ! preg_match('/[A-z]|[1-9]|\./',$domain ) ) {

					$api->set_notice("The domain you entered was not valid.");
					if($api->is_error()) {
						unset($_POST);
					}
					
				} else {
					
					//set the method and domain
					$api->set_arg('method','domain');
					$api->set_arg('domain',$domain);
					
					//do the api request and send the reponse to the admin screen
					
					$api->get()->set_notice();

					
				}
			
			//delete a domain
			} elseif( $request == 'delete' OR $request == 'del' ) {

				check_admin_referer('domain_mapping');
				//load the api class
				include_once(WPE_PLUGIN_DIR.'/class-wpeapi.php');
				$api = new WPE_API();

				$request_domain    = isset( $_REQUEST['domain'] )       ? sanitize_text_field(  wp_unslash( $_REQUEST['domain'] ) )      : '';
				//set the method and domain
				$api->set_arg('method','domain-remove');
				$api->set_arg('domain',$request_domain);

				//do the api request and send the reponse to the admin screen
				$api->get()->set_notice();
				error_log('del:'.var_export($api,true));
			} 
				
		}
	} 
}



Spamworldpro Mini