function get_user_list_dd($regis_id = null, $user_id = null) { $show_user_list_dd = apply_filters('epl_erm__get_user_list_dd__show_user_list_dd', true); if (!$show_user_list_dd) { return null; } if (epl_is_waitlist_flow()) { return null; } if (epl_um_is_enabled() && epl_user_is_admin() && $this->mode == 'edit') { $user_id = $this->edbm->find_user_id_for_regis($regis_id, $user_id); $users = get_users('orderby=email'); $user_dd_options = array(); foreach ($users as $user) { if ($user->user_email == '') { continue; } $user_dd_options[$user->ID] = $user->user_email . " ({$user->first_name} {$user->last_name})"; } $params = array('input_type' => 'select', 'input_name' => 'user_id', 'id' => 'user_id', 'label' => epl__('User'), 'options' => $user_dd_options, 'style' => 'width:100%', 'empty_row' => true, 'description' => epl__('You can assign this registration to a member of your website.'), 'value' => $user_id); $params += (array) $this->overview_trigger; $data['user_list_dd'] = $this->epl_util->create_element($params); $r = $this->epl->load_view('admin/user-regis-manager/user-list-dd', $data, true); return $r; } }
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']); } }
function set_next_step_vars($current_step = null) { //$bt = debug_backtrace(); //echo "<pre class='prettyprint'>" . __LINE__ . "> " . print_r($bt[0]['line'], true). "</pre>"; //echo "<pre class='prettyprint'>" . __LINE__ . "> " . print_r($bt[0]['function'], true). "</pre>"; /* * - if on regis form and offline or free, thank you * - if regis form and cc or pp, overview * - if overview and cc, show card form, complete * - if overview and pp, continue * - if overview and offline, complete * * - if epl_regis_flow() and regis form -> payment -> complete * - if epl_regis_flow() and regis form and free of offline -> complete */ global $epl_current_step; $regis_flow_steps = array(1 => 'show_cart', 5 => 'regis_form', 10 => 'show_cart_overview', 30 => 'redirect', 100 => 'thank_you_page'); $this->steps = array('show_cart' => array(1 => array('next' => 'regis_form', 'next_label' => epl__('Attendee Information')), 2 => array('next' => 'regis_form', 'next_label' => epl__('Attendee Information'))), 'regis_form' => array(1 => array('prev' => 'show_cart', 'next' => 'show_cart_overview', 'next_label' => epl__('Overview')), 2 => array('prev' => 'show_cart', 'next' => 'thank_you_page', 'next_label' => epl__('Confirm and Complete')), 10 => array('next' => 'thank_you_page', 'next_label' => epl__('Confirm and Complete'))), 'show_cart_overview' => array(1 => array('prev' => 'regis_form', 'next' => 'thank_you_page', 'next_label' => epl__('Confirm and Complete')), 2 => array('prev' => 'regis_form', 'next' => 'show_cart_overview', 'next_label' => epl__('Confirm and Complete')), 10 => array('prev' => 'show_cart', 'next' => 'thank_you_page')), 'payment_page' => array(1 => array('prev' => 'regis_form', 'next' => 'payment_page', 'next_label' => epl__('Overview')), 2 => array('prev' => 'regis_form', 'next' => 'payment_page', 'next_label' => epl__('Confirm and Complete')), 10 => array('next' => 'thank_you_page', 'next_label' => epl__('Confirm and Complete')))); $flow = epl_regis_flow(); $this->step_data = array(); $gateway_info = $this->erm->get_gateway_info(); $url_vars_next = $url_vars_prev = array('epl_action' => $this->steps[$current_step][$flow]['next'], 'cart_action' => false, '_date_id' => false); $url_vars_prev['epl_action'] = epl_get_element('prev', $this->steps[$current_step][$flow]); $this->step_data['form_action'] = add_query_arg($url_vars_next, $this->url); $gw_check = false; if ($flow == 1 && $epl_current_step == 'show_cart_overview') { $gw_check = true; } elseif (($flow == 2 || $flow == 10) && $epl_current_step == 'regis_form') { $gw_check = true; } if ($epl_current_step != 'process_cart_action' && $epl_current_step != 'show_cart') { $this->step_data['prev_step_url'] = add_query_arg($url_vars_prev, $this->url); } $this->step_data['next_step'] = $this->steps[$current_step][$flow]['next']; $this->step_data['next_step_label'] = $this->steps[$current_step][$flow]['next_label']; if (epl_is_free_event() || epl_regis_flow() < 10 && epl_is_zero_total() || $this->erm->has_selected_offline_payment() || epl_is_waitlist_flow() && !epl_is_waitlist_approved()) { $this->step_data['next_step_label'] = apply_filters('epl_show_cart_overview_free_next_step_label', $this->steps[$current_step][$flow]['next_label']); } elseif (epl_get_element('_epl_pay_type', $gateway_info) == '_pp_exp' && $gw_check) { $url_vars_next = array('epl_action' => 'payment_page', 'cart_action' => false, '_date_id' => false); $url_vars_prev['epl_action'] = $this->steps[$current_step][$flow]['prev']; $this->step_data['form_action'] = add_query_arg($url_vars_next, $this->url); $this->step_data['next_step_label'] = apply_filters('epl_show_cart_overview_pp_exp_next_step_label', epl__('Confirm and Continue to PayPal')); } elseif (epl_get_element('_epl_pay_type', $gateway_info) == '_payson' && $gw_check) { $url_vars_next = array('epl_action' => 'payment_page', 'cart_action' => false, '_date_id' => false); $url_vars_prev['epl_action'] = $this->steps[$current_step][$flow]['prev']; $this->step_data['form_action'] = add_query_arg($url_vars_next, $this->url); $this->step_data['next_step_label'] = apply_filters('epl_show_cart_overview_pp_exp_next_step_label', epl__('Continue to Pay')); } elseif (epl_get_element('_epl_pay_type', $gateway_info) == '_moneris' && $gw_check) { $this->step_data['next_step_label'] = apply_filters('epl_show_cart_overview_pp_exp_next_step_label', epl__('Continue to Pay')); $us_version = epl_get_element('_epl_moneris_country', $gateway_info, 'ca') == 'usa'; $this->step_data['form_action'] = 'https://www3.moneris.com/HPPDP/index.php'; if ($gateway_info['_epl_sandbox'] == 10) { $this->step_data['form_action'] = 'https://esqa.moneris.com/HPPDP/index.php'; } if ($us_version) { $this->step_data['form_action'] = 'https://esplus.moneris.com/DPHPP/index.php'; if ($gateway_info['_epl_sandbox'] == 10) { $this->step_data['form_action'] = 'https://esplusqa.moneris.com/DPHPP/index.php'; } $this->egm->setup_moneris_form_USA(); } else { $this->egm->setup_moneris_form(); } } elseif (epl_get_element('_epl_pay_type', $gateway_info) == '_auth_net_sim' && $gw_check) { $this->step_data['next_step_label'] = apply_filters('epl_show_cart_overview_pp_exp_next_step_label', epl__('Continue to Pay')); $this->step_data['form_action'] = 'https://secure.authorize.net/gateway/transact.dll'; if ($gateway_info['_epl_sandbox'] == 10) { $this->step_data['form_action'] = 'https://test.authorize.net/gateway/transact.dll'; } $this->egm->setup_authnet_sim_form(); } elseif ($this->erm->has_selected_cc_payment() && ($gw_check || $this->error)) { $url_vars_next = array('epl_action' => 'payment_page', 'cart_action' => false, '_date_id' => false); $this->step_data['form_action'] = add_query_arg($url_vars_next, $this->url); $this->step_data['next_step_label'] = apply_filters('epl_show_cart_overview_cc_next_step_label', $this->steps[$current_step][$flow]['next_label']); } $this->step_data = apply_filters('epl_front__set_next_step_vars__final', $this->step_data, $flow); return $this->step_data; }
<?php if (!epl_is_waitlist_flow()) { global $cart_totals, $epl_fields; $money_totals = epl_get_element('money_totals', $cart_totals, array()); ?> <div class="epl_section"> <div class="epl_section_header"> <?php epl_e('Payment Details'); ?> </div> <table class="epl_payment_details_table"> <tbody> <?php if ($payment_instructions != '' && !epl_is_zero_total() && !epl_is_free_event()) { echo $payment_instructions; } $regis_status_id = get_the_regis_status(null, true); ?> <tr> <td><?php epl_e('Registration Status'); ?> </td> <td class="epl_status_<?php echo $regis_status_id;