mirror of
https://github.com/vrana/adminer.git
synced 2025-08-17 20:01:25 +02:00
Extensibility basics
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@782 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
18
adminer/include/adminer.inc.php
Normal file
18
adminer/include/adminer.inc.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
class AdminerBase {
|
||||
|
||||
function table_list($row) {
|
||||
global $SELF;
|
||||
echo '<a href="' . htmlspecialchars($SELF) . 'select=' . urlencode($row["Name"]) . '">' . lang('select') . '</a> ';
|
||||
echo '<a href="' . htmlspecialchars($SELF) . (isset($row["Rows"]) ? 'table' : 'view') . '=' . urlencode($row["Name"]) . '">' . $this->table_name($row) . "</a><br />\n";
|
||||
}
|
||||
|
||||
function table_name($row) {
|
||||
return htmlspecialchars($row["Name"]);
|
||||
}
|
||||
|
||||
function field_name($fields, $key) {
|
||||
return htmlspecialchars($key);
|
||||
}
|
||||
|
||||
}
|
@@ -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;
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -95,8 +95,7 @@ function page_footer($missing = false) {
|
||||
} else {
|
||||
echo "<p>\n";
|
||||
foreach ($table_status as $row) {
|
||||
echo '<a href="' . htmlspecialchars($SELF) . 'select=' . urlencode($row["Name"]) . '">' . lang('select') . '</a> ';
|
||||
echo '<a href="' . htmlspecialchars($SELF) . (isset($row["Rows"]) ? 'table' : 'view') . '=' . urlencode($row["Name"]) . '">' . htmlspecialchars($row["Name"]) . "</a><br />\n";
|
||||
$adminer->table_list($row);
|
||||
}
|
||||
echo "</p>\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user