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.php3';
28 $lnk4 = 'db_search.php3';
37 // Drop link if allowed
38 if (!$cfg['AllowUserDropDatabase']) {
39 // Check if the user is a Superuser
40 $links_result = @PMA_mysql_query
('USE mysql');
41 $cfg['AllowUserDropDatabase'] = (!PMA_mysql_error());
43 if ($cfg['AllowUserDropDatabase']) {
45 $arg5 = $url_query . '&sql_query='
46 . urlencode('DROP DATABASE ' . PMA_backquote($db))
48 . urlencode(sprintf($strDatabaseHasBeenDropped, htmlspecialchars(PMA_backquote($db))))
49 . '&goto=main.php3&back=db_details' . $sub_part . '.php3&reload=1&purge=1';
50 $att5 = 'class="drop" '
51 . 'onclick="return confirmLink(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')"';
62 if ($cfg['LightTabs']) {
65 echo '<table border="0" cellspacing="0" cellpadding="3" width="100%" class="tabs">
67 <td width="8"> </td>';
70 echo PMA_printTab($strStructure, 'db_details_structure.php3', $url_query);
71 echo PMA_printTab($strSQL, 'db_details.php3', $url_query . '&db_query_force=1');
72 echo PMA_printTab($strExport, $lnk3, $arg3);
73 echo PMA_printTab($strSearch, $lnk4, $arg4);
75 // Query by example and dump of the db are only displayed if there is at least
76 // one table in the db
77 if ($num_tables > 0) {
78 echo PMA_printTab($strQBE, 'db_details_qbe.php3', $url_query);
83 echo PMA_printTab($strDrop, $lnk5, $arg5, $att5);
87 if (!$cfg['LightTabs']) {