2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * The navigation panel - displays server, db and table selection tree
6 * @package PhpMyAdmin-Navigation
9 // Include common functionalities
10 require_once './libraries/common.inc.php';
12 // Also initialises the collapsible tree class
13 require_once './libraries/navigation/Navigation.class.php';
15 $response = PMA_Response
::getInstance();
16 $navigation = new PMA_Navigation();
17 if (! $response->isAjax()) {
20 __('Fatal error: The navigation can only be accessed via AJAX')
26 $cfgRelation = PMA_getRelationsParam();
27 if (isset($cfgRelation['navwork']) && $cfgRelation['navwork']) {
28 if (isset($_REQUEST['hideNavItem'])) {
29 if (! empty($_REQUEST['itemName'])
30 && ! empty($_REQUEST['itemType'])
31 && ! empty($_REQUEST['dbName'])
33 $navigation->hideNavigationItem(
34 $_REQUEST['itemName'],
35 $_REQUEST['itemType'],
37 (! empty($_REQUEST['tableName']) ?
$_REQUEST['tableName'] : null)
43 if (isset($_REQUEST['unhideNavItem'])) {
44 if (! empty($_REQUEST['itemName'])
45 && ! empty($_REQUEST['itemType'])
46 && ! empty($_REQUEST['dbName'])
48 $navigation->unhideNavigationItem(
49 $_REQUEST['itemName'],
50 $_REQUEST['itemType'],
52 (! empty($_REQUEST['tableName']) ?
$_REQUEST['tableName'] : null)
58 if (isset($_REQUEST['showUnhideDialog'])) {
59 if (! empty($_REQUEST['dbName'])) {
62 $navigation->getItemUnhideDialog($_REQUEST['dbName'])
70 $response->addJSON('message', $navigation->getDisplay());