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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/rainic/www/oldTZh/wp-content/plugins/digits/includes/forms/admin.php
<?php

if (!defined('ABSPATH')) {
    exit;
}

function update_digits_design_settings()
{
    $data = array('dig_new_forms');
    foreach ($data as $setting) {
        if (isset($_REQUEST[$setting])) {
            $value = $_REQUEST[$setting];
            update_option($setting, $value);
        }
    }

    $options = digits_admin_email_style();
    $email_style = array();
    foreach ($options as $option => $label) {
        $value = 'digits_form_email_' . $option;
        $email_style[$option] = $_REQUEST[$value];
    }
    update_option('digits_form_email_style', $email_style);


    $options = digits_admin_theme_options();
    $theme_value = digits_theme_values();

    $themes = array('light', 'dark');
    foreach ($themes as $theme) {
        foreach ($options as $option => $label) {
            $value = 'theme_' . $theme . '_' . $option;
            $theme_value[$theme][$option] = $_REQUEST[$value];
        }
    }

    update_option('digits_form_theme_style', $theme_value);

    update_option('dig_form_theme', $_REQUEST['dig_form_theme']);
}

add_action('digits_save_settings_data', 'update_digits_design_settings');
function digit_customize($wiz)
{
    $dig_enable_new_design = get_option('dig_new_forms', 1);


    $theme = get_option('dig_form_theme', 'automatic');
    ?>
    <table class="form-table">
        <tr>
            <th scope="row"><label class="top-10"><?php _e('Enable New Design', 'digits'); ?> </label></th>
            <td>
                <?php digits_input_switch('dig_new_forms', $dig_enable_new_design); ?>
            </td>
        </tr>
        <tr>
            <th scope="row"><label for="form_theme"><?php _e('Theme', 'digits'); ?> </label>
            </th>
            <td>
                <select name="dig_form_theme">
                    <?php
                    $available_themes = array('automatic', 'light', 'dark');
                    foreach ($available_themes as $available_theme) {
                        ?>
                        <option
                            value="<?php echo $available_theme; ?>" <?php if ($available_theme == $theme) echo 'selected'; ?>>
                            <?php echo ucfirst($available_theme); ?>
                        </option>
                        <?php
                    }
                    ?>
                </select>
            </td>
        </tr>

    </table>

    <?php
    $theme_value = digits_theme_values();
    digits_admin_theme_style(__('Light', 'digits'), 'theme_light_', $theme_value['light'], digits_admin_theme_options());

    digits_admin_theme_style(__('Dark', 'digits'), 'theme_dark_', $theme_value['dark'], digits_admin_theme_options());


    $digits_admin_email_style = get_option('digits_form_email_style', array());
    digits_admin_theme_style(__('Email', 'digits'), 'digits_form_email_', $digits_admin_email_style, digits_admin_email_style());
}

function digits_admin_email_style()
{
    return array(
        'logo' => array('label' => __('Logo', 'digits'), 'type' => 'image'),
    );
}

function digits_admin_theme_options()
{
    return array(
        'logo' => array('label' => __('Logo', 'digits'), 'type' => 'image'),
        'primary_color' => array('label' => __('Primary Color', 'digits'), 'type' => 'color'),
        'accent_color' => array('label' => __('Accent Color', 'digits'), 'type' => 'color'),
        'title_color' => array('label' => __('Title Color', 'digits'), 'type' => 'color'),
        'field_bg_color' => array('label' => __('Field Background Color', 'digits'), 'type' => 'color'),
        'form_bg_color' => array('label' => __('Background Color', 'digits'), 'type' => 'color'),
        'button_text_color' => array('label' => __('Button Text Color', 'digits'), 'type' => 'color'),
    );
}

function digits_admin_theme_style($heading, $prefix, $values, $options)
{

    ?>
    <div class="dig_admin_sec_head dig_admin_sec_head_margin"><span><?php echo $heading; ?></span></div>
    <table class="form-table">
        <?php
        foreach ($options as $option => $details) {
            $label = $details['label'];
            $key = $prefix . $option;
            $value = $values[$option] ?? '';
            ?>
            <tr>
                <th scope="row">
                    <label for="<?php echo $key; ?>"><?php echo $label; ?></label>
                </th>
                <td>
                    <?php
                    if ($details['type'] == 'image') {
                        ?>
                        <?php
                        $remstyle = "";
                        if (empty($value)) {
                            $imagechoose = __("Select", 'digits');
                            $remstyle = 'style="display:none;"';
                        } else {
                            $imagechoose = __("Remove", 'digits');
                        }
                        $wid = "";
                        if (is_numeric($value)) {
                            $wid = wp_get_attachment_url($value);
                        }
                        ?>
                        <div class='image-preview-wrapper'>
                            <img class='image-preview_left_modal' src='<?php if (is_numeric($value)) {
                                echo $wid;
                            } else {
                                echo $value;
                            } ?>'
                                 style="max-height:100px;">
                        </div>

                        <input type="text" name="<?php echo $key; ?>"
                               value='<?php if (is_numeric($value)) {
                                   if ($wid) {
                                       echo $wid;
                                   }
                               } else {
                                   echo $value;
                               } ?>' placeholder="<?php _e("URL", "digits"); ?>"
                               class="image_attachment_id_left_modal dig_url_img"/>

                        <button type="button" class="dig_change_image button dig_img_chn_btn dig_imsr"
                        ><?php echo $imagechoose; ?></button>
                        <?php
                    } else {
                        ?>
                        <input name="<?php echo $key; ?>" type="text" class="bg_color" value="<?php echo $value; ?>"
                               autocomplete="off"
                               required data-alpha="true"/>
                        <?php
                    }
                    ?>
                </td>
            </tr>
            <?php
        }
        ?>
    </table>

    <?php
}

function digits_theme_values()
{
    $default_light = array(
        'logo' => '',
        'primary_color' => '#1C2434',
        'title_color' => '#2D333D',
        'field_bg_color' => '#F8F8F8',
        'accent_color' => '#9CF5FF',
        'form_bg_color' => '#FFFFFF',
        'button_text_color' => '#FFFFFF',
    );

    $default_dark = array(
        'logo' => '',
        'primary_color' => '#FFFFFF',
        'title_color' => '#FFFFFF',
        'field_bg_color' => 'rgba(248, 248, 248, 0.06)',
        'accent_color' => '#9CF5FF',
        'form_bg_color' => '#1C2434',
        'button_text_color' => '#1C2434',
    );
    $digits_theme = get_option('digits_form_theme_style');
    if (!empty($digits_theme)) {
        return $digits_theme;
    }
    return array('light' => $default_light, 'dark' => $default_dark);
}

haha - 2025