/**
  * Test for PMA_selectServer
  *
  * @return void
  */
 public function testPMASelectServer()
 {
     $not_only_options = false;
     $omit_fieldset = false;
     $GLOBALS['cfg']['DefaultTabServer'] = "welcome";
     $GLOBALS['cfg']['Servers'] = array('0' => array('host' => 'host0', 'port' => 'port0', 'only_db' => 'only_db0', 'user' => 'user0', 'auth_type' => 'config'), '1' => array('host' => 'host1', 'port' => 'port1', 'only_db' => 'only_db1', 'user' => 'user1', 'auth_type' => 'config'));
     //$not_only_options=false & $omit_fieldset=false
     $html = PMA_selectServer($not_only_options, $omit_fieldset);
     $server = $GLOBALS['cfg']['Servers']['0'];
     //server items
     $this->assertContains($server['host'], $html);
     $this->assertContains($server['port'], $html);
     $this->assertContains($server['only_db'], $html);
     $this->assertContains($server['user'], $html);
     $not_only_options = true;
     $omit_fieldset = true;
     $GLOBALS['cfg']['DisplayServersList'] = null;
     //$not_only_options=true & $omit_fieldset=true
     $html = PMA_selectServer($not_only_options, $omit_fieldset);
     //$GLOBALS['cfg']['DefaultTabServer']
     $this->assertContains(PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabServer'], 'server'), $html);
     //labels
     $this->assertContains(__('Current server:'), $html);
     $this->assertContains('(' . __('Servers') . ')', $html);
     //server items
     $server = $GLOBALS['cfg']['Servers']['0'];
     $this->assertContains($server['host'], $html);
     $this->assertContains($server['port'], $html);
     $this->assertContains($server['only_db'], $html);
     $this->assertContains($server['user'], $html);
 }
Пример #2
0
/**
 * Builds the HTML td elements for one database to display in the list
 * of databases from server_databases.php (which can be modified by
 * db_create.php)
 *
 * @param array   $current           current database
 * @param boolean $is_superuser      user status
 * @param string  $url_query         url query
 * @param array   $column_order      column order
 * @param array   $replication_types replication types
 * @param array   $replication_info  replication info
 *
 * @return array $column_order, $out
 */
function PMA_buildHtmlForDb($current, $is_superuser, $url_query, $column_order, $replication_types, $replication_info)
{
    $out = '';
    if ($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) {
        $out .= '<td class="tool">';
        $out .= '<input type="checkbox" name="selected_dbs[]" class="checkall" ' . 'title="' . htmlspecialchars($current['SCHEMA_NAME']) . '" ' . 'value="' . htmlspecialchars($current['SCHEMA_NAME']) . '"';
        if ($GLOBALS['dbi']->isSystemSchema($current['SCHEMA_NAME'], true)) {
            $out .= ' disabled="disabled"';
        }
        $out .= ' /></td>';
    }
    $out .= '<td class="name">' . '<a href="' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . $url_query . '&amp;db=' . urlencode($current['SCHEMA_NAME']) . '" title="' . sprintf(__('Jump to database'), htmlspecialchars($current['SCHEMA_NAME'])) . '">' . ' ' . htmlspecialchars($current['SCHEMA_NAME']) . '</a>' . '</td>';
    foreach ($column_order as $stat_name => $stat) {
        if (array_key_exists($stat_name, $current)) {
            $unit = '';
            if (is_numeric($stat['footer'])) {
                $column_order[$stat_name]['footer'] += $current[$stat_name];
            }
            if ($stat['format'] === 'byte') {
                list($value, $unit) = PMA\libraries\Util::formatByteDown($current[$stat_name], 3, 1);
            } elseif ($stat['format'] === 'number') {
                $value = PMA\libraries\Util::formatNumber($current[$stat_name], 0);
            } else {
                $value = htmlentities($current[$stat_name], 0);
            }
            $out .= '<td class="value">';
            if (isset($stat['description_function'])) {
                $out .= '<dfn title="' . $stat['description_function']($current[$stat_name]) . '">';
            }
            $out .= $value;
            if (isset($stat['description_function'])) {
                $out .= '</dfn>';
            }
            $out .= '</td>';
            if ($stat['format'] === 'byte') {
                $out .= '<td class="unit">' . $unit . '</td>';
            }
        }
    }
    foreach ($replication_types as $type) {
        if ($replication_info[$type]['status']) {
            $out .= '<td class="tool" style="text-align: center;">';
            $key = array_search($current["SCHEMA_NAME"], $replication_info[$type]['Ignore_DB']);
            if (mb_strlen($key) > 0) {
                $out .= PMA\libraries\Util::getIcon('s_cancel.png', __('Not replicated'));
            } else {
                $key = array_search($current["SCHEMA_NAME"], $replication_info[$type]['Do_DB']);
                if (mb_strlen($key) > 0 || isset($replication_info[$type]['Do_DB'][0]) && $replication_info[$type]['Do_DB'][0] == "" && count($replication_info[$type]['Do_DB']) == 1) {
                    // if ($key != null) did not work for index "0"
                    $out .= PMA\libraries\Util::getIcon('s_success.png', __('Replicated'));
                }
            }
            $out .= '</td>';
        }
    }
    if ($is_superuser) {
        $out .= '<td class="tool">' . '<a onclick="' . 'PMA_commonActions.setDb(\'' . PMA_jsFormat($current['SCHEMA_NAME']) . '\');' . '" href="server_privileges.php' . $url_query . '&amp;db=' . urlencode($current['SCHEMA_NAME']) . '&amp;checkprivsdb=' . urlencode($current['SCHEMA_NAME']) . '" title="' . sprintf(__('Check privileges for database "%s".'), htmlspecialchars($current['SCHEMA_NAME'])) . '">' . ' ' . PMA\libraries\Util::getIcon('s_rights.png', __('Check privileges')) . '</a></td>';
    }
    return array($column_order, $out);
}
 /**
  * Test for PMA_getLinkToDbAndTable
  *
  * @return void
  */
 public function testPMAGetLinkToDbAndTable()
 {
     $url_dbname = "url_dbname";
     $dbname = "dbname";
     $tablename = "tablename";
     $html = PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename);
     //$dbname
     $this->assertContains(__('Database'), $html);
     $this->assertContains(PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database'), $html);
     $item = PMA_URL_getCommon(array('db' => $url_dbname, 'reload' => 1));
     $this->assertContains($item, $html);
     $this->assertContains(htmlspecialchars($dbname), $html);
     //$tablename
     $this->assertContains(__('Table'), $html);
     $this->assertContains(PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'), $html);
     $item = PMA_URL_getCommon(array('db' => $url_dbname, 'table' => $tablename, 'reload' => 1));
     $this->assertContains($item, $html);
     $this->assertContains(htmlspecialchars($tablename), $html);
     $item = PMA\libraries\Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']);
     $this->assertContains($item, $html);
 }
Пример #4
0
$target_blacklist = array('import.php', 'export.php');
// If we have a valid target, let's load that script instead
if (!empty($_REQUEST['target']) && is_string($_REQUEST['target']) && !preg_match('/^index/', $_REQUEST['target']) && !in_array($_REQUEST['target'], $target_blacklist) && in_array($_REQUEST['target'], $goto_whitelist)) {
    include $_REQUEST['target'];
    exit;
}
if (isset($_REQUEST['ajax_request']) && !empty($_REQUEST['access_time'])) {
    exit;
}
// See FAQ 1.34
if (!empty($_REQUEST['db'])) {
    $page = null;
    if (!empty($_REQUEST['table'])) {
        $page = PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table');
    } else {
        $page = PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database');
    }
    include $page;
    exit;
}
/**
 * Check if it is an ajax request to reload the recent tables list.
 */
if ($GLOBALS['is_ajax_request'] && !empty($_REQUEST['recent_table'])) {
    $response = PMA\libraries\Response::getInstance();
    $response->addJSON('list', RecentFavoriteTable::getInstance('recent')->getHtmlList());
    exit;
}
if ($GLOBALS['PMA_Config']->isGitRevision()) {
    if (isset($_REQUEST['git_revision']) && $GLOBALS['is_ajax_request'] == true) {
        PMA_printGitRevision();
Пример #5
0
         */
        $db_url_params['db'] = $_POST['new_db'];
        $is_superuser = $GLOBALS['dbi']->isSuperuser();
        $column_order = PMA_getColumnOrder();
        $url_query = PMA_URL_getCommon(array('db' => $_POST['new_db']));
        /**
         * String that will contain the output HTML
         * @name    $new_db_string
         */
        $new_db_string = '<tr>';
        if (empty($db_collation_for_ajax)) {
            $db_collation_for_ajax = PMA_getServerCollation();
        }
        // $dbstats comes from the create table dialog
        if (!empty($dbstats)) {
            $current = array('SCHEMA_NAME' => $_POST['new_db'], 'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax, 'SCHEMA_TABLES' => '0', 'SCHEMA_TABLE_ROWS' => '0', 'SCHEMA_DATA_LENGTH' => '0', 'SCHEMA_MAX_DATA_LENGTH' => '0', 'SCHEMA_INDEX_LENGTH' => '0', 'SCHEMA_LENGTH' => '0', 'SCHEMA_DATA_FREE' => '0');
        } else {
            $current = array('SCHEMA_NAME' => $_POST['new_db'], 'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax);
        }
        list($column_order, $generated_html) = PMA_buildHtmlForDb($current, $is_superuser, $url_query, $column_order, $replication_types, $GLOBALS['replication_info']);
        $new_db_string .= $generated_html;
        $new_db_string .= '</tr>';
        $response = PMA\libraries\Response::getInstance();
        $response->addJSON('message', $message);
        $response->addJSON('new_db_string', $new_db_string);
        $response->addJSON('sql_query', PMA\libraries\Util::getMessage(null, $sql_query, 'success'));
        $response->addJSON('url_query', PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . $url_query . '&amp;db=' . urlencode($current['SCHEMA_NAME']));
    } else {
        include_once '' . $cfg['DefaultTabDatabase'];
    }
}
Пример #6
0
 * Gets some core libraries
 */
require_once './libraries/bookmark.lib.php';
PMA\libraries\Util::checkParameters(array('db'));
global $cfg;
global $db;
$is_show_stats = $cfg['ShowStats'];
$db_is_system_schema = $GLOBALS['dbi']->isSystemSchema($db);
if ($db_is_system_schema) {
    $is_show_stats = false;
}
/**
 * Defines the urls to return to in case of error in a sql statement
 */
$err_url_0 = 'index.php' . PMA_URL_getCommon();
$err_url = PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . PMA_URL_getCommon(array('db' => $db));
/** @var String $pmaString */
$pmaString = $GLOBALS['PMA_String'];
/**
 * Ensures the database exists (else move to the "parent" script) and displays
 * headers
 */
if (!isset($is_db) || !$is_db) {
    if (mb_strlen($db)) {
        $is_db = $GLOBALS['dbi']->selectDb($db);
        // This "Command out of sync" 2014 error may happen, for example
        // after calling a MySQL procedure; at this point we can't select
        // the db but it's not necessarily wrong
        if ($GLOBALS['dbi']->getError() && $GLOBALS['errno'] == 2014) {
            $is_db = true;
            unset($GLOBALS['errno']);
/**
 * Get initial values for Sql Query Form Insert
 *
 * @param string $query query to display in the textarea
 *
 * @return array ($legend, $query, $columns_list)
 *
 * @usedby  PMA_getHtmlForSqlQueryFormInsert()
 */
function PMA_initQueryForm($query)
{
    $columns_list = array();
    if (!mb_strlen($GLOBALS['db'])) {
        // prepare for server related
        $legend = sprintf(__('Run SQL query/queries on server %s'), '&quot;' . htmlspecialchars(!empty($GLOBALS['cfg']['Servers'][$GLOBALS['server']]['verbose']) ? $GLOBALS['cfg']['Servers'][$GLOBALS['server']]['verbose'] : $GLOBALS['cfg']['Servers'][$GLOBALS['server']]['host']) . '&quot;');
    } elseif (!mb_strlen($GLOBALS['table'])) {
        // prepare for db related
        $db = $GLOBALS['db'];
        // if you want navigation:
        $tmp_db_link = '<a href="' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . PMA_URL_getCommon(array('db' => $db)) . '"';
        $tmp_db_link .= '>' . htmlspecialchars($db) . '</a>';
        $legend = sprintf(__('Run SQL query/queries on database %s'), $tmp_db_link);
        if (empty($query)) {
            $query = PMA\libraries\Util::expandUserString($GLOBALS['cfg']['DefaultQueryDatabase'], 'backquote');
        }
    } else {
        $db = $GLOBALS['db'];
        $table = $GLOBALS['table'];
        // Get the list and number of fields
        // we do a try_query here, because we could be in the query window,
        // trying to synchronize and the table has not yet been created
        $columns_list = $GLOBALS['dbi']->getColumns($db, $GLOBALS['table'], null, true);
        $tmp_tbl_link = '<a href="' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table') . PMA_URL_getCommon(array('db' => $db, 'table' => $table)) . '" >';
        $tmp_tbl_link .= htmlspecialchars($db) . '.' . htmlspecialchars($table) . '</a>';
        $legend = sprintf(__('Run SQL query/queries on table %s'), $tmp_tbl_link);
        if (empty($query)) {
            $query = PMA\libraries\Util::expandUserString($GLOBALS['cfg']['DefaultQueryTable'], 'backquote');
        }
    }
    $legend .= ': ' . PMA\libraries\Util::showMySQLDocu('SELECT');
    return array($legend, $query, $columns_list);
}
Пример #8
0
 */
use PMA\libraries\URL;
if (!defined('PHPMYADMIN')) {
    exit;
}
// Check parameters
PMA\libraries\Util::checkParameters(array('db', 'table'));
$db_is_system_schema = $GLOBALS['dbi']->isSystemSchema($db);
/**
 * Set parameters for links
 * @deprecated
 */
$url_query = URL::getCommon(array('db' => $db, 'table' => $table));
/**
 * Set parameters for links
 */
$url_params = array();
$url_params['db'] = $db;
$url_params['table'] = $table;
/**
 * Defines the urls to return to in case of error in a sql statement
 */
$err_url_0 = PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . URL::getCommon(array('db' => $db));
$err_url = PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table') . URL::getCommon($url_params);
/**
 * Ensures the database and the table exist (else move to the "parent" script)
 * Skip test if we are exporting as we can't tell whether a table name is an alias (which would fail the test).
 */
if (basename($_SERVER['PHP_SELF']) != 'tbl_export.php') {
    require_once './libraries/db_table_exists.inc.php';
}
/**
 * Renders the server selection in list or selectbox form, or option tags only
 *
 * @param boolean $not_only_options whether to include form tags or not
 * @param boolean $omit_fieldset    whether to omit fieldset tag or not
 *
 * @return string
 */
function PMA_selectServer($not_only_options, $omit_fieldset)
{
    $retval = '';
    // Show as list?
    if ($not_only_options) {
        $list = $GLOBALS['cfg']['DisplayServersList'];
        $not_only_options = !$list;
    } else {
        $list = false;
    }
    if ($not_only_options) {
        $retval .= '<form method="post" action="' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabServer'], 'server') . '" class="disableAjax">';
        if (!$omit_fieldset) {
            $retval .= '<fieldset>';
        }
        $retval .= '<label for="select_server">' . __('Current server:') . '</label> ';
        $retval .= '<select name="server" id="select_server" class="autosubmit">';
        $retval .= '<option value="">(' . __('Servers') . ') ...</option>' . "\n";
    } elseif ($list) {
        $retval .= __('Current server:') . '<br />';
        $retval .= '<ul id="list_server">';
    }
    foreach ($GLOBALS['cfg']['Servers'] as $key => $server) {
        if (empty($server['host'])) {
            continue;
        }
        if (!empty($GLOBALS['server']) && (int) $GLOBALS['server'] === (int) $key) {
            $selected = 1;
        } else {
            $selected = 0;
        }
        if (!empty($server['verbose'])) {
            $label = $server['verbose'];
        } else {
            $label = $server['host'];
            if (!empty($server['port'])) {
                $label .= ':' . $server['port'];
            }
        }
        if (!empty($server['only_db'])) {
            if (!is_array($server['only_db'])) {
                $label .= ' - ' . $server['only_db'];
                // try to avoid displaying a too wide selector
            } elseif (count($server['only_db']) < 4) {
                $label .= ' - ' . implode(', ', $server['only_db']);
            }
        }
        if (!empty($server['user']) && $server['auth_type'] == 'config') {
            $label .= '  (' . $server['user'] . ')';
        }
        if ($list) {
            $retval .= '<li>';
            if ($selected) {
                $retval .= '<strong>' . htmlspecialchars($label) . '</strong>';
            } else {
                $retval .= '<a class="disableAjax item" href="' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabServer'], 'server') . PMA_URL_getCommon(array('server' => $key)) . '" >' . htmlspecialchars($label) . '</a>';
            }
            $retval .= '</li>';
        } else {
            $retval .= '<option value="' . $key . '" ' . ($selected ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>' . "\n";
        }
    }
    // end while
    if ($not_only_options) {
        $retval .= '</select>';
        if (!$omit_fieldset) {
            $retval .= '</fieldset>';
        }
        $retval .= '</form>';
    } elseif ($list) {
        $retval .= '</ul>';
    }
    return $retval;
}
Пример #10
0
    <script type="text/javascript">
        var PMA_TEST_THEME = true;
    </script>
    <script src="../js/get_image.js.php" type="text/javascript"></script>
    <script src="../js/functions.js" type="text/javascript"></script>
</head>
<body>
<?php 
$separator = '<span class=\'separator item\'>&nbsp;»</span>' . "\n";
$item = '<a href="%1$s?%2$s" class="item">' . ' <img class="icon %5$s" src="../themes/dot.gif"' . ' width="16" height="16" alt="" /> ' . "\n" . '%4$s: %3$s</a>' . "\n";
echo '<div id="serverinfo">' . "\n";
printf($item, PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabserver'], 'server'), PMA_URL_getCommon(), 'Server', __('Server'), 'ic_s_host');
echo $separator;
printf($item, PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database'), '', 'Database', __('Database'), 'ic_s_db');
echo $separator;
printf($item, PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'), '', 'Table', isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? __('View') : __('Table'), isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? 'ic_b_views' : 'ic_s_tbl');
echo '<span class="table_comment" id="span_table_comment">' . '&quot;Table comment&quot;</span>' . "\n";
echo '</div>';
/**
 * Displays tab links
 */
$tabs = array();
$tabs['databases']['icon'] = 's_db.png';
$tabs['databases']['link'] = 'server_databases.php';
$tabs['databases']['text'] = __('Databases');
$tabs['sql']['icon'] = 'b_sql.png';
$tabs['sql']['link'] = 'server_sql.php';
$tabs['sql']['text'] = __('SQL');
$tabs['status']['icon'] = 's_status.png';
$tabs['status']['link'] = 'server_status.php';
$tabs['status']['text'] = __('Status');
 /**
  * Test for getDbLink
  *
  * @return void
  */
 function testGetDbLinkWithSpecialChars()
 {
     global $cfg;
     $database = 'test&data\'base';
     $this->assertEquals('<a href="' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . '?db=' . htmlspecialchars(urlencode($database)) . '&amp;server=99&amp;lang=en&amp;token=token" title="Jump to database &quot;' . htmlspecialchars($database) . '&quot;.">' . htmlspecialchars($database) . '</a>', PMA\libraries\Util::getDbLink($database));
 }
 *
 * Variable structure ex:
 * $GLOBALS['special_schema_links'] = array(
 *     // Database name is the major element
 *     'mysql' => array(
 *         // Table name
 *         'db' => array(
 *             // Column name
 *             'user' => array(
 *                 // Main url param (can be an array where represent sql)
 *                 'link_param' => 'username',
 *                 // Other url params
 *                 'link_dependancy_params' => array(
 *                     0 => array(
 *                         // URL parameter name
 *                         // (can be array where url param has static value)
 *                         'param_info' => 'hostname',
 *                         // Column name related to url param
 *                         'column_name' => 'host'
 *                     )
 *                 ),
 *                 // Page to link
 *                 'default_page' => './server_privileges.php'
 *             )
 *         )
 *     )
 * );
 *
 */
$GLOBALS['special_schema_links'] = array('mysql' => array('columns_priv' => array('user' => array('link_param' => 'username', 'link_dependancy_params' => array(0 => array('param_info' => 'hostname', 'column_name' => 'host')), 'default_page' => './server_privileges.php'), 'table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'Db')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table')), 'column_name' => array('link_param' => 'field', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'Db'), 1 => array('param_info' => 'table', 'column_name' => 'Table_name')), 'default_page' => './tbl_structure.php?change_column=1')), 'db' => array('user' => array('link_param' => 'username', 'link_dependancy_params' => array(0 => array('param_info' => 'hostname', 'column_name' => 'host')), 'default_page' => './server_privileges.php')), 'event' => array('name' => array('link_param' => 'item_name', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'db')), 'default_page' => './db_events.php?edit_item=1')), 'innodb_index_stats' => array('table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'database_name')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table')), 'index_name' => array('link_param' => 'index', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'database_name'), 1 => array('param_info' => 'table', 'column_name' => 'table_name')), 'default_page' => './tbl_structure.php')), 'innodb_table_stats' => array('table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'database_name')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'))), 'proc' => array('name' => array('link_param' => 'item_name', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'db'), 1 => array('param_info' => 'item_type', 'column_name' => 'type')), 'default_page' => './db_routines.php?edit_item=1'), 'specific_name' => array('link_param' => 'item_name', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'db'), 1 => array('param_info' => 'item_type', 'column_name' => 'type')), 'default_page' => './db_routines.php?edit_item=1')), 'proc_priv' => array('user' => array('link_param' => 'username', 'link_dependancy_params' => array(0 => array('param_info' => 'hostname', 'column_name' => 'Host')), 'default_page' => './server_privileges.php'), 'routine_name' => array('link_param' => 'item_name', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'Db'), 1 => array('param_info' => 'item_type', 'column_name' => 'Routine_type')), 'default_page' => './db_routines.php?edit_item=1')), 'proxies_priv' => array('user' => array('link_param' => 'username', 'link_dependancy_params' => array(0 => array('param_info' => 'hostname', 'column_name' => 'Host')), 'default_page' => './server_privileges.php')), 'tables_priv' => array('user' => array('link_param' => 'username', 'link_dependancy_params' => array(0 => array('param_info' => 'hostname', 'column_name' => 'Host')), 'default_page' => './server_privileges.php'), 'table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'Db')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'))), 'user' => array('user' => array('link_param' => 'username', 'link_dependancy_params' => array(0 => array('param_info' => 'hostname', 'column_name' => 'host')), 'default_page' => './server_privileges.php'))), 'information_schema' => array('columns' => array('table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'table_schema')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table')), 'column_name' => array('link_param' => 'field', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'table_schema'), 1 => array('param_info' => 'table', 'column_name' => 'table_name')), 'default_page' => './tbl_structure.php?change_column=1')), 'key_column_usage' => array('table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'constraint_schema')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table')), 'column_name' => array('link_param' => 'field', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'table_schema'), 1 => array('param_info' => 'table', 'column_name' => 'table_name')), 'default_page' => './tbl_structure.php?change_column=1'), 'referenced_table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'referenced_table_schema')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table')), 'referenced_column_name' => array('link_param' => 'field', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'referenced_table_schema'), 1 => array('param_info' => 'table', 'column_name' => 'referenced_table_name')), 'default_page' => './tbl_structure.php?change_column=1')), 'partitions' => array('table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'table_schema')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'))), 'processlist' => array('user' => array('link_param' => 'username', 'link_dependancy_params' => array(0 => array('param_info' => 'hostname', 'column_name' => 'host')), 'default_page' => './server_privileges.php')), 'referential_constraints' => array('table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'constraint_schema')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table')), 'referenced_table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'constraint_schema')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'))), 'routines' => array('routine_name' => array('link_param' => 'item_name', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'routine_schema'), 1 => array('param_info' => 'item_type', 'column_name' => 'routine_type')), 'default_page' => './db_routines.php')), 'schemata' => array('schema_name' => array('link_param' => 'db', 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'))), 'statistics' => array('table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'table_schema')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table')), 'column_name' => array('link_param' => 'field', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'table_schema'), 1 => array('param_info' => 'table', 'column_name' => 'table_name')), 'default_page' => './tbl_structure.php?change_column=1')), 'tables' => array('table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'table_schema')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'))), 'table_constraints' => array('table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'table_schema')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'))), 'views' => array('table_name' => array('link_param' => 'table', 'link_dependancy_params' => array(0 => array('param_info' => 'db', 'column_name' => 'table_schema')), 'default_page' => './' . PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table')))));