00001 <?php
00002
00003
00004
00005
00010 if (empty($sub_part)) {
00011 $sub_part = '_structure';
00012 }
00013
00014
00018
00019 if ($num_tables > 0) {
00020 $tab_export['link'] = 'db_details_export.php';
00021 $tab_search['link'] = 'db_search.php';
00022 $tab_qbe['link'] = 'db_details_qbe.php';
00023 }
00024 $tab_structure['link'] = 'db_details_structure.php';
00025 $tab_sql['link'] = 'db_details.php';
00026 $tab_sql['args']['db_query_force'] = 1;
00027 $tab_operation['link'] = 'db_operations.php';
00028
00029
00030 if (!$GLOBALS['cfg']['AllowUserDropDatabase']) {
00031
00032 $GLOBALS['cfg']['AllowUserDropDatabase'] = PMA_DBI_select_db('mysql');
00033 PMA_DBI_select_db($db);
00034 }
00035
00036
00037 $GLOBALS['cfg']['AllowUserDropDatabase'] = $GLOBALS['cfg']['AllowUserDropDatabase'] && !(PMA_MYSQL_INT_VERSION >= 50000 && $db == 'information_schema');
00038 if ($GLOBALS['cfg']['AllowUserDropDatabase']) {
00039 $tab_drop['link'] = 'sql.php';
00040 $tab_drop['args']['sql_query'] = 'DROP DATABASE ' . PMA_backquote($db);
00041 $tab_drop['args']['zero_rows'] = sprintf($GLOBALS['strDatabaseHasBeenDropped'], htmlspecialchars(PMA_backquote($db)));
00042 $tab_drop['args']['goto'] = 'main.php';
00043 $tab_drop['args']['back'] = 'db_details' . $sub_part . '.php';
00044 $tab_drop['args']['reload'] = 1;
00045 $tab_drop['args']['purge'] = 1;
00046 $tab_drop['attr'] = 'onclick="return confirmLinkDropDB(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')"';
00047 $tab_drop['class'] = 'caution';
00048 }
00049
00050
00051 $tab_structure['text'] = $GLOBALS['strStructure'];
00052 $tab_sql['text'] = $GLOBALS['strSQL'];
00053 $tab_export['text'] = $GLOBALS['strExport'];
00054 $tab_search['text'] = $GLOBALS['strSearch'];
00055 $tab_drop['text'] = $GLOBALS['strDrop'];
00056 $tab_qbe['text'] = $GLOBALS['strQBE'];
00057 $tab_operation['text'] = $GLOBALS['strOperations'];
00058
00059
00060 $tab_structure['icon'] = 'b_props.png';
00061 $tab_sql['icon'] = 'b_sql.png';
00062 $tab_export['icon'] = 'b_export.png';
00063 $tab_search['icon'] = 'b_search.png';
00064 $tab_drop['icon'] = 'b_deltbl.png';
00065 $tab_qbe['icon'] = 's_db.png';
00066 $tab_operation['icon'] = 'b_tblops.png';
00067
00071 $tabs = array();
00072 $tabs[] =& $tab_structure;
00073 $tabs[] =& $tab_sql;
00074 $tabs[] =& $tab_search;
00075 $tabs[] =& $tab_qbe;
00076 $tabs[] =& $tab_export;
00077 $tabs[] =& $tab_operation;
00078 if ($GLOBALS['cfg']['AllowUserDropDatabase']) {
00079 $tabs[] =& $tab_drop;
00080 }
00081
00082 echo PMA_getTabs( $tabs );
00083 unset( $tabs );
00084
00088 require_once('./libraries/relation.lib.php');
00089 $cfgRelation = PMA_getRelationsParam();
00090
00091
00092 if ($cfgRelation['commwork']) {
00093 $comment = PMA_getComments($db);
00094
00098 if (is_array($comment)) {
00099 ?>
00100 <!-- DB comment -->
00101 <p id="dbComment"><i>
00102 <?php echo htmlspecialchars(implode(' ', $comment)) . "\n"; ?>
00103 </i></p>
00104 <?php
00105 }
00106 }
00107
00111 if (!empty($message)) {
00112 PMA_showMessage($message);
00113 unset($message);
00114 }
00115 ?>
00116 <br />