Splitted the large "database details" page in parts
This commit is contained in:
61
db_details_links.php3
Normal file
61
db_details_links.php3
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/* $Id$ */
|
||||
|
||||
|
||||
/**
|
||||
* Prepares links
|
||||
*/
|
||||
// Export link if there is at least one table
|
||||
if ($num_tables > 0) {
|
||||
$lnk3 = '<a href="db_details_export.php3?' . $url_query . '">';
|
||||
}
|
||||
else {
|
||||
$lnk3 = '';
|
||||
}
|
||||
// Drop link if allowed
|
||||
if (!$cfg['AllowUserDropDatabase']) {
|
||||
// Check if the user is a Superuser
|
||||
$result = @mysql_query('USE mysql');
|
||||
$cfg['AllowUserDropDatabase'] = (!mysql_error());
|
||||
}
|
||||
if ($cfg['AllowUserDropDatabase']) {
|
||||
$lnk4 = '<a href="sql.php3?' . $url_query . '&sql_query='
|
||||
. urlencode('DROP DATABASE ' . PMA_backquote($db))
|
||||
. '&zero_rows='
|
||||
. urlencode(sprintf($strDatabaseHasBeenDropped, htmlspecialchars(PMA_backquote($db))))
|
||||
. '&goto=main.php3&back=db_details' . $sub_part . '.php3&reload=1"' . "\n"
|
||||
. ' class="drop" '
|
||||
. 'onclick="return confirmLink(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')">';
|
||||
}
|
||||
else {
|
||||
$lnk4 = '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Displays links
|
||||
*/
|
||||
?>
|
||||
<p>
|
||||
[
|
||||
<a href="db_details.php3?<?php echo $url_query; ?>">
|
||||
<b><?php echo $strHome; ?></b></a> |
|
||||
<a href="db_details_structure.php3?<?php echo $url_query; ?>">
|
||||
<b><?php echo $strStructure; ?></b></a> |
|
||||
<?php echo $lnk3 . "\n"; ?>
|
||||
<b><?php echo $strExport; ?></b><?php if ($lnk3) echo '</a>'; echo "\n"; ?>
|
||||
]
|
||||
|
||||
<?php
|
||||
if ($lnk4) {
|
||||
?>
|
||||
[
|
||||
<?php echo $lnk4 . "\n"; ?>
|
||||
<b><?php echo $strDrop; ?></b></a>
|
||||
]
|
||||
<?php
|
||||
} // end if
|
||||
echo "\n";
|
||||
?>
|
||||
</p>
|
||||
<hr />
|
Reference in New Issue
Block a user