2009-07-20 15:47:12 +00:00
|
|
|
<?php
|
|
|
|
class Adminer {
|
|
|
|
|
|
|
|
function name() {
|
2009-07-22 11:03:22 +00:00
|
|
|
// custom name in title and heading
|
2009-07-20 15:47:12 +00:00
|
|
|
return 'CDs';
|
|
|
|
}
|
|
|
|
|
|
|
|
function credentials() {
|
2009-07-22 11:03:22 +00:00
|
|
|
// ODBC user without password on localhost
|
2009-07-20 15:47:12 +00:00
|
|
|
return array('localhost', 'ODBC', '');
|
|
|
|
}
|
|
|
|
|
|
|
|
function database() {
|
2009-07-22 11:03:22 +00:00
|
|
|
// will be escaped by Adminer
|
2009-07-24 12:30:52 +00:00
|
|
|
return 'adminer_test';
|
2009-07-20 15:47:12 +00:00
|
|
|
}
|
|
|
|
|
2009-07-21 12:19:25 +00:00
|
|
|
function login($login, $password) {
|
2009-07-22 11:03:22 +00:00
|
|
|
// username: admin, password: anything
|
2009-07-21 12:19:25 +00:00
|
|
|
return ($login == 'admin');
|
|
|
|
}
|
|
|
|
|
2009-07-21 13:59:02 +00:00
|
|
|
function table_name($row) {
|
2009-07-22 11:03:22 +00:00
|
|
|
// tables without comments would return empty string and will be ignored by Adminer
|
2009-07-21 13:59:02 +00:00
|
|
|
return htmlspecialchars($row["Comment"]);
|
|
|
|
}
|
|
|
|
|
2009-07-23 15:49:59 +00:00
|
|
|
function field_name($field) {
|
2009-07-22 11:03:22 +00:00
|
|
|
// fields without comments will be ignored
|
2009-07-23 15:49:59 +00:00
|
|
|
return ($field ? htmlspecialchars($field["comment"]) : "*");
|
2009-07-21 13:59:02 +00:00
|
|
|
}
|
|
|
|
|
2009-07-20 15:47:12 +00:00
|
|
|
}
|
|
|
|
|
2009-07-24 16:18:51 +00:00
|
|
|
include "./index.php";
|