当前位置: 首页>>代码示例>>PHP>>正文


PHP espresso_google_map_link函数代码示例

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


在下文中一共展示了espresso_google_map_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: event_espresso_send_attendee_registration_approval_pending

 function event_espresso_send_attendee_registration_approval_pending($registration_id)
 {
     global $org_options, $wpdb;
     do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
     //Get the event information
     $events = $wpdb->get_results("SELECT ed.* FROM " . EVENTS_DETAIL_TABLE . " ed\n\t\t\t\t\t\tJOIN " . EVENTS_ATTENDEE_TABLE . " ea\n\t\t\t\t\t\tON ed.id = ea.event_id\n\t\t\t\t\t\tWHERE ea.registration_id='" . $registration_id . "'");
     foreach ($events as $event) {
         $event_id = $event->id;
         $event_name = stripslashes_deep($event->event_name);
         $event_desc = stripslashes_deep($event->event_desc);
         $display_desc = $event->display_desc;
         $event_identifier = $event->event_identifier;
         $reg_limit = $event->reg_limit;
         $active = $event->is_active;
         $send_mail = $event->send_mail;
         $conf_mail = $event->conf_mail;
         $email_id = $event->email_id;
         $alt_email = $event->alt_email;
         $start_date = event_date_display($event->start_date);
         $end_date = $event->end_date;
         $virtual_url = $event->virtual_url;
         $virtual_phone = $event->virtual_phone;
         $event_address = $event->address;
         $event_address2 = $event->address2;
         $event_city = $event->city;
         $event_state = $event->state;
         $event_zip = $event->zip;
         $event_country = $event->country;
         $location = ($event_address != '' ? $event_address : '') . ($event_address2 != '' ? '<br />' . $event_address2 : '') . ($event_city != '' ? '<br />' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '<br />' . $event_zip : '') . ($event_country != '' ? '<br />' . $event_country : '');
         $location_phone = $event->phone;
         $require_pre_approval = $event->require_pre_approval;
         $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country));
     }
     //Build links
     $event_url = espresso_reg_url($event_id);
     $event_link = '<a href="' . $event_url . '">' . $event_name . '</a>';
     $sql = "SELECT * FROM " . EVENTS_ATTENDEE_TABLE;
     if ($registration_id != '') {
         $sql .= " WHERE registration_id = '" . $registration_id . "' ";
     } elseif ($attendee_id != '') {
         $sql .= " WHERE id = '" . $attendee_id . "' ";
     } else {
         _e('No ID Supplied', 'event_espresso');
     }
     $sql .= " ORDER BY id ";
     $sql .= " LIMIT 0,1 ";
     //Get the first attendees details
     $attendees = $wpdb->get_results($sql);
     //global $attendee_id;
     foreach ($attendees as $attendee) {
         $attendee_id = $attendee->id;
         $attendee_email = $attendee->email;
         $lname = $attendee->lname;
         $fname = $attendee->fname;
         $address = $attendee->address;
         $address2 = $attendee->address2;
         $city = $attendee->city;
         $state = $attendee->state;
         $zip = $attendee->zip;
         $payment_status = $attendee->payment_status;
         $txn_type = $attendee->txn_type;
         $amount_pd = $attendee->amount_pd;
         $event_cost = $attendee->amount_pd;
         $payment_date = event_date_display($attendee->payment_date);
         $phone = $attendee->phone;
         $event_time = event_date_display($attendee->event_time, get_option('time_format'));
         $end_time = event_date_display($attendee->end_time, get_option('time_format'));
         $date = event_date_display($attendee->date);
         $pre_approve = $attendee->pre_approve;
     }
     $admin_email = $alt_email == '' ? $org_options['contact_email'] : $alt_email . ',' . $org_options['contact_email'];
     if (!empty($admin_email)) {
         $subject = "New attendee registration approval pending";
         $body = "\nEvent title: {$event_name}\n<br/>\nAttendee name: {$fname}&nbsp;{$lname}\n<br/>\nThank You.\n";
         $email_params = array('send_to' => $admin_email, 'email_subject' => __($subject, 'event_espresso'), 'email_body' => $body);
         event_espresso_send_email($email_params);
     }
     if (!empty($attendee_email)) {
         $subject = "Event registration pending";
         $body = "\nEvent title: {$event_name}\n<br/>\nAttendee name: {$fname}&nbsp;{$lname}\n<br/>\nYour registration is pending for approval from event admin. You will receive an email with payment info when admin approves your registration.\n<br/><br/>\nThank You.\n";
         $email_params = array('send_to' => $attendee_email, 'email_subject' => __($subject, 'event_espresso'), 'email_body' => $body);
         event_espresso_send_email($email_params);
     }
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:84,代码来源:email.php

示例2: edit_event

