Skip to content

Commit 39cc971

Browse files
author
nosolored
committed
Adminer Integration
Integration Adminer to see fields of database control bug
1 parent b4e2f77 commit 39cc971

File tree

4 files changed

+848
-0
lines changed

4 files changed

+848
-0
lines changed

adminer/adminer.php

+818
Large diffs are not rendered by default.

adminer/loader.adminer.php

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
require '../funciones.php';
3+
session_start();
4+
seguridad();
5+
if(isset($_POST['logout'])){
6+
header('Location: '.$_SESSION['url_main']);
7+
}
8+
9+
function adminer_object() {
10+
class AdminerSoftware extends Adminer {
11+
function credentials() {
12+
require '../config.php';
13+
// server, username and password for connecting to database
14+
return array($config['db']['host'], $config['db']['user'], $config['db']['pass']);
15+
}
16+
17+
function database() {
18+
require '../config.php';
19+
// database name, will be escaped by Adminer
20+
return $config['db']['name'];
21+
}
22+
}
23+
return new AdminerSoftware;
24+
}
25+
require_once 'adminer.php';

adminer/login.php

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
header('Location: ../index.php');

setting.php

+3
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,9 @@
467467
echo '</div>';
468468
?>
469469
<br>
470+
<h4>Database: data and structure</h4>
471+
<?php require 'config.php'; ?>
472+
<a href="adminer/loader.adminer.php?username=<?php echo $config['db']['user']; ?>">Adminer extension</a>
470473

471474
</div>
472475
</div>

0 commit comments

Comments
 (0)