diff --git a/.devilbox/www/htdocs/_ajax_callback.php b/.devilbox/www/htdocs/_ajax_callback.php new file mode 100644 index 00000000..3ec6e8b0 --- /dev/null +++ b/.devilbox/www/htdocs/_ajax_callback.php @@ -0,0 +1,19 @@ + (string)$MySQL->getDBSize($_GET['database']), + 'table' => (string)$MySQL->getTableCount($_GET['database']) + )); + } else if (isset($_GET['type']) && $_GET['type'] == 'postgres') { + $schema = isset($_GET['schema']) ? $_GET['schema'] : ''; + echo json_encode(array( + 'size' => (string)$Postgres->getSchemaSize($_GET['database'], $schema), + 'table' => (string)$Postgres->getTableCount($_GET['database'], $schema) + )); + } +} else if (isset($_GET['vhost'])) { + echo $Docker->PHP_checkVirtualHost($_GET['vhost']); +} diff --git a/.devilbox/www/htdocs/_ajax_db.php b/.devilbox/www/htdocs/_ajax_db.php deleted file mode 100644 index 592bd5f8..00000000 --- a/.devilbox/www/htdocs/_ajax_db.php +++ /dev/null @@ -1,10 +0,0 @@ -getDBSize($_GET['size']); -} elseif (isset($_GET['table'])) { - echo $MySQL->getTableCount($_GET['table']); -} else { - echo '0'; -} diff --git a/.devilbox/www/htdocs/_ajax_vhost.php b/.devilbox/www/htdocs/_ajax_vhost.php deleted file mode 100644 index 8d413432..00000000 --- a/.devilbox/www/htdocs/_ajax_vhost.php +++ /dev/null @@ -1,10 +0,0 @@ -PHP_checkVirtualHost($_GET['valid']); - exit(); -} else { - echo ''; - exit(); -} diff --git a/.devilbox/www/htdocs/assets/css/custom.css b/.devilbox/www/htdocs/assets/css/custom.css index 63fa7cde..9c5a575a 100644 --- a/.devilbox/www/htdocs/assets/css/custom.css +++ b/.devilbox/www/htdocs/assets/css/custom.css @@ -26,6 +26,13 @@ body { } +/* Generics +-------------------------------------------------- */ +.font-small { + font-size: 12px; +} + + /* Circle Box -------------------------------------------------- */ @@ -76,7 +83,7 @@ body { @media (min-width: 801px) { - .circles > div {padding: 40%;} + .circles > div {padding: 48%;} } @@ -103,7 +110,7 @@ nav.navbar { -/* mailphp; +/* mail.php; -------------------------------------------------- */ tr.subject { cursor: pointer; @@ -111,4 +118,5 @@ tr.subject { td.break-word { word-break: break-word; -} \ No newline at end of file +} + diff --git a/.devilbox/www/htdocs/credits.php b/.devilbox/www/htdocs/credits.php index 0aa4214e..5683c8a8 100644 --- a/.devilbox/www/htdocs/credits.php +++ b/.devilbox/www/htdocs/credits.php @@ -6,7 +6,7 @@ - +
@@ -56,6 +56,11 @@ + + Adminer + Apache License 2.0 or GPL 2 + vrana/adminer + Bootstrap MIT diff --git a/.devilbox/www/htdocs/databases.php b/.devilbox/www/htdocs/db_mysql.php similarity index 57% rename from .devilbox/www/htdocs/databases.php rename to .devilbox/www/htdocs/db_mysql.php index 7b486e6d..9894a8dc 100644 --- a/.devilbox/www/htdocs/databases.php +++ b/.devilbox/www/htdocs/db_mysql.php @@ -6,11 +6,11 @@ - +
-

Databases

+

MySQL Databases



@@ -28,13 +28,17 @@ + getDatabases() as $name => $keys): ?> -      -           + + @@ -53,51 +57,40 @@ // your page initialization code here // the DOM will be available here - function updateSizes(database) { + function updateData(database) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { - var fill = ''; - var res = ''; - var len; + var res = null; + var size = 0; + var tables = 0; var i; if (this.readyState == 4 && this.status == 200) { - res = (this.responseText) == 0 ? '0sss MB' : this.responseText+' MB'; - len = res.length; - if (len < 9) { - for (i=len; i<9; i++) { - fill = ' ' + fill; - } + res = JSON.parse(this.response); - } - res = res.replace('sss', '   '); - res = fill + res; - document.getElementById('size-' + database).innerHTML = res; - } - }; - xhttp.open('GET', '_ajax_db.php?size=' + database, true); - xhttp.send(); - } - - - function updateCount(database) { - var xhttp = new XMLHttpRequest(); - - xhttp.onreadystatechange = function() { - var fill = ''; - var i; - - if (this.readyState == 4 && this.status == 200) { - if (this.responseText.length < 4) { - for (i=this.responseText.length; i<4; i++) { - fill = ' ' + fill; + // Normalize size output + size = res.size == 0 ? '0sss MB' : res.size + ' MB'; + if (size.length < ) { + for (i = size.length; i < ; ++i) { + size = ' ' + size; } } - document.getElementById('table-' + database).innerHTML = fill + this.responseText; + size = size.replace('sss', '   '); + + // Normalize tables output + tables = res.table; + if (tables.length < ) { + for (i = tables.length; i < ; ++i) { + tables = ' ' + tables; + } + } + + document.getElementById('size-' + database).innerHTML = size; + document.getElementById('table-' + database).innerHTML = tables; } }; - xhttp.open('GET', '_ajax_db.php?table=' + database, true); + xhttp.open('GET', '_ajax_callback.php?type=mysql&database=' + database, true); xhttp.send(); } @@ -106,8 +99,7 @@ for (i = 0; i < databases.length; i++) { database = databases[i].value; - updateSizes(database); - updateCount(database); + updateData(database); } })(); diff --git a/.devilbox/www/htdocs/db_postgres.php b/.devilbox/www/htdocs/db_postgres.php new file mode 100644 index 00000000..c60512e2 --- /dev/null +++ b/.devilbox/www/htdocs/db_postgres.php @@ -0,0 +1,120 @@ + + + + + + + + + + +
+ +

PostgreSQL Databases

+
+
+ +
+
+ + + + + + + + + + + + + + getDatabases() as $name => $database): ?> + + + + + + + $data): ?> + + + + + + + + + + + +
NameCharsetCollationTablesSize
+ +
+ +
+
+ +
+ + + + + + diff --git a/.devilbox/www/htdocs/debug.php b/.devilbox/www/htdocs/debug.php index 742474a8..8ae69bcb 100644 --- a/.devilbox/www/htdocs/debug.php +++ b/.devilbox/www/htdocs/debug.php @@ -6,7 +6,7 @@ - +
diff --git a/.devilbox/www/htdocs/index.php b/.devilbox/www/htdocs/index.php index c158149d..81bb941a 100644 --- a/.devilbox/www/htdocs/index.php +++ b/.devilbox/www/htdocs/index.php @@ -6,7 +6,7 @@ - +
@@ -33,7 +33,7 @@ -
+
@@ -50,7 +50,7 @@ -
+
@@ -67,7 +67,7 @@ -
+
@@ -80,6 +80,25 @@
+ + + + +
+
+
+
+
+
+