function edit_event($event_id = 0)
{
    global $wpdb, $org_options, $espresso_premium;
    ob_start();
    $SQL = "SELECT e.*, ev.id as venue_id\n\t    FROM " . EVENTS_DETAIL_TABLE . " e\n\t    LEFT JOIN " . EVENTS_VENUE_REL_TABLE . " vr ON e.id = vr.event_id\n\t    LEFT JOIN " . EVENTS_VENUE_TABLE . " ev ON vr.venue_id = ev.id\n\t    WHERE e.id = %d";
    $events = $wpdb->get_results($wpdb->prepare($SQL, $event_id));
    if (!is_array($events) || count($events) <= 0) {
        event_espresso_edit_list();
        #echo "<div class='updated fade below-h2'><p>";
        #_e("Event is not available any more!","eventespresso");
        #echo "</p></div>";
        return 1;
    }
    foreach ($events as $event) {
        $event_id = $event->id;
        $event_name = htmlentities(stripslashes($event->event_name), ENT_QUOTES, 'UTF-8');
        $event_desc = htmlentities(stripslashes($event->event_desc), ENT_QUOTES, 'UTF-8');
        $display_desc = $event->display_desc;
        $display_reg_form = $event->display_reg_form;
        $member_only = $event->member_only;
        $phone = stripslashes_deep($event->phone);
        $externalURL = stripslashes_deep($event->externalURL);
        //Early discounts
        $early_disc = stripslashes_deep($event->early_disc);
        $early_disc_date = stripslashes_deep($event->early_disc_date);
        $early_disc_percentage = stripslashes_deep($event->early_disc_percentage);
        $post_id = $event->post_id;
        $post_type = $event->post_type;
        $event_identifier = stripslashes_deep($event->event_identifier);
        $registration_start = $event->registration_start;
        $registration_end = $event->registration_end;
        $registration_startT = $event->registration_startT;
        $resitration_endT = $event->registration_endT;
        $timezone_string = $event->timezone_string;
        $start_date = $event->start_date;
        $end_date = $event->end_date;
        $tax_percentage = $event->tax_percentage;
        $tax_mode = $event->tax_mode;
        $start_time = isset($event->start_time) ? $event->start_time : '';
        $end_time = isset($event->end_time) ? $event->end_time : '';
        $reg_limit = $event->reg_limit;
        $additional_limit = $event->additional_limit;
        $allow_overflow = $event->allow_overflow;
        $overflow_event_id = $event->overflow_event_id;
        $allow_multiple = $event->allow_multiple;
        $event_cost = unserialize(isset($event->event_cost) ? $event->event_cost : '');
        $is_active = $event->is_active;
        $status = array();
        $status = event_espresso_get_is_active($event_id);
        $event_status = $event->event_status;
        $conf_mail = stripslashes_deep($event->conf_mail);
        $send_mail = stripslashes_deep($event->send_mail);
        $use_coupon_code = $event->use_coupon_code;
        $alt_email = $event->alt_email;
        $address = stripslashes_deep($event->address);
        $address2 = stripslashes_deep($event->address2);
        $city = stripslashes_deep($event->city);
        $state = stripslashes_deep($event->state);
        $zip = stripslashes_deep($event->zip);
        $country = stripslashes_deep($event->country);
        $venue_id = stripslashes_deep($event->venue_id);
        $venue_title = stripslashes_deep($event->venue_title);
        $venue_url = stripslashes_deep($event->venue_url);
        $venue_phone = stripslashes_deep($event->venue_phone);
        $venue_image = stripslashes_deep($event->venue_image);
        $email_id = $event->email_id;
        $ticket_id = $event->ticket_id;
        $wp_user = $event->wp_user;
        $date_submitted = $event->submitted != '0000-00-00 00:00:00' ? empty($event->submitted) ? '' : event_date_display($event->submitted, get_option('date_format')) : 'N/A';
        $google_map_link = espresso_google_map_link(array('address' => $address, 'city' => $city, 'state' => $state, 'zip' => $zip, 'country' => $country));
        //Virtual location
        $virtual_url = stripslashes_deep($event->virtual_url);
        $virtual_phone = stripslashes_deep($event->virtual_phone);
        $question_groups = unserialize($event->question_groups);
        global $event_meta;
        $event_meta = unserialize($event->event_meta);
        $recurrence_id = $event->recurrence_id;
        $visible_on = $event->visible_on;
        $require_pre_approval = $event->require_pre_approval;
        if (function_exists('event_espresso_edit_event_groupon')) {
            $use_groupon_code = $event->use_groupon_code;
        }
    }
    $values = array(array('id' => 'Y', 'text' => __('Yes', 'event_espresso')), array('id' => 'N', 'text' => __('No', 'event_espresso')));
    //If user is an event manager, then show only their events
    if (function_exists('espresso_is_my_event') && espresso_is_my_event($event_id) != true) {
        echo '<h2>' . __('Sorry, you do not have permission to edit this event.', 'event_espresso') . '</h2>';
        return;
    }
    ?>
	<!--Update event display-->
	<div id="submitdiv" class="postbox">
		<div class="handlediv" title="Click to toggle"><br />
		</div>
		<h3 class='hndle'> <span>
	<?php 
    _e('Quick Overview', 'event_espresso');
    ?>
			</span> </h3>
		<div class="inside">
//.........这里部分代码省略.........
开发者ID:HandsomeDogStudio,项目名称:peanutbutterplan,代码行数:101,代码来源:edit_event.php

示例3: espresso_ticket_launch

function espresso_ticket_launch($attendee_id = 0, $registration_id = 0)
{
    global $wpdb, $org_options;
    $data = new stdClass();
    //Make sure we have attendee data
    if ($attendee_id == 0 || $registration_id == 0) {
        return;
    }
    //Get the event record
    $sql = "SELECT ed.*, et.css_file, et.template_file, et.ticket_content, et.ticket_logo_url ";
    isset($org_options['use_venue_manager']) && $org_options['use_venue_manager'] == 'Y' ? $sql .= ", v.id venue_id, v.name venue_name, v.address venue_address, v.address2 venue_address2, v.city venue_city, v.state venue_state, v.zip venue_zip, v.country venue_country, v.meta venue_meta " : '';
    $sql .= " FROM " . EVENTS_DETAIL_TABLE . " ed ";
    isset($org_options['use_venue_manager']) && $org_options['use_venue_manager'] == 'Y' ? $sql .= " LEFT JOIN " . EVENTS_VENUE_REL_TABLE . " r ON r.event_id = ed.id LEFT JOIN " . EVENTS_VENUE_TABLE . " v ON v.id = r.venue_id " : '';
    $sql .= " JOIN " . EVENTS_ATTENDEE_TABLE . " ea ON ea.event_id=ed.id ";
    $sql .= " LEFT JOIN " . EVENTS_TICKET_TEMPLATES . " et ON et.id=ed.ticket_id ";
    $sql .= " WHERE ea.id = '" . $attendee_id . "' AND ea.registration_id = '" . $registration_id . "' ";
    //echo $sql;
    $data->event = $wpdb->get_row($sql, OBJECT);
    //Get the attendee record
    $sql = "SELECT ea.* FROM " . EVENTS_ATTENDEE_TABLE . " ea WHERE ea.id = '" . $attendee_id . "' AND ea.registration_id = '" . $registration_id . "' ";
    $data->attendee = $wpdb->get_row($sql, OBJECT);
    if (empty($data->attendee)) {
        //echo 'Invalid data supplied.';
        return;
    }
    //Get the primary/first attendee
    $data->primary_attendee = espresso_is_primary_attendee($data->attendee->id) == true ? true : false;
    //unserialize the event meta
    $data->event->event_meta = unserialize($data->event->event_meta);
    //Get the registration date
    $data->attendee->registration_date = $data->attendee->date;
    //Get the CSS file
    $data->event->css_file = !empty($data->event->css_file) && $data->event->css_file > '0' ? $data->event->css_file : 'simple.css';
    //echo $data->event->css_file;
    //Get the HTML file
    $data->event->template_file = !empty($data->event->template_file) && $data->event->template_file > '0' ? $data->event->template_file : 'index.php';
    //Venue information
    if (isset($org_options['use_venue_manager']) && $org_options['use_venue_manager'] == 'Y') {
        $data->event->venue_id = !empty($data->event->venue_id) ? $data->event->venue_id : '';
        $data->event->venue_name = !empty($data->event->venue_name) ? $data->event->venue_name : '';
        $data->event->address = !empty($data->event->venue_address) ? $data->event->venue_address : '';
        $data->event->address2 = !empty($data->event->venue_address2) ? $data->event->venue_address2 : '';
        $data->event->city = !empty($data->event->venue_city) ? $data->event->venue_city : '';
        $data->event->state = !empty($data->event->venue_state) ? $data->event->venue_state : '';
        $data->event->zip = !empty($data->event->venue_zip) ? $data->event->venue_zip : '';
        $data->event->country = !empty($data->event->venue_country) ? $data->event->venue_country : '';
        $data->event->venue_meta = !empty($data->event->venue_meta) ? unserialize($data->event->venue_meta) : '';
    } else {
        $data->event->venue_name = !empty($data->event->venue_title) ? $data->event->venue_title : '';
    }
    //Create the Gravatar image
    $data->gravatar = '<img src="' . espresso_get_gravatar($data->attendee->email, $size = '100', $default = 'http://www.gravatar.com/avatar/') . '" alt="Gravatar">';
    //Google map IMAGE creation
    $data->event->google_map_image = espresso_google_map_link(array('id' => $data->event->venue_id, 'address' => $data->event->address, 'city' => $data->event->city, 'state' => $data->event->state, 'zip' => $data->event->zip, 'country' => $data->event->country, 'type' => 'map'));
    //Google map LINK creation
    $data->event->google_map_link = espresso_google_map_link(array('address' => $data->event->address, 'city' => $data->event->city, 'state' => $data->event->state, 'zip' => $data->event->zip, 'country' => $data->event->country, 'type' => 'text'));
    //Create the logo
    $data->event->ticket_logo_image = '';
    $data->event->ticket_logo_url = empty($data->event->ticket_logo_url) ? $org_options['default_logo_url'] : $data->event->ticket_logo_url;
    if (!empty($data->event->ticket_logo_url)) {
        $image_size = getimagesize($data->event->ticket_logo_url);
        $data->event->ticket_logo_image = '<img src="' . $data->event->ticket_logo_url . '" ' . $image_size[3] . ' alt="logo" /> ';
    }
    //Create the QR Code image
    $data->qr_code = espresso_ticket_qr_code(array('attendee_id' => $data->attendee->id, 'event_name' => stripslashes_deep($data->event->event_name), 'attendee_first' => $data->attendee->fname, 'attendee_last' => $data->attendee->lname, 'registration_id' => $data->attendee->registration_id, 'event_code' => $data->event->event_code, 'ticket_type' => $data->attendee->price_option, 'event_time' => $data->attendee->event_time, 'final_price' => $data->attendee->final_price));
    //Build the seating assignment
    $seatingchart_tag = '';
    if (defined("ESPRESSO_SEATING_CHART")) {
        if (class_exists("seating_chart")) {
            if (seating_chart::check_event_has_seating_chart($data->attendee->event_id)) {
                $rs = $wpdb->get_row("select scs.* from " . EVENTS_SEATING_CHART_EVENT_SEAT_TABLE . " sces inner join " . EVENTS_SEATING_CHART_SEAT_TABLE . " scs on sces.seat_id = scs.id where sces.attendee_id = " . $attendee_id);
                if ($rs !== NULL) {
                    $data->attendee->seatingchart_tag = $rs->custom_tag . " " . $rs->seat . " " . $rs->row;
                }
            }
        }
    }
    //Build the ticket name
    $ticket_name = sanitize_title_with_dashes($data->attendee->id . ' ' . $data->attendee->fname . ' ' . $data->attendee->lname);
    //Get the HTML as an object
    ob_start();
    if (file_exists(EVENT_ESPRESSO_UPLOAD_DIR . "tickets/templates/index.php")) {
        require_once EVENT_ESPRESSO_UPLOAD_DIR . 'tickets/templates/' . $data->event->template_file;
    } else {
        require_once 'templates/' . $data->event->template_file;
    }
    $content = ob_get_clean();
    $content = espresso_replace_ticket_shortcodes($content, $data);
    //Check if debugging or mobile is set
    if (isset($_REQUEST['pdf']) && $_REQUEST['pdf'] == true) {
        //Create the PDF
        define('DOMPDF_ENABLE_REMOTE', true);
        require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'tpc/dompdf/dompdf_config.inc.php';
        $dompdf = new DOMPDF();
        $dompdf->load_html($content);
        //$dompdf->set_paper('A4', 'landscape');
        $dompdf->render();
        $dompdf->stream($ticket_name . ".pdf", array("Attachment" => false));
        exit(0);
    }
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:functions.php

示例4: espresso_confirm_registration

function espresso_confirm_registration($registration_id)
{
    global $wpdb, $org_options;
    //Get the questions for the attendee
    $questions = $wpdb->get_results("SELECT ea.answer, eq.question\n\t\t\t\t\t\tFROM " . EVENTS_ANSWER_TABLE . " ea\n\t\t\t\t\t\tLEFT JOIN " . EVENTS_QUESTION_TABLE . " eq ON eq.id = ea.question_id\n\t\t\t\t\t\tWHERE ea.registration_id = '" . $registration_id . "' AND system_name IS NULL ORDER BY eq.sequence asc ");
    //echo $wpdb->last_query;
    $display_questions = '';
    foreach ($questions as $question) {
        $display_questions .= '<p class="espresso_questions"><strong>' . $question->question . '</strong>:<br /> ' . str_replace(',', '<br />', $question->answer) . '</p>';
    }
    //Get the event information
    $events = $wpdb->get_results("SELECT ed.* FROM " . EVENTS_DETAIL_TABLE . " ed\n\t\t\t\t\t\tJOIN " . EVENTS_ATTENDEE_TABLE . " ea\n\t\t\t\t\t\tON ed.id = ea.event_id\n\t\t\t\t\t\tWHERE ea.registration_id='" . $registration_id . "'");
    foreach ($events as $event) {
        $event_id = $event->id;
        $event_name = stripslashes_deep($event->event_name);
        $event_desc = stripslashes_deep($event->event_desc);
        $display_desc = $event->display_desc;
        $event_identifier = $event->event_identifier;
        $reg_limit = $event->reg_limit;
        $active = $event->is_active;
        $send_mail = $event->send_mail;
        $conf_mail = $event->conf_mail;
        $email_id = $event->email_id;
        $alt_email = $event->alt_email;
        $start_date = event_date_display($event->start_date);
        $end_date = $event->end_date;
        $virtual_url = $event->virtual_url;
        $virtual_phone = $event->virtual_phone;
        $event_address = $event->address;
        $event_address2 = $event->address2;
        $event_city = $event->city;
        $event_state = $event->state;
        $event_zip = $event->zip;
        $event_country = $event->country;
        $location = ($event_address != '' ? $event_address : '') . ($event_address2 != '' ? '<br />' . $event_address2 : '') . ($event_city != '' ? '<br />' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '<br />' . $event_zip : '') . ($event_country != '' ? '<br />' . $event_country : '');
        $location_phone = $event->phone;
        $require_pre_approval = $event->require_pre_approval;
        $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country));
    }
    //Build links
    $event_url = espresso_reg_url($event_id);
    $event_link = '<a href="' . $event_url . '">' . $event_name . '</a>';
    $sql = "SELECT * FROM " . EVENTS_ATTENDEE_TABLE;
    if ($registration_id != '') {
        $sql .= " WHERE registration_id = '" . $registration_id . "' ";
    } elseif ($attendee_id != '') {
        $sql .= " WHERE id = '" . $attendee_id . "' ";
    } else {
        _e('No ID Supplied', 'event_espresso');
    }
    $sql .= " ORDER BY id ";
    $sql .= " LIMIT 0,1 ";
    //Get the first attendees details
    $attendees = $wpdb->get_results($sql);
    //global $attendee_id;
    foreach ($attendees as $attendee) {
        $attendee_id = $attendee->id;
        $attendee_email = $attendee->email;
        $lname = $attendee->lname;
        $fname = $attendee->fname;
        $address = $attendee->address;
        $address2 = $attendee->address2;
        $city = $attendee->city;
        $state = $attendee->state;
        $zip = $attendee->zip;
        $payment_status = $attendee->payment_status;
        $txn_type = $attendee->txn_type;
        $amount_pd = $attendee->amount_pd;
        $event_cost = $attendee->amount_pd;
        $payment_date = $attendee->payment_date;
        $phone = $attendee->phone;
        $event_time = $attendee->event_time;
        $end_time = $attendee->end_time;
        $date = $attendee->date;
        $pre_approve = $attendee->pre_approve;
    }
    ####### Added by wp-developers ##############
    $pre_approval_check = is_attendee_approved($event_id, $attendee_id);
    ###########################################
    ###### Modified by wp-developers ###############
    if ($pre_approval_check) {
        //Pull in the "Thank You" page template
        if (file_exists(EVENT_ESPRESSO_TEMPLATE_DIR . "payment_page.php")) {
            require_once EVENT_ESPRESSO_TEMPLATE_DIR . "payment_page.php";
            //This is the path to the template file if available
        } else {
            require_once EVENT_ESPRESSO_PLUGINFULLPATH . "templates/payment_page.php";
        }
        if ($amount_pd != '0.00') {
            //Show payment options
            if (file_exists(EVENT_ESPRESSO_GATEWAY_DIR . "gateway_display.php")) {
                require_once EVENT_ESPRESSO_GATEWAY_DIR . "gateway_display.php";
            } else {
                require_once EVENT_ESPRESSO_PLUGINFULLPATH . "gateways/gateway_display.php";
            }
            //Check to see if the site owner wants to send an confirmation eamil before payment is recieved.
            if ($org_options['email_before_payment'] == 'Y') {
                event_espresso_email_confirmations(array('registration_id' => $registration_id, 'send_admin_email' => 'true', 'send_attendee_email' => 'true'));
            }
        } else {
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:payment_page.php

示例5: espresso_list_builder

 function espresso_list_builder($sql, $template_file, $before, $after)
 {
     global $wpdb, $org_options;
     //echo 'This page is located in ' . get_option( 'upload_path' );
     $event_page_id = $org_options['event_page_id'];
     $currency_symbol = $org_options['currency_symbol'];
     $events = $wpdb->get_results($sql);
     $category_id = $wpdb->last_result[0]->id;
     $category_name = $wpdb->last_result[0]->category_name;
     $category_desc = html_entity_decode(wpautop($wpdb->last_result[0]->category_desc));
     $display_desc = $wpdb->last_result[0]->display_desc;
     if ($display_desc == 'Y') {
         echo '<p id="events_category_name-' . $category_id . '" class="events_category_name">' . stripslashes_deep($category_name) . '</p>';
         echo wpautop($category_desc);
     }
     foreach ($events as $event) {
         $event_id = $event->id;
         $event_name = $event->event_name;
         $event_identifier = $event->event_identifier;
         $active = $event->is_active;
         $registration_start = $event->registration_start;
         $registration_end = $event->registration_end;
         $start_date = $event->start_date;
         $end_date = $event->end_date;
         $reg_limit = $event->reg_limit;
         $event_address = $event->address;
         $event_address2 = $event->address2;
         $event_city = $event->city;
         $event_state = $event->state;
         $event_zip = $event->zip;
         $event_country = $event->country;
         $member_only = $event->member_only;
         $externalURL = $event->externalURL;
         $recurrence_id = $event->recurrence_id;
         $allow_overflow = $event->allow_overflow;
         $overflow_event_id = $event->overflow_event_id;
         //Address formatting
         $location = ($event_address != '' ? $event_address : '') . ($event_address2 != '' ? '<br />' . $event_address2 : '') . ($event_city != '' ? '<br />' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '<br />' . $event_zip : '') . ($event_country != '' ? '<br />' . $event_country : '');
         //Google map link creation
         $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country, 'text' => 'Map and Directions', 'type' => 'text'));
         //These variables can be used with other the espresso_countdown, espresso_countup, and espresso_duration functions and/or any javascript based functions.
         $start_timestamp = espresso_event_time($event_id, 'start_timestamp', get_option('time_format'));
         $end_timestamp = espresso_event_time($event_id, 'end_timestamp', get_option('time_format'));
         //This can be used in place of the registration link if you are usign the external URL feature
         $registration_url = $externalURL != '' ? $externalURL : get_option('siteurl') . '/?page_id=' . $event_page_id . '&regevent_action=register&event_id=' . $event_id;
         if (!is_user_logged_in() && get_option('events_members_active') == 'true' && $member_only == 'Y') {
             //Display a message if the user is not logged in.
             //_e('Member Only Event. Please ','event_espresso') . event_espresso_user_login_link() . '.';
         } else {
             //Serve up the event list
             //As of version 3.0.17 the event lsit details have been moved to event_list_display.php
             echo $before = $before == '' ? '' : $before;
             include 'templates/' . $template_file;
             echo $after = $after == '' ? '' : $after;
         }
     }
     //Check to see how many database queries were performed
     //echo '<p>Database Queries: ' . get_num_queries() .'</p>';
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:59,代码来源:custom_functions.php

示例6: register_attendees


//.........这里部分代码省略.........
            $venue_address2 = '';
            $venue_city = '';
            $venue_state = '';
            $venue_zip = '';
            $venue_country = '';
            global $event_meta;
            $event_meta = unserialize($data->event->event_meta);
            //Venue information
            if ($org_options['use_venue_manager'] == 'Y') {
                $event_address = $data->event->venue_address;
                $event_address2 = $data->event->venue_address2;
                $event_city = $data->event->venue_city;
                $event_state = $data->event->venue_state;
                $event_zip = $data->event->venue_zip;
                $event_country = $data->event->venue_country;
                //Leaving these variables intact, just in case people wnat to use them
                $venue_title = $data->event->venue_name;
                $venue_address = $data->event->venue_address;
                $venue_address2 = $data->event->venue_address2;
                $venue_city = $data->event->venue_city;
                $venue_state = $data->event->venue_state;
                $venue_zip = $data->event->venue_zip;
                $venue_country = $data->event->venue_country;
                global $venue_meta;
                $add_venue_meta = array('venue_title' => $data->event->venue_name, 'venue_address' => $data->event->venue_address, 'venue_address2' => $data->event->venue_address2, 'venue_city' => $data->event->venue_city, 'venue_state' => $data->event->venue_state, 'venue_country' => $data->event->venue_country);
                $venue_meta = isset($data->event->venue_meta) && $data->event->venue_meta != '' && (isset($add_venue_meta) && $add_venue_meta != '') ? array_merge(unserialize($data->event->venue_meta), $add_venue_meta) : '';
                //print_r($venue_meta);
            }
            $virtual_url = stripslashes_deep($data->event->virtual_url);
            $virtual_phone = stripslashes_deep($data->event->virtual_phone);
            //Address formatting
            $location = (!empty($event_address) ? $event_address : '') . (!empty($event_address2) ? '<br />' . $event_address2 : '') . (!empty($event_city) ? '<br />' . $event_city : '') . (!empty($event_state) ? ', ' . $event_state : '') . (!empty($event_zip) ? '<br />' . $event_zip : '') . (!empty($event_country) ? '<br />' . $event_country : '');
            //Google map link creation
            $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country, 'text' => 'Map and Directions', 'type' => 'text'));
            $question_groups = unserialize($data->event->question_groups);
            $reg_start_date = $data->event->registration_start;
            $reg_end_date = $data->event->registration_end;
            $today = date("Y-m-d");
            if (isset($data->event->timezone_string) && $data->event->timezone_string != '') {
                $timezone_string = $data->event->timezone_string;
            } else {
                $timezone_string = get_option('timezone_string');
                if (!isset($timezone_string) || $timezone_string == '') {
                    $timezone_string = 'America/New_York';
                }
            }
            $t = time();
            $today = date_at_timezone("Y-m-d H:i A", $timezone_string, $t);
            //echo event_date_display($today, get_option('date_format'). ' ' .get_option('time_format')) . ' ' . $timezone_string;
            //echo espresso_ddtimezone_simple();
            $reg_limit = $data->event->reg_limit;
            $additional_limit = $data->event->additional_limit;
            //If the coupon code system is intalled then use it
            $use_coupon_code = $data->event->use_coupon_code;
            //If the groupon code addon is installed, then use it
            $use_groupon_code = $data->event->use_groupon_code;
            //Set a default value for additional limit
            if ($additional_limit == '') {
                $additional_limit = '5';
            }
            $num_attendees = get_number_of_attendees_reg_limit($event_id, 'num_attendees');
            //Get the number of attendees
            $available_spaces = get_number_of_attendees_reg_limit($event_id, 'available_spaces');
            //Gets a count of the available spaces
            $number_available_spaces = get_number_of_attendees_reg_limit($event_id, 'number_available_spaces');
            //Gets the number of available spaces
开发者ID:sriram911,项目名称:pls,代码行数:67,代码来源:registration_page.php

示例7: event_espresso_get_event_details


//.........这里部分代码省略.........
         $event_city = $event->city;
         $event_state = $event->state;
         $event_zip = $event->zip;
         $event_country = $event->country;
         $member_only = $event->member_only;
         $externalURL = $event->externalURL;
         $recurrence_id = $event->recurrence_id;
         $display_reg_form = $event->display_reg_form;
         $allow_overflow = $event->allow_overflow;
         $overflow_event_id = $event->overflow_event_id;
         $event_desc = array_shift(explode('<!--more-->', $event_desc));
         global $event_meta;
         $event_meta = unserialize($event->event_meta);
         $event_meta['is_active'] = $event->is_active;
         $event_meta['event_status'] = $event->event_status;
         $event_meta['start_time'] = empty($event->start_time) ? '' : $event->start_time;
         $event_meta['start_date'] = $event->start_date;
         $event_meta['registration_start'] = $event->registration_start;
         $event_meta['registration_startT'] = $event->registration_startT;
         $event_meta['registration_end'] = $event->registration_end;
         $event_meta['registration_endT'] = $event->registration_endT;
         //Venue information
         if ($org_options['use_venue_manager'] == 'Y') {
             $event_address = empty($event->venue_address) ? '' : $event->venue_address;
             $event_address2 = empty($event->venue_address2) ? '' : $event->venue_address2;
             $event_city = empty($event->venue_city) ? '' : $event->venue_city;
             $event_state = empty($event->venue_state) ? '' : $event->venue_state;
             $event_zip = empty($event->venue_zip) ? '' : $event->venue_zip;
             $event_country = empty($event->venue_country) ? '' : $event->venue_country;
             //Leaving these variables intact, just in case people want to use them
             $venue_title = empty($event->venue_name) ? '' : $event->venue_name;
             $venue_address = $event_address;
             $venue_address2 = $event_address2;
             $venue_city = $event_city;
             $venue_state = $event_state;
             $venue_zip = $event_zip;
             $venue_country = $event_country;
             global $venue_meta;
             $add_venue_meta = array('venue_title' => $venue_title, 'venue_address' => $event_address, 'venue_address2' => $event_address2, 'venue_city' => $event_city, 'venue_state' => $event_state, 'venue_country' => $event_country);
             $venue_meta = !empty($event->venue_meta) && !empty($add_venue_meta) ? array_merge(unserialize($event->venue_meta), $add_venue_meta) : '';
             //print_r($venue_meta);
         }
         //Address formatting
         $location = (!empty($event_address) ? $event_address : '') . (!empty($event_address2) ? '<br />' . $event_address2 : '') . (!empty($event_city) ? '<br />' . $event_city : '') . (!empty($event_state) ? ', ' . $event_state : '') . (!empty($event_zip) ? '<br />' . $event_zip : '') . (!empty($event_country) ? '<br />' . $event_country : '');
         //Google map link creation
         $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country, 'text' => 'Map and Directions', 'type' => 'text'));
         global $all_meta;
         $all_meta = array('event_id' => $event_id, 'event_name' => stripslashes_deep($event_name), 'event_desc' => stripslashes_deep($event_desc), 'event_address' => $event_address, 'event_address2' => $event_address2, 'event_city' => $event_city, 'event_state' => $event_state, 'event_zip' => $event_zip, 'event_country' => $venue_country, 'venue_title' => $venue_title, 'venue_address' => $venue_address, 'venue_address2' => $venue_address2, 'venue_city' => $venue_city, 'venue_state' => $venue_state, 'venue_country' => $venue_country, 'location' => $location, 'is_active' => $event->is_active, 'event_status' => $event->event_status, 'contact_email' => empty($event->alt_email) ? $org_options['contact_email'] : $event->alt_email, 'start_time' => empty($event->start_time) ? '' : $event->start_time, 'registration_startT' => $event->registration_startT, 'registration_start' => $registration_start, 'registration_endT' => $event->registration_endT, 'registration_end' => $registration_end, 'is_active' => empty($is_active) ? '' : $is_active, 'event_country' => $event_country, 'start_date' => event_date_display($start_date, get_option('date_format')), 'end_date' => event_date_display($end_date, get_option('date_format')), 'time' => empty($event->start_time) ? '' : $event->start_time, 'start_time' => empty($event->start_time) ? '' : $event->start_time, 'end_time' => empty($event->end_time) ? '' : $event->end_time, 'google_map_link' => $google_map_link, 'price' => empty($event->event_cost) ? '' : $event->event_cost, 'event_cost' => empty($event->event_cost) ? '' : $event->event_cost);
         //Debug
         //echo '<p>'.print_r($all_meta).'</p>';
         //These variables can be used with other the espresso_countdown, espresso_countup, and espresso_duration functions and/or any javascript based functions.
         //Warning: May cause additional database queries an should only be used for sites with a small amount of events.
         // $start_timestamp = espresso_event_time($event_id, 'start_timestamp');
         //$end_timestamp = espresso_event_time($event_id, 'end_timestamp');
         //This can be used in place of the registration link if you are usign the external URL feature
         $registration_url = $externalURL != '' ? $externalURL : espresso_reg_url($event_id);
         //Serve up the event list
         //As of version 3.0.17 the event list details have been moved to event_list_display.php
         if ($allow_override == 1) {
             //Uncomment to show active status array
             //print_r( event_espresso_get_is_active($event_id));
             include 'event_list_display.php';
         } else {
             switch (event_espresso_get_status($event_id)) {
                 case 'NOT_ACTIVE':
                     //Don't show the event
                     //Uncomment the following two lines to show events that are not active and the active status array
                     //print_r( event_espresso_get_is_active($event_id));
                     //include('event_list_display.php');
                     break;
                 case 'PENDING':
                     if (current_user_can('administrator') || function_exists('espresso_member_data') && espresso_can_view_event($event_id) == true) {
                         //Uncomment to show active status array
                         //print_r( event_espresso_get_is_active($event_id));
                         echo '<div class="pending_event">';
                         include 'event_list_display.php';
                         echo '</div>';
                     }
                     break;
                 default:
                     //Uncomment to show active status array
                     //print_r( event_espresso_get_is_active($event_id));
                     include 'event_list_display.php';
                     break;
             }
         }
     }
     echo "</div>";
     echo "</div>";
     if (isset($espresso_paginate)) {
         echo $espresso_paginate;
         // spit out the pagination links
     }
     if ($use_wrapper) {
         echo "</div>";
     }
     //Check to see how many database queries were performed
     //echo '<p>Database Queries: ' . get_num_queries() .'</p>';
     espresso_registration_footer();
 }
