.
*/
/**
* Note to anyone feeling the need to edit this file...
* You MUST declare $db as global inside your functions in order access MySQL from here.
*/
function ListArticles($pageid){
global $db;
$result = $db->Query("SELECT article_id,title FROM bayonet_articles WHERE `page_id` = $pageid ORDER BY `weight`");
$articles = $db->Fetch($result);
echo "
";
}
function EditArticle($article_id){
global $db;
//Grab the page from the database according to the $article_id passed to the function.
// {{{ XXX: FIXME -- Needs to be re-written
/*
$result = $db->Query("SELECT title,text FROM bayonet_articles WHERE article_id = '$article_id'");
while(($row = $db->Fetch($result))!=false)
{
//We only want one row, so we don't have to $article[]... No foreach necessary.
$article = $row;
}
*/
// }}}
?>
Query("SELECT page_id,title FROM bayonet_pages");
echo 'Select page: