Add support for 'actionbuttons' hooks in the plugin architecture.
authorLeonardo Sapiras <l.sapiras@gmail.com>
Thu, 23 Feb 2012 22:57:54 +0000 (23:57 +0100)
committerJehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>
Wed, 22 Aug 2012 10:27:20 +0000 (12:27 +0200)
By Leonardo Sapiras during the GSoC 2011. Reviewed, massively patched,
fixed, integrated and commited by ioguix

35 files changed:
admin.php
aggregates.php
all_db.php
casts.php
classes/Misc.php
classes/PluginManager.php
colproperties.php
constraints.php
conversions.php
database.php
display.php
domains.php
fulltext.php
functions.php
groups.php
history.php
indexes.php
info.php
languages.php
opclasses.php
operators.php
reports.php
roles.php
rules.php
schemas.php
sequences.php
servers.php
tables.php
tablespaces.php
tblproperties.php
triggers.php
types.php
users.php
viewproperties.php
views.php

index 901a121ec024479659c628bab94539e093162089..899920219dbce129515f723b62dcee6c01dcdb38 100644 (file)
--- a/admin.php
+++ b/admin.php
 
                        $actions = array(
                                'edit' => array(
-                                       'title' => $lang['stredit'],
-                                       'url'   => "{$script}?action=confeditautovac&amp;{$misc->href}&amp;subject={$type}&amp;",
-                                       'vars'  => array(
-                                               'schema' => 'nspname',
-                                               'table' => 'relname'
+                                       'content' => $lang['stredit'],
+                                       'attr'=> array (
+                                               'href' => array (
+                                                       'url' => $script,
+                                                       'urlvars' => array (
+                                                               'subject' => $type,
+                                                               'action' => 'confeditautovac',
+                                                               'schema' => field('nspname'),
+                                                               'table' => field('relname')
+                                                       )
+                                               )
                                        )
                                ),
                                'delete' => array(
-                                       'title' => $lang['strdelete'],
-                                       'url'   => "{$script}?action=confdelautovac&amp;{$misc->href}&amp;subject={$type}&amp;",
-                                       'vars'  => array(
-                                               'schema' => 'nspname',
-                                               'table' => 'relname'
+                                       'content' => $lang['strdelete'],
+                                       'attr'=> array (
+                                               'href' => array (
+                                                       'url' => $script,
+                                                       'urlvars' => array (
+                                                               'subject' => $type,
+                                                               'action' => 'confdelautovac',
+                                                               'schema' => field('nspname'),
+                                                               'table' => field('relname')
+                                                       )
+                                               )
                                        )
                                )
                        );
-                       
+
                        if ($type == 'table') {
                                unset($actions['edit']['vars']['schema'], 
                                        $actions['delete']['vars']['schema'],
                                );
                        }
 
-                       $misc->printTable($autovac, $columns, $actions, $lang['strnovacuumconf']);
+                       $misc->printTable($autovac, $columns, $actions, 'admin-admin', $lang['strnovacuumconf']);
                        
                        if (($type == 'table') and ($autovac->recordCount() == 0)) {
                                echo "<br />";
index fdf10223813f9c5a799333f241ea6bc61a21a226..6970d3388c7b5d95e0b941f29cf6515e9020ecfa 100644 (file)
                
                $actions = array(
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "aggregates.php?action=alter&amp;{$misc->href}&amp;",
-                               'vars'  => array('aggrname' => 'proname', 'aggrtype' => 'proargtypes'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'aggregates.php',
+                                               'urlvars' => array (
+                                                       'action' => 'alter',
+                                                       'aggrname' => field('proname'),
+                                                       'aggrtype' => field('proargtypes')
+                                               )
+                                       )
+                               )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "aggregates.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('aggrname' => 'proname', 'aggrtype' => 'proargtypes'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'aggregates.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'aggrname' => field('proname'),
+                                                       'aggrtype' => field('proargtypes')
+                                               )
+                                       )
+                               )
                        )
                );
 
                if (!$data->hasAlterAggregate()) unset($actions['alter']);