开发者ID:sriram911,项目名称:pls,代码行数:101,代码来源:event_list.php

示例8: multi_register_attendees

    function multi_register_attendees($single_event_id = NULL, $event_id_sc = 0, $meta = array(), $event = FALSE)
    {
        global $wpdb, $org_options;
        $events_in_session = $_SESSION['espresso_session']['events_in_session'];
        $event_count = count($events_in_session);
        static $event_counter = 1;
        static $attendee_number = 1;
        //The following variables are used to get information about your organization
        $event_page_id = $org_options['event_page_id'];
        $Organization = isset($org_options['organization']) && !empty($org_options['organization']) ? stripslashes_deep($org_options['organization']) : '';
        $Organization_street1 = isset($org_options['organization_street1']) && !empty($org_options['organization_street1']) ? $org_options['organization_street1'] : '';
        $Organization_street2 = isset($org_options['organization_street2']) && !empty($org_options['organization_street2']) ? $org_options['organization_street2'] : '';
        $Organization_city = isset($org_options['organization_city']) && !empty($org_options['organization_city']) ? $org_options['organization_city'] : '';
        $Organization_state = isset($org_options['organization_state']) && !empty($org_options['organization_state']) ? $org_options['organization_state'] : '';
        $Organization_zip = isset($org_options['organization_zip']) && !empty($org_options['organization_zip']) ? $org_options['organization_zip'] : '';
        $contact = isset($org_options['contact_email']) && !empty($org_options['contact_email']) ? $org_options['contact_email'] : '';
        $registrar = isset($org_options['contact_email']) && !empty($org_options['contact_email']) ? $org_options['contact_email'] : '';
        $currency_format = isset($org_options['currency_format']) && !empty($org_options['currency_format']) ? $org_options['currency_format'] : '';
        $message = isset($org_options['message']) && !empty($org_options['message']) ? $org_options['message'] : '';
        $paypal_id = isset($org_options['paypal_id']) && !empty($org_options['paypal_id']) ? $org_options['paypal_id'] : '';
        if (!$event) {
            // the key we will eventually use in our query to find the event
            $ID = $event_id_sc != '0' ? $event_id_sc : $_REQUEST['event_id'];
            if (!empty($_REQUEST['event_id_time'])) {
                $pieces = explode('|', $_REQUEST['event_id_time'], 3);
                $ID = $pieces[0];
                $start_time = $pieces[1];
                $time_id = $pieces[2];
                $time_selected = true;
            }
            //If a single event needs to be displayed, get its ID
            if ($single_event_id != NULL) {
                $sql = "SELECT id FROM " . EVENTS_DETAIL_TABLE;
                $sql .= " WHERE event_identifier = %s";
                $sql .= " LIMIT 0,1";
                $result = $wpdb->get_row($wpdb->prepare($sql, $single_event_id));
                $ID = $result->id;
            }
            //Build event queries
            $sql = "SELECT * FROM " . EVENTS_DETAIL_TABLE;
            $sql .= " WHERE is_active='Y' ";
            $sql .= " AND event_status != 'D' ";
            $sql .= " AND id =%d LIMIT 0,1";
            //Support for diarise
            if (!empty($_REQUEST['post_event_id'])) {
                $sql = "SELECT * FROM " . EVENTS_DETAIL_TABLE;
                $sql .= " WHERE post_id = %d ";
                $sql .= " LIMIT 0,1";
                $ID = absint($_REQUEST['post_event_id']);
            }
            $event = $wpdb->get_row($wpdb->prepare($sql, $ID));
        }
        //Build the registration page
        if ($event) {
            //These are the variables that can be used throughout the regsitration page
            $event_id = $event->id;
            $event_name = stripslashes_deep($event->event_name);
            $event_desc = stripslashes_deep($event->event_desc);
            $display_desc = $event->display_desc;
            $display_reg_form = $event->display_reg_form;
            $event_address = $event->address;
            $event_address2 = $event->address2;
            $event_city = $event->city;
            $event_state = $event->state;
            $event_zip = $event->zip;
            $event_country = $event->country;
            $event_description = stripslashes_deep($event->event_desc);
            $event_identifier = $event->event_identifier;
            $event_cost = !empty($event->event_cost) ? $event->event_cost : 0;
            //echo '<h4>$event_cost : ' . $event_cost . '  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>';
            $member_only = $event->member_only;
            $reg_limit = $event->reg_limit;
            $allow_multiple = $event->allow_multiple;
            $start_date = $event->start_date;
            $end_date = $event->end_date;
            $allow_overflow = $event->allow_overflow;
            $overflow_event_id = $event->overflow_event_id;
            $virtual_url = stripslashes_deep($event->virtual_url);
            $virtual_phone = stripslashes_deep($event->virtual_phone);
            //Address formatting
            $location = ($event_address != '' ? $event_address : '') . ($event_address2 != '' ? '<br />' . $event_address2 : '') . ($event_city != '' ? '<br />' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '<br />' . $event_zip : '') . ($event_country != '' ? '<br />' . $event_country : '');
            //Google map link creation
            $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country, 'text' => 'Map and Directions', 'type' => 'text'));
            $reg_start_date = $event->registration_start;
            $reg_end_date = $event->registration_end;
            $today = date("Y-m-d");
            $reg_limit = $event->reg_limit;
            $additional_limit = $event->additional_limit;
            $question_groups = unserialize($event->question_groups);
            $item_groups = unserialize($event->item_groups);
            $event_meta = maybe_unserialize($event->event_meta);
            //printr( $event_meta, '$event_meta  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
            //This function gets the status of the event.
            //$is_active = event_espresso_get_status($event_id, $event_meta);
            $is_active = event_espresso_get_is_active($event_id, $event_meta);
            //If the coupon code system is intalled then use it
            $use_coupon_code = function_exists('event_espresso_coupon_registration_page') ? $event->use_coupon_code : FALSE;
            //If the groupon code addon is installed, then use it
            $use_groupon_code = function_exists('event_espresso_groupon_payment_page') ? $event->use_groupon_code : FALSE;
            //Set a default value for additional limit
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:multi_registration_page.php

