diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php
new file mode 100644
index 00000000..7aaf2d67
--- /dev/null
+++ b/adminer/include/adminer.inc.php
@@ -0,0 +1,18 @@
+' . lang('select') . ' ';
+ echo '' . $this->table_name($row) . "
\n";
+ }
+
+ function table_name($row) {
+ return htmlspecialchars($row["Name"]);
+ }
+
+ function field_name($fields, $key) {
+ return htmlspecialchars($key);
+ }
+
+}
diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php
index 0fd0676f..402bd30b 100644
--- a/adminer/include/design.inc.php
+++ b/adminer/include/design.inc.php
@@ -56,7 +56,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
}
function page_footer($missing = false) {
- global $SELF, $VERSION, $dbh;
+ global $SELF, $VERSION, $dbh, $adminer;
?>
@@ -95,8 +95,7 @@ function page_footer($missing = false) {
} else {
echo "
\n";
foreach ($table_status as $row) {
- echo '' . lang('select') . ' ';
- echo '' . htmlspecialchars($row["Name"]) . "
\n";
+ $adminer->table_list($row);
}
echo "
";
if (isset($rights["insert"])) {
@@ -250,7 +250,7 @@ if (!$columns) {
if (!$j) {
echo ' \n";
}
';
foreach ($row as $key => $val) {
- echo ' ' . htmlspecialchars($key) . ' ';
+ echo '' . $adminer->field_name($fields, $key) . ' ';
}
echo "