-               $misc->printTable($aggregates, $columns, $actions, $lang['strnoaggregates']);
+               $misc->printTable($aggregates, $columns, $actions, 'aggregates-aggregates', $lang['strnoaggregates']);
 
                $navlinks = array (
                        array (
index 71508f98d24e2a0ce82d2ef24b73ddb6f93202f8..41585fba054345e29c86fdd1b93b9d5300aee774 100644 (file)
 
                $actions = array(
                        'multiactions' => array(
-                               'keycols' => array('database' => 'datname'),
-                               'url' => 'all_db.php',
-                               'default' => null,
+                           'keycols' => array('database' => 'datname'),
+                           'url' => 'all_db.php',
+                           'default' => null,
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "all_db.php?action=confirm_drop&amp;subject=database&amp;{$misc->href}&amp;",
-                               'vars'  => array('dropdatabase' => 'datname'),
-                               'multiaction' => 'confirm_drop',
+                           'content' => $lang['strdrop'],
+                           'attr'=> array (
+                               'href' => array (
+                                   'url' => 'all_db.php',
+                                   'urlvars' => array (
+                                       'subject' => 'database',
+                                       'action' => 'confirm_drop',
+                                       'dropdatabase' => field('datname')
+                                   )
+                               )
+                           ),
+                           'multiaction' => 'confirm_drop',
                        ),
                        'privileges' => array(
-                               'title' => $lang['strprivileges'],
-                               'url'   => "privileges.php?subject=database&amp;{$misc->href}&amp;",
-                               'vars'  => array('database' => 'datname'),
+                           'content' => $lang['strprivileges'],
+                           'attr'=> array (
+                               'href' => array (
+                                   'url' => 'privileges.php',
+                                   'urlvars' => array (
+                                       'subject' => 'database',
+                                       'database' => field('datname')
+                                   )
+                               )
+                           )
                        )
                );
                if ($data->hasAlterDatabase() ) {
-                       $actions['alter'] = array(
-                               'title' => $lang['stralter'],
-                               'url'   => "all_db.php?action=confirm_alter&amp;subject=database&amp;{$misc->href}&amp;",
-                               'vars'  => array('alterdatabase' => 'datname')
-                       );
+                   $actions['alter'] = array(
+                       'content' => $lang['stralter'],
+                       'attr'=> array (
+                           'href' => array (
+                               'url' => 'all_db.php',
+                               'urlvars' => array (
+                                   'subject' => 'database',
+                                   'action' => 'confirm_alter',
+                                   'alterdatabase' => field('datname')
+                               )
+                           )
+                       )
+                   );
                }
 
                if (!$data->hasTablespaces()) unset($columns['tablespace']);
                if (!$data->hasDatabaseCollation()) unset($columns['lc_collate'], $columns['lc_ctype']);
                if (!isset($data->privlist['database'])) unset($actions['privileges']);
 
-               $misc->printTable($databases, $columns, $actions, $lang['strnodatabases']);
+               $misc->printTable($databases, $columns, $actions, 'all_db-databases', $lang['strnodatabases']);
 
                $navlinks = array (
                    array (
index 835d1106a02a3274474e471be53a18b91c6587bc..257df6a378f4f348a7520ad166457f0b7b52b675 100644 (file)
--- a/casts.php
+++ b/casts.php
@@ -62,7 +62,7 @@
 
                $actions = array();
                
-               $misc->printTable($casts, $columns, $actions, $lang['strnocasts']);
+               $misc->printTable($casts, $columns, $actions, 'casts-casts', $lang['strnocasts']);
        }
 
        /**
index 64cd26f777170482c094295efc7af8871c4af9e3..84c8be8ed45b542e208d80035ae687eb04178a09 100644 (file)
                }
 
                /**
-                * Display a list of links
-                * @param $links An associative array of links to print
-                *     links = array(
+                * Display a link
+                * @param $link An associative array of link parameters to print
+                *     link = array(
                 *       'attr' => array( // list of A tag attribute
                 *          'attrname' => attribute value
                 *          ...
                 *       ),
                 *       'content' => The link text
-                *       'fields' => the data from which content and attr's values are obtained
+                *       'fields' => (optionnal) the data from which content and attr's values are obtained
                 *     );
                 *   the special attribute 'href' might be a string or an array. If href is an array it
                 *   will be generated by getActionUrl. See getActionUrl comment for array format.
+                */
+               function printLink($link) {
+                       $tag = "<a ";
+                       foreach ($link['attr'] as $attr => $value) {
+                               if ($attr == 'href' and is_array($value)) {
+                                       $tag.= 'href="'. htmlentities($this->getActionUrl($value, $link['fields'])).'" ';
+                               }
+                               else {
+                                       $tag.= htmlentities($attr).'="'. value($value, $link['fields'], 'html') .'" ';
+                               }
+                       }
+                       $tag.= ">". value($link['content'], $link['fields'], 'html') ."</a>\n";
+                       echo $tag;
+               }
+
+               /**
+                * Display a list of links
+                * @param $links An associative array of links to print. See printLink function for
+                *               the links array format.
                 * @param $class An optional class or list of classes seprated by a space
                 *   WARNING: This field is NOT escaped! No user should be able to inject something here, use with care.
                 */
                function printLinksList($links, $class='') {
                        echo "<ul class=\"{$class}\">\n";
                        foreach ($links as $link) {
-                               $tag = "\t<li><a ";
-                               foreach ($link['attr'] as $attr => $value) {
-                                       if ($attr == 'href' and is_array($value)) {
-                                               $tag.= 'href="'. htmlentities($this->getActionUrl($value, $link['fields'])).'" ';
-                                       }
-                                       else {
-                                               $tag.= htmlentities($attr).'="'. value($value, $link['fields'], 'html') .'" ';
-                                       }
-                               }
-                               $tag.= ">". value($link['content'], $link['fields'], 'html') ."</a></li>\n";
-                               echo $tag;
+                               echo "\t<li>";
+                               $this->printLink($link);
+                               echo "</li>\n";
                        }
                        echo "</ul>\n";
                }
                                $urlvars = array();
                        }
 
-                       if (isset($urlvars['subject'])) {
+                       /* set server, database and schema parameter if not presents */
+                       if (isset($urlvars['subject']))
                                $subject = value($urlvars['subject'], $fields);
-                               if (isset($_REQUEST['server']) && $subject != 'root') {
-                                       $urlvars['server'] = $_REQUEST['server'];
-                                       if (isset($_REQUEST['database']) && $subject != 'server') {
-                                               $urlvars['database'] = $_REQUEST['database'];
-                                               if (isset($_REQUEST['schema']) && $subject != 'database') {
-                                                       $urlvars['schema'] = $_REQUEST['schema'];
-                                               }
+                       else
+                               $subject = '';
+                       
+                       if (isset($_REQUEST['server']) and !isset($urlvars['server']) and $subject != 'root') {
+                               $urlvars['server'] = $_REQUEST['server'];
+                               if (isset($_REQUEST['database']) and !isset($urlvars['database']) and $subject != 'server') {
+                                       $urlvars['database'] = $_REQUEST['database'];
+                                       if (isset($_REQUEST['schema']) and !isset($urlvars['schema']) and $subject != 'database') {
+                                               $urlvars['schema'] = $_REQUEST['schema'];
                                        }
                                }
                        }
                 *                                                                              Add this action to the multi action form
                 *                              ), ...
                 *                      );
+                * @param $place     Place where the $actions are displayed. Like 'display-browse', where 'display' is the file (display.php)
+                *                   and 'browse' is the place inside that code (doBrowse).
                 * @param $nodata    (optional) Message to display if data set is empty.
                 * @param $pre_fn    (optional) Name of a function to call for each row,
                 *                                       it will be passed two params: $rowdata and $actions,
                 *                                       The function must not must not store urls because
                 *                                       they are relative and won't work out of context.
                 */
-               function printTable(&$tabledata, &$columns, &$actions, $nodata = null, $pre_fn = null) {
-                       global $data, $conf, $misc, $lang;
+               function printTable(&$tabledata, &$columns, &$actions, $place, $nodata = null, $pre_fn = null) {
+                       global $data, $conf, $misc, $lang, $plugin_manager;
+
+                       // Action buttons hook's place
+                       $plugin_functions_parameters = array(
+                               'actionbuttons' => &$actions,
+                               'place' => $place
+                       );
+                       $plugin_manager->do_hook('actionbuttons', $plugin_functions_parameters);
 
                        if ($has_ma = isset($actions['multiactions']))
                                $ma = $actions['multiactions'];
                                                                                echo "<td></td>\n";
                                                                        } else {
                                                                                echo "<td class=\"opbutton{$id}\">";
-                                                                               echo "<a href=\"{$action['url']}";
-                                                                               if ($action['url'] === '') echo '?';
-                                                                               $misc->printUrlVars($action['vars'], $tabledata->fields);
-                                                                               if (isset($action['target']))
-                                                                                       echo "\" target=\"{$action['target']}";
-                                                                               echo "\">{$action['title']}</a></td>\n";
+                                                                               $action['fields'] = $tabledata->fields;
+                                                                               $this->printLink($action);
+                                                                               echo "</td>\n";
                                                                        }
                                                                }
                                                                break;
                                                echo "\t\t<option value=\"\">--</option>\n";
                                        foreach($actions as $k => $a)
                                                if (isset($a['multiaction']))
-                                                       echo "\t\t<option value=\"{$a['multiaction']}\"", ($ma['default']  == $k? ' selected="selected"': ''), ">{$a['title']}</option>\n";
+                                                       echo "\t\t<option value=\"{$a['multiaction']}\"", ($ma['default']  == $k? ' selected="selected"': ''), ">{$a['content']}</option>\n";
                                        echo "\t</select>\n";
                                        echo "<input type=\"submit\" value=\"{$lang['strexecute']}\" />\n";
                                        echo $misc->form;
index 3932f8ce00533314a3d51f4528af9e578ebf4a36..e2a97c927fcdd5a8069be5063b99b93df76975c2 100644 (file)
@@ -10,7 +10,7 @@ class PluginManager {
         * Attributes
         */
        private $plugins_list = array();
-       private $available_hooks = array('toplinks', 'tabs', 'trail', 'navlinks' /* wip, more hooks to come in next commits */);
+       private $available_hooks = array('toplinks', 'tabs', 'trail', 'navlinks', 'actionbuttons' /* wip, more hooks to come in next commits */);
        private $actions = array();
        private $hooks = array();
 
index 75051423125353fa2ef56489a43a4f28a76fd785..c4d8ae3785a2f4587902749910d40dfc35ab9723 100644 (file)
                        }
 
                        $actions=array();
-                       $misc->printTable($attrs, $column, $actions, null, 'attPre');
+                       $misc->printTable($attrs, $column, $actions, 'colproperties-colproperties', null, 'attPre');
 
                        echo "<br />\n";
 
index 93c2036b1e0560519d5b0b87d632396987d146dc..5aa7462f5c3ca15e32f25771437196536197d034 100644 (file)
 
                $actions = array(
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "constraints.php?action=confirm_drop&amp;{$misc->href}&amp;table=".urlencode($_REQUEST['table'])."&amp;",
-                               'vars'  => array('constraint' => 'conname', 'type' => 'contype'),
-                       ),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'constraints.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'table' => $_REQUEST['table'],
+                                                       'constraint' => field('conname'),
+                                                       'type' => field('contype')
+                                               )
+                                       )
+                               )
+                       )
                );
 
