getRender(); // Query $q = array( 'post_type'=>$this->PT, 'author'=>get_current_user_id(), 'posts_per_page'=>'-1', 'post_status'=>array('pending', 'draft', 'future', 'publish'), 'meta_query'=>array(), 'date_query'=>array(), 'orderby'=>'post_date', 'order'=>'DESC', ); // Hide Canceled Bookings if($hide_canceleds) { $q['meta_query'][] = array('key'=>'mec_verified', 'value'=>'-1', 'compare'=>'!='); } // Show Only Upcoming Bookings if($upcomings) { $q['date_query'] = array( 'after' => current_time('Y-m-d H:i:s'), ); } // The Query $query = new WP_Query($q); $id = 1; ?>
have_posts()): ?> have_posts()): $query->the_post(); $ID = get_the_ID(); $book_id = $ID; $transaction_id = $this->book->get_transaction_id_book_id($ID); $event_id = get_post_meta($ID, 'mec_event_id', true); $ticket_ids = get_post_meta($ID, 'mec_ticket_id', true); $confirmed = get_post_meta($ID, 'mec_confirmed', true); if($confirmed == '1') $status_class = 'mec-book-confirmed'; elseif($confirmed == '-1') $status_class = 'mec-book-rejected'; else $status_class = 'mec-book-pending'; $transaction = $this->book->get_transaction($transaction_id); $timestamps = explode(':', get_post_meta($ID, 'mec_date', true)); $start_time = $timestamps[0]; $end_time = $timestamps[1]; $booking_options = get_post_meta($event_id, 'mec_booking', true); $bookings_all_occurrences = isset($booking_options['bookings_all_occurrences']) ? $booking_options['bookings_all_occurrences'] : 0; if($bookings_all_occurrences) { $dates = $render->dates($event_id, NULL, 1, NULL); if(is_array($dates) and count($dates) and isset($dates[0])) { $start_time = ((isset($dates[0]['start']) and isset($dates[0]['start']['timestamp'])) ? $dates[0]['start']['timestamp'] : 0); $end_time = ((isset($dates[0]['end']) and isset($dates[0]['end']['timestamp'])) ? $dates[0]['end']['timestamp'] : 0); } } // Check If Event Exist $db = $this->getDB(); $check_event_exist = $db->select("SELECT `ID` FROM `#__posts` WHERE `ID`={$event_id}", 'loadResult'); $event = trim($check_event_exist) ? $render->data($event_id) : array(); // Multiple Dates $all_dates = (isset($transaction['all_dates']) and is_array($transaction['all_dates'])) ? $transaction['all_dates'] : array(); ?> ID, $book_id, $event ); ?>
$attendee) { if(!is_numeric($attendee_i)) continue; echo '
'; echo ''.$person_id.''; echo ''. ( isset($attendee['_name']) ? $attendee['_name'] : $attendee['name'] ).''; echo ''.$attendee['email'].''; echo ''.((isset($event->tickets[$attendee['id']]) ? $event->tickets[$attendee['id']]['name'] : '').' '.(isset($event->tickets[$attendee['id']]) ? $event->tickets[$attendee['id']]['price_label'] : '')).''; // Ticket Variations echo ''; if(isset($attendee['variations']) and is_array($attendee['variations']) and count($attendee['variations'])) { $ticket_variations = $this->main->ticket_variations((trim($check_event_exist) ? $event_id : NULL), $attendee['id']); foreach($attendee['variations'] as $variation_id=>$variation_count) { if(!$variation_count or ($variation_count and $variation_count < 0)) continue; $variation_title = (isset($ticket_variations[$variation_id]) and isset($ticket_variations[$variation_id]['title'])) ? $ticket_variations[$variation_id]['title'] : ''; if(!trim($variation_title)) continue; echo ''.' + '.$variation_title.' ('.$variation_count.')'.''; } } else { echo '-'; } echo ''; $person_id++; echo '
'; } } ?>
ID) or !isset($event->title)) : ?> title; ?>

main->get_confirmation_label($confirmed); ?>
%s', 'modern-events-calendar-lite'), ((is_array($transaction) and isset($transaction['tickets'])) ? count($transaction['tickets']) : 0)); ?> ID)) { $location_id = $this->main->get_master_location_id($event); $location_latitude = isset($event->locations[$location_id]['latitude']) ? $event->locations[$location_id]['latitude'] : NULL; $location_longitude = isset($event->locations[$location_id]['longitude']) ? $event->locations[$location_id]['longitude'] : NULL; } ?> ">