Wrong link title.
[phpmyadmin/crack.git] / db_details_links.php3
blob1a098b20b0f5085ae4223a54d3a2d0d291adb0f1
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Counts amount of navigation tabs
8 */
9 $db_details_links_count_tabs = 0;
12 /**
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';
21 /**
22 * Prepares links
24 // Export link if there is at least one table
25 if ($num_tables > 0) {
26 $lnk3 = 'db_details_export.php3';
27 $arg3 = $url_query;
28 $lnk4 = 'db_search.php3';
29 $arg4 = $url_query;
31 else {
32 $lnk3 = '';
33 $arg3 = '';
34 $lnk4 = '';
35 $arg4 = '';
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']) {
44 $lnk5 = 'sql.php3';
45 $arg5 = $url_query . '&amp;sql_query='
46 . urlencode('DROP DATABASE ' . PMA_backquote($db))
47 . '&amp;zero_rows='
48 . urlencode(sprintf($strDatabaseHasBeenDropped, htmlspecialchars(PMA_backquote($db))))
49 . '&amp;goto=main.php3&amp;back=db_details' . $sub_part . '.php3&amp;reload=1';
50 $att5 = 'class="drop" '
51 . 'onclick="return confirmLink(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')"';
53 else {
54 $lnk5 = '';
58 /**
59 * Displays tab links
62 <table border="0" cellspacing="0" cellpadding="3" width="100%" class="tabs">
63 <tr>
64 <td width="8">&nbsp;</td>
65 <?php
66 echo PMA_printTab($strStructure, 'db_details_structure.php3', $url_query);
67 echo PMA_printTab($strSQL, 'db_details.php3', $url_query . '&amp;db_query_force=1');
68 echo PMA_printTab($strExport, $lnk3, $arg3);
69 echo PMA_printTab($strSearch, $lnk4, $arg4);
71 // Query by example and dump of the db are only displayed if there is at least
72 // one table in the db
73 if ($num_tables > 0) {
74 echo PMA_printTab($strQBE, 'db_details_qbe.php3', $url_query);
75 } // end if
77 // Displays drop link
78 if ($lnk5) {
79 echo PMA_printTab($strDrop, $lnk5, $arg5, $att5);
80 } // end if
81 echo "\n";
83 </tr>
84 </table>
85 <br />