示例9: event_espresso_get_event_details

 function event_espresso_get_event_details($sql, $css_class = NULL, $allow_override = 0)
 {
     global $wpdb, $org_options;
     //echo 'This page is located in ' . get_option( 'upload_path' );
     $event_page_id = $org_options['event_page_id'];
     $currency_symbol = isset($org_options['currency_symbol']) ? $org_options['currency_symbol'] : '';
     $events = $wpdb->get_results($sql);
     $category_id = isset($wpdb->last_result[0]->id) ? $wpdb->last_result[0]->id : '';
     $category_name = isset($wpdb->last_result[0]->category_name) ? $wpdb->last_result[0]->category_name : '';
     $category_identifier = isset($wpdb->last_result[0]->category_identifier) ? $wpdb->last_result[0]->category_identifier : '';
     $category_desc = isset($wpdb->last_result[0]->category_desc) ? html_entity_decode(wpautop($wpdb->last_result[0]->category_desc)) : '';
     $display_desc = isset($wpdb->last_result[0]->display_desc) ? $wpdb->last_result[0]->display_desc : '';
     /* group recuring events */
     $events_type_index = -1;
     $events_of_same_type = array();
     $last_recurrence_id = null;
     /* end group recuring events */
     if ($display_desc == 'Y') {
         echo '<p id="events_category_name-' . $category_id . '" class="events_category_name">' . stripslashes_deep($category_name) . '</p>';
         echo wpautop($category_desc);
     }
     foreach ($events as $event) {
         $event_id = $event->id;
         $event_name = $event->event_name;
         $event_desc = $event->event_desc;
         $event_identifier = $event->event_identifier;
         $active = $event->is_active;
         $registration_start = $event->registration_start;
         $registration_end = $event->registration_end;
         $start_date = $event->start_date;
         $end_date = $event->end_date;
         $reg_limit = $event->reg_limit;
         $event_address = $event->address;
         $event_address2 = $event->address2;
         $event_city = $event->city;
         $event_state = $event->state;
         $event_zip = $event->zip;
         $event_country = $event->country;
         $member_only = $event->member_only;
         $externalURL = $event->externalURL;
         $recurrence_id = $event->recurrence_id;
         $allow_overflow = $event->allow_overflow;
         $overflow_event_id = $event->overflow_event_id;
         //Address formatting
         $location = ($event_address != '' ? $event_address : '') . ($event_address2 != '' ? '<br />' . $event_address2 : '') . ($event_city != '' ? '<br />' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '<br />' . $event_zip : '') . ($event_country != '' ? '<br />' . $event_country : '');
         //Google map link creation
         $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country, 'text' => 'Map and Directions', 'type' => 'text'));
         //These variables can be used with other the espresso_countdown, espresso_countup, and espresso_duration functions and/or any javascript based functions.
         $start_timestamp = espresso_event_time($event_id, 'start_timestamp');
         $end_timestamp = espresso_event_time($event_id, 'end_timestamp');
         //This can be used in place of the registration link if you are usign the external URL feature
         $registration_url = $externalURL != '' ? $externalURL : get_option('siteurl') . '/?page_id=' . $event_page_id . '&regevent_action=register&event_id=' . $event_id . '&name_of_event=' . stripslashes_deep($event_name);
         if (!is_user_logged_in() && get_option('events_members_active') == 'true' && $member_only == 'Y') {
             //Display a message if the user is not logged in.
             //_e('Member Only Event. Please ','event_espresso') . event_espresso_user_login_link() . '.';
         } else {
             //Serve up the event list
             //As of version 3.0.17 the event lsit details have been moved to event_list_display.php
             switch (event_espresso_get_status($event_id)) {
                 case 'NOT_ACTIVE':
                     //Don't show the event if any of the above are true
                     break;
                 default:
                     /* skip secondary (waitlist) events */
                     $event_status = event_espresso_get_is_active($event_id);
                     if ($event_status['status'] == 'SECONDARY') {
                         break;
                     }
                     /* group recuring events */
                     $is_new_event_type = $last_recurrence_id == 0 || $last_recurrence_id != $recurrence_id;
                     if ($is_new_event_type) {
                         $events_type_index++;
                         $events_of_same_type[$events_type_index] = array();
                     }
                     $event_data = array('event_id' => $event_id, 'event_page_id' => $event_page_id, 'event_name' => $event_name, 'event_desc' => $event_desc, 'start_date' => $start_date, 'end_date' => $end_date, 'reg_limit' => $reg_limit, 'registration_url' => $registration_url, 'overflow_event_id' => $overflow_event_id);
                     array_push($events_of_same_type[$events_type_index], $event_data);
                     $last_recurrence_id = $recurrence_id;
                     // include('event_list_display.php');
                     break;
             }
         }
     }
     /* group recuring events */
     foreach ($events_of_same_type as $events_group) {
         include 'event_list_display.php';
     }
     /* end group recuring events */
     //Check to see how many database queries were performed
     //echo '<p>Database Queries: ' . get_num_queries() .'</p>';
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:90,代码来源:event_list.php

