本文整理汇总了PHP中epl_get_element函数的典型用法代码示例。如果您正苦于以下问题:PHP epl_get_element函数的具体用法?PHP epl_get_element怎么用?PHP epl_get_element使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了epl_get_element函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ok_to_show_qty_dd
function ok_to_show_qty_dd($price_key = null, $qty = 0)
{
if (is_null($price_key)) {
return false;
}
global $event_details;
$r = array('ok' => 1, 'msg' => epl__('-'));
$price_start_date = epl_get_element($price_key, $event_details['_epl_price_date_from']);
if ($price_start_date) {
$diff = epl_timespan(EPL_TIME, strtotime("00:00:00", epl_get_date_timestamp($price_start_date)));
$diff['_date'] = $price_start_date;
//epl_log( "debug", "<pre>" . print_r($diff, true ) . "</pre>" );
$r['msg'] = epl__('Available on') . ' ' . epl_formatted_date($price_start_date);
if ($diff['past'] == 0) {
$r['ok'] = 0;
}
}
$price_end_date = epl_get_element($price_key, $event_details['_epl_price_date_to']);
if ($r['ok'] == 1 && $price_end_date) {
$diff = epl_timespan(EPL_TIME, strtotime("23:59:59", epl_get_date_timestamp($price_end_date)));
$diff['_date'] = $price_end_date;
$r['ok'] = 0;
$r['msg'] = epl_formatted_date($price_end_date) . ' ' . epl__('Ended');
if ($diff['past'] == 0) {
$r['ok'] = 1;
$r['msg'] = epl_display_date_diff($diff);
}
if ($qty > 0) {
$r['ok'] = 1;
}
}
//epl_log( "debug", "<pre>" . print_r( $diff, true ) . "</pre>" );
return $r;
}
示例2: __construct
function __construct()
{
parent::__construct();
epl_log('init', get_class() . " initialized", 1);
$this->epl->load_config('location-fields');
$this->ecm = $this->epl->load_model('epl-common-model');
global $epl_fields;
$this->pricing_type = 0;
$this->epl_fields = $epl_fields;
//this is a multi-dimensional array of all the fields
$this->ind_fields = $this->epl_util->combine_array_keys($this->epl_fields);
//this is each individualt field array
$post_ID = '';
if (isset($_GET['post'])) {
$post_ID = $_GET['post'];
} elseif (isset($_POST['post_ID'])) {
$post_ID = $_POST['post_ID'];
}
$this->data['values'] = $this->ecm->get_post_meta_all((int) $post_ID);
$this->edit_mode = epl_get_element('post', $_GET) || epl_get_element('post_ID', $_REQUEST);
add_action('add_meta_boxes', array($this, 'epl_add_meta_boxes'));
add_action('save_post', array($this, 'save_postdata'));
//post list manage screen columns - extra columns
add_filter('manage_edit-' . self::post_type . '_columns', array($this, 'add_new_columns'));
//post list manage screen - column data
add_action('manage_' . self::post_type . '_posts_custom_column', array($this, 'column_data'), 10, 2);
if (isset($_REQUEST['epl_ajax']) && $_REQUEST['epl_ajax'] == 1) {
$this->run();
}
}
示例3: __construct
function __construct()
{
parent::__construct();
epl_log('init', get_class());
$this->epl->load_config('notification-fields');
global $epl_fields;
$this->ecm = $this->epl->load_model('epl-common-model');
$this->epl_fields = $epl_fields;
$this->ind_fields = $this->epl_util->combine_array_keys($this->epl_fields);
//this is each individualt field array
$post_ID = '';
if (isset($_GET['post'])) {
$post_ID = $_GET['post'];
} elseif (isset($_POST['post_ID'])) {
$post_ID = $_POST['post_ID'];
}
$this->data['values'] = $this->ecm->get_post_meta_all((int) $post_ID, $this->epl_fields);
$this->edit_mode = epl_get_element('post', $_GET) || epl_get_element('post_ID', $_REQUEST);
add_action('add_meta_boxes', array($this, 'epl_add_meta_boxes'));
add_action('save_post', array($this, 'save_postdata'));
//post list manage screen columns - extra columns
add_filter('manage_edit-' . self::post_type . '_columns', array($this, 'add_new_columns'));
//post list manage screen - column data
add_action('manage_' . self::post_type . '_posts_custom_column', array($this, 'column_data'), 10, 2);
//add_action('init', array( &$this, 'run' ));
//$this->m = $this->load_model( 'admin/epl-manage-events-model' );
}
示例4: __construct
function __construct()
{
parent::__construct();
epl_log('init', get_class() . " initialized", 1);
$this->epl->load_config('org-fields');
$this->ecm = $this->epl->load_model('epl-common-model');
global $epl_fields;
$this->pricing_type = 0;
$this->epl_fields = $epl_fields;
$post_ID = '';
if (isset($_GET['post'])) {
$post_ID = $_GET['post'];
} elseif (isset($_POST['post_ID'])) {
$post_ID = $_POST['post_ID'];
}
$this->data['values'] = $this->ecm->get_post_meta_all((int) $post_ID);
$this->edit_mode = epl_get_element('post', $_GET) || epl_get_element('post_ID', $_REQUEST);
if (isset($_REQUEST['epl_ajax']) && $_REQUEST['epl_ajax'] == 1) {
$this->run();
} else {
//add_action( 'default_title', array( $this, 'pre' ) );
add_action('add_meta_boxes', array($this, 'epl_add_meta_boxes'));
add_action('save_post', array($this, 'save_postdata'));
//post list manage screen columns - extra columns
add_filter('manage_edit-' . self::post_type . '_columns', array($this, 'add_new_columns'));
//post list manage screen - column data
add_action('manage_' . self::post_type . '_posts_custom_column', array($this, 'column_data'), 10, 2);
}
}
示例5: form
function form($instance)
{
$defaults = array('title' => epl__('Events'), 'exclude_past_events' => epl__('Exclude Past Events'));
$instance = wp_parse_args((array) $instance, $defaults);
$title = $instance['title'];
$show_past_events = epl_get_element('show_past_events', $instance);
$data = array();
$data += $instance;
$data['w'] = $this;
$this->epl->load_view('widgets/advanced-cal/form', $data);
}
示例6: settings_page
function settings_page()
{
if ($_POST) {
$this->set_options();
}
$v = $this->get_options();
$data['epl_fields'] = $this->fields;
$data['tabs'] = array('general' => epl__('General'), 'registrations' => epl__('Registrations'), 'event-management' => epl__('Event Management'), 'fullcalendar-settings' => epl__('Calendar'), 'api-settings' => epl__('Advanced'));
$_field_args = array('section' => $this->fields['epl_general_options'], 'fields_to_display' => array_keys($this->fields['epl_general_options']), 'meta' => array('_view' => 3, 'value' => $v['epl_general_options']));
$data['epl_general_option_fields'] = $this->epl_util->render_fields($_field_args);
$data['settings_updated'] = '';
$_field_args = array('section' => $this->fields['epl_registration_options'], 'fields_to_display' => array_keys($this->fields['epl_registration_options']), 'meta' => array('_view' => 3, 'value' => $v['epl_registration_options']));
$data['epl_registration_options'] = $this->epl_util->render_fields($_field_args);
$_field_args = array('section' => $this->fields['epl_event_options'], 'fields_to_display' => array_keys($this->fields['epl_event_options']), 'meta' => array('_view' => 3, 'value' => $v['epl_event_options']));
$data['epl_event_options'] = $this->epl_util->render_fields($_field_args);
if (apply_filters('epl_enable_feature_override', false)) {
$data['tabs']['feature-override'] = epl__('Override');
}
if (epl_is_addon_active('ETDFGWETSDFGR')) {
$data['tabs']['shopping-cart'] = epl__('Event Cart');
epl_sort_array_by_array($this->fields['epl_sc_options']['epl_sc_primary_regis_forms']['options'], $v['epl_sc_options']['epl_sc_primary_regis_forms']);
epl_sort_array_by_array($this->fields['epl_sc_options']['epl_sc_addit_regis_forms']['options'], $v['epl_sc_options']['epl_sc_addit_regis_forms']);
epl_sort_array_by_array($this->fields['epl_sc_options']['epl_sc_payment_choices']['options'], $v['epl_sc_options']['epl_sc_payment_choices']);
$_field_args = array('section' => $this->fields['epl_sc_options'], 'fields_to_display' => array_keys($this->fields['epl_sc_options']), 'meta' => array('_view' => 3, 'value' => $v['epl_sc_options']));
$data['epl_sc_options'] = $this->epl_util->render_fields($_field_args);
}
unset($this->fields['epl_fullcalendar_options']['epl_fullcalendar_tax_bcg_color']);
unset($this->fields['epl_fullcalendar_options']['epl_fullcalendar_tax_font_color']);
$terms = epl_object_to_array(get_terms('epl_event_categories', array('hide_empty' => false)));
if (!epl_is_empty_array($terms)) {
$vals = epl_get_element('epl_fullcalendar_options', $v, array());
foreach ($terms as $k => $_v) {
$_bcg_val = epl_get_element($_v['slug'], epl_get_element('epl_fullcalendar_tax_bcg_color', $vals), '#ffffff');
$_font_val = epl_get_element($_v['slug'], epl_get_element('epl_fullcalendar_tax_font_color', $vals), 'blue');
$_d = array('input_type' => 'text', 'label' => $_v['name'], 'class' => 'epl_w80');
$f = $_d + array('input_name' => 'epl_fullcalendar_tax_bcg_color[' . $_v['slug'] . ']', 'value' => $_bcg_val, 'style' => 'background-color:' . $_bcg_val);
$data['_tax_color'][$_v['slug']] = $this->epl_util->create_element($f, 0);
$f = $_d + array('input_name' => 'epl_fullcalendar_tax_font_color[' . $_v['slug'] . ']', 'value' => $_font_val, 'style' => 'background-color:' . $_font_val);
$data['_font_color'][$_v['slug']] = $this->epl_util->create_element($f, 0);
}
}
$_field_args = array('section' => $this->fields['epl_fullcalendar_options'], 'fields_to_display' => array_keys($this->fields['epl_fullcalendar_options']), 'meta' => array('_view' => 3, 'value' => $v['epl_fullcalendar_options']));
$data['epl_fullcalendar_options'] = $this->epl_util->render_fields($_field_args);
if (epl_check_for_it()) {
$_field_args = array('section' => $this->fields['epl_api_option_fields'], 'fields_to_display' => array_keys($this->fields['epl_api_option_fields']), 'meta' => array('_view' => 3, 'value' => $v['epl_api_option_fields']));
$data['epl_api_options'] = $this->epl_util->render_fields($_field_args);
}
$this->epl->load_view('admin/settings/settings-page', $data);
}
示例7: regis_list_page
function regis_list_page()
{
global $wpdb, $event_details, $regis_details;
global $event_details;
$this->eum = $this->epl->load_model('epl-user-model');
$this->epl->load_model('epl-report-model');
$data['user_bookings'] = $this->eum->user_bookings($args);
$data['content'] = $this->epl->load_view('user-regis-manager/user-bookings', $data, true);
$this->epl->load_view('admin/user-regis-manager/admin-urm-page', $data);
return null;
$registrations = $wpdb->get_results("\n SELECT umeta_id,user_id,meta_key,meta_value\n FROM {$wpdb->usermeta}\n WHERE meta_key like '_epl_regis_post_id%'\n\t\tAND user_id = {$this->user_id}");
$r = array();
$this->erm->dest = 'admin';
$this->erm->on_admin = true;
$this->erm->set_mode('overview');
$data['registrations'] = '';
foreach ($registrations as $registration) {
$r_id = str_replace('_epl_regis_post_id_', '', $registration->meta_key);
//$this->ecm->get_registration_details($r_id);
$regis_data = $this->ecm->setup_regis_details($r_id, true);
if ($regis_data['post_status'] != 'publish') {
continue;
}
$d = epl_get_element('__epl', $regis_data);
$data['regis_post_id'] = $r_id;
$data['regis_id'] = esc_attr($regis_data['post_title']);
$data['regis_date'] = epl_formatted_date($regis_data['post_title']);
$data['regis_status'] = get_the_regis_status();
foreach ($d as $k => $v) {
$_regis_id = $d['_regis_id'];
$_events = $d[$_regis_id]['_events'];
$_dates = $d[$_regis_id]['_dates']['_epl_start_date'];
$event_id = key($_events);
$this->ecm->setup_event_details($event_id);
$data['event_title'] = esc_attr($event_details['post_title']);
$data['regis_dates'] = array_intersect_key($event_details['_epl_start_date'], array_flip($_dates[$event_id]));
$data['list'] = $this->epl->load_view('admin/user-regis-manager/user-regis-dates', $data, true);
}
$this->erm->setup_current_data($regis_data);
$data['regis_form'] = $this->erm->regis_form(null);
$data['registrations'] .= $this->epl->load_view('admin/user-regis-manager/user-regis-list-page', $data, true);
}
return $this->epl->load_view('admin/user-regis-manager/user-regis-list-page-wrapper', $data, true);
}
示例8: send_confirmation_email
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);
}
示例9: epl_get_regis_payments
$payment_data = epl_get_regis_payments();
foreach ($payment_data as $t => $p) {
if ($p['_epl_payment_amount'] == 0) {
continue;
}
?>
<tr style="border-top:1px solid #d7d7d7;">
<td><?php
echo epl_formatted_date($p['_epl_payment_date']);
?>
</td>
<td><?php
echo epl_get_formatted_curr($p['_epl_payment_amount'], null, true);
?>
<span style="float: right;"><?php
echo epl_trunc(epl_get_element($p['_epl_payment_method'], $epl_fields['epl_regis_payment_fields']['_epl_payment_method']['options'], ''), 10);
?>
</span>
</td>
</tr>
<?php
}
?>
<tr>
<td colspan="2">
<span class="epl_font_small"><?php
echo $waitlist_email_time != '' ? $waitlist_email_time : '';
?>
</span>
示例10: setup_event_details
<?php
setup_event_details();
########## DO NOT USE the_content() #############
echo $content;
?>
</div>
<div class ="event_dates">
<span class=""><?php
epl_e('Dates');
?>
</span>
<?php
$alt_text = epl_get_element('_epl_dates_alt_text', $event_details, '');
if ($alt_text == '') {
?>
<?php
echo get_the_event_dates();
?>
<?php
//echo get_the_event_session_table();
$d = epl_get_event_property('_epl_date_display_type', true);
if ($d != 0) {
echo get_the_event_dates_cal();
}
} else {
echo $alt_text;
}
示例11: epl_get_element
<tr class="epl_surcharge">
<td class="epl_w200"><?php
echo epl_get_element('_epl_surcharge_label', $event_details, epl__('Surcharge'));
?>
</td>
<td class="epl_total_price epl_w100 epl_ta_r"> +<?php
echo epl_get_formatted_curr($surcharge, null, true);
?>
</td>
</tr>
<?php
}
?>
<?php
if (($original_total = epl_get_element('original_total', $money_totals)) > 0) {
?>
<tr class="epl_original_total" style="background-color: #ffcccc ">
<td class="epl_w200"><?php
epl_e('Original Total');
?>
</td>
<td class="epl_total_price epl_w100 epl_ta_r"> <?php
echo epl_get_formatted_curr($original_total, null, true);
?>
</td>
</tr>
<?php
}
?>
示例12: epl_get_element
</div>
<?php
}
?>
<?php
if (epl_get_element('field', $_f['_epl_cc_exp_year'])) {
?>
<div>
<?php
echo epl_get_element('label', $_f['_epl_cc_exp_year']);
?>
<div>
<?php
echo epl_get_element('field', $_f['_epl_cc_exp_year']);
?>
<small> <?php
echo epl_get_element('description', $_f['_epl_cc_exp_year']);
?>
</small>
</div>
</div>
<?php
}
?>
</div>
</div>
示例13: construct_table_array
function construct_table_array($dates, $return_raw = false)
{
$r = array();
$date_format = epl_nz(epl_get_general_setting('epl_admin_date_format'), get_option('date_format'));
/*
* need to know registration start and end dates
* need to know the constructed dates
*
*/
//epl_log( "debug", "<pre>" . print_r( $dates, true ) . "</pre>" );
foreach ($dates as $year => $month) {
foreach ($month as $_month => $_days) {
foreach ($_days as $k => $v) {
$_dd = strtotime(epl_admin_dmy_convert($v));
$_d = $return_raw ? $_dd : date_i18n($date_format, $_dd);
//$_d =date_i18n( $date_format, $_dd );
//preserving the keys for dates that have already been saved.
//Just in case there may be a registration that has been assigned to that date id
$_u_k = array_search($_dd, epl_get_element('_epl_start_date', $this->values, array()));
if ($_u_k === FALSE) {
$_u_k = $this->epl_util->make_unique_id();
}
$data['_epl_start_date'][$_u_k] = $_d;
//$data['_epl_end_date'][$_u_k] =date_i18n( $date_format, strtotime( "+{$this->ind_event_length} day", $_dd ) );
$data['_epl_end_date'][$_u_k] = $return_raw ? strtotime("+{$this->ind_event_length} day", $_dd) : date_i18n($date_format, strtotime("+{$this->ind_event_length} day", $_dd));
if (isset($_POST['_epl_rec_regis_start_date']) && $_POST['_epl_rec_regis_start_date'] != '') {
$data['_epl_regis_start_date'][$_u_k] = date_i18n($date_format, strtotime(epl_admin_dmy_convert($_POST['_epl_rec_regis_start_date'])));
} elseif (isset($_POST['_epl_rec_regis_start_days_before_start_date']) && $_POST['_epl_rec_regis_start_days_before_start_date'] != '') {
$data['_epl_regis_start_date'][$_u_k] = date_i18n($date_format, strtotime("-" . (int) $_POST['_epl_rec_regis_start_days_before_start_date'] . " day", $_dd));
}
if (isset($_POST['_epl_rec_regis_end_date']) && $_POST['_epl_rec_regis_end_date'] != '') {
$data['_epl_regis_end_date'][$_u_k] = date_i18n($date_format, strtotime(epl_admin_dmy_convert($_POST['_epl_rec_regis_end_date'])));
} elseif (isset($_POST['_epl_rec_regis_end_days_before_start_date']) && $_POST['_epl_rec_regis_end_days_before_start_date'] != '') {
$data['_epl_regis_end_date'][$_u_k] = date_i18n($date_format, strtotime("-" . (int) $_POST['_epl_rec_regis_end_days_before_start_date'] . " day", $_dd));
}
if (isset($_POST['_epl_recurrence_capacity']) && $_POST['_epl_recurrence_capacity'] != '') {
$data['_epl_date_capacity'][$_u_k] = (int) $_POST['_epl_recurrence_capacity'];
}
}
}
}
if ($return_raw) {
return $data;
}
//epl_log( "debug", "<pre>" . print_r($data, true ) . "</pre>" );
/* $rows_to_display = count( $data['_epl_start_date'] );
$fields_to_display = array_keys( $this->fields['epl_date_fields'] );
$_field_args = array(
'section' => $this->fields['epl_date_fields'],
'fields_to_display' => $fields_to_display,
'meta' => array( '_view' => 1, '_type' => 'row', '_rows' => $rows_to_display, 'value' => $data )
); */
$rows_to_display = count($data['_epl_start_date']);
$epl_fields_to_display = array_keys($this->fields['epl_date_fields']);
$_field_args = array('section' => $this->fields['epl_date_fields'], 'fields_to_display' => $epl_fields_to_display, 'meta' => array('_view' => 'raw', '_type' => 'row', '_rows' => $rows_to_display, 'value' => $data));
$data['date_fields'] = $this->epl_util->render_fields($_field_args);
$data['date_field_labels'] = $this->epl_util->extract_labels($this->fields['epl_date_fields']);
//epl_log( "<pre>" . print_r($data['date_fields'], true ) . "</pre>", 1 );
//echo "<pre class='prettyprint'>" . print_r($data['date_fields'], true). "</pre>";
$r = $this->epl->load_view('admin/events/dates-section', $data, true);
return $r;
}
示例14: form_data
function form_data($regis_id, $_regis_key, $event_id, $tickets_to_show = null)
{
global $event_details, $regis_details, $wpdb;
$attendee_info = $regis_details['__epl'][$_regis_key]['_attendee_info'];
if ($this->debug) {
echo "<pre class='prettyprint'>" . __LINE__ . "> " . basename(__FILE__) . " > " . print_r($attendee_info, true) . "</pre>";
}
$event_ticket_buyer_forms = array_flip(epl_get_element('_epl_primary_regis_forms', $event_details, array()));
$event_addit_forms = epl_get_element('_epl_addit_regis_forms', $event_details) ? array_flip($event_details['_epl_addit_regis_forms']) : array();
if (version_compare(epl_regis_plugin_version(), '1.4', '>=') && epl_sc_is_enabled() && epl_get_setting('epl_sc_options', 'epl_sc_forms_to_use') == 1) {
$sc_event_ticket_buyer_forms = array_flip(epl_get_setting('epl_sc_options', 'epl_sc_primary_regis_forms', array()));
$event_ticket_buyer_forms = $sc_event_ticket_buyer_forms;
// + $event_ticket_buyer_forms;
$event_addit_forms = array_flip(epl_get_setting('epl_sc_options', 'epl_sc_addit_regis_forms', array()));
}
if (empty($event_ticket_buyer_forms)) {
$event_ticket_buyer_forms = array('4e8b3920c839b' => 1);
}
/*
* find price forms if any.
*/
$price_forms = epl_get_element('_epl_price_forms', $event_details, array());
$_price_forms = array();
foreach ($price_forms as $k => $v) {
$_price_forms += $v;
}
//find the list of all forms
$available_forms = $this->ecm->get_list_of_available_forms();
$available_fields = $this->ecm->get_list_of_available_fields();
//isolate the ticket buyer forms that are selected inside the event
$ticket_buyer_forms = array_intersect_key($available_forms, $event_ticket_buyer_forms);
//isolate the additional forms for attendees.
$addit_forms = array_intersect_key($available_forms, array_merge($event_addit_forms, $_price_forms));
//This will combine all the fields in all the forms so that we can construct a header row.
$tickey_buyer_fields = array();
foreach ($ticket_buyer_forms as $_form_id => $_form_info) {
$tickey_buyer_fields = array_merge($tickey_buyer_fields, $_form_info['epl_form_fields']);
}
//combine all the fields from the attendee forms
$event_addit_fields = array();
foreach ($addit_forms as $_form_id => $_form_info) {
//$event_addit_fields += $_form_info['epl_form_fields'];
$event_addit_fields = array_merge($event_addit_fields, $_form_info['epl_form_fields']);
}
$epl_fields_inside_form = array_flip($tickey_buyer_fields);
//get the field ids inside the form
$epl_addit_fields_inside_form = array_flip($event_addit_fields);
//get the field ids inside the form
//when creating a form in form manager, the user may rearrange fields. Find their desired order
$epl_fields_to_display = $this->epl_util->sort_array_by_array($available_fields, $epl_fields_inside_form);
$epl_addit_fields_to_display = $this->epl_util->sort_array_by_array($available_fields, $epl_addit_fields_inside_form);
//final list of all the fields to display
//$epl_fields_to_display = $epl_fields_to_display + $epl_addit_fields_to_display;
$ins = array();
$ins['regis_id'] = $regis_id;
$ins['event_id'] = $event_id;
$ins['field_id'] = array();
$ins['input_slug'] = array();
$ins['value'] = array();
if (!$this->primary_pulled) {
//################################### Ticket buyer form data ############################################
if ($this->debug) {
echo "<pre class='prettyprint'>" . __LINE__ . "> " . basename(__FILE__) . " > " . print_r($epl_fields_to_display, true) . "</pre>";
}
$form_data_array_tmp = array();
foreach ($epl_fields_to_display as $field_id => $field_atts) {
//1.3 stores in [field id][event id][0]
//2.0 stores in [field id][0]
//if ( epl_sc_is_enabled() && isset( $attendee_info[$field_id][0] ) ) {
if (isset($attendee_info[$field_id][0])) {
$value = epl_get_element(0, $attendee_info[$field_id]);
} else {
$value = isset($attendee_info[$field_id]) ? epl_get_element(0, $attendee_info[$field_id][$event_id]) : '';
}
$raw_value = $value;
if ($field_atts['input_slug'] == 'email') {
$email_list[$regis_post_id] = $value;
if ($regis_post_id && $regis_post_id != $this_regis_post_id) {
unset($email_list[$regis_post_id]);
}
}
if ($field_atts['input_type'] == 'select' || $field_atts['input_type'] == 'radio') {
$value = $raw_value;
//(isset( $field_atts['epl_field_choice_text'][$value] ) && $field_atts['epl_field_choice_text'][$value] !== '') ? $field_atts['epl_field_choice_text'][$value] : $value;
} elseif ($field_atts['input_type'] == 'checkbox') {
if (!epl_is_empty_array($field_atts['epl_field_choice_value'])) {
$value = implode(',', (array) $raw_value);
} elseif (is_array($value)) {
$value = implode(',', $raw_value);
}
}
//if ( $value != '' ) {
$ins['field_id'][] = $field_id;
$ins['input_slug'][] = $field_atts['input_slug'];
$ins['form_no'] = $this->form_no;
$ins['value'][] = str_replace($this->delim, " ", $value);
//$wpdb->insert( $wpdb->epl_regis_form_data, $ins );
//}
}
$ins['field_id'] = implode($this->delim, $ins['field_id']);
//.........这里部分代码省略.........
示例15: epl_e
<?php
if (epl_is_time_optonal()) {
?>
<td colspan="2"><?php
epl_e('All Day');
?>
</td>
<?php
} else {
?>
<td><?php
echo $time_data['disp'];
?>
</td>
<td><?php
echo epl_get_element($time_id, $event_details['_epl_end_time']);
?>
</td>
<?php
}
?>
<td><?php
echo epl_get_regis_status($date_id);
?>
</td>
<td><?php
echo $time_data['regis'];
?>
/ <?php
echo $capacity ? $capacity : '∞';
?>