From bfdfec7f69f17f44e9789f1b19c7d60138276258 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Thu, 20 Jun 2002 08:09:04 +0000 Subject: [PATCH] Patch #571426 --- ChangeLog | 4 ++ db_details_links.php3 | 77 +++++++++++++++++++-------------------- header.inc.php3 | 1 + libraries/common.lib.php3 | 29 +++++++++++++++ tbl_properties_links.php3 | 71 ++++++++++++++++++------------------ 5 files changed, 107 insertions(+), 75 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8ce2110d..86559bfbb 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-06-20 Alexander M. Turek + * 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 * libraries/common.lib.php3, libraries/config_import.lib.php3, config.inc.php3: Rewrote the whole backwards compatibility code for old diff --git a/db_details_links.php3 b/db_details_links.php3 index 8e529bdcf..47e8b5808 100644 --- a/db_details_links.php3 +++ b/db_details_links.php3 @@ -1,14 +1,18 @@ 0) { - $lnk3 = ''; - $lnk4 = ''; + $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 = ''; + . '&goto=main.php3&back=db_details' . $sub_part . '.php3&reload=1"'; + $att5 = 'class="drop" ' + . 'onclick="return confirmLink(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')"'; } else { $lnk5 = ''; } - /** - * Displays links + * Displays tab links */ ?> -

- [  - -  | - -  | - - ' ?> | - - '; 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) { - ?> - |  - -  ]    - + + + 0) { + echo printTab($strQBE,"tbl_qbe.php3",$url_query); +} // end if + +/** + * Displays drop link + */ if ($lnk5) { - ?> - [  - - -  ] - -

-
+ + + + +
 
\ No newline at end of file diff --git a/header.inc.php3 b/header.inc.php3 index e31656383..239e6786e 100755 --- a/header.inc.php3 +++ b/header.inc.php3 @@ -92,6 +92,7 @@ a.drop:visited {font-family: ; color: #ff0000} a.drop:hover {font-family: ; color: #ffffff; background-color:#ff0000; text-decoration:none} .nav {font-family: ; color: #000000} .warning {font-family: ; font-size: ; font-weight: bold; color: #FF0000} +td.topline {font-size: 1px} //--> diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index 27e62576c..d8fb39852 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -1328,6 +1328,35 @@ if (typeof(document.getElementById) != 'undefined' return strftime($date, $timestamp); } // 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"; + if (strlen($link)>0) + $out .= "$text"; + else + $out .= "$text"; + $out .= ""; + $out .= "\n\t\t "; + return $out; + } + // Kanji encoding convert feature appended by Y.Kawada (2002/2/20) if (PMA_PHP_INT_VERSION >= 40006 diff --git a/tbl_properties_links.php3 b/tbl_properties_links.php3 index 970756565..c6f29f1b8 100755 --- a/tbl_properties_links.php3 +++ b/tbl_properties_links.php3 @@ -1,60 +1,61 @@ 0) { - $lnk2 = ''; - $lnk4 = ''; + . '&pos=0'; + $lnk4 = 'tbl_select.php3'; + $arg4 = $url_query; $ln6_stt = (PMA_MYSQL_INT_VERSION >= 40000) ? 'TRUNCATE ' : 'DELETE FROM '; - $lnk6 = ''; + . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table))); + $att6 = 'onclick="return confirmLink(this, \'' . $ln6_stt . PMA_jsFormat($table) . '\')"'; } else { $lnk2 = ''; $lnk4 = ''; $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 */ ?> -

- [  - -  | - - '; ?> | - -  | - - '; ?> | - -  | - - '; ?> | - -  | - -  | - - -  ]    - [  - - -  ] -

-
+ + + + + + + + + +
 
\ No newline at end of file