-               $misc->printTable($constraints, $columns, $actions, $lang['strnoconstraints'], 'cnPre');
+               $misc->printTable($constraints, $columns, $actions, 'constraints-constraints', $lang['strnoconstraints'], 'cnPre');
 
                $navlinks = array (
                        array (
index 69525007c4d246b5d80c68831ac25ce2c5094aae..8b5ab7c4b467f937c5919aae403416fc59012622 100644 (file)
@@ -51,7 +51,7 @@
                
                $actions = array();
                
-               $misc->printTable($conversions, $columns, $actions, $lang['strnoconversions']);
+               $misc->printTable($conversions, $columns, $actions, 'conversions-conversions', $lang['strnoconversions']);
        }
        
        /**
index c49f074825cbf7eb89d3ad6dac36bdf443528d54..5a655780d3f0de82c3ccd7304f10a218924aaca2 100755 (executable)
                
                $actions = array();
                
-               $misc->printTable($variables, $columns, $actions, $lang['strnodata']);
+               $misc->printTable($variables, $columns, $actions, 'database-variables', $lang['strnodata']);
        }
 
        /**
 
                        $actions = array();
 
-                       $misc->printTable($prep_xacts, $columns, $actions, $lang['strnodata']);
+                       $misc->printTable($prep_xacts, $columns, $actions, 'database-processes-preparedxacts', $lang['strnodata']);
                }
 
                // Fetch the processes from the database
                if ($data->isSuperUser()) {
                        $actions = array(
                                'cancel' => array(
-                                       'title' => $lang['strcancel'],
-                                       'url'   => "database.php?action=signal&amp;signal=CANCEL&amp;{$misc->href}&amp;",
-                                       'vars'  => array('procpid' => 'procpid')
+                                       'content' => $lang['strcancel'],
+                                       'attr'=> array (
+                                               'href' => array (
+                                                       'url' => 'database.php',
+                                                       'urlvars' => array (
+                                                               'action' => 'signal',
+                                                               'signal' => 'CANCEL',
+                                                               'procpid' => field('procpid')
+                                                       )
+                                               )
+                                       )
                                ),
                                'kill' => array(
-                                       'title' => $lang['strkill'],
-                                       'url'   => "database.php?action=signal&amp;signal=KILL&amp;{$misc->href}&amp;",
-                                       'vars'  => array('procpid' => 'procpid')
+                                       'content' => $lang['strkill'],
+                                       'attr'=> array (
+                                               'href' => array (
+                                                       'url' => 'database.php',
+                                                       'urlvars' => array (
+                                                               'action' => 'signal',
+                                                               'signal' => 'KILL',
+                                                               'procpid' => field('procpid')
+                                                       )
+                                               )
+                                       )
                                )
                        );
        
                // Remove query start time for <7.4
                if (!isset($processes->fields['query_start'])) unset($columns['start_time']);
 
-               $misc->printTable($processes, $columns, $actions, $lang['strnodata']);
+               $misc->printTable($processes, $columns, $actions, 'database-processes', $lang['strnodata']);
                
                if ($isAjax) exit;
        }
                if (!$data->hasVirtualTransactionId()) unset($columns['vxid']);
 
                $actions = array();
-               $misc->printTable($variables, $columns, $actions, $lang['strnodata']);
+               $misc->printTable($variables, $columns, $actions, 'database-locks', $lang['strnodata']);
                
                if ($isAjax) exit;
        }
index a05e872eb571a01998459e5879c59d02812092f9..4fbdb0edbf88867b7e138f0e73000c6b31107169 100644 (file)
                                        break;
                                }
                        }
+
+                       $buttons = array();
+                       $plugin_functions_parameters = array(
+                               'actionbuttons' => &$buttons,
+                               'place' => 'display-browse'
+                       );
+                       $plugin_manager->do_hook('actionbuttons', $plugin_functions_parameters);
+
+                       foreach (array_keys($plugin_functions_parameters['actionbuttons']) as $action) {
+                               $plugin_functions_parameters['actionbuttons'][$action]['attr']['href']['urlvars'] = array_merge(
+                                       $plugin_functions_parameters['actionbuttons'][$action]['attr']['href']['urlvars'],
+                                       $_gets, $_getsort
+                               );
+                       }
+
+                       error_log(print_r($plugin_functions_parameters, 1));
+
                        // Display edit and delete actions if we have a key
+                       $colspan = count($buttons) + 2;
                        if (sizeof($key) > 0)
-                               echo "<th colspan=\"2\" class=\"data\">{$lang['stractions']}</th>\n";
+                               echo "<th colspan=\"{$colspan}\" class=\"data\">{$lang['stractions']}</th>\n";
 
                        /* we show OIDs only if we are in TABLE or SELECT type browsing */
                        printTableHeaderCells($rs, $gets, isset($object));
                                                $key_str .= urlencode("key[{$v}]") . '=' . urlencode($rs->fields[$v]);
                                        }
                                        if ($has_nulls) {
-                                               echo "<td colspan=\"2\">&nbsp;</td>\n";
+                                               echo "<td colspan=\"{$colspan}\">&nbsp;</td>\n";
                                        } else {
                                                echo "<td class=\"opbutton{$id}\"><a href=\"display.php?action=confeditrow&amp;strings=", 
                                                        urlencode($_REQUEST['strings']), "&amp;page=", 
                                                echo "<td class=\"opbutton{$id}\"><a href=\"display.php?action=confdelrow&amp;strings=", 
                                                        urlencode($_REQUEST['strings']), "&amp;page=", 
                                                        urlencode($_REQUEST['page']), "&amp;{$key_str}&amp;{$gets}&amp;{$getsort}\">{$lang['strdelete']}</a></td>\n";
+
+                                               foreach ($plugin_functions_parameters['actionbuttons'] as $action) {
+                                                       echo "<td class=\"opbutton{$id}\">";
+                                                       $misc->printLink($action);
+                                                       // "<a href=\"display.php?action=confeditrow&amp;strings=", 
+                                                       //      urlencode($_REQUEST['strings']), "&amp;page=", 
+                                                       //      urlencode($_REQUEST['page']), "&amp;{$key_str}&amp;{$gets}&amp;{$getsort}\">{$lang['stredit']}</a>"
+                                                       echo "</td>\n";
+                                               }
+                                               
                                        }
                                }
 
index 1df7fa507ffab746b6889c66b9aca0d67ebd402d..633535a0bb0da8cd5c1da4cfc86201e5421d7850 100644 (file)
                        echo "</table>\n";
                        
                        // Display domain constraints
+                       echo "<h3>{$lang['strconstraints']}</h3>\n";
                        if ($data->hasDomainConstraints()) {
                                $domaincons = $data->getDomainConstraints($_REQUEST['domain']);
-                               if ($domaincons->recordCount() > 0) {
-                                       echo "<h3>{$lang['strconstraints']}</h3>\n";
-                                       echo "<table>\n";
-                                       echo "<tr><th class=\"data\">{$lang['strname']}</th><th class=\"data\">{$lang['strdefinition']}</th><th class=\"data\">{$lang['stractions']}</th>\n";
-                                       $i = 0;
-                                       
-                                       while (!$domaincons->EOF) {
-                                               $id = (($i % 2 ) == 0 ? '1' : '2');
-                                               echo "<tr class=\"data{$id}\"><td>", $misc->printVal($domaincons->fields['conname']), "</td>";
-                                               echo "<td>";
-                                               echo $misc->printVal($domaincons->fields['consrc']);
-                                               echo "</td>";
-                                               echo "<td class=\"opbutton{$id}\">";
-                                               echo "<a href=\"domains.php?action=confirm_drop_con&amp;{$misc->href}&amp;constraint=", urlencode($domaincons->fields['conname']),
-                                                       "&amp;domain=", urlencode($_REQUEST['domain']), "&amp;type=", urlencode($domaincons->fields['contype']), "\">{$lang['strdrop']}</a></td></tr>\n";
-               
-                                               $domaincons->moveNext();
-                                               $i++;
-                                       }
-                                       
-                                       echo "</table>\n";
-                               }
+
+                               error_log(print_r($domaincons, 1));
+
+                               $columns = array (
+                                       'name' => array (
+                                               'title' => $lang['strname'],
+                                               'field' => field('conname')
+                                       ),
+                                       'definition' => array (
+                                               'title' => $lang['strdefinition'],
+                                               'field' => field('consrc'),
+                                       ),
+                                       'actions' => array (
+                                               'title' => $lang['stractions'],
+                                       )
+                               );
+
+                               $actions = array (
+                                       'drop' => array (
+                                               'content' => $lang['strdrop'],
+                                               'attr'=> array (
+                                                       'href' => array (
+                                                               'url' => 'domains.php',
+                                                               'urlvars' => array (
+                                                                       'action' => 'confirm_drop_con',
+                                                                       'domain' => $_REQUEST['domain'],
+                                                                       'constraint' => field('conname'),
+                                                                       'type' => field('contype'),
+                                                               )
+                                                       )
+                                               )
+                                       )
+                               );
+
+                               $misc->printTable($domaincons, $columns, $actions, 'domains-properties', $lang['strnodata']);
                        }
                }
                else echo "<p>{$lang['strnodata']}</p>\n";
                
                $actions = array(
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "domains.php?action=alter&amp;{$misc->href}&amp;",
-                               'vars'  => array('domain' => 'domname'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'domains.php',
+                                               'urlvars' => array (
+                                                       'action' => 'alter',
+                                                       'domain' => field('domname')
+                                               )
+                                       )
+                               )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "domains.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('domain' => 'domname'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'domains.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'domain' => field('domname')
+                                               )
+                                       )
+                               )
                        ),
                );
 
                if (!$data->hasAlterDomains()) unset($actions['alter']);
                
-               $misc->printTable($domains, $columns, $actions, $lang['strnodomains']);
+               $misc->printTable($domains, $columns, $actions, 'domains-domains', $lang['strnodomains']);
 
                $navlinks = array (
                        array (
index 8d16da928b11eda4d8604a23b9897f2f8cdc9a17..b6bb9e702a17baf23bfa1fa99dc7e4a2012c045e 100644 (file)
 
                $actions = array(
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "fulltext.php?action=dropconfig&amp;{$misc->href}&amp;",
-                               'vars'  => array('ftscfg' => 'name'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'fulltext.php',
+                                               'urlvars' => array (
+                                                       'action' => 'dropconfig',
+                                                       'ftscfg' => field('name')
+                                               )
+                                       )
+                               )
                        ),
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "fulltext.php?action=alterconfig&amp;{$misc->href}&amp;",
-                               'vars'  => array('ftscfg' => 'name'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'fulltext.php',
+                                               'urlvars' => array (
+                                                       'action' => 'alterconfig',
+                                                       'ftscfg' => field('name')
+                                               )
+                                       )
+                               )
                        ),
                );
 
