<?php 
        echo get_the_location_address();
        ?>
<br />
                    <?php 
        echo get_the_location_city();
        ?>
<br> <?php 
        echo get_the_location_state();
        ?>
<br> <?php 
        echo get_the_location_zip();
        ?>
<br>
                    <?php 
        echo get_the_location_phone();
        ?>
<br />
                    </div>
					<?php 
    }
    ?>

                <?php 
    //organization id is stored in $event_details['_epl_event_organization']
    ?>
                        <?php 
    if ($event_details['_epl_event_organization']) {
        ?>
						<div class ="event_organization">
                            <h4>Hosted by</h4>
Exemplo n.º 2
0
 function get_the_regis_dates_times_prices($regis_id = null, $raw = false)
 {
     global $regis_details, $event_details;
     if (!is_null($regis_id) && epl_get_element('ID', $regis_details) != $regis_id) {
         $this->ecm->setup_regis_details(epl_nz($regis_id, $this->erm->get_regis_post_id()));
     }
     $this->erm->setup_current_data($regis_details);
     $regis_events = $this->erm->get_regis_events();
     foreach ($regis_events as $event_id => $totals) {
         setup_event_details($event_id);
         $regis_date_section = $this->erm->get_regis_dates();
         $regis_dates = epl_get_element_m($event_details['ID'], '_epl_start_date', $regis_date_section);
         $regis_times = epl_get_element_m($event_details['ID'], '_epl_start_time', $regis_date_section);
         $regis_tickets = epl_get_element_m($event_details['ID'], '_att_quantity', $regis_date_section);
         $time_format = get_option('time_format');
         $_r[$event_id] = array();
         foreach ($event_details['_epl_start_date'] as $date_key => $date) {
             $total_tickets = 0;
             $dg = epl_get_element_m($date_key, '_epl_date_group_no', $event_details, '');
             if (in_array($date_key, $regis_dates) || $dg != '' && in_array($date_key, $regis_dates[$dg])) {
                 $_r[$event_id][$date_key]['date'] = array('disp' => epl_formatted_date($date));
                 $_l = '';
                 if (epl_get_element($date_key, epl_get_element('_epl_date_location', $event_details))) {
                     $_location_id = epl_get_element($date_key, $event_details['_epl_date_location']);
                     the_location_details($_location_id);
                     //sets up the location info
                     $_r[$event_id][$date_key]['date']['location'] = get_the_location_name() . ' <br /> ' . get_the_location_address() . ' ' . get_the_location_city() . ' ' . get_the_location_state() . ' ' . get_the_location_zip() . ' ' . get_the_location_phone() . ' ' . get_the_location_gmap_icon(epl__('See Map'));
                 }
                 if ($date != $event_details['_epl_end_date'][$date_key]) {
                     $_r[$event_id][$date_key]['date'] = array('disp' => epl_formatted_date($date) . ' - ' . epl_formatted_date($event_details['_epl_end_date'][$date_key]) . '<br /> ' . $_l);
                 }
                 $event_times = epl_get_element('_epl_start_time', $event_details);
                 $_empty_time = false;
                 if (epl_is_empty_array($event_times)) {
                     $_empty_time = true;
                 }
                 foreach ($event_times as $time_key => $times) {
                     if (!epl_is_date_level_time() && ($_empty_time || in_array($time_key, (array) $regis_times)) || epl_is_date_level_time() && $regis_times[$date_key] == $time_key) {
                         $start_time = date_i18n($time_format, strtotime($times));
                         $end_time = date_i18n($time_format, strtotime($event_details['_epl_end_time'][$time_key]));
                         $_r[$event_id][$date_key]['time'][$time_key] = $_empty_time ? '' : array('disp' => $start_time . ' - ' . $end_time . epl_prefix(' - ', epl_get_element_m($time_key, '_epl_time_note', $event_details)));
                         $total_tickets = 0;
                         foreach ($event_details['_epl_price_name'] as $price_key => $price_name) {
                             //-----------------
                             //if ( (!epl_is_date_level_price ( ) && array_key_exists( $price_key, $regis_tickets )) || (epl_is_date_level_price ( ) && $regis_tickets[$price_key][$date_key] == $time_key) ) {
                             if (array_key_exists($price_key, $regis_tickets)) {
                                 $total_tickets++;
                                 $num_att = 0;
                                 if (epl_is_date_level_price() && epl_get_element_m($date_key, $price_key, $regis_tickets) > 0) {
                                     $num_att = epl_get_element_m($date_key, $price_key, $regis_tickets);
                                 } else {
                                     $num_att = is_array($regis_tickets[$price_key]) ? array_sum($regis_tickets[$price_key]) : $regis_tickets[$price_key];
                                 }
                                 if ($num_att > 0) {
                                     $true_price = $totals['money_totals'][$price_key] / $num_att;
                                     $_r[$event_id][$date_key]['time'][$time_key]['price'][$price_key] = array('disp' => $price_name, 'qty' => $num_att, 'ticket_price' => $event_details['_epl_price'][$price_key], 'raw_price' => $true_price, 'price' => epl_get_formatted_curr($true_price, null, true));
                                     if (epl_get_element('_epl_pricing_type', $event_details) == 10 && $time_key != $event_details['_epl_price_parent_time_id'][$price_key]) {
                                         unset($_r[$event_id][$date_key]['time'][$time_key]['price'][$price_key]);
                                         $total_tickets--;
                                     }
                                     if (epl_is_date_level_price() && epl_get_element_m($date_key, $price_key, $regis_tickets) == 0) {
                                         unset($_r[$event_id][$date_key]['time'][$time_key]['price'][$price_key]);
                                         $total_tickets--;
                                     }
                                     $_r[$event_id][$date_key]['time']['total_tickets'] = $total_tickets;
                                 }
                             }
                             //----------
                         }
                     }
                 }
             }
         }
     }
     if ($raw) {
         return $_r;
     }
     return $this->epl->load_view('front/registration/regis-dates-times-prices', array('table_data' => $_r), true);
     return $r;
 }