adminerevo/editor/example.php

37 lines
751 B
PHP
Raw Normal View History

<?php
class 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 table_name($row) {
// tables without comments would return empty string and will be ignored by Adminer
return htmlspecialchars($row["Comment"]);
}
function field_name($field) {
// fields without comments will be ignored
return ($field ? htmlspecialchars($field["comment"]) : "*");
}
}
include "./index.php";