" . $a[fname] . " " . $a[lname] . "\n"; if ($a[description]) print "

" . $a[description] . "

\n"; $authartssql = "select n_arts.id from n_arts, n_aa where n_aa.auth = " . $_GET[authid] . " and n_aa.art = n_arts.id and n_arts.status = 'p' order by entrytime desc"; $autharts = mysql_query($authartssql, $conn); unset($ids); $ids = array(); while ($id = mysql_fetch_array($autharts)) { if (!in_array($id[0], $ids)) $ids[] = $id[0]; }; if (!$ids[0]) { print "

This author has no published articles.

\n"; } else { disparts($conn, $ids, true, true); }; } else { $authssql = "select id from n_auths where id > 1 order by lname"; $auths = mysql_query($authssql, $conn); $ids = array(); while ($authid = mysql_fetch_array($auths)) { if (!in_array($authid[0], $ids)) $ids[] = $authid[0]; }; $page = id_page($ids, $offset); $total = count($ids); offsetctrl($offset, $total, 'author.php'); foreach ($page as $authid) { $authinfosql = "select id, lname, fname, description from n_auths where id = " . $authid . " order by lname"; $authinfo = mysql_query($authinfosql, $conn); $auth = mysql_fetch_array($authinfo); print "

" . $auth[lname] . ", " . $auth[fname] . "

\n"; if ($auth[description]) print "

" . $auth[description] . "

\n"; }; }; ?>