';
if ($structured_yn == 'Y') {
hTable("Article Outline");
hPC("Article Name",$title_nm);
hPC("Type","Structured");
hPC("Published",$published_yn);
hPC("Version",$version.".".$revision);
hPC("Collection","
$collection_nm");
echo "\n
";
articleOutline($article_id,($author_id==$pr_user),$file_nm);
} else {
hTable("Article Outline");
hPC("Article Name",$title_nm);
hPC("Type","Normal");
hPC("Version",$version.".".$revision);
hPC("Collection","
$collection_nm");
echo "\n
";
}
echo "
";
}
function collectionOutline($collection_id) {
global $pr_user, $totWords, $totBytes, $showAd;
list($collection_nm, $short_desc) = sqlRow('SELECT collection_nm, short_desc
FROM Article_Collection WHERE collection_id='.$collection_id);
echo '
'.$collection_nm.'
';
echo '
This is an outmatically generated outline of the work '.$collection_nm.'.
';
$sql = "SELECT article_id, title_nm, structured_yn, author_id, file_nm, html, article_dt, update_dt FROM Article WHERE collection_id=$collection_id ORDER BY cpos, article_id";
if ($result = mysql_query($sql)) {
while (list($article_id, $title_nm, $structured_yn, $user_id, $file_nm, $html, $article_dt, $update_dt) = mysql_fetch_row($result)) {
$words = str_word_count(strip_tags($html));
$totWords += $words;
echo '
'.NL;
if ($file_nm == '') $file_nm = 'page.html?a='.$article_id;
if ($structured_yn=='Y') articleOutline($article_id, ($pr_user==$user_id), $file_nm); else echo '
';
echo '
Summary: Article Date: '.$article_dt.', Last Update: '.$update_dt.', Word Count: '.number_format($words).'
'.NL;
}
}
echo '
Total Word Count: '.number_format($totWords,0).'
';
echo '
';
}
if ($collection_id > 0) {
collectionOutline($collection_id);
} elseif ($a > 0) {
articleInfo($a);
} else {
echo 'And what am I supposed to do with this?';
}
?>