Needed for the log user-action
$last_id = db_fetch_last_id();
// Log user-project action
db_log_user_project($projectId, "menu:projecten:project_documentatie:add_user_comment", $last_id);
}
$replace_comment_info = array();
$replace_comment_info['document'] = $splitted[0];
// Get user comments
$replace_comments_infos = db_fetch_data_user_comment($replace_comment_info, 1);
// Check if there are comments
if (is_array($replace_comments_infos)) {
$p = 0;
$backgroundcolor_c = 'rgb(240,250,255);';
$border_c = '';
$last_comment_c = sizeof($replace_comments_infos);
// Div where all comments are placed so the can loaded by ajax post
echo "
";
foreach ($replace_comments_infos as $com_c) {
// Set border bottom at last comment
if (($p + 1 >= $last_comment_c) || $last_comment_c == 1) {
$border_c = 'border-bottom :2px solid rgb(0,158,224) !important;';
}
// Check which table to get the 'comment by' name from
if ($com_c['gebruiker_tabel'] == 'gebruiker_profiel') {
$commentBy = getUserProfileName($com_c['gebruiker']);
} else {
$commentBy = getUser($com_c['gebruiker']);
}
$commentBy = strtoupper(checkSizeUsername($commentBy));
echo "";
// to create a unique id for the single_comment
$p++;
// switch the background-color to blue or white
$backgroundcolor_c = ($backgroundcolor_c == 'rgb(240,250,255);') ? 'white;' : 'rgb(240,250,255);';
}
echo "
";
// Set height of the single_comment div because the height of loaded_page is undefined in this file
echo "";
}
}
}
} else {
// No rights or not logged in
DBG("upload file: not logged in or nog rights");
}
" . strtoupper($com_c['tekst']) . "
$commentBy
" . strtoupper($com_c['datum']) . "