• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP epl_formatted_date函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中epl_formatted_date函数的典型用法代码示例。如果您正苦于以下问题:PHP epl_formatted_date函数的具体用法?PHP epl_formatted_date怎么用?PHP epl_formatted_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了epl_formatted_date函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:34,代码来源:pr-helper.php


示例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);
 }
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:44,代码来源:epl-user-self-pages-manager.php


示例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);
    ?>
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:31,代码来源:dates-times-prices.php


示例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, '&#8734;'));
        $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>
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:30,代码来源:event-snapshot.php


示例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;
 }
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:101,代码来源:epl-gateway-model.php


示例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 );
}
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:11,代码来源:common-helper.php


示例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);
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:31,代码来源:full-report.php


示例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 
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:31,代码来源:financial.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);
 }
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:45,代码来源:epl-user-model.php


示例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>";
 }
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:31,代码来源:daily-checkin-class-list.php


示例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');
}
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:16,代码来源:template-tags.php


示例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;
 }
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:14,代码来源:epl-discount-model.php


示例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;
 }
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:83,代码来源:epl-report-manager.php


示例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>
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:31,代码来源:regis-name-lookup-result-rows.php


示例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();
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:31,代码来源:daily-checked-in-users.php


示例16: event_snapshot

 /**
  * This function will create a global variable called $event_snapshot, which holds all the following information about the event
  * -Availability for each date, each time inside each date, each price inside each date and time.
  * -Availability errors
  *
  * Uses global vars $event_details, $current_att_count
  *
  * @since 1.0.0
  * @param event_id
  * @param refresh
  * @return  Sets the global $event_snapshot variable
  */
 function event_snapshot($event_id = null, $refresh = false)
 {
     global $event_details, $capacity, $current_att_count, $event_snapshot, $epl_error, $event_totals;
     $event_id = is_null($event_id) ? $this->get_current_event_id() : $event_id;
     setup_event_details($event_id);
     $meta = $this->current_data[$this->regis_id];
     $cart_selected_dates = epl_get_element($event_id, epl_get_element('_epl_start_date', $this->get_cart_values('_dates')));
     $cart_selected_times = (array) epl_get_element($event_id, epl_get_element('_epl_start_time', $this->get_cart_values('_dates')));
     $cart_selected_quantities = (array) epl_get_element($event_id, epl_get_element('_att_quantity', $this->get_cart_values('_dates')));
     static $_cache = array();
     $_is_cached = epl_get_element($event_id, $_cache);
     if ($_is_cached) {
         return $_cache[$event_id];
     }
     if (empty($cart_selected_dates) && epl_get_element('cart_action', $_REQUEST) != 'add') {
         $epl_error[] = array('', epl__('Please select at least one date.'));
     }
     $current_att_count = EPL_report_model::get_instance()->get_attendee_counts($event_id, true);
     $sold_out_text = apply_filters('merm__event_snapshot__sold_out_text', epl__('Sold Out.'));
     //get the attendee and money totals
     //$_totals = $this->calculate_cart_totals();
     setup_event_details($event_id);
     $grand_total = epl_get_element_m('grand_total', 'money_totals', $event_totals);
     $grand_total_key = "_grand_total";
     //this will hold the snapshot
     $event_snapshot = array();
     $qty_meta_key = "_total_att_" . $event_id;
     //$total_att = array_sum( ( array ) $meta[$this->regis_id]['_dates']['_att_quantity'][$event_details['ID']] );
     $total_att = epl_get_element_m($event_id, 'total', epl_get_element('_att_quantity', $event_totals));
     //event dates, times and prices
     $dates = epl_get_element('_epl_start_date', $event_details);
     $times = epl_get_element('_epl_start_time', $event_details);
     $prices = epl_get_element('_epl_price_name', $event_details);
     $rolling_regis = epl_get_element('_epl_rolling_regis', $event_details) == 10;
     if (epl_is_empty_array($dates)) {
         return;
     }
     //foreach event date
     foreach ($dates as $_date_key => $date_timestamp) {
         $date_timestamp = epl_get_date_timestamp($date_timestamp);
         //number registered for the date
         $date_total_att = 0;
         $_date = epl_formatted_date($event_details['_epl_start_date'][$_date_key], 'Y-m-d', 'date');
         //the date to display
         $_displ_date = epl_formatted_date($_date);
         $qty_meta_key = "_total_att_" . $event_details['ID'] . '_date_' . $_date_key;
         //find the capacity for this date.
         $cap = $event_details['_epl_date_capacity'][$_date_key];
         //find the number of people regitered for this date
         $num_att = epl_get_element($qty_meta_key, $current_att_count, 0);
         //find the available spcaes.  If there is no capacity, always available
         $date_avail = $this->avail_spaces($cap, $num_att);
         $_past = epl_compare_dates(EPL_TIME, $_date . ' 23:59:59', ">");
         $_date_avail_display = epl_is_ok_to_register($event_details, $_date_key);
         $_date_avail_display = $_date_avail_display === true ? epl__('Available') : $_date_avail_display;
         //snapshot template
         $_t = array('timestamp' => $date_timestamp, 'disp' => $_displ_date, 'avail' => $date_avail, 'avail_display' => $_date_avail_display, 'regis' => $num_att, 'db_key' => $qty_meta_key, 'cart' => 0, 'past' => $_past, 'hide' => $date_avail != '' && $date_avail <= 0);
         //Set the snapshot for this date
         $event_snapshot[$event_id][$_date_key]['date'] = $_t;
         $rolling_regis_time_avail = 0;
         //foreach time available for the event
         foreach ($times as $_time_key => $_time_id) {
             $time_total_att = 0;
             $_time = $event_details['_epl_start_time'][$_time_key];
             $qty_meta_key = "_total_att_" . $event_details['ID'] . '_time_' . $_date_key . '_' . $_time_key;
             //$cap = $capacity['time'][$_time_key];
             $cap = epl_get_element($_time_key, epl_get_element('_epl_time_capacity', $event_details), '');
             if ($rolling_regis && $cap == '') {
                 $cap = epl_get_element_m($_date_key, '_epl_date_per_time_capacity', $event_details);
             }
             $num_att = epl_nz(epl_get_element($qty_meta_key, $current_att_count), 0);
             $time_avail = $this->avail_spaces($cap, $num_att);
             $rolling_regis_time_avail += $cap == '' ? 999 : epl_nz($time_avail, 0);
             $_comp_time = epl_get_element($_time_key, $event_details['_epl_regis_endtime']);
             $_comp_time = !$_comp_time ? $_time : $_comp_time;
             //Is this time for this date in the past and not available any more?
             $_past = epl_compare_dates(EPL_TIME, $_date . ' ' . $_comp_time, ">");
             if ($rolling_regis && $_past) {
                 $event_snapshot[$event_id][$_date_key]['date']['hide'] = true;
             }
             $_t = array('timestamp' => strtotime($times[$_time_key], $date_timestamp), 'disp' => $times[$_time_key], 'avail' => $time_avail, 'avail_display' => $_date_avail_display, 'regis' => $num_att, 'db_key' => $qty_meta_key, 'past' => $_past);
             //Set the snapsot for this time for this date
             $event_snapshot[$event_id][$_date_key]['time'][$_time_key] = $_t;
             foreach ($prices as $_price_key => $_price_id) {
                 $_price = $event_details['_epl_price_name'][$_price_key];
                 $price_avail = 0;
                 $do_count = true;
                 $price_att = 0;
//.........这里部分代码省略.........
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:101,代码来源:epl-registration-model.php


示例17: get_purchased_tickets

 function get_purchased_tickets($regis_id, $event_id)
 {
     global $event_details, $regis_details;
     $purchased_tickets = $regis_details['__epl'][$regis_id]['_dates']['_att_quantity'][$event_id];
     $r = array();
     foreach ($event_details['_epl_price_name'] as $price_id => $price_name) {
         if ($purchased_tickets[$price_id][0] > 0) {
             $exp = '';
             if (epl_get_element_m($price_id, '_epl_price_pack_type', $event_details) == 'time') {
                 $mem_l = epl_get_element_m($price_id, '_epl_price_pack_time_length', $event_details);
                 $mem_lt = epl_get_element_m($price_id, '_epl_price_pack_time_length_type', $event_details);
                 $start = !epl_is_empty_array($regis_details) ? strtotime($regis_details['post_date']) : EPL_DATE;
                 $exp = ' (' . epl_formatted_date(strtotime("+ {$mem_l} {$mem_lt}", $start)) . ')';
             }
             $r[$price_id] = array('ticket_name' => $price_name . $exp, 'qty' => $purchased_tickets[$price_id][0]);
         }
     }
     return $r;
 }
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:19,代码来源:epl-common-model.php


示例18: foreach


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP epl_get_element函数代码示例发布时间:2022-05-15
下一篇:
PHP epl_e函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap