Patch #571426
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-06-20 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
|
* header.inc.php3, *_links.php3, libraries/common.lib.php3: Implemented
|
||||||
|
Patch #571426 (Tabbed navigation), thanks to Joachim Fornallaz (jfornall).
|
||||||
|
|
||||||
2002-06-19 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-06-19 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* libraries/common.lib.php3, libraries/config_import.lib.php3,
|
* libraries/common.lib.php3, libraries/config_import.lib.php3,
|
||||||
config.inc.php3: Rewrote the whole backwards compatibility code for old
|
config.inc.php3: Rewrote the whole backwards compatibility code for old
|
||||||
|
@@ -1,14 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
|
// count amount of navigation tabs
|
||||||
|
$db_details_links_count_tabs = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepares links
|
* Prepares links
|
||||||
*/
|
*/
|
||||||
// Export link if there is at least one table
|
// Export link if there is at least one table
|
||||||
if ($num_tables > 0) {
|
if ($num_tables > 0) {
|
||||||
$lnk3 = '<a href="db_details_export.php3?' . $url_query . '">';
|
$lnk3 = 'db_details_export.php3';
|
||||||
$lnk4 = '<a href="db_search.php3?' . $url_query . '">';
|
$arg3 = $url_query;
|
||||||
|
$lnk4 = 'db_search.php3';
|
||||||
|
$arg4 = $url_query;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$lnk3 = '';
|
$lnk3 = '';
|
||||||
@@ -21,57 +25,50 @@ if (!$cfg['AllowUserDropDatabase']) {
|
|||||||
$cfg['AllowUserDropDatabase'] = (!PMA_mysql_error());
|
$cfg['AllowUserDropDatabase'] = (!PMA_mysql_error());
|
||||||
}
|
}
|
||||||
if ($cfg['AllowUserDropDatabase']) {
|
if ($cfg['AllowUserDropDatabase']) {
|
||||||
$lnk5 = '<a href="sql.php3?' . $url_query . '&sql_query='
|
$lnk5 = 'sql.php3';
|
||||||
|
$arg5 = $url_query . '&sql_query='
|
||||||
. urlencode('DROP DATABASE ' . PMA_backquote($db))
|
. urlencode('DROP DATABASE ' . PMA_backquote($db))
|
||||||
. '&zero_rows='
|
. '&zero_rows='
|
||||||
. urlencode(sprintf($strDatabaseHasBeenDropped, htmlspecialchars(PMA_backquote($db))))
|
. urlencode(sprintf($strDatabaseHasBeenDropped, htmlspecialchars(PMA_backquote($db))))
|
||||||
. '&goto=main.php3&back=db_details' . $sub_part . '.php3&reload=1"' . "\n"
|
. '&goto=main.php3&back=db_details' . $sub_part . '.php3&reload=1"';
|
||||||
. ' class="drop" '
|
$att5 = 'class="drop" '
|
||||||
. 'onclick="return confirmLink(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')">';
|
. 'onclick="return confirmLink(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')"';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$lnk5 = '';
|
$lnk5 = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays links
|
* Displays tab links
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<p>
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||||
[
|
<tr>
|
||||||
<a href="db_details.php3?<?php echo $url_query; ?>&db_query_force=1">
|
<td width="8"> </td>
|
||||||
<b><?php echo $strSQL; ?></b></a> |
|
<?php
|
||||||
<a href="db_details_structure.php3?<?php echo $url_query; ?>">
|
echo printTab($strSQL,"db_details.php3",$url_query."&db_query_force=1");
|
||||||
<b><?php echo $strStructure; ?></b></a> |
|
echo printTab($strStructure,"db_details_structure.php3",$url_query);
|
||||||
<?php echo $lnk3 . "\n"; ?>
|
echo printTab($strExport,$lnk3,$arg3);
|
||||||
<b><?php echo $strExport; ?></b><?php if ($lnk3) echo '</a>' ?> |
|
echo printTab($strSearch,$lnk4,$arg4);
|
||||||
<?php echo $lnk4 . "\n"; ?>
|
|
||||||
<b><?php echo $strSearch; ?></b><?php if ($lnk4) echo '</a>'; echo "\n";
|
/**
|
||||||
/**
|
|
||||||
* Query by example and dump of the db
|
* Query by example and dump of the db
|
||||||
* Only displayed if there is at least one table in the db
|
* Only displayed if there is at least one table in the db
|
||||||
*/
|
*/
|
||||||
if ($num_tables > 0) {
|
if ($num_tables > 0) {
|
||||||
?>
|
echo printTab($strQBE,"tbl_qbe.php3",$url_query);
|
||||||
| <b><a href="tbl_qbe.php3?<?php echo $url_query; ?>"><?php echo $strQBE; ?></a></b>
|
} // end if
|
||||||
<?php
|
|
||||||
} // end if
|
|
||||||
|
|
||||||
echo "\n";
|
/**
|
||||||
?>
|
* Displays drop link
|
||||||
]
|
*/
|
||||||
|
|
||||||
<?php
|
|
||||||
if ($lnk5) {
|
if ($lnk5) {
|
||||||
?>
|
echo printTab($strDrop,$lnk5,$arg5,$att5);
|
||||||
[
|
|
||||||
<?php echo $lnk5 . "\n"; ?>
|
|
||||||
<b><?php echo $strDrop; ?></b></a>
|
|
||||||
]
|
|
||||||
<?php
|
|
||||||
} // end if
|
} // end if
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
</p>
|
</tr>
|
||||||
<hr />
|
<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>
|
@@ -92,6 +92,7 @@ a.drop:visited {font-family: <?php echo $right_font_family; ?>; color: #ff0000}
|
|||||||
a.drop:hover {font-family: <?php echo $right_font_family; ?>; color: #ffffff; background-color:#ff0000; text-decoration:none}
|
a.drop:hover {font-family: <?php echo $right_font_family; ?>; color: #ffffff; background-color:#ff0000; text-decoration:none}
|
||||||
.nav {font-family: <?php echo $right_font_family; ?>; color: #000000}
|
.nav {font-family: <?php echo $right_font_family; ?>; color: #000000}
|
||||||
.warning {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #FF0000}
|
.warning {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #FF0000}
|
||||||
|
td.topline {font-size: 1px}
|
||||||
//-->
|
//-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@@ -1328,6 +1328,35 @@ if (typeof(document.getElementById) != 'undefined'
|
|||||||
return strftime($date, $timestamp);
|
return strftime($date, $timestamp);
|
||||||
} // end of the 'PMA_localisedDate()' function
|
} // end of the 'PMA_localisedDate()' function
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prints out a tab for tabbed navigation.
|
||||||
|
* If the variables $link and $args ar left empty, an inactive tab is created
|
||||||
|
*
|
||||||
|
* @param $text the text to be displayed as link
|
||||||
|
* @param $link main link file, e.g. "test.php3"
|
||||||
|
* @param $args link arguments
|
||||||
|
*
|
||||||
|
* @return string two table cells, the first beeing a separator, the second the tab itself
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
function printTab($text,$link,$args="",$attr="") {
|
||||||
|
global $PHP_SELF;
|
||||||
|
global $db_details_links_count_tabs;
|
||||||
|
|
||||||
|
$bgcolor = (basename($PHP_SELF) == $link) ? "silver" : "#DFDFDF";
|
||||||
|
$db_details_links_count_tabs++;
|
||||||
|
|
||||||
|
$out = "\n\t\t<td bgcolor=\"$bgcolor\" align=\"center\" width=\"64\" nowrap=\"nowrap\">";
|
||||||
|
if (strlen($link)>0)
|
||||||
|
$out .= "<a href=\"$link?$args\" $attr><b>$text</b></a>";
|
||||||
|
else
|
||||||
|
$out .= "<b>$text</b>";
|
||||||
|
$out .= "</td>";
|
||||||
|
$out .= "\n\t\t<td width=\"8\"> </td>";
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Kanji encoding convert feature appended by Y.Kawada (2002/2/20)
|
// Kanji encoding convert feature appended by Y.Kawada (2002/2/20)
|
||||||
if (PMA_PHP_INT_VERSION >= 40006
|
if (PMA_PHP_INT_VERSION >= 40006
|
||||||
|
@@ -1,60 +1,61 @@
|
|||||||
<?php
|
<?php
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
|
// count amount of navigation tabs
|
||||||
|
$db_details_links_count_tabs = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepares links
|
* Prepares links
|
||||||
*/
|
*/
|
||||||
if ($num_rows > 0) {
|
if ($num_rows > 0) {
|
||||||
$lnk2 = '<a href="sql.php3?' . $url_query
|
$lnk2 = 'sql.php3';
|
||||||
|
$arg2 = $url_query
|
||||||
. '&sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($table))
|
. '&sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($table))
|
||||||
. '&pos=0">';
|
. '&pos=0';
|
||||||
$lnk4 = '<a href="tbl_select.php3?' . $url_query . '">';
|
$lnk4 = 'tbl_select.php3';
|
||||||
|
$arg4 = $url_query;
|
||||||
$ln6_stt = (PMA_MYSQL_INT_VERSION >= 40000)
|
$ln6_stt = (PMA_MYSQL_INT_VERSION >= 40000)
|
||||||
? 'TRUNCATE '
|
? 'TRUNCATE '
|
||||||
: 'DELETE FROM ';
|
: 'DELETE FROM ';
|
||||||
$lnk6 = '<a href="sql.php3?' . $url_query . '&sql_query='
|
$lnk6 = 'sql.php3';
|
||||||
|
$arg6 = $url_query . '&sql_query='
|
||||||
. urlencode($ln6_stt . PMA_backquote($table))
|
. urlencode($ln6_stt . PMA_backquote($table))
|
||||||
. '&zero_rows='
|
. '&zero_rows='
|
||||||
. urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)))
|
. urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)));
|
||||||
. '"' . "\n"
|
$att6 = 'onclick="return confirmLink(this, \'' . $ln6_stt . PMA_jsFormat($table) . '\')"';
|
||||||
. ' onclick="return confirmLink(this, \'' . $ln6_stt . PMA_jsFormat($table) . '\')">';
|
|
||||||
} else {
|
} else {
|
||||||
$lnk2 = '';
|
$lnk2 = '';
|
||||||
$lnk4 = '';
|
$lnk4 = '';
|
||||||
$lnk6 = '';
|
$lnk6 = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$lnk7 = "sql.php3";
|
||||||
|
$arg7 = ereg_replace('tbl_properties.php3$', 'db_details.php3', $url_query) . '&back=tbl_properties' . $sub_part . '.php3&reload=1&sql_query= ' . urlencode('DROP TABLE ' . PMA_backquote($table) ) . '&zero_rows=' . urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table)));
|
||||||
|
$att7 = 'class="drop" onclick="return confirmLink(this, \'DROP TABLE ' . PMA_jsFormat($table) . '\')"';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays links
|
* Displays links
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<p>
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||||
[
|
<tr>
|
||||||
<a href="tbl_properties.php3?<?php echo $url_query; ?>">
|
<td width="8"> </td>
|
||||||
<b><?php echo $strSQL; ?></b></a> |
|
<?php
|
||||||
<?php echo $lnk2 . "\n"; ?>
|
echo printTab($strSQL,"tbl_properties.php3",$url_query);
|
||||||
<b><?php echo $strBrowse; ?></b><?php if ($lnk2) echo '</a>'; ?> |
|
echo printTab($strBrowse,$lnk2,$arg2);
|
||||||
<a href="tbl_properties_structure.php3?<?php echo $url_query; ?>">
|
echo printTab($strStructure,"tbl_properties_structure.php3",$url_query);
|
||||||
<b><?php echo $strStructure; ?></b></a> |
|
echo printTab($strSelect,$lnk4,$arg4);
|
||||||
<?php echo $lnk4 . "\n"; ?>
|
echo printTab($strInsert,"tbl_change.php3",$url_query);
|
||||||
<b><?php echo $strSelect; ?></b><?php if ($lnk4) echo '</a>'; ?> |
|
echo printTab($strEmpty,$lnk6,$arg6,$att6);
|
||||||
<a href="tbl_change.php3?<?php echo $url_query; ?>">
|
echo printTab($strExport,"tbl_properties_export.php3",$url_query);
|
||||||
<b><?php echo $strInsert; ?></b></a> |
|
echo printTab($strOperations,"tbl_properties_operations.php3",$url_query);
|
||||||
<?php echo $lnk6 . "\n"; ?>
|
echo printTab($strOptions,"tbl_properties_options.php3",$url_query);
|
||||||
<b><?php echo $strEmpty; ?></b><?php if ($lnk6) echo '</a>'; ?> |
|
echo printTab($strDrop,"sql.php3",$arg7,$att7);
|
||||||
<a href="tbl_properties_export.php3?<?php echo $url_query; ?>">
|
|
||||||
<b><?php echo $strExport; ?></b></a> |
|
?>
|
||||||
<a href="tbl_properties_operations.php3?<?php echo $url_query; ?>">
|
|
||||||
<b><?php echo $strOperations; ?></b></a> |
|
</tr>
|
||||||
<a href="tbl_properties_options.php3?<?php echo $url_query; ?>">
|
<tr>
|
||||||
<b><?php echo $strOptions; ?></b></a>
|
<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>
|
||||||
<a href="sql.php3?<?php echo ereg_replace('tbl_properties.php3$', 'db_details.php3', $url_query); ?>&back=tbl_properties' . $sub_part . '.php3&reload=1&sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
|
|
||||||
class="drop" onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
|
|
||||||
<b><?php echo $strDrop; ?></b></a>
|
|
||||||
]
|
|
||||||
</p>
|
|
||||||
<hr />
|
|
Reference in New Issue
Block a user