function es_admin_participants($event_id)
{
    $is_new = $event_id == 0;
    if (!$is_new) {
        $users_events = new ES_DB_UsersEvents();
        $event = new stdClass();
        $event->ID = $event_id;
        if (isset($_POST['subscribe-action'])) {
            global $wpdb;
            $users_events = new ES_DB_UsersEvents();
            $action = $_POST['subscribe-action'];
            $user = new stdClass();
            $user->ID = $_POST['subscribe-user-id'];
            $users_events->update_user_status($user, $event, $action);
        }
        $users = $users_events->get_users_grouped_by_status($event);
    }
    ?>
<table id="event_participants" class="eventtable participants">
		<thead>
			  <tr>
				    <td colspan="2" class="tribe_sectionheader">
					      <h4 id="participants">Participants</h4>
            </td>
			  </tr>
		</thead>
    <tbody>
        <tr>
            <td>
                <?php 
    es_render_subscription_admin_for("onboard", $users, $event_id);
    ?>
                <?php 
    es_render_subscription_admin_for("pending", $users, $event_id);
    ?>
                <?php 
    es_render_subscription_admin_for("onlist", $users, $event_id);
    ?>
                <?php 
    es_render_subscription_admin_for("rejected", $users, $event_id);
    ?>
            </td>
        </tr>
    </tbody>
</table>
<?php 
}