Wide-spread improvements to navigation tabs.
authorjollytoad <jollytoad>
Tue, 13 Jul 2004 15:24:40 +0000 (15:24 +0000)
committerjollytoad <jollytoad>
Tue, 13 Jul 2004 15:24:40 +0000 (15:24 +0000)
31 files changed:
aggregates.php
all_db.php
browser.php
casts.php
classes/Misc.php
constraints.php
conversions.php
database.php
dataimport.php
domains.php
functions.php
groups.php
indexes.php
info.php
languages.php
links.js
opclasses.php
operators.php
privileges.php
redirect.php [new file with mode: 0644]
rules.php
sequences.php
sql.php
sqledit.php
tables.php
tblproperties.php
triggers.php
types.php
users.php
viewproperties.php
views.php

index 432452378a8866b72928e98cf3d9a984b012431e..b7257d119b58c2f2ae5b416932001144f13a63b4 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage aggregates in a database
         *
-        * $Id: aggregates.php,v 1.5 2004/07/07 02:59:56 chriskl Exp $
+        * $Id: aggregates.php,v 1.6 2004/07/13 15:24:40 jollytoad Exp $
         */
 
        // Include application functions
@@ -51,6 +51,7 @@
 
        $misc->printHeader($lang['straggregates']);
        $misc->printBody();
