' . '
' . PMA_URL_getHiddenInputs($db, $table) . '' . ''; if (isset($_REQUEST['rownumber'])) { $output .= ''; } $output .= '' . '' . '' . '' . '' . '' . $gotopage . '' . '' . $showall . '' . '
' . ''; $output .= ''; if (is_array($foreignData['disp_row'])) { $header = ''; $output .= '' . $header . '' . "\n" . '' . $header . '' . "\n" . '' . "\n"; $values = array(); $keys = array(); foreach ($foreignData['disp_row'] as $relrow) { if ($foreignData['foreign_display'] != false) { $values[] = $relrow[$foreignData['foreign_display']]; } else { $values[] = ''; } $keys[] = $relrow[$foreignData['foreign_field']]; } asort($keys); $hcount = 0; $odd_row = true; $val_ordered_current_row = 0; $val_ordered_current_equals_data = false; $key_ordered_current_equals_data = false; foreach ($keys as $key_ordered_current_row => $value) { $hcount++; if ($GLOBALS['cfg']['RepeatCells'] > 0 && $hcount > $GLOBALS['cfg']['RepeatCells'] ) { $output .= $header; $hcount = 0; $odd_row = true; } $key_ordered_current_key = $keys[$key_ordered_current_row]; $key_ordered_current_val = $values[$key_ordered_current_row]; $val_ordered_current_key = $keys[$val_ordered_current_row]; $val_ordered_current_val = $values[$val_ordered_current_row]; $val_ordered_current_row++; $pmaString = $GLOBALS['PMA_String']; $limitChars = $GLOBALS['cfg']['LimitChars']; if ($pmaString->strlen($val_ordered_current_val) <= $limitChars) { $val_ordered_current_val = htmlspecialchars( $val_ordered_current_val ); $val_ordered_current_val_title = ''; } else { $val_ordered_current_val_title = htmlspecialchars( $val_ordered_current_val ); $val_ordered_current_val = htmlspecialchars( $pmaString->substr( $val_ordered_current_val, 0, $limitChars ) . '...' ); } if ($pmaString->strlen($key_ordered_current_val) <= $limitChars) { $key_ordered_current_val = htmlspecialchars( $key_ordered_current_val ); $key_ordered_current_val_title = ''; } else { $key_ordered_current_val_title = htmlspecialchars( $key_ordered_current_val ); $key_ordered_current_val = htmlspecialchars( $pmaString->substr( $key_ordered_current_val, 0, $limitChars ) . '...' ); } if (! empty($data)) { $val_ordered_current_equals_data = $val_ordered_current_key == $data; $key_ordered_current_equals_data = $key_ordered_current_key == $data; } $output .= ''; $odd_row = ! $odd_row; $output .= PMA_getHtmlForColumnElement( 'class="nowrap"', $key_ordered_current_equals_data, $key_ordered_current_key, $key_ordered_current_val, $key_ordered_current_val_title, $field ); $output .= PMA_getHtmlForColumnElement( '', $key_ordered_current_equals_data, $key_ordered_current_key, $key_ordered_current_val, $key_ordered_current_val_title, $field ); $output .= ''; $output .= PMA_getHtmlForColumnElement( '', $val_ordered_current_equals_data, $key_ordered_current_key, $val_ordered_current_val, $val_ordered_current_val_title, $field ); $output .= PMA_getHtmlForColumnElement( 'class="nowrap"', $val_ordered_current_equals_data, $val_ordered_current_key, $val_ordered_current_val, $val_ordered_current_val_title, $field ); $output .= ''; } // end while } $output .= '' . '
' . __('Keyname') . ' ' . __('Description') . ' ' . __('Description') . ' ' . __('Keyname') . '
' . '
'; return $output; } /** * Function to get html for each column element * * @param string $cssClass class="nowrap" or '' * @param bool $currentEqualsData whether current equals data * @param string $currentKey current key * @param string $currentVal current value * @param string $currentTitle current title * @param string $field field * * @return string */ function PMA_getHtmlForColumnElement($cssClass, $currentEqualsData, $currentKey, $currentVal, $currentTitle, $field ) { $output = '' . ($currentEqualsData ? '' : '') . ''; if ($cssClass !== '') { $output .= htmlspecialchars($currentKey); } else { $output .= $currentVal; } $output .= '' . ($currentEqualsData ? '' : '') . ''; return $output; } /** * Function to get javascript code to handle display selection for relational * field values * * @return string */ function PMA_getJsScriptToHandleSelectRelationalFields() { $element_name = PMA_getElementName(); $fieldkey = PMA_getFieldKey(); $error = PMA_getJsError(); $code = << $GLOBALS['cfg']['MaxRows']) ) { $showall = ''; } } return $showall; } /** * Function to get html for the goto page option * * @param array $foreignData foreign data * * @return string */ function PMA_getHtmlForGotoPage($foreignData) { $gotopage = ''; isset($_REQUEST['pos']) ? $pos = $_REQUEST['pos'] : $pos = 0; if (is_array($foreignData['disp_row'])) { $session_max_rows = $GLOBALS['cfg']['MaxRows']; $pageNow = @floor($pos / $session_max_rows) + 1; $nbTotalPage = @ceil($foreignData['the_total'] / $session_max_rows); if ($foreignData['the_total'] > $GLOBALS['cfg']['MaxRows']) { $gotopage = PMA_Util::pageselector( 'pos', $session_max_rows, $pageNow, $nbTotalPage, 200, 5, 5, 20, 10, __('Page number:') ); } } return $gotopage; } /** * Function to get foreign limit * * @param string $foreign_navig foreign navigation * * @return string */ function PMA_getForeignLimit($foreign_navig) { if (isset($foreign_navig) && $foreign_navig == __('Show all')) { return null; } isset($_REQUEST['pos']) ? $pos = $_REQUEST['pos'] : $pos = 0; return 'LIMIT ' . $pos . ', ' . $GLOBALS['cfg']['MaxRows'] . ' '; } ?>