示例10: event_espresso_get_event_details

 function event_espresso_get_event_details($sql, $css_class = NULL, $allow_override = 0)
 {
     //echo $sql;
     global $wpdb, $org_options, $events_in_session;
     $multi_reg = false;
     if (function_exists('event_espresso_multi_reg_init')) {
         $multi_reg = true;
     }
     //echo 'This page is located in ' . get_option( 'upload_path' );
     $event_page_id = $org_options['event_page_id'];
     $currency_symbol = isset($org_options['currency_symbol']) ? $org_options['currency_symbol'] : '';
     $events = $wpdb->get_results($sql);
     $category_id = isset($wpdb->last_result[0]->id) ? $wpdb->last_result[0]->id : '';
     $category_name = isset($wpdb->last_result[0]->category_name) ? $wpdb->last_result[0]->category_name : '';
     $category_identifier = isset($wpdb->last_result[0]->category_identifier) ? $wpdb->last_result[0]->category_identifier : '';
     $category_desc = isset($wpdb->last_result[0]->category_desc) ? html_entity_decode(wpautop($wpdb->last_result[0]->category_desc)) : '';
     $display_desc = isset($wpdb->last_result[0]->display_desc) ? $wpdb->last_result[0]->display_desc : '';
     if ($display_desc == 'Y') {
         echo '<p id="events_category_name-' . $category_id . '" class="events_category_name">' . stripslashes_deep($category_name) . '</p>';
         echo espresso_format_content($category_desc);
     }
     //Debug
     //var_dump($events);
     foreach ($events as $event) {
         $event_id = $event->id;
         $event_name = $event->event_name;
         $event_desc = stripslashes_deep($event->event_desc);
         $event_identifier = $event->event_identifier;
         $active = $event->is_active;
         $registration_start = $event->registration_start;
         $registration_end = $event->registration_end;
         $start_date = $event->start_date;
         $end_date = $event->end_date;
         $reg_limit = $event->reg_limit;
         $event_address = $event->address;
         $event_address2 = $event->address2;
         $event_city = $event->city;
         $event_state = $event->state;
         $event_zip = $event->zip;
         $event_country = $event->country;
         $member_only = $event->member_only;
         $externalURL = $event->externalURL;
         $recurrence_id = $event->recurrence_id;
         $display_reg_form = $event->display_reg_form;
         $allow_overflow = $event->allow_overflow;
         $overflow_event_id = $event->overflow_event_id;
         $event_desc = array_shift(explode('<!--more-->', $event_desc));
         global $event_meta;
         $event_meta = unserialize($event->event_meta);
         $event_meta['is_active'] = $event->is_active;
         $event_meta['event_status'] = $event->event_status;
         $event_meta['start_time'] = empty($event->start_time) ? '' : $event->start_time;
         $event_meta['start_date'] = $event->start_date;
         $event_meta['registration_start'] = $event->registration_start;
         $event_meta['registration_startT'] = $event->registration_startT;
         $event_meta['registration_end'] = $event->registration_end;
         $event_meta['registration_endT'] = $event->registration_endT;
         //Venue information
         if ($org_options['use_venue_manager'] == 'Y') {
             $event_address = empty($event->venue_address) ? '' : $event->venue_address;
             $event_address2 = empty($event->venue_address2) ? '' : $event->venue_address2;
             $event_city = empty($event->venue_city) ? '' : $event->venue_city;
             $event_state = empty($event->venue_state) ? '' : $event->venue_state;
             $event_zip = empty($event->venue_zip) ? '' : $event->venue_zip;
             $event_country = empty($event->venue_country) ? '' : $event->venue_country;
             //Leaving these variables intact, just in case people want to use them
             $venue_title = empty($event->venue_name) ? '' : $event->venue_name;
             $venue_address = $event_address;
             $venue_address2 = $event_address2;
             $venue_city = $event_city;
             $venue_state = $event_state;
             $venue_zip = $event_zip;
             $venue_country = $event_country;
             global $venue_meta;
             $add_venue_meta = array('venue_title' => $venue_title, 'venue_address' => $event_address, 'venue_address2' => $event_address2, 'venue_city' => $event_city, 'venue_state' => $event_state, 'venue_country' => $event_country);
             $venue_meta = !empty($event->venue_meta) && !empty($add_venue_meta) ? array_merge(unserialize($event->venue_meta), $add_venue_meta) : '';
             //print_r($venue_meta);
         }
         //Address formatting
         $location = ($event_address != '' ? $event_address : '') . ($event_address2 != '' ? '<br />' . $event_address2 : '') . ($event_city != '' ? '<br />' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '<br />' . $event_zip : '') . ($event_country != '' ? '<br />' . $event_country : '');
         //Google map link creation
         $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country, 'text' => 'Map and Directions', 'type' => 'text'));
         global $all_meta;
         $all_meta = array('event_name' => stripslashes_deep($event_name), 'event_desc' => stripslashes_deep($event_desc), 'event_address' => $event_address, 'event_address2' => $event_address2, 'event_city' => $event_city, 'event_state' => $event_state, 'event_zip' => $event_zip, 'is_active' => $event->is_active, 'event_status' => $event->event_status, 'start_time' => empty($event->start_time) ? '' : $event->start_time, 'registration_startT' => $event->registration_startT, 'registration_start' => $registration_start, 'registration_endT' => $event->registration_endT, 'registration_end' => $registration_end, 'is_active' => empty($is_active) ? '' : $is_active, 'event_country' => $event_country, 'start_date' => event_date_display($start_date, get_option('date_format')), 'end_date' => event_date_display($end_date, get_option('date_format')), 'time' => empty($event->start_time) ? '' : $event->start_time, 'google_map_link' => $google_map_link, 'price' => empty($event->event_cost) ? '' : $event->event_cost, 'event_cost' => empty($event->event_cost) ? '' : $event->event_cost);
         //Debug
         //echo '<p>'.print_r($all_meta).'</p>';
         //These variables can be used with other the espresso_countdown, espresso_countup, and espresso_duration functions and/or any javascript based functions.
         //Warning: May cause additional database queries an should only be used for sites with a small amount of events.
         // $start_timestamp = espresso_event_time($event_id, 'start_timestamp');
         //$end_timestamp = espresso_event_time($event_id, 'end_timestamp');
         //This can be used in place of the registration link if you are usign the external URL feature
         $registration_url = $externalURL != '' ? $externalURL : espresso_reg_url($event_id);
         if (!is_user_logged_in() && get_option('events_members_active') == 'true' && $member_only == 'Y') {
             //Display a message if the user is not logged in.
             //_e('Member Only Event. Please ','event_espresso') . event_espresso_user_login_link() . '.';
         } else {
             //Serve up the event list
             //As of version 3.0.17 the event list details have been moved to event_list_display.php
             if ($allow_override == 1) {
                 //Uncomment to show active status array
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:event_list.php

示例11: array

     $venue_address2 = $data->event->venue_address2;
     $venue_city = $data->event->venue_city;
     $venue_state = $data->event->venue_state;
     $venue_zip = $data->event->venue_zip;
     $venue_country = $data->event->venue_country;
     global $venue_meta;
     $add_venue_meta = array('venue_title' => $data->event->venue_name, 'venue_address' => $data->event->venue_address, 'venue_address2' => $data->event->venue_address2, 'venue_city' => $data->event->venue_city, 'venue_state' => $data->event->venue_state, 'venue_country' => $data->event->venue_country);
     $venue_meta = isset($data->event->venue_meta) && $data->event->venue_meta != '' && (isset($add_venue_meta) && $add_venue_meta != '') ? array_merge(unserialize($data->event->venue_meta), $add_venue_meta) : '';
     //print_r($venue_meta);
 }
 $virtual_url = stripslashes_deep($data->event->virtual_url);
 $virtual_phone = stripslashes_deep($data->event->virtual_phone);
 //Address formatting
 $location = ($event_address != '' ? $event_address : '') . ($event_address2 != '' ? '<br />' . $event_address2 : '') . ($event_city != '' ? '<br />' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '<br />' . $event_zip : '') . ($event_country != '' ? '<br />' . $event_country : '');
 //Google map link creation
 $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country, 'text' => 'Map and Directions', 'type' => 'text'));
 $question_groups = unserialize($data->event->question_groups);
 $reg_start_date = $data->event->registration_start;
 $reg_end_date = $data->event->registration_end;
 $today = date("Y-m-d");
 if (isset($data->event->timezone_string) && $data->event->timezone_string != '') {
     $timezone_string = $data->event->timezone_string;
 } else {
     $timezone_string = get_option('timezone_string');
     if (!isset($timezone_string) || $timezone_string == '') {
         $timezone_string = 'America/New_York';
     }
 }
 $t = time();
 $today = date_at_timezone("Y-m-d H:i A", $timezone_string, $t);
 //echo event_date_display($today, get_option('date_format'). ' ' .get_option('time_format')) . ' ' . $timezone_string;
开发者ID:HandsomeDogStudio,项目名称:peanutbutterplan,代码行数:31,代码来源:event_post.php

示例12: espresso_confirm_registration

