HEX
Server: nginx/1.16.1
System: Linux iZ7xv2zauie3qihz0jlnrxZ 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: www (1000)
PHP: 7.2.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/shzthfdcpg.com/wp-content/plugins/contact-form-7/admin/includes/admin-functions.php
<?php

function wpcf7_current_action() {
	if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
		return $_REQUEST['action'];
	}

	if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
		return $_REQUEST['action2'];
	}

	return false;
}

function wpcf7_admin_has_edit_cap() {
	return current_user_can( 'wpcf7_edit_contact_forms' );
}

function wpcf7_add_tag_generator( $name, $title, $elm_id, $callback, $options = array() ) {
	$tag_generator = WPCF7_TagGenerator::get_instance();
	return $tag_generator->add( $name, $title, $callback, $options );
}

function wpcf7_save_contact_form( $post_id = -1 ) {
	if ( -1 != $post_id ) {
		$contact_form = wpcf7_contact_form( $post_id );
	}

	if ( empty( $contact_form ) ) {
		$contact_form = WPCF7_ContactForm::get_template();
	}

	if ( isset( $_POST['post_title'] ) ) {
		$contact_form->set_title( $_POST['post_title'] );
	}

	if ( isset( $_POST['wpcf7-locale'] ) ) {
		$locale = trim( $_POST['wpcf7-locale'] );

		if ( wpcf7_is_valid_locale( $locale ) ) {
			$contact_form->locale = $locale;
		}
	}

	$properties = $contact_form->get_properties();

	if ( isset( $_POST['wpcf7-form'] ) ) {
		$properties['form'] = trim( $_POST['wpcf7-form'] );
	}

	$mail = $properties['mail'];

	if ( isset( $_POST['wpcf7-mail-subject'] ) ) {
		$mail['subject'] = trim( $_POST['wpcf7-mail-subject'] );
	}

	if ( isset( $_POST['wpcf7-mail-sender'] ) ) {
		$mail['sender'] = trim( $_POST['wpcf7-mail-sender'] );
	}

	if ( isset( $_POST['wpcf7-mail-body'] ) ) {
		$mail['body'] = trim( $_POST['wpcf7-mail-body'] );
	}

	if ( isset( $_POST['wpcf7-mail-recipient'] ) ) {
		$mail['recipient'] = trim( $_POST['wpcf7-mail-recipient'] );
	}

	if ( isset( $_POST['wpcf7-mail-additional-headers'] ) ) {
		$headers = '';
		$tempheaders = str_replace(
			"\r\n", "\n", $_POST['wpcf7-mail-additional-headers'] );
		$tempheaders = explode( "\n", $tempheaders );

		foreach ( $tempheaders as $header ) {
			$header = trim( $header );

			if ( '' !== $header ) {
				$headers .= $header . "\n";
			}
		}

		$mail['additional_headers'] = trim( $headers );
	}

	if ( isset( $_POST['wpcf7-mail-attachments'] ) ) {
		$mail['attachments'] = trim( $_POST['wpcf7-mail-attachments'] );
	}

	$mail['use_html'] = ! empty( $_POST['wpcf7-mail-use-html'] );
	$mail['exclude_blank'] = ! empty( $_POST['wpcf7-mail-exclude-blank'] );

	$properties['mail'] = $mail;

	$mail_2 = $properties['mail_2'];

	$mail_2['active'] = ! empty( $_POST['wpcf7-mail-2-active'] );

	if ( isset( $_POST['wpcf7-mail-2-subject'] ) ) {
		$mail_2['subject'] = trim( $_POST['wpcf7-mail-2-subject'] );
	}

	if ( isset( $_POST['wpcf7-mail-2-sender'] ) ) {
		$mail_2['sender'] = trim( $_POST['wpcf7-mail-2-sender'] );
	}

	if ( isset( $_POST['wpcf7-mail-2-body'] ) ) {
		$mail_2['body'] = trim( $_POST['wpcf7-mail-2-body'] );
	}

	if ( isset( $_POST['wpcf7-mail-2-recipient'] ) ) {
		$mail_2['recipient'] = trim( $_POST['wpcf7-mail-2-recipient'] );
	}

	if ( isset( $_POST['wpcf7-mail-2-additional-headers'] ) ) {
		$headers = '';
		$tempheaders = str_replace(
			"\r\n", "\n", $_POST['wpcf7-mail-2-additional-headers'] );
		$tempheaders = explode( "\n", $tempheaders );

		foreach ( $tempheaders as $header ) {
			$header = trim( $header );

			if ( '' !== $header ) {
				$headers .= $header . "\n";
			}
		}

		$mail_2['additional_headers'] = trim( $headers );
	}

	if ( isset( $_POST['wpcf7-mail-2-attachments'] ) ) {
		$mail_2['attachments'] = trim( $_POST['wpcf7-mail-2-attachments'] );
	}

	$mail_2['use_html'] = ! empty( $_POST['wpcf7-mail-2-use-html'] );
	$mail_2['exclude_blank'] = ! empty( $_POST['wpcf7-mail-2-exclude-blank'] );

	$properties['mail_2'] = $mail_2;

	foreach ( wpcf7_messages() as $key => $arr ) {
		$field_name = 'wpcf7-message-' . strtr( $key, '_', '-' );

		if ( isset( $_POST[$field_name] ) ) {
			$properties['messages'][$key] = trim( $_POST[$field_name] );
		}
	}

	if ( isset( $_POST['wpcf7-additional-settings'] ) ) {
		$properties['additional_settings'] = trim(
			$_POST['wpcf7-additional-settings'] );
	}

	$contact_form->set_properties( $properties );

	do_action( 'wpcf7_save_contact_form', $contact_form );

	$post_id = $contact_form->save();

	if ( wpcf7_validate_configuration() ) {
		$config_validator = new WPCF7_ConfigValidator( $contact_form );
		$config_validator->validate();
	}

	return $post_id;
}