MATURE Wiki

require_once("c:/web/lib/mediawiki/WikiParser.php");
error_reporting(0);

if (strlen($_GET['article']) > 0)
{
$q = 'SELECT old_text FROM (mediawiki.page INNER JOIN mediawiki.revision ON mediawiki.page.page_latest=mediawiki.revision.rev_id) INNER JOIN mediawiki.text ON mediawiki.text.old_id=mediawiki.revision.rev_text_id where mediawiki.page.page_id IN (SELECT cl_from FROM mediawiki.categorylinks WHERE cl_to="Public") AND page_title="' . $_GET['article']. '"';

$result = db_query($q);

while ($row=db_fetch_array($result))
{
$parser = &new WikiParser();
$parser->reference_wiki = 'http://mature-ip.eu/wiki?article=';
$output = $parser->parse($row['old_text'],$_GET['article']);
// $output = $parser->test();
print $output;
}
}
else
{
print "

The MATURE consortium maintains a wiki based on the Semantic MediaWiki technology. Currently, the wiki is internal, but allows for promoting articles to the MATURE web site. Here is the list of articles that are currently accessible.

";

$q = "SELECT page_title FROM mediawiki.page INNER JOIN mediawiki.categorylinks ON mediawiki.page.page_id=mediawiki.categorylinks.cl_from where cl_to='Public'";

$result = db_query($q);

if ($result)
{
print "

";
}
else
{
print "Not successful: " . $q;
print "" . db_error() ."";
}
}
?>