<h2><?php echo get_the_title( $entry->post_id ); ?></h2>
<div class="sg-subscriber-data">
	<div class="postbox">
		<h2 class="hndle ui-sortable-handle"><span><?php esc_html_e( 'Entries', 'giveasap' ); ?></span>
		</h2>
		<div class="inside sg-subscriber-entries">
			<?php echo esc_html( $entry->entries ); ?>
		</div>
	</div>
	<div class="postbox">
		<h2 class="hndle ui-sortable-handle">
			<span><?php esc_html_e( 'Information', 'giveasap' ); ?></span></h2>
		<div class="inside">
			<?php
            $form = sg_get_form_fields( $entry->post_id );
			$hidden_meta_keys = apply_filters( 'sg_hidden_subscriber_meta', array(
				'_used_extra_actions',
				'winner',
				'_mailpoet_subscriber',
			) );
			foreach ( $meta as $key => $values ) {

				if ( in_array( $key, $hidden_meta_keys ) ) {
					continue;
				}

				if ( isset( $form[ substr( $key, 1 ) ] ) ) {
					$field = $form[ substr( $key, 1 ) ];
					echo '<p><strong>' . $field['label'] . ':</strong> ' . implode( ', ', $values ) . '</p>';
					continue;
				}

				if ( 'user_id' === $key ) {
					echo '<p><strong>' . __( 'Connected User', 'giveasap' ) . ':</strong> <a href="' . admin_url( 'user-edit.php?user_id=' . absint( $values[0] ) ) . '">' . $values[0] . '</a></p>';
					continue;
				}

				if ( '_name' === $key ) {
					$name = implode( ', ', $values );
					if ( ! $name ) { continue; }
					echo '<p><strong>' . __( 'Name', 'giveasap' ) . ':</strong> ' . implode( ', ', $values ) . '</p>';
					continue;
				}

				if ( '_referred_by' === $key ) {
					echo '<p><strong>' . __( 'Referred By', 'giveasap' ) . ':</strong> <a href="' . admin_url( 'edit.php?post_type=giveasap&page=giveasap-users&user=' .  absint( $values[0] ) . '&action=view' ) . '">' . absint( $values[0] ) . '</a></p>';
					continue;
				}

				if ( apply_filters( 'sg_show_custom_subscriber_meta_' . $key, true ) ) {
					echo '<p><strong>' . ucfirst( trim( str_replace( '_', ' ', $key ) ) ) . ':</strong> ' . implode( ', ', $values ) . '</p>';
				}

				do_action( 'sg_custom_subscriber_meta', $key, $values, $entry_id );
			}
			?>
		</div>
	</div>
</div>