-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadminer.php
43 lines (35 loc) · 1.04 KB
/
adminer.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
<?php
use MintyPHP\DB;
// Use default autoload implementation
require 'vendor/autoload.php';
// Load the config parameters
require 'config/config.php';
// database auto-login credentials
if (!isset($_GET["username"])) {
$_POST["auth"] = array(
'driver' => 'server',
'server' => DB::$host . ':' . DB::$port,
'username' => DB::$username,
'password' => DB::$password,
'db' => DB::$database,
);
}
// Adminer Extension
function adminer_object()
{
class AdminerSoftware extends Adminer
{
public function loginForm()
{
echo "<p><a href='?'>Click to login</a></p>\n";
}
public function navigation($missing)
{
parent::navigation($missing);
echo '<p class="links"><a href="/conventionist.php">Conventionist</a></p>';
echo '<p class="links"><a href="/generator.php">Generator</a></p>';
}
}
return new AdminerSoftware;
}
include 'vendor/mintyphp/tools/latest.php';