403Webshell
Server IP : 172.24.0.40  /  Your IP : 216.73.216.10
Web Server : Apache
System : Linux dbweb26.ust.edu.ph 4.18.0-513.5.1.el8_9.x86_64 #1 SMP Fri Sep 29 05:21:10 EDT 2023 x86_64
User : apache ( 48)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/ajels/public_html/wp-content/plugins/ninja-forms/includes/Adapters/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/ajels/public_html/wp-content/plugins/ninja-forms/includes/Adapters/SubmissionsSubmission.php
<?php
// namespace NinjaForms\Pdf\Adapters;

final class NF_Adapters_SubmissionsSubmission extends NF_Adapters_SubmissionsFields
{
    protected $fields;
    protected $submission;

    public function __construct($fields, $form_id, $submission)
    {
        parent::__construct($fields, $form_id);
        $this->submission = $submission;
    }

    /*
    |--------------------------------------------------------------------------
    | ArrayAccess
    |--------------------------------------------------------------------------
    */

    public function offsetExists($offset)
    {
        if (isset($this->fields[$offset])) {
            return true;
        }
        return $this->offsetMaybeCreate($offset);
    }

    public function offsetGet($offset)
    {
        if (isset($this->fields[$offset])) {
            return $this->fields[$offset];
        }
        return $this->offsetMaybeCreate($offset);
    }

    protected function offsetMaybeCreate($offset)
    {
        foreach ($this->fields as $field) {
            if ($offset != $field->get_setting('key')) {
                continue;
            }

            return $this->fields[$offset] = [
                'id' => $field->get_id(),
                'type' => $field->get_setting('type'),
                'label' => $field->get_setting('label'),
                'admin_label' => $field->get_setting('admin_label'),
                'value' => $this->submission->get_field_value($field->get_id()),
                'key' => $field->get_setting( 'key' ),
                'options' => $field->get_setting( 'options' )
            ];
        }
        return false;
    }

    /*
    |--------------------------------------------------------------------------
    | Iterator
    |--------------------------------------------------------------------------
    */

    public function current()
    {
        $field = current($this->fields);

        return [
            'id' => $field->get_id(),
            'type' => $field->get_setting('type'),
            'label' => $field->get_setting('label'),
            'admin_label' => $field->get_setting('admin_label'),
            'value' => $this->submission->get_field_value($field->get_id()),
            'key' => $field->get_setting( 'key' ),
            'options' => $field->get_setting( 'options' )
        ];
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit