Advertisement
Apina

bottom part of espresso table

Mar 20th, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. $register_button = '<a id="a_register_link-'.$event->id.'" href="'.get_option('siteurl').'/?page_id='.$event_page_id.'&regevent_action=register&event_id='.$event->id.'&name_of_event='.stripslashes_deep($event->event_name).'">Register</a>';
  2.  
  3. //Check to see how many open spots are available
  4. // $open_spots = get_number_of_attendees_reg_limit($event->id, 'available_spaces') == 'Unlimited' ? 999 : get_number_of_attendees_reg_limit($event->id, 'available_spaces');
  5.  
  6.  
  7. $open_spots = get_number_of_attendees_reg_limit($event->id, 'available_spaces');
  8.  
  9.  
  10. //echo $open_spots;
  11.  
  12. if ( $open_spots < 1 ) { $live_button = 'Closed'; }
  13.  
  14. echo $open_spots;
  15. ?>
  16. <tr class="espresso-table-row">
  17. <td class="td-group">
  18. <?php echo $event->event_name ?>
  19. </td>
  20. <td class="td-group">
  21. <?php echo $event->address ?>
  22. </td>
  23. <td class="td-group">
  24. <?php echo $event->city ?>
  25. </td>
  26. <td class="td-group">
  27. <?php echo $event->state ?>
  28. </td>
  29. <td class="td-group">
  30. <?php echo event_date_display($event->start_date, $format = 'l, M d, Y') ?>
  31. </td>
  32. <td class="td-group">
  33. <?php echo espresso_event_time($event->id, 'start_time', get_option('time_format')) ?>
  34. </td>
  35.  
  36. <td class="td-group">
  37. <?php if ($open_spots === 0 ) { echo "Closed"; } else { echo $register_button; } ?>
  38. </td>
  39. </tr>
  40. <?php } //close foreach ?>
  41. </tbody>
  42. </table>
  43.  
  44. <?php
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement