friendica/include/event.php

44 lines
1 KiB
PHP
Raw Normal View History

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