function epl_get_waitlist_approved_url($force = false, $mode = 'wl')
{
    if (!$force && (epl_get_element('epl_rid', $_GET) || !EPL_IS_ADMIN)) {
        return;
    }
    global $event_details, $regis_details;
    $regis_id = $regis_details['ID'];
    $event_id = $event_details['ID'];
    $url_vars = array('page_id' => $page_id, 'epl_action' => epl_regis_flow() <= 2 ? 'process_cart_action' : 'regis_form', 'cart_action' => 'add', 'event_id' => $event_id ? $event_id : $event_details['ID'], 'epl_event' => false, 'epl_rid' => $regis_id, 'epl_r_m' => $mode, 'epl_wlh' => MD5($regis_details['post_date']));
    $base_url = get_the_register_button($event_id, true);
    $regis_url = add_query_arg($url_vars, $base_url);
    return $regis_url;
    //wp_redirect( $regis_url );
    //die();
}
                <div class ="event_times">
                    <h4>Times</h4>
                    <?php 
echo get_the_event_times();
?>
                </div>

                <div class ="event_prices" style="clear:both;">
                    <h4>Ticket Prices</h4>
                    <?php 
echo get_the_event_prices();
?>
                </div>
				<div class ="register_button_wrapper pull-left" style="clear:both;">
					<?php 
echo get_the_register_button();
?>
                </div>
            </div>
			</div>

			<div class="col-md-6 col-sm-12 col-xs-12">
			<?php 
