eventsmanager

bookings-event-printable.php - Sort by Name

Feb 27th, 2013
256
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. * This page displays a printable view of bookings for a single event.
  4. * You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
  5. * Here you can assume that $EM_Event is globally available with the right EM_Event object.
  6. */
  7. global $EM_Event;
  8. ?>
  9. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  13. <title><?php echo sprintf(__('Bookings for %s','dbem'), $EM_Event->name); ?></title>
  14. <link rel="stylesheet" href="<?php echo bloginfo('wpurl') ?>/wp-content/plugins/events-manager/includes/css/events_manager.css" type="text/css" media="screen" />
  15. </head>
  16. <body id="printable">
  17. <div id="container">
  18. <h1><?php echo sprintf(__('Bookings for %s','dbem'), $EM_Event->name); ?></h1>
  19. <p><?php echo $EM_Event->output("#d #M #Y"); ?></p>
  20. <p><?php echo $EM_Event->output("#_LOCATION, #_ADDRESS, #_TOWN"); ?></p>
  21. <h2><?php _e('Bookings data', 'dbem');?></h2>
  22. <table id="bookings-table">
  23. <tr>
  24. <th scope='col'><?php _e('Name', 'dbem')?></th>
  25. <th scope='col'><?php _e('E-mail', 'dbem')?></th>
  26. <th scope='col'><?php _e('Phone number', 'dbem')?></th>
  27. <th scope='col'><?php _e('Spaces', 'dbem')?></th>
  28. <th scope='col'><?php _e('Comment', 'dbem')?></th>
  29. </tr>
  30.  
  31. <?php
  32. $bookings = array();
  33. foreach($EM_Event->get_bookings()->bookings as $EM_Booking){
  34. if ($EM_Booking->status == 1){
  35. array_push($bookings, array('person_name'=>$EM_Booking->person->get_name(),'person_email'=>$EM_Booking->person->user_email,'person_phone'=>$EM_Booking->person->phone,'booking_space'=>$EM_Booking->get_spaces(),'booking_comment'=>$EM_Booking->booking_comment));
  36. }
  37. }
  38. asort($bookings);
  39. ?>
  40. <?php
  41. foreach($bookings as $EM_Booking) {
  42. ?>
  43. <tr>
  44. <td><?php echo $EM_Booking['person_name'] ?></td>
  45. <td><?php echo $EM_Booking['person_email'] ?></td>
  46. <td><?php echo $EM_Booking['person_phone'] ?></td>
  47. <td class='spaces-number'><?php echo $EM_Booking['booking_space'] ?></td>
  48. <td><?php echo $EM_Booking['booking_comment'] ?></td>
  49. </tr>
  50. <?php
  51. }
  52. ?>
  53. <tr id='booked-spaces'>
  54. <td colspan='3'>&nbsp;</td>
  55. <td class='total-label'><?php _e('Booked', 'dbem')?>:</td>
  56. <td class='spaces-number'><?php echo $EM_Event->get_bookings()->get_booked_spaces(); ?></td>
  57. </tr>
  58. <tr id='available-spaces'>
  59. <td colspan='3'>&nbsp;</td>
  60. <td class='total-label'><?php _e('Available', 'dbem')?>:</td>
  61. <td class='spaces-number'><?php echo $EM_Event->get_bookings()->get_available_spaces(); ?></td>
  62. </tr>
  63. </table>
  64. </div>
  65. </body>
  66. </html>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×