query_event($_POST['id']); $event->start_date = ajax_event_calendar::date_convert($event->start, AEC_DB_DATETIME_FORMAT, AEC_WP_DATE_FORMAT); $event->start_time = ajax_event_calendar::date_convert($event->start, AEC_DB_DATETIME_FORMAT, AEC_WP_TIME_FORMAT); $event->end_date = ajax_event_calendar::date_convert($event->end, AEC_DB_DATETIME_FORMAT, AEC_WP_DATE_FORMAT); $event->end_time = ajax_event_calendar::date_convert($event->end, AEC_DB_DATETIME_FORMAT, AEC_WP_TIME_FORMAT); $out = '
{$description}
\n"; if (!empty($event->venue) || !empty($event->address) || !empty($event->city) || !empty($event->state) || !empty($event->zip) ) { $city = (!empty($event->city)) ? $event->city : ''; $state = (!empty($event->state)) ? $event->state : ''; $zip = (!empty($event->zip)) ? $event->zip : ''; $csz = ($options['addy_format']) ? "{$zip} {$city}" : "{$city} {$state}, {$zip}"; $out .= '{$event->venue}\n";
$out .= (!empty($event->address)) ? "
{$event->address}
{$csz}
{$contact} {$cntinfo}
\n"; } if ($event->access || $event->rsvp) { if ($event->access) $out .= '' . __('This event is accessible to people with disabilities.', AEC_PLUGIN_NAME) . '
'; if ($event->rsvp) $out .= '' . __('Please register with the contact person for this event.' , AEC_PLUGIN_NAME) . '
'; } $org = get_userdata($event->user_id); if (!empty($org->organization)) { $organization = stripslashes($org->organization); $out .= '' . __('Presented by', AEC_PLUGIN_NAME) . ' '; if (!empty($org->user_url)) { $out .= "{$organization}"; } else { $out .= $organization; } $out .= "
\n"; } if (!empty($event->link)) { $link = ""; $link .= __('Event Link', AEC_PLUGIN_NAME); $link .= "\n"; // make links open in a new window if ($options['popup_links']) popuplinks($link); $out .= $link; } $categories = $this->query_categories(); foreach ($categories as $category) { if ($event->category_id == $category->id) { $cat = $category->category; break; } } if ($event->allDay) { $event->start = $event->start_date; $event->end = $event->end_date; } $output = array( 'title' => "{$event->title} ({$cat})", 'content' => $out, 'start' => date('m/d/Y H:i:00', strtotime($event->start)), // used by javascript duration calculation 'end' => date('m/d/Y H:i:00', strtotime($event->end)), // used by javascript duration calculation 'allDay' => $event->allDay // used by javascript duration calculation ); $this->render_json($output); ?>