3 // vim: expandtab sw=4 ts=4 sts=4:
7 * Counts amount of navigation tabs
9 $db_details_links_count_tabs = 0;
13 * If coming from a Show MySQL link on the home page,
14 * put something in $sub_part
16 if (empty($sub_part)) {
17 $sub_part = '_structure';
24 // Export link if there is at least one table
25 if ($num_tables > 0) {
26 $lnk3 = 'db_details_export.php';
28 $lnk4 = 'db_search.php';
37 // Drop link if allowed
38 if (!$cfg['AllowUserDropDatabase']) {
39 // Check if the user is a Superuser
40 $cfg['AllowUserDropDatabase'] = PMA_DBI_select_db('mysql');
41 PMA_DBI_select_db($db);
43 // rabus: Don't even try to drop information_schema. You won't be able to.
44 // Believe me. You won't.
45 $cfg['AllowUserDropDatabase'] = $cfg['AllowUserDropDatabase'] && !(PMA_MYSQL_INT_VERSION
>= 50000 && $db == 'information_schema');
46 if ($cfg['AllowUserDropDatabase']) {
48 $arg5 = $url_query . '&sql_query='
49 . urlencode('DROP DATABASE ' . PMA_backquote($db))
51 . urlencode(sprintf($strDatabaseHasBeenDropped, htmlspecialchars(PMA_backquote($db))))
52 . '&goto=main.php&back=db_details' . $sub_part . '.php&reload=1&purge=1';
53 $att5 = 'onclick="return confirmLinkDropDB(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')"';
66 if ($cfg['LightTabs']) {
69 echo '<table border="0" cellspacing="0" cellpadding="0" width="100%" id="topmenu">' . "\n"
71 . ' <td class="nav" align="left" nowrap="nowrap" valign="bottom">'
72 . ' <table border="0" cellpadding="0" cellspacing="0"><tr>'
73 . ' <td nowrap="nowrap"><img src="' . $GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="2" height="1" border="0" alt="" /></td>'
74 . ' <td class="navSpacer"><img src="' . $GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="1" height="1" border="0" alt="" /></td>';
77 echo PMA_printTab(($GLOBALS['cfg']['MainPageIconic'] ?
'<img src="' . $GLOBALS['pmaThemeImage'] . 'b_props.png" width="16" height="16" border="0" hspace="2" align="middle" alt="'.$strStructure.'" />' : '') . $strStructure, 'db_details_structure.php', $url_query);
78 echo PMA_printTab(($GLOBALS['cfg']['MainPageIconic'] ?
'<img src="' . $GLOBALS['pmaThemeImage'] . 'b_sql.png" width="16" height="16" border="0" hspace="2" align="middle" alt="'.$strSQL.'" />' : '') . $strSQL, 'db_details.php', $url_query . '&db_query_force=1');
79 echo PMA_printTab(($GLOBALS['cfg']['MainPageIconic'] ?
'<img src="' . $GLOBALS['pmaThemeImage'] . 'b_search.png" width="16" height="16" border="0" hspace="2" align="middle" alt="'.$strSearch.'" />' : '') . $strSearch, $lnk4, $arg4);
80 echo PMA_printTab(($GLOBALS['cfg']['MainPageIconic'] ?
'<img src="' . $GLOBALS['pmaThemeImage'] . 's_db.png" width="16" height="16" border="0" hspace="2" align="middle" alt="'.$strQBE.'" />' : '') . $strQBE, ($num_tables > 0) ?
'db_details_qbe.php' : '', $url_query);
81 echo PMA_printTab(($GLOBALS['cfg']['MainPageIconic'] ?
'<img src="' . $GLOBALS['pmaThemeImage'] . 'b_export.png" width="16" height="16" border="0" hspace="2" align="middle" alt="'.$strExport.'" />' : '') . $strExport, $lnk3, $arg3);
82 echo PMA_printTab(($GLOBALS['cfg']['MainPageIconic'] ?
'<img src="' . $GLOBALS['pmaThemeImage'] . 'b_tblops.png" width="16" height="16" border="0" hspace="2" align="middle" alt="'.$strOperations.'" />' : '') . $strOperations,'db_operations.php', $url_query);
86 echo PMA_printTab(($GLOBALS['cfg']['MainPageIconic'] ?
'<img src="' . $GLOBALS['pmaThemeImage'] . 'b_deltbl.png" width="16" height="16" border="0" hspace="2" align="middle" alt="'.$strDrop.'" />' : '') . $strDrop, $lnk5, $arg5, $att5, $class5);
90 if (!$cfg['LightTabs']) {
91 echo ' <td nowrap="nowrap"><img src="' .$GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="2" height="1" border="0" alt="" /></td>'
92 . ' </tr></table>' . "\n"
101 * Settings for relations stuff
103 require_once('./libraries/relation.lib.php');
104 $cfgRelation = PMA_getRelationsParam();
106 // Get additional information about tables for tooltip is done in db_details_db_info.php only once
107 if ($cfgRelation['commwork']) {
108 $comment = PMA_getComments($db);
111 * Displays table comment
113 if (is_array($comment)) {
116 <p id
="dbComment"><i
>
117 <?php
echo htmlspecialchars(implode(' ', $comment)) . "\n"; ?
>
126 if (!empty($message)) {
127 PMA_showMessage($message);