get_row("SELECT id FROM " . EVENTS_DETAIL_TABLE . " WHERE event_identifier = '" . $single_event_id . "'", ARRAY_A ); /* foreach ($results as $result){ $event_id = $result->id; } */ $wpdb->get_results($sql); $event_id = $wpdb->last_result[0]->id; }//End get the id of a single event //Build event queries $sql = "SELECT * FROM " . EVENTS_DETAIL_TABLE; $sql.= " WHERE is_active='Y' "; $sql.= " AND event_status != 'D' "; $sql.= " AND id = '" . $event_id . "' LIMIT 0,1"; //Support for diarise if (!empty($_REQUEST['post_event_id'])) { $sql = "SELECT * FROM " . EVENTS_DETAIL_TABLE; $sql .= " WHERE post_id = '" . $_REQUEST['post_event_id'] . "' "; $sql .= " LIMIT 0,1"; } //Build the registration page if ($wpdb->get_results($sql)) { $events = $wpdb->get_results($sql); //These are the variables that can be used throughout the regsitration page 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; $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) ? 0 : $event->event_cost; $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 != '' ? '
' . $event_address2 : '') . ($event_city != '' ? '
' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '
' . $event_zip : '') . ($event_country != '' ? '
' . $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); //This function gets the status of the event. $is_active = array(); $is_active = event_espresso_get_status($event_id); //If the coupon code system is intalled then use it if (function_exists('event_espresso_coupon_registration_page')) { $use_coupon_code = $event->use_coupon_code; } //If the groupon code addon is installed, then use it if (function_exists('event_espresso_groupon_payment_page')) { $use_groupon_code = $event->use_groupon_code; } //Set a default value for additional limit if ($additional_limit == '') { $additional_limit = '5'; } $event_meta = unserialize($event->event_meta); $add_attendee_question_groups = $event_meta['add_attendee_question_groups']; }//End foreach ($events as $event) if ($org_options['use_captcha'] == 'Y' && $_REQUEST['edit_details'] != 'true') { ?> = $number_available_spaces) { //(Shows the regsitration form if enough spaces exist) if ($num_attendees >= $reg_limit) { ?>

= $reg_limit) && ($allow_overflow == 'Y' && $overflow_event_id != 0)) { ?>

'; } }//End if ($num_attendees >= $reg_limit) (Shows the regsitration form if enough spaces exist) }//End ($available_spaces == "Unlimited" || $available_spaces >= $number_available_spaces) }//End Build the registration page else {//If there are no results from the query, display this message _e('

This event has expired or is no longer available.

', 'event_espresso'); } //Check to see how many database queries were performed //echo '

Database Queries: ' . get_num_queries() .'

'; } }