-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
88 lines (76 loc) · 2.91 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
declare(strict_types=1);
if(is_dir(dirname(__FILE__).DIRECTORY_SEPARATOR.'plugins')) {
function adminer_object()
{
// required to run any plugin
include_once "./plugins/plugin.php";
// autoloader
foreach (glob("plugins/*.php") as $filename) {
include_once "./$filename";
}
// load custom DB servers
$servers = array('localhost');
if (file_exists("./private/servers.php")) {
include_once "./private/servers.php";
$servers = DBServers::$servers;
}
$plugins = array(
// new AdminerCheckboxSelect(),
// new AdminerDatabaseHide(),
// new AdminerDumpAlter(),
new AdminerDumpBz2(),
new AdminerDumpDate(),
new AdminerDumpJson(),
new AdminerDumpPhp(),
new AdminerDumpXml(),
new AdminerDumpZip(),
// new AdminerEditCalendar(),
new AdminerEditForeign(),
new AdminerEditTextarea(),
new AdminerEmailTable(),
new AdminerEnumOption(),
new AdminerFileUpload("data/"),
new AdminerForeignSystem(),
// new AdminerFrames(),
new AdminerJsonColumn(),
new AdminerLinksDirect(),
// new AdminerLoginServers(
// $servers // get all your private servers list (see private/servers.php.dist)
// ),
new AdminerSelect2(),
new AdminerPerfectScrollbar(),
// new AdminerLoginTable(),
// new AdminerMasterSlave(),
new AdminerReadableDates(),
new AdminerSlugify(),
new AdminerSqlLog(
"sql" // folder where to store sql files
),
// Some database system does not support password (ie. sqlite),
// However, Adminer 4.6.3 and newer does not support accessing a database without a password.
// See: https://www.adminer.org/en/password/
// For this kind of system, login with credentials: root / fake
new AdminerLoginPasswordLess(
password_hash("fake", PASSWORD_DEFAULT)
),
// new AdminerTableStructure(),
// new AdminerTablesFilter(),
// new AdminerTinymce(),
// new AdminerTranslation(),
new AdminerVersionNoverify(),
// new AdminerWymeditor(),
new AdminerRestoreMenuScroll(),
// new AdminerTablesHistory(),
new FasterTablesFilter(),
);
/* It is possible to combine customization and plugins:
class AdminerCustomization extends AdminerPlugin {
}
return new AdminerCustomization($plugins);
*/
return new AdminerPlugin($plugins);
}
}
// include original Adminer or Adminer Editor
include dirname(__FILE__).DIRECTORY_SEPARATOR.'adminer.php';