HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/innocamp/public_html/wp-content/plugins/WP-FormBuilder/admin/entries/entry-detail.php
<?php
defined('ABSPATH') || die();
?>

<div class="hf-form-entry-details-wrap wrap">
    <h1></h1>
    <div id="hf-form-entry-details">
        <div class="hf-page-title">
            <h3>
                <span><?php esc_html_e('Entry', 'hash-form'); ?></span>
                <span class="hf-sub-label">
                    <?php printf(esc_html__('(ID %d)', 'hash-form'), absint($entry->id)); ?>
                </span>
            </h3>
        </div>
        <table>
            <tbody>
                <?php
                $file_img_placeholder = HASHFORM_URL . '/img/attachment.png';
                foreach ($entry->metas as $id => $value) {
                    $title = $value['name'];
                    $entry_value = HashFormHelper::unserialize_or_decode($value['value']);
                    $entry_type = $value['type'];

                    if (is_array($entry_value)) {
                        $entry_value = array_filter($entry_value);
                        if ($entry_type == 'name') {
                            $entry_value = implode(' ', $entry_value);
                        } elseif ($entry_type == 'repeater_field') {
                            $entry_val = '<table><thead><tr>';
                            foreach (array_keys($entry_value) as $key) {
                                $entry_val .= '<th>' . $key . '</th>';
                            }
                            $entry_val .= '</tr></thead><tbody>';
                            $out = array();
                            foreach ($entry_value as $rowkey => $row) {
                                foreach ($row as $colkey => $col) {
                                    $out[$colkey][$rowkey] = $col;
                                }
                            }
                            foreach ($out as $key => $val) {
                                foreach ($val as $eval) {
                                    $entry_val .= '<td>' . $eval . '</td>';
                                }
                                $entry_val .= '</tr>';
                            }
                            $entry_val .= '</tbody></table>';
                            $entry_value = $entry_val;
                        } else {
                            $entry_value = implode(',<br>', $entry_value);
                        }
                    }

                    if ($entry_type == 'upload' && $entry_value) {
                        $files_arr = explode(',', $entry_value);
                        $upload_value = '';
                        foreach ($files_arr as $file) {
                            $file_info = pathinfo($file);
                            $file_name = $file_info['basename'];
                            $file_extension = $file_info['extension'];

                            $upload_value .= '<div class="hf-form-entry-preview">';
                            $upload_value .= '<div class="hf-form-entry-preview-image"><a href="' . esc_url($file) . '" target="_blank">';
                            if (in_array($file_extension, array('jpg', 'jpeg', 'png', 'gif', 'bmp'))) {
                                $upload_value .= '<img src="' . esc_url($file) . '">';
                            } else {
                                $upload_value .= '<img class="hf-attachment-icon" src="' . esc_url($file_img_placeholder) . '">';
                            }
                            $upload_value .= '</a></div>';
                            $upload_value .= '<label><a href="' . esc_url($file) . '" target="_blank">';
                            $upload_value .= esc_html($file_name) . '</a></label>';
                            $upload_value .= '</div>';
                        }
                        $entry_value = $upload_value;
                    }
                    echo '<tr>';
                    echo '<th>' . esc_html($title) . '</th>';
                    echo '<td>' . wp_kses_post($entry_value) . '</td>';
                    echo '</tr>';
                }
                ?>
            </tbody>
        </table>
    </div>
</div>