2016-11-15 18:39:11 +00:00
|
|
|
<?php
|
|
|
|
require '../config.php';
|
|
|
|
|
|
|
|
if (isset($_GET['database'])) {
|
|
|
|
if (isset($_GET['type']) && $_GET['type'] == 'mysql') {
|
|
|
|
echo json_encode(array(
|
2017-04-19 17:48:44 +00:00
|
|
|
'size' => (string)loadClass('Mysql')->getDBSize($_GET['database']),
|
|
|
|
'table' => (string)loadClass('Mysql')->getTableCount($_GET['database'])
|
2016-11-15 18:39:11 +00:00
|
|
|
));
|
|
|
|
} else if (isset($_GET['type']) && $_GET['type'] == 'postgres') {
|
|
|
|
$schema = isset($_GET['schema']) ? $_GET['schema'] : '';
|
|
|
|
echo json_encode(array(
|
2017-05-15 06:56:17 +00:00
|
|
|
'size' => (string)loadClass('Pgsql')->getSchemaSize($_GET['database'], $schema),
|
|
|
|
'table' => (string)loadClass('Pgsql')->getTableCount($_GET['database'], $schema)
|
2016-11-15 18:39:11 +00:00
|
|
|
));
|
|
|
|
}
|
|
|
|
} else if (isset($_GET['vhost'])) {
|
2017-05-15 06:56:17 +00:00
|
|
|
echo loadClass('Httpd')->checkVirtualHost($_GET['vhost']);
|
2016-11-15 18:39:11 +00:00
|
|
|
}
|