";
if ($row['visible']=='0') {
$titleclass = 'forum_message_post_title_2_be_approved';
$messageclass = 'forum_message_post_text_2_be_approved';
$leftclass = 'forum_message_left_2_be_approved';
} else {
$titleclass = 'forum_message_post_title';
$messageclass = 'forum_message_post_text';
$leftclass = 'forum_message_left';
}
echo "";
echo "";
echo ' ' . api_convert_and_format_date($row['post_date'], DATE_TIME_FORMAT_LONG) . ' ';
echo " | ";
// The post title
echo "" . prepare4display($row['post_title']) . " | ";
echo "
";
// The post message
echo "";
echo "" . prepare4display($row['post_text']) . " | ";
echo "
";
// The check if there is an attachment
$attachment_list = getAllAttachment($row['post_id']);
if (!empty($attachment_list)) {
foreach ($attachment_list as $attachment) {
echo '';
$realname = $attachment['path'];
$user_filename = $attachment['filename'];
echo Display::return_icon('attachment.gif', get_lang('Attachment'));
echo ' ' . $user_filename . ' ';
echo ' ';
echo ' |
';
}
}
// The post has been displayed => it can be removed from the what's new array
if (isset($whatsnew_post_info)) {
unset($whatsnew_post_info[$currentForum['forum_id']][$current_thread['thread_id']][$row['post_id']]);
unset($whatsnew_post_info[$currentForum['forum_id']][$current_thread['thread_id']]);
}
if (isset($_SESSION['whatsnew_post_info'])) {
unset($_SESSION['whatsnew_post_info'][$currentForum['forum_id']][$current_thread['thread_id']][$row['post_id']]);
unset($_SESSION['whatsnew_post_info'][$currentForum['forum_id']][$current_thread['thread_id']]);
}
echo "
";
$counter++;
}
}
//return Max qualify thread
$max_qualify = showQualify('2', $userid, $threadid);
$current_qualify_thread = showQualify('1', $userid, $threadid);
if (isset($_POST['idtextqualify'])) {
saveThreadScore(
$current_thread,
$userid,
$threadid,
$_POST['idtextqualify'],
api_get_user_id(),
date('Y-m-d H:i:s'),
''
);
}
$result = get_statistical_information(
$current_thread['thread_id'],
$_GET['user_id'],
api_get_course_int_id()
);
/*
if ($userInfo['status']!='1') {
echo '';
require_once 'forumbody.inc.php';
echo '
';
}
*/