adminerevo/examples/editor-cds/index.php
jakubvrana b2107e8985 Rename test database
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@905 7c3ca157-0c34-0410-bff1-cbf682f78f5c
2009-07-24 12:30:52 +00:00

43 lines
884 B
PHP

<?php
// try to compile current version
$_SERVER["argv"] = array("", "editor");
ob_start();
include "../../compile.php";
ob_end_clean();
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 "./editor.php";