HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
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: /var/www/html/wpprm_err/wp-content/plugins/wp-events-manager/templates/shortcodes/user-account.php
<?php
/**
 * The Template for displaying shortcode user account.
 *
 * Override this template by copying it to yourtheme/wp-events-manager/shortcodes/user-account.php
 *
 * @author        ThimPress, leehld
 * @package       WP-Events-Manager/Template
 * @version       2.1.7.4
 */

/**
 * Prevent loading this file directly
 */
defined( 'ABSPATH' ) || exit();

$query = new WP_Query( $args );

wpems_print_notices();

if ( ! is_user_logged_in() ) {
	printf( __( 'You are not <a href="%s">login</a>', 'wp-events-manager' ), wpems_login_url() );

	return;
}

if ( $query->have_posts() ) { ?>

	<table>
		<thead>
		<th><?php _e( 'Booking ID', 'wp-events-manager' ); ?></th>
		<th><?php _e( 'Events', 'wp-events-manager' ); ?></th>
		<th><?php _e( 'Type', 'wp-events-manager' ); ?></th>
		<th><?php _e( 'Cost', 'wp-events-manager' ); ?></th>
		<th><?php _e( 'Quantity', 'wp-events-manager' ); ?></th>
		<th><?php _e( 'Method', 'wp-events-manager' ); ?></th>
		<th><?php _e( 'Status', 'wp-events-manager' ); ?></th>
		</thead>

		<tbody>
		<?php foreach ( $query->posts as $post ) { ?>
			<?php $booking = WPEMS_Booking::instance( $post->ID ); ?>
			<tr>
				<td><?php printf( '%s', wpems_format_ID( $post->ID ) ); ?></td>
				<td><?php printf( '<a href="%s">%s</a>', get_the_permalink( $booking->event_id ), get_the_title( $booking->event_id ) ); ?></td>
				<td><?php printf( '%s', floatval( $booking->price ) == 0 ? __( 'Free', 'wp-events-manager' ) : __( 'Cost', 'wp-events-manager' ) ); ?></td>
				<td><?php printf( '%s', wpems_format_price( floatval( $booking->price ), $booking->currency ) ); ?></td>
				<td><?php printf( '%s', $booking->qty ); ?></td>
				<td><?php printf( '%s', $booking->payment_id ? wpems_get_payment_title( $booking->payment_id ) : __( 'No payment', 'wp-events-manager' ) ); ?></td>
				<th><?php printf( '%s', wpems_booking_status( $booking->ID ) ); ?></th>
			</tr>
		<?php } ?>
		</tbody>
	</table>

	<?php
	$args = array(
		'base'               => '%_%',
		'format'             => '?paged=%#%',
		'total'              => 1,
		'current'            => 0,
		'show_all'           => false,
		'end_size'           => 1,
		'mid_size'           => 2,
		'prev_next'          => true,
		'prev_text'          => __( '« Previous', 'wp-events-manager' ),
		'next_text'          => __( 'Next »', 'wp-events-manager' ),
		'type'               => 'plain',
		'add_args'           => false,
		'add_fragment'       => '',
		'before_page_number' => '',
		'after_page_number'  => '',
	);

	echo paginate_links(
		array(
			'base'      => str_replace( 9999999, '%#%', esc_url( get_pagenum_link( 9999999 ) ) ),
			'format'    => '?paged=%#%',
			'prev_text' => __( '« Previous', 'wp-events-manager' ),
			'next_text' => __( 'Next »', 'wp-events-manager' ),
			'current'   => max( 1, get_query_var( 'paged' ) ),
			'total'     => $query->max_num_pages,
		)
	);
	?>

<?php } else { ?>
	<p><?php esc_html_e( 'No event booking has been made yet.', 'wp-events-manager' ); ?></p>
	<a class="button"
	   href="<?php echo get_post_type_archive_link( 'tp_event' ); ?>"><?php esc_html_e( 'Go to Events', 'wp-events-manager' ); ?></a>
<?php } ?>

<?php wp_reset_postdata(); ?>