-               $misc->printTable($cfgs, $columns, $actions, $lang['strftsnoconfigs']);
+               $misc->printTable($cfgs, $columns, $actions, 'fulltext-fulltext', $lang['strftsnoconfigs']);
 
                $navlinks = array(
                        array (
 
                $actions = array();
 
-               $misc->printTable($parsers, $columns, $actions, $lang['strftsnoparsers']);
+               $misc->printTable($parsers, $columns, $actions, 'fulltext-viewparsers', $lang['strftsnoparsers']);
 
                //TODO: navlink to "create parser"
        }
 
                $actions = array(
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "fulltext.php?action=dropdict&amp;{$misc->href}&amp;",
-                               'vars'  => array('ftsdict' => 'name'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'fulltext.php',
+                                               'urlvars' => array (
+                                                       'action' => 'dropdict',
+                                                       'ftsdict' => field('name')
+                                               )
+                                       )
+                               )
                        ),
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "fulltext.php?action=alterdict&amp;{$misc->href}&amp;",
-                               'vars'  => array('ftsdict' => 'name'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'fulltext.php',
+                                               'urlvars' => array (
+                                                       'action' => 'alterdict',
+                                                       'ftsdict' => field('name')
+                                               )
+                                       )
+                               )
                        ),
                );
 
-               $misc->printTable($dicts, $columns, $actions, $lang['strftsnodicts']);
+               $misc->printTable($dicts, $columns, $actions, 'fulltext-viewdicts', $lang['strftsnodicts']);
 
                $navlinks = array(
                        array (
 
                $actions = array(
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "fulltext.php?action=dropmapping&amp;{$misc->href}&amp;",
-                               'vars'  => array('mapping' => 'name', 'ftscfg' => 'cfgname'),
                                'multiaction' => 'dropmapping',
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'fulltext.php',
+                                               'urlvars' => array (
+                                                       'action' => 'dropmapping',
+                                                       'mapping' => field('name'),
+                                                       'ftscfg' => field('cfgname')
+                                               )
+                                       )
+                               )
                        ),
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "fulltext.php?action=altermapping&amp;{$misc->href}&amp;",
-                               'vars'  => array('mapping' => 'name', 'ftscfg' => 'cfgname'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'fulltext.php',
+                                               'urlvars' => array (
+                                                       'action' => 'altermapping',
+                                                       'mapping' => field('name'),
+                                                       'ftscfg' => field('cfgname')
+                                               )
+                                       )
+                               )
                        ),
                        'multiactions' => array(
                                'keycols' => array('mapping' => 'name'),
 
                );
 
-               $misc->printTable($map, $columns, $actions, $lang['strftsemptymap']);
+               $misc->printTable($map, $columns, $actions, 'fulltext-viewconfig', $lang['strftsemptymap']);
 
                $navlinks = array(
                        array (
index 84ef140af3aa775f71b49e7f6444ebbdd0c54678..cd36244b83dfc4fa764a30416bb84ecea4eaf4ef 100644 (file)
                                'url' => 'functions.php',
                        ),
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "functions.php?action=edit&amp;{$misc->href}&amp;",
-                               'vars'  => array('function' => 'proproto', 'function_oid' => 'prooid'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'functions.php',
+                                               'urlvars' => array (
+                                                       'action' => 'edit',
+                                                       'function' => field('proproto'),
+                                                       'function_oid' => field('prooid')
+                                               )
+                                       )
+                               )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "functions.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('function' => 'proproto', 'function_oid' => 'prooid'),
                                'multiaction' => 'confirm_drop',
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'functions.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'function' => field('proproto'),
+                                                       'function_oid' => field('prooid')
+                                               )
+                                       )
+                               )
                        ),
                        'privileges' => array(
-                               'title' => $lang['strprivileges'],
-                               'url'   => "privileges.php?{$misc->href}&amp;subject=function&amp;",
-                               'vars'  => array('function' => 'proproto', 'function_oid' => 'prooid'),
+                               'content' => $lang['strprivileges'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'privileges.php',
+                                               'urlvars' => array (
+                                                       'subject' => 'function',
+                                                       'function' => field('proproto'),
+                                                       'function_oid' => field('prooid')
+                                               )
+                                       )
+                               )
                        ),
                );
 
-               $misc->printTable($funcs, $columns, $actions, $lang['strnofunctions']);
+               $misc->printTable($funcs, $columns, $actions, 'functions-functions', $lang['strnofunctions']);
 
                $navlinks = array(
                        array (
index 18f009360143f3cdf7ef78d55e3838177802f849..1678b3a255d388838c9e89b5968ccb9cdddfe12e 100644 (file)
                $users = $data->getUsers();
                
                if ($groupdata->recordCount() > 0) {
-                       echo "<table>\n";
-               echo "<tr><th class=\"data\">{$lang['strmembers']}</th><th class=\"data\">{$lang['stractions']}</th></tr>\n";
-               $i = 0;
-               while (!$groupdata->EOF) {
-                                       $id = (($i % 2) == 0 ? '1' : '2');
-               echo "<tr class=\"data{$id}\"><td>", $misc->printVal($groupdata->fields['usename']), "</td>\n";
-                                       echo "<td class=\"opbutton{$id}\"><a href=\"groups.php?action=confirm_drop_member&{$misc->href}&group=",
-                                               urlencode($_REQUEST['group']), "&user=", urlencode($groupdata->fields['usename']), "\">{$lang['strdrop']}</a></td>\n";
-               echo "</tr>\n";
-               $groupdata->moveNext();
-               }
-                       echo "</table>\n";
+                       $columns = array (
+                               'members' => array (
+                                       'title' => $lang['strmembers'],
+                                       'field' => field('usename')
+                               ),
+                               'actions' => array (
+                                       'title' => $lang['stractions'],
+                               )
+                       );
+
+                       $actions = array (
+                               'drop' => array (
+                                       'content' => $lang['strdrop'],
+                                               'attr'=> array (
+                                                       'href' => array (
+                                                               'url' => 'groups.php',
+                                                               'urlvars' => array (
+                                                                       'action' => 'confirm_drop_member',
+                                                                       'group' => $_REQUEST['group'],
+                                                                       'user' => field('usename')
+                                                               )
+                                                       )
+                                               )
+                               )
+                       );
+
+                       $misc->printTable($groupdata, $columns, $actions, 'groups-properties', $lang['strnousers']);
                }
-               else echo "<p>{$lang['strnousers']}</p>\n";
 
                // Display form for adding a user to the group                  
                echo "<form action=\"groups.php\" method=\"post\">\n";
                
                $actions = array(
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "groups.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('group' => 'groname'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'groups.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'group' => field('groname')
+                                               )
+                                       )
+                               )
                        ),
                );
                
-               $misc->printTable($groups, $columns, $actions, $lang['strnogroups']);
+               $misc->printTable($groups, $columns, $actions, 'groups-properties', $lang['strnogroups']);
                
                $misc->printNavLinks(array (array (
                                'attr'=> array (
index c0db8188ad6a1206baa181abb10d604180d81ece..c16caa1b6e6957c7ec36970a85bcdc3c3d7bc8db 100644 (file)
 
                        $actions = array(
                                'run' => array(
-                                       'title' => $lang['strexecute'],
-                                       'url'   => "sql.php?{$misc->href}&amp;nohistory=t&amp;subject=history&amp;",
-                                       'vars'  => array('queryid' => 'queryid', 'paginate' => 'paginate'),
-                                       'target' => 'detail',
+                                       'content' => $lang['strexecute'],
+                                       'attr'=> array (
+                                               'href' => array (
+                                                       'url' => 'sql.php',
+                                                       'urlvars' => array (
+                                                               'subject' => 'history',
+                                                               'nohistory' => 't',
+                                                               'queryid' => field('queryid'),
+                                                               'paginate' => field('paginate')
+                                                       )
+                                               ),
+                                               'target' => 'detail'
+                                       )
                                ),
                                'remove' => array(
-                                       'title' => $lang['strdelete'],
-                                       'url'   => "history.php?{$misc->href}&amp;action=confdelhistory&amp;",
-                                       'vars'  => array('queryid' => 'queryid'),
-                               ),
+                                       'content' => $lang['strdelete'],
+                                       'attr'=> array (
+                                               'href' => array (
+                                                       'url' => 'history.php',
+                                                       'urlvars' => array (
+                                                               'action' => 'confdelhistory',
+                                                               'queryid' => field('queryid'),
+                                                       )
+                                               )
+                                       )
+                               )
                        );
 
-                       $misc->printTable($history, $columns, $actions, $lang['strnohistory']);
+                       $misc->printTable($history, $columns, $actions, 'history-history', $lang['strnohistory']);
                }
                else echo "<p>{$lang['strnohistory']}</p>\n";
 
index fa5f296c5258aa024ac6c6287b82e83d10b4396c..113a26d45f1cf0907ec27875cb886444adc655d6 100644 (file)
                                'field' => field('idxcomment'),
                        ),
                );
