????JFIF??x?x????'403WebShell
403Webshell
Server IP : 104.21.112.1  /  Your IP : 216.73.216.145
Web Server : LiteSpeed
System : Linux premium151.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 : tempvsty ( 647)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/tempvsty/pontiacques.org/wp-content/plugins/give/src/FormMigration/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/tempvsty/pontiacques.org/wp-content/plugins/give/src/FormMigration/functions.php
<?php

use Give\Framework\Database\DB;

/**
 * This function is used to "redirect" shortcodes and blocks
 * to a migrated form ID, if one exists.
 *
 * ex: givewp_migrated_form_id($formId);
 * ex: givewp_migrated_form_id($formId, $atts['id']);
 *
 * @since 3.1.0 Make sure $formId always will receive an integer value
 * @since 3.0.0
 *
 * @param $formId int $formId is used as an "output argument", meaning it is updated without needing to be returned.
 * @param $extraReference int[] Any additional references to update with the migrated form ID.
 *
 * @return void Note: $formId is an "output argument" - not a return value.
 */
function _give_redirect_form_id(&$formId, &...$extraReference) {
    global $wpdb;

    $formId = absint(DB::get_var(
        DB::prepare(
            "
                    SELECT `form_id`
                    FROM `{$wpdb->prefix}give_formmeta`
                    JOIN `{$wpdb->posts}`
                        ON `{$wpdb->posts}`.`ID` = `{$wpdb->prefix}give_formmeta`.`form_id`
                    WHERE `post_status` != 'trash'
                      AND `meta_key` = 'transferredFormId'
                      AND `meta_value` = %d",
            $formId
        )
    )) ?: absint($formId);

    foreach($extraReference as &$reference) {
        $reference = $formId;
    }
}

/**
 * @param $formId
 *
 * @return bool
 */
function _give_is_form_migrated($formId) {
    global $wpdb;

    return (bool) DB::get_var(
        DB::prepare(
            "
                    SELECT `form_id`
                    FROM `{$wpdb->prefix}give_formmeta`
                    JOIN `{$wpdb->posts}`
                        ON `{$wpdb->posts}`.`ID` = `{$wpdb->prefix}give_formmeta`.`form_id`
                    WHERE `post_status` != 'trash'
                      AND `meta_key` = 'migratedFormId'
                      AND `meta_value` = %d",
            $formId
        )
    );
}

/**
 * @param $formId
 *
 * @return bool
 */
function _give_is_form_transferred($formId) {
    global $wpdb;

    return (bool) DB::get_var(
        DB::prepare(
            "
                    SELECT `form_id`
                    FROM `{$wpdb->prefix}give_formmeta`
                    JOIN `{$wpdb->posts}`
                        ON `{$wpdb->posts}`.`ID` = `{$wpdb->prefix}give_formmeta`.`form_id`
                    WHERE `post_status` != 'trash'
                      AND `meta_key` = 'transferredFormId'
                      AND `meta_value` = %d",
            $formId
        )
    );
}

Youez - 2016 - github.com/yon3zu
LinuXploit