. */ define("MODULE_FAIL", "You cannot access this module directly.
\n",true); if(!defined("MODULE_FILE")) { die(MODULE_FAIL); } global $db; /** * List available pages. * Only right now I don't know if the _pages table has been deprecated. * I'm confused. -jhunk */ if(isset($_GET['list'])) { if($_GET['list'] == "true") { $results = $db->Query("SELECT title, page_id FROM bayonet_articles"); $pages = $db->Fetch($results); OpenContent(); echo "
Page Map
"; echo "
"; echo ""; echo "
"; CloseContent(); /* Kill module execution to prevent odd page results */ return; } } if(!isset($_GET['id'])) { //ReportError("No page has been requested.
\n"); // return 1; $id = 1; //makes it so that the default page is the home page }else{ $id = $_GET['id']; } // {{{ XXX: FIXME -- Needs to be re-written $result = $db->Query("SELECT u.username AS author, p.page_created, p.title, p.text FROM `bayonet_pages` AS p LEFT OUTER JOIN `bayonet_users` AS u ON u.user_id = p.author_id WHERE p.page_id = '$id'"); $proceed = $db->Rows($result); if($proceed > 0) { $pages = $db->Fetch($result); OpenContent(); echo "
"; //$aresult = $db->Query("SELECT * FROM `bayonet_page` WHERE `page_id` = $id ORDER BY `weight` ASC"); //$article = $db->Fetch($aresult); foreach($pages as $page) { echo '

'.$page['title'].'

'; //echo "

".$article['title']."

"; echo bbcode_format($page['text']); echo "
"; } CloseContent(); ?> \n"); } ?>