Uname:Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64

Base Dir : /var/www/html

User : gavin


403WebShell
403Webshell
Server IP : 68.183.124.220  /  Your IP : 216.73.217.137
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : gavin ( 1000)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins/ninja-forms/deprecated/includes/display/form/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/ninja-forms/deprecated/includes/display/form/response-message.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;
/*
 * Outputs the HTML for displaying success messages or error messages set to display at location 'general'
 *
 */

function ninja_forms_display_response_message( $form_id ){
	global $ninja_forms_processing;

//	if ( ! is_object( $ninja_forms_processing ) || $ninja_forms_processing->get_form_ID() != $form_id ) {
//		return false;
//	}

	$plugin_settings = nf_get_settings();

	$form_row = ninja_forms_get_form_by_id($form_id);
	if( isset( $form_row['data']['ajax'] ) ){
		$ajax = $form_row['data']['ajax'];
	}else{
		$ajax = 0;
	}

	if( $ajax == 0 AND ( is_object( $ninja_forms_processing ) AND !$ninja_forms_processing->get_all_errors() AND !$ninja_forms_processing->get_all_success_msgs() ) ){
		$display = 'display:none;';
	}else{
		$display = '';
	}

	if( is_object( $ninja_forms_processing ) ){
		if( $ninja_forms_processing->get_errors_by_location('general') ){
			$class = 'ninja-forms-error-msg';
		}else if( $ninja_forms_processing->get_all_success_msgs() ){
			$class = 'ninja-forms-success-msg';
		}else{
			$class = '';
		}
	}else{
		$class = '';
	}

	$class = apply_filters( 'ninja_forms_display_response_message_class', $class, $form_id );

	//if ( $class != '' ) {
		echo '<div id="ninja_forms_form_' . $form_id . '_response_msg" style="' . $display . '" class="ninja-forms-response-msg '.$class.'">';
			
		if ( isset ( $ninja_forms_processing ) && $ninja_forms_processing->get_form_ID() == $form_id ) {
				
			if( is_object( $ninja_forms_processing ) ){
				if( $ninja_forms_processing->get_form_ID() == $form_id ){
					if( $ninja_forms_processing->get_errors_by_location('general') ){
						foreach($ninja_forms_processing->get_errors_by_location('general') as $error){
							echo '<div>';
							echo $error['msg'];
							echo '</div>';
						}
					}


					if( $ninja_forms_processing->get_all_success_msgs()){
						foreach($ninja_forms_processing->get_all_success_msgs() as $success){
							echo '<div>';
							echo $success;
							echo '</div>';
						}
					}
				}
			}
		}
			


		echo '</div>';		
	//}

	
}

add_action( 'ninja_forms_display_before_form', 'ninja_forms_display_response_message', 10 );

Youez - 2016 - github.com/yon3zu
LinuXploit