2011-05-28 04:01:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
function format_event_html($ev) {
|
|
|
|
|
2011-06-07 03:17:36 +00:00
|
|
|
require_once('include/bbcode.php');
|
|
|
|
|
2011-05-28 04:01:30 +00:00
|
|
|
if(! ((is_array($ev)) && count($ev)))
|
|
|
|
return '';
|
|
|
|
|
|
|
|
$o = '<div class="vevent">';
|
|
|
|
|
2011-06-07 03:17:36 +00:00
|
|
|
$o .= '<p class="description">' . bbcode($ev['desc']) . '</p>';
|
2011-05-28 04:01:30 +00:00
|
|
|
|
|
|
|
$o .= '<p>' . t('Starts: ') . '<abbr class="dtstart" title="'
|
|
|
|
. datetime_convert('UTC','UTC',$ev['start'], ATOM_TIME)
|
|
|
|
. '" >'
|
2011-06-07 05:27:38 +00:00
|
|
|
. (($ev['adjust']) ? datetime_convert('UTC', date_default_timezone_get(),
|
|
|
|
$ev['start'] /*, format */ )
|
|
|
|
: datetime_convert('UTC', 'UTC',
|
|
|
|
$ev['start'] /*, format */ ))
|
2011-05-28 04:01:30 +00:00
|
|
|
. '</abbr></p>';
|
|
|
|
|
|
|
|
$o .= '<p>' . t('Ends: ') . '<abbr class="dtend" title="'
|
|
|
|
. datetime_convert('UTC','UTC',$ev['finish'], ATOM_TIME)
|
|
|
|
. '" >'
|
2011-06-07 05:27:38 +00:00
|
|
|
. (($ev['adjust']) ? datetime_convert('UTC', date_default_timezone_get(),
|
|
|
|
$ev['finish'] /*, format */ )
|
|
|
|
: datetime_convert('UTC', 'UTC',
|
|
|
|
$ev['finish'] /*, format */ ))
|
2011-05-28 04:01:30 +00:00
|
|
|
. '</abbr></p>';
|
|
|
|
|
|
|
|
$o .= '<p> ' . t('Location:') . '<span class="location">'
|
2011-06-07 03:17:36 +00:00
|
|
|
. bbcode($ev['location'])
|
2011-05-28 04:01:30 +00:00
|
|
|
. '</span></p>';
|
|
|
|
|
|
|
|
$o .= '</div>';
|
|
|
|
|
|
|
|
return $o;
|
2011-06-06 06:10:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|