function espresso_confirm_registration()
{
    do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
    global $wpdb, $org_options;
    if (!empty($_POST['confirm_registration'])) {
        $registration_id = sanitize_text_field($_POST['registration_id']);
    } else {
        wp_die(__('An error has occured. The registration ID could not be found.', 'event_espresso'));
    }
    echo '<div id="espresso-payment_page-dv" >';
    do_action('action_hook_espresso_confirmation_page_before', $registration_id);
    //Get the questions for the attendee
    $SQL = "SELECT ea.answer, eq.question FROM " . EVENTS_ANSWER_TABLE . " ea ";
    $SQL .= "LEFT JOIN " . EVENTS_QUESTION_TABLE . " eq ON eq.id = ea.question_id ";
    $SQL .= "WHERE ea.registration_id = %s ";
    $SQL .= "AND system_name IS NULL ORDER BY eq.sequence asc ";
    $questions = $wpdb->get_results($wpdb->prepare($SQL, $registration_id));
    //echo $wpdb->last_query;
    $display_questions = '';
    foreach ($questions as $question) {
        $question->question = trim(stripslashes(str_replace('&#039;', "'", $question->question)));
        $question->question = htmlspecialchars($question->question, ENT_QUOTES, 'UTF-8');
        $question->answer = trim(stripslashes(str_replace('&#039;', "'", $question->answer)));
        $question->answer = htmlspecialchars($question->answer, ENT_QUOTES, 'UTF-8');
        $display_questions .= '<p class="espresso_questions"><strong>' . $question->question . '</strong>:<br /> ' . str_replace(',', '<br />', $question->answer) . '</p>';
    }
    //Get the event information
    $SQL = "SELECT ed.*  FROM " . EVENTS_DETAIL_TABLE . " ed ";
    $SQL .= "JOIN " . EVENTS_ATTENDEE_TABLE . " ea ON ed.id = ea.event_id ";
    $SQL .= "WHERE ea.registration_id=%s";
    $events = $wpdb->get_results($wpdb->prepare($SQL, $registration_id));
    foreach ($events as $event) {
        $event_id = $event->id;
        $event_name = stripslashes_deep($event->event_name);
        $event_desc = stripslashes_deep($event->event_desc);
        $display_desc = $event->display_desc;
        $event_identifier = $event->event_identifier;
        $reg_limit = $event->reg_limit;
        $active = $event->is_active;
        $send_mail = $event->send_mail;
        $conf_mail = $event->conf_mail;
        $email_id = $event->email_id;
        $alt_email = $event->alt_email;
        $start_date = event_date_display($event->start_date);
        $end_date = $event->end_date;
        $virtual_url = $event->virtual_url;
        $virtual_phone = $event->virtual_phone;
        $event_address = $event->address;
        $event_address2 = $event->address2;
        $event_city = $event->city;
        $event_state = $event->state;
        $event_zip = $event->zip;
        $event_country = $event->country;
        $location = ($event_address != '' ? $event_address : '') . ($event_address2 != '' ? '<br />' . $event_address2 : '') . ($event_city != '' ? '<br />' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '<br />' . $event_zip : '') . ($event_country != '' ? '<br />' . $event_country : '');
        $location_phone = $event->phone;
        $require_pre_approval = $event->require_pre_approval;
        $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country));
    }
    //Build links
    $event_url = espresso_reg_url($event_id);
    $event_link = '<a href="' . $event_url . '">' . $event_name . '</a>';
    $SQL = "SELECT * FROM " . EVENTS_ATTENDEE_TABLE;
    if ($registration_id != '') {
        $SQL .= " WHERE registration_id = '" . $registration_id . "' ";
    } elseif ($attendee_id != '') {
        $SQL .= " WHERE id = '" . $attendee_id . "' ";
    } else {
        _e('No ID Supplied', 'event_espresso');
    }
    $SQL .= " AND is_primary = 1 ";
    $SQL .= " ORDER BY id ";
    $SQL .= " LIMIT 0,1 ";
    //Get the first attendees details
    if (!($attendee = $wpdb->get_row($wpdb->prepare($SQL, NULL)))) {
        wp_die(__('An error occured. The primary attendee could not be found.', 'event_espresso'));
    }
    $attendee_id = $attendee->id;
    $attendee_email = isset($attendee->email) ? $attendee->email : '';
    $lname = isset($attendee->lname) ? htmlspecialchars(stripslashes($attendee->lname), ENT_QUOTES, 'UTF-8') : '';
    $fname = isset($attendee->fname) ? htmlspecialchars(stripslashes($attendee->fname), ENT_QUOTES, 'UTF-8') : '';
    $address = isset($attendee->address) ? htmlspecialchars(stripslashes($attendee->address), ENT_QUOTES, 'UTF-8') : '';
    $address2 = isset($attendee->address2) ? htmlspecialchars(stripslashes($attendee->address2), ENT_QUOTES, 'UTF-8') : '';
    $city = isset($attendee->city) ? htmlspecialchars(stripslashes($attendee->city), ENT_QUOTES, 'UTF-8') : '';
    $state = isset($attendee->state) ? htmlspecialchars(stripslashes($attendee->state), ENT_QUOTES, 'UTF-8') : '';
    $country = isset($attendee->country) ? htmlspecialchars(stripslashes($attendee->country), ENT_QUOTES, 'UTF-8') : '';
    $zip = isset($attendee->zip) ? $attendee->zip : '';
    $payment_status = $attendee->payment_status;
    $txn_type = $attendee->txn_type;
    $amount_pd = (double) $attendee->amount_pd;
    $total_cost = (double) $attendee->total_cost;
    $payment_date = $attendee->payment_date;
    $phone = $attendee->phone;
    $event_time = $attendee->event_time;
    $end_time = $attendee->end_time;
    $date = $attendee->date;
    $pre_approve = $attendee->pre_approve;
    $session_id = $attendee->attendee_session;
    if ($attendee->is_primary) {
        $event_cost = $total_cost;
    }
//.........这里部分代码省略.........
开发者ID:HandsomeDogStudio,项目名称:peanutbutterplan,代码行数:101,代码来源:payment_page.php

示例13: espresso_venue_details_sc

 function espresso_venue_details_sc($atts)
 {
     global $wpdb, $this_event_id;
     empty($atts) ? '' : extract($atts);
     //Outside wrapper
     $outside_wrapper_class = isset($outside_wrapper_class) ? 'class="' . $outside_wrapper_class . '"' : 'class="event_venue"';
     $wrapper_start = isset($outside_wrapper) ? '<' . $outside_wrapper . ' ' . $outside_wrapper_class : '<div ' . $outside_wrapper_class;
     $wrapper_end = isset($outside_wrapper) ? '</' . $outside_wrapper . '>' : '</div>';
     //Image class
     $image_class = isset($image_class) ? 'class="' . $image_class . '"' : 'class="venue_image"';
     $image_wrapper_class = isset($image_wrapper_class) ? 'class="' . $image_wrapper_class . '"' : 'class="image_wrapper"';
     $image_wrapper_start = isset($image_wrapper) ? '<' . $image_wrapper . ' ' . $image_wrapper_class : '<p ' . $image_wrapper_class . '>';
     $image_wrapper_end = isset($image_wrapper) ? '</' . $image_wrapper . '>' : '</p>';
     //Venue title
     $title_class = isset($title_class) ? 'class="' . $title_class . '"' : 'class="venue_name"';
     $title_wrapper_start = isset($title_wrapper) ? '<' . $title_wrapper . ' ' . $title_class : '<h3 ' . $title_class;
     $title_wrapper_end = isset($title_wrapper) ? '</' . $title_wrapper . '>' : '</h3>';
     //Inside wrappers
     $inside_wrapper_class = isset($inside_wrapper_class) ? 'class="' . $inside_wrapper_class . '"' : 'class="venue_details"';
     $inside_wrapper_before = isset($inside_wrapper) ? '<' . $inside_wrapper . ' ' . $inside_wrapper_class . '>' : '<p ' . $inside_wrapper_class . '>';
     $inside_wrapper_after = isset($inside_wrapper) ? '</' . $inside_wrapper . '>' : '</p>';
     //Map image class
     $map_image_class = isset($map_image_class) ? 'class="' . $map_image_class . '"' : 'class="venue_map_image"';
     $map_image_wrapper_class = isset($map_image_wrapper_class) ? 'class="' . $map_image_wrapper_class . '">' : 'class="map_image_wrapper">';
     $map_image_wrapper_start = isset($map_image_wrapper) ? '<' . $map_image_wrapper . ' ' . $map_image_wrapper_class : '<p ' . $map_image_wrapper_class;
     $map_image_wrapper_end = isset($map_image_wrapper) ? '</' . $map_image_wrapper . '>' : '</p>';
     //Google Map link text
     $show_google_map_link = isset($show_google_map_link) && $show_google_map_link == 'false' ? false : true;
     $map_link_text = isset($map_link_text) ? $map_link_text : __('Map and Directions', 'event_espresso');
     //Show Google map image?
     $show_map_image = isset($show_map_image) && $show_map_image == 'false' ? false : true;
     //Show title?
     $show_title = isset($show_title) && $show_title == 'false' ? false : true;
     //Show image?
     $show_image = isset($show_image) && $show_image == 'false' ? false : true;
     //Show the description?
     $show_description = isset($show_description) && $show_description == 'false' ? false : true;
     //Show address details?
     $show_address = isset($show_address) && $show_address == 'false' ? false : true;
     //Show additional details
     $show_additional_details = isset($show_additional_details) && $show_additional_details == 'false' ? false : true;
     $FROM = " FROM ";
     $order_by = isset($order_by) && $order_by != '' ? " ORDER BY " . $order_by . " ASC " : " ORDER BY name ASC ";
     $limit = isset($limit) && $limit > 0 ? " LIMIT 0," . $limit . " " : '';
     $using_id = false;
     //Find the event id
     if (isset($id) && $id > 0) {
     } elseif (isset($event_id)) {
         $event_id = $event_id;
         //Check to see if the event is used in the shortcode parameter
         $using_id = true;
     } elseif (isset($this_event_id)) {
         $event_id = $this_event_id;
         //Check to see if the global event id is being used
         $using_id = true;
     } elseif (isset($_REQUEST['event_id'])) {
         $event_id = $_REQUEST['event_id'];
         //If the first two are not being used, then get the event id from the url
         $using_id = true;
     }
     $sql = "SELECT ev.* ";
     if ($using_id == true) {
         $sql .= " {$FROM} " . EVENTS_DETAIL_TABLE . " e ";
         $sql .= " LEFT JOIN " . EVENTS_VENUE_REL_TABLE . " vr ON e.id = vr.event_id ";
         $FROM = " LEFT JOIN ";
     }
     $sql .= " {$FROM} " . EVENTS_VENUE_TABLE . " ev ";
     if ($using_id == true) {
         $sql .= " ON vr.venue_id = ev.id ";
     }
     if (isset($id) && $id > 0) {
         $sql .= " WHERE ev.id = '" . $id . "' ";
     } elseif (isset($event_id) && $event_id > 0) {
         $sql .= " WHERE e.id ='" . $event_id . "' ";
     } else {
         $sql .= " GROUP BY ev.name ";
     }
     if ($using_id == false) {
         $sql .= $order_by;
         $sql .= $limit;
     }
     //echo $sql ;
     $venues = $wpdb->get_results($sql);
     $num_rows = $wpdb->num_rows;
     if ($num_rows > 0) {
         $html = '';
         foreach ($venues as $venue) {
             $venue_id = $venue->id;
             $meta = unserialize($venue->meta);
             //Google map link creation
             $google_map_link = espresso_google_map_link(array('address' => $venue->address, 'city' => $venue->city, 'state' => $venue->state, 'zip' => $venue->zip, 'country' => $venue->country, 'text' => $map_link_text, 'type' => 'text'));
             //Google map image creation
             if ($show_map_image != false) {
                 $map_w = isset($map_w) ? $map_w : 400;
                 $map_h = isset($map_h) ? $map_h : 400;
                 $google_map_image = espresso_google_map_link(array('id' => $venue_id, 'map_image_class' => $map_image_class, 'address' => $venue->address, 'city' => $venue->city, 'state' => $venue->state, 'zip' => $venue->zip, 'country' => $venue->country, 'text' => $map_link_text, 'type' => 'map', 'map_h' => $map_h, 'map_w' => $map_w));
             }
             //Build the venue title
             if ($show_title != false) {
                 $html .= $venue->name != '' ? $title_wrapper_start . '>' . stripslashes_deep($venue->name) . $title_wrapper_end : '';
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:shortcodes.php

示例14: event_espresso_get_event_details


//.........这里部分代码省略.........
         $event_address = $event->address;
         $event_address2 = $event->address2;
         $event_city = $event->city;
         $event_state = $event->state;
         $event_zip = $event->zip;
         $event_country = $event->country;
         $member_only = $event->member_only;
         $externalURL = $event->externalURL;
         $recurrence_id = $event->recurrence_id;
         $display_reg_form = $event->display_reg_form;
         $allow_overflow = $event->allow_overflow;
         $overflow_event_id = $event->overflow_event_id;
         $event_desc = array_shift(explode('<!--more-->', $event_desc));
         global $event_meta;
         $event_meta = unserialize($event->event_meta);
         $event_meta['is_active'] = $event->is_active;
         $event_meta['event_status'] = $event->event_status;
         $event_meta['start_time'] = empty($event->start_time) ? '' : $event->start_time;
         $event_meta['start_date'] = $event->start_date;
         $event_meta['registration_start'] = $event->registration_start;
         $event_meta['registration_startT'] = $event->registration_startT;
         $event_meta['registration_end'] = $event->registration_end;
         $event_meta['registration_endT'] = $event->registration_endT;
         //Venue information
         if ($org_options['use_venue_manager'] == 'Y') {
             $event_address = empty($event->venue_address) ? '' : $event->venue_address;
             $event_address2 = empty($event->venue_address2) ? '' : $event->venue_address2;
             $event_city = empty($event->venue_city) ? '' : $event->venue_city;
             $event_state = empty($event->venue_state) ? '' : $event->venue_state;
             $event_zip = empty($event->venue_zip) ? '' : $event->venue_zip;
             $event_country = empty($event->venue_country) ? '' : $event->venue_country;
             //Leaving these variables intact, just in case people want to use them
             $venue_title = empty($event->venue_name) ? '' : $event->venue_name;
             $venue_address = $event_address;
             $venue_address2 = $event_address2;
             $venue_city = $event_city;
             $venue_state = $event_state;
             $venue_zip = $event_zip;
             $venue_country = $event_country;
             global $venue_meta;
             $add_venue_meta = array('venue_title' => $venue_title, 'venue_address' => $event_address, 'venue_address2' => $event_address2, 'venue_city' => $event_city, 'venue_state' => $event_state, 'venue_country' => $event_country);
             $venue_meta = !empty($event->venue_meta) && !empty($add_venue_meta) ? array_merge(unserialize($event->venue_meta), $add_venue_meta) : '';
             //print_r($venue_meta);
         }
         //Address formatting
         $location = ($event_address != '' ? $event_address : '') . ($event_address2 != '' ? '<br />' . $event_address2 : '') . ($event_city != '' ? '<br />' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '<br />' . $event_zip : '') . ($event_country != '' ? '<br />' . $event_country : '');
         //Google map link creation
         $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country, 'text' => 'Map and Directions', 'type' => 'text'));
         global $all_meta;
         $all_meta = array('event_name' => stripslashes_deep($event_name), 'event_desc' => stripslashes_deep($event_desc), 'event_address' => $event_address, 'event_address2' => $event_address2, 'event_city' => $event_city, 'event_state' => $event_state, 'event_zip' => $event_zip, 'is_active' => $event->is_active, 'event_status' => $event->event_status, 'start_time' => empty($event->start_time) ? '' : $event->start_time, 'registration_startT' => $event->registration_startT, 'registration_start' => $registration_start, 'registration_endT' => $event->registration_endT, 'registration_end' => $registration_end, 'is_active' => empty($is_active) ? '' : $is_active, 'event_country' => $event_country, 'start_date' => event_date_display($start_date, get_option('date_format')), 'end_date' => event_date_display($end_date, get_option('date_format')), 'time' => empty($event->start_time) ? '' : $event->start_time, 'google_map_link' => $google_map_link, 'price' => empty($event->event_cost) ? '' : $event->event_cost, 'event_cost' => empty($event->event_cost) ? '' : $event->event_cost);
         //Debug
         //echo '<p>'.print_r($all_meta).'</p>';
         //These variables can be used with other the espresso_countdown, espresso_countup, and espresso_duration functions and/or any javascript based functions.
         //Warning: May cause additional database queries an should only be used for sites with a small amount of events.
         // $start_timestamp = espresso_event_time($event_id, 'start_timestamp');
         //$end_timestamp = espresso_event_time($event_id, 'end_timestamp');
         //This can be used in place of the registration link if you are using the external URL feature
         $registration_url = $externalURL != '' ? $externalURL : espresso_reg_url($event_id);
         if (!is_user_logged_in() && get_option('events_members_active') == 'true' && $member_only == 'Y') {
             //Display a message if the user is not logged in.
             //_e('Member Only Event. Please ','event_espresso') . event_espresso_user_login_link() . '.';
         } else {
             //Serve up the event list
             //As of version 3.0.17 the event list details have been moved to event_list_display.php
             switch (event_espresso_get_status($event_id)) {
                 case 'NOT_ACTIVE':
                     //Don't show the event if any of the above are true
                     break;
                 default:
                     /* skip secondary (waitlist) events */
                     $event_status = event_espresso_get_is_active($event_id);
                     if ($event_status['status'] == 'SECONDARY') {
                         break;
                     }
                     /* group recurring events */
                     $is_new_event_type = $last_recurrence_id == 0 || $last_recurrence_id != $recurrence_id;
                     if ($is_new_event_type) {
                         $events_type_index++;
                         $events_of_same_type[$events_type_index] = array();
                     }
                     $event_data = array('event_id' => $event_id, 'event_page_id' => $event_page_id, 'event_name' => $event_name, 'event_desc' => $event_desc, 'start_date' => $start_date, 'end_date' => $end_date, 'reg_limit' => $reg_limit, 'registration_url' => $registration_url, 'overflow_event_id' => $overflow_event_id);
                     array_push($events_of_same_type[$events_type_index], $event_data);
                     $last_recurrence_id = $recurrence_id;
                     break;
             }
         }
     }
     /* group recurring events */
     foreach ($events_of_same_type as $events_group) {
         if (empty($path)) {
             include $template_name;
         } else {
             include $path;
         }
     }
     /* end group recurring events */
     //Check to see how many database queries were performed
     //echo '<p>Database Queries: ' . get_num_queries() .'</p>';
     espresso_registration_footer();
 }
