Rev 45 | Rev 50 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
<div class="menu">
<div class="boxtitle">
Menu
</div>
<?php
if ( isset( $_SESSION['user'] ) && $_SESSION['user']->name() ) {
include_once("DBMenu.class.php");
$menu = new DBMenu( $dbConnection, '_menu', '_menu_id' );
$additionalMenus = array(
array(
'caption' => 'User: ' . $_SESSION['user']->name(),
'url' => "/index.php?doAdmin=1",
'shortname' => 'user'
),
array(
'caption' => 'Log Out',
'url' => "/index.php?logout=1",
'shortname' => 'logout'
)
);
if ( $_SESSION['user']->isAdmin() ) {
$additionalMenus[] = array(
'caption' => 'Administration',
'url' => "/index.php?action=admin",
'shortname' => 'admin'
);
}
print $menu->DBMenu2String( $baseURL, $additionalMenus );
//print "<pre>\n" . print_r( $menu, true ) . "</pre>"; die;
}
?>
</div>