' . oc_('All Threads') . ' » '; printHeader($hdr, $access); // Display paper info print '
';
if (!empty($paperLink)) {
print '' . safeHTMLstr($_REQUEST['thread']) . '. ' . safeHTMLstr($paper['title']) . '' . (empty($paper['type']) ? '' : '
(' . safeHTMLstr($paper['type']) . ')');
} else {
print safeHTMLstr($_REQUEST['thread']) . '. ' . safeHTMLstr($paper['title']) . (empty($paper['type']) ? '' : '
(' . safeHTMLstr($paper['type']) . ')');
}
print '
' . oc_('No comments have been posted yet.') . '
'; } else { print ' '; // Update lastread - Yes, INSERT ON DUPLICATE KEY UPDATE would have been nice $q = "DELETE FROM `" . OCC_TABLE_MODULE_OC_DISCUSSION_READ . "` WHERE `accountid`='" . safeSQLstr($uid) . "' AND `paperid`='" . safeSQLstr($_REQUEST['thread']) . "'"; $r = ocsql_query($q) or err('Unable to update last read post'); $q = "INSERT INTO `" . OCC_TABLE_MODULE_OC_DISCUSSION_READ . "` SET `lastread`='" . safeSQLstr($lastpost) . "', `accountid`='" . safeSQLstr($uid) . "', `paperid`='" . safeSQLstr($_REQUEST['thread']) . "'"; $r = ocsql_query($q) or err('Unable to update last read post (2)'); } // Display post entry box print '