开发者ID:hhgr,项目名称:uksoccer,代码行数:101,代码来源:event_list.php

示例15: espresso_pending_registration_approval

function espresso_pending_registration_approval($registration_id)
{
    global $wpdb, $org_options;
    //Get the event information
    $events = $wpdb->get_results("SELECT ed.* FROM " . EVENTS_DETAIL_TABLE . " ed \n\t\t\t\t\tJOIN " . EVENTS_ATTENDEE_TABLE . " ea\n\t\t\t\t\tON ed.id = ea.event_id\n\t\t\t\t\tWHERE ea.registration_id='" . $registration_id . "'");
    foreach ($events as $event) {
        $event_id = $event->id;
        $event_name = stripslashes_deep($event->event_name);
        $event_desc = stripslashes_deep($event->event_desc);
        $display_desc = $event->display_desc;
        $event_identifier = $event->event_identifier;
        $reg_limit = $event->reg_limit;
        $active = $event->is_active;
        $send_mail = $event->send_mail;
        $conf_mail = $event->conf_mail;
        $email_id = $event->email_id;
        $alt_email = $event->alt_email;
        $start_date = event_date_display($event->start_date);
        $end_date = $event->end_date;
        $virtual_url = $event->virtual_url;
        $virtual_phone = $event->virtual_phone;
        $event_address = $event->address;
        $event_address2 = $event->address2;
        $event_city = $event->city;
        $event_state = $event->state;
        $event_zip = $event->zip;
        $event_country = $event->country;
        $location = ($event_address != '' ? $event_address : '') . ($event_address2 != '' ? '<br />' . $event_address2 : '') . ($event_city != '' ? '<br />' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '<br />' . $event_zip : '') . ($event_country != '' ? '<br />' . $event_country : '');
        $location_phone = $event->phone;
        $require_pre_approval = $event->require_pre_approval;
        $google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country));
    }
    //Build links
    $event_url = espresso_reg_url($event_id);
    $event_link = '<a href="' . $event_url . '">' . $event_name . '</a>';
    $sql = "SELECT * FROM " . EVENTS_ATTENDEE_TABLE;
    if ($registration_id != '') {
        $sql .= " WHERE registration_id = '" . $registration_id . "' ";
    } elseif ($attendee_id != '') {
        $sql .= " WHERE id = '" . $attendee_id . "' ";
    } else {
        _e('No ID Supplied', 'event_espresso');
    }
    $sql .= " ORDER BY id ";
    $sql .= " LIMIT 0,1 ";
    //Get the first attendees details
    $attendees = $wpdb->get_results($sql);
    //global $attendee_id;
    foreach ($attendees as $attendee) {
        $attendee_id = $attendee->id;
        $attendee_email = $attendee->email;
        $lname = $attendee->lname;
        $fname = $attendee->fname;
        $address = $attendee->address;
        $address2 = $attendee->address2;
        $city = $attendee->city;
        $state = $attendee->state;
        $zip = $attendee->zip;
        $payment_status = $attendee->payment_status;
        $txn_type = $attendee->txn_type;
        $amount_pd = $attendee->amount_pd;
        $event_cost = $attendee->amount_pd;
        $payment_date = $attendee->payment_date;
        $phone = $attendee->phone;
        $event_time = $attendee->event_time;
        $end_time = $attendee->end_time;
        $date = $attendee->date;
        $pre_approve = $attendee->pre_approve;
    }
    event_espresso_send_attendee_registration_approval_pending($registration_id);
    require_once EVENT_ESPRESSO_PLUGINFULLPATH . "templates/pending_approval.php";
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:72,代码来源:pending_approval_page.php


注:本文中的espresso_google_map_link函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。