. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 162.0.212.4 / Your IP :
216.73.216.14 [
Web Server : LiteSpeed System : Linux premium146.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : alshnoli ( 2431) PHP Version : 8.3.28 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/alshnoli/public_html/wp-content/plugins/us-core/templates/form/ |
Upload File : |
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Output a form's captcha field
*
* @var $name string Field name
* @var $type string Field type
* @var $label string Field label
* @var $placeholder string Field placeholder
* @var $description string Field description
* @var $value string Field value
* @var $icon string Field icon
* @var $field_id string Field id
* @var $classes string Additional field classes
*
* @action Before the template: 'us_before_template:templates/form/captcha'
* @action After the template: 'us_after_template:templates/form/captcha'
* @filter Template variables: 'us_template_vars:templates/form/captcha'
*/
$default_params = us_config( 'elements/cform.params.items.params' );
foreach ( $default_params as $param => $params ) {
if ( ! isset( $$param ) ) {
$$param = $params['std'];
}
}
global $us_cform_index;
$field_id = isset( $field_id ) ? $field_id : 1;
$field_id = 'us_form_' . $us_cform_index . '_' . $type . '_' . $field_id;
$_atts['class'] = 'w-form-row';
$_atts['class'] .= ' for_' . $type;
if ( ! empty( $classes ) ) {
$_atts['class'] .= ' ' . $classes;
}
$label = strip_tags( $label, '<a><br><strong>' );
if ( ! empty( $label ) ) {
$_atts['class'] .= ' has_label';
if ( $move_label ) {
$_atts['class'] .= ' move_label';
}
$field_atts['aria-label'] = $label;
} elseif ( empty( $label ) AND ! empty( $placeholder ) ) {
$field_atts['aria-label'] = $placeholder;
} else {
$field_atts['aria-label'] = $field_id;
}
$numbers = array( rand( 16, 30 ), rand( 1, 15 ) );
$sign = rand( 0, 1 );
$label .= ' <span>' . implode( $sign ? ' + ' : ' - ', $numbers );
$result_hash = md5( ( $numbers[0] + ( $sign ? 1 : - 1 ) * $numbers[1] ) . NONCE_SALT );
// Always required field
$_atts['class'] .= ' required';
if ( ! empty( $label ) ) {
$label .= ' = ?</span>';
}
$field_atts['type'] = 'text';
$field_atts['name'] = isset( $name ) ? $name : $field_id;
$field_atts['placeholder'] = $placeholder;
$field_atts['data-required'] = 'true';
$field_atts['aria-required'] = 'true';
if ( ! empty( $icon ) ) {
$_atts['class'] .= ' with_icon';
}
if ( ! empty( $cols ) AND $cols != 1 ) {
$_atts['class'] .= ' cols_' . $cols;
}
?>
<div <?= us_implode_atts( $_atts ) ?>>
<div class="w-form-row-label">
<span><?= $label ?></span>
</div>
<div class="w-form-row-field">
<?php do_action( 'us_form_captcha_start', $vars ) ?>
<input type="hidden" name="<?=( ! empty( $name ) ? $name : $field_id ) ?>_hash" value="<?= $result_hash ?>" />
<?= us_prepare_icon_tag( $icon ) ?>
<input <?= us_implode_atts( $field_atts ) ?>/>
<?php do_action( 'us_form_captcha_end', $vars ) ?>
</div>
<?php if ( ! empty( $description ) ) : ?>
<div class="w-form-row-description">
<?= strip_tags( $description, '<a><br><strong>' ) ?>
</div>
<?php endif; ?>
<div class="w-form-row-state"><?php _e( 'Enter the equation result to proceed', 'us' ) ?></div>
</div>