403Webshell
Server IP : 185.252.147.100  /  Your IP : 216.73.217.33
Web Server : nginx/1.27.3
System : Linux mitrofanov.ru 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64
User : mitr ( 1000)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /www/html/tour.mitrofanov.ru/public/wp-content/plugins/site-reviews/plugin/Modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/html/tour.mitrofanov.ru/public/wp-content/plugins/site-reviews/plugin/Modules/Captcha.php
<?php

namespace GeminiLabs\SiteReviews\Modules;

use GeminiLabs\SiteReviews\Helper;
use GeminiLabs\SiteReviews\Modules\Html\Builder;

class Captcha
{
    public function actions(): array
    {
        return glsr()->filterArray('captcha/actions', [
            'submit-review',
        ]);
    }

    public function config(): array
    {
        if (!$this->isEnabled()) {
            return [];
        }
        $integration = (string) glsr_get_option('forms.captcha.integration');
        $className = Helper::buildClassName([$integration, 'validator'], 'Modules\Validator');
        if (!class_exists($className)) {
            return [];
        }
        return glsr($className)->config();
    }

    public function container(): string
    {
        if (!$this->isEnabled()) {
            return '';
        }
        return glsr(Builder::class)->div([
            'class' => 'glsr-captcha-holder',
        ]);
    }

    public function token(): string
    {
        $config = $this->config();
        return (string) Helper::filterInput($config['token_field'] ?? '');
    }

    public function isEnabled(string $service = ''): bool
    {
        $integration = glsr_get_option('forms.captcha.integration');
        $usage = glsr_get_option('forms.captcha.usage');
        $isEnabled = 'all' === $usage || ('guest' === $usage && !is_user_logged_in());
        if (!empty($service)) {
            return $integration === $service && $isEnabled;
        }
        return !empty($integration) && $isEnabled;
    }

    public function position(): string
    {
        $integration = glsr_get_option('forms.captcha.integration');
        if (str_starts_with($integration, 'recaptcha')) {
            return glsr_get_option('settings.forms.captcha.badge', 'bottomleft', 'string');
        }
        return glsr_get_option('settings.forms.captcha.placement', 'below', 'string');
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit