All comments on " . $comm[arttitle] . "\n"; $once = true; print "

" . $comm[title] . "

\n"; print "
by "; if ($comm[pref] == 'n') { $authnamesql = "select fname, lname, url from n_users where id = " . $comm[user]; $authname = mysql_query($authnamesql, $conn); $authn = mysql_fetch_array($authname); $auth = $authn[fname] . " " . $authn[lname]; $url = $authn[url]; } if ($comm[pref] == 'u') { $authnamesql = "select username, url from n_users where id = " . $comm[user]; $authname = mysql_query($authnamesql, $conn); $authn = mysql_fetch_array($authname); $auth = $authn[username]; $url = $authn[url]; } if ($url) print ""; print $auth; if ($url) print ""; print " at " . date('H:i', $comm[entrytime]) . "[BST] on " . date('d/m/y', $comm[entrytime]) . "
\n"; print "

" . $comm[comment] . "

\n"; }; } else { print "

Latest comments on nthposition

\n"; $newcommssql = "select id from n_comms where status = 'p' order by entrytime desc"; $newcomms = mysql_query($newcommssql, $conn); $i = 0; $commids = array(); while ($newc = mysql_fetch_array($newcomms)) { $commids[] = $newc[id]; $i++; if ($i == 10) break; }; foreach ($commids as $commid) { $dispcommsql = "select n_comms.title, UNIX_TIMESTAMP(n_comms.entrytime) entrytime, n_comms.comment, n_comms.user, n_arts.content, n_arts.title arttitle, n_users.pref, n_arts.id artid from n_comms, n_arts, n_users where n_comms.art = n_arts.id and n_comms.user = n_users.id and n_comms.id = " . $commid . " and n_comms.status = 'p'"; $dispcomm = mysql_query($dispcommsql, $conn); $comm = mysql_fetch_array($dispcomm); print "

" . $comm[title] . "

\n"; print "

a comment on " . $comm[arttitle] . "

\n"; print "
by "; if ($comm[pref] == 'n') { $authnamesql = "select fname, lname, url from n_users where id = " . $comm[user]; $authname = mysql_query($authnamesql, $conn); $authn = mysql_fetch_array($authname); $auth = $authn[fname] . " " . $authn[lname]; $url = $authn[url]; } if ($comm[pref] == 'u') { $authnamesql = "select username, url from n_users where id = " . $comm[user]; $authname = mysql_query($authnamesql, $conn); $authn = mysql_fetch_array($authname); $auth = $authn[username]; $url = $authn[url]; } if ($url) print ""; print $auth; if ($url) print ""; print " at " . date('H:i', $comm[entrytime]) . "[BST] on " . date('d/m/y', $comm[entrytime]) . "
\n"; print "

" . $comm[comment] . "

\n"; }; }; if ($login && $artid) { ?>

Add a comment:

'>

In order to add your own thoughts to this discussion, please register.\n"; }; require('includes/footer.php'); ?>