<?
include "../common.php";
include "adminfunctions.php";
eval($auth_head);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>AO Admin</title>
</head>
<?
echo "<body>\n";
$query  = "SELECT id,title FROM journals";
$result = $db->sql_query($query);
while( $row = $db->sql_fetchrow($result) ){
   $journals[$row[0]] = $row[1];
}
$query  = "SELECT contrib_num,authors,journal_id,pub_title,title FROM papers WHERE
           status<>'Published' AND contact_email IS NULL ORDER BY authors,title";
//echo $query;
$result = $db->sql_query($query);
echo "<table border=\"1\">\n<tr>\n";
echo "   <td><b>#</b></td>\n";
echo "   <td><b>Authors</b></td>\n";
echo "   <td><b>Title</b></td>\n";
echo "   <td><b>Journal</b></td>\n";
echo "   <td><b>Publication Title</b></td>\n</tr>\n";
while( $row = $db->sql_fetchrow($result) ){
   echo "<tr>\n";
   echo "   <td>" . $row['contrib_num'] . "</td>\n";
   echo "   <td>" . $row['authors'] . "</td>\n";
   echo "   <td>" . $row['title'] . "</td>\n";
   echo "   <td>" . $journals[$row['journal_id']] . "</td>\n";
   echo "   <td>" . $row['pub_title'] . "</td>\n";
   echo "</tr>\n";
}
echo "</table>\n";  
?>
</body>
</html>