if ($event_details['_epl_event_location'] || $event_details['_epl_event_organization']) {
    ?>
            <div class="col_left"><!--start of col_right-->

                <?php 
    //location id is stored in $event_details['_epl_event_location']
    ?>
					<?php 
 function _get_prices($date_id = null)
 {
     global $event_details, $regis_details;
     $r = '';
     $data = array();
     $date_specific_price = epl_get_element('_epl_date_specific_price', $event_details);
     $data['has_date_limit'] = array_sum((array) $event_details['_epl_price_date_from']) + array_sum((array) $event_details['_epl_price_date_to']) > 0;
     foreach ($event_details['_epl_price_name'] as $_price_key => $_price_name) {
         $date_specifc = epl_get_element_m($_price_key, '_epl_date_specific_price', $event_details, array());
         //if date level and
         if (epl_is_date_level_price() && !epl_is_empty_array($date_specifc) && !epl_is_empty_array($date_specific_price) && !isset($date_specifc[$date_id])) {
             continue;
         }
         $data['price_name'] = $_price_name;
         $price_type = epl_get_element_m($_price_key, '_epl_price_type', $event_details);
         $data['price'] = $event_details['_epl_price'][$_price_key];
         $data['member_price'] = epl_get_element_m($_price_key, '_epl_member_price', $event_details);
         $value = $this->get_current_value('_dates', '_att_quantity', $event_details['ID'], $_price_key);
         if (!is_null($date_id)) {
             $value = epl_get_element($date_id, $value);
         }
         $epl_fields = array('input_type' => 'select', 'input_name' => "_att_quantity[{$event_details['ID']}][{$_price_key}][{$date_id}]", 'options' => $this->get_allowed_quantity($_price_key), 'value' => $value, 'class' => 'epl_att_qty_dd', 'id' => "_att_quantity-{$event_details['ID']}-{$_price_key}-{$date_id}");
         if (epl_is_addon_active('DASFERWEQREWE')) {
             if (epl_get_element_m($_price_key, '_epl_price_pack_type', $event_details) == 'time') {
                 $mem_l = epl_get_element_m($_price_key, '_epl_price_pack_time_length', $event_details);
                 $mem_lt = epl_get_element_m($_price_key, '_epl_price_pack_time_length_type', $event_details);
                 $start = !epl_is_empty_array($regis_details) ? strtotime($regis_details['post_date']) : EPL_DATE;
                 $data['price_name'] .= ' - ' . epl__('until') . ' ' . epl_formatted_date(strtotime("+ {$mem_l} {$mem_lt}", $start));
             }
         }
         $epl_fields += (array) $this->overview_trigger;
         $qty = 0;
         if ($this->flow_mode == 'p') {
             if (!is_null($value)) {
                 if (count($value, 1) > 1) {
                     $qty = current(epl_get_element($_price_key, $value, array()));
                 } else {
                     $qty = epl_get_element(0, $value, 0);
                 }
             }
             if ($qty > 0) {
                 $epl_fields['options'] = $this->get_allowed_quantity($_price_key, null, null, $qty);
             }
         }
         $data['mode'] = $this->mode;
         $data['regis_expiration']['ok'] = 1;
         $data['regis_expiration'] = apply_filters('epl_prices_exp_dates', $_price_key, $qty);
         if (!$this->on_admin && $data['regis_expiration']['ok'] == 0) {
             $data['price_qty_dd'] = '';
         } else {
             $data['price_qty_dd'] = $this->epl_util->create_element($epl_fields);
         }
         $member_only = epl_get_element_m($_price_key, '_epl_price_member_only', $event_details, 0) == 10;
         $min_level = epl_get_element_m($_price_key, '_epl_price_membership_min_level', $event_details, 0);
         if (!is_user_logged_in() && $this->mode != 'overview') {
             if ($data['member_price'] != '') {
                 $data['price_qty_dd']['field'] .= ' ' . get_the_register_button(null, false, array('button_text' => sprintf(epl__('Login to access %s member price'), epl_get_formatted_curr($data['member_price'], null, true)), 'class' => ' ', 'member_only' => 1, 'no_modal' => true));
             }
             if ($member_only) {
                 $data['price_qty_dd']['field'] = get_the_register_button(null, false, array('button_text' => epl__('Login to access this members only price'), 'class' => ' ', 'member_only' => 1, 'no_modal' => true));
             }
         } elseif ($data['member_price'] != '') {
             $data['price'] = $data['member_price'];
         }
         if (defined('S2MEMBER_CURRENT_USER_ACCESS_LEVEL') && is_user_logged_in()) {
             if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL < $min_level) {
                 $data['price_qty_dd']['field'] = epl__('Higher membership level required');
             }
         }
         if (epl_get_element_m($_price_key, '_epl_price_surcharge_amount', $event_details, 0) != 0) {
             $_tmpsurcharge = array('total' => $data['price'], 'price_id' => $_price_key, 'qty' => 1);
             $_tmpsurcharge = $this->process_price_surcharge($_tmpsurcharge);
             $data['price_qty_dd']['field'] .= ' +' . epl_get_formatted_curr($_tmpsurcharge['surcharge'], null, true) . ($event_details['_epl_price_surcharge_per'][$_price_key] == 5 ? epl__('/each') : '');
         }
         $data['price_note'] = epl_get_element($_price_key, $event_details['_epl_price_note']);
         //            echo "<pre class='prettyprint'>" . __LINE__ . "> " . basename( __FILE__ ) . " > " . print_r( $data, true ) . "</pre>";
         if ($this->mode == 'overview' && array_sum((array) $value) == 0 || epl_get_element($_price_key, epl_get_element('_epl_price_hide', $event_details)) == 10) {
             //    || (!is_null( $date_id ) && !isset( $date_specifc[$date_id] ) ) )
         } else {
             $r .= $this->epl->load_view($this->dest . '/cart/cart-prices-row', $data, true);
         }
     }
     return $this->epl->load_view($this->dest . '/cart/cart-prices', array('prices_table' => $r), true);
 }
" title="<?php 
            the_title();
            ?>
"><?php 
            the_title();
            ?>
