function send_confirmation_email($data)
 {
     global $organization_details, $customer_email, $event_details;
     $data['eb'] = '';
     $default_email_body = $this->epl->load_view('front/registration/regis-confirm-email', $data, true);
     $_notif = epl_get_element('_epl_event_notification', $event_details);
     $_notif_data = array();
     if ($_notif && (!epl_is_empty_array($_notif) || $_notif != '')) {
         $id = is_array($_notif) ? current($_notif) : $_notif;
         $_notif_data = get_post($id, ARRAY_A) + (array) $this->ecm->get_post_meta_all($id);
         $data['eb'] = nl2br($this->notif_tags(stripslashes_deep(html_entity_decode($_notif_data['post_content'], ENT_QUOTES))));
     }
     if (epl_is_empty_array($_notif) || $_notif == '' || epl_get_element('_epl_notification_replace', $event_details, 0) == 0) {
         $email_body = $this->epl->load_view('front/registration/regis-confirm-email', $data, true);
     } else {
         $email_body = $data['eb'];
     }
     $email_body = preg_replace('/<div class=\'epl_(.*?)_message\'>(.*?)<\\/div>/', '', $email_body);
     $from_name = html_entity_decode(epl_get_element('_epl_email_from_name', $_notif_data, get_bloginfo('name')), ENT_QUOTES);
     $from_email = epl_get_element('_epl_from_email', $_notif_data, get_bloginfo('admin_email'));
     $subject = html_entity_decode(epl_get_element('_epl_email_subject', $_notif_data, epl__('Registration Confirmation')), ENT_QUOTES);
     $headers = "From: \"" . $from_name . "\" <{$from_email}> \r\n";
     $headers .= 'Reply-To: ' . $from_email . "\r\n";
     $headers .= 'X-Mailer: PHP/' . phpversion();
     $headers .= "MIME-Version: 1.0\r\n";
     $headers .= "Content-Type: text/html; charset=UTF-8\r\n";
     if (isset($customer_email) && $customer_email != '') {
         @wp_mail($customer_email, $subject, $email_body, $headers);
     }
     //admin email
     $_email = epl_get_event_property('_epl_alt_admin_email');
     if ($_email == '') {
         $_email = epl_nz(epl_get_event_option('epl_default_notification_email'), get_bloginfo('admin_email'));
     }
     @wp_mail($_email, epl__('New Registration') . ': ' . get_the_event_title(), $default_email_body, $headers);
 }
<?php

$display_note_field = epl_nz(epl_get_event_option('epl_date_note_enable'), 10) == 10;
$display_location_dd = epl_nz(epl_get_event_option('epl_date_location'), 10) == 10;
?>



<?php 
echo epl_show_ad('Control Registration Start and End times in the pro version.');
?>
<table class="epl_form_data_table" cellspacing ="0" id="epl_dates_table">
    <thead>
    <th></th>
    <?php 
//echo epl_get_the_labels( $date_field_labels );
?>
    <th colspan="3"><img src="<?php 
echo EPL_FULL_URL;
?>
images/calendar.png" class="load_fullcalendar epl_cur_pointer epl_fr" /></th>
</thead>
<tfoot>
    <tr>
        <td colspan="7" style="vertical-align: middle;">
            <a href="#" class="add_table_row"><img src ="<?php 
echo EPL_FULL_URL;
?>
images/add.png" /></a>
        </td>
    </tr>
 function send_confirmation_email($data)
 {
     global $organization_details, $customer_email, $event_details, $email_regis_form;
     //$data['email_body'] = '';
     $attach_pdf = epl_get_setting('epl_api_option_fields', 'epl_invoice_attach_to_conf', 0) == 10 && epl_is_addon_active('_epl_atp');
     $attach_pdf = apply_filters('epl_attach_invoice_to_conf_email', $attach_pdf);
     $defaults = array('admin_subject' => epl__('New Registration'), 'subject' => epl__('Registration Confirmation'));
     $default_email_body = $this->epl->load_view('email/default/template-no-custom', $data, true);
     $_notif = epl_get_element('_epl_event_notification', $event_details);
     if (epl_is_waitlist_flow()) {
         $_notif = epl_get_element('_epl_waitlist_notification', $event_details);
         $defaults['admin_subject'] = epl__('New Waitlist Addition');
     }
     $_notif_data = array();
     if (epl_sc_is_enabled() && !epl_is_waitlist_flow()) {
         $_notif = epl_get_setting('epl_sc_options', 'epl_sc_notification');
     }
     if ($_notif && (!epl_is_empty_array($_notif) || $_notif != '')) {
         $id = is_array($_notif) ? current($_notif) : $_notif;
         $_notif_data = get_post($id, ARRAY_A) + (array) $this->ecm->get_post_meta_all($id);
         $data['email_body'] = $this->notif_tags($_notif_data['post_content'], $data);
     }
     if (epl_is_empty_array($_notif) || $_notif == '') {
         $email_template = 'email/default/template-no-custom';
         $email_template_name = epl_get_element('_epl_email_template', $_notif_data);
         $email_template = $email_template_name ? 'email/' . $email_template_name . '/template.php' : $email_template;
         $data['base_url'] = EPL_EMAIL_TEMPLATES_URL . $email_template_name . '/';
         $email_body = $this->epl->load_view($email_template, $data, true);
     } else {
         $email_body = $data['email_body'];
     }
     $email_body = preg_replace('/<div class=\'epl_(.*?)_message\'>(.*?)<\\/div>/', '', $email_body);
     $from_name = stripslashes_deep(html_entity_decode(epl_get_element('_epl_email_from_name', $_notif_data, get_bloginfo('name')), ENT_QUOTES));
     $from_email = epl_get_element('_epl_from_email', $_notif_data, get_bloginfo('admin_email'));
     $subject = stripslashes_deep(html_entity_decode(epl_get_element('_epl_email_subject', $_notif_data, $defaults['subject']), ENT_QUOTES));
     $headers = "From: \"" . $from_name . "\" <{$from_email}> \r\n";
     $headers .= 'Reply-To: ' . $from_email . "\r\n";
     $headers .= 'X-Mailer: PHP/' . phpversion();
     $headers .= "MIME-Version: 1.0\r\n";
     $headers .= "Content-Type: text/html; charset=UTF-8\r\n";
     if ($attach_pdf) {
         $invoice = $this->erptm->invoice($data['post_ID']);
         $data['attachment'] = $this->make_pdf($invoice, true, true);
     }
     if (isset($customer_email) && count($customer_email) > 0) {
         $to = implode(',', $customer_email);
         @wp_mail($to, $subject, $email_body, $headers, epl_get_element('attachment', $data, null));
     }
     //admin email
     $_email = epl_get_event_property('_epl_alt_admin_email');
     if ($_email == '') {
         $_email = epl_nz(epl_get_event_option('epl_default_notification_email'), get_bloginfo('admin_email'));
     }
     $admin_email = array('email' => $_email, 'title' => $defaults['admin_subject'] . ': ' . get_the_event_title(), 'email_body' => $email_body, 'headers' => $headers, 'data' => $data);
     $admin_email = apply_filters('epl_admin_send_confirmation_email_args', $admin_email);
     @wp_mail($admin_email['email'], $admin_email['title'], $admin_email['email_body'], $admin_email['headers'], epl_get_element('attachment', $admin_email['data'], null));
     if ($attach_pdf) {
         $this->delete_file($data['attachment']);
     }
 }