本文整理汇总了PHP中epl_formatted_date函数的典型用法代码示例。如果您正苦于以下问题:PHP epl_formatted_date函数的具体用法?PHP epl_formatted_date怎么用?PHP epl_formatted_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了epl_formatted_date函数的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: 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);
}
示例3: epl_e
<thead>
<tr>
<th></th>
<th></th>
<th><?php
echo epl_e('Available Spaces');
?>
</th>
</tr>
</thead>
<?php
}
foreach ($table_data as $date_id => $data) {
$date = '<span itemprop="startDate" content="' . epl_formatted_date($data['date']['disp'], 'Y-m-d') . '">' . $data['date']['disp'] . '</span>';
$times = $data['time'];
$_note = epl_get_element_m($date_id, '_epl_date_note', $event_details);
$_location = '';
if (epl_get_element($date_id, epl_get_element('_epl_date_location', $event_details))) {
$_location_id = epl_get_element($date_id, $event_details['_epl_date_location']);
$l = the_location_details($_location_id);
//sets up the location info
$_location = $l['post_title'];
}
?>
<tr class="epl_date">
<td><?php
echo $date . epl_prefix(' - ', $_note) . epl_prefix(' - ', $_location);
?>
示例4: foreach
<?php
foreach ($dates as $date_id => $date) {
$date_capacity = epl_get_element_m($date_id, '_epl_date_capacity', $event_details);
foreach ($times as $time_id => $time) {
if (epl_is_date_level_time() && $date_specifc_time && (!isset($date_specifc_time[$time_id]) || !isset($date_specifc_time[$time_id][$date_id]))) {
continue;
}
$time_capacity = epl_get_element_m($time_id, '_epl_time_capacity', $event_details);
$capacity = $time_capacity ? $time_capacity : ($date_capacity ? $date_capacity : epl_get_element_m($date_id, '_epl_date_per_time_capacity', $event_details, '∞'));
$num_regis = epl_get_element("_total_att_{$event_id}_time_{$date_id}_{$time_id}", $counts, 0);
$links = '';
if ($num_regis > 0) {
$dt_array = array('date_id' => $date_id, 'time_id' => $time_id);
$table_link_arr = array_merge($table_link_arr, $dt_array);
$csv_link_arr += $dt_array;
$send_email_arr = array('epl_action' => 'get_the_email_form', 'epl_controller' => 'epl_registration', 'event_id' => $event_id, 'post_type' => false);
$links = epl_anchor(add_query_arg(array_merge($table_link_arr, $dt_array) + array('names_only' => 1), $base_url), epl__('View Attendees'), null, 'class="epl_view_attendee_list_table button-secondary"');
// $table_link_arr['epl_action'] = 'epl_attendee_list';
// $table_link_arr['epl_controller'] = 'epl_registration';
$links .= epl_anchor(add_query_arg($table_link_arr, $base_url), epl__('View Full Data'), null, 'class="epl_view_attendee_list_table button-secondary"');
$links .= epl_anchor(add_query_arg(array_merge($csv_link_arr, $dt_array), $base_url), epl__('Export CSV'), null, 'class="button-secondary"');
$links .= epl_anchor(add_query_arg($send_email_arr + $dt_array, $base_url), epl__('Send Email'), null, "class='epl_send_email_form_link button-secondary' data-post_ID='{$post_ID}' data-event_id='{$event_id}'");
}
$row = array(epl_formatted_date($date, 'D'), epl_formatted_date($date), epl_is_time_optonal() ? epl__('All Day') : $time . ' - ' . $event_details['_epl_end_time'][$time_id], epl_get_regis_status($date_id), $num_regis . '/' . $capacity, $links);
echo '<tr><td>' . implode('</td><td>', $row) . "</td><tr>";
}
}
?>
</tbody>
</table>
示例5: _exp_checkout_do_payment
//.........这里部分代码省略.........
if ($sc == 0) {
continue;
}
$this->ecm->setup_event_details($event_id);
$surcharge_label = epl_get_element('_epl_surcharge_label', $event_details, epl__('Surcharge'));
$item['L_PAYMENTREQUEST_0_NAME' . $counter] = $surcharge_label;
//$item['L_PAYMENTREQUEST_0_DESC' . $counter] = $discount_description;
//$item['L_PAYMENTREQUEST_0_NUMBER' . $counter] = $ticket_id;
$item['L_PAYMENTREQUEST_0_AMT' . $counter] = $sc;
$item['L_PAYMENTREQUEST_0_QTY' . $counter] = 1;
$requestParams['PAYMENTREQUEST_0_ITEMAMT'] += $sc;
$counter++;
}
}
if ($discount_amount > 0) {
$discount_description = epl_get_element('discount_description', $cart_totals['money_totals'], null);
$discount_description = substr($discount_description, 0, 126);
$item['L_PAYMENTREQUEST_0_NAME' . $counter] = $discount_description;
//$item['L_PAYMENTREQUEST_0_DESC' . $counter] = $discount_description;
//$item['L_PAYMENTREQUEST_0_NUMBER' . $counter] = $ticket_id;
$item['L_PAYMENTREQUEST_0_AMT' . $counter] = -1 * $discount_amount;
$item['L_PAYMENTREQUEST_0_QTY' . $counter] = 1;
}
$alt_total_due = epl_get_element_m('pay_deposit', 'money_totals', $cart_totals) == 1;
if ($alt_total_due > 0) {
$counter++;
$balance_due_desc = epl__('Deposit Offset. Due at a later date.');
$balance_due_desc = substr($balance_due_desc, 0, 126);
$balance_offset = get_the_regis_total_amount(false) - $amount;
$item['L_PAYMENTREQUEST_0_NAME' . $counter] = $balance_due_desc;
//$item['L_PAYMENTREQUEST_0_DESC' . $counter] = $discount_description;
//$item['L_PAYMENTREQUEST_0_NUMBER' . $counter] = $ticket_id;
$item['L_PAYMENTREQUEST_0_AMT' . $counter] = -1 * $balance_offset;
$item['L_PAYMENTREQUEST_0_QTY' . $counter] = 1;
}
$payment_data = epl_get_regis_payments();
if (!empty($payment_data)) {
if (count($payment_data) > 0) {
foreach ($payment_data as $time => $p) {
$counter++;
$payment_made_description = epl__('Offset for payment made on: ') . epl_formatted_date($p['_epl_payment_date']);
$payment_made_description = substr($payment_made_description, 0, 126);
$item['L_PAYMENTREQUEST_0_NAME' . $counter] = $payment_made_description;
//$item['L_PAYMENTREQUEST_0_DESC' . $counter] = $discount_description;
//$item['L_PAYMENTREQUEST_0_NUMBER' . $counter] = $ticket_id;
$item['L_PAYMENTREQUEST_0_AMT' . $counter] = -1 * $p['_epl_payment_amount'];
$item['L_PAYMENTREQUEST_0_QTY' . $counter] = 1;
}
}
}
if (($donation_amount = epl_get_element_m('donation_amount', 'money_totals', $cart_totals, 0)) > 0) {
$counter++;
$item['L_PAYMENTREQUEST_0_NAME' . $counter] = epl__('Donation');
$item['L_PAYMENTREQUEST_0_AMT' . $counter] = $donation_amount;
$item['L_PAYMENTREQUEST_0_QTY' . $counter] = 1;
}
if (($original_total = epl_get_element_m('original_total', 'money_totals', $cart_totals, 0)) > 0) {
$counter++;
$item['L_PAYMENTREQUEST_0_NAME' . $counter] = epl__('Offset');
$item['L_PAYMENTREQUEST_0_AMT' . $counter] = -1 * ($original_total - $orderParams['PAYMENTREQUEST_0_AMT']);
$item['L_PAYMENTREQUEST_0_QTY' . $counter] = 1;
}
}
$request = $requestParams + $item + $orderParams;
$request = apply_filters('epl_express_checkout_do_payment_request_params', $request);
$response = $paypal->request('DoExpressCheckoutPayment', $request);
if (is_array($response) && $response['ACK'] == 'Success') {
$payment_amount = $response['PAYMENTINFO_0_AMT'];
$counter = 0;
if ($parallel_pay) {
$payment_amount = 0;
foreach ($tickets as $event_id => $ind_tickets) {
$this->ecm->setup_event_details($event_id);
foreach ($ind_tickets as $ticket_id => $ticket_qty) {
$qty = is_array($ticket_qty) ? array_sum($ticket_qty) : $ticket_qty;
if ($qty > 0) {
$payment_amount += epl_get_element('PAYMENTINFO_' . $counter . '_AMT', $response, 0);
$counter++;
}
}
}
}
$data['post_ID'] = $post_ID;
$data['_epl_grand_total'] = $cart_totals['money_totals']['grand_total'];
$data['_epl_payment_amount'] = $payment_amount;
$data['_epl_payment_date'] = current_time('mysql');
$data['_epl_payment_method'] = $this->erm->get_payment_profile_id();
$data['_epl_transaction_id'] = $response['PAYMENTINFO_0_TRANSACTIONID'];
$data['_epl_prediscount_total'] = epl_get_element('pre_discount_total', $cart_totals['money_totals'], 0);
$data['_epl_discount_amount'] = epl_get_element('discount_amount', $cart_totals['money_totals'], 0);
$data = apply_filters('epl_pp_exp_response_data', $data, $response);
$this->erm->update_payment_data($data);
return true;
//echo "DONE";
} else {
$error = 'ERROR: ' . $response['L_SHORTMESSAGE0'] . '. ' . $response['L_LONGMESSAGE0'];
echo EPL_Util::get_instance()->epl_invoke_error(0, $error, false);
}
return false;
}
示例6: epl_admin_date_display
function epl_admin_date_display($date = null)
{
if (is_null($date) || $date == '' || !EPL_IS_ADMIN) {
return $date;
}
$_format = epl_nz(epl_get_general_setting('epl_admin_date_format'), 'Y-m-d');
//check if timestamp, TODO - do we really need to?
$date = is_numeric($date) && (int) $date == $date ? $date : strtotime(epl_admin_dmy_convert($date));
return epl_formatted_date($date, $_format);
//return gmdate( $_format, $date );
}
示例7: epl_anchor
$_combned['regis_key'] = epl_anchor(admin_url('post.php?post=' . $row->regis_id . '&action=edit'), $row->regis_key);
$_combned['regis_date'] = date('m/d/Y', strtotime($row->regis_date));
$_combned['status'] = get_the_regis_status($row->status);
$_p['event_name'] = '';
$_p['ticket'] = '';
$_p['discount_code'] = $row->discount_code;
$_p['price'] = $row->grand_total;
$_p['paid'] = $row->payment_amount == 0 ? 0 : $row->payment_amount > $row->event_total ? $row->event_total : $row->payment_amount;
$_p['date'] = '';
$_p['time'] = '';
$_a['event_name'] = $event_details['post_title'];
$_a['ticket'] = $event_details['_epl_price_name'][$row->price_id] . ' ' . $row->price;
$_a['discount_code'] = '';
$_a['price'] = '';
$_a['paid'] = '';
$_a['date'] = epl_formatted_date($event_details['_epl_start_date'][$row->date_id]);
$_a['time'] = $event_details['_epl_start_time'][$row->time_id];
if ($tmp_regis_id == '' || $tmp_regis_id != $row->regis_id) {
$tmp_regis_id = $row->regis_id;
$new_record = true;
$ticket_buyer_data = array();
$form_counter = 0;
$form_data = $erptm->get_form_data($row->regis_id, $row->event_id, 0);
if ($form_data) {
foreach ($form_data as $r) {
if (strpos($r->field_id, EPL_PLUGIN_DB_DELIM)) {
$fields = explode(EPL_PLUGIN_DB_DELIM, $r->field_id);
$values = explode(EPL_PLUGIN_DB_DELIM, $r->value);
} else {
$fields = array($r->field_id);
$values = array($r->value);
示例8: foreach
$total_paid += $regis_details['_epl_payment_amount'];
foreach ((array) $regis_details['_epl_events'] as $event_id => $totals) {
setup_event_details($event_id);
$data['event_name'] = $event_details['post_title'];
$data['quantity'] = $totals['_att_quantity']['total'][$event_id];
// echo "<tr><td>{$event_details['post_title']}</td><td class='qty'>{$data['quantity']}</td></tr>";
$total_att += $totals['_att_quantity']['total'][$event_id];
}
?>
<tr class="fin <?php
echo $zebra;
?>
">
<td><?php
echo epl_formatted_date($post->post_date);
?>
</td>
<td><a href="<?php
echo admin_url("post.php?post={$post->ID}&action=edit");
?>
" target="_blank"><?php
the_title();
?>
</a></td>
<td><?php
echo epl_get_formatted_curr($regis_details['_epl_grand_total']);
?>
</td>
<td><?php
示例9: user_schedule_old
function user_schedule_old()
{
global $wpdb, $event_details, $epl_fields;
if (!is_user_logged_in()) {
return login_with_ajax();
}
$event_type = epl_get_element('_epl_event_type', $event_details);
$registrations = $this->get_current_registrations($this->user_id);
$r = array();
$data['absentees'] = $this->get_user_absentee_data();
//echo "<pre class='prettyprint'>" . __LINE__ . "> " . print_r($registrations, true). "</pre>";
foreach ($registrations as $registration) {
$r_id = str_replace('_epl_regis_post_id_', '', $registration->meta_key);
$regis_data = $this->ecm->setup_regis_details($r_id);
if (epl_is_empty_array($regis_data) || !($d = epl_get_element('__epl', $regis_data, false))) {
continue;
}
if ($regis_data['_epl_regis_status'] < 1) {
continue;
}
$data['regis_id'] = esc_attr($regis_data['post_title']);
$data['regis_date'] = epl_formatted_date($regis_data['post_date']);
//echo "<pre class='prettyprint'>" . __LINE__ . "> " . print_r( $regis_data, true ) . "</pre>";
$_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_id'] = $event_id;
$data['event_title'] = esc_attr($event_details['post_title']);
$data['event_start_date'] = $event_details['_epl_start_date'];
$data['event_end_date'] = $event_details['_epl_end_date'];
$data['class_dates'] = $event_details['_epl_class_session_date'];
$data['class_start_times'] = $event_details['_epl_class_session_start_time'];
$class_end_times = $event_details['_epl_class_session_end_time'];
$class_session_name = $event_details['_epl_class_session_name'];
$class_session_note = $event_details['_epl_class_session_note'];
$data['fc_event_dates'] = $this->epl->epl_util->get_sess_days_for_fc();
$data['class_end_times'] = $class_end_times;
$data['regis_status'] = get_the_regis_status();
$data['regis_dates_cal'] = $this->eutil->construct_calendar($this->ercm->make_cal_dates_array($data['class_dates']));
$data['list'][$_regis_id] = $this->epl->load_view('front/user-regis-manager/user-regis-dates', $data, true);
}
return $this->epl->load_view('front/user-regis-manager/user-regis-list-page', $data, true);
}
示例10: epl_get_element
if (isset($current_att_count['_total_att_' . get_the_ID() . "_time_{$date_id}_{$time_id}"])) {
$num_regis = epl_get_element('_total_att_' . get_the_ID() . "_time_{$date_id}_{$time_id}", $current_att_count, 0);
}
}
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;
}
$weekday_specific = epl_get_element_m($time_id, '_epl_weekday_specific_time', $event_details, array());
if (!empty($weekday_specific) && !isset($weekday_specific[$weekday])) {
continue;
}
$start_time = strtotime($time, $start_date);
$signed_in_key = "{$event_id}-{$date_id}-{$start_date}-{$time_id}";
$signed_in_count = epl_get_element($signed_in_key, $session_signed_in_counts, 0);
$time_cap = epl_get_element($time_id, $time, '-');
$display_date = epl_formatted_date($start_date);
//build the td rows
$add_regis_link = add_query_arg(array('_date_id' => $date_id, '_time_id' => $time_id, 'event_id' => $event_id), admin_url('post-new.php?post_type=epl_registration'));
$add_regis_link = '<a href="' . $add_regis_link . '" class="add_att_link" title="+ Att" data-no_action="1" target="_blank">Add Registration</a>';
$temp_table_row = '<td>' . epl_anchor(admin_url("post.php?post=" . get_the_ID() . "&action=edit"), get_the_title()) . '</td>';
$temp_table_row .= '<td>' . $display_date . '</td>';
$temp_table_row .= '<td>' . $time . '-' . $event_details['_epl_end_time'][$time_id] . '</td>';
$temp_table_row .= "<td class='singed_in_count'>" . $signed_in_count . '</td>';
$temp_table_row .= '<td>' . $num_regis . '</td>';
$temp_table_row .= "<td style='text-align:right;'>";
if ($num_regis > 0) {
$temp_table_row .= "<a href='' class='sign_in_link' data-event_id='{$event_id}' data-date_id='{$date_id}' data-date_ts='{$start_date}' data-time_id='{$time_id}' data-ongoing='{$ongoing}'>" . epl__('Check In') . "</a>";
}
$temp_table_row .= " | {$add_regis_link}</td>";
echo "<tr>" . $temp_table_row . "</tr>";
}
示例11: epl_get_regis_status
function epl_get_regis_status($date_key = null)
{
global $event_details, $capacity, $current_att_count, $available_space_arr;
$today = date_i18n('m/d/Y H:i:s', EPL_TIME);
$regis_start_date = epl_get_date_timestamp(epl_admin_dmy_convert(epl_get_element($date_key, $event_details['_epl_regis_start_date'], $today)));
$regis_end_date = epl_get_date_timestamp(epl_admin_dmy_convert(epl_get_element($date_key, $event_details['_epl_regis_end_date'], $today)));
$ok = epl_compare_dates($today, $regis_start_date, ">=");
if (!$ok) {
return epl__("Opens on") . ' ' . epl_formatted_date($event_details['_epl_regis_start_date'][$date_key]);
}
$ok = epl_compare_dates($today, strtotime('23:59:59', $regis_end_date), "<=");
if (!$ok) {
return epl__('Closed');
}
return epl__('Open');
}
示例12: is_code_expired
function is_code_expired($_code)
{
global $event_details;
$_code_expiration_date = epl_get_element($_code, epl_get_element('_epl_discount_end_date', $this->discount_configs), null);
if (!$_code_expiration_date) {
return false;
}
$_code_expiration_date = epl_formatted_date($_code_expiration_date, 'Y-m-d', 'date');
$_expired = epl_compare_dates(EPL_TIME, $_code_expiration_date . ' 23:59:59', ">");
if ($_expired) {
return true;
}
return false;
}
示例13: view_names
function view_names()
{
global $event_details, $wpdb;
$filters = array('event_id' => $_REQUEST['event_id'], 'date_id' => epl_get_element('date_id', $_REQUEST, null), 'time_id' => epl_get_element('time_id', $_REQUEST, null), 'names_only' => epl_get_element('names_only', $_REQUEST, 0), 'combined' => epl_get_element('combined', $_REQUEST, 0));
setup_event_details($filters['event_id']);
$show_second_to_last = apply_filters('epl_erpt__view_names__show_second_to_last', true);
$data['pack_regis'] = epl_get_element('_epl_pack_regis', $event_details, 0) == 10;
$data['pack_consecutive'] = epl_get_element('_epl_pack_regis_consecutive', $event_details, 0) == 10;
$_filter = array();
$attendance_dates = array();
//if this is a pack class
if ($data['pack_regis']) {
//find all the registrations for this event
//for each one, find out if package
//for each one that is pack, find the pack * X days
//contstruct array
$event_date_keys = array_keys($event_details['_epl_start_date']);
$pack_counts = epl_get_element('_epl_price_pack_size', $event_details, array());
$registrations = $wpdb->get_results("\n SELECT rd.* \n FROM {$wpdb->epl_regis_data} rd\n INNER JOIN {$wpdb->epl_registration} r\n ON r.regis_id=rd.regis_id\n WHERE 1=1 AND (r.status = 2 OR r.status = 5)\n AND event_id = " . intval($event_details['ID']));
if ($registrations) {
foreach ($registrations as $regis) {
$regis_weekday = date('N', $event_details['_epl_start_date'][$regis->date_id]);
if (isset($pack_counts[$regis->price_id])) {
$pack_counter = epl_get_element($regis->price_id, $pack_counts, 1);
$start = false;
foreach ($event_details['_epl_start_date'] as $date_id => $date) {
if (!$start && $date_id != $regis->date_id) {
continue;
}
$start = true;
$_weekday = date('N', $date);
if ($regis_weekday != $_weekday || $pack_counter == 0) {
continue;
}
$pack_counter--;
$attendance_dates[$regis->id][$date_id] = $date;
$_filter[$regis->id] = $regis->id;
}
if ($filters['date_id'] && !isset($attendance_dates[$regis->id][$filters['date_id']]) || $filters['time_id'] && $filters['time_id'] != $regis->time_id) {
unset($_filter[$regis->id]);
unset($attendance_dates[$regis->id]);
}
//$offset = array_search( $regis->date_id, $event_date_keys );
//$attendance_dates[$regis->id] = array_slice( $event_details['_epl_start_date'], $offset, $pack_counts[$regis->price_id] );
}
}
}
}
if (!epl_is_empty_array($_filter)) {
$_filter = implode(',', $_filter);
$_filter = " AND rd.id IN ({$_filter})";
}
if ($filters['names_only'] == 1) {
$data['list'] = $this->erptm->attendee_form_data($_filter);
} else {
$data['list'] = $this->erptm->get_all_data_2($_filter);
}
$data['fields'] = $this->erptm->get_form_fields();
$data['attendance_dates'] = $attendance_dates;
$data['event_title'] = $event_details['post_title'];
$data['event_date'] = isset($_REQUEST['date_id']) ? epl_formatted_date(epl_get_element_m($_REQUEST['date_id'], '_epl_start_date', $event_details), "D, M j") : '';
$data['event_time'] = isset($_REQUEST['time_id']) ? epl_get_element_m($_REQUEST['time_id'], '_epl_start_time', $event_details) : '';
$url = admin_url("edit.php?post_type=epl_event&epl_action=view_names&table_view=1&epl_controller=epl_report_manager&print=1");
$url = add_query_arg($filters, $url);
$data['print_icon'] = !isset($_REQUEST['print']) ? '<div><a href="' . $url . '" target="_blank"><img src="' . EPL_FULL_URL . 'images/printer.png" /></a></div>' : '';
$data['filters'] = $filters;
if ($filters['names_only'] == 1) {
$r = $this->epl->load_view('admin/reports/view-names', $data, true);
} elseif ($filters['combined'] == 1) {
$r = $this->epl->load_view('admin/reports/view-full-combined', $data, true);
} else {
$r = $this->epl->load_view('admin/reports/view-full-data', $data, true);
}
if ($GLOBALS['epl_ajax']) {
return $r;
}
if (isset($_REQUEST['print'])) {
$data['content'] = $r;
$this->epl->load_view('admin/template', $data);
return;
}
echo $r;
}
示例14: epl_get_element
<?php
global $wpdb;
$s_key = epl_get_element('s_key', $_REQUEST);
foreach ($r['tickets'] as $ticket_id => $ticket_data) {
$c_key = $s_key . '|' . $r['regis_post_id'] . '-' . $ticket_id;
$q_c_key = '|' . $r['regis_post_id'] . '-' . $ticket_id;
$num_used = $wpdb->get_row("SELECT count(*) as cnt_used FROM {$wpdb->usermeta} WHERE meta_key like '%{$q_c_key}%' AND user_id = {$r['regis_user_id']}");
?>
<tr>
<td>
<?php
echo $r['regis_id'];
?>
<br />
<small><?php
echo epl_formatted_date($r['regis_date']);
?>
</small>
</td>
<td><?php
echo $r['regis_status'];
?>
</td>
<td><?php
echo $r['first_name'];
?>
</td>
<td><?php
echo $r['last_name'];
?>
</td>
示例15: epl_get_element
$session_time_id = $time_optional ? epl_get_element('time_id', $_POST, '') : $row->time_id;
if ($tmp_regis_id == '' || $tmp_regis_id != $row->regis_id) {
$tmp_regis_id = $row->regis_id;
$new_record = true;
$ticket_buyer_data = array();
$form_counter = 0;
if ($has_att_forms) {
$form_counter++;
}
}
if (!is_null($row->form_no)) {
$form_counter = $row->form_no;
}
$_r = array();
$_r['regis_id'] = epl_anchor(admin_url('post.php?post=' . $row->regis_id . '&action=edit'), $row->regis_key);
$_r['date_added'] = epl_formatted_date($row->checkin_time, 'Y-m-d H:i');
$_r['ticket'] = $event_details['_epl_price_name'][$row->price_id];
$form_data = current($erptm->get_form_data($row->regis_id, $row->event_id, $form_counter));
$_form = $erptm->get_form_data_array($form_data->field_id, $form_data->value);
$_r = array_merge($_r, epl_process_fields_for_display($_form));
$_rr = "<a href='#' \r\n class='epl_delete_checkin_record'\r\n class='epl_user_check_in' \r\n data-user_id='{$row->user_id}'\r\n data-regis_id='{$row->regis_id}' \r\n data-event_id='{$row->event_id}' \r\n data-regis_data_id='{$row->regis_data_id}' \r\n data-date_id='{$row->date_id}' \r\n data-date_ts='{$_POST['date_ts']}' \r\n data-time_id='{$session_time_id}'\r\n data-price_id='{$row->price_id}'\r\n data-form_no='{$row->form_no}'\r\n data-att_id='{$row->id}'>" . epl__('Delete') . "</a>";
array_unshift($_r, $_rr);
$this->epl->epl_table->add_row(array_values($_r));
$form_counter++;
}
$header = array('', epl__('Regis ID'), epl__('Check-in Time'), epl__('Purchase'));
epl_sort_array_by_array($avail_fields, $_form);
$header = array_merge($header, epl_get_field_labels(array_intersect_key($avail_fields, $_form)));
$header[] = '';
$this->epl->epl_table->set_heading($header);
echo $this->epl->epl_table->generate();