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.216.141
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/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/ninja-forms/deprecated/includes/admin/form-preview.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;

add_action( 'init', 'ninja_forms_preview_form' );
function ninja_forms_preview_form() {
	global $ninja_forms_append_page_form_id;
	if( ! empty ( $_REQUEST['form_id'] ) AND ! empty ( $_REQUEST['preview'] ) ) { //I
		$form_id = absint( $_REQUEST['form_id'] );
		$ninja_forms_append_page_form_id = array($form_id);
		add_filter( 'the_content', 'ninja_forms_append_to_page', 9999 );		
	}
}

function ninja_forms_preview_link( $form_id = '', $echo = true ) {
	if( $form_id == '' ){
		if( isset( $_REQUEST['form_id'] ) ){
			$form_id = absint( $_REQUEST['form_id'] );
		}else{
			$form_id = '';
		}
	}
	$base = home_url();

	$form_data = ninja_forms_get_form_by_id( $form_id );

	$append_page = Ninja_Forms()->form( $form_id )->get_setting( 'append_page' );

	if ( empty( $append_page ) ) {
		$opt =  nf_get_settings();
		if ( isset ( $opt['preview_id'] ) ) {
			$page_id = $opt['preview_id'];
		} else {
			$page_id = '';
		}
	} else {
		$page_id = $append_page;
	}

	if( $echo ){
		$preview_link = '<a target="_blank" href="' . $base . '/?page_id=' . $page_id . '&preview=true&form_id=' . $form_id . '">' . __( 'Preview Form', 'ninja-forms' ) . '</a>';
	}else{
		$preview_link = $base . '/?page_id=' . $page_id . '&preview=true&form_id=' . $form_id;
	}

	return $preview_link;

}

Youez - 2016 - github.com/yon3zu
LinuXploit