Sindbad~EG File Manager

Current Path : /home/admin/sindelar.blog.lppelm.o2switch.site/wp-content/plugins/mailin/inc/
Upload File :
Current File : /home/admin/sindelar.blog.lppelm.o2switch.site/wp-content/plugins/mailin/inc/sib-form-preview.php

<?php
/**
 * Page to preview form
 */

$sib_form_id = isset($_GET['sib_form']) ? sanitize_text_field($_GET['sib_form']) : '';
$sib_preview = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : '';

wp_head();

?>
<body style="background-color: #f5f5f5;">
    <div id="page" class="site" style="padding:16px;">
        <div id="sib-preview-form">
        <?php
        if($sib_preview == '') {
            $formData = SIB_Forms::getForm($sib_form_id);
        } else {
            $formData = get_option(SIB_Manager::PREVIEW_OPTION_NAME, array());
        }
        if( isset( $formData['gCaptcha'] ) && '0' != $formData['gCaptcha'] ) {
            if( '1' == $formData['gCaptcha'] ) {   // For old forms.
                $formData['html'] = preg_replace( '/([\s\S]*?)<div class="g-recaptcha"[\s\S]*?data-size="invisible"><\/div>/', '$1', $formData['html'] );
            }
            if ( '3' == $formData['gCaptcha'] ) {     // The case of using google recaptcha.
                ?>
                <script type="text/javascript">
                    var onloadSibCallback = function () {
                        grecaptcha.render('sib_captcha', {
                            'sitekey': '<?php echo esc_attr($formData["gCaptcha_site"]) ?>'
                        });
                    };
                </script>
            <?php
            }
            else {                                  // The case of using google invisible recaptcha.
            ?>
                <script type="text/javascript">
                    var onloadSibCallback = function() {
                        var element = document.getElementsByClassName('sib-default-btn');
                        grecaptcha.render(element[0],{
                            'sitekey' : '<?php echo esc_attr( $formData["gCaptcha_site"] ) ?>',
                            'callback' : sibVerifyCallback
                        });
                    };
                </script>
            <?php
            }
            ?>
            <script src="https://www.google.com/recaptcha/api.js?onload=onloadSibCallback&render=explicit" async defer></script>
            <?php
        }

        $html = stripslashes_deep($formData['html']);
        $css = stripslashes_deep($formData['css']);
        // phpcs:ignore
        echo wp_kses($html, SIB_Manager::wordpress_allowed_attributes());
        ?>
        </div>
        <style>
            <?php
                if($formData['dependTheme'] != '1'){
                    $css = str_replace('[form]', '#sib-preview-form', $css);
                    echo sanitize_text_field( $css );
                }
            ?>
        </style>
    </div>
</body>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists