diff --git a/ChangeLog b/ChangeLog index 0cd88a84c..638e69040 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,13 +5,25 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-12-18 Loïc Chapeaux + * sql.php3; tbl_change.php3; tbl_replace.php3; + libraries/display_tbl.lib.php3: the number of rows to return, display + direction and table headers "frequencies" weren't passed between scripts. + * config.inc.php3; Documentation.html; libraries/display_tbl.lib.php3: + - codding standards; + - little bugs with vertical/horizontal display direction. + +2001-12-16 Loïc Chapeaux + * footer.inc.php3: back to previous version (it does not fix the bug + #493200 but creates a new one). + 2001-12-16 Marc Delisle * merge and adapt Vertical/horizontal browsing patch #492470 - thanks to Garvin Hicking (hicking at faktor-e.de) - - config.inc.php3 - - libraries/display_tbl.lib.php3 - - lang/* - - Documentation.html + thanks to Garvin Hicking (hicking at faktor-e.de) + - config.inc.php3 + - libraries/display_tbl.lib.php3 + - lang/* + - Documentation.html 2001-12-15 Loïc Chapeaux * libraries/common.lib.php3: diff --git a/Documentation.html b/Documentation.html index 13087c401..457943d73 100755 --- a/Documentation.html +++ b/Documentation.html @@ -146,10 +146,10 @@

Introduction

- phpMyAdmin can manager a whole MySQL-server (needs a super-user) + phpMyAdmin can manager a whole MySQL-server (needs a super-user) but also a single database. To accomplish the latter you'll need a properly set up MySQL-user who can read/write only the desired - database. It's up to you to look up the appropriate part in the + database. It's up to you to look up the appropriate part in the MySQL manual. Currently phpMyAdmin can:

@@ -218,10 +218,10 @@ Have a look at Configuration section for an explanation of all values. -
  • It is recommended that you protect the directory in which - you installed phpMyAdmin (unless it's on a closed intranet, or you - wish to use http or cookie authentication), for example with - HTTP-AUTH (in a .htaccess file). See the +
  • It is recommended that you protect the directory in which you + installed phpMyAdmin (unless it's on a closed intranet, or you wish to + use http or cookie authentication), for example with HTTP-AUTH (in a + .htaccess file). See the FAQ section for additional information.
  • Open the file @@ -241,64 +241,67 @@

    Using authentication modes:

      -
    • Http and cookie authentication modes are recommended in a multi-user +
    • Http and cookie authentication modes are recommended in a multi-user environment where you want to give users access to their own database and don't want them to play around with others.

    • -
    • Http and cookie authentication modes are secure: the MySQL password does - not need to be set in the phpMyAdmin configuration file. (except for the - "standard user" -see the Configuration section-).
      +
    • Http and cookie authentication modes are secure: the MySQL password + does not need to be set in the phpMyAdmin configuration file. (except + for the "standard user" -see the Configuration section-). +
      In cookie mode, we send the password in a temporary cookie, so most browsers should not store the password in their cookie file.

    • -
    • For 'http' and 'cookie' modes, phpMyAdmin needs a stduser that - has only the SELECT - privilege on the mysql.user (all columns except - "Password"), mysql.db (all columns) & - mysql.tables_priv (all columns except "Grantor" & - "Timestamp") tables.
      - You must specify the details for the stduser in the config.inc.php3 - file under the $cfgServers[n]['stduser'] & - $cfgServers[n]['stdpass'] settings.
      - To create the control account (<stduser> and - <stdpass> have to be replaced by your own values, of course):
      - - - - - - - - - - - - -
          - GRANT USAGE ON mysql.* TO '<stduser>'@'localhost' IDENTIFIED BY '<stdpass>';
      - GRANT SELECT (Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv) ON mysql.user TO '<stduser>'@'localhost';
      - GRANT SELECT ON mysql.db TO '<stduser>'@'localhost';
      - GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) ON mysql.tables_priv TO '<stduser>'@'localhost'; -
      - ... and if you want to use the bookmark feature: -
          - GRANT SELECT, INSERT, DELETE ON <bookmark_db>.<bookmark_table> TO '<stduser>'@'localhost'; -
      -
      -
    • -
    • - Then each of the true users should be granted of a set of - privileges on a set of perticular databases but shouldn't have any global - privileges. For example, to grant the user real_user with all - privileges on the database user_base:
      -    GRANT ALL PRIVILEGES ON user_base.* TO 'real_user'@localhost IDENTIFIED BY 'real_password'; -
      - What the user may now do is controlled entirely by the MySQL user management - system.
      - With http or cookie auth mode, you don't need to fill the user/password - fields inside the $cfgServers array.
      -
    • +
    • + For 'http' and 'cookie' modes, phpMyAdmin needs a stduser that has + only the SELECT privilege on the mysql.user (all + columns except "Password"), mysql.db (all columns) + & mysql.tables_priv (all columns except "Grantor" + & "Timestamp") tables.
      + You must specify the details for the stduser in the + config.inc.php3 file under the + $cfgServers[n]['stduser'] & + $cfgServers[n]['stdpass'] settings.
      + To create the control account (<stduser> and + <stdpass> have to be replaced by your own values, of + course):
      + + + + + + + + + + + + +
          + GRANT USAGE ON mysql.* TO '<stduser>'@'localhost' IDENTIFIED BY '<stdpass>';
      + GRANT SELECT (Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv) ON mysql.user TO '<stduser>'@'localhost';
      + GRANT SELECT ON mysql.db TO '<stduser>'@'localhost';
      + GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) ON mysql.tables_priv TO '<stduser>'@'localhost'; +
      + ... and if you want to use the bookmark feature: +
          + GRANT SELECT, INSERT, DELETE ON <bookmark_db>.<bookmark_table> TO '<stduser>'@'localhost'; +
      +
      +
    • +
    • + Then each of the true users should be granted of a set of + privileges on a set of perticular databases but shouldn't have any + global privileges. For example, to grant the user real_user with + all privileges on the database user_base:
      +    GRANT ALL PRIVILEGES ON user_base.* TO 'real_user'@localhost IDENTIFIED BY 'real_password'; +
      + What the user may now do is controlled entirely by the MySQL user + management system.
      + With http or cookie auth mode, you don't need to fill the user/password + fields inside the $cfgServers array.
      +

    'http' authentication mode:

    @@ -308,6 +311,7 @@ allows you to login as any valid MySQL user.
  • Is only supported with PHP running as an Apache module, not with cgi.
  • +

    'cookie' authentication mode:

    • You can use this method as a replacement for the http @@ -325,8 +329,8 @@ fields.
      But usually you don't need to setup a "standard user" here: using the $cfgServers[n]['only_db'] might be enough.
      - In the ISP FAQ section, there is an entry explaining how to - protect your configuration file.
    • + In the ISP FAQ section, there is an entry explaining how to protect + your configuration file.
    @@ -438,8 +442,9 @@
    • - 'config' authentication ($auth_type = 'config') - is the plain old way: username and password are stored in + 'config' authentication + ($auth_type = 'config') is the plain old + way: username and password are stored in config.inc.php3.
    • @@ -453,7 +458,7 @@
    • 'http' authentication (was called 'advanced' in older versions) ($auth_type = 'http') as introduced in 1.3.0 - allows you to log in as any valid MySQL user via HTTP-Auth.
      + allows you to log in as any valid MySQL user via HTTP-Auth.

    @@ -724,21 +729,6 @@

    -
    -
    $cfgDefaultDisplay string
    -
    - There are 2 display modes: horizontal and vertical. Define which one - is displayed by default. -

    -
    - -
    -
    $cfgRepeatCells integer
    -
    - Repeat the headers every X cells, or 0 to deactivate. -

    -
    -
    $cfgLeftBgColor string [HTML color]
    $cfgRightBgColor string [HTML color] @@ -811,6 +801,21 @@ Defines the place where modify and delete links would be put when tables contents are displayed (you may have them displayed both at the left and at the right). + "Left" and "right" are parsed as "top" + and "bottom" with vertical display mode. +

    + + +
    $cfgDefaultDisplay string
    +
    + There are 2 display modes: horizontal and vertical. Define which one is + displayed by default. +

    +
    + +
    $cfgRepeatCells integer
    +
    + Repeat the headers every X cells, or 0 to deactivate.

    @@ -1168,7 +1173,7 @@ Testing needs to be done for Konqueror 2.2.2.

    -

    +

    I refresh (reload) my browser, and come back to the welcome page.
    Some browsers support right-clicking into the frame you want to refresh, diff --git a/config.inc.php3 b/config.inc.php3 index bdfed8b2c..d145985eb 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -173,9 +173,12 @@ $cfgTextareaCols = 40; // textarea size (columns) in edit mode $cfgTextareaRows = 7; // textarea size (rows) in edit mode $cfgLimitChars = 50; // max field data length in browse mode $cfgModifyDeleteAtLeft = TRUE; // show edit/delete links on left side of browse + // (or at the top with vertical browse) $cfgModifyDeleteAtRight = FALSE; // show edit/delete links on right side of browse -$cfgDefaultDisplay = 'horizontal'; // default display mode (horizontal|vertical) -$cfgRepeatCells = 100; // repeat header names every X cells? (0 = deactivate) + // (or at the bottom with vertical browse) +$cfgDefaultDisplay = 'horizontal'; // default display direction (horizontal|vertical) +$cfgRepeatCells = 100; // repeat header names every X cells? (0 = deactivate) + /** * MySQL settings diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index dbef39088..77bd92f03 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -181,6 +181,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ * without any programmatically appended "LIMIT" clause * @global integer the current position in results * @global mixed the maximum number of rows per page ('all' = no limit) + * @global string the display mode (horizontal/vertical) + * @global integer the number of row to display between two table headers * @global boolean whether to limit the number of displayed characters of * text type fields or not * @@ -192,7 +194,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ { global $lang, $server, $db, $table; global $goto; - global $num_rows, $unlim_num_rows, $pos, $session_max_rows, $displaymode, $repeatcells; + global $num_rows, $unlim_num_rows, $pos, $session_max_rows; + global $disp_direction, $repeat_cells; global $dontlimitchars; ?> @@ -224,6 +227,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ + + /> @@ -238,6 +243,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ + + /> @@ -250,7 +257,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){     - +

    @@ -263,33 +270,19 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ - -
    - - - " . - "" . -" ", - -// second parameter - "" - ); -?> - + +
    + ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' '; + $param2 = ' ' . "\n" + . ' '; + echo ' ' . sprintf($GLOBALS['strRowsModeOptions'], "\n" . $param1, "\n" . $param2) . "\n"; + ?>
    @@ -322,6 +315,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ + + /> @@ -337,6 +332,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ + + /> @@ -361,6 +358,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ + + @@ -397,6 +396,9 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ * @global integer the total number of rows returned by the sql query * @global integer the current position in results * @global integer the maximum number of rows per page + * @global array informations used with vertical display mode + * @global string the display mode (horizontal/vertical) + * @global integer the number of row to display between two table headers * @global boolean whether to limit the number of displayed characters of * text type fields or not * @@ -409,20 +411,20 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ global $lang, $server, $db, $table; global $goto; global $sql_query, $num_rows, $pos, $session_max_rows; + global $verticaldisplay, $disp_direction, $repeat_cells; global $dontlimitchars; - global $verticaldisplay, $displaymode, $repeatcells; - if (!($displaymode) or ($displaymode=="horizontal")) { - ?> + if ($disp_direction == 'horizontal') { + ?> - + $verticaldisplay['emptypre'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 2 : 1; + if ($disp_direction == 'horizontal') { + ?> <?php echo (($dontlimitchars) ? $GLOBALS['strPartialText'] : $GLOBALS['strFullText']); ?> @@ -452,33 +456,33 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ - + $verticaldisplay['emptypre'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 2 : 1; + if ($disp_direction == 'horizontal') { + ?> " align="center"> <?php echo (($dontlimitchars) ? $GLOBALS['strPartialText'] : $GLOBALS['strFullText']); ?> - + $verticaldisplay['emptypre'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 2 : 1; + if ($disp_direction == 'horizontal') { + ?> > - + // 2.1.5 Displays the sorting url + if ($disp_direction == 'horizontal') { + ?> name); ?> - ' . "\n" - . ' ' . "\n" - . ' ' . htmlspecialchars($fields_meta[$i]->name) . '' . $order_img . "\n" - . ' '; - } // end if (2.1) + ' . "\n" + . ' ' . "\n" + . ' ' . htmlspecialchars($fields_meta[$i]->name) . '' . $order_img . "\n" + . ' ' . "\n"; + } // end if (2.1) // 2.2 Results can't be sorted else { - if (!($displaymode) or ($displaymode=="horizontal")) { - echo "\n"; - ?> + echo "\n"; + if ($disp_direction == 'horizontal') { + ?> name) . "\n"; ?> - ' . "\n" - . ' ' . htmlspecialchars($fields_meta[$i]->name) . "\n" - . ' '; - + ' . "\n" + . ' ' . htmlspecialchars($fields_meta[$i]->name) . "\n" + . ' '; } // end else (2.2) echo "\n"; } // end for @@ -599,33 +603,32 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ && ($is_display['edit_lnk'] != 'nn' || $is_display['del_lnk'] != 'nn') && $is_display['text_btn'] == '1') { echo "\n"; - $verticaldisplay["emptyafter"] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 2 : 1; - if (!($displaymode) or ($displaymode=="horizontal")) { - ?> + $verticaldisplay['emptyafter'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 2 : 1; + if ($disp_direction == 'horizontal') { + ?> " align="center"> <?php echo (($dontlimitchars) ? $GLOBALS['strPartialText'] : $GLOBALS['strFullText']); ?> - '; - $verticaldisplay["emptyafter"] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 2 : 1; + $verticaldisplay['emptyafter'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 2 : 1; } + echo "\n"; - if (!($displaymode) or ($displaymode=="horizontal")) echo "\n"; - - if (!($displaymode) or ($displaymode=="horizontal")) { - ?> + if ($disp_direction == 'horizontal') { + ?> - "; - - for ($foo_i=0;$foo_i<$verticaldisplay["emptypre"];$foo_i++) { - echo " "; - } - reset($verticaldisplay["desc"]); - while(list($key, $val) = each($verticaldisplay["desc"])) { - echo $val; - } + // lem9: "vertical display" mode stuff + if (($foo != 0) && ($repeat_cells != 0) && !($foo % $repeat_cells) && $disp_direction == 'horizontal') { + echo '' . "\n"; - for ($foo_i=0;$foo_i<$verticaldisplay["emptyafter"];$foo_i++) { - echo " "; - } + for ($foo_i = 0; $foo_i < $verticaldisplay['emptypre']; $foo_i++) { + echo '  ' . "\n"; + } - echo ""; - } - - $bgcolor = ($foo % 2) ? $GLOBALS['cfgBgcolorOne'] : $GLOBALS['cfgBgcolorTwo']; + reset($verticaldisplay["desc"]); + while (list($key, $val) = each($verticaldisplay['desc'])) { + echo ' ' . $val; + } - if (!($displaymode) or ($displaymode=="horizontal")) { - // loic1: pointer code part -$on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '') - ? '' - : ' onmouseover="setPointer(this, \'' . - $GLOBALS['cfgBrowsePointerColor'] . '\')" onmouseout="setPointer(this, \'' . - $bgcolor . '\')"'; - ?> + for ($foo_i = 0; $foo_i < $verticaldisplay['emptyafter']; $foo_i++) { + echo '  ' . "\n"; + } + + echo '' . "\n"; + } // end if + + $bgcolor = ($foo % 2) ? $GLOBALS['cfgBgcolorOne'] : $GLOBALS['cfgBgcolorTwo']; + + if ($disp_direction == 'horizontal') { + // loic1: pointer code part + $on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '') + ? '' + : ' onmouseover="setPointer(this, \'' . $GLOBALS['cfgBrowsePointerColor'] . '\')" onmouseout="setPointer(this, \'' . $bgcolor . '\')"'; + + ?> > - @@ -831,7 +840,7 @@ $on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '') @@ -843,7 +852,7 @@ $on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '') numeric == 1) { if (!isset($row[$primary->name]) || (function_exists('is_null') && is_null($row[$primary->name]))) { - $verticaldisplay["data"][$foo][$i] = ' NULL' . "\n"; + $verticaldisplay['data'][$foo][$i] = ' NULL' . "\n"; } else if ($row[$i] != '') { - $verticaldisplay["data"][$foo][$i] = ' ' . $row[$primary->name] . '' . "\n"; + $verticaldisplay['data'][$foo][$i] = ' ' . $row[$primary->name] . '' . "\n"; } else { - $verticaldisplay["data"][$foo][$i] = '  ' . "\n"; + $verticaldisplay['data'][$foo][$i] = '  ' . "\n"; } } else if ($GLOBALS['cfgShowBlob'] == FALSE && eregi('BLOB', $primary->type)) { // loic1 : mysql_fetch_fields returns BLOB in place of TEXT @@ -865,11 +874,11 @@ $on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '') // fields. $field_flags = mysql_field_flags($dt_result, $i); if (eregi('BINARY', $field_flags)) { - $verticaldisplay["data"][$foo][$i] = ' [BLOB]' . "\n"; + $verticaldisplay['data'][$foo][$i] = ' [BLOB]' . "\n"; } else { if (!isset($row[$primary->name]) || (function_exists('is_null') && is_null($row[$primary->name]))) { - $verticaldisplay["data"][$foo][$i] = ' NULL' . "\n"; + $verticaldisplay['data'][$foo][$i] = ' NULL' . "\n"; } else if ($row[$primary->name] != '') { if (strlen($row[$primary->name]) > $GLOBALS['cfgLimitChars'] && ($dontlimitchars != 1)) { $row[$primary->name] = substr($row[$primary->name], 0, $GLOBALS['cfgLimitChars']) . '...'; @@ -879,15 +888,15 @@ $on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '') $row[$primary->name] = htmlspecialchars($row[$primary->name]); $row[$primary->name] = str_replace("\011", '    ', str_replace(' ', ' ', $row[$primary->name])); $row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))", '
    ', $row[$primary->name]); - $verticaldisplay["data"][$foo][$i] = ' ' . $row[$primary->name] . '' . "\n"; + $verticaldisplay['data'][$foo][$i] = ' ' . $row[$primary->name] . '' . "\n"; } else { - $verticaldisplay["data"][$foo][$i] = '  ' . "\n"; + $verticaldisplay['data'][$foo][$i] = '  ' . "\n"; } } } else { if (!isset($row[$primary->name]) || (function_exists('is_null') && is_null($row[$primary->name]))) { - $verticaldisplay["data"][$foo][$i] = ' NULL' . "\n"; + $verticaldisplay['data'][$foo][$i] = ' NULL' . "\n"; } else if ($row[$primary->name] != '') { // loic1: Cut text/blob fields even if $cfgShowBlob is true if (eregi('BLOB', $primary->type)) { @@ -911,22 +920,27 @@ $on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '') $row[$primary->name] = str_replace("\011", '    ', str_replace(' ', ' ', $row[$primary->name])); $row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))", '
    ', $row[$primary->name]); } - $verticaldisplay["data"][$foo][$i] = ' ' . $row[$primary->name] . '' . "\n"; + $verticaldisplay['data'][$foo][$i] = ' ' . $row[$primary->name] . '' . "\n"; } else { - $verticaldisplay["data"][$foo][$i] = '  ' . "\n"; + $verticaldisplay['data'][$foo][$i] = '  ' . "\n"; } } - // output stored cell - if (!($displaymode) or ($displaymode=="horizontal")) { - echo $verticaldisplay["data"][$foo][$i]; - } - - $verticaldisplay["rowdata"][$i][$foo] .= $verticaldisplay["data"][$foo][$i]; + // lem9: output stored cell + if ($disp_direction == 'horizontal') { + echo $verticaldisplay['data'][$foo][$i]; + } + + if (isset($verticaldisplay['rowdata'][$i][$foo])) { + $verticaldisplay['rowdata'][$i][$foo] .= $verticaldisplay['data'][$foo][$i]; + } else { + $verticaldisplay['rowdata'][$i][$foo] = $verticaldisplay['data'][$foo][$i]; + } } // end for (2) // 3. Displays the modify/delete links on the right if required - if ($GLOBALS['cfgModifyDeleteAtRight'] AND (!($displaymode) or ($displaymode=="horizontal"))) { + if ($GLOBALS['cfgModifyDeleteAtRight'] + && ($disp_direction == 'horizontal')) { if (!empty($edit_url)) { ?> @@ -947,30 +961,38 @@ $on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '') } } // end if (3) - if (!($displaymode) or ($displaymode=="horizontal")) { - ?> + if ($disp_direction == 'horizontal') { + echo "\n"; + ?> - ' . "\n"; - $verticaldisplay["edit"][$foo] .= ' ' . "\n"; - $verticaldisplay["edit"][$foo] .= ' ' . $edit_str . '' . "\n"; - $verticaldisplay["edit"][$foo] .= ' ' . "\n"; + // 4. Gather links of del_urls and edit_urls in an array for later + // output + if (!isset($verticaldisplay['edit'][$foo])) { + $verticaldisplay['edit'][$foo] = ''; + $verticaldisplay['delete'][$foo] = ''; + } + $verticaldisplay['edit'][$foo] .= ' ' . "\n"; + $verticaldisplay['edit'][$foo] .= ' ' . "\n"; + $verticaldisplay['edit'][$foo] .= ' ' . $edit_str . '' . "\n"; + $verticaldisplay['edit'][$foo] .= ' ' . "\n"; - $verticaldisplay["delete"][$foo] .= ' ' . "\n"; - $verticaldisplay["delete"][$foo] .= ' ' . "\n"; - $verticaldisplay["delete"][$foo] .= ' ' . "\n"; + $verticaldisplay['delete'][$foo] .= ' ' . "\n"; + $verticaldisplay['delete'][$foo] .= ' ' . "\n"; + $verticaldisplay['delete'][$foo] .= ' ' . "\n"; - if (!($displaymode) or ($displaymode=="horizontal")) echo "\n"; + echo "\n"; $foo++; } // end while - return true; + return TRUE; } // end of the 'PMA_displayTableBody()' function @@ -996,6 +1018,9 @@ $on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '') * displayed * @global array the list of fields properties * @global integer the total number of fields returned by the sql query + * @global array informations used with vertical display mode + * @global string the display mode (horizontal/vertical) + * @global integer the number of row to display between two table headers * @global boolean whether to limit the number of displayed characters of * text type fields or not * @@ -1010,8 +1035,8 @@ $on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '') global $lang, $server, $db, $table; global $goto; global $sql_query, $num_rows, $unlim_num_rows, $pos, $fields_meta, $fields_cnt; + global $verticaldisplay, $disp_direction, $repeat_cells; global $dontlimitchars; - global $verticaldisplay, $displaymode, $repeatcells; // 1. ----- Prepares the work ----- @@ -1078,119 +1103,117 @@ $on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '') } // 3. ----- Displays the results table ----- + // lem9: horizontal output? + if ($disp_direction == 'horizontal') { + ?> + + + +
    +
    + + + + - -
    - + if ($GLOBALS['cfgModifyDeleteAtLeft'] && is_array($verticaldisplay['edit'])) { + echo '' . "\n"; + echo ' ' . "\n"; + reset($verticaldisplay['edit']); + $foo_counter = 0; + while (list($key, $val) = each($verticaldisplay['edit'])) { + if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) { + echo ' ' . "\n"; + } + + echo $val; + $foo_counter++; + } // end while + echo '' . "\n"; + } // end if + + if ($GLOBALS['cfgModifyDeleteAtLeft'] && is_array($verticaldisplay['delete'])) { + echo '' . "\n"; + echo '' . "\n"; + reset($verticaldisplay['delete']); + $foo_counter = 0; + while (list($key, $val) = each($verticaldisplay['delete'])) { + if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) { + echo '' . "\n"; + } + + echo $val; + $foo_counter++; + } // end while + echo '' . "\n"; + } // end if + + reset($verticaldisplay['desc']); + while (list($key, $val) = each($verticaldisplay['desc'])) { + echo '' . "\n"; + echo $val; + + $foo_counter = 0; + while (list($subkey, $subval) = each($verticaldisplay['rowdata'][$key])) { + if (($foo_counter != 0) && ($repeat_cells != 0) and !($foo_counter % $repeat_cells)) { + echo $val; + } + + echo $subval; + $foo_counter++; + } // end while + + echo '' . "\n"; + } // end while + + if ($GLOBALS['cfgModifyDeleteAtRight'] && is_array($verticaldisplay['edit'])) { + echo '' . "\n"; + echo ' ' . "\n"; + reset($verticaldisplay['edit']); + $foo_counter = 0; + while (list($key, $val) = each($verticaldisplay['edit'])) { + if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) { + echo '' . "\n"; + } + + echo $val; + $foo_counter++; + } // end while + echo '' . "\n"; + } // end if + + if ($GLOBALS['cfgModifyDeleteAtRight'] && is_array($verticaldisplay['delete'])) { + echo '' . "\n"; + echo '' . "\n"; + reset($verticaldisplay['delete']); + $foo_counter = 0; + while (list($key, $val) = each($verticaldisplay['delete'])) { + if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) { + echo '' . "\n"; + } + + echo $val; + $foo_counter++; + } // end while + echo '' . "\n"; + } + ?>
      
      
      
      

    - - - - \n"; - echo ""; - reset($verticaldisplay["edit"]); - $foo_counter=0; - while(list($key, $val) = each($verticaldisplay["edit"])) { - if (($foo_counter != 0) and ($repeatcells != 0) and !($foo_counter % $repeatcells)) { - echo ""; - } - - echo $val; - $foo_counter++; - } - echo "\n"; - } - - if ($GLOBALS['cfgModifyDeleteAtTop'] AND is_array($verticaldisplay["delete"])) { - echo "\n"; - echo ""; - reset($verticaldisplay["delete"]); - $foo_counter=0; - while(list($key, $val) = each($verticaldisplay["delete"])) { - if (($foo_counter != 0) and ($repeatcells != 0) and !($foo_counter % $repeatcells)) { - echo ""; - } - - echo $val; - $foo_counter++; - } - echo "\n"; - } - - reset($verticaldisplay["desc"]); - while(list($key, $val) = each($verticaldisplay["desc"])) { - echo "\n"; - echo $val; - - $foo_counter = 0; - while(list($subkey, $subval) = each($verticaldisplay["rowdata"][$key])) { - if (($foo_counter != 0) and ($repeatcells != 0) and !($foo_counter % $repeatcells)) { - echo $val; - } - - echo $subval; - $foo_counter++; - } - - echo "\n"; - } - - if ($GLOBALS['cfgModifyDeleteAtBottom'] AND is_array($verticaldisplay["edit"])) { - echo "\n"; - echo ""; - reset($verticaldisplay["edit"]); - $foo_counter=0; - while(list($key, $val) = each($verticaldisplay["edit"])) { - if (($foo_counter != 0) and ($repeatcells != 0) and !($foo_counter % $repeatcells)) { - echo ""; - } - - echo $val; - $foo_counter++; - } - echo "\n"; - } - - if ($GLOBALS['cfgModifyDeleteAtBottom'] AND is_array($verticaldisplay["delete"])) { - echo "\n"; - echo ""; - reset($verticaldisplay["delete"]); - $foo_counter=0; - while(list($key, $val) = each($verticaldisplay["delete"])) { - if (($foo_counter != 0) and ($repeatcells != 0) and !($foo_counter % $repeatcells)) { - echo ""; - } - - echo $val; - $foo_counter++; - } - echo "\n"; - } - ?> -
      
      
      
      
    -
    - ' . "\n"; @@ -380,6 +397,9 @@ else { . '&db=' . urlencode($db) . '&table=' . urlencode($table) . '&pos=' . $pos + . '&session_max_rows=' . $session_max_rows + . '&disp_direction=' . $disp_direction + . '&repeat_cells=' . $repeat_cells . '&sql_query=' . urlencode($sql_query) . '&id_bookmark=1'; ?> diff --git a/tbl_change.php3 b/tbl_change.php3 index 6c53dc95f..c12188658 100755 --- a/tbl_change.php3 +++ b/tbl_change.php3 @@ -31,11 +31,11 @@ if (!empty($message)) { } PMA_showMessage($message); if (isset($goto_cpy)) { - $goto = $goto_cpy; + $goto = $goto_cpy; unset($goto_cpy); } if (isset($sql_query_cpy)) { - $sql_query = $sql_query_cpy; + $sql_query = $sql_query_cpy; unset($sql_query_cpy); } } @@ -123,6 +123,9 @@ else + + +