Files
wp-go-form/go-form-plugin/templates/table.php
2026-05-06 15:04:53 +02:00

50 lines
1.5 KiB
PHP

<table class="wp-list-table widefat striped">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Country</th>
<th>Club</th>
<th>Rank</th>
<th>EGD Number</th>
<?php if ($show_admin): ?>
<th>Email</th>
<th>Date Added</th>
<th>Action</th>
<th>Comment</th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php foreach ($entries as $e): ?>
<tr>
<td> <?= esc_html($e->first_name) ?> </td>
<td> <?= esc_html($e->last_name) ?> </td>
<td> <?= esc_html($e->country) ?> </td>
<td> <?= esc_html($e->club) ?> </td>
<td> <?= esc_html($ranks[$e->rank]) ?> </td>
<td> <?= esc_html($e->egd_number) ?> </td>
<?php if ($show_admin): ?>
<td> <?= esc_html($e->email) ?> </td>
<td> <?= esc_html($e->created_at) ?> </td>
<td>
<form method="post" action=" <?= admin_url('admin-post.php') ?> ">
<?= wp_nonce_field('go_form_delete_action', 'go_form_delete_nonce', true, false) ?>
<input type="hidden" name="action" value="go_form_delete_entry">
<input type="hidden" name="entry_id" value=" <?= esc_attr($e->id) ?> ">
<input type="submit" value="Delete" class="button delete" onclick="return confirm('Delete this entry?')">
</form>
</td>
<td> <?= esc_html($e->comment) ?> </td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>