0) {
header("Location: http://y-intercept.com/note.html?note_id=$note_id");
} else {
displayHead();
hTable("Quote Detail",2,"50%");
// echo "
| Quote Detail...we will expand this area in the future. |
\n";
if ($bk_ref != "") hPC("BK Reference",$bk_ref);
hPC("Author",$author_nm);
hPC("Life",$life);
hPC("Year",$year);
hPC("Work",$work_nm);
if ($url != "") hPC("Web Site","$url");
hPC("Quote",$quote);
hPC("Notes",$txt);
echo "";
if (checkRole(3)) echo "Edit
";
$sql = "SELECT r.article_id, c.collection_nm, a.title_nm, a.file_nm, c.collection_nm
FROM Article_Resource r, Article a, Article_Collection c
WHERE r.reference_id = $quote_id
and r.article_id = a.article_id
and a.collection_id = c.collection_id";
$cnt = 0;
if ($result=mysql_query($sql)) {
while (list($article_id, $collection_nm, $title_nm, $file_nm) = mysql_fetch_row($result)) {
if ($cnt++ == 0) {
hTable("Article References",2);
echo "| Collection | Article |
";
}
hRowColor();
hTD($collection_nm);
$href = ($file_nm == "")? "page.html?a=".$article_id : $file_nm;
hTD("$title_nm");
echo "";
}
}
if ($cnt > 0) echo "\n";
echo "List Quotes
";
displayFoot();
}
}
function listQuotes() {
global $isAdmin;
$sql = ($isAdmin)? "SELECT author_nm, life, year, concat('view, edit') Action FROM Quote ORDER BY life "
: "SELECT author_nm, life, year, concat('view') Action FROM Quote ORDER BY life LIMIT 100";
displayHead();
sqlTable("List Quotes","",$sql);
displayFoot();
}
if ($quote_id == "") $quote_id = $q;
if ($quote_id > 0) viewQuote($q); else listQuotes();
?>