【php开源代码栏目提醒】:网学会员为需要php开源代码的朋友们搜集整理了db_details_structure.php相关资料,希望对各位网友有所帮助!
<?php
/* $Id: db_details_structure.php,v 2.73.2.6 2006/02/17 13:57:36 lem9 Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:
require_once './libraries/common.lib.php';
/**
* Prepares the tables list if the user where not redirected to this script
* because there is no table in the database ($is_info is true)
*/
if (empty($is_info)) {
// Drops/deletes/etc. multiple tables if required
if ((!empty($submit_mult) && isset($selected_tbl))
|| isset($mult_btn)) {
$action = 'db_details_structure.php';
$err_url = 'db_details_structure.php?'. PMA_generate_common_url($db);
require './libraries/mult_submits.inc.php';
$message = $strSuccess;
}
require './libraries/db_details_common.inc.php';
$url_query .= '&goto=db_details_structure.php';
// Gets the database structure
$sub_part = '_structure';
require './libraries/db_details_db_info.inc.php';
}
// 1. No tables
if ($num_tables == 0) {
echo '<p>' . $strNoTablesFound . '</p>' . "\n";
if (empty($db_is_information_schema)) {
require './libraries/display_create_table.lib.php';
} // end if (Create Table dialog)
/**
* Displays the footer
*/
require_once './libraries/footer.inc.php';
exit;
}
// else
// 2. Shows table informations - staybyte - 11 June 2001
require_once './libraries/bookmark.lib.php';
if (PMA_MYSQL_INT_VERSION >= 40101) {
require_once './libraries/
mysql_charsets.lib.php';
$db_collation = PMA_getDbCollation($db);
}
// Display function
/**
* void PMA_TableHeader([bool $db_is_information_schema = false])
* display table header (<table><thead>...</thead><tbody>)
*
* @uses PMA_showHint()
* @uses PMA_MYSQL_INT_VERSION
* @uses $GLOBALS['cfg']['PropertiesNumColumns']
* @uses $GLOBALS['cfg']['ShowStats']
* @uses $GLOBALS['strTable']
* @uses $GLOBALS['strAction']
* @uses $GLOBALS['strRecords']
* @uses $GLOBALS['strApproximateCount']
* @uses $GLOBALS['strType']
* @uses $GLOBALS['strCollation']
* @uses $GLOBALS['strSize']
* @uses $GLOBALS['strOverhead']
* @uses $GLOBALS['structure_tbl_col_cnt']
* @param boolean $db_is_information_schema
*/
function PMA_TableHeader($db_is_information_schema = false)
{
$cnt = 0; // Let's count the columns...
if ($db_is_information_schema) {
$action_colspan = 3;
} else {
$action_colspan = 6;
}
echo '<table class="data" style="float: left;">' . "\n"
.'<thead>' . "\n"
.'<tr><td></td>' . "\n"
.' <th>' . $GLOBALS['strTable'] . '</th>' . "\n"
.' <th colspan="' . $action_colspan . '">' . "\n"
.' ' . $GLOBALS['strAction'] . "\n"
.' </th>'
.' <th>' . $GLOBALS['strRecords']
.PMA_showHint($GLOBALS['strApproximateCount']) . "\n"
.' </th>' . "\n";
if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)) {
echo ' <th>' . $GLOBALS['strType'] . '</th>' . "\n";
$cnt++;
if (PMA_MYSQL_INT_VERSION >= 40100) {
echo ' <th>' . $GLOBALS['strCollation'] . '</th>' . "\n";
$cnt++;
}
}
if ($GLOBALS['cfg']['ShowStats']) {
echo ' <th>' . $GLOBALS['strSize'] . '</th>' . "\n"
. ' <th>' . $GLOBALS['strOverhead'] . '</th>' . "\n";
$cnt += 2;
}
echo '</tr>' . "\n";
echo '</thead>' . "\n";
echo '<tbody>' . "\n";
$GLOBALS['structure_tbl_col_cnt'] = $cnt + $action_colspan + 3;
}
$titles = array();
if (true == $cfg['PropertiesIconic']) {
$titles['Browse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_browse.png" alt="' . $strBrowse . '" title="' . $strBrowse . '" />';
$titles['NoBrowse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . $strBrowse . '" title="' . $strBrowse . '" />';
$titles['Search'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_select.png" alt="' . $strSearch . '" title="' . $strSearch . '" />';
$titles['NoSearch'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . $strSearch . '" title="' . $strSearch . '" />';
$titles['Insert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . $strInsert . '" title="' . $strInsert . '" />';
$titles['NoInsert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_insrow.png" alt="' . $strInsert . '" title="' . $strInsert . '" />';
$titles['Structure'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . $strStructure . '" title="' . $strStructure . '" />';
$titles['Drop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . $strDrop . '" title="' . $strDrop . '" />';
$titles['NoDrop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_drop.png" alt="' . $strDrop . '" title="' . $strDrop . '" />';
$titles['Empty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_empty.png" alt="' . $strEmpty . '" title="' . $strEmpty . '" />';
$titles['NoEmpty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . $strEmpty . '" title="' .