-               
+
                $actions = array(
                        'cluster' => array(
-                               'title' => $lang['strclusterindex'],
-                               'url'   => "indexes.php?action=confirm_cluster_index&amp;{$misc->href}&amp;table=".urlencode($_REQUEST['table'])."&amp;",
-                               'vars'  => array('index' => 'indname'),
+                               'content' => $lang['strclusterindex'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'indexes.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_cluster_index',
+                                                       'table' => $_REQUEST['table'],
+                                                       'index' => field('indname')
+                                               )
+                                       )
+                               )
                        ),
                        'reindex' => array(
-                               'title' => $lang['strreindex'],
-                               'url'   => "indexes.php?action=reindex&amp;{$misc->href}&amp;table=".urlencode($_REQUEST['table'])."&amp;",
-                               'vars'  => array('index' => 'indname'),
+                               'content' => $lang['strreindex'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'indexes.php',
+                                               'urlvars' => array (
+                                                       'action' => 'reindex',
+                                                       'table' => $_REQUEST['table'],
+                                                       'index' => field('indname')
+                                               )
+                                       )
+                               )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "indexes.php?action=confirm_drop_index&amp;{$misc->href}&amp;table=".urlencode($_REQUEST['table'])."&amp;",
-                               'vars'  => array('index' => 'indname'),
-                       ),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'indexes.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop_index',
+                                                       'table' => $_REQUEST['table'],
+                                                       'index' => field('indname')
+                                               )
+                                       )
+                               )
+                       )
                );
                
