From 7e04ee2467dbaa39368a9df4dc2dca5d84c07952 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Mon, 14 Nov 2005 15:01:20 +0000 Subject: [PATCH] - added class icon to images - fixed select all rows/row maker - removed arrow_ltr/rtl.png for vertical display - cleaned up php code and html output --- ChangeLog | 5 + libraries/display_tbl.lib.php | 304 ++++++++++++---------------- libraries/display_tbl_links.lib.php | 12 +- 3 files changed, 144 insertions(+), 177 deletions(-) diff --git a/ChangeLog b/ChangeLog index a1430ff1d..cf4cbdce9 100755 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,11 @@ $Source$ - undefined variable docY * libraries/left_header.inc.php - added class icon + * display_tbl.lib.php, libraries/display_tbl_links.lib.php: + - added class icon to images + - fixed select all rows + - removed arrow_ltr/rtl.png for vertical display + - cleaned up php code and html output 2005-11-13 Michal Čihař * Documentation.html, config.default.php, main.php, server_links.inc.php, diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index fef4b0639..7960d8a23 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -227,7 +227,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_query) // loic1: patch #474210 from Gosha Sakovich - part 1 if ($GLOBALS['cfg']['NavigationBarIconic']) { $caption1 = '<<'; - $caption2 = ' < '; + $caption2 = ' < '; $title1 = ' title="' . $GLOBALS['strPos1'] . '"'; $title2 = ' title="' . $GLOBALS['strPrevious'] . '"'; } else { @@ -265,7 +265,6 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_query)     @@ -305,7 +304,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_query) && $session_max_rows != 'all') { // loic1: patch #474210 from Gosha Sakovich - part 2 if ($GLOBALS['cfg']['NavigationBarIconic']) { - $caption3 = ' > '; + $caption3 = ' > '; $caption4 = '>>'; $title3 = ' title="' . $GLOBALS['strNext'] . '"'; $title4 = ' title="' . $GLOBALS['strEnd'] . '"'; @@ -554,12 +553,10 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ } echo ''; echo "\n"; - echo ' '; - echo "\n"; + echo '' . "\n"; echo ''; echo "\n"; - echo ''; - echo "\n"; + echo '' . "\n"; } } } @@ -583,19 +580,9 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ echo '' . "\n"; } - echo '' . "\n" - . '' . "\n"; + echo '
' . "\n"; if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') { - ?> - - - ' . "\n"; } // 1. Displays the full/partial text button (part 1)... @@ -617,7 +604,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ . '&repeat_cells=' . $repeat_cells . '&goto=' . $goto . '&dontlimitchars=' . (($dontlimitchars) ? 0 : 1); - $text_message = '' . ($dontlimitchars ? $GLOBALS['strPartialText'] : $GLOBALS['strFullText']) . ''; + $text_message = '' . ($dontlimitchars ? $GLOBALS['strPartialText'] : $GLOBALS['strFullText']) . ''; $text_link = PMA_linkOrButton( $text_url, $text_message, array(), false ); // ... before the result table @@ -626,21 +613,16 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ $vertical_display['emptypre'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 3 : 0; if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') { ?> - + - - + - + ' . "\n" + $vertical_display['textbtn'] = ' ' . "\n"; } // end vertical mode } // ... else if no button, displays empty(ies) col(s) if required - else if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] + elseif ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && ($is_display['edit_lnk'] != 'nn' || $is_display['del_lnk'] != 'nn')) { $vertical_display['emptypre'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 3 : 0; if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') { - echo "\n"; ?> -> + > ' . "\n"; @@ -793,17 +770,15 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ } $sort_order .= $GLOBALS['cfg']['Order']; $order_img = ''; - } - else if (preg_match('@[[:space:]]ASC$@i', $sort_expression)) { + } elseif (preg_match('@[[:space:]]ASC$@i', $sort_expression)) { $sort_order .= ' DESC'; - $order_img = ' '. $GLOBALS['strAscending'] . ''; - } - else if (preg_match('@[[:space:]]DESC$@i', $sort_expression)) { + $order_img = ' '. $GLOBALS['strAscending'] . ''; + } elseif (preg_match('@[[:space:]]DESC$@i', $sort_expression)) { $sort_order .= ' ASC'; - $order_img = ' '. $GLOBALS['strDescending'] . ''; + $order_img = ' '. $GLOBALS['strDescending'] . ''; } else { $sort_order .= ' DESC'; - $order_img = ' '. $GLOBALS['strAscending'] . ''; + $order_img = ' '. $GLOBALS['strAscending'] . ''; } if (preg_match('@(.*)([[:space:]](LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE))@i', $unsorted_sql_query, $regs3 = array())) { @@ -842,7 +817,6 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ $order_link = PMA_linkOrButton( $order_url, $order_link_content . $order_img, $order_link_params, false, true ); if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') { - echo "\n"; ?> ' . "\n" + $vertical_display['textbtn'] = ' ' . "\n"; } // end vertical mode @@ -913,12 +886,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ } if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') { - echo "\n"; ?> + - - ' . "\n"; - - for ($foo_i = 0; $foo_i < $vertical_display['emptypre']; $foo_i++) { - echo ' ' . "\n"; + if ( $vertical_display['emptypre'] > 0 ) { + echo ' ' . "\n"; } - foreach ($vertical_display['desc'] AS $key => $val) { + foreach ( $vertical_display['desc'] as $val ) { echo $val; } - for ($foo_i = 0; $foo_i < $vertical_display['emptyafter']; $foo_i++) { - echo ' ' . "\n"; + if ( $vertical_display['emptyafter'] > 0 ) { + echo ' ' . "\n"; } - echo '' . "\n"; } // end if - if (isset($GLOBALS['printview']) && ($GLOBALS['printview'] == '1')) { - $bgcolor = '#ffffff'; - } else { - $bgcolor = ($row_no % 2) ? $GLOBALS['cfg']['BgcolorOne'] : $GLOBALS['cfg']['BgcolorTwo']; - } - if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') { // loic1: pointer code part - $on_mouse = ''; - if (!isset($GLOBALS['printview']) || ($GLOBALS['printview'] != '1')) { - if ($GLOBALS['cfg']['BrowsePointerEnable'] == TRUE) { - $on_mouse = ' onmouseover="setPointer(this, ' . $row_no . ', \'over\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');"' - . ' onmouseout="setPointer(this, ' . $row_no . ', \'out\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');"'; - } else { - $on_mouse = ''; - } - if ($GLOBALS['cfg']['BrowseMarkerEnable'] == TRUE) { - $on_mouse .= ' onmousedown="setPointer(this, ' . $row_no . ', \'click\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');"'; - } - } // end if - ?> -> - ' . "\n"; + $odd_row = ! $odd_row; + $bgcolor = ''; + } elseif (isset($GLOBALS['printview']) && ($GLOBALS['printview'] == '1')) { + $bgcolor = ' bgcolor="#ffffff" '; + } else { + $bgcolor = ' bgcolor="' . ($row_no % 2 ? $GLOBALS['cfg']['BgcolorOne'] : $GLOBALS['cfg']['BgcolorTwo'] ) . '" '; } + // 1. Prepares the row (gets primary keys to use) // 1.1 Results from a "SELECT" statement -> builds the // "primary" key to use in links @@ -1082,9 +1038,8 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) if ($is_display['edit_lnk'] != 'nn' || $is_display['del_lnk'] != 'nn') { // We need to copy the value or else the == 'both' check will always return true - $propicon = (string)$GLOBALS['cfg']['PropertiesIconic']; - if ($propicon == 'both') { + if ($GLOBALS['cfg']['PropertiesIconic'] === 'both') { $iconic_spacer = '
'; } else { $iconic_spacer = ''; @@ -1099,12 +1054,12 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) . '&primary_key=' . $uva_condition . '&sql_query=' . urlencode($url_sql_query) . '&goto=' . urlencode($lnk_goto); - if ($GLOBALS['cfg']['PropertiesIconic'] == FALSE) { + if ($GLOBALS['cfg']['PropertiesIconic'] === FALSE) { $edit_str = $GLOBALS['strEdit']; } else { - $edit_str = $iconic_spacer . '' . $GLOBALS['strEdit'] . ''; - if ($propicon == 'both') { - $edit_str .= ' ' . $GLOBALS['strEdit'] . '
'; + $edit_str = $iconic_spacer . '' . $GLOBALS['strEdit'] . ''; + if ($GLOBALS['cfg']['PropertiesIconic'] === 'both') { + $edit_str .= ' ' . $GLOBALS['strEdit'] . ''; } } } // end if (1.2.1) @@ -1118,12 +1073,12 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) . '&SQL=' . $GLOBALS['strExecuteBookmarked'] .' " title="' . $GLOBALS['strExecuteBookmarked'] . '">'; - if ($GLOBALS['cfg']['PropertiesIconic'] == FALSE) { + if ($GLOBALS['cfg']['PropertiesIconic'] === FALSE) { $bookmark_go .= $GLOBALS['strExecuteBookmarked']; } else { - $bookmark_go .= $iconic_spacer . '' . $GLOBALS['strExecuteBookmarked'] . ''; - if ($propicon == 'both') { - $bookmark_go .= ' ' . $GLOBALS['strExecuteBookmarked'] . ''; + $bookmark_go .= $iconic_spacer . '' . $GLOBALS['strExecuteBookmarked'] . ''; + if ($GLOBALS['cfg']['PropertiesIconic'] === 'both') { + $bookmark_go .= ' ' . $GLOBALS['strExecuteBookmarked'] . ''; } } @@ -1148,12 +1103,12 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) $js_conf = 'DELETE FROM ' . PMA_jsFormat($table) . ' WHERE ' . trim(PMA_jsFormat(urldecode($uva_condition), FALSE)) . ' LIMIT 1'; - if ($GLOBALS['cfg']['PropertiesIconic'] == FALSE) { + if ($GLOBALS['cfg']['PropertiesIconic'] === FALSE) { $del_str = $GLOBALS['strDelete']; } else { - $del_str = $iconic_spacer . '' . $GLOBALS['strDelete'] . ''; - if ($propicon == 'both') { - $del_str .= ' ' . $GLOBALS['strDelete'] . ''; + $del_str = $iconic_spacer . '' . $GLOBALS['strDelete'] . ''; + if ($GLOBALS['cfg']['PropertiesIconic'] === 'both') { + $del_str .= ' ' . $GLOBALS['strDelete'] . ''; } } } else if ($is_display['del_lnk'] == 'kp') { // kill process case @@ -1167,12 +1122,12 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) . '&goto=' . urlencode($lnk_goto); $del_query = urlencode('KILL ' . $row[0]); $js_conf = 'KILL ' . $row[0]; - if ($GLOBALS['cfg']['PropertiesIconic'] == FALSE) { + if ($GLOBALS['cfg']['PropertiesIconic'] === FALSE) { $del_str = $GLOBALS['strKill']; } else { - $del_str = $iconic_spacer . '' . $GLOBALS['strKill'] . ''; - if ($propicon == 'both') { - $del_str .= ' ' . $GLOBALS['strKill'] . ''; + $del_str = $iconic_spacer . '' . $GLOBALS['strKill'] . ''; + if ($GLOBALS['cfg']['PropertiesIconic'] === 'both') { + $del_str .= ' ' . $GLOBALS['strKill'] . ''; } } } // end if (1.2.2) @@ -1183,7 +1138,6 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) $doWriteModifyAt = 'left'; require('./libraries/display_tbl_links.lib.php'); } // end if (1.3) - echo (($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') ? "\n" : ''); } // end if (1) // 2. Displays the rows' values @@ -1196,7 +1150,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) // garvin: See if this column should get highlight because it's used in the // where-query. if (isset($highlight_columns) && (isset($highlight_columns[$meta->name]) || isset($highlight_columns[PMA_backquote($meta->name)]))) { - $column_style = 'style="border: 1px solid ' . $GLOBALS['cfg']['BrowseMarkerColor'] . '"'; + $column_style = ' style="border: 1px solid ' . $GLOBALS['cfg']['BrowseMarkerColor'] . '" '; } else { $column_style = ''; } @@ -1204,15 +1158,13 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) if ($disp_direction == 'vertical' && (!isset($GLOBALS['printview']) || ($GLOBALS['printview'] != '1'))) { if ($GLOBALS['cfg']['BrowsePointerColor'] == TRUE) { $column_style .= ' onmouseover="setVerticalPointer(this, ' . $row_no . ', \'over\', \'' . $GLOBALS['cfg']['BgcolorOne'] . '\', \'' . $GLOBALS['cfg']['BgcolorTwo'] . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');"' - . ' onmouseout="setVerticalPointer(this, ' . $row_no . ', \'out\', \'' . $GLOBALS['cfg']['BgcolorOne'] . '\', \'' . $GLOBALS['cfg']['BgcolorTwo'] . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');"'; + . ' onmouseout="setVerticalPointer(this, ' . $row_no . ', \'out\', \'' . $GLOBALS['cfg']['BgcolorOne'] . '\', \'' . $GLOBALS['cfg']['BgcolorTwo'] . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');" '; } if ($GLOBALS['cfg']['BrowseMarkerEnable'] == TRUE) { - $column_style .= ' onmousedown="setVerticalPointer(this, ' . $row_no . ', \'click\', \'' . $GLOBALS['cfg']['BgcolorOne'] . '\', \'' . $GLOBALS['cfg']['BgcolorTwo'] . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\'); setCheckboxColumn(\'id_rows_to_delete' . $row_no . '\');"'; + $column_style .= ' onmousedown="setVerticalPointer(this, ' . $row_no . ', \'click\', \'' . $GLOBALS['cfg']['BgcolorOne'] . '\', \'' . $GLOBALS['cfg']['BgcolorTwo'] . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\'); setCheckboxColumn(\'id_rows_to_delete' . $row_no . '\');" '; } else { $column_style .= ' onmousedown="setCheckboxColumn(\'id_rows_to_delete' . $row_no . '\');" '; } - } else { - $column_style .= ' onmousedown="setCheckboxColumn(\'id_rows_to_delete' . $row_no . '\');" '; }// end if // garvin: Wrap MIME-transformations. [MIME] @@ -1263,9 +1215,9 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) //if (!isset($row[$meta->name]) if (!isset($row[$i]) || is_null($row[$i])) { - $vertical_display['data'][$row_no][$i] = '
' . "\n"; + $vertical_display['data'][$row_no][$i] = ' ' . "\n"; } else if ($row[$i] != '') { - $vertical_display['data'][$row_no][$i] = ' ' . "\n"; } else { - $vertical_display['data'][$row_no][$i] = ' ' . "\n"; + $vertical_display['data'][$row_no][$i] = ' ' . "\n"; } // b l o b @@ -1339,10 +1291,10 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) $blobtext .= ']'; $blobtext = ($default_function != $transform_function ? $transform_function($blobtext, $transform_options, $meta) : $default_function($blobtext, array(), $meta)); - $vertical_display['data'][$row_no][$i] = ' '; + $vertical_display['data'][$row_no][$i] = ' '; } else { if (!isset($row[$i]) || is_null($row[$i])) { - $vertical_display['data'][$row_no][$i] = ' ' . "\n"; + $vertical_display['data'][$row_no][$i] = ' NULL' . "\n"; } else if ($row[$i] != '') { // garvin: if a transform function for blob is set, none of these replacements will be made if (PMA_strlen($row[$i]) > $GLOBALS['cfg']['LimitChars'] && ($dontlimitchars != 1)) { @@ -1352,14 +1304,14 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) // characters for tabulations and / $row[$i] = ($default_function != $transform_function ? $transform_function($row[$i], $transform_options, $meta) : $default_function($row[$i], array(), $meta)); - $vertical_display['data'][$row_no][$i] = ' ' . "\n"; + $vertical_display['data'][$row_no][$i] = ' ' . $row[$i] . '' . "\n"; } else { - $vertical_display['data'][$row_no][$i] = ' ' . "\n"; + $vertical_display['data'][$row_no][$i] = '  ' . "\n"; } } } else { if (!isset($row[$i]) || is_null($row[$i])) { - $vertical_display['data'][$row_no][$i] = ' ' . "\n"; + $vertical_display['data'][$row_no][$i] = ' NULL' . "\n"; } else if ($row[$i] != '') { // loic1: support blanks in the key $relation_id = $row[$i]; @@ -1391,7 +1343,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) // loic1: do not wrap if date field type $nowrap = ((preg_match('@DATE|TIME@i', $meta->type) || $bool_nowrap) ? ' nowrap="nowrap"' : ''); - $vertical_display['data'][$row_no][$i] = ' ' . "\n"; } else { - $vertical_display['data'][$row_no][$i] = ' ' . "\n"; + $vertical_display['data'][$row_no][$i] = '  ' . "\n"; } } @@ -1460,7 +1412,6 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) } // end if (3) if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') { - echo "\n"; ?> ' . "\n" + $vertical_display['row_delete'][$row_no] .= ' ' . "\n"; @@ -1504,7 +1455,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) } if (isset($del_url)) { - $vertical_display['delete'][$row_no] .= ' ' . "\n"; } else { @@ -1546,9 +1497,9 @@ function PMA_displayVerticalTable() echo '' . "\n"; echo $vertical_display['textbtn']; $foo_counter = 0; - foreach ($vertical_display['row_delete'] AS $key => $val) { + foreach ($vertical_display['row_delete'] as $val) { if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) { - echo '' . "\n"; + echo '' . "\n"; } echo str_replace('[%_PMA_CHECKBOX_DIR_%]', '', $val); @@ -1564,9 +1515,9 @@ function PMA_displayVerticalTable() echo $vertical_display['textbtn']; } $foo_counter = 0; - foreach ($vertical_display['edit'] AS $key => $val) { + foreach ($vertical_display['edit'] as $val) { if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) { - echo ' ' . "\n"; + echo ' ' . "\n"; } echo $val; @@ -1582,9 +1533,9 @@ function PMA_displayVerticalTable() echo $vertical_display['textbtn']; } $foo_counter = 0; - foreach ($vertical_display['delete'] AS $key => $val) { + foreach ($vertical_display['delete'] as $val) { if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) { - echo '' . "\n"; + echo '' . "\n"; } echo $val; @@ -1594,21 +1545,13 @@ function PMA_displayVerticalTable() } // end if // Displays data - $row_no = 0; foreach ($vertical_display['desc'] AS $key => $val) { - $row_no++; - - if (isset($GLOBALS['printview']) && ($GLOBALS['printview'] == '1')) { - $bgcolor = '#ffffff'; - } else { - $bgcolor = ($row_no % 2) ? $GLOBALS['cfg']['BgcolorOne'] : $GLOBALS['cfg']['BgcolorTwo']; - } echo '' . "\n"; echo $val; $foo_counter = 0; - foreach ($vertical_display['rowdata'][$key] AS $subkey => $subval) { + foreach ($vertical_display['rowdata'][$key] as $subval) { if (($foo_counter != 0) && ($repeat_cells != 0) and !($foo_counter % $repeat_cells)) { echo $val; } @@ -1625,9 +1568,9 @@ function PMA_displayVerticalTable() echo '' . "\n"; echo $vertical_display['textbtn']; $foo_counter = 0; - foreach ($vertical_display['row_delete'] AS $key => $val) { + foreach ($vertical_display['row_delete'] as $val) { if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) { - echo '' . "\n"; + echo '' . "\n"; } echo str_replace('[%_PMA_CHECKBOX_DIR_%]', 'r', $val); @@ -1643,9 +1586,9 @@ function PMA_displayVerticalTable() echo $vertical_display['textbtn']; } $foo_counter = 0; - foreach ($vertical_display['edit'] AS $key => $val) { + foreach ($vertical_display['edit'] as $val) { if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) { - echo '' . "\n"; + echo '' . "\n"; } echo $val; @@ -1661,9 +1604,9 @@ function PMA_displayVerticalTable() echo $vertical_display['textbtn']; } $foo_counter = 0; - foreach ($vertical_display['delete'] AS $key => $val) { + foreach ($vertical_display['delete'] as $val) { if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) { - echo '' . "\n"; + echo '' . "\n"; } echo $val; @@ -1826,7 +1769,9 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) // 3. ----- Displays the results table ----- PMA_displayTableHeaders($is_display, $fields_meta, $fields_cnt, $analyzed_sql); $url_query=''; + echo '' . "\n"; PMA_displayTableBody($dt_result, $is_display, $map, $analyzed_sql); + echo '' . "\n"; // vertical output case if ($disp_direction == 'vertical') { PMA_displayVerticalTable(); @@ -1834,16 +1779,13 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) unset($vertical_display); ?>
- -
- - +
align="center"> - -> ' . "\n" . ' ' . $text_link . "\n" . ' > @@ -859,7 +833,6 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ // 2.2 Results can't be sorted else { if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') { - echo "\n"; ?> > name), "
\n") : htmlspecialchars($fields_meta[$i]->name)) . "\n"; ?> @@ -883,13 +856,13 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') { echo "\n"; ?> -
align="center"> +> ' . "\n" . ' ' . $text_link . "\n" . '
 ' . "\n" + .'   ' . "\n" + .'  
NULLNULL'; + $vertical_display['data'][$row_no][$i] = ' '; if (isset($analyzed_sql[0]['select_expr']) && is_array($analyzed_sql[0]['select_expr'])) { foreach ($analyzed_sql[0]['select_expr'] AS $select_expr_position => $select_expr) { @@ -1315,7 +1267,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) } $vertical_display['data'][$row_no][$i] .= '  ' . $blobtext . '' . $blobtext . 'NULL' . $row[$i] . ' NULL'; + $vertical_display['data'][$row_no][$i] = ' '; if (isset($analyzed_sql[0]['select_expr']) && is_array($analyzed_sql[0]['select_expr'])) { foreach ($analyzed_sql[0]['select_expr'] AS $select_expr_position => $select_expr) { @@ -1436,7 +1388,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) } $vertical_display['data'][$row_no][$i] .= ' 
' . "\n" . ' ' . "\n" @@ -1495,7 +1446,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) } if (isset($edit_url)) { - $vertical_display['edit'][$row_no] .= ' ' . "\n" + $vertical_display['edit'][$row_no] .= ' ' . "\n" . PMA_linkOrButton($edit_url, $edit_str, array(), FALSE) . $bookmark_go . ' ' . "\n" + $vertical_display['delete'][$row_no] .= ' ' . "\n" . PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : ''), FALSE) . '
      
      
+ -   <?php echo $GLOBALS['strWithChecked']; ?> - -  /  - -' . $GLOBALS['strWithChecked'] . ''. "\n"; + if ( $disp_direction != 'vertical' ) { + echo '' . $GLOBALS['strWithChecked'] . ''; + } + echo $checkall_link . "\n" + .' / ' . "\n" + .$uncheckall_link . "\n" + .'' . $GLOBALS['strWithChecked'] . '' . "\n"; - if ($GLOBALS['cfg']['PropertiesIconic']) { - PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_change', $GLOBALS['strChange'], 'b_edit.png'); - PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_delete', $delete_text, 'b_drop.png'); + if ( $GLOBALS['cfg']['PropertiesIconic'] ) { + PMA_buttonOrImage('submit_mult', 'mult_submit', + 'submit_mult_change', $GLOBALS['strChange'], 'b_edit.png'); + PMA_buttonOrImage('submit_mult', 'mult_submit', + 'submit_mult_delete', $delete_text, 'b_drop.png'); if ($analyzed_sql[0]['querytype'] == 'SELECT') { - PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_export', $GLOBALS['strExport'], 'b_tblexport.png'); + PMA_buttonOrImage('submit_mult', 'mult_submit', + 'submit_mult_export', $GLOBALS['strExport'], + 'b_tblexport.png'); } echo "\n"; } else { - echo ' ' . "\n"; - echo ' ' . "\n"; + echo ' ' . "\n"; + echo ' ' . "\n"; if ($analyzed_sql[0]['querytype'] == 'SELECT') { - echo ' ' . "\n"; + echo ' ' . "\n"; } } - echo '' . "\n"; + echo '' . "\n"; echo '' . "\n"; - echo '' . "\n"; - echo '
' . "\n"; + echo '' . "\n"; echo '' . "\n"; } @@ -1901,7 +1862,8 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) function default_function($buffer) { $buffer = htmlspecialchars($buffer); - $buffer = str_replace("\011", '    ', str_replace(' ', '  ', $buffer)); + $buffer = str_replace("\011", '    ', + str_replace(' ', '  ', $buffer)); $buffer = preg_replace("@((\015\012)|(\015)|(\012))@", '
', $buffer); return $buffer; diff --git a/libraries/display_tbl_links.lib.php b/libraries/display_tbl_links.lib.php index 97a27873d..1b7256e9e 100644 --- a/libraries/display_tbl_links.lib.php +++ b/libraries/display_tbl_links.lib.php @@ -11,37 +11,37 @@ if ( $doWriteModifyAt == 'left' ){ if (!empty($del_url) && $is_display['del_lnk'] != 'kp') { - echo ' ' . "\n" + echo ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; } if (!empty($edit_url)) { - echo ' ' . "\n" + echo ' ' . "\n" . PMA_linkOrButton($edit_url, $edit_str, '', FALSE) . $bookmark_go . ' ' . "\n"; } if (!empty($del_url)) { - echo ' ' . "\n" + echo ' ' . "\n" . PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : ''), FALSE) . ' ' . "\n"; } } else if ($doWriteModifyAt == 'right') { if (!empty($del_url)) { - echo ' ' . "\n" + echo ' ' . "\n" . PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : ''), FALSE) . ' ' . "\n"; } if (!empty($edit_url)) { - echo ' ' . "\n" + echo ' ' . "\n" . PMA_linkOrButton($edit_url, $edit_str, '', FALSE) . $bookmark_go . ' ' . "\n"; } if (!empty($del_url) && $is_display['del_lnk'] != 'kp') { - echo ' ' . "\n" + echo ' ' . "\n" . ' ' . "\n"