c64c4fd14d
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@913 7c3ca157-0c34-0410-bff1-cbf682f78f5c
42 lines
861 B
PHP
42 lines
861 B
PHP
<?php
|
|
function adminer_object() {
|
|
|
|
class AdminerCds extends Adminer {
|
|
|
|
function name() {
|
|
// custom name in title and heading
|
|
return 'CDs';
|
|
}
|
|
|
|
function credentials() {
|
|
// ODBC user without password on localhost
|
|
return array('localhost', 'ODBC', '');
|
|
}
|
|
|
|
function database() {
|
|
// will be escaped by Adminer
|
|
return 'adminer_test';
|
|
}
|
|
|
|
function login($login, $password) {
|
|
// username: 'admin', password: anything
|
|
return ($login == 'admin');
|
|
}
|
|
|
|
function tableName($row) {
|
|
// tables without comments would return empty string and will be ignored by Adminer
|
|
return htmlspecialchars($row["Comment"]);
|
|
}
|
|
|
|
function fieldName($field) {
|
|
// fields without comments will be ignored
|
|
return ($field ? htmlspecialchars($field["comment"]) : "*");
|
|
}
|
|
|
|
}
|
|
|
|
return new AdminerCds;
|
|
}
|
|
|
|
include "./index.php";
|