-               $misc->printTable($indexes, $columns, $actions, $lang['strnoindexes'], 'indPre');
+               $misc->printTable($indexes, $columns, $actions, 'indexes-indexes', $lang['strnoindexes'], 'indPre');
                
                $misc->printNavLinks(array (
                        array (
index 11b5bf1ffb35513ffd2f7e514fd4c71b6e5a2147..cfb6e8d30c543acff3be746c433ad480376502d5 100644 (file)
--- a/info.php
+++ b/info.php
                        // Referring foreign tables
                        if ($referrers !== -99 && $referrers->recordCount() > 0) {
                                echo "<h3>{$lang['strreferringtables']}</h3>\n";
-                               echo "<table>\n";
-                               echo "\t<tr>\n\t\t";
-                               echo "<th class=\"data\">{$lang['strschema']}</th>";
-                               echo "<th class=\"data\">{$lang['strtable']}</th>";
-                               echo "<th class=\"data\">{$lang['strname']}</th><th class=\"data\">{$lang['strdefinition']}</th>";
-                               echo "<th class=\"data\">{$lang['stractions']}</th>\n";
-                               echo "\t</tr>\n";
-                               $i = 0;
-                               
-                               while (!$referrers->EOF) {
-                                       $id = ( ($i % 2 ) == 0 ? '1' : '2' );
-                                       echo "\t<tr class=\"data{$id}\">\n\t\t";
-                                       echo "<td>", $misc->printVal($referrers->fields['nspname']), "</td>";
-                                       echo "<td>", $misc->printVal($referrers->fields['relname']), "</td>";
-                                       echo "<td>", $misc->printVal($referrers->fields['conname']), "</td>";
-                                       echo "<td>", $misc->printVal($referrers->fields['consrc']), "</td>";
-                                       echo "<td class=\"opbutton{$id}\"><a href=\"constraints.php?{$misc->href}", 
-                                               "&amp;schema=", urlencode($referrers->fields['nspname']),
-                                               "&amp;table=", urlencode($referrers->fields['relname']), "\">{$lang['strproperties']}</a></td>\n";
-                                       echo "\t</tr>\n";
-                                       $referrers->movenext();
-                                       $i++;
-                               }
-       
-                               echo "</table>\n";
+
+                               $columns = array (
+                                       'schema' => array (
+                                               'title' => $lang['strschema'],
+                                               'field' => field('nspname')
+                                       ),
+                                       'table' => array (
+                                               'title' => $lang['strtable'],
+                                               'field' => field('relname'),
+                                       ),
+                                       'name' => array (
+                                               'title' => $lang['strname'],
+                                               'field' => field('conname'),
+                                       ),
+                                       'definition' => array (
+                                               'title' => $lang['strdefinition'],
+                                               'field' => field('consrc'),
+                                       ),
+                                       'actions' => array (
+                                               'title' => $lang['stractions'],
+                                       )
+                               );
+
+                               $actions = array (
+                                       'properties' => array (
+                                               'content' => $lang['strproperties'],
+                                               'attr'=> array (
+                                                       'href' => array (
+                                                               'url' => 'constraints.php',
+                                                               'urlvars' => array (
+                                                                       'schema' => field('nspname'),
+                                                                       'table' => field('relname')
+                                                               )
+                                                       )
+                                               )
+                                       )
+                               );
+
+                               $misc->printTable($referrers, $columns, $actions, 'info-referrers', $lang['strnodata']);
                        }
                        
                        // Parent tables
                        if ($parents->recordCount() > 0) {
                                echo "<h3>{$lang['strparenttables']}</h3>\n";
-                               echo "<table>\n";
-                               echo "\t<tr>\n\t\t";
-                               echo "<th class=\"data\">{$lang['strschema']}</th>";
-                               echo "\t\t<th class=\"data\">{$lang['strtable']}</th>";                 
-                               echo "<th class=\"data\">{$lang['stractions']}</th>\n";
-                               echo "\t</tr>\n";
-                               $i = 0;
-                               
-                               while (!$parents->EOF) {
-                                       $id = ( ($i % 2 ) == 0 ? '1' : '2' );
-                                       echo "\t<tr class=\"data{$id}\">\n";
-                                       echo "\t\t<td>", $misc->printVal($parents->fields['nspname']), "</td>";
-                                       echo "<td>", $misc->printVal($parents->fields['relname']), "</td>";
-                                       echo "<td class=\"opbutton{$id}\"><a href=\"tblproperties.php?{$misc->href}",
-                                               "&amp;schema=", urlencode($parents->fields['nspname']),
-                                               "&amp;table=", urlencode($parents->fields['relname']), "\">{$lang['strproperties']}</a></td>\n";
-                                       echo "\t</tr>\n";
-                                       $parents->movenext();
-                                       $i++;
-                               }
-       
-                               echo "</table>\n";
+
+                               $columns = array (
+                                       'schema' => array (
+                                               'title' => $lang['strschema'],
+                                               'field' => field('nspname')
+                                       ),
+                                       'table' => array (
+                                               'title' => $lang['strtable'],
+                                               'field' => field('relname'),
+                                       ),
+                                               'actions' => array (
+                                               'title' => $lang['stractions'],
+                                       )
+                               );
+
+                               $actions = array (
+                                       'properties' => array (
+                                               'content' => $lang['strproperties'],
+                                               'attr'=> array (
+                                                       'href' => array (
+                                                               'url' => 'tblproperties.php',
+                                                               'urlvars' => array (
+                                                                       'schema' => field('nspname'),
+                                                                       'table' => field('relname')
+                                                               )
+                                                       )
+                                               )
+                                       )
+                               );
+
+                               $misc->printTable($parents, $columns, $actions, 'info-parents', $lang['strnodata']);
                        }
        
                        // Child tables
                        if ($children->recordCount() > 0) {
                                echo "<h3>{$lang['strchildtables']}</h3>\n";
-                               echo "<table>\n";
-                               echo "\t<tr>\n";
-                               echo "<th class=\"data\">{$lang['strschema']}</th>";
-                               echo "\t\t<th class=\"data\">{$lang['strtable']}</th>";                 
-                               echo "<th class=\"data\">{$lang['stractions']}</th>\n";
-                               echo "\t</tr>\n";
-                               $i = 0;
+
+                               $columns = array (
+                                       'schema' => array (
+                                               'title' => $lang['strschema'],
+                                               'field' => field('nspname')
+                                       ),
+                                       'table' => array (
+                                               'title' => $lang['strtable'],
+                                               'field' => field('relname'),
+                                       ),
+                                       'actions' => array (
+                                               'title' => $lang['stractions'],
+                                       )
+                               );
                                
-                               while (!$children->EOF) {
-                                       $id = ( ($i % 2 ) == 0 ? '1' : '2' );
-                                       echo "\t<tr class=\"data{$id}\">\n";
-                                       echo "\t\t<td>", $misc->printVal($children->fields['nspname']), "</td>";
-                                       echo "<td>", $misc->printVal($children->fields['relname']), "</td>";
-                                       echo "<td class=\"opbutton{$id}\"><a href=\"tblproperties.php?{$misc->href}",
-                                               "&amp;schema=", urlencode($children->fields['nspname']),
-                                               "&amp;table=", urlencode($children->fields['relname']), "\">{$lang['strproperties']}</a></td>\n";
-                                       echo "\t</tr>\n";
-                                       $children->movenext();
-                                       $i++;
-                               }
-       
-                               echo "</table>\n";
+                               $actions = array (
+                                       'properties' => array (
+                                               'content' => $lang['strproperties'],
+                                               'attr'=> array (
+                                                       'href' => array (
+                                                               'url' => 'tblproperties.php',
+                                                               'urlvars' => array (
+                                                                       'schema' => field('nspname'),
+                                                                       'table' => field('relname')
+                                                               )
+                                                       )
+                                               )
+                                       )
+                               );
+                               
+                               $misc->printTable($children, $columns, $actions, 'info-children', $lang['strnodata']);
+
                        }
 
                        // Row performance
index 6ce806fd3b729466ea5698439cfac884bc3e38a9..c201aba77c127d83ce9b2ecd0a593050742f02c5 100644 (file)
@@ -43,7 +43,7 @@
 
                $actions = array();
 
-               $misc->printTable($languages, $columns, $actions, $lang['strnolanguages']);
+               $misc->printTable($languages, $columns, $actions, 'languages-languages', $lang['strnolanguages']);
        }
 
        /**
index 24c0bbdd9e7da75a37650bbd1abe1579786ec6a2..9446dbad137d0ee8e3f8a5d9ba8196a2f75cb249 100644 (file)
@@ -51,7 +51,7 @@
                
                $actions = array();
                
-               $misc->printTable($opclasses, $columns, $actions, $lang['strnoopclasses']);
+               $misc->printTable($opclasses, $columns, $actions, 'opclasses-opclasses', $lang['strnoopclasses']);
        }
        
        /**
index 02a886f3a27b37699cb98f02b289a1cfcdd9d15e..4aa0b10b1459324dd442af10704dccfccc13e8b4 100644 (file)
                
                $operators = $data->getOperators();
 
+               error_log(print_r($operators, 1));
+
                $columns = array(
                        'operator' => array(
                                'title' => $lang['stroperator'],
 
                $actions = array(
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "operators.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('operator' => 'oprname', 'operator_oid' => 'oid'),
-                       ),
+                               // 'title' => $lang['strdrop'],
+                               // 'url'   => "operators.php?action=confirm_drop&amp;{$misc->href}&amp;",
+                               // 'vars'  => array('operator' => 'oprname', 'operator_oid' => 'oid'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'operators.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'operator' => field('oprname'),
+                                                       'operator_oid' => field('oid')
+                                               )
+                                       )
+                               )
+                       )
                );
                
-               $misc->printTable($operators, $columns, $actions, $lang['strnooperators']);
+               $misc->printTable($operators, $columns, $actions, 'operators-operators', $lang['strnooperators']);
                
 //             TODO operators.php action=create $lang['strcreateoperator']
        }
index 005ce03e4a9b3e71eab96ead8e56b5ad10800e83..89fac6bde47678e039d5225221facc2910a12500 100644 (file)
                        else
                                doDefault($lang['strreportdroppedbad']);
                }
-
        }
 
        /**
                
                $actions = array(
                        'run' => array(
-                               'title' => $lang['strexecute'],
-                               'url'   => "sql.php?subject=report&amp;{$misc->href}&amp;return=report&amp;",
-                               'vars'  => array('report' => 'report_name', 'database' => 'db_name', 'reportid' => 'report_id', 'paginate' => 'paginate'),
+                               'content' => $lang['strexecute'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'sql.php',
+                                               'urlvars' => array (
+                                                       'subject' => 'report',
+                                                       'return' => 'report',
+                                                       'report' => field('report_name'),
+                                                       'database' => field('db_name'),
+                                                       'reportid' => field('report_id'),
+                                                       'paginate' => field('paginate')
+                                               )
+                                       )
+                               )
                        ),
                        'edit' => array(
-                               'title' => $lang['stredit'],
-                               'url'   => "reports.php?action=edit&amp;{$misc->href}&amp;",
-                               'vars'  => array('report_id' => 'report_id'),
+                               'content' => $lang['stredit'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'reports.php',
+                                               'urlvars' => array (
+                                                       'action' => 'edit',
+                                                       'report_id' => field('report_id')
+                                               )
+                                       )
+                               )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "reports.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('report_id' => 'report_id'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'reports.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'report_id' => field('report_id')
+                                               )
+                                       )
+                               )
                        ),
                );
                
-               $misc->printTable($reports, $columns, $actions, $lang['strnoreports']);
+               $misc->printTable($reports, $columns, $actions, 'reports-reports', $lang['strnoreports']);
                
                $urlvars = array ('server' => $_REQUEST['server']);
                if (isset($_REQUEST['database'])) $urlvars['database'] = $_REQUEST['database'];
index e57ce6c5529b861defe23caf1c7296c1ea3a8ff8..d705e9732bbdd965de6ec9eaceef0951d87b2a00 100644 (file)
--- a/roles.php
+++ b/roles.php
                
                $actions = array(
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "roles.php?action=alter&amp;{$misc->href}&amp;",
-                               'vars'  => array('rolename' => 'rolname'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'roles.php',
+                                               'urlvars' => array (
+                                                       'action' => 'alter',
+                                                       'rolename' => field('rolname')
+                                               )
+                                       )
+                               )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "roles.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('rolename' => 'rolname'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'roles.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'rolename' => field('rolname')
+                                               )
+                                       )
+                               )
                        ),
                );
                
-               $misc->printTable($roles, $columns, $actions, $lang['strnoroles']);
+               $misc->printTable($roles, $columns, $actions, 'roles-roles', $lang['strnoroles']);
 
                $navlinks = array (
                        array (
index 89bc9a926591a3a87646e0905cdec352b6f5378d..ffe881570f30eb53a34ec35bff4a4864a65611ea 100644 (file)
--- a/rules.php
+++ b/rules.php
 
                $actions = array(
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "rules.php?action=confirm_drop&amp;{$misc->href}&amp;reltype={$subject}&amp;{$subject}={$object}&amp;subject=rule&amp;",
-                               'vars'  => array('rule' => 'rulename'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'rules.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'reltype' => $subject,
+                                                       $subject => $object,
+                                                       'subject' => 'rule',
+                                                       'rule' => field('rulename')
+                                               )
+                                       )
+                               )
                        ),
                );
 
-               $misc->printTable($rules, $columns, $actions, $lang['strnorules']);
+               $misc->printTable($rules, $columns, $actions, 'rules-rules', $lang['strnorules']);
 
                $misc->printNavLinks(array (array (
                                'attr'=> array (
index 0935f016973ffee5df84b58f54e8ad9edf6206dc..73b74b77d06a99eb90ba4c0fc48a4cddc0e13b32 100755 (executable)
                                'url' => 'schemas.php',
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "schemas.php?action=drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('nsp' => 'nspname'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'schemas.php',
+                                               'urlvars' => array (
+                                                       'action' => 'drop',
+                                                       'nsp' => field('nspname')
+                                               )
+                                       )
+                               ),
                                'multiaction' => 'drop',
                        ),
                        'privileges' => array(
-                               'title' => $lang['strprivileges'],
-                               'url'   => "privileges.php?subject=schema&amp;{$misc->href}&amp;",
-                               'vars'  => array('schema' => 'nspname'),
+                               'content' => $lang['strprivileges'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'privileges.php',
+                                               'urlvars' => array (
+                                                       'subject' => 'schema',
+                                                       'schema' => field('nspname')
+                                               )
+                                       )
+                               )
                        ),
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "schemas.php?action=alter&amp;{$misc->href}&amp;",
-                               'vars'  => array('schema' => 'nspname'),
-                       ),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'schemas.php',
+                                               'urlvars' => array (
+                                                       'action' => 'alter',
+                                                       'schema' => field('nspname')
+                                               )
+                                       )
+                               )
+                       )
                );
 
                if (!$data->hasAlterSchema()) unset($actions['alter']);
 
-               $misc->printTable($schemas, $columns, $actions, $lang['strnoschemas']);
+               $misc->printTable($schemas, $columns, $actions, 'schemas-schemas', $lang['strnoschemas']);
 
                $misc->printNavLinks(array (array (
                                'attr'=> array (
index 433ed61cb55433071f6b64d1795a94f260bb9986..5d72e575addc042191698298a56af67edb91d853 100644 (file)
                                'url' => 'sequences.php',
                        ),
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "sequences.php?action=confirm_alter&amp;{$misc->href}&amp;subject=sequence&amp;",
-                               'vars'  => array('sequence' => 'seqname'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'sequences.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_alter',
+                                                       'subject' => 'sequence',
+                                                       'sequence' => field('seqname')
+                                               )
+                                       )
+                               )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "sequences.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('sequence' => 'seqname'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'sequences.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'sequence' => field('seqname')
+                                               )
+                                       )
+                               ),
                                'multiaction' => 'confirm_drop',
                        ),
                        'privileges' => array(
-                               'title' => $lang['strprivileges'],
-                               'url'   => "privileges.php?{$misc->href}&amp;subject=sequence&amp;",
-                               'vars'  => array('sequence' => 'seqname'),
+                               'content' => $lang['strprivileges'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'privileges.php',
+                                               'urlvars' => array (
+                                                       'subject' => 'sequence',
+                                                       'sequence' => field('seqname')
+                                               )
+                                       )
+                               )
                        ),
                );
 
-               $misc->printTable($sequences, $columns, $actions, $lang['strnosequences']);
+               $misc->printTable($sequences, $columns, $actions, 'sequences-sequences', $lang['strnosequences']);
 
                $misc->printNavLinks(array (array (
                                'attr'=> array (
index 505835444fc11a08aeb33aae94c6e0c3dbe79f81..ae8647a8b16ed7cc46e24f9a16603faf72bbe941 100644 (file)
                
                $actions = array(
                        'logout' => array(
-                               'title' => $lang['strlogout'],
-                               'url'   => "servers.php?action=logout&amp;",
-                               'vars'  => array('logoutServer' => 'id'),
+                               'content' => $lang['strlogout'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'servers.php',
+                                               'urlvars' => array (
+                                                       'action' => 'logout',
+                                                       'logoutServer' => field('id')
+                                               )
+                                       )
+                               )
                        ),
                );
                
                        $misc->printTitle(sprintf($lang['strgroupservers'],htmlentities($conf['srv_groups'][$group]['desc'], ENT_QUOTES, 'UTF-8')));
                        $actions['logout']['url'] .= "group=" . htmlentities($group, ENT_COMPAT, 'UTF-8') . "&amp;";
                }
-               
-               $misc->printTable($servers, $columns, $actions, $lang['strnoobjects'], 'svPre');
+
+               $misc->printTable($servers, $columns, $actions, 'servers-servers', $lang['strnoobjects'], 'svPre');
        }
        
        function doTree() {
index 34009aacfeece7bf26228a23144e35932c36bcb1..caf59cb467fcf6021d9ac3f635ca037aa888b7a9 100644 (file)
                                'default' => 'analyze',
                        ),
                        'browse' => array(
-                               'title' => $lang['strbrowse'],
-                               'url'   => "display.php?{$misc->href}&amp;subject=table&amp;return=schema&amp;",
-                               'vars'  => array('table' => 'relname'),
+                               'content' => $lang['strbrowse'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'display.php',
+                                               'urlvars' => array (
+                                                       'subject' => 'table',
+                                                       'return' => 'schema',
+                                                       'table' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
                        'select' => array(
-                               'title' => $lang['strselect'],
-                               'url'   => "tables.php?action=confselectrows&amp;{$misc->href}&amp;",
-                               'vars'  => array('table' => 'relname'),
+                               'content' => $lang['strselect'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'tables.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confselectrows',
+                                                       'table' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
                        'insert' => array(
-                               'title' => $lang['strinsert'],
-                               'url'   => "tables.php?action=confinsertrow&amp;{$misc->href}&amp;",
-                               'vars'  => array('table' => 'relname'),
+                               'content' => $lang['strinsert'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'tables.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confinsertrow',
+                                                       'table' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
                        'empty' => array(
-                               'title' => $lang['strempty'],
-                               'url'   => "tables.php?action=confirm_empty&amp;{$misc->href}&amp;",
-                               'vars'  => array('table' => 'relname'),
                                'multiaction' => 'confirm_empty',
+                               'content' => $lang['strempty'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'tables.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_empty',
+                                                       'table' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "tblproperties.php?action=confirm_alter&amp;{$misc->href}&amp;",
-                               'vars'  => array('table' => 'relname'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'tblproperties.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_alter',
+                                                       'table' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "tables.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('table' => 'relname'),
                                'multiaction' => 'confirm_drop',
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'tables.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'table' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
                        'vacuum' => array(
-                               'title' => $lang['strvacuum'],
-                               'url'   => "tables.php?action=confirm_vacuum&amp;{$misc->href}&amp;",
-                               'vars'  => array('table' => 'relname'),
                                'multiaction' => 'confirm_vacuum',
+                               'content' => $lang['strvacuum'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'tables.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_vacuum',
+                                                       'table' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
                        'analyze' => array(
-                               'title' => $lang['stranalyze'],
-                               'url'   => "tables.php?action=confirm_analyze&amp;{$misc->href}&amp;",
-                               'vars'  => array('table' => 'relname'),
                                'multiaction' => 'confirm_analyze',
+                               'content' => $lang['stranalyze'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'tables.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_analyze',
+                                                       'table' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
                        'reindex' => array(
-                               'title' => $lang['strreindex'],
-                               'url'   => "tables.php?action=confirm_reindex&amp;{$misc->href}&amp;",
-                               'vars'  => array('table' => 'relname'),
                                'multiaction' => 'confirm_reindex',
-                       ),
+                               'content' => $lang['strreindex'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'tables.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_reindex',
+                                                       'table' => field('relname')
+                                               )
+                                       )
+                               )
+                       )
                        //'cluster' TODO ?
                );
 
                if (!$data->hasTablespaces()) unset($columns['tablespace']);
 
-               $misc->printTable($tables, $columns, $actions, $lang['strnotables']);
+               $misc->printTable($tables, $columns, $actions, 'tables-tables', $lang['strnotables']);
 
                $navlinks = array (
                        array (
index c9cfb7ff52a08384d310d43a754c54a8d3d792e0..90b33c46e062f23df61a3506f02bd05ee0400bcc 100755 (executable)
                
                $actions = array(
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "tablespaces.php?action=edit&amp;{$misc->href}&amp;",
-                               'vars'  => array('tablespace' => 'spcname')
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'tablespaces.php',
+                                               'urlvars' => array (
+                                                       'action' => 'edit',
+                                                       'tablespace' => field('spcname')
+                                               )
+                                       )
+                               )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "tablespaces.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('tablespace' => 'spcname')
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'tablespaces.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'tablespace' => field('spcname')
+                                               )
+                                       )
+                               )
                        ),
                        'privileges' => array(
-                               'title' => $lang['strprivileges'],
-                               'url'   => "privileges.php?subject=tablespace&amp;{$misc->href}&amp;",
-                               'vars'  => array('tablespace' => 'spcname')
+                               'content' => $lang['strprivileges'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'privileges.php',
+                                               'urlvars' => array (
+                                                       'subject' => 'tablespace',
+                                                       'tablespace' => field('spcname')
+                                               )
+                                       )
+                               )
                        )
                );
                                
-               $misc->printTable($tablespaces, $columns, $actions, $lang['strnotablespaces']);
+               $misc->printTable($tablespaces, $columns, $actions, 'tablespaces-tablespaces', $lang['strnotablespaces']);
                
                $misc->printNavLinks(array (array (
                                'attr'=> array (
index 5eeccf3701a2f1976e67671784298b271b7b9740..dcb67f0d5c698b13759780276a2426b0521d6c7a 100644 (file)
                        $data->fieldClean($attname);
                        $data->fieldClean($table);
 
-                       $actions['browse']['url'] .= 'query=' . urlencode("SELECT \"{$attname}\", count(*) AS \"count\"
-                               FROM \"{$table}\" GROUP BY \"{$attname}\" ORDER BY \"{$attname}\"") . '&amp;';
+                       $actions['browse']['attr']['href']['urlvars']['query'] = "SELECT \"{$attname}\", count(*) AS \"count\"
+                               FROM \"{$table}\" GROUP BY \"{$attname}\" ORDER BY \"{$attname}\"";
+
                        return $actions;
                }
 
                        ),
                );
 
-               $misc->printTable($attrs, $columns, $actions, null, 'attPre');
+               $actions = array(
+                       'browse' => array(
+                               'content' => $lang['strbrowse'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'display.php',
+                                               'urlvars' => array (
+                                                       'table' => $_REQUEST['table'],
+                                                       'subject' => 'column',
+                                                       'return' => 'table',
+                                                       'column' => field('attname')
+                                               )
+                                       )
+                               )
+                       ),
+                       'alter' => array(
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'colproperties.php',
+                                               'urlvars' => array (
+                                                       'subject' => 'column',
+                                                       'action' => 'properties',
+                                                       'table' => $_REQUEST['table'],
+                                                       'column' => field('attname')
+                                               )
+                                       )
+                               )
+                       ),
+                       'privileges' => array(
+                               'content' => $lang['strprivileges'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'privileges.php',
+                                               'urlvars' => array (
+                                                       'subject' => 'column',
+                                                       'table' => $_REQUEST['table'],
+                                                       'column' => field('attname')
+                                               )
+                                       )
+                               )
+                       ),
+                       'drop' => array(
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'tblproperties.php',
+                                               'urlvars' => array (
+                                                       'subject' => 'column',
+                                                       'action' => 'confirm_drop',
+                                                       'table' => $_REQUEST['table'],
+                                                       'column' => field('attname')
+                                               )
+                                       )
+                               )
+                       ),
+               );
+
+               $misc->printTable($attrs, $columns, $actions, 'tblproperties-tblproperties', null, 'attPre');
 
                $navlinks = array (
                        array (
index 90d05348d536f08e0ce695ab23ef983d36dc1da1..cd8fb31b181595c4c64bb8861b579dfea3c0b0c2 100644 (file)
 
                $actions = array(
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "triggers.php?action=confirm_alter&amp;{$misc->href}&amp;table=".urlencode($_REQUEST['table'])."&amp;",
-                               'vars'  => array('trigger' => 'tgname'),
+                               'content' => $lang['stralter'],
+                                       'attr'=> array (
+                                               'href' => array (
+                                                       'url' => 'triggers.php',
+                                                       'urlvars' => array (
+                                                               'action' => 'confirm_alter',
+                                                               'table' => $_REQUEST['table'],
+                                                               'trigger' => field('tgname')
+                                                       )
+                                               )
+                                       )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "triggers.php?action=confirm_drop&amp;{$misc->href}&amp;table=".urlencode($_REQUEST['table'])."&amp;",
-                               'vars'  => array('trigger' => 'tgname'),
+                               'content' => $lang['strdrop'],
+                                       'attr'=> array (
+                                               'href' => array (
+                                                       'url' => 'triggers.php',
+                                                       'urlvars' => array (
+                                                               'action' => 'confirm_drop',
+                                                               'table' => $_REQUEST['table'],
+                                                               'trigger' => field('tgname')
+                                                       )
+                                               )
+                                       )
                        ),
                );
                if($data->hasDisableTriggers()) {
-                               $actions['enable'] = array(
-                                       'title' => $lang['strenable'],
-                                       'url'   => "triggers.php?action=confirm_enable&amp;{$misc->href}&amp;table=".urlencode($_REQUEST['table'])."&amp;",
-                                       'vars'  => array('trigger' => 'tgname'),
-                               );
-                               $actions['disable'] = array(
-                                       'title' => $lang['strdisable'],
-                                       'url'   => "triggers.php?action=confirm_disable&amp;{$misc->href}&amp;table=".urlencode($_REQUEST['table'])."&amp;",
-                                       'vars'  => array('trigger' => 'tgname'),
-                               );
+                       $actions['enable'] = array(
+                               'content' => $lang['strenable'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'triggers.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_enable',
+                                                       'table' => $_REQUEST['table'],
+                                                       'trigger' => field('tgname')
+                                               )
+                                       )
+                               )
+                       );
+                       $actions['disable'] = array(
+                               'content' => $lang['strdisable'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'triggers.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_disable',
+                                                       'table' => $_REQUEST['table'],
+                                                       'trigger' => field('tgname')
+                                               )
+                                       )
+                               )
+                       );
                }
 
-               $misc->printTable($triggers, $columns, $actions, $lang['strnotriggers'], 'tgPre');
+               $misc->printTable($triggers, $columns, $actions, 'triggers-triggers', $lang['strnotriggers'], 'tgPre');
                
                $misc->printNavLinks(array (array (
                                'attr'=> array (
index 0fd13227f29f6006b0fad55d59ad0bae399ca084..8d23edf4db5e99478870accd1d4016ba5b91cecd 100644 (file)
--- a/types.php
+++ b/types.php
@@ -54,7 +54,7 @@
                                
                                $actions = array();
                                
-                               $misc->printTable($attrs, $columns, $actions, null, 'attPre');
+                               $misc->printTable($attrs, $columns, $actions, 'types-properties', null, 'attPre');
                                
                                break;
                        case 'e':
 
                $actions = array(
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "types.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('type' => 'basename'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'types.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'type' => field('basename')
+                                               )
+                                       )
+                               )
                        ),
                );
                
-               $misc->printTable($types, $columns, $actions, $lang['strnotypes']);
+               $misc->printTable($types, $columns, $actions, 'types-types', $lang['strnotypes']);
 
                $navlinks = array (
                        array (
index de88f2505a262b9cf71b60b6ee744c37349955bc..4672272c6e25681536f0d5015d1854783742aedd 100644 (file)
--- a/users.php
+++ b/users.php
                
                $actions = array(
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "users.php?action=edit&amp;{$misc->href}&amp;",
-                               'vars'  => array('username' => 'usename'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'users.php',
+                                               'urlvars' => array (
+                                                       'action' => 'edit',
+                                                       'username' => field('usename')
+                                               )
+                                       )
+                               )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "users.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('username' => 'usename'),
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'users.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'username' => field('usename')
+                                               )
+                                       )
+                               )
                        ),
                );
                
-               $misc->printTable($users, $columns, $actions, $lang['strnousers']);
+               $misc->printTable($users, $columns, $actions, 'users-users', $lang['strnousers']);
 
                $misc->printNavLinks(array (array (
                                'attr'=> array (
index 8fa8317df3f6383285c52572bd64608ac4988d94..531d7613e46a824efd7d43fa788f9875db25e806 100755 (executable)
                
                $actions = array(
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "viewproperties.php?action=properties&amp;{$misc->href}&amp;view=".urlencode($_REQUEST['view'])."&amp;",
-                               'vars'  => array('column' => 'attname'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'viewproperties.php',
+                                               'urlvars' => array (
+                                                       'action' => 'properties',
+                                                       'view' => $_REQUEST['view'],
+                                                       'column' => field('attname')
+                                               )
+                                       )
+                               )
                        ),
                );
                
-               $misc->printTable($attrs, $columns, $actions, null, 'attPre');
+               $misc->printTable($attrs, $columns, $actions, 'viewproperties-viewproperties', null, 'attPre');
        
                echo "<br />\n";
 
index c95830b598986037827019d26db3a8f9330f1124..a271d28249c435ea691269df95d404788c5124de 100644 (file)
--- a/views.php
+++ b/views.php
                                'url' => 'views.php',
                        ),
                        'browse' => array(
-                               'title' => $lang['strbrowse'],
-                               'url'   => "display.php?{$misc->href}&amp;subject=view&amp;return=schema&amp;",
-                               'vars'  => array('view' => 'relname'),
+                               'content' => $lang['strbrowse'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'display.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confselectrows',
+                                                       'subject' => 'view',
+                                                       'return' => 'schema',
+                                                       'view' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
                        'select' => array(
-                               'title' => $lang['strselect'],
-                               'url'   => "views.php?action=confselectrows&amp;{$misc->href}&amp;",
-                               'vars'  => array('view' => 'relname'),
+                               'content' => $lang['strselect'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'views.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confselectrows',
+                                                       'view' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
-                       
+
 // Insert is possible if the relevant rule for the view has been created.
 //                     'insert' => array(
 //                             'title' => $lang['strinsert'],
                        //                      ),
 
                        'alter' => array(
-                               'title' => $lang['stralter'],
-                               'url'   => "viewproperties.php?action=confirm_alter&amp;{$misc->href}&amp;",
-                               'vars'  => array('view' => 'relname'),
+                               'content' => $lang['stralter'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'viewproperties.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_alter',
+                                                       'view' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
                        'drop' => array(
-                               'title' => $lang['strdrop'],
-                               'url'   => "views.php?action=confirm_drop&amp;{$misc->href}&amp;",
-                               'vars'  => array('view' => 'relname'),
                                'multiaction' => 'confirm_drop',
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'views.php',
+                                               'urlvars' => array (
+                                                       'action' => 'confirm_drop',
+                                                       'view' => field('relname')
+                                               )
+                                       )
+                               )
                        ),
                );
                
-               $misc->printTable($views, $columns, $actions, $lang['strnoviews']);
+               $misc->printTable($views, $columns, $actions, 'views-views',  $lang['strnoviews']);
                
                $navlinks = array (
                        array (