示例#1
0
      nsShowAll();
      nsArrangeList();
    }
    var expandedDb = '<?php 
        echo empty($selected_db) ? '' : 'el' . $selected_db . 'Child';
        ?>
';
    //-->
    </script>
        <?php 
    }
    // end if... else... (light mode)
} else {
    if ($num_dbs == 1) {
        $db = $dblist[0];
        $tables = @PMA_mysql_list_tables($db);
        $num_tables = $tables ? @mysql_numrows($tables) : 0;
        $common_url_query = PMA_generate_common_url($db);
        if ($num_tables) {
            $num_tables_disp = $num_tables;
        } else {
            $num_tables_disp = '-';
        }
        // Get additional infomation about tables for tooltip
        if ($cfg['ShowTooltip'] && PMA_MYSQL_INT_VERSION >= 32303 && $num_tables) {
            $tooltip = array();
            $tooltip_name = array();
            $result = PMA_mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db));
            while ($tmp = PMA_mysql_fetch_array($result)) {
                $tooltip_name[$tmp['Name']] = !empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : '';
                $tmp['Comment'] = $cfg['ShowTooltipAliasTB'] ? $tmp['Name'] : $tmp['Comment'];
示例#2
0
 * Credits for this script goes to Thomas Chaumeny <chaume92 at aol.com>
 */
/**
 * Gets some core libraries and send headers
 */
require './db_details_common.php';
// If config variable $cfg['Usedbsearch'] is on FALSE : exit.
if (!$cfg['UseDbSearch']) {
    PMA_mysqlDie($strAccessDenied, '', FALSE, $err_url);
}
// end if
$url_query .= '&amp;goto=db_search.php';
/**
 * Get the list of tables from the current database
 */
$list_tables = PMA_mysql_list_tables($db);
$num_tables = $list_tables ? mysql_num_rows($list_tables) : 0;
for ($i = 0; $i < $num_tables; $i++) {
    $tables[] = PMA_mysql_tablename($list_tables, $i);
}
if ($num_tables) {
    mysql_free_result($list_tables);
}
/**
 * Displays top links
 */
$sub_part = '';
require './db_details_links.php';
/**
 * 1. Main search form has been submitted
 */
示例#3
0
 /**
  * Gets the databases list - if it has not been built yet
  */
 if ($server > 0 && empty($dblist)) {
     PMA_availableDatabases();
 }
 if (isset($db_select)) {
     $tmp_select = implode($db_select, '|');
     $tmp_select = '|' . $tmp_select . '|';
 }
 // Walk over databases
 foreach ($dblist as $current_db) {
     if (isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|') || !isset($tmp_select)) {
         PMA_exportDBHeader($current_db);
         PMA_exportDBCreate($current_db);
         $tables = PMA_mysql_list_tables($current_db);
         $num_tables = $tables ? @mysql_numrows($tables) : 0;
         $i = 0;
         while ($i < $num_tables) {
             $table = PMA_mysql_tablename($tables, $i);
             $local_query = 'SELECT * FROM ' . PMA_backquote($current_db) . '.' . PMA_backquote($table);
             if (isset($GLOBALS[$what . '_structure'])) {
                 PMA_exportStructure($current_db, $table, $crlf, $err_url, $do_relation, $do_comments, $do_mime, $do_dates);
             }
             if (isset($GLOBALS[$what . '_data'])) {
                 PMA_exportData($current_db, $table, $crlf, $err_url, $local_query);
             }
             $i++;
         }
         PMA_exportDBFooter($current_db);
     }
示例#4
0
    }
}
// minimum width
$wid = 12;
$col = $Columns + $Add_Col;
if ($col < 0) {
    $col = 0;
}
$row = $Rows + $Add_Row;
if ($row < 0) {
    $row = 0;
}
/**
 * Prepares the form
 */
$tbl_result = PMA_mysql_list_tables($db);
$tbl_result_cnt = mysql_num_rows($tbl_result);
$i = 0;
$k = 0;
// The tables list sent by a previously submitted form
if (!empty($TableList)) {
    $cnt_table_list = count($TableList);
    for ($x = 0; $x < $cnt_table_list; $x++) {
        $tbl_names[urldecode($TableList[$x])] = ' selected="selected"';
    }
}
// end if
// The tables list gets from MySQL
while ($i < $tbl_result_cnt) {
    $tbl = PMA_mysql_tablename($tbl_result, $i);
    $fld_results = @PMA_mysql_list_fields_alternate($db, $tbl) or PMA_mysqlDie(PMA_mysql_error(), 'PMA_mysql_list_fields_alternate(' . $db . ', ' . $tbl . ')', FALSE, $err_url);