Advertisement
Beee

attendeeslist.php

Feb 22nd, 2015
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.47 KB | None | 0 0
  1. <?php
  2. // template to show attendee list
  3. // @var $EM_Event EM_Event
  4. $people = array();
  5. $EM_Bookings = $EM_Event->get_bookings();
  6. if( count($EM_Bookings->bookings) > 0 ) {
  7.     echo "\n";
  8.     ?>
  9.     <table class="event-attendees">
  10.         <tr class="">
  11.             <th class="attendee-name">Name</th>
  12.             <th class="attendee-country">Country</th>
  13.             <th class="attendee-discipline">Rides</th>
  14.             <th class="attendee-status">Status</th>
  15.         </tr>
  16.     <?php
  17.     $guest_bookings         = get_option('dbem_bookings_registration_disable');
  18.     $guest_booking_user = get_option('dbem_bookings_registration_user');
  19.     $counter = 0;
  20.     foreach( $EM_Bookings as $EM_Booking){
  21.     $attendees_list = "";
  22.     $attendees = $EM_Booking->booking_meta['attendees'];
  23.     if ( !empty($attendees) ) {
  24.    
  25.       $attendees_list = "";
  26.       foreach($attendees as $key => $value) {
  27.       foreach($value as $key_attendee => $value_attendee) {
  28.           $attendees_list .= "<tr>";
  29.           $attendees_list .= "<td>".$value_attendee["attendee_name"]."</td>";
  30.           $attendees_list .= "<td>".$value_attendee["attendee_country"]."</td>";
  31.           $attendees_list .= "<td>".$value_attendee["attendee_discipline"]."</td>";
  32.           $attendees_list .= "<td>".$EM_Booking->get_status()."</td>";
  33.           $attendees_list .= "</tr>";
  34.           }
  35.       }
  36.     }
  37.     echo $attendees_list;
  38.     }
  39.     echo "\n";
  40.     ?>
  41.     </table>
  42.     <?php
  43. }
  44. if( count($EM_Bookings->bookings) == 0 ) {
  45.     echo '<p>No one registered yet... Will you be the first ?</p>';
  46. }
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement