HEX
Server: LiteSpeed
System: Linux cde2.duelhost.dk 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User: dtptviut (1121)
PHP: 8.0.30
Disabled: exec,system,passthru,shell_exec,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/dtptviut/public_html/wp-content/plugins/comparisonfeed-wp/compare-adjust-style.php
<div class="wrap">
    <form id="adserviceadmin" method="post">
        <img src="<?php echo plugins_url('comparisonfeed-wp/images/adservice_logo.svg');?>" class="as-logo">
    
    <div class="postbox-container metabox-holder as-wrapper" style="width:100%;">
        <div class="postbox">
            <div class="inside">
                <h3>Adjust CSS Styling for your Comparison Feeds</h3>
                <p>If you want to adjust the style of the Comparison Feeds, you can do it here.</p>
                <p><b>NB:</b> This only applies to Regular feeds and not iFrame feeds.</p>
                
                <?php

                $file = stripslashes('comparisonfeed-wp/css/compare-list.css');
                $local_theme_file = stripslashes('compare-list-modified.css');
                $plugin_files = get_plugin_files($file);
                $file = validate_file_to_edit($file, $plugin_files);
                $real_file = WP_PLUGIN_DIR . '/' . $file;
                $theme_file = get_template_directory() . '/' . $local_theme_file;
                if (isset($_POST['style_file_submit'])) {
                    if( isset($_POST['plugin_test_settings']['newcontent']) ) {
                        $newcontent = stripslashes($_POST['plugin_test_settings']['newcontent']);
                        if ( is_writeable($real_file) ) {
                                $f = fopen($theme_file, 'w+');
                                fwrite($f, $newcontent);
                                fclose($f);
                        }
                    }
                }
                if(file_exists($theme_file) ){
                    $content = file_get_contents( $theme_file );
                }
                else {
                    $content = file_get_contents( $real_file );
                };
                

                $content = esc_textarea( $content ); ?>
                <?php
                if(file_exists($theme_file) ){
                    echo '<p>You are currently using <strong>local style</strong> of the template list. The file is located in your current theme and named <em>compare-list-modified.css</em></p>';
                } ?>
                <table class="form-table">
                    <tbody>
                        <tr valign="top">
                            <td>
                                <textarea cols="70" rows="25" name="plugin_test_settings[newcontent]" id="newcontent" tabindex="1" style="width: 97%; background: #f9f9f9;"><?php echo $content ?></textarea>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <input type="submit" class="button-primary" id="submit" name="style_file_submit" value="<?php _e('Save changes', 'wpcfe'); ?>" />
                
            </div>
        </div>
    </div>

    </form>
</div>