This commit is contained in:
Alexander M. Turek
2002-06-20 08:09:04 +00:00
parent be84542970
commit bfdfec7f69
5 changed files with 107 additions and 75 deletions

View File

@@ -1,14 +1,18 @@
<?php
/* $Id$ */
// count amount of navigation tabs
$db_details_links_count_tabs = 0;
/**
* Prepares links
*/
// Export link if there is at least one table
if ($num_tables > 0) {
$lnk3 = '<a href="db_details_export.php3?' . $url_query . '">';
$lnk4 = '<a href="db_search.php3?' . $url_query . '">';
$lnk3 = 'db_details_export.php3';
$arg3 = $url_query;
$lnk4 = 'db_search.php3';
$arg4 = $url_query;
}
else {
$lnk3 = '';
@@ -21,57 +25,50 @@ if (!$cfg['AllowUserDropDatabase']) {
$cfg['AllowUserDropDatabase'] = (!PMA_mysql_error());
}
if ($cfg['AllowUserDropDatabase']) {
$lnk5 = '<a href="sql.php3?' . $url_query . '&amp;sql_query='
$lnk5 = 'sql.php3';
$arg5 = $url_query . '&amp;sql_query='
. urlencode('DROP DATABASE ' . PMA_backquote($db))
. '&amp;zero_rows='
. urlencode(sprintf($strDatabaseHasBeenDropped, htmlspecialchars(PMA_backquote($db))))
. '&amp;goto=main.php3&amp;back=db_details' . $sub_part . '.php3&amp;reload=1"' . "\n"
. ' class="drop" '
. 'onclick="return confirmLink(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')">';
. '&amp;goto=main.php3&amp;back=db_details' . $sub_part . '.php3&amp;reload=1"';
$att5 = 'class="drop" '
. 'onclick="return confirmLink(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')"';
}
else {
$lnk5 = '';
}
/**
* Displays links
* Displays tab links
*/
?>
<p>
[&nbsp;
<a href="db_details.php3?<?php echo $url_query; ?>&amp;db_query_force=1">
<b><?php echo $strSQL; ?></b></a>&nbsp;|
<a href="db_details_structure.php3?<?php echo $url_query; ?>">
<b><?php echo $strStructure; ?></b></a>&nbsp;|
<?php echo $lnk3 . "\n"; ?>
<b><?php echo $strExport; ?></b><?php if ($lnk3) echo '</a>' ?>&nbsp;|
<?php echo $lnk4 . "\n"; ?>
<b><?php echo $strSearch; ?></b><?php if ($lnk4) echo '</a>'; echo "\n";
/**
* Query by example and dump of the db
* Only displayed if there is at least one table in the db
*/
if ($num_tables > 0) {
?>
|&nbsp;<b><a href="tbl_qbe.php3?<?php echo $url_query; ?>"><?php echo $strQBE; ?></a></b>
<?php
} // end if
echo "\n";
?>
&nbsp;]&nbsp;&nbsp;&nbsp;
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="8">&nbsp;</td>
<?php
echo printTab($strSQL,"db_details.php3",$url_query."&amp;db_query_force=1");
echo printTab($strStructure,"db_details_structure.php3",$url_query);
echo printTab($strExport,$lnk3,$arg3);
echo printTab($strSearch,$lnk4,$arg4);
/**
* Query by example and dump of the db
* Only displayed if there is at least one table in the db
*/
if ($num_tables > 0) {
echo printTab($strQBE,"tbl_qbe.php3",$url_query);
} // end if
/**
* Displays drop link
*/
if ($lnk5) {
?>
[&nbsp;
<?php echo $lnk5 . "\n"; ?>
<b><?php echo $strDrop; ?></b></a>
&nbsp;]
<?php
echo printTab($strDrop,$lnk5,$arg5,$att5);
} // end if
echo "\n";
?>
</p>
<hr />
</tr>
<tr>
<td colspan="<?php echo ($db_details_links_count_tabs*2+1); ?>" bgcolor="gray" class="topline"><img width="1" height="1" alt="" src="images/spacer.gif" /></td>
</tr>
</table>