mirror of
https://github.com/sveltejs/ai-tools.git
synced 2026-09-14 13:50:38 +08:00
31 lines
942 B
PHP
31 lines
942 B
PHP
<?php
|
|
function adminer_object() {
|
|
include_once "plugins/login-sqlite.php";
|
|
|
|
class NoAuthSqlite extends Adminer {
|
|
function login($login, $password) {
|
|
return true;
|
|
}
|
|
|
|
function credentials() {
|
|
return array('/tmp/test.db', '', '');
|
|
}
|
|
|
|
function database() {
|
|
return '/tmp/test.db';
|
|
}
|
|
|
|
function loginForm() {
|
|
echo '<input type="hidden" name="auth[driver]" value="sqlite">';
|
|
echo '<input type="hidden" name="auth[server]" value="/tmp/test.db">';
|
|
echo '<input type="hidden" name="auth[username]" value="">';
|
|
echo '<input type="hidden" name="auth[password]" value="">';
|
|
echo '<input type="hidden" name="auth[db]" value="/tmp/test.db">';
|
|
echo '<p><input type="submit" value="Connect to SQLite Database"></p>';
|
|
}
|
|
}
|
|
|
|
return new NoAuthSqlite;
|
|
}
|
|
|
|
include "adminer.php"; |