<?php 
echo PMA_generate_common_hidden_inputs($db, $table);
?>
                <input type="hidden" name="reload" value="1" />
                <input type="hidden" name="what" value="data" />
            </th>
        </tr>
        <tr>
            <td bgcolor="<?php 
echo $cfg['BgcolorOne'];
?>
" nowrap="nowrap">
                <select name="target_db">
<?php 
// The function used below is defined in "common.lib.php"
PMA_availableDatabases('main.php?' . PMA_generate_common_url());
for ($i = 0; $i < $num_dbs; $i++) {
    echo '                            ';
    echo '<option value="' . htmlspecialchars($dblist[$i]) . '">' . htmlspecialchars($dblist[$i]) . '</option>';
    echo "\n";
}
// end for
?>
                </select>
                &nbsp;<b>.</b>&nbsp;
                <input type="text" size="20" name="new_name" value="<?php 
echo htmlspecialchars($table);
?>
" class="textfield" onfocus="this.select()" />
            </td>
            <td align="<?php 
예제 #2
0
/**
 * returns array with dbs grouped with extended infos
 *
 * @uses    $GLOBALS['dblist'] from PMA_availableDatabases()
 * @uses    $GLOBALS['num_dbs'] from PMA_availableDatabases()
 * @uses    $GLOBALS['cfgRelation']['commwork']
 * @uses    $GLOBALS['cfg']['ShowTooltip']
 * @uses    $GLOBALS['cfg']['LeftFrameDBTree']
 * @uses    $GLOBALS['cfg']['LeftFrameDBSeparator']
 * @uses    $GLOBALS['cfg']['ShowTooltipAliasDB']
 * @uses    PMA_availableDatabases()
 * @uses    PMA_getTableCount()
 * @uses    PMA_getComments()
 * @uses    PMA_availableDatabases()
 * @uses    is_array()
 * @uses    implode()
 * @uses    strstr()
 * @uses    explode()
 * @return  array   db list
 */
function PMA_getDbList()
{
    if (empty($GLOBALS['dblist'])) {
        PMA_availableDatabases();
    }
    $dblist = $GLOBALS['dblist'];
    $dbgroups = array();
    $parts = array();
    foreach ($dblist as $key => $db) {
        // garvin: Get comments from PMA comments table
        $db_tooltip = '';
        if ($GLOBALS['cfg']['ShowTooltip'] && $GLOBALS['cfgRelation']['commwork']) {
            $_db_tooltip = PMA_getComments($db);
            if (is_array($_db_tooltip)) {
                $db_tooltip = implode(' ', $_db_tooltip);
            }
        }
        if ($GLOBALS['cfg']['LeftFrameDBTree'] && $GLOBALS['cfg']['LeftFrameDBSeparator'] && strstr($db, $GLOBALS['cfg']['LeftFrameDBSeparator'])) {
            // use strpos instead of strrpos; it seems more common to
            // have the db name, the separator, then the rest which
            // might contain a separator
            // like dbname_the_rest
            $pos = strpos($db, $GLOBALS['cfg']['LeftFrameDBSeparator']);
            $group = substr($db, 0, $pos);
            $disp_name_cut = substr($db, $pos);
        } else {
            $group = $db;
            $disp_name_cut = $db;
        }
        $disp_name = $db;
        if ($db_tooltip && $GLOBALS['cfg']['ShowTooltipAliasDB']) {
            $disp_name = $db_tooltip;
            $disp_name_cut = $db_tooltip;
            $db_tooltip = $db;
        }
        $dbgroups[$group][$db] = array('name' => $db, 'disp_name_cut' => $disp_name_cut, 'disp_name' => $disp_name, 'comment' => $db_tooltip, 'num_tables' => PMA_getTableCount($db));
    }
    // end foreach ($dblist as $db)
    return $dbgroups;
}
예제 #3
0
/* $Id: server_export.php 7908 2005-11-24 09:12:17Z nijel $ */
// vim: expandtab sw=4 ts=4 sts=4:
/**
 * Does the common work
 */
require_once './libraries/common.lib.php';
$js_to_run = 'functions.js';
/**
 * Displays the links
 */
require './libraries/server_links.inc.php';
/**
 * Gets the databases list - if it has not been built yet
 */
if ($server > 0 && empty($dblist)) {
    PMA_availableDatabases();
}
?>


<!-- Dump of a server -->
<?php 
$export_page_title = $strViewDumpDatabases . "\n";
$multi_values = '<div align="center"><select name="db_select[]" size="6" multiple="multiple">';
$multi_values .= "\n";
foreach ($dblist as $current_db) {
    if (!empty($selectall) || isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|')) {
        $is_selected = ' selected="selected"';
    } else {
        $is_selected = '';
    }
예제 #4
0
                <input type="hidden" name="what" value="data" />
                <table border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td nowrap="nowrap">
                        <?php 
echo $strMoveTable . "\n";
?>
                    </td>
                </tr>
                <tr>
                    <td>
                        <select name="target_db">
                            <option value=""></option>
<?php 
// The function used below is defined in "common.lib.php"
PMA_availableDatabases('main.php?lang=' . $lang . '&amp;server=' . $server);
for ($i = 0; $i < $num_dbs; $i++) {
    echo '                            ';
    echo '<option value="' . str_replace('"', '&quot;', $dblist[$i]) . '">' . htmlspecialchars($dblist[$i]) . '</option>';
    echo "\n";
}
// end for
?>
                        </select>
                        &nbsp;<b>.</b>&nbsp;
                        <input type="text" size="20" name="new_name" value="<?php 
echo $table;
?>
" class="textfield" onfocus="this.select()" />
                    </td>
                </tr>