setModulesDir(MDLBS);
$main_menu = $module->generateModuleMenu($dbs);
$current_module = '';
// get module from URL
if (isset($_GET['mod']) AND !empty($_GET['mod'])) {
$current_module = trim($_GET['mod']);
}
// read privileges
$can_read = utility::havePrivilege($current_module, 'r');
// submenu
$sub_menu = $module->generateSubMenu(($current_module AND $can_read)?$current_module:'');
// start the output buffering for main content
ob_start();
// info
$info = __('You are currently logged in as').' '.$_SESSION['realname'].''; //mfc
// get default current module menu
$firstMenu = $module->getFirstMenu($current_module);
if ($current_module AND $can_read) {
if (!isset($firstMenu[1]))
{
// set unprivileged module warning
$module->unprivileged();
}
else
{
# ADV LOG SYSTEM - STIIL EXPERIMENTAL
$log = new AlLibrarian('1101', array("username" => $_SESSION['uname'], "uid" => $_SESSION['uid'], "realname" => $_SESSION['realname'], "module" => $current_module));
// get content of module default content with AJAX
$defaultUrl = $firstMenu[1];
$sysconf['page_footer'] .= "\n"
.'';
}
} else {
include 'default/home.php';
// for debugs purpose only
// include 'modules/bibliography/index.php';
}
// page content
$main_content = ob_get_clean();
utility::loadUserTemplate($dbs,$_SESSION['uid']);
// print out the template
require $sysconf['admin_template']['dir'].'/'.$sysconf['admin_template']['theme'].'/index_template.inc.php';