</a>
                        <?php 
        }
        ?>
   
                        <?php 
        if (epl_is_ok_to_show_regis_button()) {
            ?>
                        <?php 
            echo get_the_register_button(get_the_ID(), false, array('class' => 'arrow'));
            ?>
                        <?php 
        }
        ?>
                    </h2>
                <div class="col_left">

                    <div class="event_description clearfix">

                        <?php 
        $d = epl_get_event_property('_epl_display_content', true);
        $d == 1 ? the_excerpt() : $d == 2 || is_null($d) ? the_content() : '';
        echo get_the_event_session_table();
        ?>
                $counts_time_key = $event_id . "_time_{$date_id}_{$time_id}";
                //if ( $capacity !== false && isset( $counts['_total_att_' . $counts_time_key] ) ) {
                $num_regis = epl_get_element('_total_att_' . $counts_time_key, $counts, 0);
                //}
                $avail = $capacity - $num_regis;
                $regis_button_args = array('_date_id' => $date_id, '_time_id' => $time_id, 'event_id' => $event_id);
                $temp_table_row = array();
                $temp_table_row['title'] = '<td>' . $event_title . '</td>';
                $temp_table_row['day_of_week'] = '<td>' . $event_dow . '</td>';
                $temp_table_row['date'] = '<td>' . $event_dom . '</td>';
                $temp_table_row['time'] = '<td>' . $time . epl_prefix('-', $end_time) . '</td>';
                $temp_table_row['category'] = '<td>' . $event_categories . '</td>';
                $temp_table_row['location'] = '<td>' . $event_venue_title . '</td>';
                $temp_table_row['instructor'] = '<td>' . implode(', ', get_the_instructor_name(false, true, false)) . '</td>';
                $temp_table_row['available_spaces'] = '<td>' . ($capacity !== false ? $avail : '') . '</td>';
                $temp_table_row['regis_button'] = '<td>' . ($capacity === false || $avail !== '' && $avail > 0 ? get_the_register_button($event_id, false, $regis_button_args) : epl__('Sold Out')) . '</td>';
                $temp_table_row = array_intersect_key($temp_table_row, $default_fields);
                epl_sort_array_by_array($temp_table_row, $default_fields);
                if (!empty($temp_table_row)) {
                    $table_row[] = '<tr>' . implode($temp_table_row) . '</tr>';
                }
            }
        }
    }
}
$table_header = array();
$table_header['title'] = epl__('Title');
$table_header['day_of_week'] = epl__('Day');
$table_header['date'] = epl__('Start Date');
$table_header['time'] = epl__('Time');
$table_header['category'] = epl__('Category');
 }
 if ($_to_date && epl_compare_dates($date, $_to_date, '>')) {
     $go = false;
 }
 if (!$go) {
     continue;
 }
 foreach ($event_details['_epl_start_time'] as $time_id => $time) {
     if (epl_is_date_level_time() && !epl_is_empty_array($date_specifc_time) && (!isset($date_specifc_time[$time_id]) || !isset($date_specifc_time[$time_id][$date_id]))) {
         continue;
     }
     $regis_end_time = epl_get_element_m($time_id, '_epl_regis_endtime', $event_details, null);
     if ($regis_end_time && epl_compare_dates(strtotime($regis_end_time, $date), EPL_TIME, '<')) {
         continue;
     }
     $register_button = get_the_register_button(null, false, $register_button_url + array('_time_id' => $time_id));
     $event_link = '';
     if (isset($event_details['_epl_link']) && $event_details['_epl_link'] != '') {
         $event_link = epl_anchor($event_details['_epl_link'], 'Learn More', '_self', 'class="event_link"') . ' ' . $register_button;
     } else {
         $event_link = $register_button;
     }
     //removed per Jessi
     //if (!$regis_end_time && epl_compare_dates( strtotime($time, $date), EPL_TIME, '<' ))
     //continue;
     $event_id = get_the_ID();
     $event_excerpt = get_the_excerpt();
     $event_tooltip = '';
     if ($event_excerpt !== '') {
         $event_tooltip = " <span class='tip event_tooltip' title='" . $event_excerpt . "'>i</span>";
     }
 function respond()
 {
     global $post, $event_list;
     extract(shortcode_atts(array('display' => 'list', 'search_form' => null, 'search_fields' => null, 'taxonomy' => null, 'show_past' => null), $this->shortcode_atts));
     $data['search_form'] = '';
     if ($search_form) {
         if ($search_fields) {
             $search_fields = strpos($search_fields, ',') !== false ? explode(',', $search_fields) : array($search_fields);
         }
         $data['search_form'] = $this->ecm->event_search_box($display, $search_fields, $this->shortcode_atts);
     }
     if (isset($this->shortcode_atts['display'])) {
         //return $this->epl->load_view( 'front/event-calendar', '', true );
     }
     if (stripos(epl_get_element('display', $this->shortcode_atts), 'regis_button') !== false) {
         $event_id = intval($this->shortcode_atts['event_id']);
         //setup_event_details($event_id);
         return get_the_register_button($event_id);
     }
     if (stripos(epl_get_element('display', $this->shortcode_atts), 'attendee-list') !== false) {
         return $this->show_attendee_list($this->shortcode_atts);
     }
     if (epl_get_element('display', $this->shortcode_atts) == 'user-bookings') {
         return $this->user_bookings($this->shortcode_atts);
     }
     if (epl_get_element('display', $this->shortcode_atts) == 'user-bookings-cal') {
         return $this->user_bookings($this->shortcode_atts, true);
     }
     if (stripos(epl_get_element('display', $this->shortcode_atts), 'check-in') !== false) {
         return $this->check_in_page($this->shortcode_atts);
     }
     if (stripos(epl_get_element('display', $this->shortcode_atts), 'list') !== false) {
     }
     $this->ecm->events_list($this->shortcode_atts);
     $data['event_list'] = $event_list;
     if (stripos(epl_get_element('display', $this->shortcode_atts), 'ui-map') !== false) {
         return $this->epl->load_view('front/event-ui-map', '', true);
     }
     //this stuff is used for the fullcalendar
     $data['taxonomy'] = isset($this->shortcode_atts['taxonomy']) ? $this->shortcode_atts['taxonomy'] : epl_get_element('epl_taxonomy', $_POST);
     $data['location'] = isset($this->shortcode_atts['location']) ? $this->shortcode_atts['location'] : epl_get_element('epl_location', $_POST);
     $data['org'] = isset($this->shortcode_atts['org']) ? $this->shortcode_atts['org'] : epl_get_element('epl_org', $_POST);
     $data['event_id'] = isset($this->shortcode_atts['event_id']) ? $this->shortcode_atts['event_id'] : epl_get_element('event_id', $_POST);
     $data['show_past'] = isset($this->shortcode_atts['show_past']) ? $this->shortcode_atts['show_past'] : epl_get_element('show_past', $_POST);
     $data['start'] = epl_get_date_timestamp(isset($this->shortcode_atts['start']) ? $this->shortcode_atts['start'] : epl_get_element('start', $_POST));
     $data['end'] = epl_get_date_timestamp(isset($this->shortcode_atts['end']) ? $this->shortcode_atts['end'] : epl_get_element('end', $_POST));
     $data['shortcode_atts'] = $this->shortcode_atts;
     if (stripos(epl_get_element('display', $this->shortcode_atts), 'calendar') !== false) {
         $data['cal_dates'] = $this->get_cal_dates($data);
         if (!empty($this->shortcode_atts['start_at_first_event'])) {
             global $first_event_date;
             $data['shortcode_atts']['start_month'] = date_i18n('m', $first_event_date);
         }
     }
     $r = null;
     $r = $this->epl->load_template_file('event-list.php', true);
     //template not found
     if (is_null($r) || isset($this->shortcode_atts['display'])) {
         $r = $this->epl->load_view("front/event-{$display}", $data, true);
     } else {
         $r = $this->epl->load_template_file('event-list.php');
     }
     return $data['search_form'] . $r;
 }