';
if ($topic['send_date']!=$topic['update_date']) {
if (!empty($topic['update_date']) && $topic['update_date'] != '0000-00-00 00:00:00' ) {
$html .= '
';
$html .= '
';
$html.= '
';
$html.= '
';
$html.= '
';
$image_path = UserManager::get_user_picture_path_by_id($topic['user_sender_id'], 'web', false, true); $image_repository = $image_path['dir'];
$existing_image = $image_path['file'];
$html.= '
';
$html.= '
'.$topic['content'].'
';
$html.= '
'.(!empty($files_attachments)?implode(' | ',$files_attachments):'').'
';
$html.= '
';
// items
if (is_array($topic['items'])) {
$items_page_nr = intval($_GET['items_'.$topic['id'].'_page_nr']);
$array_html_items = array();
foreach ($topic['items'] as $item) {
$html_items = '';
$user_sender_info = UserManager::get_user_info_by_id($item['user_sender_id']);
$files_attachments = self::get_links_message_attachment_files($item['id']);
$name = api_get_person_name($user_sender_info['firstname'], $user_sender_info['lastname']);
$html_items.= '
';
//$html_items.= '
'.Security::remove_XSS($item['title']).'
';
$image_path = UserManager::get_user_picture_path_by_id($item['user_sender_id'], 'web', false, true);
$image_repository = $image_path['dir'];
$existing_image = $image_path['file'];
$html_items.= '
';
$html_items.= '
'.$item['content'].'
';
if ($item['send_date'] != $item['update_date']) {
if (!empty($item['update_date']) && $item['update_date'] != '0000-00-00 00:00:00' ) {
$html_items .= '
'.get_lang('LastUpdate').' '.date_to_str_ago($item['update_date']).'
';
}
} else {
$html_items .= '
'.get_lang('Created').' '.date_to_str_ago($item['send_date']).'
';
}
$html_items.= '
'.(!empty($files_attachments)?implode(' | ',$files_attachments):'').'
';
$array_html_items[] = array($html_items);
}
// grids for items with paginations
$html .= Display::return_sortable_grid('items_'.$topic['id'], array(), $array_html_items, array('hide_navigation'=>false, 'per_page' => $items_per_page), $query_vars, false, array(true, true, true,false), false);
}
$html .= '