Postgres_version();?>

+
+
+
+
+
+
+ +


@@ -88,18 +107,22 @@ -
- +
+
- + - + + + + + @@ -111,19 +134,22 @@ -
-
httpd dockerHTTPD docker
IP AddressIP
Hostname
Document Root /shared/httpd
+
+
- + - + + + + @@ -217,30 +243,74 @@ -
-
php dockerPHP docker
IP AddressIP
Hostname
Document Root /shared/httpd
+
+
- + - + - + + + + + - +
db dockerMySQL docker
IP AddressIP
MySQL socketHostname
socket MySQL_config('socket'); ?>
MySQL datadirdatadir MySQL_config('datadir'); ?>
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
PostgreSQL docker
IP
Hostname
socketPostgres_config('unix_socket_directory'); + if (empty($dir)) { + // Postgres 9.6 + $dir = $Docker->Postgres_config('unix_socket_directories'); + } + echo $dir; + + ?>
datadirPostgres_config('data_directory'); ?>
+
+
@@ -263,11 +333,11 @@ -
- +
+
- + @@ -287,11 +357,11 @@ -
-
httpd dockerHTTPD docker host
+
+
- + @@ -319,11 +389,11 @@ -
-
php dockerPHP docker host
+
+
- + @@ -344,6 +414,31 @@
db dockerMySQL docker host
+ + + + +
+ + + + + + + + + + + + + + + + + +
Postgres dockerhost
Postgres datadirgetEnv('HOST_PATH_TO_POSTGRES_DATADIR');?>
Log directory./log
+
+
diff --git a/.devilbox/www/htdocs/mail.php b/.devilbox/www/htdocs/mail.php index df93a0b8..df1d07db 100644 --- a/.devilbox/www/htdocs/mail.php +++ b/.devilbox/www/htdocs/mail.php @@ -37,27 +37,27 @@ $sort = $MySort->getSort(); $order = $MySort->getOrder(); // Evaluate Sorters/Orderers -$orderDate = ''; -$orderTo = ''; -$orderSubj = ''; +$orderDate = ''; +$orderTo = ''; +$orderSubj = ''; if ($sort == 'date') { if ($order == 'ASC') { - $orderDate = ' '; + $orderDate = ' '; } else { - $orderDate = ' '; + $orderDate = ' '; } } else if ($sort == 'subject') { if ($order == 'ASC') { - $orderSubj = ' '; + $orderSubj = ' '; } else { - $orderSubj = ' '; + $orderSubj = ' '; } } else if ($sort == 'x-original-to') { if ($order == 'ASC') { - $orderTo = ' '; + $orderTo = ' '; } else { - $orderTo = ' '; + $orderTo = ' '; } } @@ -80,7 +80,7 @@ $messages = $MyMbox->get($sortOrderArr); - +

Mail

@@ -125,7 +125,7 @@ $messages = $MyMbox->get($sortOrderArr);
-

Received Emails

+

Received Emails


diff --git a/.devilbox/www/htdocs/mysqlinfo.php b/.devilbox/www/htdocs/mysqlinfo.php index fa4a447b..42d0e5eb 100644 --- a/.devilbox/www/htdocs/mysqlinfo.php +++ b/.devilbox/www/htdocs/mysqlinfo.php @@ -6,7 +6,7 @@ - +
diff --git a/.devilbox/www/htdocs/opcache.php b/.devilbox/www/htdocs/opcache.php index f02b139e..f5eda4fe 100644 --- a/.devilbox/www/htdocs/opcache.php +++ b/.devilbox/www/htdocs/opcache.php @@ -321,7 +321,7 @@ $opcache = OpCacheService::init($options); - + diff --git a/.devilbox/www/htdocs/phpinfo.php b/.devilbox/www/htdocs/phpinfo.php index 9250a89b..f14b4cb2 100644 --- a/.devilbox/www/htdocs/phpinfo.php +++ b/.devilbox/www/htdocs/phpinfo.php @@ -6,7 +6,7 @@ - +
diff --git a/.devilbox/www/htdocs/postgresinfo.php b/.devilbox/www/htdocs/postgresinfo.php new file mode 100644 index 00000000..fdd43bb5 --- /dev/null +++ b/.devilbox/www/htdocs/postgresinfo.php @@ -0,0 +1,44 @@ + + + + + + + + + + +
+ +

PostgreSQL Info

+
+
+ +
+
+ + + + + + + + + + Postgres_config() as $key => $val): ?> + + + + + + +
VariableValue
+ +
+
+ +
+ + + + diff --git a/.devilbox/www/htdocs/vendor/phpmyadmin/config.inc.php b/.devilbox/www/htdocs/vendor/phpmyadmin/config.inc.php index 2ae68939..15bb1eab 100644 --- a/.devilbox/www/htdocs/vendor/phpmyadmin/config.inc.php +++ b/.devilbox/www/htdocs/vendor/phpmyadmin/config.inc.php @@ -28,7 +28,7 @@ $i++; /* Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'cookie'; /* Server parameters */ -$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['host'] = 'mysql'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['AllowNoPassword'] = true; diff --git a/.devilbox/www/htdocs/vhosts.php b/.devilbox/www/htdocs/vhosts.php index f864a4cb..df19fb6d 100644 --- a/.devilbox/www/htdocs/vhosts.php +++ b/.devilbox/www/htdocs/vhosts.php @@ -6,7 +6,7 @@ - +
@@ -88,7 +88,7 @@ } } }; - xhttp.open('GET', '_ajax_vhost.php?valid=' + vhost, true); + xhttp.open('GET', '_ajax_callback.php?vhost=' + vhost, true); xhttp.send(); }