|
} else { //$this_sectionid = $fetch['sectionid']; //$this_postdate = $fetch['postdate']; //$this_author = $fetch['author']; ?>
echo "
\n"; echo "
require_once('dbstuff.php'); function displayTOC( $secid ) { global $this_sectionid, $displaylink; if( $this_sectionid != $secid ) return; return $displaylink; } function prepare4Display( $astring ) { // $astring just came from the DB so prep it for html display.. return stripslashes($astring); } // If a section is selected, we need to build the list of links for it.. $view = (int)$view; $display = (int)$display; if( $view || $display ) { // Figure out the section type.. unset($displaylinks); if( $display ) { // set $view to id of latest article of sectionid=$display $UQ = ExecQuery( "SELECT `id` FROM `articles` WHERE `sectionid` = $display ORDER BY `id` DESC LIMIT 1;" ); $fetch = mysql_fetch_array($UQ); $view = (int)($fetch['id']); } // Load all of this articles information.. $UQ = ExecQuery( "SELECT * FROM `articles` WHERE `id` = $view LIMIT 1" ); $fetch = mysql_fetch_array($UQ); $this_id = $view; $this_sectionid = (int)($fetch['sectionid']); $this_title = $fetch['title']; $this_postdate = $fetch['postdate']; $this_author = $fetch['author']; $this_data = $fetch['data']; // Prepare $displaylink $UQ = ExecQuery( "SELECT `id`, `title` FROM `articles` WHERE `sectionid` = $this_sectionid ORDER BY `id` ASC; " ); while( $fetch = mysql_fetch_array($UQ) ) $displaylinks = "