Quote '.$qt.'

'.NL; } } } function articleOutline($article_id, $isAdmin=false, $file_nm) { if ($isAdmin) echo "

edit

"; $sql = "SELECT level_id, structure_id, title_nm FROM Article_Structure WHERE article_id = $article_id ORDER BY pos"; if ($result = mysql_query($sql)) { while (list($level_id, $structure_id, $title_nm) = mysql_fetch_row($result)) { if ($level_id > 0) { echo ''.$title_nm.''.NL; structureDetail($structure_id); } else { echo '

'.$title_nm.'

'.NL; } } } } function articleInfo($article_id) { global $pr_user; $sql = 'SELECT a.structured_yn, published_yn, version, revision, a.author_id, a.title_nm, a.file_nm, a.collection_id, ac.collection_nm, length(a.html), update_dt FROM Article a, Article_Collection ac WHERE a.article_id ='.$article_id.' and a.collection_id = ac.collection_id'; list($structured_yn, $published_yn, $version, $revision, $author_id, $title_nm, $file_nm, $collection_id, $collection_nm, $len, $update_dt) = sqlRow($sql); echo ' '.$title_nm.'
'; 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, $totHits, $totBytes, $showAd; list($collection_nm, $short_desc) = sqlRow('SELECT collection_nm, short_desc FROM Article_Collection WHERE collection_id='.$collection_id); echo ' Outline of '.$collection_nm.' '; if ($showAd) echo '
'; 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, hit_cnt 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, $hits) = mysql_fetch_row($result)) { $words = str_word_count(strip_tags($html)); $totWords += $words; $totHits += $hits; 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 '

'.$title_nm.' ('.$words.' words)

'; echo '

Summary: Article Date = '.$article_dt.', Last Update = '.$update_dt.', Hits ='.number_format($hits).' Word Count = '.number_format($words).'

'.NL; } } echo '

Total Hits: '.number_format($totHits).'. 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?'; //} ?>