diff --git a/htdocs/sql/browse_foreigners.php b/htdocs/sql/browse_foreigners.php new file mode 100755 --- /dev/null +++ b/htdocs/sql/browse_foreigners.php @@ -0,0 +1,302 @@ + + + $per_page)) { + $showall = ''; + } + + $session_max_rows = $per_page; + $pageNow = @floor($pos / $session_max_rows) + 1; + $nbTotalPage = @ceil($the_total / $session_max_rows); + + if ($the_total > $per_page) { + $gotopage = PMA_pageselector( + 'browse_foreigners.php?field=' . urlencode($field) . + '&' . PMA_generate_common_url($db, $table) + . $pk_uri . + '&fieldkey=' . (isset($fieldkey) ? urlencode($fieldkey) : '') . + '&foreign_filter=' . (isset($foreign_filter) ? urlencode($foreign_filter) : '') . + '&', + $session_max_rows, + $pageNow, + $nbTotalPage, + 200, + 5, + 5, + 20, + 10, + $GLOBALS['strPageNumber'] + ); + } +} +?> + + + +
+' . $strKeyname . ' | +' . $strDescription . ' | ++ | ' . $strDescription . ' | +' . $strKeyname . ' | + '; + + echo '' . $header . '' . "\n" + .'' . $header . '' . "\n" + .'' . "\n"; + + $values = array(); + $keys = array(); + foreach ($disp_row as $relrow) { + if ($foreign_display != FALSE) { + $values[] = $relrow[$foreign_display]; + } else { + $values[] = ''; + } + + $keys[] = $relrow[$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) { + //for ($i = 0; $i < $count; $i++) { + $hcount++; + + if ($cfg['RepeatCells'] > 0 && $hcount > $cfg['RepeatCells']) { + echo $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++; + + if (PMA_strlen($val_ordered_current_val) <= $cfg['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(PMA_substr($val_ordered_current_val, 0, + $cfg['LimitChars']) . '...'); + } + if (PMA_strlen($key_ordered_current_val) <= $cfg['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(PMA_substr($key_ordered_current_val, 0, + $cfg['LimitChars']) . '...'); + } + + if (! empty($data)) { + $val_ordered_current_equals_data = $val_ordered_current_key == $data; + $key_ordered_current_equals_data = $key_ordered_current_key == $data; + } + + ?> +
---|---|---|---|---|
+ ' : '') + .'' + .htmlspecialchars($key_ordered_current_key) . '' . ($key_ordered_current_equals_data ? '' : ''); + ?> | ++ ' : '') + . '' + . $key_ordered_current_val . '' . ($key_ordered_current_equals_data ? '' : ''); + ?> | +
+ ![]() |
+
+ + ' : '') + . '' + . $val_ordered_current_val . '' . ($val_ordered_current_equals_data ? '' : ''); + ?> | ++ ' : '') . '' . htmlspecialchars($val_ordered_current_key) + . '' . ($val_ordered_current_equals_data ? '' : ''); + ?> | +