+       $misc->printNav('schema', 'aggregates');
 
        switch ($action) {
                default:
index 273c1d8670f6e4bd45d57c645b1ae42e5579a775..c2ee0d79d6e8f020279fb01175bfd6fc29129cb5 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage databases within a server
         *
-        * $Id: all_db.php,v 1.29 2004/07/10 08:57:56 chriskl Exp $
+        * $Id: all_db.php,v 1.30 2004/07/13 15:24:40 jollytoad Exp $
         */
 
        // Include application functions
@@ -20,7 +20,7 @@
                global $data, $misc;
                global $PHP_SELF, $lang, $_reload_drop_database;
 
-               if ($confirm) { 
+               if ($confirm) {
                        $misc->printTitle(array($lang['strdatabases'], $misc->printVal($_REQUEST['db']), $lang['strdrop']), 'drop_database');
                        echo "<p>", sprintf($lang['strconfdropdatabase'], $misc->printVal($_REQUEST['db'])), "</p>\n";  
                        echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
 
        $misc->printHeader($lang['strdatabases']);
        $misc->printBody();
+       $misc->printNav('server','databases');
 
        switch ($action) {
                case 'save_create':
index 3dc2fad1c4efab0279508ba19dc60a22d8ceed8b..7060c753cb70766818b707a7dba534d41fe5f218 100644 (file)
@@ -5,7 +5,7 @@
         * if you click on a database it shows a list of database objects in that
         * database.
         *
-        * $Id: browser.php,v 1.39 2004/07/07 02:59:56 chriskl Exp $
+        * $Id: browser.php,v 1.40 2004/07/13 15:24:40 jollytoad Exp $
         */
 
        // Include application functions
@@ -22,7 +22,7 @@
        $menu  = new HTML_TreeMenu(null, array('usePersistence' => false));
        $root = new HTML_TreeNode(array(
                                                'text' => $misc->printVal(($conf['servers'][$_SESSION['webdbServerID']]['desc'])), 
-                                               'link' => addslashes('all_db.php?' . SID), 
+                                               'link' => addslashes('redirect.php?section=server&amp;' . SID), 
                                                'icon' => 'folder.gif', 
                                                'expandedIcon' => 'folder-expanded.gif',
                                                'expanded' => true,
@@ -34,7 +34,7 @@
        /**
         * Helper function for adding nodes
         * @param $schemanode Node onto which to add
-        */     
+        */
        function addNodes(&$schemanode, $querystr) {
                global $data, $misc, $lang, $conf;
                
@@ -56,7 +56,7 @@
                                $return_url = urlencode("tblproperties.php?table=" . urlencode($tables->f['relname']) . "&{$querystr}");
                                $item_node = &new HTML_TreeNode(array(
                                                                'text' => $misc->printVal($tables->f['relname']), 
-                                                               'link' => addslashes(htmlspecialchars("tblproperties.php?{$querystr}&table=" .
+                                                               'link' => addslashes(htmlspecialchars("redirect.php?section=table&{$querystr}&table=" .
                                                                        urlencode($tables->f['relname']))), 
                                                                'icon' => "../../../images/themes/{$conf['theme']}/tables.png", 
                                                                'expandedIcon' => "../../../images/themes/{$conf['theme']}/tables.png",
@@ -90,7 +90,7 @@
                                $return_url = urlencode("viewproperties.php?view=" . urlencode($views->f['relname']) . "&{$querystr}");
                                $item_node = &new HTML_TreeNode(array(
                                                                'text' => $misc->printVal($views->f['relname']), 
-                                                               'link' => addslashes(htmlspecialchars("viewproperties.php?{$querystr}&view=" .
+                                                               'link' => addslashes(htmlspecialchars("redirect.php?section=view&{$querystr}&view=" .
                                                                        urlencode($views->f['relname']))), 
                                                                'icon' => "../../../images/themes/{$conf['theme']}/views.png", 
                                                                'expandedIcon' => "../../../images/themes/{$conf['theme']}/views.png",
                                        || $data->hasAggregates() || $data->hasOpClasses()) {
                                $adv_node = &new HTML_TreeNode(array(
                                                                'text' => $lang['stradvanced'], 
-                                                               'link' => ($data->hasSchemas()) ? addslashes(htmlspecialchars("schema.php?{$querystr}&" . SID)) : null, 
+#                                                              'link' => ($data->hasSchemas()) ? addslashes(htmlspecialchars("schema.php?{$querystr}&" . SID)) : null, 
                                                                'icon' => 'folder.gif', 
                                                                'expandedIcon' => 'folder-expanded.gif',
                                                                'linkTarget' => 'detail'));
                        $querystr = 'database=' . urlencode($databases->f['datname']) . '&' . SID;
                        $db_node = &new HTML_TreeNode(array(
                                                                'text' => $misc->printVal($databases->f['datname']), 
-                                                               'link' => addslashes(htmlspecialchars("database.php?{$querystr}")),
+                                                               'link' => addslashes(htmlspecialchars("redirect.php?section=database&{$querystr}")),
                                                                'icon' => "../../../images/themes/{$conf['theme']}/database.png", 
                                                                'expandedIcon' => "../../../images/themes/{$conf['theme']}/database.png",
                                                                'expanded' => true,
                                                        urlencode($schemas->f['nspname']) . '&' . SID;
                                        $schemanode = &new HTML_TreeNode(array(
                                                                        'text' => $misc->printVal($schemas->f['nspname']), 
-                                                                       'link' => addslashes(htmlspecialchars("schema.php?{$querystr}")), 
+                                                                       'link' => addslashes(htmlspecialchars("redirect.php?section=schema&{$querystr}")), 
                                                                        'icon' => 'folder.gif', 
                                                                        'expandedIcon' => 'folder-expanded.gif',
                                                                        // Auto-expand your personal schema, if it exists.  Also expand schema if there is
index fdf766e685afeffab6ea8fe8c9b371df326f4b2d..5ffd288ef48ea7c028fe337ceae69c5d903976b9 100644 (file)
--- a/casts.php
+++ b/casts.php
@@ -3,7 +3,7 @@
        /**
         * Manage casts in a database
         *
-        * $Id: casts.php,v 1.6 2004/07/07 02:59:56 chriskl Exp $
+        * $Id: casts.php,v 1.7 2004/07/13 15:24:40 jollytoad Exp $
         */
 
        // Include application functions
@@ -67,6 +67,7 @@
 
        $misc->printHeader($lang['strcasts']);
        $misc->printBody();
+       $misc->printNav('database','casts');
 
        switch ($action) {
                default:
index f8d920dc26f3b420153377771aa69ea8b6f686b8..936596376f2d9ee3b648eb21526d0e12dac4f143 100644 (file)
@@ -2,7 +2,7 @@
        /**
         * Class to hold various commonly used functions
         *
-        * $Id: Misc.php,v 1.71 2004/07/12 04:18:40 chriskl Exp $
+        * $Id: Misc.php,v 1.72 2004/07/13 15:24:40 jollytoad Exp $
         */
         
        class Misc {
 
                /**
                 * Display navigation tabs
-                * @params $tabs An associative array of tabs definitions, see printTableNav() for an example.
+                * @param $tabs An associative array of tabs definitions, see printNav() for an example.
+                * @param $activetab The name of the tab to be highlighted.
                 */
-               function printTabs($tabs) {
+               function printTabs($tabs, $activetab) {
+                       global $misc;
+                       
                        echo "<table class=\"navbar\" border=\"0\" width=\"100%\" cellpadding=\"5\" cellspacing=\"3\"><tr>\n";
                        
+                       # FIXME: don't count hiden tags
                        $width = round(100 / count($tabs)).'%';
-                       if (!isset($_REQUEST['tab'])) $_REQUEST['tab'] = '';
                        
                        foreach ($tabs as $tab_id => $tab) {
-                               if ($tab_id == $_REQUEST['tab'])
-                                       $class = ' class="active"';
-                               else
-                                       $class = '';
-                               echo "<td width=\"{$width}\"{$class}><a href=\"{$tab['url']}&amp;tab={$tab_id}\">{$tab['title']}</a></td>\n";
+                               $class = ($tab_id == $activetab) ? ' class="active"' : '';
+                               
+                               if (!isset($tab['hide']) || $tab['hide'] !== true)
+                                       echo "<td width=\"{$width}\"{$class}><a href=\"" . htmlspecialchars($tab['url']) . "\">{$tab['title']}</a></td>\n";
                        }
                        
                        echo "</tr></table>\n";
                }
-               
-               /**
-                * Display the navigation header for tables
-                */
-               function printTableNav() {
-                       global $lang;
-                       
-                       $vars = $this->href . '&amp;table=' . urlencode($_REQUEST['table']);
-                       
-                       $tabs = array (
-                               'columns' => array (
-                                       'title' => $lang['strcolumns'],
-                                       'url'   => "tblproperties.php?{$vars}",
-                               ),
-                               'indexes' => array (
-                                       'title' => $lang['strindexes'],
-                                       'url'   => "indexes.php?{$vars}",
-                               ),
-                               'constraints' => array (
-                                       'title' => $lang['strconstraints'],
-                                       'url'   => "constraints.php?{$vars}",
-                               ),
-                               'triggers' => array (
-                                       'title' => $lang['strtriggers'],
-                                       'url'   => "triggers.php?{$vars}",
-                               ),
-                               'rules' => array (
-                                       'title' => $lang['strrules'],
-                                       'url'   => "rules.php?{$this->href}&amp;reltype=table&amp;relation=" . urlencode($_REQUEST['table']),
-                               ),
-                               'info' => array (
-                                       'title' => $lang['strinfo'],
-                                       'url'   => "info.php?{$vars}",
-                               ),
-                               'privileges' => array (
-                                       'title' => $lang['strprivileges'],
-                                       'url'   => "privileges.php?{$vars}&amp;type=table&amp;object=" . urlencode($_REQUEST['table']),
-                               ),
-                               'import' => array (
-                                       'title' => $lang['strimport'],
-                                       'url'   => "tblproperties.php?{$vars}&amp;action=import",
-                               ),
-                               'export' => array (
-                                       'title' => $lang['strexport'],
-                                       'url'   => "tblproperties.php?{$vars}&amp;action=export",
-                               ),
-                       );
-                       
-                       $this->printTabs($tabs);
-               }
 
                /**
-                * Display the navigation header for views
+                * Retreive the tab info for a specific tab bar.
+                * @param $section The name of the tab bar.
                 */
-               function printViewNav() {
-                       global $lang;
-
-                       $vars = $this->href . '&amp;view=' . urlencode($_REQUEST['view']);
+               function getNavTabs($section) {
+                       global $data, $lang, $conf;
                        
-                       $tabs = array (
-                               'columns' => array (
-                                       'title' => $lang['strcolumns'],
-                                       'url'   => "viewproperties.php?{$vars}",
-                               ),
-                               'definition' => array (
-                                       'title' => $lang['strdefinition'],
-                                       'url'   => "viewproperties.php?action=definition&amp;{$vars}",
-                               ),
-                               'rules' => array (
-                                       'title' => $lang['strrules'],
-                                       'url'   => "rules.php?{$this->href}&amp;reltype=view&amp;relation=" . urlencode($_REQUEST['view']),
-                               ),
-                               'privileges' => array (
-                                       'title' => $lang['strprivileges'],
-                                       'url'   => "privileges.php?{$vars}&amp;type=view&amp;object=" . urlencode($_REQUEST['view']),
-                               ),
-                               'export' => array (
-                                       'title' => $lang['strexport'],
-                                       'url'   => "viewproperties.php?action=export&amp;{$vars}",
-                               ),
-               );
+                       $databasevar = isset($_REQUEST['database']) ? 'database=' . urlencode($_REQUEST['database']) : '';
+                       $schemavar = isset($_REQUEST['schema']) ? '&schema=' . urlencode($_REQUEST['schema']) : '';
                        
-                       $this->printTabs($tabs);
+                       switch ($section) {
+                               case 'server':
+                                       $hide_users = !$data->isSuperUser($_SESSION['webdbUsername']);
+                                       return array (
+                                               'databases' => array (
+                                                       'title' => $lang['strdatabases'],
+                                                       'url'   => "all_db.php",
+                                               ),
+                                               'users' => array (
+                                                       'title' => $lang['strusers'],
+                                                       'url'   => "users.php",
+                                                       'hide'  => $hide_users,
+                                               ),
+                                               'groups' => array (
+                                                       'title' => $lang['strgroups'],
+                                                       'url'   => "groups.php",
+                                                       'hide'  => $hide_users,
+                                               ),
+                                       );
+
+                               case 'database':
+                                       $vars = $databasevar;
+                                       return array (
+                                               'schemas' => array (
+                                                       'title' => $lang['strschemas'],
+                                                       'url'   => "database.php?{$vars}",
+                                                       'hide'  => (!$data->hasSchemas()),
+                                               ),
+                                               'sql' => array (
+                                                       'title' => $lang['strsql'],
+                                                       'url'   => "database.php?{$vars}&action=sql",
+                                               ),
+                                               'find' => array (
+                                                       'title' => $lang['strfind'],
+                                                       'url'   => "database.php?{$vars}&action=find",
+                                               ),
+                                               'variables' => array (
+                                                       'title' => $lang['strvariables'],
+                                                       'url'   => "database.php?{$vars}&action=variables",
+                                                       'hide'  => (!$data->hasVariables()),
+                                               ),
+                                               'processes' => array (
+                                                       'title' => $lang['strprocesses'],
+                                                       'url'   => "database.php?{$vars}&action=processes",
+                                                       'hide'  => (!$data->hasProcesses()),
+                                               ),
+                                               'admin' => array (
+                                                       'title' => $lang['stradmin'],
+                                                       'url'   => "database.php?{$vars}&action=admin",
+                                               ),
+                                               'privileges' => array (
+                                                       'title' => $lang['strprivileges'],
+                                                       'url'   => "privileges.php?{$vars}&type=database&object=" . urlencode($_REQUEST['database']),
+                                                       'hide'  => (!isset($data->privlist['database'])),
+                                               ),
+                                               'languages' => array (
+                                                       'title' => $lang['strlanguages'],
+                                                       'url'   => "languages.php?{$vars}",
+                                               ),
+                                               'casts' => array (
+                                                       'title' => $lang['strcasts'],
+                                                       'url'   => "casts.php?{$vars}",
+                                               ),
+                                               'export' => array (
+                                                       'title' => $lang['strexport'],
+                                                       'url'   => "database.php?{$vars}&action=export",
+                                                       'hide'  => (!$this->isDumpEnabled()),
+                                               ),
+                                       );
+
+                               case 'schema':
+                                       $vars = $databasevar . $schemavar;
+                                       $hide_advanced = ($conf['show_advanced'] === false);
+                                       return array (
+                                               'tables' => array (
+                                                       'title' => $lang['strtables'],
+                                                       'url'   => "tables.php?{$vars}",
+                                               ),
+                                               'views' => array (
+                                                       'title' => $lang['strviews'],
+                                                       'url'   => "views.php?{$vars}",
+                                               ),
+                                               'sequences' => array (
+                                                       'title' => $lang['strsequences'],
+                                                       'url'   => "sequences.php?{$vars}",
+                                               ),
+                                               'functions' => array (
+                                                       'title' => $lang['strfunctions'],
+                                                       'url'   => "functions.php?{$vars}",
+                                               ),
+                                               'domains' => array (
+                                                       'title' => $lang['strdomains'],
+                                                       'url'   => "domains.php?{$vars}",
+                                               ),
+                                               'aggregates' => array (
+                                                       'title' => $lang['straggregates'],
+                                                       'url'   => "aggregates.php?{$vars}",
+                                                       'hide'  => $hide_advanced,
+                                               ),
+                                               'types' => array (
+                                                       'title' => $lang['strtypes'],
+                                                       'url'   => "types.php?{$vars}",
+                                                       'hide'  => $hide_advanced,
+                                               ),
+                                               'operators' => array (
+                                                       'title' => $lang['stroperators'],
+                                                       'url'   => "operators.php?{$vars}",
+                                                       'hide'  => $hide_advanced,
+                                               ),
+                                               'opclasses' => array (
+                                                       'title' => $lang['stropclasses'],
+                                                       'url'   => "opclasses.php?{$vars}",
+                                                       'hide'  => $hide_advanced,
+                                               ),
+                                               'conversions' => array (
+                                                       'title' => $lang['strconversions'],
+                                                       'url'   => "conversions.php?{$vars}",
+                                                       'hide'  => $hide_advanced,
+                                               ),
+                                       );
+
+                               case 'table':
+                                       $table = urlencode($_REQUEST['table']);
+                                       $vars = $databasevar . $schemavar . "&table={$table}";
+                                       return array (
+                                               'columns' => array (
+                                                       'title' => $lang['strcolumns'],
+                                                       'url'   => "tblproperties.php?{$vars}",
+                                               ),
+                                               'indexes' => array (
+                                                       'title' => $lang['strindexes'],
+                                                       'url'   => "indexes.php?{$vars}",
+                                               ),
+                                               'constraints' => array (
+                                                       'title' => $lang['strconstraints'],
+                                                       'url'   => "constraints.php?{$vars}",
+                                               ),
+                                               'triggers' => array (
+                                                       'title' => $lang['strtriggers'],
+                                                       'url'   => "triggers.php?{$vars}",
+                                               ),
+                                               'rules' => array (
+                                                       'title' => $lang['strrules'],
+                                                       'url'   => "rules.php?{$vars}&reltype=table&relation={$table}",
+                                               ),
+                                               'info' => array (
+                                                       'title' => $lang['strinfo'],
+                                                       'url'   => "info.php?{$vars}",
+                                               ),
+                                               'privileges' => array (
+                                                       'title' => $lang['strprivileges'],
+                                                       'url'   => "privileges.php?{$vars}&type=table&object={$table}",
+                                               ),
+                                               'import' => array (
+                                                       'title' => $lang['strimport'],
+                                                       'url'   => "tblproperties.php?{$vars}&action=import",
+                                               ),
+                                               'export' => array (
+                                                       'title' => $lang['strexport'],
+                                                       'url'   => "tblproperties.php?{$vars}&action=export",
+                                               ),
+                                       );
+                               
+                               case 'view':
+                                       $view = urlencode($_REQUEST['view']);
+                                       $vars = $databasevar . $schemavar . "&view={$view}";
+                                       return array (
+                                               'columns' => array (
+                                                       'title' => $lang['strcolumns'],
+                                                       'url'   => "viewproperties.php?{$vars}",
+                                               ),
+                                               'definition' => array (
+                                                       'title' => $lang['strdefinition'],
+                                                       'url'   => "viewproperties.php?{$vars}&action=definition",
+                                               ),
+                                               'rules' => array (
+                                                       'title' => $lang['strrules'],
+                                                       'url'   => "rules.php?{$vars}&reltype=view&relation={$view}",
+                                               ),
+                                               'privileges' => array (
+                                                       'title' => $lang['strprivileges'],
+                                                       'url'   => "privileges.php?{$vars}&type=view&object={$view}",
+                                               ),
+                                               'export' => array (
+                                                       'title' => $lang['strexport'],
+                                                       'url'   => "viewproperties.php?{$vars}&action=export",
+                                               ),
+                                       );
+
+                               case 'popup':
+                                       $vars = $databasevar;
+                                       return array (
+                                               'sql' => array (
+                                                       'title' => $lang['strsql'],
+                                                       'url'   => "sqledit.php?{$vars}&action=sql",
+                                               ),
+                                               'find' => array (
+                                                       'title' => $lang['strfind'],
+                                                       'url'   => "sqledit.php?{$vars}&action=find",
+                                               ),
+                                       );
+                               
+                               default:
+                                       return array();
+                       }
                }
-
+               
                /**
-                * Display the navigation header for tables
+                * Display a navigation tab bar.
+                * @param $section The name of the tab bar.
+                * @param $activetab The tab to highlight and set as default for the bar.
                 */
-               function printDatabaseNav() {
-                       global $lang, $conf, $data;
-
-                       $vars = 'database=' . urlencode($_REQUEST['database']);
+               function printNav($section, $activetab) {
+                       global $data;
                        
-                       $tabs = array (
-                               'schemas' => array (
-                                       'title' => $lang['strschemas'],
-                                       'url'   => "database.php?{$vars}",
-                               ),
-                               'sql' => array (
-                                       'title' => $lang['strsql'],
-                                       'url'   => "database.php?{$vars}&amp;action=sql",
-                               ),
-                               'find' => array (
-                                       'title' => $lang['strfind'],
-                                       'url'   => "database.php?{$vars}&amp;action=find",
-                               ),
-                               'variables' => array (
-                                       'title' => $lang['strvariables'],
-                                       'url'   => "database.php?{$vars}&amp;action=variables",
-                               ),
-                               'processes' => array (
-                                       'title' => $lang['strprocesses'],
-                                       'url'   => "database.php?{$vars}&amp;action=processes",
-                               ),
-                               'admin' => array (
-                                       'title' => $lang['stradmin'],
-                                       'url'   => "database.php?{$vars}&amp;action=admin",
-                               ),
-                               'privileges' => array (
-                                       'title' => $lang['strprivileges'],
-                                       'url'   => "privileges.php?{$vars}&amp;type=database&amp;object=" . urlencode($_REQUEST['database']),
-                               ),
-                               'export' => array (
-                                       'title' => $lang['strexport'],
-                                       'url'   => "database.php?{$vars}&amp;action=export",
-                               ),
-                       );
-                       
-                       if (!$data->hasSchemas()) unset($tabs['schemas']);
-                       if (!$data->hasVariables()) unset($tabs['variables']);
-                       if (!$data->hasProcesses()) unset($tabs['processes']);
-                       if (!isset($data->privlist['database'])) unset($tabs['privileges']);
-                       if (!$this->isDumpEnabled()) unset($tabs['export']);
-
-                       $this->printTabs($tabs);
+                       switch ($section) {
+                               case 'database':
+                               case 'schema':
+                                       if ($data->hasSchemas() === false) {
+                                               $this->printTabs($this->getNavTabs('database'),$activetab);
+                                               $this->printTabs($this->getNavTabs('schema'),$activetab);
+                                               $_SESSION['webdbLastTab']['database'] = $activetab;
+                                               $_SESSION['webdbLastTab']['schema'] = $activetab;
+                                               break;
+                                       }
+                               default:
+                                       $tabs = $this->getNavTabs($section);
+                                       if (!empty($tabs)) {
+                                               $this->printTabs($tabs, $activetab);
+                                               $_SESSION['webdbLastTab'][$section] = $activetab;
+                                       }
+                       }
                }
-
+               
                /**
-                * Display the navigation header for popup window
+                * Get the URL for the last active tab of a particular tab bar.
                 */
-               function printPopUpNav() {
-                       global $lang, $data;
-
-                       if (isset($_REQUEST['database'])) $url = '&amp;database=' . urlencode($_REQUEST['database']);
-                       else $url = '';
-
-                       $tabs = array (
-                               'sql' => array (
-                                       'title' => $lang['strsql'],
-                                       'url'   => "sqledit.php?action=sql{$url}",
-                               ),
-                               'find' => array (
-                                       'title' => $lang['strfind'],
-                                       'url'   => "sqledit.php?action=find{$url}",
-                               ),
-                       );
+               function getLastTabURL($section) {
+                       $tabs = $this->getNavTabs($section);
+                       
+                       if (isset($_SESSION['webdbLastTab'][$section]))
+                               $tab = $tabs[$_SESSION['webdbLastTab'][$section]];
+                       else
+                               $tab = reset($tabs);
                        
-                       $this->printTabs($tabs);
+                       return isset($tab['url']) ? $tab['url'] : null;
                }
                
                /**
index 705a4278b17bd0f729fd94f38ab326f01f924473..255c2d9dbf18a40f1f40436c13b43f19887f8166 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List constraints on a table
         *
-        * $Id: constraints.php,v 1.32 2004/07/08 17:57:32 xzilla Exp $
+        * $Id: constraints.php,v 1.33 2004/07/13 15:24:40 jollytoad Exp $
         */
 
        // Include application functions
                                doDefault($lang['strinvalidparam']);
                                return;
                        }
-
+                       
                        echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ",
                                $misc->printVal($_REQUEST['table']), ": {$desc}</h2>\n";
                        $misc->printMsg($msg);
                        }
                }
                
-               $misc->printTableNav();
                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $misc->printVal($_REQUEST['table']), $lang['strconstraints']),'constraints');
                $misc->printMsg($msg);
 
        else
                $misc->printBody();
 
+       $misc->printNav('table','constraints');
+
        switch ($action) {
                case 'cluster_constraint':
                        if (isset($_POST['cluster'])) doClusterIndex(false);
index 4148eac2719b26be02679b213330824ef6ba04f0..ce99a7ea57bbd5f68a784d234360e75482962f8a 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage conversions in a database
         *
-        * $Id: conversions.php,v 1.6 2004/07/07 02:59:56 chriskl Exp $
+        * $Id: conversions.php,v 1.7 2004/07/13 15:24:40 jollytoad Exp $
         */
 
        // Include application functions
@@ -58,6 +58,7 @@
 
        $misc->printHeader($lang['strconversions']);
        $misc->printBody();
+       $misc->printNav('schema','conversions');
 
        switch ($action) {
                default:
index 3a0f6d9ee73459d8ecff3177313c1b7cfd8665e8..cf308d43f18a55e8e60122bf638e1ce76feac672 100755 (executable)
@@ -3,7 +3,7 @@
        /**
         * Manage schemas within a database
         *
-        * $Id: database.php,v 1.53 2004/07/12 07:13:32 chriskl Exp $
+        * $Id: database.php,v 1.54 2004/07/13 15:24:40 jollytoad Exp $
         */
 
        // Include application functions
@@ -40,7 +40,7 @@
                if (!isset($_GET['term'])) $_GET['term'] = '';
                if (!isset($_GET['filter'])) $_GET['filter'] = '';
 
-               $misc->printDatabaseNav();
+               $misc->printNav('database','find');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strfind']));
                $misc->printMsg($msg);
                
                global $data, $misc;
                global $PHP_SELF, $lang;
 
-               $misc->printDatabaseNav();
+               $misc->printNav('database','export');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strexport']));
                $misc->printMsg($msg);
 
                // Fetch the variables from the database
                $variables = &$data->getVariables();
                
-               $misc->printDatabaseNav();
-
+               $misc->printNav('database','variables');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strvariables']),'runtime_config');
 
                $columns = array(
                // Fetch the processes from the database
                $processes = &$data->getProcesses($_REQUEST['database']);
                
-               $misc->printDatabaseNav();
+               $misc->printNav('database','processes');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $lang['strprocesses']), 'processes');
                $misc->printMsg($msg);
                
                                else doAdmin('', $lang['strreindexbad']);
                                break;
                        default:
-                               $misc->printDatabaseNav();
+                               $misc->printNav('database','admin');
                                $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['stradmin']));
                                $misc->printMsg($msg);
                                
 
                if (!isset($_REQUEST['query'])) $_REQUEST['query'] = '';
 
-               $misc->printDatabaseNav();
+               $misc->printNav('database','sql');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strsql']),'sql');
 
                echo "<p>{$lang['strentersql']}</p>\n";
                global $lang, $_reload_browser;
 
                if ($confirm) {
+                       $misc->printNav('database','schemas');
                        $misc->printTitle(array($misc->printVal($_REQUEST['database']),$misc->printVal($_REQUEST['schema']),$lang['strdrop']),'drop_schema');
 
                        echo "<p>", sprintf($lang['strconfdropschema'], $misc->printVal($_REQUEST['schema'])), "</p>\n";
                // Fetch all tablespaces from the database
                if ($data->hasTablespaces()) $tablespaces = &$data->getTablespaces();
 
+               $misc->printNav('database','schemas');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strcreateschema']),'create_schema');
                $misc->printMsg($msg);
                
                global $data, $misc, $conf;
                global $PHP_SELF, $lang;
                
-               $misc->printDatabaseNav();
+               $misc->printNav('database','schemas');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strschemas']),'schemas');
                $misc->printMsg($msg);
                
                        $actions = array(
                                'properties' => array(
                                        'title' => $lang['strproperties'],
-                                       'url'   => 'schema.php?database='.urlencode($_REQUEST['database'])."&amp;",
+                                       'url'   => "redirect.php?section=schema&amp;database=".urlencode($_REQUEST['database'])."&amp;",
                                        'vars'  => array('schema' => 'nspname'),
                                ),
                                'drop' => array(
index 09741ec4b24ea42624a75c4a47e5e774db286a99..e76c5145247266ee2cab57c3e4e4fe82557ed19d 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Does an import to a particular table from a text file
         *
-        * $Id: dataimport.php,v 1.3 2004/07/01 06:41:42 chriskl Exp $
+        * $Id: dataimport.php,v 1.4 2004/07/13 15:24:40 jollytoad Exp $
         */
 
        // Include application functions
 
 
        $misc->printHeader($lang['strimport']);         
-       $misc->printTableNav();
+       $misc->printNav('table','import');
        echo "<h2>", $misc->printVal($_REQUEST['database']), ": ", $misc->printVal($_REQUEST['table']), ": {$lang['strimport']}</h2>\n";
 
        // Check that file is specified and is an uploaded file
                                        }
                                        break;
                                case 'xml':
-                                       $parser = xml_parser_create();\r
-                                       xml_set_element_handler($parser, '_startElement', '_endElement');\r
-                                       xml_set_character_data_handler($parser, '_charHandler');\r
-                                       \r
-                                       while (!feof($fd)) {\r
-                                               $line = fgets($fd, 4096);\r
-                                               xml_parse($parser, $line);\r
-                                       }\r
-                                       \r
+                                       $parser = xml_parser_create();
+                                       xml_set_element_handler($parser, '_startElement', '_endElement');
+                                       xml_set_character_data_handler($parser, '_charHandler');
+                                       
+                                       while (!feof($fd)) {
+                                               $line = fgets($fd, 4096);
+                                               xml_parse($parser, $line);
+                                       }
+                                       
                                        xml_parser_free($parser);
                                        break;
                                default:
index 1dc88bc12e161f91d2711bc7fa125c789939337b..0f574d30b65d2eeb8413bc1e84c1e2e1689b0dae 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage domains in a database
         *
-        * $Id: domains.php,v 1.14 2004/07/07 02:59:57 chriskl Exp $
+        * $Id: domains.php,v 1.15 2004/07/13 15:24:40 jollytoad Exp $
         */
 
        // Include application functions
 
        $misc->printHeader($lang['strdomains']);
        $misc->printBody();
+       $misc->printNav('schema','domains');
 
        switch ($action) {
                case 'add_check':
index e37cc66ea3009fa204c5c9c16ee2f0ccf3a5b2f6..2eb0c0ee3b3bf406b9a1f36647e7e3bcde2a92f0 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage functions in a database
         *
-        * $Id: functions.php,v 1.35 2004/07/13 09:00:32 chriskl Exp $
+        * $Id: functions.php,v 1.36 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
        
        $misc->printHeader($lang['strfunctions']);
        $misc->printBody();
+       $misc->printNav('schema','functions');
 
        switch ($action) {
                case 'save_create':
index 6e44a0b3f75fa186fe44337beb699e406b64bba4..7047f345607e504bff5d4a3d175a72b343b45ec6 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage groups in a database cluster
         *
-        * $Id: groups.php,v 1.16 2004/07/07 02:59:57 chriskl Exp $
+        * $Id: groups.php,v 1.17 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
 
        $misc->printHeader($lang['strgroups']);
        $misc->printBody();
+       $misc->printNav('server','groups');
 
        switch ($action) {
                case 'add_member':
index e3ba2637ffab7735c85736d95fb8b6ddd7656d1b..f79d6dd0ca90026e99fb67a3f28491b46cd1c041 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List indexes on a table
         *
-        * $Id: indexes.php,v 1.28 2004/07/10 09:23:24 chriskl Exp $
+        * $Id: indexes.php,v 1.29 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
                global $data, $misc;
                global $PHP_SELF, $lang;
                
-               $misc->printTableNav();
                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $misc->printVal($_REQUEST['table']), $lang['strindexes']));
                $misc->printMsg($msg);
 
                echo "<body onload=\"init();\">";
        else
                $misc->printBody();
-       
+
+       $misc->printNav('table','indexes');
+
        switch ($action) {
                case 'cluster_index':
                        if (isset($_POST['cluster'])) doClusterIndex(false);
index 993684f89e2355cba05a8d0a77e9c687c2bd97ac..31d3215fb43ef8569a6b694a9e49437f41877caf 100644 (file)
--- a/info.php
+++ b/info.php
@@ -3,7 +3,7 @@
        /**
         * List extra information on a table
         *
-        * $Id: info.php,v 1.6 2004/03/06 11:30:00 chriskl Exp $
+        * $Id: info.php,v 1.7 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
@@ -19,7 +19,7 @@
                global $data, $misc;
                global $lang;
 
-               $misc->printTableNav();
+               $misc->printNav('table','info');
                echo "<h2>", $misc->printVal($_REQUEST['database']), ": ", $misc->printVal($_REQUEST['table']), ": {$lang['strinfo']}</h2>\n";
                $misc->printMsg($msg);
 
index 638c612e3566d1b86f302506ecf6bd88c3d374b0..f3f6819db862e53e6c54e242003d259bbb0e49df 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage languages in a database
         *
-        * $Id: languages.php,v 1.4 2004/07/07 02:59:57 chriskl Exp $
+        * $Id: languages.php,v 1.5 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
@@ -50,6 +50,7 @@
 
        $misc->printHeader($lang['strlanguages']);
        $misc->printBody();
+       $misc->printNav('database','languages');
 
        switch ($action) {
                default:
index 4e0ef2f557476ac5235c535305beecbf9f1cbd5e..adedec47dae0176d48227df1c943126891b917d3 100644 (file)
--- a/links.js
+++ b/links.js
@@ -2,12 +2,12 @@
  * Function for updating browser frame and topbar frame so that sqledit window 
  * pops up with properly selected database.
  *
- * $Id: links.js,v 1.3 2003/12/28 08:15:34 chriskl Exp $
+ * $Id: links.js,v 1.4 2004/07/13 15:24:41 jollytoad Exp $
  */
 function updateLinks(getVars) {
        var topbarLink = 'topbar.php' + getVars;
        var browserLink = 'browser.php' + getVars;
-       var detailLink = 'database.php' + getVars;
+       var detailLink = 'redirect.php' + getVars + 'section=database';
                
        parent.frames.topbar.location = topbarLink;
        parent.frames.detail.location = detailLink;
index 6d0cbbc75f1ed6cdaa8523758f86c68e72207399..ad21602c060777ddcb78c045afec18e86bdc5004 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage opclasss in a database
         *
-        * $Id: opclasses.php,v 1.3 2004/07/07 02:59:57 chriskl Exp $
+        * $Id: opclasses.php,v 1.4 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
@@ -57,6 +57,7 @@
 
        $misc->printHeader($lang['stropclasses']);
        $misc->printBody();
+       $misc->printNav('schema','opclasses');
 
        switch ($action) {
                default:
index d8b2822d8bdd1d0d4f0f2552cd1952313a56e526..8a9f734b0dde285c515d6da8ae3c12ca726eb138 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage operators in a database
         *
-        * $Id: operators.php,v 1.14 2004/07/07 02:59:57 chriskl Exp $
+        * $Id: operators.php,v 1.15 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
 
        $misc->printHeader($lang['stroperators']);
        $misc->printBody();
+       $misc->printNav('schema','operators');
 
        switch ($action) {
                case 'save_create':
index b9fd44497dbe47314911a4950eca30f3f3c99697..7f02384244a9a97e4bedc58aae7b6a9c4bfb823f 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage privileges in a database
         *
-        * $Id: privileges.php,v 1.25 2004/07/10 08:51:01 chriskl Exp $
+        * $Id: privileges.php,v 1.26 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
                global $PHP_SELF, $lang;
 
                switch ($_REQUEST['type']) {
-                       case 'table':
-                               $misc->printTableNav();
-                               $name = $_REQUEST['object'];
-                               break;
-                       case 'view':
-                               $misc->printViewNav();
-                               $name = $_REQUEST['object'];
-                               break;
                        case 'function':
                                $name = $_REQUEST['function'];
                                break;
 
        $misc->printHeader($lang['strprivileges']);
        $misc->printBody();
+       $misc->printNav($_REQUEST['type'], 'privileges');
 
        switch ($action) {
                case 'save':
diff --git a/redirect.php b/redirect.php
new file mode 100644 (file)
index 0000000..974b598
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+       include_once('./libraries/lib.inc.php');
+       
+       $url = $misc->getLastTabURL($_REQUEST['section']);
+       
+       if (is_string($url)) {
+               header("Location: http://{$_SERVER['HTTP_HOST']}/{$url}");
+               exit;
+       }
+       
+       $misc->printHeader('ERROR');
+       $misc->printBody();
+       $misc->printFooter();
+?>
index 2ff1b809ca811aac6537fed0eff7eb2fe3af109f..3458b2e3843e178d2e92d3214e0977f8957d0de7 100644 (file)
--- a/rules.php
+++ b/rules.php
@@ -3,7 +3,7 @@
        /**
         * List rules on a table OR view
         *
-        * $Id: rules.php,v 1.19 2004/07/07 02:59:58 chriskl Exp $
+        * $Id: rules.php,v 1.20 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
                global $PHP_SELF;
                global $lang;
 
-               if ($_REQUEST['reltype'] == 'table') $misc->printTableNav();
-               else $misc->printViewNav();             
-               
                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $misc->printVal($_REQUEST['relation']), $lang['strrules']));
                $misc->printMsg($msg);
 
                $misc->printHeader($lang['strviews'] . ' - ' . $_REQUEST['relation'] . ' - ' . $lang['strrules']);
        }
        $misc->printBody();
-       
+       $misc->printNav($_REQUEST['reltype'],'rules');
+
        switch ($action) {
                case 'create_rule':
                        createRule(true);
index 771608baf7025e2e60a3b5588fcc7c6772ed4815..9d78a12abed9030a9065b5fb491b28dec9b4ea9b 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage sequences in a database
         *
-        * $Id: sequences.php,v 1.23 2004/07/12 07:13:32 chriskl Exp $
+        * $Id: sequences.php,v 1.24 2004/07/13 15:24:41 jollytoad Exp $
         */
        
        // Include application functions
        // Print header
        $misc->printHeader($lang['strsequences']);
        $misc->printBody();
-       
+       $misc->printNav('schema','sequences');
+
        switch($action) {
                case 'create':
                        doCreateSequence();
diff --git a/sql.php b/sql.php
index 0712a72625d4b91945e20f609139d465c74d88dc..94bbd2548d0eed965cc0adcef43d07a675be11e8 100644 (file)
--- a/sql.php
+++ b/sql.php
@@ -6,7 +6,7 @@
         * how many SQL statements have been strung together with semi-colons
         * @param $query The SQL query string to execute
         *
-        * $Id: sql.php,v 1.22 2004/07/07 02:59:59 chriskl Exp $
+        * $Id: sql.php,v 1.23 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
@@ -33,7 +33,7 @@
 
        $misc->printHeader($lang['strqueryresults']);
        $misc->printBody();
-       $misc->printDatabaseNav();
+       $misc->printNav('database','sql');
        echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strsql']}: {$lang['strqueryresults']}</h2>\n";
 
        // Set the schema search path
index e571c11bdec79e147a76c3f7569774d8fa5a933a..e42088086020b7d33796202bdeb5e80e525dc0b5 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Alternative SQL editing window
         *
-        * $Id: sqledit.php,v 1.17 2004/07/12 07:13:32 chriskl Exp $
+        * $Id: sqledit.php,v 1.18 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
@@ -61,7 +61,7 @@
                if (!isset($_GET['term'])) $_GET['term'] = '';
                if (!isset($_GET['filter'])) $_GET['filter'] = '';
 
-               $misc->printPopUpNav();
+               $misc->printNav('popup','find');
                echo "<h2>{$lang['strfind']}</h2>\n";
                
                echo "<form action=\"database.php\" method=\"get\" target=\"detail\">\n<p>";
 
                if (!isset($_REQUEST['query'])) $_REQUEST['query'] = '';
 
-               $misc->printPopUpNav();
+               $misc->printNav('popup','sql');
                echo "<h2>{$lang['strsql']}</h2>\n";
 
                echo "<form action=\"sql.php\" method=\"post\" target=\"detail\">\n<p>";
index 05d897d5694fcf2396ed69157dd5c9a6ec6aeaae..987ee4fb69dbdf185d2a17f5c737dadf8edd22d3 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tables.php,v 1.59 2004/07/10 09:23:24 chriskl Exp $
+        * $Id: tables.php,v 1.60 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
                $actions = array(
                        'properties' => array(
                                'title' => $lang['strproperties'],
-                               'url'   => "tblproperties.php?{$misc->href}&amp;",
+                               'url'   => "redirect.php?section=table&amp;{$misc->href}&amp;",
                                'vars'  => array('table' => 'relname'),
                        ),
                        'browse' => array(
        
        $misc->printHeader($lang['strtables']);
        $misc->printBody();
+       $misc->printNav('schema','tables');
 
        switch ($action) {
                case 'create':
index 824075d3467a287de4730e3bcb25f0c9b0d24272..38703e087f1b3df55aa615bd36142fc0a17a7ed4 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tblproperties.php,v 1.54 2004/07/13 09:00:39 chriskl Exp $
+        * $Id: tblproperties.php,v 1.55 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
@@ -46,6 +46,7 @@
                global $data, $misc;
                global $PHP_SELF, $lang;
                
+               $misc->printNav('table','columns');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $misc->printVal($_REQUEST['table']), $lang['stralter']), 'alter_table');
                $misc->printMsg($msg);
 
                // Determine whether or not the table has an object ID
                $hasID = $data->hasObjectID($_REQUEST['table']);
                
-               $misc->printTableNav();
+               $misc->printNav('table','export');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $misc->printVal($_REQUEST['table']), $lang['strexport']));
                $misc->printMsg($msg);
 
                global $data, $misc;
                global $PHP_SELF, $lang;
 
-               $misc->printTableNav();
+               $misc->printNav('table','import');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $misc->printVal($_REQUEST['table']), $lang['strimport']));
                $misc->printMsg($msg);
 
                                // Fetch all available types
                                $types = &$data->getTypes(true, false, true);
 
+                               $misc->printNav('table','columns');
                                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $misc->printVal($_REQUEST['table']), $lang['straddcolumn']), 'add_column');
                                $misc->printMsg($msg);
 
                        case 1:
                                global $lang;
 
+                               $misc->printNav('table','columns');
                                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $misc->printVal($_REQUEST['table']), 
                                        $lang['straltercolumn'], $misc->printVal($_REQUEST['column'])), 'alter_column');
                                $misc->printMsg($msg);
                global $PHP_SELF, $lang;
 
                if ($confirm) {
+                       $misc->printNav('table','columns');
                        $misc->printTitle(array($misc->printVal($_REQUEST['database']), $misc->printVal($_REQUEST['table']), 
                                $misc->printVal($_REQUEST['column']), $lang['strdrop']), 'drop_column');
             echo "<p>", sprintf($lang['strconfdropcolumn'], $misc->printVal($_REQUEST['column']),
                        $rowdata->f['+type'] = $data->formatType($rowdata->f['type'], $rowdata->f['atttypmod']);
                }
                
-               $misc->printTableNav();
+               $misc->printNav('table','columns');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $misc->printVal($_REQUEST['table'])));
                $misc->printMsg($msg);
 
index fed4f28b6e177043ce51459b888f9ca18e2e837f..217b0aba036f1fa7faed70e40a201d6edff1c4c2 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List triggers on a table
         *
-        * $Id: triggers.php,v 1.20 2004/07/07 02:59:59 chriskl Exp $
+        * $Id: triggers.php,v 1.21 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
                                                                        : $data->getTriggerDef($rowdata->f);
                }
                
-               $misc->printTableNav();
                $misc->printTitle(array($misc->printVal($_REQUEST['database'])), $misc->printVal($_REQUEST['table']), $lang['strtriggers']);
                $misc->printMsg($msg);
 
 
        $misc->printHeader($lang['strtables'] . ' - ' . $_REQUEST['table'] . ' - ' . $lang['strtriggers']);
        $misc->printBody();
+       $misc->printNav('table','triggers');
 
        switch ($action) {
                case 'alter':
index ae6faaf93dd24228fff3edf29f3fb181b8310fc2..5002f699de6463ba7f5c70a588207a69291335dc 100644 (file)
--- a/types.php
+++ b/types.php
@@ -3,7 +3,7 @@
        /**
         * Manage types in a database
         *
-        * $Id: types.php,v 1.18 2004/07/07 03:00:00 chriskl Exp $
+        * $Id: types.php,v 1.19 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
 
        $misc->printHeader($lang['strtypes']);
        $misc->printBody();
+       $misc->printNav('schema','types');
 
        switch ($action) {
                case 'save_create':
index 88ff67484dc16bb701e03e04a3b40e2d09d56e0c..db97e43513546424308913dccd18f17f38542c81 100644 (file)
--- a/users.php
+++ b/users.php
@@ -3,7 +3,7 @@
        /**
         * Manage users in a database cluster
         *
-        * $Id: users.php,v 1.24 2004/07/07 03:00:00 chriskl Exp $
+        * $Id: users.php,v 1.25 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
 
        $misc->printHeader($lang['strusers']);
        $misc->printBody();
+       $misc->printNav('server','users');
 
        switch ($action) {
                case 'changepassword':
index 45fae03cefeba2f1316d9bc86d60c75178c73dd7..1ba8de2e4e2cfc87bc339129fd7e1ff5fab6d1d2 100755 (executable)
@@ -3,7 +3,7 @@
        /**
         * List views in a database
         *
-        * $Id: viewproperties.php,v 1.8 2004/07/09 18:51:02 xzilla Exp $
+        * $Id: viewproperties.php,v 1.9 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
@@ -74,7 +74,7 @@
                global $data, $misc;
                global $PHP_SELF, $lang;
 
-               $misc->printViewNav();
+               $misc->printNav('view','export');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $misc->printVal($_REQUEST['view']), $lang['strexport']));
                $misc->printMsg($msg);
 
                // Get view
                $vdata = &$data->getView($_REQUEST['view']);
 
-               $misc->printViewNav();
+               $misc->printNav('view','definition');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $lang['strviews'], $misc->printVal($_REQUEST['view']), $lang['strdefinition']));
                $misc->printMsg($msg);
                
                        case 1:
                                global $lang;
 
+                               $misc->printNav('view','columns');
                                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $lang['strviews'], $lang['straltercolumn'],     $misc->printVal($_REQUEST['column'])));
                                $misc->printMsg($msg);
 
                        $rowdata->f['+type'] = $data->formatType($rowdata->f['type'], $rowdata->f['atttypmod']);
                }
                
-               $misc->printViewNav();
+               $misc->printNav('view','columns');
                $misc->printTitle(array($misc->printVal($_REQUEST['database']), $lang['strviews'], $misc->printVal($_REQUEST['view'])));
                $misc->printMsg($msg);
 
index 6cd73fc2bff19c24e02413e378be1ef8c5df1656..f0896b3887623cf58e1d35dddce28212313d635e 100644 (file)
--- a/views.php
+++ b/views.php
@@ -3,7 +3,7 @@
        /**
         * Manage views in a database
         *
-        * $Id: views.php,v 1.45 2004/07/07 03:00:00 chriskl Exp $
+        * $Id: views.php,v 1.46 2004/07/13 15:24:41 jollytoad Exp $
         */
 
        // Include application functions
                $actions = array(
                        'properties' => array(
                                'title' => $lang['strproperties'],
-                               'url'   => "viewproperties.php?{$misc->href}&amp;",
+                               'url'   => "redirect.php?section=view&amp;{$misc->href}&amp;",
                                'vars'  => array('view' => 'relname'),
                        ),
                        'browse' => array(
 
        $misc->printHeader($lang['strviews']);
        $misc->printBody();
+       $misc->printNav('schema','views');
 
        switch ($action) {
                case 'selectrows':