";
$rev_result = $conn->exec("SELECT rev_id, version, pub_date, initials, notes FROM document_rev WHERE doc_id=$doc_id ORDER BY pub_date, version");
die $conn->errorMessage unless PGRES_TUPLES_OK eq $rev_result->resultStatus;
print "
";
$authors_result = $conn->exec("SELECT maintainer.maintainer_id, role, active, document_maintainer.email, maintainer.email as author_email, maintainer_name FROM document_maintainer, maintainer WHERE doc_id = $doc_id and document_maintainer.maintainer_id = maintainer.maintainer_id ORDER BY active desc, maintainer_name");
die $conn->errorMessage unless PGRES_TUPLES_OK eq $authors_result->resultStatus;
print "
\n";
print " Note: Deleting a record here doesn't delete the maintainer. It only deletes the association between the maintainer and this document.\n";
print "";
print "
Topic Assignments
\n";
@topics;
@topic_names;
$topic_count = 0;
$topic_result = $conn->exec("SELECT topic.topic_num, subtopic.subtopic_num, topic.topic_name, subtopic.subtopic_name FROM topic, subtopic WHERE subtopic.topic_num = topic.topic_num ORDER BY topic_num, subtopic_num");
die $conn->errorMessage unless PGRES_TUPLES_OK eq $topic_result->resultStatus;
while (@row = $topic_result->fetchrow) {
$topic_count++;
$topics[$topic_count] = $row[0] . "." . $row[1];
$topic_names[$topic_count] = $row[2] . ": " . $row[3];
# print "
\n";
$document_topic_result = $conn->exec("SELECT topic.topic_num, topic.topic_name, subtopic.subtopic_num, subtopic.subtopic_name FROM document_topic, subtopic, topic WHERE document_topic.topic_num = subtopic.topic_num and document_topic.subtopic_num = subtopic.subtopic_num AND subtopic.topic_num = topic.topic_num AND doc_id=$doc_id ORDER BY topic_num, subtopic_num");
die $conn->errorMessage unless PGRES_TUPLES_OK eq $document_topic_result->resultStatus;
while (@row = $document_topic_result->fetchrow) {
$topic_num = $row[0];
$topic_name = $row[1];
$subtopic_num = $row[2];
$subtopic_name = $row[3];
print "
\n";
print "\n";
print "
\n";
}
print "
";
print "\n";
print "
\n";
print "";
print "
Audience Assignments
\n";
print "
under construction. move along...";
#print "
\n";
#print "
Audience
Description
\n";
#$audience_result = $conn->exec("SELECT audience, audience_level, audience_description FROM document_audience, audience WHERE document_audience.doc_id = $doc_id AND document_audience.audience = audience.audience ORDER BY audience_level");
#die $conn->errorMessage unless PGRES_TUPLES_OK eq $audience_result->resultStatus;
#while (@row = $Audience_result->fetchrow) {
# $audience = $row[0];
# $audience_level = $row[1];
# $audience_description = $row[2];
# print "
\n";
# print "\n";
# print "
\n";
#}
#print "
";
#print "\n";
#print "
\n";
print "";
print "
Editors
";
$authors_result = $conn->exec("SELECT editor.editor_id, editor_role, active, editor.email, editor.editor_name FROM document_editor, editor WHERE doc_id = $doc_id and document_editor.editor_id = editor.editor_id ORDER BY active desc, editor_name");
die $conn->errorMessage unless PGRES_TUPLES_OK eq $authors_result->resultStatus;
print "
\n";
print " Note: Deleting a record here doesn't delete the editor. It only deletes the association between the editor and this document.\n";
print "";
print "
Rating
\n";
print "
\n";
for ( $i = 1; $i <= 10; $i++ ) {
print "
\n";
}
print "
\n";
print "
You can rate each document on a scale from 1 to 10, where 1 is very poor and 10 is excellent.\n";
print "Your vote is averaged with the votes of others to obtain a rating for the document.\n";
print "
";
print "";
$notes_result = $conn->exec("SELECT date_entered, notes, username FROM notes WHERE doc_id = $doc_id ORDER BY date_entered");
die $conn->errorMessage unless PGRES_TUPLES_OK eq $notes_result->resultStatus;
print "
Notes
\n";
print "";
print "";
print "
Author Notes
\n";
print "
\n";
print "
Date and Time
User
Maintainer
Note
";
if ( $maintainer_list ) {
$sql = "SELECT date_entered, notes, username, maintainer_name FROM maintainer_notes, maintainer WHERE maintainer.maintainer_id = maintainer_notes.maintainer_id AND $maintainer_list ORDER BY date_entered";
$notes_result = $conn->exec($sql);
die $conn->errorMessage unless PGRES_TUPLES_OK eq $notes_result->resultStatus;
while (@row = $notes_result->fetchrow) {
$date_entered = $row[0];
$notes = $row[1];
$notes =~ s/</;
$notes =~ s/>/>/;
$username = $row[2];
$maintainer_name = $row[3];
print "