<?php
/*************************************************************************/
/* DOCEBO CMS - Content Management System                                */
/* ============================================                          */
/*                                                                       */
/* Copyright (c) 2006 by Giovanni Derks <virtualdarkness[AT]gmail-com>   */
/* http://www.docebocms.org                                              */
/*                                                                       */
/* This program is free software. You can redistribute it and/or modify  */
/* it under the terms of the GNU General Public License as published by  */
/* the Free Software Foundation; either version 2 of the License.        */
/*************************************************************************/

// ---------------------------------------------------------------------------
if (!defined("IN_DOCEBO")) die ("You can't access this file directly...");
// ---------------------------------------------------------------------------

$css=getModuleCss($GLOBALS["pb"]);
$GLOBALS["page"]->add("<div class=\"".$css."\">\n", "content");
$GLOBALS["page"]->add(getModuleBlockTitle($GLOBALS["pb"]), "content");

$backurl="index.php?special=changearea&amp;newArea=".$GLOBALS["area_id"];


$opt=loadBlockOption($GLOBALS["pb"]);
$wiki_id=(int)$opt["wiki_id"];


$op=importVar("op");
if (empty($op))
	$op="show";
switch ($op) {

	case "show": {
		wikiMain($wiki_id);
	} break;

	case "edit": {
		editWikiPage($wiki_id);
	} break;

	case "map": {
		wikiMap($wiki_id);
	} break;

	case "history": {
		wikiPageHistory($wiki_id);
	} break;

	case "search": {
		wikiSearch($wiki_id);
	} break;

}


$GLOBALS["page"]->add("</div>\n", "content");


?>