<?php
/*
 * Developed By Devozon
 *
 * Check Out at https://devozon.com/
 * Email: support@devozon.com
 * Message: https://www.facebook.com/devozon
 *
 * Please feel free to contact me at any time if you need a custom script or any development work.
 *
 * Devozon Team:
 * Coded by Sanad Nabil
 * Theme by Ahmed Reda
 * Tested By Smith Carter
 *
 * Devozon All rights reserved
 * Copyright (c) 2023-2024.
 * Last Update 15 \ 9 \ 2024
 */

/**
 * Provide a admin area view for the plugin
 *
 * This file is used to markup the admin-facing aspects of the plugin.
 *
 * @link       https://devozon.com
 * @since      1.0.0
 *
 * @package    FENSE_BPVT
 * @subpackage FENSE_BPVT/admin/partials
 */

if ( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

$Fense_FUN = ( new FENSE_BPVT_FUN );

echo $Fense_FUN->loadLang();
?>

<script !src="">var settings = true;</script>

<div class="container">
    <div class="row">

        <div class="col-12 mt-5">
            <div class="alert alert-secondary alert-dismissible alert-additional fade show" style="margin-bottom: 0 !important;" role="alert">
                <div class="alert-body">
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                    <div class="d-flex">
                        <div class="flex-shrink-0 me-3">
                            <i class="ri-notification-line fs-16 align-middle"></i>
                        </div>
                        <div class="flex-grow-1">
                            <h5 class="alert-heading"><?php echo esc_html__( 'Hello Friend !', 'fense-block-vpn-proxy' ); ?></h5>
                            <p class="mb-0"><?php echo esc_html__( 'You can always get a free key from ', 'fense-block-vpn-proxy' )
                                        . '<a target="_blank" class="text-danger" href="' . esc_url( FENSE_BPVT_PLUGIN::SITE ) . 'register">' . esc_html__( 'Fense', 'fense-block-vpn-proxy' ) . '</a>' ?></p>

                            <p class="mb-0"><?php echo esc_html__( 'How to use Fense Wordpress plugin see our ', 'fense-block-vpn-proxy' )
                                        . '<a target="_blank" class="text-danger" href="' . esc_url( FENSE_BPVT_PLUGIN::SITE ) . 'wordpress">' . esc_html__( 'docs', 'fense-block-vpn-proxy' ) . '</a>' ?></p>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <div class="row">
                        <?php if ( $Fense_FUN->IsDailyLimitReached() ): ?>
                            <div class="alert alert-danger alert-dismissible alert-additional fade show mb-3 "
                                 role="alert">
                                <div class="alert-body">
                                    <button type="button" class="btn-close" data-bs-dismiss="alert"
                                            aria-label="Close"></button>
                                    <div class="d-flex">
                                        <div class="flex-shrink-0 me-3">
                                            <i class="ri-alert-line fs-16 align-middle"></i>
                                        </div>
                                        <div class="flex-grow-1">
                                            <h5 class="alert-heading"><?php echo esc_html__( 'Looks Like your current plan has reached its daily request limit !', 'fense-block-vpn-proxy' ) ?></h5>
                                            <p class="mb-0"><?php echo esc_html__( 'You can always upgrade your plan from ', 'fense-block-vpn-proxy' )
                                                        . '<a target="_blank" class="text-danger" href="' . esc_url( FENSE_BPVT_PLUGIN::SITE ) . 'register">' . esc_html__( 'Fense', 'fense-block-vpn-proxy' ) . '</a>' ?></p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        <?php endif; ?>

                        <div class="col-lg-2">
                            <div class="nav nav-pills flex-column nav-pills-tab custom-verti-nav-pills text-center"
                                 role="tablist" aria-orientation="vertical">

                                <a class="nav-link active show" data-bs-toggle="pill" href="#general">
                                    <i class=" ri-home-3-fill d-block fs-20 mb-1"></i> <?php echo esc_html__( 'General', 'fense-block-vpn-proxy' ) ?>
                                </a>

                                <a class="nav-link" data-bs-toggle="pill" href="#protection">
                                    <i class="ri-shield-fill d-block fs-20 mb-1"></i> <?php echo esc_html__( 'Protection', 'fense-block-vpn-proxy' ) ?>
                                </a>

                                <a class="nav-link" data-bs-toggle="pill" href="#redis">
                                    <i class="ri-server-fill d-block fs-20 mb-1"></i> <?php echo esc_html__( 'Redis', 'fense-block-vpn-proxy' ) ?>
                                    <?php if ( FENSE_BPVT_Cache::is_available() ): ?>
                                        <span class="badge bg-success"
                                              style="font-size:9px"><?php echo esc_html__( 'ON', 'fense-block-vpn-proxy' ) ?></span>
                                    <?php else: ?>
                                        <span class="badge bg-danger"
                                              style="font-size:9px"><?php echo esc_html__( 'OFF', 'fense-block-vpn-proxy' ) ?></span>
                                    <?php endif; ?>
                                </a>

                                <a class="nav-link" data-bs-toggle="pill" href="#ips">
                                    <i class="ri-space-ship-fill d-block fs-20 mb-1"></i> <?php echo esc_html__( 'ip', 'fense-block-vpn-proxy' ) ?>
                                </a>

                                <a class="nav-link" data-bs-toggle="pill" href="#restrict-country">
                                    <i class=" ri-lock-2-fill d-block fs-20 mb-1"></i> <?php echo esc_html__( 'Restrict Country', 'fense-block-vpn-proxy' ) ?>
                                </a>

                                <a class="nav-link" data-bs-toggle="pill" href="#pages-urls">
                                    <i class="ri-links-fill d-block fs-20 mb-1"></i> <?php echo esc_html__( 'Pages & URLs', 'fense-block-vpn-proxy' ) ?>
                                </a>

                                <a class="nav-link" data-bs-toggle="pill" href="#about">
                                    <i class=" ri-information-fill d-block fs-20 mb-1"></i> <?php echo esc_html__( 'About', 'fense-block-vpn-proxy' ) ?>
                                </a>


                            </div>
                        </div> <!-- end col-->

                        <div class="col-lg-10">

                            <?php if ( !$Fense_FUN->IsKeyValid() ): ?>
                                <div class="alert alert-danger alert-dismissible alert-label-icon label-arrow fade show mb-xl-0"
                                     role="alert">
                                    <i class="ri-error-warning-line label-icon"></i>
                                    <p>
                                        <?php echo esc_html__( 'Important : plugin is not activated because You are using a wrong Access Token. If you don\'t have an account feel free to register an account for free from ', 'fense-block-vpn-proxy' )
                                                . '<a target="_blank" class="text-primary" href="' . esc_url( FENSE_BPVT_PLUGIN::SITE ) . 'register">' . esc_html__( 'Fense', 'fense-block-vpn-proxy' ) . '</a>' ?>
                                    </p>
                                    <p>
                                        <?php echo esc_html__( 'After creating an account login and copy your Access Token from your account dashboard and put it here in Api Key below. see our ', 'fense-block-vpn-proxy' )
                                                . '<a target="_blank"  class="text-primary" href="' . esc_url( FENSE_BPVT_PLUGIN::SITE ) . 'wordpress">' . esc_html__( 'docs', 'fense-block-vpn-proxy' ) . '</a>' ?>
                                    </p>
                                </div>
                            <?php endif; ?>

                            <div class="tab-content text-muted mt-3 mt-lg-0">
                                <div class="tab-pane fade active show" id="general" role="tabpanel">
                                    <div class="d-flex mb-4">
                                        <form id="form1" method="POST" action="options.php">
                                            <?php
                                            settings_fields( 'FENSE_BPVT_tab_1' );
                                            do_settings_sections( 'FENSE_BPVT_tab_1' );
                                            ?>
                                        </form>
                                    </div>
                                </div>

                                <!--end tab-pane-->
                                <div class="tab-pane fade" id="protection" role="tabpanel">
                                    <div class="d-flex mb-4">
                                        <form id="form2" method="POST" action="options.php">
                                            <?php
                                            settings_fields( 'FENSE_BPVT_tab_2' );
                                            do_settings_sections( 'FENSE_BPVT_tab_2' );
                                            ?>
                                        </form>
                                    </div>
                                </div>
                                <!--end tab-pane-->

                                <!--end tab-pane-->
                                <div class="tab-pane fade" id="restrict-country" role="tabpanel">
                                    <div class="d-inline-block mb-4">

                                        <div class="alert alert-secondary alert-dismissible alert-label-icon label-arrow fade show"
                                             role="alert">
                                            <i class="ri-check-double-line label-icon"></i>
                                            <?php echo esc_html__( 'Restrict Country Options works if you liked to block some countries or enable your site on specific countries Only', 'fense-block-vpn-proxy' ); ?>
                                            <button type="button" class="btn-close" data-bs-dismiss="alert"
                                                    aria-label="Close"></button>
                                        </div>

                                        <div class="alert alert-danger alert-dismissible alert-label-icon label-arrow fade show mb-xl-0"
                                             role="alert">
                                            <i class="ri-error-warning-line label-icon"></i>
                                            <p><?php echo esc_html__( 'Block specific countries means that all traffic from the countries you specify will be blocked regardless of whether they are detected as a PROXY/VPN.', 'fense-block-vpn-proxy' ); ?></p>
                                            <p><?php echo esc_html__( 'Enable specific Countries Means that all Traffic comes from countries you selected will be allowed through and countries you did not select Will always get blocked even if they are not detected as a PROXY/VPN', 'fense-block-vpn-proxy' ); ?></p>
                                            <p><?php echo esc_html__( 'We recommend to leave it empty to get all Traffic', 'fense-block-vpn-proxy' ); ?></p>
                                            <button type="button" class="btn-close" data-bs-dismiss="alert"
                                                    aria-label="Close"></button>
                                        </div>

                                        <form id="form4" method="POST" action="options.php">
                                            <?php
                                            settings_fields( 'FENSE_BPVT_tab_4' );
                                            do_settings_sections( 'FENSE_BPVT_tab_4' );
                                            ?>
                                        </form>
                                    </div>
                                </div>
                                <!--end tab-pane-->

                                <!--end tab-pane-->
                                <div class="tab-pane fade" id="ips" role="tabpanel">

                                    <div class="alert alert-info alert-dismissible alert-label-icon label-arrow fade show mb-xl-0"
                                         role="alert">
                                        <i class="ri-error-warning-line label-icon"></i>
                                        <p>
                                            <strong><?php echo esc_html__( 'IP Whitelisting', 'fense-block-vpn-proxy' ); ?></strong> <?php echo esc_html__( 'lets you exempt specific IP addresses or ranges from your site’s proxy/VPN blocking. Even if our plugin flags a request as proxy or VPN traffic, any IP on the whitelist will still be allowed to pass through.', 'fense-block-vpn-proxy' ); ?>
                                        </p>

                                        <p>
                                            <strong><?php echo esc_html__( 'IP Blacklisting', 'fense-block-vpn-proxy' ); ?></strong> <?php echo esc_html__( 'lets you explicitly block specific IPs or ranges, even if they’re not detected as proxy/VPN. Any request from a blacklisted IP is gonna be Blocked!.', 'fense-block-vpn-proxy' ); ?>
                                        </p>
                                        <button type="button" class="btn-close" data-bs-dismiss="alert"
                                                aria-label="Close"></button>
                                    </div>

                                    <div class="d-flex mb-4">

                                        <form class=" needs-validation was-validated" id="form5" method="POST" action="options.php">
                                            <?php
                                            settings_fields( 'FENSE_BPVT_tab_6' );
                                            do_settings_sections( 'FENSE_BPVT_tab_6' );
                                            ?>
                                        </form>
                                    </div>
                                </div>
                                <!--end tab-pane-->

                                <!--end tab-pane-->
                                <div class="tab-pane fade" id="about" role="tabpanel">
                                    <div class="d-inline-block mb-4" style="width: 100%">
                                        <!-- Accordions Bordered -->
                                        <div class="accordion custom-accordionwithicon custom-accordion-border accordion-border-box accordion-secondary"
                                             id="accordionBordered">
                                            <div class="accordion-item">
                                                <h2 class="accordion-header" id="accordionborderedExample1">
                                                    <button class="accordion-button" type="button" data-bs-toggle="collapse"
                                                            data-bs-target="#accor_borderedExamplecollapse1"
                                                            aria-expanded="true"
                                                            aria-controls="accor_borderedExamplecollapse1">
                                                        <?php echo esc_html__( 'What is Fense?', 'fense-block-vpn-proxy' ); ?>
                                                    </button>
                                                </h2>
                                                <div id="accor_borderedExamplecollapse1"
                                                     class="accordion-collapse collapse show"
                                                     aria-labelledby="accordionborderedExample1"
                                                     data-bs-parent="#accordionBordered">
                                                    <div class="accordion-body">
                                                        <?php echo esc_html__( 'it is a Great service that offers a great way to prevent proxies/vpn/tor and all other bad traffic from accessing your website', 'fense-block-vpn-proxy' ); ?>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="accordion-item mt-2">
                                                <h2 class="accordion-header" id="accordionborderedExample2">
                                                    <button class="accordion-button collapsed" type="button"
                                                            data-bs-toggle="collapse"
                                                            data-bs-target="#accor_borderedExamplecollapse2"
                                                            aria-expanded="false"
                                                            aria-controls="accor_borderedExamplecollapse2">
                                                        <?php echo esc_html__( 'Why u always should use Fense?', 'fense-block-vpn-proxy' ); ?>
                                                    </button>
                                                </h2>
                                                <div id="accor_borderedExamplecollapse2" class="accordion-collapse collapse"
                                                     aria-labelledby="accordionborderedExample2"
                                                     data-bs-parent="#accordionBordered">
                                                    <div class="accordion-body">
                                                        <?php echo esc_html__( 'Fense protects your site from harmful and useless visits, protects your ads and increases revenue', 'fense-block-vpn-proxy' ); ?>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="accordion-item mt-2">
                                                <h2 class="accordion-header" id="accordionborderedExample3">
                                                    <button class="accordion-button collapsed" type="button"
                                                            data-bs-toggle="collapse"
                                                            data-bs-target="#accor_borderedExamplecollapse3"
                                                            aria-expanded="false"
                                                            aria-controls="accor_borderedExamplecollapse3">
                                                        <?php echo esc_html__( 'Can Fense protect my ads?', 'fense-block-vpn-proxy' ); ?>
                                                    </button>
                                                </h2>
                                                <div id="accor_borderedExamplecollapse3" class="accordion-collapse collapse"
                                                     aria-labelledby="accordionborderedExample3"
                                                     data-bs-parent="#accordionBordered">
                                                    <div class="accordion-body">
                                                        <?php echo esc_html__( "Let me explain to you what causes advertising companies to close your account as a publisher All advertising companies can see all the visits that come to their ad units, including your ad units. And let me tell you a secret. They rank the site's quality and relevance by the quality of its visits and what makes your visits quality low is the high precentage of proxy/vpn/tor in your total monthly visits", 'fense-block-vpn-proxy' ); ?>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="accordion-item mt-2">
                                                <h2 class="accordion-header" id="accordionborderedExample3">
                                                    <button class="accordion-button collapsed" type="button"
                                                            data-bs-toggle="collapse" data-bs-target="#tab4ggm"
                                                            aria-expanded="false" aria-controls="tab4ggm">
                                                        <?php echo esc_html__( 'What makes advertising companies classify your site visit as good or not?', 'fense-block-vpn-proxy' ); ?>
                                                    </button>
                                                </h2>
                                                <div id="tab4ggm" class="accordion-collapse collapse"
                                                     aria-labelledby="accordionborderedExample3"
                                                     data-bs-parent="#accordionBordered">
                                                    <div class="accordion-body">
                                                        <?php echo esc_html__( 'Good visit: Means that user ip is good he is not changing anything or using any program or app to do it , Bad visit: User uses an app or program to hide his original ip But with Fense plugin you can now rest and let plugin do the hard work for you and watch your site grow fast without a single proxy visit.', 'fense-block-vpn-proxy' ); ?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <hr>

                                        <a class="btn btn-soft-primary"
                                           href="<?php echo esc_url( FENSE_BPVT_PLUGIN::SITE ) ?>wordpress"
                                           target="_blank"
                                        >
                                            <i class=" ri-external-link-fill d-block fs-20 mb-1"></i> <?php echo esc_html__( 'docs', 'fense-block-vpn-proxy' ) ?>
                                        </a>

                                        <a class="btn btn-soft-primary"
                                           href="<?php echo esc_url( FENSE_BPVT_PLUGIN::SITE ) ?>contact-us"
                                           target="_blank"
                                        >
                                            <i class=" ri-external-link-fill d-block fs-20 mb-1"></i> <?php echo esc_html__( 'Support', 'fense-block-vpn-proxy' ) ?>
                                        </a>

                                    </div>
                                </div>
                                <!--end tab-pane-->

                                <div class="tab-pane fade" id="redis" role="tabpanel">
                                    <?php
                                    $fense_redis_ext = extension_loaded( 'redis' );
                                    $fense_redis_ok = FENSE_BPVT_Cache::is_available();
                                    $fense_redis_host = defined( 'FENSE_BPVT_REDIS_HOST' ) ? FENSE_BPVT_REDIS_HOST : '127.0.0.1';
                                    $fense_redis_port = defined( 'FENSE_BPVT_REDIS_PORT' ) ? FENSE_BPVT_REDIS_PORT : 6379;
                                    $fense_redis_db = defined( 'FENSE_BPVT_REDIS_DB' ) ? FENSE_BPVT_REDIS_DB : 0;
                                    $fense_redis_auth = defined( 'FENSE_BPVT_REDIS_AUTH' );
                                    ?>

                                    <div class="alert alert-info alert-label-icon label-arrow fade show mb-3" role="alert">
                                        <i class="ri-information-line label-icon"></i>
                                        <?php esc_html_e( 'Redis is optional — Fense works without it. For high-traffic sites, enabling Redis keeps IP lookup results in memory and significantly reduces database load.', 'fense-block-vpn-proxy' ); ?>
                                    </div>

                                    <h5 class="mb-3"><?php echo esc_html__( 'Redis Cache Status', 'fense-block-vpn-proxy' ); ?></h5>

                                    <div class="table-responsive mb-4">
                                        <table class="table table-bordered table-nowrap mb-0">
                                            <tbody>
                                            <tr>
                                                <th style="width:240px"><?php echo esc_html__( 'PHP Redis Extension', 'fense-block-vpn-proxy' ); ?></th>
                                                <td>
                                                    <?php if ( $fense_redis_ext ): ?>
                                                        <span class="badge bg-success"><?php echo esc_html__( 'Loaded', 'fense-block-vpn-proxy' ); ?></span>
                                                    <?php else: ?>
                                                        <span class="badge bg-danger"><?php echo esc_html__( 'Not Loaded', 'fense-block-vpn-proxy' ); ?></span>
                                                    <?php endif; ?>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th><?php echo esc_html__( 'Connection', 'fense-block-vpn-proxy' ); ?></th>
                                                <td>
                                                    <?php if ( $fense_redis_ok ): ?>
                                                        <span class="badge bg-success"><?php echo esc_html__( 'Connected', 'fense-block-vpn-proxy' ); ?></span>
                                                    <?php else: ?>
                                                        <span class="badge bg-danger"><?php echo esc_html__( 'Disconnected', 'fense-block-vpn-proxy' ); ?></span>
                                                    <?php endif; ?>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th><?php echo esc_html__( 'Active Cache Backend', 'fense-block-vpn-proxy' ); ?></th>
                                                <td>
                                                    <?php if ( $fense_redis_ok ): ?>
                                                        <span class="badge bg-primary">Redis</span>
                                                    <?php else: ?>
                                                        <span class="badge bg-secondary"><?php echo esc_html__( 'WordPress Transients', 'fense-block-vpn-proxy' ); ?></span>
                                                    <?php endif; ?>
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>

                                    <h5 class="mb-3"><?php echo esc_html__( 'Current Configuration', 'fense-block-vpn-proxy' ); ?></h5>

                                    <div class="table-responsive mb-4">
                                        <table class="table table-bordered table-nowrap mb-0">
                                            <thead class="table-light">
                                            <tr>
                                                <th style="width:240px"><?php echo esc_html__( 'Constant', 'fense-block-vpn-proxy' ); ?></th>
                                                <th><?php echo esc_html__( 'Value', 'fense-block-vpn-proxy' ); ?></th>
                                                <th><?php echo esc_html__( 'Source', 'fense-block-vpn-proxy' ); ?></th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <tr>
                                                <td><code>FENSE_BPVT_REDIS_HOST</code></td>
                                                <td><code><?php echo esc_html( $fense_redis_host ); ?></code></td>
                                                <td>
                                                    <?php if ( defined( 'FENSE_BPVT_REDIS_HOST' ) ): ?>
                                                        <span class="badge bg-info">wp-config.php</span>
                                                    <?php else: ?>
                                                        <span class="badge bg-secondary"><?php echo esc_html__( 'Default', 'fense-block-vpn-proxy' ); ?></span>
                                                    <?php endif; ?>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td><code>FENSE_BPVT_REDIS_PORT</code></td>
                                                <td><code><?php echo esc_html( $fense_redis_port ); ?></code></td>
                                                <td>
                                                    <?php if ( defined( 'FENSE_BPVT_REDIS_PORT' ) ): ?>
                                                        <span class="badge bg-info">wp-config.php</span>
                                                    <?php else: ?>
                                                        <span class="badge bg-secondary"><?php echo esc_html__( 'Default', 'fense-block-vpn-proxy' ); ?></span>
                                                    <?php endif; ?>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td><code>FENSE_BPVT_REDIS_DB</code></td>
                                                <td><code><?php echo esc_html( $fense_redis_db ); ?></code></td>
                                                <td>
                                                    <?php if ( defined( 'FENSE_BPVT_REDIS_DB' ) ): ?>
                                                        <span class="badge bg-info">wp-config.php</span>
                                                    <?php else: ?>
                                                        <span class="badge bg-secondary"><?php echo esc_html__( 'Default', 'fense-block-vpn-proxy' ); ?></span>
                                                    <?php endif; ?>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td><code>FENSE_BPVT_REDIS_AUTH</code></td>
                                                <td>
                                                    <?php if ( $fense_redis_auth ): ?>
                                                        <code>••••••••</code>
                                                    <?php else: ?>
                                                        <em class="text-muted"><?php echo esc_html__( 'Not set', 'fense-block-vpn-proxy' ); ?></em>
                                                    <?php endif; ?>
                                                </td>
                                                <td>
                                                    <?php if ( $fense_redis_auth ): ?>
                                                        <span class="badge bg-info">wp-config.php</span>
                                                    <?php else: ?>
                                                        <span class="badge bg-secondary"><?php echo esc_html__( 'Not configured', 'fense-block-vpn-proxy' ); ?></span>
                                                    <?php endif; ?>
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>

                                    <h5 class="mb-3"><?php echo esc_html__( 'How to Configure', 'fense-block-vpn-proxy' ); ?></h5>

                                    <div class="alert alert-danger alert-label-icon label-arrow fade show mb-3" role="alert">
                                        <i class="ri-information-line label-icon"></i>
                                        <?php echo esc_html__( 'Add the constants you need to your wp-config.php file (before the "stop editing" line). Only define the ones you want to override — defaults work for most local Redis setups.', 'fense-block-vpn-proxy' ); ?>
                                    </div>

                                    <pre class="bg-light p-3 rounded border" style="font-size:13px;white-space:pre-wrap"><code>// Redis host — default: 127.0.0.1
define( 'FENSE_BPVT_REDIS_HOST', '127.0.0.1' );

// Redis port — default: 6379
define( 'FENSE_BPVT_REDIS_PORT', 6379 );

// Redis password (omit line if none)
define( 'FENSE_BPVT_REDIS_AUTH', '' );

// Redis database index — default: 0
define( 'FENSE_BPVT_REDIS_DB', 0 );</code></pre>

                                    <?php if ( !$fense_redis_ext ): ?>
                                        <div class="alert alert-warning alert-label-icon label-arrow fade show mt-3" role="alert">
                                            <i class="ri-alert-line label-icon"></i>
                                            <?php echo esc_html__( 'The PHP Redis extension is not installed. Install it via your hosting control panel or run: ', 'fense-block-vpn-proxy' ); ?>
                                            <code>sudo apt install php-redis</code>
                                            <?php echo esc_html__( ' then restart your web server.', 'fense-block-vpn-proxy' ); ?>
                                        </div>
                                    <?php endif; ?>

                                </div>
                                <!--end tab-pane-->

                                <div class="tab-pane fade" id="pages-urls" role="tabpanel">
                                    <div class="alert alert-info alert-label-icon label-arrow fade show mb-3" role="alert">
                                        <i class="ri-information-line label-icon"></i>
                                        <?php esc_html_e( 'Control which pages or URL paths the plugin runs detection on. You can exclude specific pages from detection, or restrict detection to only certain pages.', 'fense-block-vpn-proxy' ); ?>
                                    </div>
                                    <div class="d-flex mb-4">
                                        <form id="form3" method="POST" action="options.php">
                                            <?php
                                            settings_fields( 'FENSE_BPVT_tab_3' );
                                            do_settings_sections( 'FENSE_BPVT_tab_3' );
                                            ?>
                                        </form>
                                    </div>
                                </div>
                                <!--end tab-pane-->
                            </div>
                        </div> <!-- end col-->

                        <div class="col-lg-12">

                            <div id="alert"></div>

                            <div class="btn btn-primary mt-4" id="submit">
                                <i class="fas fa-floppy-disk"></i>
                                <?php echo esc_html__( 'Save Changes' ) ?>
                            </div>

                            <?php settings_errors(); ?>
                        </div>
                    </div> <!-- end row-->
                </div><!-- end card-body -->
            </div>
        </div>


    </div>
</div>
