Advertisement
Beee

Countdown timer before bookings start

Mar 21st, 2015
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | None | 0 0
  1. <p><?php echo get_option('dbem_bookings_form_msg_closed');  ?></p>
  2. <?php
  3.     /*
  4.     global $post;
  5.     $countdown = get_post_meta($post->ID, 'Registration starts', true);
  6.     if (strpos($countdown, 'ferg' ) !== false) {
  7.         echo "<p>Registration starts ".$countdown.".</p>";
  8.     }
  9.     */
  10.     global $EM_Event;
  11.   $bookingsstart = "";
  12.   foreach( $EM_Event->get_tickets()->tickets as $EM_Ticket ) {
  13.     $bookingsstart .= $EM_Ticket->ticket_start;
  14.   }
  15.   $newdateformat = date("d M Y H:i:s", strtotime($bookingsstart));
  16.   if ( time('Y-m-d H:i:s') > time( $bookingsstart ) ) {
  17.   } else {
  18.     $regstatus = "Registration will open ";
  19.     $regstatus .= do_shortcode('[fergcorp_cdt_single date="'.$newdateformat.' CET"]');
  20.     $regstatus .= ".";
  21.   }
  22.   echo $regstatus;
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement