forked from techjewel/adminer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
54 lines (46 loc) · 1.24 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
function adminer_object()
{
// required to run any plugin
include_once "./plugins/plugin.php";
// autoloader
foreach (glob("plugins/*.php") as $filename) {
include_once "./$filename";
}
$plugins = [
new LoadDependencies, // Always load it first.
new AdminerDatabaseHide([
'information_schema',
'mysql',
'performance_schema',
'sys'
]),
new AdminerEditTextarea,
new AdminerEnumOption,
new AdminerEditForeign,
new AdminerTablesFilter,
new AdminerFloatThead,
new AdminerMenuScroller,
new AdminerJsonPreview,
new AdminerCollations,
new FixedFooter,
];
class AdminerCustomized extends AdminerPlugin
{
function permanentLogin($create = false)
{
return "90b6de9470e50e76a8f81e78dd4707a7";
}
function credentials()
{
return ['localhost', 'root', 'root'];
}
function login($login, $password)
{
return ($login == 'root' && $password == 'root');
}
}
return new AdminerCustomized($plugins);
}
// include original Adminer or Adminer Editor
include "./adminer.php";